@cling-se/widget 0.17.2 → 0.18.0

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 (232) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
  3. package/dist/AnswerModal-a2cyKFbt.js +3371 -0
  4. package/dist/AttachmentItem-DBUqckCS.js +171 -0
  5. package/dist/BaseUpload-DrWzuvbS.js +6503 -0
  6. package/dist/BlockMedia-DuE_K9hR.js +103 -0
  7. package/dist/CCallout-CM1VsH30.js +104 -0
  8. package/dist/{CCurrencyDropdown-CKRgncWy.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
  9. package/dist/CDropdownItem-DMUAJ90n.js +749 -0
  10. package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
  11. package/dist/{CPhoneFormat-Bd-HZuYo.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
  12. package/dist/CPhoneInput-DuGkDiv-.js +207 -0
  13. package/dist/CPriceInput-B7DYzKcF.js +142 -0
  14. package/dist/CSelect-BZZDr27O.js +98 -0
  15. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
  16. package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
  17. package/dist/ClientModal-CaMSjLkD.js +1188 -0
  18. package/dist/ColorPicker-BISZPQ6j.js +1408 -0
  19. package/dist/CompanyModal-ClTcmU4Y.js +250 -0
  20. package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
  21. package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
  22. package/dist/DocAnswer-Bu09V33D.js +33 -0
  23. package/dist/DocDetails-B6-2LKsO.js +452 -0
  24. package/dist/DocForm-CFN8LWSd.js +6772 -0
  25. package/dist/DocFormSend-D1CUhy4n.js +171 -0
  26. package/dist/DocLinks-CuliFqtN.js +36 -0
  27. package/dist/DocModalBase-BxKsnwN-.js +29 -0
  28. package/dist/DocPrint-B_HJ_RET.js +399 -0
  29. package/dist/DocReceipt-D-A1TaTI.js +341 -0
  30. package/dist/DocSendReminder-BKTJonzh.js +181 -0
  31. package/dist/{DocTextEditor-DFid7uKr.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
  32. package/dist/DocTimeline-CF9S4YDZ.js +537 -0
  33. package/dist/DocumentClient-7mbq2QA4.js +90 -0
  34. package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
  35. package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
  36. package/dist/DocumentVoided-CWr5WMUv.js +33 -0
  37. package/dist/EmbedInput-SevVEpwc.js +156 -0
  38. package/dist/EmbedSettings-YMbUmp1O.js +103 -0
  39. package/dist/ErrorCallout-CQo2iF9c.js +34 -0
  40. package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
  41. package/dist/Flag-BObij6SN.js +41 -0
  42. package/dist/HeaderSettings-C77pR78n.js +720 -0
  43. package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
  44. package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
  45. package/dist/Index-B3y-jq9s.js +1098 -0
  46. package/dist/Index-B41pUREi.js +47 -0
  47. package/dist/Index-BEyeS1OG.js +52 -0
  48. package/dist/Index-BG5j8ZFP.js +93 -0
  49. package/dist/Index-BOT65yQR.js +68 -0
  50. package/dist/Index-BQNl-cXP.js +28 -0
  51. package/dist/Index-BY6xsS7C.js +38 -0
  52. package/dist/Index-Bh0Xv5ry.js +163 -0
  53. package/dist/Index-Bn4FSQcx.js +228 -0
  54. package/dist/Index-BrRIAede.js +87 -0
  55. package/dist/Index-C-6um0kX.js +76 -0
  56. package/dist/{Index-EO0rsTmx.js → Index-C-gHa5xk.js} +319 -214
  57. package/dist/Index-C0wcjKCH.js +629 -0
  58. package/dist/Index-C6BbUFYw.js +160 -0
  59. package/dist/Index-C8xwJ0m1.js +200 -0
  60. package/dist/Index-CKgFEJF4.js +140 -0
  61. package/dist/{Index-CbYLDVU5.js → Index-CQwmu4f1.js} +47 -60
  62. package/dist/Index-CXchTpBa.js +74 -0
  63. package/dist/{Index-BzcZCdHj.js → Index-CYoRt8PA.js} +9 -17
  64. package/dist/Index-CZZNQ4q5.js +39 -0
  65. package/dist/Index-CkaAs5ms.js +136 -0
  66. package/dist/Index-CtpXaBz8.js +363 -0
  67. package/dist/Index-CxDsSGtZ.js +126 -0
  68. package/dist/Index-DFkTBm02.js +102 -0
  69. package/dist/Index-DP3ll8F-.js +70 -0
  70. package/dist/{Index-BdJbs8bM.js → Index-DPDzMKQa.js} +10 -18
  71. package/dist/Index-DvxSig3z.js +25 -0
  72. package/dist/Index-Dzrn3Y6p.js +16 -0
  73. package/dist/{Index-BWnh94_i.js → Index-LQb0omFE.js} +10 -18
  74. package/dist/Index-Mt4mSaNT.js +4 -0
  75. package/dist/Index-_xN_cczo.js +3477 -0
  76. package/dist/Index-gAz45qgR.js +21 -0
  77. package/dist/Index-xXLFalgR.js +49 -0
  78. package/dist/Index-zyZRPz3H.js +28 -0
  79. package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
  80. package/dist/InputToggleRow-CokEYwm2.js +99 -0
  81. package/dist/ManualPopover-Dukly7GP.js +65 -0
  82. package/dist/MediaWrapper-B8msCrQm.js +18 -0
  83. package/dist/{NotBindingText-D8Blua5a.js → NotBindingText-DcQd8Eej.js} +13 -17
  84. package/dist/PackageGroup-clUIUoik.js +1060 -0
  85. package/dist/PdfTerms-DpzMVRfN.js +34 -0
  86. package/dist/PdfViewer-CSf4Rtbj.js +392 -0
  87. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
  88. package/dist/PriceHeader-Dyweu8aH.js +488 -0
  89. package/dist/{SearchApi-Bg9FwkW0.js → SearchApi-Y1fDQn0u.js} +37 -49
  90. package/dist/SendForm-B9l24WwR.js +6689 -0
  91. package/dist/Setup-DyzbPFM4.js +47 -0
  92. package/dist/{SmartList-DofjZjfy.js → SmartList-CWGKoAJh.js} +16 -24
  93. package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
  94. package/dist/{TermsSettings-B4glHd0I.js → TermsSettings-BeQH307A.js} +169 -56
  95. package/dist/ThemeColorRow-DFIsPy55.js +105 -0
  96. package/dist/ToggleBinding-DlH4y1IM.js +44 -0
  97. package/dist/UploadModal-BZ0mPBBB.js +134 -0
  98. package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
  99. package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
  100. package/dist/VideoSelectModal-BhbanMix.js +217 -0
  101. package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
  102. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  103. package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
  104. package/dist/{focusDrawerMixin-DVCJIsb_.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
  105. package/dist/{formDrawerState-BYsq1pB0.js → formDrawerState-CogZ-GVm.js} +2 -2
  106. package/dist/helpers-B4GUxtdD.js +46 -0
  107. package/dist/index-BZDey7B-.js +268 -0
  108. package/dist/index-Bd8_ZHHq.js +188 -0
  109. package/dist/index-BvyoYp1e.js +508 -0
  110. package/dist/index-CJZoubA3.js +3525 -0
  111. package/dist/index-D7yQWP4d.js +125 -0
  112. package/dist/index-D8hGHka6.js +513 -0
  113. package/dist/index-Dxy4tf7x.js +149 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +303 -1486
  116. package/dist/main-Bn5XkQPb.js +57570 -0
  117. package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
  118. package/dist/omit-DrWpFvRJ.js +56 -0
  119. package/dist/{publicSenderState-C4cIGu3m.js → publicSenderState-tdtCFPMx.js} +4 -4
  120. package/dist/splitpanes-BApidgjj.js +342 -0
  121. package/dist/template-CHdf2K2I.js +1572 -0
  122. package/dist/tippy.esm-Co6FYzEM.js +1994 -0
  123. package/dist/useTermsModal-VDnO1Lro.js +87 -0
  124. package/dist/{utils-CMs9ODO8.js → utils-DZkn0Q9c.js} +8 -11
  125. package/dist/validation-CqBkar3f.js +40 -0
  126. package/dist/widget.css +1 -0
  127. package/package.json +20 -25
  128. package/dist/AddClientCallout-TF4dWJwb.js +0 -48
  129. package/dist/AnswerModal-CLHDa2TD.js +0 -3879
  130. package/dist/AttachmentItem-ICP5nbhT.js +0 -85
  131. package/dist/BaseDatePicker-wwmiz_b5.js +0 -3187
  132. package/dist/BaseUpload-CDZOjohX.js +0 -1977
  133. package/dist/BlockMedia-D1JAYF9F.js +0 -76
  134. package/dist/CCallout-dAjcZXrm.js +0 -58
  135. package/dist/CDropdownItem-CkSNbSdj.js +0 -640
  136. package/dist/CFormField-Dw6UM1u6.js +0 -240
  137. package/dist/CPhoneInput-Dd6cJ4jg.js +0 -138
  138. package/dist/CPriceInput-CjV95s8E.js +0 -116
  139. package/dist/CSelect-izVnsQME.js +0 -91
  140. package/dist/CSkeleton-C0TjtLtY.js +0 -55
  141. package/dist/ClientAutocomplete-Cfu3abEx.js +0 -438
  142. package/dist/ClientModal-DjSoPQ9x.js +0 -666
  143. package/dist/ColorPicker-DZP6FIdn.js +0 -2879
  144. package/dist/CompanyModal-BYQWdbhG.js +0 -147
  145. package/dist/ContentWrapper-Bci9pSEp.js +0 -190
  146. package/dist/CoverBlockSettings-wD55bj3k.js +0 -659
  147. package/dist/DocAnswer-B5q-ntKP.js +0 -36
  148. package/dist/DocDetails-BQuaNZ4b.js +0 -263
  149. package/dist/DocForm-QzZ5wqsS.js +0 -5017
  150. package/dist/DocFormSend-CORtQPhb.js +0 -146
  151. package/dist/DocLinks-DZPzODUe.js +0 -38
  152. package/dist/DocModalBase-TTALjv6K.js +0 -28
  153. package/dist/DocPrint-BB-KT9ut.js +0 -240
  154. package/dist/DocReceipt-CGks1GLS.js +0 -217
  155. package/dist/DocSendReminder-BBQXJbsV.js +0 -140
  156. package/dist/DocTimeline-4jnYDmBI.js +0 -485
  157. package/dist/DocumentClient-BAAX7Dxk.js +0 -136
  158. package/dist/DocumentLayout-C4edCFmr.js +0 -4880
  159. package/dist/DocumentLogotype-i7YSQKcH.js +0 -92
  160. package/dist/DocumentVoided-BvZoMFB_.js +0 -25
  161. package/dist/EmbedInput-Bij7ER30.js +0 -117
  162. package/dist/EmbedSettings-D0oyq4-9.js +0 -74
  163. package/dist/ErrorCallout-CsW3WTZp.js +0 -27
  164. package/dist/FilePreviewModal-Doaawg0l.js +0 -81
  165. package/dist/Flag-C4Mf2xUU.js +0 -46
  166. package/dist/HeaderSettings-DwZ54IsK.js +0 -440
  167. package/dist/ImageSelectModal-ClFJ5uXM.js +0 -86
  168. package/dist/ImageUploadWrapper-DtEp_Pg3.js +0 -1604
  169. package/dist/Index-2MwnGZ_4.js +0 -25
  170. package/dist/Index-3CwdeytO.js +0 -107
  171. package/dist/Index-B-bSVOoh.js +0 -73
  172. package/dist/Index-BDyMp1ib.js +0 -643
  173. package/dist/Index-BMgtwHVA.js +0 -24
  174. package/dist/Index-BTD3hWbY.js +0 -54
  175. package/dist/Index-BUbd06rz.js +0 -144
  176. package/dist/Index-Bv2XrpgK.js +0 -25
  177. package/dist/Index-C00Ay-7P.js +0 -62
  178. package/dist/Index-CHL_6WQH.js +0 -66
  179. package/dist/Index-CLyNrkJA.js +0 -28
  180. package/dist/Index-CV57PvUE.js +0 -26
  181. package/dist/Index-Crj4apcP.js +0 -146
  182. package/dist/Index-CryBgLTa.js +0 -294
  183. package/dist/Index-Cv33nreP.js +0 -33
  184. package/dist/Index-D0ErQJ2M.js +0 -2445
  185. package/dist/Index-D8ZnVbsP.js +0 -32
  186. package/dist/Index-DPNIJewY.js +0 -56
  187. package/dist/Index-DVXhB0Ja.js +0 -58
  188. package/dist/Index-DWhQwxeB.js +0 -94
  189. package/dist/Index-DX7tomhl.js +0 -230
  190. package/dist/Index-D_AdmLWe.js +0 -41
  191. package/dist/Index-DgTQzlfK.js +0 -754
  192. package/dist/Index-DhapmO-4.js +0 -55
  193. package/dist/Index-DjC8joRt.js +0 -150
  194. package/dist/Index-Dv4l4LKF.js +0 -154
  195. package/dist/Index-TTFKPIIC.js +0 -84
  196. package/dist/Index-cT8oYfLR.js +0 -41
  197. package/dist/Index-igPwrQMu.js +0 -77
  198. package/dist/InputToggleRow-BgOubdXs.js +0 -57
  199. package/dist/ManualPopover-8suun-i9.js +0 -60
  200. package/dist/MediaWrapper-BadblLbS.js +0 -23
  201. package/dist/PackageGroup-BxmqH6qI.js +0 -704
  202. package/dist/PdfTerms-C6MRk0Ix.js +0 -31
  203. package/dist/PdfViewer-DUoiQx_1.js +0 -383
  204. package/dist/PlainHtml-DZ9V0Yuf.js +0 -27
  205. package/dist/PriceHeader-C3_CoKrL.js +0 -338
  206. package/dist/SendForm-D-OvqCee.js +0 -1023
  207. package/dist/Setup-CwK4er2y.js +0 -50
  208. package/dist/ThemeColorRow-BplIaxA2.js +0 -69
  209. package/dist/ToggleBinding-6ntt38Ye.js +0 -42
  210. package/dist/UploadModal-B6jQzsYA.js +0 -95
  211. package/dist/VideoPlayerInput-ryP77WC0.js +0 -97
  212. package/dist/VideoPlayerSettings-DJh0JNRI.js +0 -61
  213. package/dist/VideoSelectModal-8udQ394X.js +0 -104
  214. package/dist/answerDocumentMixin-CF4J_vsp.js +0 -51
  215. package/dist/debounce-CgyZi04Q.js +0 -84
  216. package/dist/formValidationMixin-Dq7aZhBk.js +0 -49
  217. package/dist/index-2Q8Ejpof.js +0 -167
  218. package/dist/index-B5-izJkt.js +0 -102
  219. package/dist/index-BQb6k0M8.js +0 -351
  220. package/dist/index-CR-KQfRE.js +0 -81
  221. package/dist/index-CogHiXWx.js +0 -2700
  222. package/dist/index-lZ1sSNWc.js +0 -492
  223. package/dist/main-BpqUyMpC.js +0 -57349
  224. package/dist/mapFormMixin-rxtAFyFK.js +0 -3028
  225. package/dist/omit-C7FeydiO.js +0 -31
  226. package/dist/simplebar.min-Dm388s-3.js +0 -71
  227. package/dist/splitpanes-BHUVsCZF.js +0 -382
  228. package/dist/style.css +0 -4
  229. package/dist/throttle-CfcsX8nA.js +0 -18
  230. package/dist/tippy.esm-C9mV-Rzr.js +0 -1805
  231. package/dist/vuedraggable.umd-CChGnToh.js +0 -3161
  232. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -0,0 +1,1434 @@
1
+ import { h as Ee, I as re, o as j, b as ie, s as qe, l as we, _ as ke, x as gt, P as yt, cb as zt, z as et, cc as tt, c as Z, w as $, k as Ve, F as $e, f as Fe, $ as Ue, ap as Ge, e as ne, p as At, a1 as bt, K as Qe, B as De, v as F, j as be, H as jt, r as Ht, a3 as Bt, u as Rt, i as se, cd as Wt, bv as Mt, bw as Nt, c8 as qt, S as Ce, Y as Ft, X as Vt, d as xe, ce as $t, cf as Ut, a0 as Gt, n as Qt, aI as Kt, cg as Yt, ch as Jt } from "./main-Bn5XkQPb.js";
2
+ import "./template-CHdf2K2I.js";
3
+ import { a as Xt, C as Zt } from "./CDropdownItem-DMUAJ90n.js";
4
+ import "./helpers-B4GUxtdD.js";
5
+ const en = (e, t, r) => {
6
+ const o = e[t];
7
+ return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((n, s) => {
8
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
9
+ s.bind(
10
+ null,
11
+ new Error(
12
+ "Unknown variable dynamic import: " + t + (t.split("/").length !== r ? ". Note that variables only represent file names one level deep." : "")
13
+ )
14
+ )
15
+ );
16
+ });
17
+ }, tn = { class: "c-loading" }, nn = /* @__PURE__ */ Ee({
18
+ __name: "LoadingBlock",
19
+ setup(e) {
20
+ const t = re(`${Math.floor(Math.random() * 56 + 25)}%`);
21
+ return (r, o) => (j(), ie("div", tn, [
22
+ qe("div", {
23
+ style: we({ width: t.value }),
24
+ class: "c-loading-title"
25
+ }, null, 4),
26
+ o[0] || (o[0] = qe("div", { class: "c-loading-body" }, null, -1))
27
+ ]));
28
+ }
29
+ }), nt = /* @__PURE__ */ ke(nn, [["__scopeId", "data-v-70f204ee"]]), wt = (e) => {
30
+ const t = Symbol(e);
31
+ return [(n) => gt(t, n), (n) => yt(t, n), t];
32
+ }, [rn, on] = wt("DocumentWidth"), [an, Zn] = wt("DocumentHeight");
33
+ function sn(e) {
34
+ const { width: t, height: r } = zt(e);
35
+ return rn(t), an(r), { width: t, height: r };
36
+ }
37
+ function ln() {
38
+ return on(re(window.innerWidth));
39
+ }
40
+ const cn = {
41
+ name: "DynamicChapter",
42
+ components: {
43
+ DynamicChapter: et(() => Promise.resolve().then(() => dn)),
44
+ LoadingBlock: nt
45
+ },
46
+ provide() {
47
+ return this.level !== 0 ? {} : {
48
+ _firstBlock: this._firstBlock,
49
+ _lastBlock: this._lastBlock
50
+ };
51
+ },
52
+ inject: {
53
+ isPdf: {
54
+ default: !1
55
+ }
56
+ },
57
+ props: {
58
+ componentProps: {
59
+ type: Object,
60
+ default: () => ({})
61
+ },
62
+ componentName: {
63
+ type: String,
64
+ required: !0
65
+ },
66
+ level: {
67
+ type: Number,
68
+ default: 0
69
+ },
70
+ isVisible: {
71
+ type: [Boolean, Object],
72
+ default: !0
73
+ },
74
+ _firstBlock: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ _lastBlock: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ children: {
83
+ type: Array,
84
+ default: () => []
85
+ },
86
+ onInput: {
87
+ type: Function,
88
+ default: () => {
89
+ }
90
+ },
91
+ onRemove: {
92
+ type: Function,
93
+ default: () => {
94
+ }
95
+ },
96
+ onMount: {
97
+ type: Function,
98
+ default: () => {
99
+ }
100
+ }
101
+ },
102
+ setup() {
103
+ return { docWidth: ln() };
104
+ },
105
+ data() {
106
+ return {
107
+ component: tt(nt)
108
+ };
109
+ },
110
+ computed: {
111
+ loader() {
112
+ return () => en(/* @__PURE__ */ Object.assign({ "../blocks/answer/Index.vue": () => import("./Index-C0wcjKCH.js"), "../blocks/attachments/Index.vue": () => import("./Index-Bh0Xv5ry.js"), "../blocks/coverBlock/Index.vue": () => import("./Index-CxDsSGtZ.js"), "../blocks/custom/Index.vue": () => import("./Index-C-gHa5xk.js"), "../blocks/docChapter/Index.vue": () => import("./Index-BOT65yQR.js"), "../blocks/docChapterSub/Index.vue": () => import("./Index-xXLFalgR.js"), "../blocks/docParties/Index.vue": () => import("./Index-CtpXaBz8.js"), "../blocks/embed/Index.vue": () => import("./Index-DFkTBm02.js"), "../blocks/estimatedTimeToCompleteText/Index.vue": () => import("./Index-zyZRPz3H.js"), "../blocks/estimatedWorkStartAndEndAtText/Index.vue": () => import("./Index-BQNl-cXP.js"), "../blocks/extraWorkConstructionPricingList/Index.vue": () => import("./Index-BY6xsS7C.js"), "../blocks/extraWorkTimeImpactText/Index.vue": () => import("./Index-CZZNQ4q5.js"), "../blocks/header/Index.vue": () => import("./Index-C8xwJ0m1.js"), "../blocks/multiGroupPricing/Index.vue": () => import("./Index-BG5j8ZFP.js"), "../blocks/notBinding/Index.vue": () => import("./Index-DvxSig3z.js"), "../blocks/packageGroup/Index.vue": () => import("./Index-CXchTpBa.js"), "../blocks/pdf/Index.vue": () => import("./Index-C6BbUFYw.js"), "../blocks/presentation/Index.vue": () => import("./Index-B3y-jq9s.js"), "../blocks/terms/Index.vue": () => import("./Index-BrRIAede.js"), "../blocks/textContent/Index.vue": () => import("./Index-B41pUREi.js"), "../blocks/videoPlayer/Index.vue": () => import("./Index-CkaAs5ms.js"), "../blocks/workAddressText/Index.vue": () => import("./Index-gAz45qgR.js") }), `../blocks/${this.componentName}/Index.vue`, 4);
113
+ },
114
+ isPdfPrintAndPdfBlock() {
115
+ var e, t;
116
+ return !!(this.isPdf && ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf");
117
+ },
118
+ isPdfBlock() {
119
+ var e, t;
120
+ return ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf";
121
+ }
122
+ },
123
+ mounted() {
124
+ this.loader().then(() => {
125
+ this.component = tt(et(() => this.loader()));
126
+ }).catch((e) => {
127
+ console.log(e);
128
+ });
129
+ }
130
+ };
131
+ function un(e, t, r, o, n, s) {
132
+ const a = ne("DynamicChapter", !0);
133
+ return n.component ? (j(), Z(Ge(n.component), Ue({ key: 0 }, r.componentProps, {
134
+ class: r.level === 0 && [
135
+ {
136
+ "is-mobile": o.docWidth <= 640,
137
+ "is-tablet": o.docWidth > 640 && o.docWidth <= 1024,
138
+ "is-desktop": o.docWidth > 1024
139
+ },
140
+ r.componentProps && r.componentProps.classList ? r.componentProps.classList : ""
141
+ ],
142
+ "enable-spacing-x": !s.isPdfPrintAndPdfBlock,
143
+ "pdf-spacing-x": s.isPdfBlock,
144
+ "enable-spacing-y": !!(!s.isPdfPrintAndPdfBlock && r.isVisible),
145
+ onInput: r.onInput,
146
+ onRemove: r.onRemove,
147
+ onVnodeMounted: t[0] || (t[0] = (u) => r.onMount(e.$el))
148
+ }), {
149
+ default: $(() => [
150
+ r.children.length ? (j(!0), ie($e, { key: 0 }, Ve(r.children, (u, d) => (j(), Z(a, {
151
+ key: u.itemId + `${d}`,
152
+ "component-name": u.componentName,
153
+ "component-props": {
154
+ ...u.props,
155
+ _document: r.componentProps._document,
156
+ _value: u._value,
157
+ _nodeId: u.nodeId
158
+ },
159
+ children: u.children,
160
+ level: r.level + 1,
161
+ "on-input": r.onInput,
162
+ "on-remove": r.onRemove,
163
+ "on-mount": r.onMount
164
+ }, null, 8, ["component-name", "component-props", "children", "level", "on-input", "on-remove", "on-mount"]))), 128)) : Fe("", !0)
165
+ ]),
166
+ _: 1
167
+ }, 16, ["class", "enable-spacing-x", "pdf-spacing-x", "enable-spacing-y", "onInput", "onRemove"])) : Fe("", !0);
168
+ }
169
+ const xt = /* @__PURE__ */ ke(cn, [["render", un]]), dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
170
+ __proto__: null,
171
+ default: xt
172
+ }, Symbol.toStringTag, { value: "Module" })), kt = "data-is-preview", fn = At.google.fontsKey, hn = "https://www.googleapis.com/webfonts/v1/webfonts", pn = "https://fonts.googleapis.com/css", rt = {
173
+ 100: { label: "Thin", value: "100" },
174
+ 200: { label: "Extra Light", value: "200" },
175
+ 300: { label: "Light", value: "300" },
176
+ regular: { label: "Normal", value: "400" },
177
+ 500: { label: "Medium", value: "500" },
178
+ 600: { label: "Semi Bold", value: "600" },
179
+ 700: { label: "Bold", value: "700" },
180
+ 800: { label: "Extra Bold", value: "800" },
181
+ 900: { label: "Black", value: "900" }
182
+ }, St = (e) => `font-${e.replace(/\s+/g, "-").toLowerCase()}`, vn = (e, t = !1) => {
183
+ const r = document.getElementById(St(e));
184
+ return r !== null && r.getAttribute(kt) === t.toString();
185
+ }, mn = (e, t = !1) => {
186
+ const r = document.head || document.getElementsByTagName("head")[0], o = document.createElement("link");
187
+ o.id = St(e), o.setAttribute("rel", "stylesheet"), o.setAttribute(kt, t.toString());
188
+ let n = `${pn}?family=${e.replace(/\s/gi, "+")}`;
189
+ return t ? n += `&text=${e}` : n += ":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic", n += "&display=swap", o.setAttribute("href", n), r.appendChild(o), o;
190
+ }, _t = (e, t = !1) => {
191
+ e && !vn(e, t) && mn(e, t);
192
+ }, Et = (e = {}) => {
193
+ if (!(typeof e != "object" || !e))
194
+ for (const t in e)
195
+ t === "fontFamily" ? _t(e[t]) : typeof e[t] == "object" && Et(e[t]);
196
+ }, Dt = /* @__PURE__ */ Ee({
197
+ __name: "FontDropdownItem",
198
+ props: {
199
+ source: {}
200
+ },
201
+ setup(e) {
202
+ const t = e, r = re(null), o = (a, u) => {
203
+ let d = a, l = d.$options.name;
204
+ for (; d && (!l || l !== u); )
205
+ d = d.$parent, d && ({ name: l } = d.$options);
206
+ return d || null;
207
+ }, n = re({
208
+ paddingRight: "calc(0.5 * var(--rem))",
209
+ fontFamily: `'${t.source.family}'`
210
+ }), s = jt();
211
+ return s && (r.value = o(s.proxy, "CDropdown")), bt(() => {
212
+ _t(t.source.family, !0);
213
+ }), Qe(
214
+ () => t.source,
215
+ (a) => {
216
+ n.value.fontFamily = `'${a.family}'`;
217
+ }
218
+ ), (a, u) => (j(), Z(be(Xt), {
219
+ value: a.source,
220
+ "custom-parent": r.value,
221
+ class: "!truncate",
222
+ style: we(n.value)
223
+ }, {
224
+ default: $(() => [
225
+ De(F(a.source.family), 1)
226
+ ]),
227
+ _: 1
228
+ }, 8, ["value", "custom-parent", "style"]));
229
+ }
230
+ }), gn = 1e3 * 60 * 60 * 24 * 14, R = Ht({
231
+ list: [],
232
+ fetchedAt: null,
233
+ error: "",
234
+ loading: !1
235
+ }), yn = async (e = "popularity") => {
236
+ let t = [];
237
+ try {
238
+ const { data: r } = await Bt.get(hn, {
239
+ params: {
240
+ sort: e,
241
+ key: fn
242
+ }
243
+ });
244
+ t = r.items || [];
245
+ } catch (r) {
246
+ R.error = r;
247
+ }
248
+ return t;
249
+ };
250
+ R.load = async () => {
251
+ if (R.loading) {
252
+ await R.loading;
253
+ return;
254
+ }
255
+ (!R.fetchedAt || R.fetchedAt < Date.now() - gn) && (R.loading = new Promise(async (e) => {
256
+ R.list = await yn(), R.fetchedAt = Date.now(), e(!1);
257
+ }), await R.loading);
258
+ };
259
+ const Ct = (e = []) => (e || []).filter((t) => !!rt[t]).map((t) => rt[t]), er = async (e) => {
260
+ if (!e || typeof e != "string") return {};
261
+ !R.list.length && !R.error && await R.load();
262
+ const { variants: t } = R.list.find((r) => r.family === e) || {};
263
+ return Ct(t || []);
264
+ }, bn = /* @__PURE__ */ Ee({
265
+ __name: "VirtualFontsList",
266
+ props: {
267
+ items: {}
268
+ },
269
+ setup(e) {
270
+ const t = e, r = re([...t.items]);
271
+ Qe(
272
+ () => t.items,
273
+ (l) => {
274
+ r.value = [...l];
275
+ }
276
+ );
277
+ const o = Rt(), n = se(() => o.style), s = se(() => ({
278
+ "overflow-y": "auto",
279
+ height: "250px",
280
+ width: "240px",
281
+ ...n
282
+ })), { list: a, containerProps: u, wrapperProps: d } = Wt(r, {
283
+ itemHeight: 35
284
+ });
285
+ return (l, f) => (j(), ie("div", Ue(be(u), { style: s.value }), [
286
+ qe("div", Mt(Nt(be(d))), [
287
+ (j(!0), ie($e, null, Ve(be(a), (v) => (j(), Z(Dt, {
288
+ key: v.index,
289
+ source: v.data
290
+ }, qt({ _: 2 }, [
291
+ l.$slots.footer ? {
292
+ name: "footer",
293
+ fn: $(() => [
294
+ Ce(l.$slots, "footer")
295
+ ]),
296
+ key: "0"
297
+ } : void 0
298
+ ]), 1032, ["source"]))), 128))
299
+ ], 16)
300
+ ], 16));
301
+ }
302
+ }), wn = {
303
+ name: "FontPickerDropdown",
304
+ components: {
305
+ CInput: Ft,
306
+ CDropdown: Zt,
307
+ VirtualFontsList: bn
308
+ },
309
+ props: {
310
+ modelValue: {
311
+ type: Object,
312
+ default: null
313
+ },
314
+ height: {
315
+ type: String,
316
+ default: "250px"
317
+ }
318
+ },
319
+ emits: ["update:modelValue"],
320
+ data() {
321
+ return {
322
+ FontDropdownItem: Dt,
323
+ visualQuery: "",
324
+ // string visual to user
325
+ activeQuery: ""
326
+ // query used for filtering results, hidden behind debounce
327
+ };
328
+ },
329
+ computed: {
330
+ selectedValue: {
331
+ get() {
332
+ return {
333
+ family: "Inter",
334
+ weight: "400",
335
+ ...this.modelValue
336
+ };
337
+ },
338
+ set(e) {
339
+ const { family: t, variants: r = [] } = e || {};
340
+ let { weight: o = "400" } = this.modelValue || {};
341
+ const n = Ct(r), s = n.map((a) => a.value);
342
+ s.length && !s.includes(`${o}`) && (o = s.reduce(
343
+ (a, u) => Math.abs(u - o) < Math.abs(a - o) ? u : a
344
+ )), this.$emit("update:modelValue", {
345
+ family: t,
346
+ weight: o,
347
+ options: n
348
+ });
349
+ }
350
+ },
351
+ fontsList() {
352
+ const e = R.list || [];
353
+ if (this.activeQuery) {
354
+ const t = new RegExp(this.activeQuery, "i");
355
+ return e.filter((r) => t.test(r.family));
356
+ }
357
+ return e;
358
+ }
359
+ },
360
+ watch: {
361
+ visualQuery: Vt(function(t) {
362
+ this.activeQuery = t;
363
+ }, 300)
364
+ },
365
+ created() {
366
+ R.load();
367
+ }
368
+ };
369
+ function xn(e, t, r, o, n, s) {
370
+ const a = ne("CButton"), u = ne("CInput"), d = ne("VirtualFontsList"), l = ne("CDropdown");
371
+ return j(), Z(l, Ue({
372
+ position: "is-bottom-left",
373
+ ...e.$attrs,
374
+ ...e.$props
375
+ }, {
376
+ ref: "dropdown",
377
+ modelValue: s.selectedValue,
378
+ "onUpdate:modelValue": t[1] || (t[1] = (f) => s.selectedValue = f),
379
+ size: e.$attrs.size,
380
+ disabled: e.$attrs.disabled,
381
+ "menu-styling": {
382
+ minWidth: "250px",
383
+ maxWidth: "300px"
384
+ },
385
+ "max-height": r.height,
386
+ scrollable: !0,
387
+ class: "control"
388
+ }), {
389
+ trigger: $(() => [
390
+ Ce(e.$slots, "default", {
391
+ selectedFamily: s.selectedValue.family
392
+ }, () => [
393
+ xe(a, {
394
+ style: we([{ fontFamily: s.selectedValue.family }, { width: "100%", "text-align": "left", "min-width": "7em" }]),
395
+ class: "is-left"
396
+ }, {
397
+ default: $(() => [
398
+ De(F(s.selectedValue.family), 1)
399
+ ]),
400
+ _: 1
401
+ }, 8, ["style"])
402
+ ])
403
+ ]),
404
+ header: $(() => [
405
+ xe(u, {
406
+ modelValue: n.visualQuery,
407
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => n.visualQuery = f),
408
+ placeholder: e.$t("_common:search"),
409
+ filled: "",
410
+ style: { "margin-bottom": "0.25em" }
411
+ }, null, 8, ["modelValue", "placeholder"])
412
+ ]),
413
+ default: $(() => [
414
+ s.fontsList.length ? (j(), Z(d, {
415
+ key: 0,
416
+ items: s.fontsList
417
+ }, null, 8, ["items"])) : (j(), ie("div", {
418
+ key: 1,
419
+ style: we([{ height: "250px", width: "240px", display: "flex", "justify-content": "center", "align-items": "center" }, { height: r.height }])
420
+ }, F(e.$t("_common:noResults")), 5))
421
+ ]),
422
+ _: 3
423
+ }, 16, ["modelValue", "size", "disabled", "max-height"]);
424
+ }
425
+ const tr = /* @__PURE__ */ ke(wn, [["render", xn]]), Ke = $t(Ut), nr = Ke.smallerOrEqual("sm"), kn = Ke.between("md", "lg"), Sn = Ke.greaterOrEqual("lg");
426
+ se(
427
+ () => kn.value || Sn.value
428
+ );
429
+ function _n({
430
+ minWidthPx: e,
431
+ maxWidthPx: t,
432
+ minFontSize: r,
433
+ maxFontSize: o
434
+ }) {
435
+ const n = e, s = t, a = (o - r) / (s - n), u = -n * a + r, d = (l) => Math.round(l * 1e3) / 1e3;
436
+ return `clamp(${d(r)}px, ${d(
437
+ u
438
+ )}px + calc(${d(a) * 100} * var(--vw, 1vw)), ${d(
439
+ o
440
+ )}px)`;
441
+ }
442
+ function En({ size: e }) {
443
+ let t = e * 0.9;
444
+ return e > 30 && (t = e * 0.8), e > 40 && (t = e * 0.725), e > 50 && (t = e * 0.675), _n({
445
+ minWidthPx: 375,
446
+ maxWidthPx: 1200,
447
+ minFontSize: t,
448
+ maxFontSize: e
449
+ });
450
+ }
451
+ const Dn = ({ json: e, prefix: t = "" } = {}) => Object.keys(e || {}).map((r) => {
452
+ const o = e[r], s = Object.keys(o).map((a) => {
453
+ const u = a.startsWith("--") ? a : a.split(/(?=[A-Z])/).join("-").toLowerCase(), d = o[a];
454
+ let l = `${u}:${d}`;
455
+ return u === "font-size" && (l += `; font-size: ${En({
456
+ size: parseInt(d, 10)
457
+ })}`), l;
458
+ }).join(";");
459
+ return `${t}${r}{${s}}`;
460
+ }).join(`
461
+ `), Cn = {
462
+ name: "DynamicStyle",
463
+ props: {
464
+ json: {
465
+ type: Object,
466
+ default: null
467
+ },
468
+ prefix: {
469
+ type: String,
470
+ default: ""
471
+ }
472
+ },
473
+ created() {
474
+ Et(this.json);
475
+ },
476
+ methods: {
477
+ jsonToCss: Dn
478
+ }
479
+ };
480
+ function In(e, t, r, o, n, s) {
481
+ return r.json ? (j(), Z(Ge("style"), { key: 0 }, {
482
+ default: $(() => [
483
+ De(F(s.jsonToCss({ json: r.json, prefix: r.prefix })), 1)
484
+ ]),
485
+ _: 1
486
+ })) : Fe("", !0);
487
+ }
488
+ const Ln = /* @__PURE__ */ ke(Cn, [["render", In]]), Pn = /* @__PURE__ */ Ee({
489
+ __name: "DocumentStyleContainer",
490
+ props: {
491
+ inputStyle: {}
492
+ },
493
+ setup(e) {
494
+ const t = e, { canEdit: r, isForm: o } = yt("viewSettings", {
495
+ canEdit: !1,
496
+ isForm: !1
497
+ }), n = Gt("container"), { width: s, height: a } = sn(n), u = se(() => ({
498
+ "--vw": `${s.value / 100}px`,
499
+ "--vh": `clamp(7.5px, ${a.value / 100}px, ${r ? 7.5 : 9}px)`
500
+ })), d = se(
501
+ () => `document-base-style-${Math.random().toString(36).substr(2, 9)}`
502
+ ), l = {
503
+ '[data-typography="title"]': "title",
504
+ h1: "h1",
505
+ h2: "h2",
506
+ h3: "h3",
507
+ p: "p",
508
+ blockquote: "blockquote",
509
+ ".chapter": "section"
510
+ }, f = se(() => Object.keys(l).filter((g) => !(t.inputStyle || {})[g]).map((g) => `document-legacy-style-${l[g]}`)), v = se(
511
+ () => {
512
+ var g, H;
513
+ return (H = (g = t.inputStyle) == null ? void 0 : g[".chapter"]) == null ? void 0 : H["--accentColor"];
514
+ }
515
+ );
516
+ return (g, H) => (j(), ie("div", {
517
+ ref_key: "container",
518
+ ref: n,
519
+ class: Qt([...f.value, d.value]),
520
+ style: we(be(o) && u.value)
521
+ }, [
522
+ (j(), Z(Ge("style"), null, {
523
+ default: $(() => [
524
+ De(" .primary-text-color { color: " + F(v.value) + " !important } .primary-background-color, quill-format ul li::before { background-color: " + F(v.value) + " !important } .primary-box-shadow-left-color { box-shadow: inset 4px 0 " + F(v.value) + " !important } .primary-border-left-color { border-left-color: " + F(v.value) + " !important } .primary-pseudo-background::after { background-color: " + F(v.value) + " !important } .primary-svg-fill { fill: " + F(v.value) + " !important } .primary-light-background { background-color: hsla(0, 0%, 0%, 0.05) !important} .primary-light-box-shadow-left-color { box-shadow: inset 4px 0 " + F(v.value ? v.value.replace(/[^,]+(?=\))/, "0.08") : "") + " !important} .quill-format ul li::before { background-color: " + F(v.value) + " !important } ", 1)
525
+ ]),
526
+ _: 1
527
+ })),
528
+ xe(Ln, {
529
+ json: g.inputStyle,
530
+ prefix: `.${d.value}.${d.value}.${d.value} `
531
+ }, null, 8, ["json", "prefix"]),
532
+ Ce(g.$slots, "default")
533
+ ], 6));
534
+ }
535
+ });
536
+ var Le = { exports: {} }, it;
537
+ function It() {
538
+ if (it) return Le.exports;
539
+ it = 1;
540
+ var e = Le.exports = {};
541
+ return e.forEach = function(t, r) {
542
+ for (var o = 0; o < t.length; o++) {
543
+ var n = r(t[o]);
544
+ if (n)
545
+ return n;
546
+ }
547
+ }, Le.exports;
548
+ }
549
+ var Pe, ot;
550
+ function Tn() {
551
+ return ot || (ot = 1, Pe = function(e) {
552
+ var t = e.stateHandler.getState;
553
+ function r(a) {
554
+ var u = t(a);
555
+ return u && !!u.isDetectable;
556
+ }
557
+ function o(a) {
558
+ t(a).isDetectable = !0;
559
+ }
560
+ function n(a) {
561
+ return !!t(a).busy;
562
+ }
563
+ function s(a, u) {
564
+ t(a).busy = !!u;
565
+ }
566
+ return {
567
+ isDetectable: r,
568
+ markAsDetectable: o,
569
+ isBusy: n,
570
+ markBusy: s
571
+ };
572
+ }), Pe;
573
+ }
574
+ var Te, at;
575
+ function On() {
576
+ return at || (at = 1, Te = function(e) {
577
+ var t = {};
578
+ function r(a) {
579
+ var u = e.get(a);
580
+ return u === void 0 ? [] : t[u] || [];
581
+ }
582
+ function o(a, u) {
583
+ var d = e.get(a);
584
+ t[d] || (t[d] = []), t[d].push(u);
585
+ }
586
+ function n(a, u) {
587
+ for (var d = r(a), l = 0, f = d.length; l < f; ++l)
588
+ if (d[l] === u) {
589
+ d.splice(l, 1);
590
+ break;
591
+ }
592
+ }
593
+ function s(a) {
594
+ var u = r(a);
595
+ u && (u.length = 0);
596
+ }
597
+ return {
598
+ get: r,
599
+ add: o,
600
+ removeListener: n,
601
+ removeAllListeners: s
602
+ };
603
+ }), Te;
604
+ }
605
+ var Oe, st;
606
+ function zn() {
607
+ return st || (st = 1, Oe = function() {
608
+ var e = 1;
609
+ function t() {
610
+ return e++;
611
+ }
612
+ return {
613
+ generate: t
614
+ };
615
+ }), Oe;
616
+ }
617
+ var ze, lt;
618
+ function An() {
619
+ return lt || (lt = 1, ze = function(e) {
620
+ var t = e.idGenerator, r = e.stateHandler.getState;
621
+ function o(s) {
622
+ var a = r(s);
623
+ return a && a.id !== void 0 ? a.id : null;
624
+ }
625
+ function n(s) {
626
+ var a = r(s);
627
+ if (!a)
628
+ throw new Error("setId required the element to have a resize detection state.");
629
+ var u = t.generate();
630
+ return a.id = u, u;
631
+ }
632
+ return {
633
+ get: o,
634
+ set: n
635
+ };
636
+ }), ze;
637
+ }
638
+ var Ae, ct;
639
+ function jn() {
640
+ return ct || (ct = 1, Ae = function(e) {
641
+ function t() {
642
+ }
643
+ var r = {
644
+ log: t,
645
+ warn: t,
646
+ error: t
647
+ };
648
+ if (!e && window.console) {
649
+ var o = function(n, s) {
650
+ n[s] = function() {
651
+ var u = console[s];
652
+ if (u.apply)
653
+ u.apply(console, arguments);
654
+ else
655
+ for (var d = 0; d < arguments.length; d++)
656
+ u(arguments[d]);
657
+ };
658
+ };
659
+ o(r, "log"), o(r, "warn"), o(r, "error");
660
+ }
661
+ return r;
662
+ }), Ae;
663
+ }
664
+ var je = { exports: {} }, ut;
665
+ function Lt() {
666
+ if (ut) return je.exports;
667
+ ut = 1;
668
+ var e = je.exports = {};
669
+ return e.isIE = function(t) {
670
+ function r() {
671
+ var n = navigator.userAgent.toLowerCase();
672
+ return n.indexOf("msie") !== -1 || n.indexOf("trident") !== -1 || n.indexOf(" edge/") !== -1;
673
+ }
674
+ if (!r())
675
+ return !1;
676
+ if (!t)
677
+ return !0;
678
+ var o = function() {
679
+ var n, s = 3, a = document.createElement("div"), u = a.getElementsByTagName("i");
680
+ do
681
+ a.innerHTML = "<!--[if gt IE " + ++s + "]><i></i><![endif]-->";
682
+ while (u[0]);
683
+ return s > 4 ? s : n;
684
+ }();
685
+ return t === o;
686
+ }, e.isLegacyOpera = function() {
687
+ return !!window.opera;
688
+ }, je.exports;
689
+ }
690
+ var He = { exports: {} }, dt;
691
+ function Hn() {
692
+ if (dt) return He.exports;
693
+ dt = 1;
694
+ var e = He.exports = {};
695
+ e.getOption = t;
696
+ function t(r, o, n) {
697
+ var s = r[o];
698
+ return s == null && n !== void 0 ? n : s;
699
+ }
700
+ return He.exports;
701
+ }
702
+ var Be, ft;
703
+ function Bn() {
704
+ if (ft) return Be;
705
+ ft = 1;
706
+ var e = Hn();
707
+ Be = function(o) {
708
+ o = o || {};
709
+ var n = o.reporter, s = e.getOption(o, "async", !0), a = e.getOption(o, "auto", !0);
710
+ a && !s && (n && n.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."), s = !0);
711
+ var u = t(), d, l = !1;
712
+ function f(b, P) {
713
+ !l && a && s && u.size() === 0 && H(), u.add(b, P);
714
+ }
715
+ function v() {
716
+ for (l = !0; u.size(); ) {
717
+ var b = u;
718
+ u = t(), b.process();
719
+ }
720
+ l = !1;
721
+ }
722
+ function g(b) {
723
+ l || (b === void 0 && (b = s), d && (w(d), d = null), b ? H() : v());
724
+ }
725
+ function H() {
726
+ d = y(v);
727
+ }
728
+ function w(b) {
729
+ var P = clearTimeout;
730
+ return P(b);
731
+ }
732
+ function y(b) {
733
+ var P = function(B) {
734
+ return setTimeout(B, 0);
735
+ };
736
+ return P(b);
737
+ }
738
+ return {
739
+ add: f,
740
+ force: g
741
+ };
742
+ };
743
+ function t() {
744
+ var r = {}, o = 0, n = 0, s = 0;
745
+ function a(l, f) {
746
+ f || (f = l, l = 0), l > n ? n = l : l < s && (s = l), r[l] || (r[l] = []), r[l].push(f), o++;
747
+ }
748
+ function u() {
749
+ for (var l = s; l <= n; l++)
750
+ for (var f = r[l], v = 0; v < f.length; v++) {
751
+ var g = f[v];
752
+ g();
753
+ }
754
+ }
755
+ function d() {
756
+ return o;
757
+ }
758
+ return {
759
+ add: a,
760
+ process: u,
761
+ size: d
762
+ };
763
+ }
764
+ return Be;
765
+ }
766
+ var Re, ht;
767
+ function Rn() {
768
+ if (ht) return Re;
769
+ ht = 1;
770
+ var e = "_erd";
771
+ function t(n) {
772
+ return n[e] = {}, r(n);
773
+ }
774
+ function r(n) {
775
+ return n[e];
776
+ }
777
+ function o(n) {
778
+ delete n[e];
779
+ }
780
+ return Re = {
781
+ initState: t,
782
+ getState: r,
783
+ cleanState: o
784
+ }, Re;
785
+ }
786
+ var We, pt;
787
+ function Wn() {
788
+ if (pt) return We;
789
+ pt = 1;
790
+ var e = Lt();
791
+ return We = function(t) {
792
+ t = t || {};
793
+ var r = t.reporter, o = t.batchProcessor, n = t.stateHandler.getState;
794
+ if (!r)
795
+ throw new Error("Missing required dependency: reporter.");
796
+ function s(f, v) {
797
+ function g() {
798
+ v(f);
799
+ }
800
+ if (e.isIE(8))
801
+ n(f).object = {
802
+ proxy: g
803
+ }, f.attachEvent("onresize", g);
804
+ else {
805
+ var H = d(f);
806
+ if (!H)
807
+ throw new Error("Element is not detectable by this strategy.");
808
+ H.contentDocument.defaultView.addEventListener("resize", g);
809
+ }
810
+ }
811
+ function a(f) {
812
+ var v = t.important ? " !important; " : "; ";
813
+ return (f.join(v) + v).trim();
814
+ }
815
+ function u(f, v, g) {
816
+ g || (g = v, v = f, f = null), f = f || {}, f.debug;
817
+ function H(w, y) {
818
+ var b = a(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]), P = !1, B = window.getComputedStyle(w), D = w.offsetWidth, ve = w.offsetHeight;
819
+ n(w).startSize = {
820
+ width: D,
821
+ height: ve
822
+ };
823
+ function p() {
824
+ function i() {
825
+ if (B.position === "static") {
826
+ w.style.setProperty("position", "relative", f.important ? "important" : "");
827
+ var _ = function(A, I, M, E) {
828
+ function V(me) {
829
+ return me.replace(/[^-\d\.]/g, "");
830
+ }
831
+ var U = M[E];
832
+ U !== "auto" && V(U) !== "0" && (A.warn("An element that is positioned static has style." + E + "=" + U + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + E + " will be set to 0. Element: ", I), I.style.setProperty(E, "0", f.important ? "important" : ""));
833
+ };
834
+ _(r, w, B, "top"), _(r, w, B, "right"), _(r, w, B, "bottom"), _(r, w, B, "left");
835
+ }
836
+ }
837
+ function k() {
838
+ P || i();
839
+ function _(I, M) {
840
+ if (!I.contentDocument) {
841
+ var E = n(I);
842
+ E.checkForObjectDocumentTimeoutId && window.clearTimeout(E.checkForObjectDocumentTimeoutId), E.checkForObjectDocumentTimeoutId = setTimeout(function() {
843
+ E.checkForObjectDocumentTimeoutId = 0, _(I, M);
844
+ }, 100);
845
+ return;
846
+ }
847
+ M(I.contentDocument);
848
+ }
849
+ var A = this;
850
+ _(A, function(M) {
851
+ y(w);
852
+ });
853
+ }
854
+ B.position !== "" && (i(), P = !0);
855
+ var h = document.createElement("object");
856
+ h.style.cssText = b, h.tabIndex = -1, h.type = "text/html", h.setAttribute("aria-hidden", "true"), h.onload = k, e.isIE() || (h.data = "about:blank"), n(w) && (w.appendChild(h), n(w).object = h, e.isIE() && (h.data = "about:blank"));
857
+ }
858
+ o ? o.add(p) : p();
859
+ }
860
+ e.isIE(8) ? g(v) : H(v, g);
861
+ }
862
+ function d(f) {
863
+ return n(f).object;
864
+ }
865
+ function l(f) {
866
+ if (n(f)) {
867
+ var v = d(f);
868
+ v && (e.isIE(8) ? f.detachEvent("onresize", v.proxy) : f.removeChild(v), n(f).checkForObjectDocumentTimeoutId && window.clearTimeout(n(f).checkForObjectDocumentTimeoutId), delete n(f).object);
869
+ }
870
+ }
871
+ return {
872
+ makeDetectable: u,
873
+ addListener: s,
874
+ uninstall: l
875
+ };
876
+ }, We;
877
+ }
878
+ var Me, vt;
879
+ function Mn() {
880
+ if (vt) return Me;
881
+ vt = 1;
882
+ var e = It().forEach;
883
+ return Me = function(t) {
884
+ t = t || {};
885
+ var r = t.reporter, o = t.batchProcessor, n = t.stateHandler.getState;
886
+ t.stateHandler.hasState;
887
+ var s = t.idHandler;
888
+ if (!o)
889
+ throw new Error("Missing required dependency: batchProcessor");
890
+ if (!r)
891
+ throw new Error("Missing required dependency: reporter.");
892
+ var a = v(), u = "erd_scroll_detection_scrollbar_style", d = "erd_scroll_detection_container";
893
+ function l(p) {
894
+ g(p, u, d);
895
+ }
896
+ l(window.document);
897
+ function f(p) {
898
+ var i = t.important ? " !important; " : "; ";
899
+ return (p.join(i) + i).trim();
900
+ }
901
+ function v() {
902
+ var p = 500, i = 500, k = document.createElement("div");
903
+ k.style.cssText = f(["position: absolute", "width: " + p * 2 + "px", "height: " + i * 2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
904
+ var h = document.createElement("div");
905
+ h.style.cssText = f(["position: absolute", "width: " + p + "px", "height: " + i + "px", "overflow: scroll", "visibility: none", "top: " + -500 * 3 + "px", "left: " + -500 * 3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]), h.appendChild(k), document.body.insertBefore(h, document.body.firstChild);
906
+ var _ = p - h.clientWidth, A = i - h.clientHeight;
907
+ return document.body.removeChild(h), {
908
+ width: _,
909
+ height: A
910
+ };
911
+ }
912
+ function g(p, i, k) {
913
+ function h(M, E) {
914
+ E = E || function(U) {
915
+ p.head.appendChild(U);
916
+ };
917
+ var V = p.createElement("style");
918
+ return V.innerHTML = M, V.id = i, E(V), V;
919
+ }
920
+ if (!p.getElementById(i)) {
921
+ var _ = k + "_animation", A = k + "_animation_active", I = `/* Created by the element-resize-detector library. */
922
+ `;
923
+ I += "." + k + " > div::-webkit-scrollbar { " + f(["display: none"]) + ` }
924
+
925
+ `, I += "." + A + " { " + f(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + _, "animation-name: " + _]) + ` }
926
+ `, I += "@-webkit-keyframes " + _ + ` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
927
+ `, I += "@keyframes " + _ + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }", h(I);
928
+ }
929
+ }
930
+ function H(p) {
931
+ p.className += " " + d + "_animation_active";
932
+ }
933
+ function w(p, i, k) {
934
+ if (p.addEventListener)
935
+ p.addEventListener(i, k);
936
+ else if (p.attachEvent)
937
+ p.attachEvent("on" + i, k);
938
+ else
939
+ return r.error("[scroll] Don't know how to add event listeners.");
940
+ }
941
+ function y(p, i, k) {
942
+ if (p.removeEventListener)
943
+ p.removeEventListener(i, k);
944
+ else if (p.detachEvent)
945
+ p.detachEvent("on" + i, k);
946
+ else
947
+ return r.error("[scroll] Don't know how to remove event listeners.");
948
+ }
949
+ function b(p) {
950
+ return n(p).container.childNodes[0].childNodes[0].childNodes[0];
951
+ }
952
+ function P(p) {
953
+ return n(p).container.childNodes[0].childNodes[0].childNodes[1];
954
+ }
955
+ function B(p, i) {
956
+ var k = n(p).listeners;
957
+ if (!k.push)
958
+ throw new Error("Cannot add listener to an element that is not detectable.");
959
+ n(p).listeners.push(i);
960
+ }
961
+ function D(p, i, k) {
962
+ k || (k = i, i = p, p = null), p = p || {};
963
+ function h() {
964
+ if (p.debug) {
965
+ var c = Array.prototype.slice.call(arguments);
966
+ if (c.unshift(s.get(i), "Scroll: "), r.log.apply)
967
+ r.log.apply(null, c);
968
+ else
969
+ for (var m = 0; m < c.length; m++)
970
+ r.log(c[m]);
971
+ }
972
+ }
973
+ function _(c) {
974
+ function m(S) {
975
+ var N = S.getRootNode && S.getRootNode().contains(S);
976
+ return S === S.ownerDocument.body || S.ownerDocument.body.contains(S) || N;
977
+ }
978
+ return !m(c) || window.getComputedStyle(c) === null;
979
+ }
980
+ function A(c) {
981
+ var m = n(c).container.childNodes[0], S = window.getComputedStyle(m);
982
+ return !S.width || S.width.indexOf("px") === -1;
983
+ }
984
+ function I() {
985
+ var c = window.getComputedStyle(i), m = {};
986
+ return m.position = c.position, m.width = i.offsetWidth, m.height = i.offsetHeight, m.top = c.top, m.right = c.right, m.bottom = c.bottom, m.left = c.left, m.widthCSS = c.width, m.heightCSS = c.height, m;
987
+ }
988
+ function M() {
989
+ var c = I();
990
+ n(i).startSize = {
991
+ width: c.width,
992
+ height: c.height
993
+ }, h("Element start size", n(i).startSize);
994
+ }
995
+ function E() {
996
+ n(i).listeners = [];
997
+ }
998
+ function V() {
999
+ if (h("storeStyle invoked."), !n(i)) {
1000
+ h("Aborting because element has been uninstalled");
1001
+ return;
1002
+ }
1003
+ var c = I();
1004
+ n(i).style = c;
1005
+ }
1006
+ function U(c, m, S) {
1007
+ n(c).lastWidth = m, n(c).lastHeight = S;
1008
+ }
1009
+ function me(c) {
1010
+ return b(c).childNodes[0];
1011
+ }
1012
+ function C() {
1013
+ return 2 * a.width + 1;
1014
+ }
1015
+ function L() {
1016
+ return 2 * a.height + 1;
1017
+ }
1018
+ function Q(c) {
1019
+ return c + 10 + C();
1020
+ }
1021
+ function ge(c) {
1022
+ return c + 10 + L();
1023
+ }
1024
+ function ye(c) {
1025
+ return c * 2 + C();
1026
+ }
1027
+ function ee(c) {
1028
+ return c * 2 + L();
1029
+ }
1030
+ function le(c, m, S) {
1031
+ var N = b(c), K = P(c), de = Q(m), fe = ge(S), W = ye(m), x = ee(S);
1032
+ N.scrollLeft = de, N.scrollTop = fe, K.scrollLeft = W, K.scrollTop = x;
1033
+ }
1034
+ function ce() {
1035
+ var c = n(i).container;
1036
+ if (!c) {
1037
+ c = document.createElement("div"), c.className = d, c.style.cssText = f(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]), n(i).container = c, H(c), i.appendChild(c);
1038
+ var m = function() {
1039
+ n(i).onRendered && n(i).onRendered();
1040
+ };
1041
+ w(c, "animationstart", m), n(i).onAnimationStart = m;
1042
+ }
1043
+ return c;
1044
+ }
1045
+ function G() {
1046
+ function c() {
1047
+ var z = n(i).style;
1048
+ if (z.position === "static") {
1049
+ i.style.setProperty("position", "relative", p.important ? "important" : "");
1050
+ var X = function(pe, ae, Pt, _e) {
1051
+ function Tt(Ot) {
1052
+ return Ot.replace(/[^-\d\.]/g, "");
1053
+ }
1054
+ var Ie = Pt[_e];
1055
+ Ie !== "auto" && Tt(Ie) !== "0" && (pe.warn("An element that is positioned static has style." + _e + "=" + Ie + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + _e + " will be set to 0. Element: ", ae), ae.style[_e] = 0);
1056
+ };
1057
+ X(r, i, z, "top"), X(r, i, z, "right"), X(r, i, z, "bottom"), X(r, i, z, "left");
1058
+ }
1059
+ }
1060
+ function m(z, X, pe, ae) {
1061
+ return z = z ? z + "px" : "0", X = X ? X + "px" : "0", pe = pe ? pe + "px" : "0", ae = ae ? ae + "px" : "0", ["left: " + z, "top: " + X, "right: " + ae, "bottom: " + pe];
1062
+ }
1063
+ if (h("Injecting elements"), !n(i)) {
1064
+ h("Aborting because element has been uninstalled");
1065
+ return;
1066
+ }
1067
+ c();
1068
+ var S = n(i).container;
1069
+ S || (S = ce());
1070
+ var N = a.width, K = a.height, de = f(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]), fe = f(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(m(-(1 + N), -(1 + K), -K, -N))), W = f(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]), x = f(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]), q = f(["position: absolute", "left: 0", "top: 0"]), oe = f(["position: absolute", "width: 200%", "height: 200%"]), Y = document.createElement("div"), J = document.createElement("div"), he = document.createElement("div"), Ye = document.createElement("div"), Se = document.createElement("div"), Je = document.createElement("div");
1071
+ Y.dir = "ltr", Y.style.cssText = de, Y.className = d, J.className = d, J.style.cssText = fe, he.style.cssText = W, Ye.style.cssText = q, Se.style.cssText = x, Je.style.cssText = oe, he.appendChild(Ye), Se.appendChild(Je), J.appendChild(he), J.appendChild(Se), Y.appendChild(J), S.appendChild(Y);
1072
+ function Xe() {
1073
+ var z = n(i);
1074
+ z && z.onExpand ? z.onExpand() : h("Aborting expand scroll handler: element has been uninstalled");
1075
+ }
1076
+ function Ze() {
1077
+ var z = n(i);
1078
+ z && z.onShrink ? z.onShrink() : h("Aborting shrink scroll handler: element has been uninstalled");
1079
+ }
1080
+ w(he, "scroll", Xe), w(Se, "scroll", Ze), n(i).onExpandScroll = Xe, n(i).onShrinkScroll = Ze;
1081
+ }
1082
+ function te() {
1083
+ function c(W, x, q) {
1084
+ var oe = me(W), Y = Q(x), J = ge(q);
1085
+ oe.style.setProperty("width", Y + "px", p.important ? "important" : ""), oe.style.setProperty("height", J + "px", p.important ? "important" : "");
1086
+ }
1087
+ function m(W) {
1088
+ var x = i.offsetWidth, q = i.offsetHeight, oe = x !== n(i).lastWidth || q !== n(i).lastHeight;
1089
+ h("Storing current size", x, q), U(i, x, q), o.add(0, function() {
1090
+ if (oe) {
1091
+ if (!n(i)) {
1092
+ h("Aborting because element has been uninstalled");
1093
+ return;
1094
+ }
1095
+ if (!S()) {
1096
+ h("Aborting because element container has not been initialized");
1097
+ return;
1098
+ }
1099
+ if (p.debug) {
1100
+ var J = i.offsetWidth, he = i.offsetHeight;
1101
+ (J !== x || he !== q) && r.warn(s.get(i), "Scroll: Size changed before updating detector elements.");
1102
+ }
1103
+ c(i, x, q);
1104
+ }
1105
+ }), o.add(1, function() {
1106
+ if (!n(i)) {
1107
+ h("Aborting because element has been uninstalled");
1108
+ return;
1109
+ }
1110
+ if (!S()) {
1111
+ h("Aborting because element container has not been initialized");
1112
+ return;
1113
+ }
1114
+ le(i, x, q);
1115
+ }), oe && W && o.add(2, function() {
1116
+ if (!n(i)) {
1117
+ h("Aborting because element has been uninstalled");
1118
+ return;
1119
+ }
1120
+ if (!S()) {
1121
+ h("Aborting because element container has not been initialized");
1122
+ return;
1123
+ }
1124
+ W();
1125
+ });
1126
+ }
1127
+ function S() {
1128
+ return !!n(i).container;
1129
+ }
1130
+ function N() {
1131
+ function W() {
1132
+ return n(i).lastNotifiedWidth === void 0;
1133
+ }
1134
+ h("notifyListenersIfNeeded invoked");
1135
+ var x = n(i);
1136
+ if (W() && x.lastWidth === x.startSize.width && x.lastHeight === x.startSize.height)
1137
+ return h("Not notifying: Size is the same as the start size, and there has been no notification yet.");
1138
+ if (x.lastWidth === x.lastNotifiedWidth && x.lastHeight === x.lastNotifiedHeight)
1139
+ return h("Not notifying: Size already notified");
1140
+ h("Current size not notified, notifying..."), x.lastNotifiedWidth = x.lastWidth, x.lastNotifiedHeight = x.lastHeight, e(n(i).listeners, function(q) {
1141
+ q(i);
1142
+ });
1143
+ }
1144
+ function K() {
1145
+ if (h("startanimation triggered."), A(i)) {
1146
+ h("Ignoring since element is still unrendered...");
1147
+ return;
1148
+ }
1149
+ h("Element rendered.");
1150
+ var W = b(i), x = P(i);
1151
+ (W.scrollLeft === 0 || W.scrollTop === 0 || x.scrollLeft === 0 || x.scrollTop === 0) && (h("Scrollbars out of sync. Updating detector elements..."), m(N));
1152
+ }
1153
+ function de() {
1154
+ if (h("Scroll detected."), A(i)) {
1155
+ h("Scroll event fired while unrendered. Ignoring...");
1156
+ return;
1157
+ }
1158
+ m(N);
1159
+ }
1160
+ if (h("registerListenersAndPositionElements invoked."), !n(i)) {
1161
+ h("Aborting because element has been uninstalled");
1162
+ return;
1163
+ }
1164
+ n(i).onRendered = K, n(i).onExpand = de, n(i).onShrink = de;
1165
+ var fe = n(i).style;
1166
+ c(i, fe.width, fe.height);
1167
+ }
1168
+ function O() {
1169
+ if (h("finalizeDomMutation invoked."), !n(i)) {
1170
+ h("Aborting because element has been uninstalled");
1171
+ return;
1172
+ }
1173
+ var c = n(i).style;
1174
+ U(i, c.width, c.height), le(i, c.width, c.height);
1175
+ }
1176
+ function T() {
1177
+ k(i);
1178
+ }
1179
+ function ue() {
1180
+ h("Installing..."), E(), M(), o.add(0, V), o.add(1, G), o.add(2, te), o.add(3, O), o.add(4, T);
1181
+ }
1182
+ h("Making detectable..."), _(i) ? (h("Element is detached"), ce(), h("Waiting until element is attached..."), n(i).onRendered = function() {
1183
+ h("Element is now attached"), ue();
1184
+ }) : ue();
1185
+ }
1186
+ function ve(p) {
1187
+ var i = n(p);
1188
+ i && (i.onExpandScroll && y(b(p), "scroll", i.onExpandScroll), i.onShrinkScroll && y(P(p), "scroll", i.onShrinkScroll), i.onAnimationStart && y(i.container, "animationstart", i.onAnimationStart), i.container && p.removeChild(i.container));
1189
+ }
1190
+ return {
1191
+ makeDetectable: D,
1192
+ addListener: B,
1193
+ uninstall: ve,
1194
+ initDocument: l
1195
+ };
1196
+ }, Me;
1197
+ }
1198
+ var Ne, mt;
1199
+ function Nn() {
1200
+ if (mt) return Ne;
1201
+ mt = 1;
1202
+ var e = It().forEach, t = Tn(), r = On(), o = zn(), n = An(), s = jn(), a = Lt(), u = Bn(), d = Rn(), l = Wn(), f = Mn();
1203
+ function v(y) {
1204
+ return Array.isArray(y) || y.length !== void 0;
1205
+ }
1206
+ function g(y) {
1207
+ if (Array.isArray(y))
1208
+ return y;
1209
+ var b = [];
1210
+ return e(y, function(P) {
1211
+ b.push(P);
1212
+ }), b;
1213
+ }
1214
+ function H(y) {
1215
+ return y && y.nodeType === 1;
1216
+ }
1217
+ Ne = function(y) {
1218
+ y = y || {};
1219
+ var b;
1220
+ if (y.idHandler)
1221
+ b = {
1222
+ get: function(C) {
1223
+ return y.idHandler.get(C, !0);
1224
+ },
1225
+ set: y.idHandler.set
1226
+ };
1227
+ else {
1228
+ var P = o(), B = n({
1229
+ idGenerator: P,
1230
+ stateHandler: d
1231
+ });
1232
+ b = B;
1233
+ }
1234
+ var D = y.reporter;
1235
+ if (!D) {
1236
+ var ve = D === !1;
1237
+ D = s(ve);
1238
+ }
1239
+ var p = w(y, "batchProcessor", u({ reporter: D })), i = {};
1240
+ i.callOnAdd = !!w(y, "callOnAdd", !0), i.debug = !!w(y, "debug", !1);
1241
+ var k = r(b), h = t({
1242
+ stateHandler: d
1243
+ }), _, A = w(y, "strategy", "object"), I = w(y, "important", !1), M = {
1244
+ reporter: D,
1245
+ batchProcessor: p,
1246
+ stateHandler: d,
1247
+ idHandler: b,
1248
+ important: I
1249
+ };
1250
+ if (A === "scroll" && (a.isLegacyOpera() ? (D.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."), A = "object") : a.isIE(9) && (D.warn("Scroll strategy is not supported on IE9. Changing to object strategy."), A = "object")), A === "scroll")
1251
+ _ = f(M);
1252
+ else if (A === "object")
1253
+ _ = l(M);
1254
+ else
1255
+ throw new Error("Invalid strategy name: " + A);
1256
+ var E = {};
1257
+ function V(C, L, Q) {
1258
+ function ge(te) {
1259
+ var O = k.get(te);
1260
+ e(O, function(ue) {
1261
+ ue(te);
1262
+ });
1263
+ }
1264
+ function ye(te, O, T) {
1265
+ k.add(O, T), te && T(O);
1266
+ }
1267
+ if (Q || (Q = L, L = C, C = {}), !L)
1268
+ throw new Error("At least one element required.");
1269
+ if (!Q)
1270
+ throw new Error("Listener required.");
1271
+ if (H(L))
1272
+ L = [L];
1273
+ else if (v(L))
1274
+ L = g(L);
1275
+ else
1276
+ return D.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
1277
+ var ee = 0, le = w(C, "callOnAdd", i.callOnAdd), ce = w(C, "onReady", function() {
1278
+ }), G = w(C, "debug", i.debug);
1279
+ e(L, function(O) {
1280
+ d.getState(O) || (d.initState(O), b.set(O));
1281
+ var T = b.get(O);
1282
+ if (G && D.log("Attaching listener to element", T, O), !h.isDetectable(O)) {
1283
+ if (G && D.log(T, "Not detectable."), h.isBusy(O)) {
1284
+ G && D.log(T, "System busy making it detectable"), ye(le, O, Q), E[T] = E[T] || [], E[T].push(function() {
1285
+ ee++, ee === L.length && ce();
1286
+ });
1287
+ return;
1288
+ }
1289
+ return G && D.log(T, "Making detectable..."), h.markBusy(O, !0), _.makeDetectable({ debug: G, important: I }, O, function(c) {
1290
+ if (G && D.log(T, "onElementDetectable"), d.getState(c)) {
1291
+ h.markAsDetectable(c), h.markBusy(c, !1), _.addListener(c, ge), ye(le, c, Q);
1292
+ var m = d.getState(c);
1293
+ if (m && m.startSize) {
1294
+ var S = c.offsetWidth, N = c.offsetHeight;
1295
+ (m.startSize.width !== S || m.startSize.height !== N) && ge(c);
1296
+ }
1297
+ E[T] && e(E[T], function(K) {
1298
+ K();
1299
+ });
1300
+ } else
1301
+ G && D.log(T, "Element uninstalled before being detectable.");
1302
+ delete E[T], ee++, ee === L.length && ce();
1303
+ });
1304
+ }
1305
+ G && D.log(T, "Already detecable, adding listener."), ye(le, O, Q), ee++;
1306
+ }), ee === L.length && ce();
1307
+ }
1308
+ function U(C) {
1309
+ if (!C)
1310
+ return D.error("At least one element is required.");
1311
+ if (H(C))
1312
+ C = [C];
1313
+ else if (v(C))
1314
+ C = g(C);
1315
+ else
1316
+ return D.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
1317
+ e(C, function(L) {
1318
+ k.removeAllListeners(L), _.uninstall(L), d.cleanState(L);
1319
+ });
1320
+ }
1321
+ function me(C) {
1322
+ _.initDocument && _.initDocument(C);
1323
+ }
1324
+ return {
1325
+ listenTo: V,
1326
+ removeListener: k.removeListener,
1327
+ removeAllListeners: k.removeAllListeners,
1328
+ uninstall: U,
1329
+ initDocument: me
1330
+ };
1331
+ };
1332
+ function w(y, b, P) {
1333
+ var B = y[b];
1334
+ return B == null && P !== void 0 ? P : B;
1335
+ }
1336
+ return Ne;
1337
+ }
1338
+ var qn = Nn();
1339
+ const Fn = /* @__PURE__ */ Kt(qn), Vn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1340
+ __name: "WithDimensions",
1341
+ props: { provideDevice: Boolean },
1342
+ emits: ["width", "height", "resize"],
1343
+ setup(e, { emit: t }) {
1344
+ window.elementResizeDetectorMaker || (window.elementResizeDetectorMaker = Fn({
1345
+ strategy: "scroll"
1346
+ }));
1347
+ const r = e, o = t, n = (l) => l <= 640 ? "mobile" : l <= 1024 ? "tablet" : "desktop", s = re(null), a = re(null), u = re({ device: "desktop" }), d = Yt();
1348
+ return r.provideDevice && (gt("containerType", u), Qe(s, (l) => {
1349
+ u.value.device = n(l);
1350
+ })), bt(() => {
1351
+ var v;
1352
+ const l = (v = d.value) == null ? void 0 : v.nextElementSibling;
1353
+ if (!l) return;
1354
+ const f = () => {
1355
+ s.value = l.offsetWidth, a.value = l.offsetHeight, o("width", l.offsetWidth), o("height", l.offsetHeight), o("resize");
1356
+ };
1357
+ window.elementResizeDetectorMaker.listenTo(l, f), s.value = l.offsetWidth, a.value = l.offsetHeight, Jt(() => {
1358
+ window.elementResizeDetectorMaker.uninstall(l);
1359
+ });
1360
+ }), (l, f) => Ce(l.$slots, "default", {
1361
+ width: s.value,
1362
+ height: a.value
1363
+ });
1364
+ }
1365
+ }), $n = {
1366
+ name: "DocumentLayout",
1367
+ components: {
1368
+ DynamicChapter: xt,
1369
+ DocumentStyleContainer: Pn,
1370
+ WithDimensions: Vn
1371
+ },
1372
+ props: {
1373
+ document: {
1374
+ type: Object,
1375
+ required: !0
1376
+ }
1377
+ },
1378
+ computed: {
1379
+ layout() {
1380
+ var e;
1381
+ return ((e = this.document) == null ? void 0 : e.readLayout) || [];
1382
+ }
1383
+ }
1384
+ }, Un = { class: "font-family-default h-full w-full" };
1385
+ function Gn(e, t, r, o, n, s) {
1386
+ const a = ne("DynamicChapter"), u = ne("DocumentStyleContainer"), d = ne("WithDimensions");
1387
+ return j(), ie("div", Un, [
1388
+ xe(d, { "provide-device": !0 }, {
1389
+ default: $(() => {
1390
+ var l, f;
1391
+ return [
1392
+ xe(u, {
1393
+ "input-style": (f = (l = r.document) == null ? void 0 : l.data) == null ? void 0 : f.css,
1394
+ style: { flex: "1 0 auto" },
1395
+ class: "h-full w-full"
1396
+ }, {
1397
+ default: $(() => [
1398
+ (j(!0), ie($e, null, Ve(s.layout, (v, g) => (j(), Z(a, {
1399
+ key: g,
1400
+ "component-name": v.componentName,
1401
+ "component-props": {
1402
+ ...v.props,
1403
+ _document: r.document,
1404
+ _value: v.value
1405
+ },
1406
+ children: v.children,
1407
+ "_first-block": g === 0,
1408
+ "_last-block": g === s.layout.length - 1
1409
+ }, null, 8, ["component-name", "component-props", "children", "_first-block", "_last-block"]))), 128))
1410
+ ]),
1411
+ _: 1
1412
+ }, 8, ["input-style"])
1413
+ ];
1414
+ }),
1415
+ _: 1
1416
+ })
1417
+ ]);
1418
+ }
1419
+ const Qn = /* @__PURE__ */ ke($n, [["render", Gn]]), rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1420
+ __proto__: null,
1421
+ default: Qn
1422
+ }, Symbol.toStringTag, { value: "Module" }));
1423
+ export {
1424
+ Qn as D,
1425
+ tr as F,
1426
+ Pn as _,
1427
+ Vn as a,
1428
+ xt as b,
1429
+ rr as c,
1430
+ er as g,
1431
+ nr as i,
1432
+ _t as l,
1433
+ ln as u
1434
+ };