@enerex/template-studio 1.1.31 → 1.1.33

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.
@@ -1,11 +1,11 @@
1
- import { jsx as o, jsxs as S, Fragment as xe } from "react/jsx-runtime";
2
- import q, { useContext as se, useState as x, useRef as Se, useEffect as N } from "react";
3
- import { QueryClient as Ce, QueryClientProvider as Ee, useQuery as H, useMutation as ae, useQueryClient as Ie } from "@tanstack/react-query";
4
- import J from "axios";
5
- import { Spinner as Q, Form as P, Card as X, Row as _e, Col as O, Button as Z } from "react-bootstrap";
6
- import { Controller as Ne, useForm as Pe } from "react-hook-form";
7
- import ee, { components as je } from "react-select";
8
- const U = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
1
+ import { jsx as i, jsxs as I, Fragment as Ee } from "react/jsx-runtime";
2
+ import j, { useContext as de, useState as S, useRef as Ie, useEffect as E } from "react";
3
+ import { QueryClient as _e, QueryClientProvider as Ne, useQuery as z, useMutation as ce, useQueryClient as Pe } from "@tanstack/react-query";
4
+ import ee from "axios";
5
+ import { Spinner as J, Form as O, Card as te, Row as Ae, Col as A, Button as ne } from "react-bootstrap";
6
+ import { Controller as je, useForm as Oe } from "react-hook-form";
7
+ import re, { components as Le } from "react-select";
8
+ const F = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
9
9
  <html\r
10
10
  dir="ltr"\r
11
11
  xmlns:o="urn:schemas-microsoft-com:office:office"\r
@@ -361,156 +361,155 @@ const U = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:
361
361
  </div>\r
362
362
  </body>\r
363
363
  </html>\r
364
- `, le = q.createContext(
364
+ `, pe = j.createContext(
365
365
  void 0
366
- ), Ae = ({
366
+ ), Re = ({
367
367
  children: e,
368
368
  configs: r
369
369
  }) => {
370
- const [i, a] = q.useState(r.clientId), [n, t] = q.useState(r.apiKey), [s, d] = q.useState(
370
+ const [s, l] = j.useState(r.clientId), [n, t] = j.useState(r.apiKey), [o, d] = j.useState(
371
371
  r.enerexIdentifier
372
- ), [p, E] = q.useState(r.projectId), T = (y) => {
373
- t(y.apiKey), a(y.clientId), E(y.projectId), d(y.enerexIdentifier);
372
+ ), [p, v] = j.useState(r.projectId), [N, b] = j.useState(r.userEmail), T = (w) => {
373
+ t(w.apiKey), l(w.clientId), v(w.projectId), d(w.enerexIdentifier), b(w.userEmail);
374
374
  };
375
- return /* @__PURE__ */ o(
376
- le.Provider,
375
+ return /* @__PURE__ */ i(
376
+ pe.Provider,
377
377
  {
378
378
  value: {
379
- clientId: i,
379
+ clientId: s,
380
380
  apiKey: n,
381
381
  setConfiguration: T,
382
- enerexIdentifier: s,
383
- projectId: p
382
+ enerexIdentifier: o,
383
+ projectId: p,
384
+ userEmail: N
384
385
  },
385
386
  children: e
386
387
  }
387
388
  );
388
- }, C = () => {
389
- const e = se(le);
389
+ }, _ = () => {
390
+ const e = de(pe);
390
391
  if (!e)
391
392
  throw new Error("widgetConfig must be used within a ConfigProvider");
392
393
  return e;
393
- }, de = (e = "", r) => ({ get: async (n, t) => {
394
+ }, me = (e = "", r) => ({ get: async (n, t) => {
394
395
  try {
395
- const s = await J.get(
396
+ const o = await ee.get(
396
397
  `${e}${n}`,
397
398
  t ?? r
398
399
  );
399
- if (s.status === 200)
400
- return s.data;
401
- } catch (s) {
402
- throw s;
400
+ if (o.status === 200)
401
+ return o.data;
402
+ } catch (o) {
403
+ throw o;
403
404
  }
404
- }, post: async (n, t, s) => {
405
+ }, post: async (n, t, o) => {
405
406
  try {
406
- const d = await J.post(
407
+ const d = await ee.post(
407
408
  `${e}${n}`,
408
409
  t,
409
- s ?? r
410
+ o ?? r
410
411
  );
411
412
  if (d.status === 200)
412
413
  return d.data;
413
414
  } catch (d) {
414
415
  throw d;
415
416
  }
416
- } }), F = {
417
+ } }), H = {
417
418
  EDITOR_SCRIPT_URL: "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js",
418
419
  EDITOR_PLUGIN_ID: "1afdc3161ec7409a8627a1c8561d45f5",
419
420
  EDITOR_SECRET_KEY: "54ba748ed7e94f2e929555783acb03da",
420
421
  API_BASE_URL: "https://dev-socket.enerex.com/common/api"
421
422
  //API_BASE_URL: "https://localhost:44338/api",
422
423
  // more env variables...
423
- }, ce = q.createContext({
424
+ }, ue = j.createContext({
424
425
  get: () => {
425
426
  throw new Error("HttpClientContext.get not implemented");
426
427
  },
427
428
  post: () => {
428
429
  throw new Error("HttpClientContext.post not implemented");
429
430
  }
430
- }), Re = ({ children: e }) => {
431
- const { clientId: r, apiKey: i } = C(), a = {
431
+ }), qe = ({ children: e }) => {
432
+ const { clientId: r, apiKey: s } = _(), l = {
432
433
  headers: {
433
434
  client_id: r,
434
- "x-api-key": i
435
+ "x-api-key": s
435
436
  }
436
- }, { get: n, post: t } = de(F.API_BASE_URL, a);
437
- return /* @__PURE__ */ o(ce.Provider, { value: { get: n, post: t }, children: e });
438
- }, Oe = ({ children: e }) => {
439
- const r = new Ce();
440
- return /* @__PURE__ */ o(Re, { children: /* @__PURE__ */ o(Ee, { client: r, children: e }) });
441
- }, qe = (e) => {
442
- const r = Array.from(new Set(e.map((a) => a.category))), i = [];
443
- return r.forEach((a) => {
444
- const n = e.filter((t) => t.category === a).map((t) => ({
437
+ }, { get: n, post: t } = me(H.API_BASE_URL, l);
438
+ return /* @__PURE__ */ i(ue.Provider, { value: { get: n, post: t }, children: e });
439
+ }, De = ({ children: e }) => {
440
+ const r = new _e();
441
+ return /* @__PURE__ */ i(qe, { children: /* @__PURE__ */ i(Ne, { client: r, children: e }) });
442
+ }, $e = (e) => {
443
+ const r = Array.from(new Set(e.map((l) => l.category))), s = [];
444
+ return r.forEach((l) => {
445
+ const n = e.filter((t) => t.category === l).map((t) => ({
445
446
  label: t.label,
446
447
  value: t.value,
447
448
  hint: t.hint,
448
449
  hidden: t.hidden
449
450
  }));
450
- i.push({ category: a, entries: n });
451
- }), i;
451
+ s.push({ category: l, entries: n });
452
+ }), s;
452
453
  }, D = () => {
453
- const e = se(ce);
454
+ const e = de(ue);
454
455
  if (e)
455
456
  return e;
456
457
  throw new Error("useHttpClient must be used within a HttpClientProvider");
457
- }, L = {
458
+ }, $ = {
458
459
  Template_list: "/Template/list/",
459
460
  Template: "/Template/GetTemplate/",
460
461
  MergeTags: "/Template/TemplateMergeTags/",
461
462
  ExcludeCategory: "/Template/GetExcludeCategories/",
462
463
  SaveTemplate: "/Template/save-update/",
463
464
  TemplateTypes: "/Template/TemplateTypes/"
464
- }, De = () => {
465
- const e = D(), { enerexIdentifier: r, projectId: i } = C();
466
- return H({
465
+ }, ke = () => {
466
+ const e = D(), { enerexIdentifier: r, projectId: s } = _();
467
+ return z({
467
468
  queryKey: ["getTemplateTags"],
468
469
  queryFn: async (n) => await e.get(
469
- `${L.MergeTags}${i}/${r}`
470
+ `${$.MergeTags}${s}/${r}`
470
471
  )
471
472
  });
472
- }, Le = () => {
473
- const e = D(), { enerexIdentifier: r, projectId: i } = C();
474
- return H({
473
+ }, Be = () => {
474
+ const e = D(), { enerexIdentifier: r, projectId: s } = _();
475
+ return z({
475
476
  queryKey: ["getExcludeCategory"],
476
477
  queryFn: async (n) => await e.get(
477
- `${L.ExcludeCategory}${i}/${r}`
478
+ `${$.ExcludeCategory}${s}/${r}`
478
479
  )
479
480
  });
480
- }, W = Date.now().toString(36) + Math.random().toString(36).substr(2);
481
- console.log("uniqueId", W);
482
- const $e = ({
481
+ }, Me = ({
483
482
  templateHTML: e,
484
483
  className: r = "",
485
- loading: i = !1
484
+ loading: s = !1
486
485
  }) => {
487
- const { post: a } = de(), { data: n } = De(), { data: t } = Le(), [s, d] = x(
488
- e ?? { html: U, css: "" }
489
- ), { enerexIdentifier: p, projectId: E } = C(), T = Se(null), y = "https://plugin.stripocdn.email/content/guids/CABINET_eab4e7d5a4603ac03f4120652a3a5a540f0c79c688514939f095f67433ed4a67/images/photo256.png", v = "https://plugins.stripo.email/api/v1/auth";
490
- N(() => {
491
- (async () => (await j(), n && t && await I(F.EDITOR_SCRIPT_URL)))();
486
+ const { post: l } = me(), { data: n } = ke(), { data: t } = Be(), [o, d] = S(
487
+ e ?? { html: F, css: "" }
488
+ ), { userEmail: p } = _(), v = Ie(null), N = "https://plugin.stripocdn.email/content/guids/CABINET_eab4e7d5a4603ac03f4120652a3a5a540f0c79c688514939f095f67433ed4a67/images/photo256.png", b = "https://plugins.stripo.email/api/v1/auth";
489
+ E(() => {
490
+ (async () => (await T(), n && t && await w(H.EDITOR_SCRIPT_URL)))();
492
491
  }, [n, t]);
493
- async function j() {
494
- window.Zone || await new Promise((f, u) => {
495
- const g = document.createElement("script");
496
- g.src = "https://unpkg.com/zone.js@0.13.1/bundles/zone.umd.min.js";
497
- const b = document.querySelector("script[nonce]")?.nonce;
498
- b && g.setAttribute("nonce", b), g.onload = () => f(), g.onerror = () => u(new Error("Failed to load zone.js")), document.head.appendChild(g);
492
+ async function T() {
493
+ window.Zone || await new Promise((c, g) => {
494
+ const f = document.createElement("script");
495
+ f.src = "https://unpkg.com/zone.js@0.13.1/bundles/zone.umd.min.js";
496
+ const y = document.querySelector("script[nonce]")?.nonce;
497
+ y && f.setAttribute("nonce", y), f.onload = () => c(), f.onerror = () => g(new Error("Failed to load zone.js")), document.head.appendChild(f);
499
498
  });
500
499
  }
501
- async function I(f) {
502
- let u = document.getElementById(
500
+ async function w(c) {
501
+ let g = document.getElementById(
503
502
  "UiEditorScript"
504
503
  );
505
- u || (u = document.createElement("script"), u.id = "UiEditorScript", u.src = f, u.onload = async () => {
506
- await m();
507
- }, document.body.appendChild(u)), await new Promise(
508
- (g) => u.addEventListener("load", () => g(), { once: !0 })
504
+ g || (g = document.createElement("script"), g.id = "UiEditorScript", g.src = c, g.onload = async () => {
505
+ await P();
506
+ }, document.body.appendChild(g)), await new Promise(
507
+ (f) => g.addEventListener("load", () => f(), { once: !0 })
509
508
  );
510
509
  }
511
- const m = async () => {
512
- const f = T.current;
513
- if (!f) {
510
+ const P = async () => {
511
+ const c = v.current;
512
+ if (!c) {
514
513
  console.error("Missing #stripoEditorContainer in DOM");
515
514
  return;
516
515
  }
@@ -518,45 +517,45 @@ const $e = ({
518
517
  console.error("UIEditor script not loaded or not exposing initEditor");
519
518
  return;
520
519
  }
521
- const u = {
522
- html: s.html,
523
- css: s.css,
520
+ const g = {
521
+ html: o.html,
522
+ css: o.css,
524
523
  modulesExcludedCategories: t ?? [],
525
524
  forceRecreate: !0,
526
525
  metadata: {
527
- emailId: W,
526
+ emailId: p,
528
527
  userId: "1",
529
528
  // username: userName,
530
- avatarUrl: y
529
+ avatarUrl: N
531
530
  },
532
531
  locale: "en",
533
- onTokenRefreshRequest: async (g) => {
534
- const b = {
535
- pluginId: F.EDITOR_PLUGIN_ID,
536
- secretKey: F.EDITOR_SECRET_KEY,
537
- userId: W,
532
+ onTokenRefreshRequest: async (f) => {
533
+ const y = {
534
+ pluginId: H.EDITOR_PLUGIN_ID,
535
+ secretKey: H.EDITOR_SECRET_KEY,
536
+ userId: p,
538
537
  role: "user"
539
- }, A = await a(
540
- v,
541
- b
538
+ }, C = await l(
539
+ b,
540
+ y
542
541
  );
543
- A?.token && g(A.token);
542
+ C?.token && f(C.token);
544
543
  },
545
- mergeTags: qe(n ?? [])
544
+ mergeTags: $e(n ?? [])
546
545
  };
547
- for (const [g, b] of Object.entries({
546
+ for (const [f, y] of Object.entries({
548
547
  codeEditorButtonSelector: "#codeEditor",
549
548
  undoButtonSelector: "#undoButton",
550
549
  redoButtonSelector: "#redoButton",
551
550
  mobileViewButtonSelector: "#mobileViewButton",
552
551
  desktopViewButtonSelector: "#desktopViewButton"
553
552
  }))
554
- f.ownerDocument && f.getRootNode() instanceof ShadowRoot && f.getRootNode().querySelector(b) && (u[g] = b);
555
- await window.UIEditor.initEditor(f, u);
553
+ c.ownerDocument && c.getRootNode() instanceof ShadowRoot && c.getRootNode().querySelector(y) && (g[f] = y);
554
+ await window.UIEditor.initEditor(c, g);
556
555
  };
557
- return /* @__PURE__ */ o("div", { className: "position-relative", children: /* @__PURE__ */ S("div", { className: `editor-container ${r}`, children: [
558
- i && /* @__PURE__ */ o("div", { className: "loading-overlay", children: /* @__PURE__ */ o(
559
- Q,
556
+ return /* @__PURE__ */ i("div", { className: "position-relative", children: /* @__PURE__ */ I("div", { className: `editor-container ${r}`, children: [
557
+ s && /* @__PURE__ */ i("div", { className: "loading-overlay", children: /* @__PURE__ */ i(
558
+ J,
560
559
  {
561
560
  animation: "border",
562
561
  style: { width: "11px", height: "11px" },
@@ -565,113 +564,130 @@ const $e = ({
565
564
  className: "me-1"
566
565
  }
567
566
  ) }),
568
- /* @__PURE__ */ o("div", { id: "externalSystemContainer" }),
569
- /* @__PURE__ */ o("div", { id: "stripoEditorContainer", ref: T })
567
+ /* @__PURE__ */ i("div", { id: "externalSystemContainer" }),
568
+ /* @__PURE__ */ i("div", { id: "stripoEditorContainer", ref: v })
570
569
  ] }) });
571
- }, te = ({
570
+ }, ie = ({
572
571
  label: e,
573
572
  register: r,
574
- validation: i,
575
- required: a = !1,
573
+ validation: s,
574
+ required: l = !1,
576
575
  name: n,
577
576
  error: t,
578
- className: s = "",
577
+ className: o = "",
579
578
  ...d
580
- }) => /* @__PURE__ */ S(P.Group, { className: s + " mb-1", children: [
581
- e ? /* @__PURE__ */ S(P.Label, { className: "mb-3 d-block form-label", children: [
579
+ }) => /* @__PURE__ */ I(O.Group, { className: o + " mb-1", children: [
580
+ e ? /* @__PURE__ */ I(O.Label, { className: "mb-3 d-block form-label", children: [
582
581
  e,
583
- a && /* @__PURE__ */ o("label", { className: "text-danger", children: "*" })
582
+ l && /* @__PURE__ */ i("label", { className: "text-danger", children: "*" })
584
583
  ] }) : null,
585
- /* @__PURE__ */ o(
586
- P.Control,
584
+ /* @__PURE__ */ i(
585
+ O.Control,
587
586
  {
588
587
  name: n,
589
588
  type: "text",
590
589
  ...d,
591
590
  isInvalid: !!(t && t[n]),
592
591
  ...r ? r(n, {
593
- ...i
592
+ ...s
594
593
  }) : {},
595
594
  className: `react-select__control ${t && t[n] && "border border-danger"}`
596
595
  }
597
596
  ),
598
- t && t[n] ? /* @__PURE__ */ o(P.Control.Feedback, { type: "invalid", children: t[n].message }) : null
599
- ] }), ke = () => {
600
- const e = D(), { enerexIdentifier: r, projectId: i } = C();
601
- return H({
597
+ t && t[n] ? /* @__PURE__ */ i(O.Control.Feedback, { type: "invalid", children: t[n].message }) : null
598
+ ] }), Ue = () => {
599
+ const e = D(), { enerexIdentifier: r, projectId: s } = _();
600
+ return z({
602
601
  queryKey: ["getTemplatesList"],
603
602
  queryFn: async (n) => await e.get(
604
- `${L.Template_list}${i}/${r}`
603
+ `${$.Template_list}${s}/${r}`
605
604
  )
606
605
  });
607
606
  };
608
- function z(e) {
609
- return e.sort((r, i) => r.name.localeCompare(i.name));
607
+ function Q(e) {
608
+ return e.sort((r, s) => r.name.localeCompare(s.name));
610
609
  }
611
- const Be = () => {
612
- const e = D(), { enerexIdentifier: r, projectId: i } = C();
613
- return ae({
610
+ function Fe(e) {
611
+ const r = /* @__PURE__ */ new Map(), s = [];
612
+ e.forEach((t) => r.set(t.id, t));
613
+ let l = e.filter((t) => t.parent_id === 0), n = 0;
614
+ for (; l.length > 0; ) {
615
+ s.push({ level: n, data: l });
616
+ const t = l.map((d) => d.id);
617
+ l = e.filter(
618
+ (d) => t.includes(d.parent_id)
619
+ ), n++;
620
+ }
621
+ return s;
622
+ }
623
+ function W(e, r) {
624
+ const l = Fe(e).find((n) => n.level === r);
625
+ return l ? l.data : [];
626
+ }
627
+ const He = () => {
628
+ const e = D(), { enerexIdentifier: r, projectId: s } = _();
629
+ return ce({
614
630
  mutationKey: ["getTemplate"],
615
631
  mutationFn: async ({ id: n }) => {
616
632
  if (n)
617
633
  return await e.get(
618
- `${L.Template}${r}/${n}/${i}`
634
+ `${$.Template}${r}/${n}/${s}`
619
635
  );
620
636
  }
621
637
  });
622
- }, Me = () => {
623
- const e = D(), { enerexIdentifier: r, projectId: i } = C();
624
- return H({
638
+ }, ze = () => {
639
+ const e = D(), { enerexIdentifier: r, projectId: s } = _();
640
+ return z({
625
641
  queryKey: ["getTemplateTypes"],
626
642
  queryFn: async (n) => await e.get(
627
- `${L.TemplateTypes}${r}/${i}`
643
+ `${$.TemplateTypes}${r}/${s}`
628
644
  )
629
645
  });
630
646
  };
631
- function Ue(e) {
647
+ function Ge(e) {
632
648
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
633
649
  }
634
- var V = { exports: {} };
650
+ var Y = { exports: {} };
635
651
  /*!
636
652
  Copyright (c) 2018 Jed Watson.
637
653
  Licensed under the MIT License (MIT), see
638
654
  http://jedwatson.github.io/classnames
639
655
  */
640
- var ne;
641
- function Fe() {
642
- return ne || (ne = 1, function(e) {
656
+ var se;
657
+ function Ve() {
658
+ return se || (se = 1, function(e) {
643
659
  (function() {
644
660
  var r = {}.hasOwnProperty;
645
- function i() {
646
- for (var t = "", s = 0; s < arguments.length; s++) {
647
- var d = arguments[s];
648
- d && (t = n(t, a(d)));
661
+ function s() {
662
+ for (var t = "", o = 0; o < arguments.length; o++) {
663
+ var d = arguments[o];
664
+ d && (t = n(t, l(d)));
649
665
  }
650
666
  return t;
651
667
  }
652
- function a(t) {
668
+ function l(t) {
653
669
  if (typeof t == "string" || typeof t == "number")
654
670
  return t;
655
671
  if (typeof t != "object")
656
672
  return "";
657
673
  if (Array.isArray(t))
658
- return i.apply(null, t);
674
+ return s.apply(null, t);
659
675
  if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
660
676
  return t.toString();
661
- var s = "";
677
+ var o = "";
662
678
  for (var d in t)
663
- r.call(t, d) && t[d] && (s = n(s, d));
664
- return s;
679
+ r.call(t, d) && t[d] && (o = n(o, d));
680
+ return o;
665
681
  }
666
- function n(t, s) {
667
- return s ? t ? t + " " + s : t + s : t;
682
+ function n(t, o) {
683
+ return o ? t ? t + " " + o : t + o : t;
668
684
  }
669
- e.exports ? (i.default = i, e.exports = i) : window.classNames = i;
685
+ e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
670
686
  })();
671
- }(V)), V.exports;
687
+ }(Y)), Y.exports;
672
688
  }
673
- var He = Fe();
674
- const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__ */ o("div", { style: { padding: 0, margin: "2px 0" }, children: /* @__PURE__ */ o(
689
+ var Ke = Ve();
690
+ const oe = /* @__PURE__ */ Ge(Ke), le = (e) => e.data.isSeparator ? /* @__PURE__ */ i("div", { style: { padding: 0, margin: "2px 0" }, children: /* @__PURE__ */ i(
675
691
  "hr",
676
692
  {
677
693
  style: {
@@ -681,25 +697,25 @@ const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__
681
697
  margin: 0
682
698
  }
683
699
  }
684
- ) }) : /* @__PURE__ */ o(je.Option, { ...e }), ze = ({
700
+ ) }) : /* @__PURE__ */ i(Le.Option, { ...e }), Qe = ({
685
701
  name: e = "",
686
702
  control: r,
687
- options: i,
688
- multiple: a = !1,
703
+ options: s,
704
+ multiple: l = !1,
689
705
  placeholder: n,
690
706
  validation: t,
691
- labelKey: s = "name",
707
+ labelKey: o = "name",
692
708
  disabled: d,
693
709
  isInvalid: p,
694
- value: E,
695
- onChange: T,
696
- uncontrolled: y,
697
- menuPlacement: v = "auto",
698
- closeOnSelect: j = !0
710
+ value: v,
711
+ onChange: N,
712
+ uncontrolled: b,
713
+ menuPlacement: T = "auto",
714
+ closeOnSelect: w = !0
699
715
  }) => {
700
- const I = {
701
- control: (m) => ({
702
- ...m,
716
+ const P = {
717
+ control: (c) => ({
718
+ ...c,
703
719
  minHeight: "33px",
704
720
  // state.isFocused can display different borderColor if you need it
705
721
  borderColor: p ? "var(--bs-form-invalid-border-color) !important" : "var(--ct-input-border-color)",
@@ -720,247 +736,272 @@ const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__
720
736
  display: "none"
721
737
  }
722
738
  }),
723
- menu: (m) => ({
724
- ...m,
739
+ menu: (c) => ({
740
+ ...c,
725
741
  marginTop: 0,
726
742
  width: "max-content",
727
743
  minWidth: "100%"
728
744
  }),
729
- menuPortal: (m) => ({
730
- ...m,
745
+ menuPortal: (c) => ({
746
+ ...c,
731
747
  zIndex: 9999
732
748
  }),
733
- multiValueRemove: (m) => ({
734
- ...m,
749
+ multiValueRemove: (c) => ({
750
+ ...c,
735
751
  display: d ? "none" : "block"
736
752
  })
737
753
  };
738
- return y ? /* @__PURE__ */ o(
739
- ee,
754
+ return b ? /* @__PURE__ */ i(
755
+ re,
740
756
  {
741
- components: { Option: oe },
742
- isOptionDisabled: (m) => !!m.isSeparator,
743
- className: re({
757
+ components: { Option: le },
758
+ isOptionDisabled: (c) => !!c.isSeparator,
759
+ className: oe({
744
760
  "is-invalid": p
745
761
  }),
746
- styles: I,
762
+ styles: P,
747
763
  classNamePrefix: "react-select",
748
- isMulti: a,
749
- options: i,
750
- onChange: T,
764
+ isMulti: l,
765
+ options: s,
766
+ onChange: N,
751
767
  placeholder: n,
752
768
  menuPortalTarget: document.body,
753
- value: E,
754
- getOptionLabel: typeof s == "string" ? (m) => m[s] : s,
755
- getOptionValue: (m) => m.id,
769
+ value: v,
770
+ getOptionLabel: typeof o == "string" ? (c) => c[o] : o,
771
+ getOptionValue: (c) => c.id,
756
772
  isDisabled: d,
757
- menuPlacement: v,
758
- closeMenuOnSelect: j
773
+ menuPlacement: T,
774
+ closeMenuOnSelect: w
759
775
  }
760
- ) : /* @__PURE__ */ o(
761
- Ne,
776
+ ) : /* @__PURE__ */ i(
777
+ je,
762
778
  {
763
779
  control: r,
764
780
  name: e,
765
781
  rules: t,
766
- render: ({ field: { onChange: m, value: f, onBlur: u } }) => /* @__PURE__ */ o(
767
- ee,
782
+ render: ({ field: { onChange: c, value: g, onBlur: f } }) => /* @__PURE__ */ i(
783
+ re,
768
784
  {
769
- components: { Option: oe },
770
- isOptionDisabled: (g) => !!g.isSeparator,
771
- className: re({
785
+ components: { Option: le },
786
+ isOptionDisabled: (y) => !!y.isSeparator,
787
+ className: oe({
772
788
  "is-invalid": p
773
789
  }),
774
- styles: I,
790
+ styles: P,
775
791
  classNamePrefix: "react-select",
776
- isMulti: a,
777
- options: i,
778
- onBlur: u,
779
- onChange: m,
792
+ isMulti: l,
793
+ options: s,
794
+ onBlur: f,
795
+ onChange: c,
780
796
  placeholder: n,
781
797
  menuPortalTarget: document.body,
782
- value: f,
783
- getOptionLabel: typeof s == "string" ? (g) => g[s] : s,
784
- getOptionValue: (g) => g.id,
798
+ value: g,
799
+ getOptionLabel: typeof o == "string" ? (y) => y[o] : o,
800
+ getOptionValue: (y) => y.id,
785
801
  isDisabled: d,
786
- menuPlacement: v,
787
- closeMenuOnSelect: j
802
+ menuPlacement: T,
803
+ closeMenuOnSelect: w
788
804
  },
789
- f ? JSON.stringify(f) : "reset"
805
+ g ? JSON.stringify(g) : "reset"
790
806
  )
791
807
  }
792
808
  );
793
- }, K = ({
809
+ }, M = ({
794
810
  label: e,
795
811
  name: r,
796
- validation: i,
797
- control: a,
812
+ validation: s,
813
+ control: l,
798
814
  error: n,
799
815
  ...t
800
- }) => /* @__PURE__ */ S(P.Group, { className: "mb-1", children: [
801
- e && /* @__PURE__ */ S(P.Label, { className: "mb-3 d-block form-label", children: [
816
+ }) => /* @__PURE__ */ I(O.Group, { className: "mb-1", children: [
817
+ e && /* @__PURE__ */ I(O.Label, { className: "mb-3 d-block form-label", children: [
802
818
  e,
803
819
  " ",
804
- t.required && /* @__PURE__ */ o("span", { className: "text-danger", children: "*" })
820
+ t.required && /* @__PURE__ */ i("span", { className: "text-danger", children: "*" })
805
821
  ] }),
806
- /* @__PURE__ */ o(
807
- ze,
822
+ /* @__PURE__ */ i(
823
+ Qe,
808
824
  {
809
- control: a,
825
+ control: l,
810
826
  options: t.options ?? [],
811
- validation: i,
827
+ validation: s,
812
828
  isInvalid: n && !!n[r],
813
829
  name: r
814
830
  }
815
831
  ),
816
- n && n[r] ? /* @__PURE__ */ o(P.Control.Feedback, { type: "invalid", children: n[r].message }) : null
817
- ] }), Ve = () => {
832
+ n && n[r] ? /* @__PURE__ */ i(O.Control.Feedback, { type: "invalid", children: n[r].message }) : null
833
+ ] }), We = () => {
818
834
  const e = D();
819
- Ie();
820
- const { enerexIdentifier: r, projectId: i } = C();
821
- return ae({
835
+ Pe();
836
+ const { enerexIdentifier: r, projectId: s } = _();
837
+ return ce({
822
838
  mutationKey: ["saveTemplate"],
823
- mutationFn: async (n) => (n.enerexIdentifier = r ?? "", n.projectId = i ?? "", await e.post(
824
- `${L.SaveTemplate}`,
839
+ mutationFn: async (n) => (n.enerexIdentifier = r ?? "", n.projectId = s ?? "", await e.post(
840
+ `${$.SaveTemplate}`,
825
841
  n
826
842
  ))
827
843
  });
828
- }, G = {
844
+ }, U = {
829
845
  id: "",
830
846
  name: "New (Blank)"
831
- }, ie = {
847
+ }, ae = {
832
848
  id: "",
833
849
  name: "Separator",
834
850
  isSeparator: !0
835
- }, Ke = ({
851
+ }, Ye = ({
836
852
  onSelectItem: e,
837
853
  templateLoading: r,
838
- onReset: i
854
+ onReset: s
839
855
  }) => {
840
856
  const {
841
- register: a,
857
+ register: l,
842
858
  handleSubmit: n,
843
859
  clearErrors: t,
844
- setValue: s,
860
+ setValue: o,
845
861
  control: d,
846
862
  watch: p,
847
- reset: E,
848
- setError: T,
849
- formState: { errors: y }
850
- } = Pe({
863
+ reset: v,
864
+ setError: N,
865
+ formState: { errors: b }
866
+ } = Oe({
851
867
  defaultValues: {
852
868
  templateName: "",
853
869
  subTemplateType: void 0,
870
+ subTemplateType2: void 0,
854
871
  subject: "",
855
872
  templateType: void 0,
856
- template: G
873
+ template: U
857
874
  },
858
875
  mode: "onChange"
859
876
  }), {
860
- data: v,
861
- refetch: j,
862
- isLoading: I
863
- } = ke(), [m, f] = x([]), [u, g] = x(), [b, A] = x(), { mutateAsync: pe, isPending: R } = Be(), { mutateAsync: me, isPending: k } = Ve(), { data: B, isLoading: Y } = Me(), [ue, ge] = x([]), [_, M] = x([]);
864
- N(() => {
865
- if (B) {
866
- let l = B.filter((c) => c.id != null).sort((c, w) => c.name.localeCompare(w.name));
867
- ge(
868
- z(l.filter((c) => c.parent_id === 0))
869
- ), M(
870
- z(
871
- l.filter(
872
- (c) => c.parent_id.toString() === `${p("templateType")?.id}`
873
- )
874
- )
875
- );
877
+ data: T,
878
+ refetch: w,
879
+ isLoading: P
880
+ } = Ue(), [c, g] = S([]), [f, y] = S(), [C, X] = S(), { mutateAsync: fe, isPending: L } = He(), { mutateAsync: ge, isPending: B } = We(), { data: k, isLoading: Z } = ze(), [ye, he] = S([]), [R, G] = S([]), [q, V] = S([]);
881
+ E(() => {
882
+ if (k) {
883
+ let a = k.filter((u) => u.id != null), m = W(a, 0);
884
+ he(Q(m));
876
885
  }
877
- }, [B]);
878
- const fe = (l, c) => {
879
- let w = [];
880
- return l.forEach((h, $) => {
881
- c.includes($) && $ !== 0 && w.push(ie), w.push(h);
882
- }), w;
886
+ }, [k]);
887
+ const be = (a, m) => {
888
+ let u = [];
889
+ return a.forEach((x, h) => {
890
+ m.includes(h) && h !== 0 && u.push(ae), u.push(x);
891
+ }), u;
883
892
  };
884
- N(() => {
885
- r(!!R);
886
- }, [R]), N(() => {
887
- v?.sort((l, c) => l.readonly !== c.readonly ? (l.readonly ? 0 : 1) - (c.readonly ? 0 : 1) : l.name.localeCompare(c.name)), f(v ?? []);
888
- }, [v]);
889
- const ye = async (l) => {
890
- g(l), l && !l.readonly ? (s("templateName", l?.name), t()) : (s("templateName", ""), s("subject", ""));
891
- const c = await pe({ id: l?.id });
892
- A(c || void 0);
893
+ E(() => {
894
+ r(!!L);
895
+ }, [L]), E(() => {
896
+ T?.sort((a, m) => a.readonly !== m.readonly ? (a.readonly ? 0 : 1) - (m.readonly ? 0 : 1) : a.name.localeCompare(m.name)), g(T ?? []);
897
+ }, [T]);
898
+ const we = async (a) => {
899
+ y(a), a && !a.readonly ? (o("templateName", a?.name), t()) : (o("templateName", ""), o("subject", ""));
900
+ const m = await fe({ id: a?.id });
901
+ X(m || void 0);
893
902
  };
894
- N(() => {
895
- if (s("template", G), p("templateType")) {
896
- let l = B?.filter((c) => c.id !== void 0) ?? [];
897
- M(
898
- z(
899
- l.filter(
900
- (c) => c.parent_id.toString() === `${p("templateType")?.id}`
903
+ E(() => {
904
+ if (o("template", U), p("templateType")) {
905
+ let a = k?.filter((u) => u.id !== void 0) ?? [], m = W(a, 1);
906
+ G(
907
+ Q(
908
+ m.filter(
909
+ (u) => u.parent_id.toString() === `${p("templateType")?.id}`
901
910
  )
902
911
  )
903
- ), s("subTemplateType", void 0);
912
+ ), o("subTemplateType", void 0), o("subTemplateType2", void 0);
904
913
  }
905
- }, [p("templateType")]), N(() => {
906
- let l = m.find((c) => c.id === p("template")?.id);
907
- ye(l);
908
- }, [p("template")]), N(() => {
909
- b && u ? (e(b), s("subject", b.subject ?? "")) : e(void 0);
910
- }, [b, u, e]);
911
- const he = () => {
912
- let l = [G], c = m.filter(
913
- (h) => (h.type?.toString() === p(
914
- _.length > 0 ? "subTemplateType" : "templateType"
915
- )?.id.toString() || h.type === null) && p(_.length > 0 ? "subTemplateType" : "templateType")?.id != null
916
- ), w = fe(c, [c.findIndex((h) => !h.readonly)]);
917
- return w.length > 0 && (l.push(ie), l = [
918
- ...l,
919
- ...w.map((h) => ({
914
+ }, [p("templateType")]), E(() => {
915
+ if (o("template", U), p("subTemplateType")) {
916
+ let a = k?.filter((u) => u.id !== void 0) ?? [], m = W(a, 2);
917
+ V(
918
+ Q(
919
+ m.filter(
920
+ (u) => u.parent_id.toString() === `${p("subTemplateType")?.id}`
921
+ )
922
+ )
923
+ ), o("subTemplateType2", void 0);
924
+ }
925
+ }, [p("subTemplateType")]), E(() => {
926
+ let a = c.find((m) => m.id === p("template")?.id);
927
+ we(a);
928
+ }, [p("template")]), E(() => {
929
+ C && f ? (e(C), o("subject", C.subject ?? "")) : e(void 0);
930
+ }, [C, f, e]);
931
+ const Te = () => {
932
+ let a = [U], m = "templateType";
933
+ q.length > 0 ? m = "subTemplateType2" : R.length > 0 && (m = "subTemplateType");
934
+ let u = c.filter(
935
+ (h) => (h.type?.toString() === p(m)?.id.toString() || h.type === null) && p(m)?.id != null
936
+ ), x = be(u, [u.findIndex((h) => !h.readonly)]);
937
+ return x.length > 0 && (a.push(ae), a = [
938
+ ...a,
939
+ ...x.map((h) => ({
920
940
  id: h.id,
921
- name: h.name,
941
+ name: ve(u, h.id),
922
942
  isSeparator: h.isSeparator
923
943
  }))
924
- ]), l.length ? l : [];
925
- }, be = (l) => {
944
+ ]), a.length ? a : [];
945
+ }, ve = (a, m) => {
946
+ let u = a.find((x) => x.id === m);
947
+ return u ? `${u.displayName}` : "";
948
+ }, xe = (a) => {
926
949
  window.StripoEditorApi.actionsApi.getTemplateData(
927
- async (c) => {
928
- let w = l.template.id, h = "";
929
- u?.readonly && (w = "", h = l.template.id);
930
- let $ = m.find(
931
- (ve) => ve.name === l.templateName.trim()
950
+ async (m) => {
951
+ let u = a.template.id, x = "";
952
+ f?.readonly && (u = "", x = a.template.id);
953
+ let h = c.find(
954
+ (Ce) => Ce.name === a.templateName.trim()
932
955
  );
933
- if ($ && $.id !== w) {
934
- T("templateName", {
956
+ if (h && h.id !== u) {
957
+ N("templateName", {
935
958
  type: "validate",
936
959
  message: "Template name already exists. Please choose a different name."
937
960
  });
938
961
  return;
939
962
  }
940
- let we = !!(_ && _.length > 0);
941
- const Te = {
963
+ let K = a.templateType.id;
964
+ q && q.length > 0 ? K = a.subTemplateType2.id : R && R.length > 0 && (K = a.subTemplateType.id);
965
+ const Se = {
942
966
  enerexIdentifier: "",
943
967
  projectId: "",
944
- templateId: w,
945
- templateType: we ? l.subTemplateType.id : l.templateType.id,
946
- name: l.templateName.trim(),
947
- html: c.html,
948
- css: c.css,
949
- subject: l.templateType.id === "2" ? l?.subject ?? "" : "",
950
- parent_id: h
968
+ templateId: u,
969
+ templateType: K,
970
+ name: a.templateName.trim(),
971
+ html: m.html,
972
+ css: m.css,
973
+ subject: a.templateType.id === "2" ? a?.subject ?? "" : "",
974
+ parent_id: x
951
975
  };
952
- await me(Te) && (t(), E(), M([]), j());
976
+ await ge(Se) && (t(), v(), G([]), V([]), w());
953
977
  }
954
978
  );
955
979
  };
956
- return /* @__PURE__ */ o(X, { className: "border border-0 text-start", children: /* @__PURE__ */ o(X.Body, { className: "pe-0 ps-2", children: /* @__PURE__ */ o("form", { onSubmit: n(be), children: /* @__PURE__ */ o("div", { className: "template-list-container gap-3", children: /* @__PURE__ */ S(_e, { children: [
957
- /* @__PURE__ */ o(O, { children: /* @__PURE__ */ o(
958
- K,
980
+ return /* @__PURE__ */ i(te, { className: "border border-0 text-start", children: /* @__PURE__ */ i(te.Body, { className: "pe-0 ps-2", children: /* @__PURE__ */ i("form", { onSubmit: n(xe), children: /* @__PURE__ */ i("div", { className: "template-list-container gap-3", children: /* @__PURE__ */ I(Ae, { children: [
981
+ /* @__PURE__ */ i(A, { children: /* @__PURE__ */ i(
982
+ M,
983
+ {
984
+ label: "Category",
985
+ control: d,
986
+ error: b,
987
+ options: ye,
988
+ required: !0,
989
+ validation: {
990
+ required: {
991
+ value: !0,
992
+ message: "Select a category"
993
+ }
994
+ },
995
+ ...l("templateType")
996
+ }
997
+ ) }),
998
+ R && R.length > 0 && /* @__PURE__ */ i(A, { children: /* @__PURE__ */ i(
999
+ M,
959
1000
  {
960
1001
  label: "Type",
961
1002
  control: d,
962
- error: y,
963
- options: ue,
1003
+ error: b,
1004
+ options: R,
964
1005
  required: !0,
965
1006
  validation: {
966
1007
  required: {
@@ -968,43 +1009,43 @@ const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__
968
1009
  message: "Select a type"
969
1010
  }
970
1011
  },
971
- ...a("templateType")
1012
+ ...l("subTemplateType")
972
1013
  }
973
1014
  ) }),
974
- _ && _.length > 0 && /* @__PURE__ */ o(O, { children: /* @__PURE__ */ o(
975
- K,
1015
+ q && q.length > 0 && /* @__PURE__ */ i(A, { children: /* @__PURE__ */ i(
1016
+ M,
976
1017
  {
977
1018
  label: "Sub Type",
978
1019
  control: d,
979
- error: y,
980
- options: _,
1020
+ error: b,
1021
+ options: q,
981
1022
  required: !0,
982
1023
  validation: {
983
1024
  required: {
984
1025
  value: !0,
985
- message: "Select a type"
1026
+ message: "Select a subtype"
986
1027
  }
987
1028
  },
988
- ...a("subTemplateType")
1029
+ ...l("subTemplateType2")
989
1030
  }
990
1031
  ) }),
991
- /* @__PURE__ */ o(O, { children: /* @__PURE__ */ o(
992
- K,
1032
+ /* @__PURE__ */ i(A, { children: /* @__PURE__ */ i(
1033
+ M,
993
1034
  {
994
1035
  label: "Template",
995
1036
  control: d,
996
- error: y,
997
- options: he(),
1037
+ error: b,
1038
+ options: Te(),
998
1039
  required: !1,
999
- ...a("template")
1040
+ ...l("template")
1000
1041
  }
1001
1042
  ) }),
1002
- /* @__PURE__ */ o(O, { children: /* @__PURE__ */ o(
1003
- te,
1043
+ /* @__PURE__ */ i(A, { children: /* @__PURE__ */ i(
1044
+ ie,
1004
1045
  {
1005
1046
  label: "Name",
1006
- register: a,
1007
- error: y,
1047
+ register: l,
1048
+ error: b,
1008
1049
  required: !0,
1009
1050
  name: "templateName",
1010
1051
  validation: {
@@ -1015,71 +1056,71 @@ const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__
1015
1056
  }
1016
1057
  }
1017
1058
  ) }),
1018
- p("templateType")?.id === "2" && /* @__PURE__ */ o(O, { children: /* @__PURE__ */ o(
1019
- te,
1059
+ p("templateType")?.id === "2" && /* @__PURE__ */ i(A, { children: /* @__PURE__ */ i(
1060
+ ie,
1020
1061
  {
1021
1062
  label: "Subject",
1022
- register: a,
1023
- error: y,
1063
+ register: l,
1064
+ error: b,
1024
1065
  required: !1,
1025
1066
  name: "subject"
1026
1067
  }
1027
1068
  ) }),
1028
- /* @__PURE__ */ S(O, { className: "d-flex align-items-end justify-content-end gap-2 mb-3", children: [
1029
- /* @__PURE__ */ o(
1030
- Z,
1069
+ /* @__PURE__ */ I(A, { className: "d-flex align-items-end justify-content-end gap-2 mb-3", children: [
1070
+ /* @__PURE__ */ i(
1071
+ ne,
1031
1072
  {
1032
1073
  style: { width: "70px" },
1033
1074
  variant: "primary",
1034
- disabled: I || R || k || Y,
1075
+ disabled: P || L || B || Z,
1035
1076
  onClick: () => {
1036
- g(void 0), E(), M([]), i();
1077
+ y(void 0), v(), G([]), V([]), s();
1037
1078
  },
1038
- children: R || k ? /* @__PURE__ */ o(
1039
- Q,
1079
+ children: L || B ? /* @__PURE__ */ i(
1080
+ J,
1040
1081
  {
1041
1082
  animation: "border",
1042
1083
  style: { width: "11px", height: "11px" },
1043
1084
  size: "sm",
1044
1085
  role: "status",
1045
1086
  className: "me-1",
1046
- children: /* @__PURE__ */ o("span", { className: "visually-hidden", children: "Loading..." })
1087
+ children: /* @__PURE__ */ i("span", { className: "visually-hidden", children: "Loading..." })
1047
1088
  }
1048
1089
  ) : "Clear"
1049
1090
  }
1050
1091
  ),
1051
- (p("templateType")?.id.toString() !== "2" || (p("templateType")?.id.toString() === "2" && (u?.id ?? "")) !== "") && /* @__PURE__ */ o(xe, { children: /* @__PURE__ */ o(
1052
- Z,
1092
+ (p("templateType")?.id.toString() !== "2" || (p("templateType")?.id.toString() === "2" && (f?.id ?? "")) !== "") && /* @__PURE__ */ i(Ee, { children: /* @__PURE__ */ i(
1093
+ ne,
1053
1094
  {
1054
1095
  type: "submit",
1055
1096
  variant: "primary",
1056
1097
  style: { width: "80px" },
1057
- disabled: I || R || k || Y,
1058
- children: R || k ? /* @__PURE__ */ o(
1059
- Q,
1098
+ disabled: P || L || B || Z,
1099
+ children: L || B ? /* @__PURE__ */ i(
1100
+ J,
1060
1101
  {
1061
1102
  animation: "border",
1062
1103
  style: { width: "11px", height: "11px" },
1063
1104
  size: "sm",
1064
1105
  role: "status",
1065
1106
  className: "me-1",
1066
- children: /* @__PURE__ */ o("span", { className: "visually-hidden", children: "Loading..." })
1107
+ children: /* @__PURE__ */ i("span", { className: "visually-hidden", children: "Loading..." })
1067
1108
  }
1068
- ) : u?.readonly ? "Save as" : "Save"
1109
+ ) : f?.readonly ? "Save as" : "Save"
1069
1110
  }
1070
1111
  ) })
1071
1112
  ] })
1072
1113
  ] }) }) }) }) });
1073
- }, tt = ({ config: e }) => {
1074
- const [r, i] = x(), [a, n] = x(!1);
1075
- return /* @__PURE__ */ o(Ae, { configs: e, children: /* @__PURE__ */ o(Oe, { children: /* @__PURE__ */ S("div", { className: "root-widget", children: [
1076
- /* @__PURE__ */ o(
1077
- Ke,
1114
+ }, st = ({ config: e }) => {
1115
+ const [r, s] = S(), [l, n] = S(!1);
1116
+ return /* @__PURE__ */ i(Re, { configs: e, children: /* @__PURE__ */ i(De, { children: /* @__PURE__ */ I("div", { className: "root-widget", children: [
1117
+ /* @__PURE__ */ i(
1118
+ Ye,
1078
1119
  {
1079
1120
  templateLoading: n,
1080
1121
  onSelectItem: (d) => {
1081
- if (i(d), window.StripoEditorApi && window.StripoEditorApi.actionsApi) {
1082
- let p = U;
1122
+ if (s(d), window.StripoEditorApi && window.StripoEditorApi.actionsApi) {
1123
+ let p = F;
1083
1124
  window.StripoEditorApi.actionsApi.updateHtmlAndCss(
1084
1125
  d?.html ?? p,
1085
1126
  d?.css ?? "",
@@ -1088,20 +1129,20 @@ const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__
1088
1129
  }
1089
1130
  },
1090
1131
  onReset: () => {
1091
- n(!1), i(void 0), window.StripoEditorApi && window.StripoEditorApi.actionsApi && window.StripoEditorApi.actionsApi.updateHtmlAndCss(
1092
- U,
1132
+ n(!1), s(void 0), window.StripoEditorApi && window.StripoEditorApi.actionsApi && window.StripoEditorApi.actionsApi.updateHtmlAndCss(
1133
+ F,
1093
1134
  "",
1094
1135
  ""
1095
1136
  );
1096
1137
  }
1097
1138
  }
1098
1139
  ),
1099
- /* @__PURE__ */ o(
1100
- $e,
1140
+ /* @__PURE__ */ i(
1141
+ Me,
1101
1142
  {
1102
1143
  templateHTML: {
1103
1144
  css: r?.css ?? "",
1104
- html: r?.html ?? U
1145
+ html: r?.html ?? F
1105
1146
  },
1106
1147
  loading: !1,
1107
1148
  className: "col-span-5"
@@ -1110,5 +1151,5 @@ const re = /* @__PURE__ */ Ue(He), oe = (e) => e.data.isSeparator ? /* @__PURE__
1110
1151
  ] }) }) });
1111
1152
  };
1112
1153
  export {
1113
- tt as EditorWidget
1154
+ st as EditorWidget
1114
1155
  };