@creaditor/newsletter-starterkit 1.0.56 → 1.0.58

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 (129) hide show
  1. package/dist/1142.creaditor.bundle.js +1 -1
  2. package/dist/1142.creaditor.bundle.js.gz +0 -0
  3. package/dist/1260.creaditor.bundle.js +112 -63
  4. package/dist/1260.creaditor.bundle.js.gz +0 -0
  5. package/dist/1271.creaditor.bundle.js +1 -1
  6. package/dist/1271.creaditor.bundle.js.gz +0 -0
  7. package/dist/1334.creaditor.bundle.js +3 -3
  8. package/dist/1334.creaditor.bundle.js.gz +0 -0
  9. package/dist/1529.creaditor.bundle.js +1 -1
  10. package/dist/1529.creaditor.bundle.js.gz +0 -0
  11. package/dist/170.creaditor.bundle.js +149 -22
  12. package/dist/170.creaditor.bundle.js.gz +0 -0
  13. package/dist/211.creaditor.bundle.js +1 -1
  14. package/dist/211.creaditor.bundle.js.gz +0 -0
  15. package/dist/2234.creaditor.bundle.js +121 -1
  16. package/dist/2234.creaditor.bundle.js.gz +0 -0
  17. package/dist/2590.creaditor.bundle.js +1 -1
  18. package/dist/2590.creaditor.bundle.js.gz +0 -0
  19. package/dist/271.creaditor.bundle.js +6 -6
  20. package/dist/271.creaditor.bundle.js.gz +0 -0
  21. package/dist/2765.creaditor.bundle.js +1 -1
  22. package/dist/2765.creaditor.bundle.js.gz +0 -0
  23. package/dist/2956.creaditor.bundle.js +1 -1
  24. package/dist/2956.creaditor.bundle.js.gz +0 -0
  25. package/dist/3521.creaditor.bundle.js +2 -2
  26. package/dist/3521.creaditor.bundle.js.gz +0 -0
  27. package/dist/353.creaditor.bundle.js +3 -3
  28. package/dist/353.creaditor.bundle.js.gz +0 -0
  29. package/dist/3553.creaditor.bundle.js +2 -2
  30. package/dist/3553.creaditor.bundle.js.gz +0 -0
  31. package/dist/3606.creaditor.bundle.js +12 -4
  32. package/dist/3606.creaditor.bundle.js.gz +0 -0
  33. package/dist/3847.creaditor.bundle.js +937 -21
  34. package/dist/3847.creaditor.bundle.js.gz +0 -0
  35. package/dist/3932.creaditor.bundle.js +4 -4
  36. package/dist/3932.creaditor.bundle.js.gz +0 -0
  37. package/dist/4061.creaditor.bundle.js +177 -0
  38. package/dist/4061.creaditor.bundle.js.LICENSE.txt +23 -0
  39. package/dist/4061.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  40. package/dist/4061.creaditor.bundle.js.gz +0 -0
  41. package/dist/4186.creaditor.bundle.js +5 -1
  42. package/dist/4186.creaditor.bundle.js.gz +0 -0
  43. package/dist/4288.creaditor.bundle.js +10 -10
  44. package/dist/4288.creaditor.bundle.js.gz +0 -0
  45. package/dist/4475.creaditor.bundle.js +1 -1
  46. package/dist/4475.creaditor.bundle.js.gz +0 -0
  47. package/dist/453.creaditor.bundle.js +8 -7
  48. package/dist/453.creaditor.bundle.js.gz +0 -0
  49. package/dist/4639.creaditor.bundle.js +1 -1
  50. package/dist/4639.creaditor.bundle.js.gz +0 -0
  51. package/dist/4762.creaditor.bundle.js +4 -4
  52. package/dist/4762.creaditor.bundle.js.gz +0 -0
  53. package/dist/4770.creaditor.bundle.js +3 -3
  54. package/dist/4770.creaditor.bundle.js.gz +0 -0
  55. package/dist/5133.creaditor.bundle.js +3 -3
  56. package/dist/5133.creaditor.bundle.js.gz +0 -0
  57. package/dist/5379.creaditor.bundle.js +70 -0
  58. package/dist/5379.creaditor.bundle.js.gz +0 -0
  59. package/dist/5391.creaditor.bundle.js +1 -1
  60. package/dist/5391.creaditor.bundle.js.gz +0 -0
  61. package/dist/567.creaditor.bundle.js +469 -364
  62. package/dist/567.creaditor.bundle.js.gz +0 -0
  63. package/dist/5849.creaditor.bundle.js +2 -2
  64. package/dist/5849.creaditor.bundle.js.gz +0 -0
  65. package/dist/589.creaditor.bundle.js +25 -8
  66. package/dist/589.creaditor.bundle.js.gz +0 -0
  67. package/dist/5909.creaditor.bundle.js +651 -0
  68. package/dist/5909.creaditor.bundle.js.gz +0 -0
  69. package/dist/5926.creaditor.bundle.js +216 -34
  70. package/dist/5926.creaditor.bundle.js.gz +0 -0
  71. package/dist/638.creaditor.bundle.js +49 -20
  72. package/dist/638.creaditor.bundle.js.gz +0 -0
  73. package/dist/6814.creaditor.bundle.js +1 -1
  74. package/dist/6814.creaditor.bundle.js.gz +0 -0
  75. package/dist/7209.creaditor.bundle.js +98 -56
  76. package/dist/7209.creaditor.bundle.js.gz +0 -0
  77. package/dist/7238.creaditor.bundle.js +1 -1
  78. package/dist/7238.creaditor.bundle.js.gz +0 -0
  79. package/dist/752.creaditor.bundle.js +6 -4
  80. package/dist/752.creaditor.bundle.js.gz +0 -0
  81. package/dist/7564.creaditor.bundle.js +1 -1
  82. package/dist/7564.creaditor.bundle.js.gz +0 -0
  83. package/dist/763.creaditor.bundle.js +9 -9
  84. package/dist/763.creaditor.bundle.js.gz +0 -0
  85. package/dist/7654.creaditor.bundle.js +221 -0
  86. package/dist/7654.creaditor.bundle.js.gz +0 -0
  87. package/dist/7918.creaditor.bundle.js +1 -0
  88. package/dist/7918.creaditor.bundle.js.gz +0 -0
  89. package/dist/7937.creaditor.bundle.js +21 -48
  90. package/dist/7937.creaditor.bundle.js.gz +0 -0
  91. package/dist/7997.creaditor.bundle.js +1 -1
  92. package/dist/7997.creaditor.bundle.js.gz +0 -0
  93. package/dist/8141.creaditor.bundle.js +2 -3
  94. package/dist/8141.creaditor.bundle.js.gz +0 -0
  95. package/dist/8250.creaditor.bundle.js +1 -1
  96. package/dist/8250.creaditor.bundle.js.gz +0 -0
  97. package/dist/8443.creaditor.bundle.js +1 -1
  98. package/dist/8443.creaditor.bundle.js.gz +0 -0
  99. package/dist/8516.creaditor.bundle.js +1 -1
  100. package/dist/8516.creaditor.bundle.js.gz +0 -0
  101. package/dist/8547.creaditor.bundle.js +1270 -0
  102. package/dist/8547.creaditor.bundle.js.gz +0 -0
  103. package/dist/8570.creaditor.bundle.js +3 -3
  104. package/dist/8570.creaditor.bundle.js.gz +0 -0
  105. package/dist/8646.creaditor.bundle.js +20 -24
  106. package/dist/8646.creaditor.bundle.js.gz +0 -0
  107. package/dist/8654.creaditor.bundle.js +7 -7
  108. package/dist/8654.creaditor.bundle.js.gz +0 -0
  109. package/dist/8854.creaditor.bundle.js +4 -4
  110. package/dist/8854.creaditor.bundle.js.gz +0 -0
  111. package/dist/8916.creaditor.bundle.js +3 -1
  112. package/dist/8916.creaditor.bundle.js.gz +0 -0
  113. package/dist/9041.creaditor.bundle.js +14 -16
  114. package/dist/9041.creaditor.bundle.js.gz +0 -0
  115. package/dist/9250.creaditor.bundle.js +1 -1
  116. package/dist/9250.creaditor.bundle.js.gz +0 -0
  117. package/dist/9431.creaditor.bundle.js +1 -1
  118. package/dist/9431.creaditor.bundle.js.gz +0 -0
  119. package/dist/9694.creaditor.bundle.js +1 -1
  120. package/dist/9694.creaditor.bundle.js.gz +0 -0
  121. package/dist/9994.creaditor.bundle.js +1 -1
  122. package/dist/9994.creaditor.bundle.js.gz +0 -0
  123. package/dist/creaditor.bundle.js +3194 -2205
  124. package/dist/creaditor.bundle.js.LICENSE.txt +6 -0
  125. package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
  126. package/dist/creaditor.bundle.js.gz +0 -0
  127. package/dist/service-worker.js +1 -1
  128. package/dist/service-worker.js.gz +0 -0
  129. package/package.json +1 -1
@@ -0,0 +1,1270 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2384,8547],{58691(t,e,a){a.r(e),a.d(e,{ImagePromptEditor:()=>l});var r,o,i=a(59929),s=a(49410);const n=new Set;let l=(0,s.EM)("cdtr-image-prompt-editor")(((o=class extends i.WF{constructor(){super(),this.prompt="",this.generatedImage="",this.isLoading=!1,this.addEventListener("keydown",this._handleKeyDown.bind(this))}_handleKeyDown(t){"Enter"===t.key&&t.ctrlKey&&this._submitPrompt()}_handlePromptChange(t){this.prompt=t.target.value}_submitPrompt(){this.prompt.trim()&&!this.isLoading&&(this.isLoading=!0,this.dispatchEvent(new CustomEvent("generate-image",{detail:{prompt:this.prompt,options:{size:"1024x1024",quality:"standard",style:"natural"}}})))}_handleInsertImage(){const t=(e=this.generatedImage).length<100?e:e.slice(0,50)+e.slice(-50);var e;n.has(t)||(n.add(t),this.dispatchEvent(new CustomEvent("insert-image",{detail:{imageUrl:this.generatedImage}})))}setGeneratedImage(t){this.isLoading=!1,this.generatedImage=t,this.requestUpdate()}copyToClipboard(){navigator.clipboard.writeText(this.generatedImage),window.snackbar&&window.snackbar({message:"copied_to_clipboard",type:"success"})}render(){return i.qy`
2
+ <div class="container">
3
+ <h6>
4
+ <lang-text
5
+ whiteSpace="break-spaces"
6
+ text="image_prompt_editor_description"
7
+ ></lang-text>
8
+ </h6>
9
+ ${this.generatedImage?i.qy`
10
+ <cdtr-input
11
+ @click="${this.copyToClipboard}"
12
+ fullWidth
13
+ value="${this.generatedImage}"
14
+ ></cdtr-input>
15
+ <div class="image-preview">
16
+ <img
17
+ width="100%"
18
+ src="${this.generatedImage}"
19
+ alt="Generated image"
20
+ />
21
+ </div>
22
+ `:null}
23
+ ${this.generatedImage?i.qy`
24
+ <paper-button
25
+ class="insert-button"
26
+ @click="${this._handleInsertImage}"
27
+ >
28
+ <lang-text text="insert_image"></lang-text>
29
+ </paper-button>
30
+ `:""}
31
+
32
+ <cdtr-textarea
33
+ fullWidth
34
+ class="prompt-input"
35
+ .value="${this.prompt}"
36
+ @input="${this._handlePromptChange}"
37
+ placeholder="describe_image_prompt_input"
38
+ ?disabled="${this.isLoading}"
39
+ ></cdtr-textarea>
40
+ <br/>
41
+ <br/>
42
+ <paper-button
43
+ ?disabled="${!this.prompt.trim()||this.isLoading}"
44
+ @click="${this._submitPrompt}"
45
+ >
46
+ ${this.isLoading?i.qy`<div class="spinner"></div>
47
+ <lang-text text="generating"></lang-text>`:i.qy`<lang-text text="generate_image"></lang-text>`}
48
+ </paper-button>
49
+
50
+ <div class="loading ${this.isLoading?"active":""}">
51
+ <div class="loading-text">
52
+ <lang-text text="creating_your_masterpiece"></lang-text>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ `}}).properties={prompt:{type:String},generatedImage:{type:String},isLoading:{type:Boolean}},o.styles=i.AH`
57
+ * {
58
+ box-sizing: border-box;
59
+ }
60
+
61
+ :host {
62
+ display: block;
63
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
64
+ margin: 0 auto;
65
+ max-width: 100%;
66
+ }
67
+
68
+ .container {
69
+ background: white;
70
+ border-radius: 12px;
71
+ transition: all 0.3s ease;
72
+ }
73
+
74
+ .image-preview {
75
+ width: 100%;
76
+ height: auto;
77
+ background: #f8f9fa;
78
+ border-radius: 8px;
79
+ margin-bottom: 1rem;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ overflow: hidden;
84
+ position: relative;
85
+ border: 2px dashed #e9ecef;
86
+ transition: all 0.3s ease;
87
+ }
88
+
89
+ .image-preview:hover {
90
+ border-color: #4a90e2;
91
+ }
92
+
93
+ .image-preview img {
94
+ max-width: 100%;
95
+ max-height: 100%;
96
+ object-fit: contain;
97
+ border-radius: 8px;
98
+ }
99
+
100
+ .image-preview span {
101
+ color: #6c757d;
102
+ font-size: 1.1rem;
103
+ }
104
+
105
+ .prompt-input:disabled {
106
+ background: #e9ecef;
107
+ cursor: not-allowed;
108
+ }
109
+
110
+ paper-button {
111
+ background: var(--primary);
112
+ color: var(--primary-text);
113
+ width: 100%;
114
+ position: relative;
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ gap: 8px;
119
+ margin-bottom: 1rem;
120
+ }
121
+
122
+ paper-button:disabled {
123
+ opacity: 0.7;
124
+ cursor: not-allowed;
125
+ }
126
+
127
+ .insert-button {
128
+ background: #000000;
129
+ color: white;
130
+ width: 100%;
131
+ margin-top: 0.5rem;
132
+ }
133
+
134
+ .insert-button:hover {
135
+ background: #252725;
136
+ }
137
+
138
+ .spinner {
139
+ width: 20px;
140
+ height: 20px;
141
+ border: 2px solid #ffffff;
142
+ border-top: 2px solid transparent;
143
+ border-radius: 50%;
144
+ animation: spin 1s linear infinite;
145
+ }
146
+
147
+ @keyframes spin {
148
+ 0% {
149
+ transform: rotate(0deg);
150
+ }
151
+ 100% {
152
+ transform: rotate(360deg);
153
+ }
154
+ }
155
+
156
+ .loading {
157
+ display: none;
158
+ margin-top: 1rem;
159
+ text-align: center;
160
+ color: #495057;
161
+ }
162
+
163
+ .loading.active {
164
+ display: block;
165
+ }
166
+
167
+ .loading-text {
168
+ font-size: 1.1rem;
169
+ margin-bottom: 0.5rem;
170
+ color: #495057;
171
+ }
172
+ `,r=o))||r},15155(t,e,a){a.d(e,{A:()=>s});var r=a(59929),o=a(57176);class i extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const a=e.shadowRoot?.querySelector("color-playground");if(a)if(await a.updateComplete,"function"==typeof a.openColorpicker)a.openColorpicker();else{(a.shadowRoot?.querySelector('[role="button"]')||a.shadowRoot?.querySelector("div")||a).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
173
+ <div class="${t}">
174
+ ${(this.items||[]).map((t,e)=>r.qy`
175
+ <div class="swatch-item" @click=${()=>this.openPicker(e)}>
176
+ <div
177
+ class="swatch-circle"
178
+ style="background: ${t.value||"#fff"}"
179
+ ></div>
180
+ <span class="swatch-label">
181
+ <lang-text text="${t.title}"></lang-text>
182
+ </span>
183
+ <div class="hidden-picker">
184
+ <cdtr-colorpicker-editor
185
+ id="picker-${e}"
186
+ .hasAlpha=${!1}
187
+ .allowGradient=${!0===t.allowGradient}
188
+ @change=${t.onChange}
189
+ .value=${t.value}
190
+ text="${t.title}"
191
+ ></cdtr-colorpicker-editor>
192
+ </div>
193
+ </div>
194
+ `)}
195
+ </div>
196
+ `}}i.styles=[o.L,r.AH`
197
+ :host {
198
+ display: block;
199
+ direction: var(--direction-locale, ltr);
200
+ }
201
+ .grid {
202
+ display: grid;
203
+ grid-template-columns: 1fr 1fr;
204
+ gap: 6px;
205
+ }
206
+ .grid.single-col {
207
+ grid-template-columns: 1fr;
208
+ }
209
+ .swatch-item {
210
+ display: flex;
211
+ align-items: center;
212
+ gap: 8px;
213
+ padding: 8px 10px;
214
+ background: #f6f6f8;
215
+ border-radius: 8px;
216
+ cursor: pointer;
217
+ transition: background 0.15s ease;
218
+ min-width: 0;
219
+ overflow: hidden;
220
+ position: relative;
221
+ }
222
+ .swatch-item:hover {
223
+ background: #eeeff1;
224
+ }
225
+ .swatch-label {
226
+ font-size: 11px;
227
+ color: #555;
228
+ font-weight: 500;
229
+ line-height: 1;
230
+ white-space: nowrap;
231
+ overflow: hidden;
232
+ text-overflow: ellipsis;
233
+ min-width: 0;
234
+ flex: 1;
235
+ }
236
+ .hidden-picker {
237
+ position: absolute;
238
+ width: 1px;
239
+ height: 1px;
240
+ overflow: hidden;
241
+ clip: rect(0,0,0,0);
242
+ pointer-events: none;
243
+ }
244
+ `],i.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",i);const s=t=>r.qy`
245
+ <cdtr-color-swatch-group
246
+ .items=${t.items}
247
+ .columns=${t.columns||2}
248
+ ></cdtr-color-swatch-group>
249
+ `},12258(t,e,a){a.d(e,{A:()=>s});var r=a(59929),o=a(40648);class i extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,o.Q)(this.persistKey,this.open)}render(){return r.qy`
250
+ <div class="section">
251
+ <div class="header" @click=${this.toggle}>
252
+ <span class="title"><lang-text text="${this.label}"></lang-text></span>
253
+ <svg class="chevron ${this.open?"open":""}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
254
+ <polyline points="6 9 12 15 18 9"></polyline>
255
+ </svg>
256
+ </div>
257
+ <div class="content ${this.open?"open":""}">
258
+ <div class="content-inner">
259
+ <slot></slot>
260
+ </div>
261
+ </div>
262
+ </div>
263
+ `}}i.styles=r.AH`
264
+ :host {
265
+ display: block;
266
+ direction: var(--direction-locale, ltr);
267
+ --editor-container-inline-padding: 0;
268
+ }
269
+ .section {
270
+ position: relative;
271
+ }
272
+ /* Inset to the content gutter, not full-bleed: an edge-to-edge rule reads
273
+ as a table border. */
274
+ .section::after {
275
+ content: "";
276
+ display: block;
277
+ height: 1px;
278
+ margin: 0 var(--space-4, 16px);
279
+ background: var(--color-border-subtle, rgba(0, 0, 0, 0.06));
280
+ }
281
+ :host(:last-of-type) .section::after {
282
+ display: none;
283
+ }
284
+ .header {
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: space-between;
288
+ padding: var(--space-3) var(--space-4);
289
+ cursor: pointer;
290
+ user-select: none;
291
+ /* Keeps the group name visible while its controls scroll past. */
292
+ position: sticky;
293
+ top: 0;
294
+ z-index: 1;
295
+ background: var(--color-bg, #fff);
296
+ }
297
+ .header:hover {
298
+ background: var(--color-bg-subtle, #fafbfc);
299
+ }
300
+ .title {
301
+ /* Larger and lighter than the labels inside it, not bolder — the labels
302
+ are what you act on. */
303
+ font-size: var(--text-md);
304
+ font-weight: 500;
305
+ color: var(--color-text);
306
+ letter-spacing: 0;
307
+ }
308
+ .chevron {
309
+ width: 14px;
310
+ height: 14px;
311
+ transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
312
+ color: var(--color-text-faint);
313
+ }
314
+ .header:hover .chevron {
315
+ color: var(--color-text-muted);
316
+ }
317
+ .chevron.open {
318
+ transform: rotate(180deg);
319
+ }
320
+ .content {
321
+ overflow: hidden;
322
+ transition: max-height var(--duration-normal) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
323
+ max-height: 0;
324
+ opacity: 0;
325
+ }
326
+ .content.open {
327
+ max-height: 1200px;
328
+ opacity: 1;
329
+ }
330
+ .content-inner {
331
+ /* Light on top: the controls inside bring their own leading pad. */
332
+ padding: var(--space-1) var(--space-4) var(--space-3) var(--space-4);
333
+ }
334
+ `,i.properties={label:{type:String,reflect:!0,attribute:"data-label"},open:{type:Boolean,reflect:!0},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const s=(t,e)=>r.qy`
335
+ <cdtr-editor-section
336
+ .label=${t.label}
337
+ .open=${!1!==t.open}
338
+ .persistKey=${t.persistKey||""}
339
+ >
340
+ ${e}
341
+ </cdtr-editor-section>
342
+ `},88547(t,e,a){a.r(e),a.d(e,{EditorBuilder:()=>lt});var r=a(59929),o=a(86319),i=a(32325),s=a(50220),n=a(15604);a(92384);const l=t=>r.qy`<cdtr-font-family-editor
343
+ .name=${t.value}
344
+ .showWeight=${!0===t.weight}
345
+ .weight=${t.weightValue}
346
+ @change=${t.onChange}
347
+ @weightchange=${t.onWeightChange}
348
+ ></cdtr-font-family-editor>`,c=t=>r.qy`<cdtr-editor-container>
349
+ <cdtr-range-device-editor
350
+ .value=${"function"==typeof t.value?t.value(t):t.value||0}
351
+ .text=${t.title}
352
+ .max=${t.max||100}
353
+ .min=${t.min||0}
354
+ .step=${t.step}
355
+ @device=${t.device}
356
+ @change=${t.onChange}
357
+ @input=${t.onInput}
358
+ ></cdtr-range-device-editor>
359
+ </cdtr-editor-container>`,d=t=>r.qy`<cdtr-editor-container>
360
+ <cdtr-colorpicker-editor
361
+ .hasAlpha=${t.alpha}
362
+ .allowGradient=${!0===t.allowGradient}
363
+ @change=${t.onChange}
364
+ .value=${t.value}
365
+ text="${t.title}"
366
+ ></cdtr-colorpicker-editor>
367
+ </cdtr-editor-container>`,p=t=>r.qy` <cdtr-editor-container>
368
+ <cdtr-width-editor
369
+ text="${t.title}"
370
+ unit="${t.unit}"
371
+ .step=${t.step||1}
372
+ max="${t.max||100}"
373
+ min="${t.min||0}"
374
+ .value=${t.value||0}
375
+ @input=${t.onInput}
376
+ @change=${t.onChange}
377
+ .sizes=${t.sizes||[]}
378
+ ></cdtr-width-editor>
379
+ </cdtr-editor-container>`;var h=a(25879);const g=/#[0-9a-fA-F]{3,8}|rgba?\([^)]*\)/,m=t=>{if("string"!=typeof t||!t.trim()||"none"===t)return{x:0,y:0,blur:0,spread:0,color:"#000000",inset:!1};const e=/\binset\b/.test(t),a=t.match(g),r=a?a[0]:"#000000",o=(t.replace(g,"").match(/-?\d+(?:\.\d+)?/g)||[]).map(Number);return{x:o[0]??0,y:o[1]??0,blur:o[2]??0,spread:o[3]??0,color:r,inset:e}};class u extends r.WF{constructor(){super(),this.value="",this.title="",this._parts=m(""),this._lastEmitted=null}createRenderRoot(){return this}willUpdate(t){t.has("value")&&this.value!==this._lastEmitted&&(this._parts=m(this.value))}_emit(t){this._parts={...this._parts,...t},this.value=(t=>{let{x:e,y:a,blur:r,spread:o,color:i,inset:s}=t;return`${s?"inset ":""}${e}px ${a}px ${r}px ${o}px ${i}`})(this._parts),this._lastEmitted=this.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value}}))}render(){const t=this._parts,e=t=>e=>{e.stopPropagation(),this._emit(t(e))};return r.qy`
380
+ <div @input=${t=>t.stopPropagation()}>
381
+ ${this.title?(0,h.A)({level:6,text:this.title}):""}
382
+ ${d({title:"shadow_color",value:t.color,alpha:!0,onChange:e(t=>({color:t.target.value}))})}
383
+ ${p({title:"shadow_offset_x",unit:"px",min:-50,max:50,value:t.x,onChange:e(t=>({x:parseInt(t.target.value)||0}))})}
384
+ ${p({title:"shadow_offset_y",unit:"px",min:-50,max:50,value:t.y,onChange:e(t=>({y:parseInt(t.target.value)||0}))})}
385
+ ${p({title:"shadow_blur",unit:"px",min:0,max:100,value:t.blur,onChange:e(t=>({blur:parseInt(t.target.value)||0}))})}
386
+ ${p({title:"shadow_spread",unit:"px",min:-50,max:50,value:t.spread,onChange:e(t=>({spread:parseInt(t.target.value)||0}))})}
387
+ </div>
388
+ `}}u.properties={value:{type:String},title:{type:String}},customElements.get("cdtr-box-shadow-editor-compose")||customElements.define("cdtr-box-shadow-editor-compose",u);const v=t=>r.qy`<cdtr-box-shadow-editor-compose
389
+ .value=${t.value||""}
390
+ .title=${t.title||""}
391
+ @change=${e=>{"function"==typeof t.onChange&&t.onChange(e.target.value)}}
392
+ ></cdtr-box-shadow-editor-compose>`,b=t=>r.qy`<cdtr-divider></cdtr-divider>`,f=t=>r.qy` <cdtr-editor-container pt="0">
393
+ <paper-button
394
+ @click=${t.onClick}
395
+ style="margin:0;padding:0;color:${t.color||"var(--color-primary, #6366f1)"};font-size:10px;"
396
+ >
397
+ <cdtr-icon
398
+ color="${t.color||"var(--color-primary, #6366f1)"}"
399
+ width="15"
400
+ icon="${t.icon||"doubleArrow"}"
401
+ ></cdtr-icon>
402
+ <lang-text whiteSpace="break-spaces" text="${t.text}"></lang-text>
403
+ </paper-button>
404
+ </cdtr-editor-container>`,y=t=>r.qy` <cdtr-editor-container>
405
+ <div
406
+ class="checkbox-wrapper"
407
+ style="display:flex;align-items:center;gap:8px;"
408
+ @click=${t=>{if(t.target.closest("cdtr-checkbox"))return;const e=t.currentTarget.querySelector("cdtr-checkbox");e&&e.toggle()}}
409
+ >
410
+ <cdtr-checkbox
411
+ style="flex:0 0 auto;"
412
+ .controlled=${t.controlled}
413
+ @change=${t.onChange}
414
+ .checked=${!!t.checked}
415
+ ></cdtr-checkbox>
416
+ <cdtr-title pb="0" style="flex:1 1 auto;min-width:0;cursor:pointer;"
417
+ ><lang-text text="${t.title}"></lang-text
418
+ ></cdtr-title>
419
+ ${t.info?r.qy`<cdtr-tooltip style="flex:0 0 auto;" content="${t.info}">
420
+ <cdtr-icon color="#484553" icon="info" width="18"></cdtr-icon>
421
+ </cdtr-tooltip>`:null}
422
+ </div>
423
+ </cdtr-editor-container>`,x=t=>r.qy` <cdtr-editor-container>
424
+ <cdtr-title><lang-text text="${t.title}"></lang-text></cdtr-title>
425
+ ${t.items?.length?t?.items.map((e,a)=>r.qy`
426
+ <div style="display:flex;align-items:center;gap:6px;margin-top:8px;">
427
+ <cdtr-input
428
+ type=${t.inputType}
429
+ placeholder=${t.placeholder}
430
+ .value="${"string"==typeof e?e:"string"==typeof e?.label?e.label:e.value}"
431
+ @blur=${e=>{t.changeItemValue(a,e.target.value,e)}}
432
+ style="flex:1;width:0;"
433
+ ></cdtr-input>
434
+ ${t.onRemove?r.qy`<span
435
+ style="color:#bbb;cursor:pointer;display:flex;align-items:center;flex-shrink:0;"
436
+ @click=${()=>t.onRemove(a,e)}
437
+ @mouseover=${t=>{t.currentTarget.style.color="#666"}}
438
+ @mouseout=${t=>{t.currentTarget.style.color="#bbb"}}
439
+ title="Remove"
440
+ >
441
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
442
+ <line x1="18" y1="6" x2="6" y2="18"></line>
443
+ <line x1="6" y1="6" x2="18" y2="18"></line>
444
+ </svg>
445
+ </span>`:null}
446
+ </div>
447
+ `):""}
448
+ ${t.onAddItem?r.qy`<div
449
+ @click=${t.onAddItem}
450
+ style="display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-size:12px;color:var(--accent, #5B5FC7);cursor:pointer;font-family:inherit;"
451
+ ><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
452
+ <line x1="12" y1="5" x2="12" y2="19"></line>
453
+ <line x1="5" y1="12" x2="19" y2="12"></line>
454
+ </svg><lang-text text="add_item"></lang-text
455
+ ></div>`:null}
456
+
457
+ </cdtr-editor-container>`;a(54061);var w=a(73890);const $=t=>r.qy` <cdtr-editor-container>
458
+ <cdtr-title>
459
+ <lang-text text="${t.title}"></lang-text>
460
+ </cdtr-title>
461
+ <cdtr-chips-input
462
+ .removeable=${!!t.removeable}
463
+ @remove=${t.onRemove}
464
+ @click=${()=>function(t){let{items:e,title:a,onChange:o,onCreate:i}=t;const s=document.createElement("cdtr-drawer");s.width="500px",s.headerText=a,s.opened=!0;const n=document.createElement("div");s.appendChild(n),document.body.appendChild(s);const l=t=>{let{target:a}=t;const s=a.value,c=e.filter(t=>{const e={...t};return e.name||(e.name=""),e.label||(e.label=""),-1!==e.name.indexOf(s)||-1!==e.label.indexOf(s)});(0,r.XX)((0,w.A)({items:c,onChange:o,debounce:l,onCreate:i}),n)};(0,r.XX)((0,w.A)({items:e,onChange:o,debounce:l,onCreate:i}),n)}({items:t.list||[],title:t.title,onChange:t.onChange,onCreate:t.onCreate})}
465
+ .items=${t.items}
466
+ .freeSolo=${!!t.freeSolo}
467
+ >
468
+ </cdtr-chips-input>
469
+ </cdtr-editor-container>`;var z=a(88385),_=a(75068),k=a.n(_),L=a(70980);const C={minWidth:0,margin:0},M=t=>r.qy`
470
+ <cdtr-row alignItems="center" spacing="10px">
471
+ <paper-button
472
+ class="${t.underline?"bold":""}"
473
+ style=${(0,L.W)(C)}
474
+ @click=${e=>t.onChange("bold",e)}
475
+ ><cdtr-icon
476
+ color="${t.bold?"var(--color-primary, #6366f1)":""}"
477
+ width="20"
478
+ icon="bold"
479
+ ></cdtr-icon>
480
+ </paper-button>
481
+ <paper-button
482
+ style=${(0,L.W)(C)}
483
+ @click=${e=>t.onChange("underline",e)}
484
+ ><cdtr-icon
485
+ color="${t.underline?"var(--color-primary, #6366f1)":""}"
486
+ width="20"
487
+ icon="underline"
488
+ ></cdtr-icon>
489
+ </paper-button>
490
+ <paper-button
491
+ style=${(0,L.W)(C)}
492
+ @click=${e=>t.onChange("italic",e)}
493
+ ><cdtr-icon
494
+ color="${t.italic?"var(--color-primary, #6366f1)":""}"
495
+ width="20"
496
+ icon="italic"
497
+ ></cdtr-icon>
498
+ </paper-button>
499
+ </cdtr-row>
500
+ `,I=t=>r.qy` <cdtr-editor-container pt="16px">
501
+ <p style="font-size:12px;color:#888;line-height:1.5;margin:0;font-style:italic;">
502
+ <lang-text whiteSpace="break-spaces" text="${t.text}"></lang-text>
503
+ </p>
504
+ </cdtr-editor-container>`,H=()=>[{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z"></path></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26zm0-2.292l4.247 2.377-.949-4.773 3.573-3.305-4.833-.573L12 5.275l-2.038 4.42-4.833.572 3.573 3.305-.949 4.773L12 15.968z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 15.968l4.247 2.377-.949-4.773 3.573-3.305-4.833-.573L12 5.275v10.693zm0 2.292l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 .5l4.226 6.183 7.187 2.109-4.575 5.93.215 7.486L12 19.69l-7.053 2.518.215-7.486-4.575-5.93 7.187-2.109L12 .5zm0 3.544L9.022 8.402 3.957 9.887l3.225 4.178-.153 5.275L12 17.566l4.97 1.774-.152-5.275 3.224-4.178-5.064-1.485L12 4.044zM10 12a2 2 0 1 0 4 0h2a4 4 0 1 1-8 0h2z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 .5l4.226 6.183 7.187 2.109-4.575 5.93.215 7.486L12 19.69l-7.053 2.518.215-7.486-4.575-5.93 7.187-2.109L12 .5zM10 12H8a4 4 0 0 0 7.995.2L16 12h-2a2 2 0 0 1-3.995.15L10 12z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05 5 4.604zM3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976zM12 13.5l-2.939 1.545.561-3.272-2.377-2.318 3.286-.478L12 6l1.47 2.977 3.285.478-2.377 2.318.56 3.272L12 13.5z"/></svg>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M2 19h20v2H2v-2zM2 5l5 3.5L12 2l5 6.5L22 5v12H2V5zm2 3.841V15h16V8.841l-3.42 2.394L12 5.28l-4.58 5.955L4 8.84z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0-2a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm6.5-.25a1.25 1.25 0 0 1-2.5 0 1.25 1.25 0 0 1 2.5 0zM12 4c-2.474 0-2.878.007-4.029.058-.784.037-1.31.142-1.798.332-.434.168-.747.369-1.08.703a2.89 2.89 0 0 0-.704 1.08c-.19.49-.295 1.015-.331 1.798C4.006 9.075 4 9.461 4 12c0 2.474.007 2.878.058 4.029.037.783.142 1.31.331 1.797.17.435.37.748.702 1.08.337.336.65.537 1.08.703.494.191 1.02.297 1.8.333C9.075 19.994 9.461 20 12 20c2.474 0 2.878-.007 4.029-.058.782-.037 1.309-.142 1.797-.331.433-.169.748-.37 1.08-.702.337-.337.538-.65.704-1.08.19-.493.296-1.02.332-1.8.052-1.104.058-1.49.058-4.029 0-2.474-.007-2.878-.058-4.029-.037-.782-.142-1.31-.332-1.798a2.911 2.911 0 0 0-.703-1.08 2.884 2.884 0 0 0-1.08-.704c-.49-.19-1.016-.295-1.798-.331C14.925 4.006 14.539 4 12 4zm0-2c2.717 0 3.056.01 4.122.06 1.065.05 1.79.217 2.428.465.66.254 1.216.598 1.772 1.153a4.908 4.908 0 0 1 1.153 1.772c.247.637.415 1.363.465 2.428.047 1.066.06 1.405.06 4.122 0 2.717-.01 3.056-.06 4.122-.05 1.065-.218 1.79-.465 2.428a4.883 4.883 0 0 1-1.153 1.772 4.915 4.915 0 0 1-1.772 1.153c-.637.247-1.363.415-2.428.465-1.066.047-1.405.06-4.122.06-2.717 0-3.056-.01-4.122-.06-1.065-.05-1.79-.218-2.428-.465a4.89 4.89 0 0 1-1.772-1.153 4.904 4.904 0 0 1-1.153-1.772c-.248-.637-.415-1.363-.465-2.428C2.013 15.056 2 14.717 2 12c0-2.717.01-3.056.06-4.122.05-1.066.217-1.79.465-2.428a4.88 4.88 0 0 1 1.153-1.772A4.897 4.897 0 0 1 5.45 2.525c.638-.248 1.362-.415 2.428-.465C8.944 2.013 9.283 2 12 2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7.253 18.494l.724.423A7.953 7.953 0 0 0 12 20a8 8 0 1 0-8-8c0 1.436.377 2.813 1.084 4.024l.422.724-.653 2.401 2.4-.655zM2.004 22l1.352-4.968A9.954 9.954 0 0 1 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10a9.954 9.954 0 0 1-5.03-1.355L2.004 22zM8.391 7.308c.134-.01.269-.01.403-.004.054.004.108.01.162.016.159.018.334.115.393.249.298.676.588 1.357.868 2.04.062.152.025.347-.093.537a4.38 4.38 0 0 1-.263.372c-.113.145-.356.411-.356.411s-.099.118-.061.265c.014.056.06.137.102.205l.059.095c.256.427.6.86 1.02 1.268.12.116.237.235.363.346.468.413.998.75 1.57 1l.005.002c.085.037.128.057.252.11.062.026.126.049.191.066a.35.35 0 0 0 .367-.13c.724-.877.79-.934.796-.934v.002a.482.482 0 0 1 .378-.127c.06.004.121.015.177.04.531.243 1.4.622 1.4.622l.582.261c.098.047.187.158.19.265.004.067.01.175-.013.373-.032.259-.11.57-.188.733a1.155 1.155 0 0 1-.21.302 2.378 2.378 0 0 1-.33.288 3.71 3.71 0 0 1-.125.09 5.024 5.024 0 0 1-.383.22 1.99 1.99 0 0 1-.833.23c-.185.01-.37.024-.556.014-.008 0-.568-.087-.568-.087a9.448 9.448 0 0 1-3.84-2.046c-.226-.199-.435-.413-.649-.626-.89-.885-1.562-1.84-1.97-2.742A3.47 3.47 0 0 1 6.9 9.62a2.729 2.729 0 0 1 .564-1.68c.073-.094.142-.192.261-.305.127-.12.207-.184.294-.228a.961.961 0 0 1 .371-.1z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7.764 19.225c.59-.26 1.25-.309 1.868-.139.77.21 1.565.316 2.368.314 4.585 0 8-3.287 8-7.7S16.585 4 12 4s-8 3.287-8 7.7c0 2.27.896 4.272 2.466 5.676a2.8 2.8 0 0 1 .942 2.006l.356-.157zM12 2c5.634 0 10 4.127 10 9.7 0 5.573-4.366 9.7-10 9.7a10.894 10.894 0 0 1-2.895-.384.8.8 0 0 0-.534.039l-1.984.876a.8.8 0 0 1-1.123-.707l-.055-1.78a.797.797 0 0 0-.268-.57C3.195 17.135 2 14.617 2 11.7 2 6.127 6.367 2 12 2zM5.995 14.537l2.937-4.66a1.5 1.5 0 0 1 2.17-.4l2.336 1.75a.6.6 0 0 0 .723 0l3.155-2.396c.421-.319.971.185.689.633l-2.937 4.66a1.5 1.5 0 0 1-2.17.4l-2.336-1.75a.6.6 0 0 0-.723 0l-3.155 2.395c-.421.319-.971-.185-.689-.633z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14 19h5V5H5v14h7v-5h-2v-2h2v-1.654c0-1.337.14-1.822.4-2.311A2.726 2.726 0 0 1 13.536 6.9c.382-.205.857-.328 1.687-.381.329-.021.755.005 1.278.08v1.9H16c-.917 0-1.296.043-1.522.164a.727.727 0 0 0-.314.314c-.12.226-.164.45-.164 1.368V12h2.5l-.5 2h-2v5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/>'},{svg:'<path fill="none" d="M0 0H24V24H0z"/><path d="M5 3v16h16v2H3V3h2zm14.94 2.94l2.12 2.12L16 14.122l-3-3-3.94 3.94-2.12-2.122L13 6.88l3 3 3.94-3.94z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9.366 10.682a10.556 10.556 0 0 0 3.952 3.952l.884-1.238a1 1 0 0 1 1.294-.296 11.422 11.422 0 0 0 4.583 1.364 1 1 0 0 1 .921.997v4.462a1 1 0 0 1-.898.995c-.53.055-1.064.082-1.602.082C9.94 21 3 14.06 3 5.5c0-.538.027-1.072.082-1.602A1 1 0 0 1 4.077 3h4.462a1 1 0 0 1 .997.921A11.422 11.422 0 0 0 10.9 8.504a1 1 0 0 1-.296 1.294l-1.238.884zm-2.522-.657l1.9-1.357A13.41 13.41 0 0 1 7.647 5H5.01c-.006.166-.009.333-.009.5C5 12.956 11.044 19 18.5 19c.167 0 .334-.003.5-.01v-2.637a13.41 13.41 0 0 1-3.668-1.097l-1.357 1.9a12.442 12.442 0 0 1-1.588-.75l-.058-.033a12.556 12.556 0 0 1-4.702-4.702l-.033-.058a12.442 12.442 0 0 1-.75-1.588z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M2 13h6v8H2v-8zm14-5h6v13h-6V8zM9 3h6v18H9V3zM4 15v4h2v-4H4zm7-10v14h2V5h-2zm7 5v9h2v-9h-2z"/>'},{svg:'<path fill="none" d="M0 0H24V24H0z"/><path d="M5.5 20c.828 0 1.5.672 1.5 1.5S6.328 23 5.5 23 4 22.328 4 21.5 4.672 20 5.5 20zm13 0c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zM2.172 1.757l3.827 3.828V17L20 17v2H5c-.552 0-1-.448-1-1V6.413L.756 3.172l1.415-1.415zM16 3c.552 0 1 .448 1 1v2h2.993C20.55 6 21 6.456 21 6.995v8.01c0 .55-.45.995-1.007.995H8.007C7.45 16 7 15.544 7 15.005v-8.01C7 6.445 7.45 6 8.007 6h2.992L11 4c0-.552.448-1 1-1h4zm-6 5H9v6h1V8zm6 0h-4v6h4V8zm3 0h-1v6h1V8zm-4-3h-2v1h2V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 13.5V21a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H5v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-7.5l-1.243-.31A1 1 0 0 1 0 12.22v-.72a.5.5 0 0 1 .5-.5h1.875l2.138-5.702A2 2 0 0 1 6.386 4h11.228a2 2 0 0 1 1.873 1.298L21.625 11H23.5a.5.5 0 0 1 .5.5v.72a1 1 0 0 1-.757.97L22 13.5zM4 15v2a1 1 0 0 0 1 1h3.245a.5.5 0 0 0 .44-.736C7.88 15.754 6.318 15 4 15zm16 0c-2.317 0-3.879.755-4.686 2.264a.5.5 0 0 0 .441.736H19a1 1 0 0 0 1-1v-2zM6 6l-1.561 4.684A1 1 0 0 0 5.387 12h13.226a1 1 0 0 0 .948-1.316L18 6H6z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5 3h15a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-2v3a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V4a1 1 0 0 1 1-1zm13 2v3h2V5h-2zM2 19h18v2H2v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.5 2a3.5 3.5 0 0 1 3.163 5.001L21 7a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-1v8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-8H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1l3.337.001a3.5 3.5 0 0 1 5.664-3.95A3.48 3.48 0 0 1 14.5 2zM18 13H6v7h12v-7zm2-4H4v2h16V9zM9.5 4a1.5 1.5 0 0 0-.144 2.993L9.5 7H11V5.5a1.5 1.5 0 0 0-1.356-1.493L9.5 4zm5 0l-.144.007a1.5 1.5 0 0 0-1.35 1.349L13 5.5V7h1.5l.144-.007a1.5 1.5 0 0 0 0-2.986L14.5 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M4 5v14h16V5H4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm11.793 6.793L13 8h5v5l-1.793-1.793-3.864 3.864-2.121-2.121-2.829 2.828-1.414-1.414 4.243-4.243 2.121 2.122 2.45-2.45z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5 9a1 1 0 0 1 1 1 6.97 6.97 0 0 1 4.33 1.5h2.17c1.332 0 2.53.579 3.353 1.499L19 13a5 5 0 0 1 4.516 2.851C21.151 18.972 17.322 21 13 21c-2.79 0-5.15-.603-7.06-1.658A.998.998 0 0 1 5 20H2a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3zm1.001 3L6 17.021l.045.033C7.84 18.314 10.178 19 13 19c3.004 0 5.799-1.156 7.835-3.13l.133-.133-.12-.1a2.994 2.994 0 0 0-1.643-.63L19 15l-2.112-.001c.073.322.112.657.112 1.001v1H8v-2l6.79-.001-.034-.078a2.501 2.501 0 0 0-2.092-1.416L12.5 13.5H9.57A4.985 4.985 0 0 0 6.002 12zM4 11H3v7h1v-7zm9.646-7.425L14 3.93l.354-.354a2.5 2.5 0 1 1 3.535 3.536L14 11l-3.89-3.89a2.5 2.5 0 1 1 3.536-3.535zm-2.12 1.415a.5.5 0 0 0-.06.637l.058.069L14 8.17l2.476-2.474a.5.5 0 0 0 .058-.638l-.058-.07a.5.5 0 0 0-.638-.057l-.07.058-1.769 1.768-1.767-1.77-.068-.056a.5.5 0 0 0-.638.058z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M17.5 21a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-11-9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm12.571-4.485l1.414 1.414L4.93 20.485l-1.414-1.414L19.07 3.515z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M13 16.938V19h5v2H6v-2h5v-2.062A8.001 8.001 0 0 1 4 9V3h16v6a8.001 8.001 0 0 1-7 7.938zM6 5v4a6 6 0 1 0 12 0V5H6zM1 5h2v4H1V5zm20 0h2v4h-2V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M3.492 8.065L4.778 19h14.444l1.286-10.935-4.01 2.673L12 4.441l-4.498 6.297-4.01-2.673zM2.801 5.2L7 8l4.186-5.86a1 1 0 0 1 1.628 0L17 8l4.2-2.8a1 1 0 0 1 1.547.95l-1.643 13.967a1 1 0 0 1-.993.883H3.889a1 1 0 0 1-.993-.883L1.253 6.149A1 1 0 0 1 2.8 5.2zM12 15a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 2a6 6 0 0 1 6 6v1h4v2h-1.167l-.757 9.083a1 1 0 0 1-.996.917H4.92a1 1 0 0 1-.996-.917L3.166 11H2V9h4V8a6 6 0 0 1 6-6zm6.826 9H5.173l.667 8h12.319l.667-8zM13 13v4h-2v-4h2zm-4 0v4H7v-4h2zm8 0v4h-2v-4h2zm-5-9a4 4 0 0 0-3.995 3.8L8 8v1h8V8a4 4 0 0 0-3.8-3.995L12 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M4 6.414L.757 3.172l1.415-1.415L5.414 5h15.242a1 1 0 0 1 .958 1.287l-2.4 8a1 1 0 0 1-.958.713H6v2h11v2H5a1 1 0 0 1-1-1V6.414zM6 7v6h11.512l1.8-6H6zm-.5 16a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm12 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.671 4.257c3.928-3.219 9.733-2.995 13.4.672 3.905 3.905 3.905 10.237 0 14.142-3.905 3.905-10.237 3.905-14.142 0A9.993 9.993 0 0 1 2.25 9.767l.077-.313 1.934.51a8 8 0 1 0 3.053-4.45l-.221.166 1.017 1.017-4.596 1.06 1.06-4.596 1.096 1.096zM13 6v2h2.5v2H10a.5.5 0 0 0-.09.992L10 11h4a2.5 2.5 0 1 1 0 5h-1v2h-2v-2H8.5v-2H14a.5.5 0 0 0 .09-.992L14 13h-4a2.5 2.5 0 1 1 0-5h1V6h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.33 3.271a3.5 3.5 0 0 1 4.254 4.963l10.709 10.71-1.414 1.414-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 1 0 2.121-2.121L5.329 3.27zm10.367 1.884l3.182-1.768 1.414 1.414-1.768 3.182-1.768.354-2.12 2.121-1.415-1.414 2.121-2.121.354-1.768zm-6.718 8.132l1.414 1.414-5.303 5.303a1 1 0 0 1-1.492-1.327l.078-.087 5.303-5.303z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.636 12.707l1.828 1.829L8.88 13.12 7.05 11.293l1.414-1.414 1.829 1.828 1.414-1.414L9.88 8.464l1.414-1.414L13.12 8.88l1.415-1.415-1.829-1.828 2.829-2.828a1 1 0 0 1 1.414 0l4.242 4.242a1 1 0 0 1 0 1.414L8.464 21.192a1 1 0 0 1-1.414 0L2.808 16.95a1 1 0 0 1 0-1.414l2.828-2.829zm8.485 5.656l4.243-4.242L21 16.757V21h-4.242l-2.637-2.637zM5.636 9.878L2.807 7.05a1 1 0 0 1 0-1.415l2.829-2.828a1 1 0 0 1 1.414 0L9.88 5.635 5.636 9.878z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.121 10.48a1 1 0 0 0-1.414 0l-.707.706a2 2 0 1 1-2.828-2.828l5.63-5.632a6.5 6.5 0 0 1 6.377 10.568l-2.108 2.135-4.95-4.95zM3.161 4.468a6.503 6.503 0 0 1 8.009-.938L7.757 6.944a4 4 0 0 0 5.513 5.794l.144-.137 4.243 4.242-4.243 4.243a2 2 0 0 1-2.828 0L3.16 13.66a6.5 6.5 0 0 1 0-9.192z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M17 15.245v6.872a.5.5 0 0 1-.757.429L12 20l-4.243 2.546a.5.5 0 0 1-.757-.43v-6.87a8 8 0 1 1 10 0zM12 15a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm0-2a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 8.5l2.116 5.088 5.492.44-4.184 3.584 1.278 5.36L12 20.1l-4.702 2.872 1.278-5.36-4.184-3.584 5.492-.44L12 8.5zm0 5.207l-.739 1.777-1.916.153 1.46 1.251-.447 1.871L12 17.756l1.641 1.003-.446-1.87 1.459-1.252-1.915-.153L12 13.707zM8 2v9H6V2h2zm10 0v9h-2V2h2zm-5 0v5h-2V2h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 17.002a6.002 6.002 0 0 1-4.713 5.86l-.638-1.914A4.003 4.003 0 0 0 19.465 19H17a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.938a8.001 8.001 0 0 0-15.876 0H7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5C2 6.477 6.477 2 12 2s10 4.477 10 10V17.002zM20 17v-4h-3v4h3zM4 13v4h3v-4H4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 20.007a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V19h18V7.3l-8 7.2-10-9V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v16.007zM4.434 5L12 11.81 19.566 5H4.434zM0 15h8v2H0v-2zm0-5h5v2H0v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zm5.53-4.879l4.243-4.242 1.414 1.414-5.657 5.657-3.89-3.89 1.415-1.414 2.475 2.475z"/>'},{tags:[],name:"",svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 14h-2V7.238l-7.928 7.1L4 7.216V19h10v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v10zM4.511 5l7.55 6.662L19.502 5H4.511zM19 22l-3.536-3.536 1.415-1.414L19 19.172l3.536-3.536 1.414 1.414L19 22z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20 7.238l-7.928 7.1L4 7.216V19h9v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v7h-2V7.238zM19.501 5H4.511l7.55 6.662L19.502 5zM22 17h1v5h-8v-5h1v-1a3 3 0 0 1 6 0v1zm-2 0v-1a1 1 0 0 0-2 0v1h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2zm11 9H4v9h16v-9zm-4.964 1.136l1.414 1.414-4.95 4.95-3.536-3.536L9.38 12.55l2.121 2.122 3.536-3.536zM7 5H4v3h16V5h-3v1h-2V5H9v1H7V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.6 8H21a2 2 0 0 1 2 2v2.104a2 2 0 0 1-.15.762l-3.095 7.515a1 1 0 0 1-.925.619H2a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1h3.482a1 1 0 0 0 .817-.423L11.752.85a.5.5 0 0 1 .632-.159l1.814.907a2.5 2.5 0 0 1 1.305 2.853L14.6 8zM7 10.588V19h11.16L21 12.104V10h-6.4a2 2 0 0 1-1.938-2.493l.903-3.548a.5.5 0 0 0-.261-.571l-.661-.33-4.71 6.672c-.25.354-.57.644-.933.858zM5 11H3v8h2v-8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zm-6-2h5V9.157l-6-5.454-6 5.454V19h5v-6h2v6z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M21 20h2v2H1v-2h2V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v17zm-2 0V4H5v16h14zM8 11h3v2H8v-2zm0-4h3v2H8V7zm0 8h3v2H8v-2zm5 0h3v2h-3v-2zm0-4h3v2h-3v-2zm0-4h3v2h-3V7z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zM11 10h2v2h-2v-2zm-4 0h2v2H7v-2zm8 0h2v2h-2v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9.4 16H3a2 2 0 0 1-2-2v-2.104a2 2 0 0 1 .15-.762L4.246 3.62A1 1 0 0 1 5.17 3H22a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3.482a1 1 0 0 0-.817.423l-5.453 7.726a.5.5 0 0 1-.632.159L9.802 22.4a2.5 2.5 0 0 1-1.305-2.853L9.4 16zm7.6-2.588V5H5.84L3 11.896V14h6.4a2 2 0 0 1 1.938 2.493l-.903 3.548a.5.5 0 0 0 .261.571l.661.33 4.71-6.672c.25-.354.57-.644.933-.858zM19 13h2V5h-2v8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7 4v16h10V4H7zM6 2h12a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm6 15a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M15.396 10.58l.02-.249a32.392 32.392 0 0 0 .083-2.326c0-.87-.294-1.486-.914-2.063-.66-.614-1.459-.942-2.59-.942-1.137 0-1.958.335-2.51.888-.696.695-.958 1.218-.958 2.1 0 .521.061 1.994.096 2.618a2 2 0 0 1-.469 1.402c.055.098.105.204.153.317.3.771.198 1.543-.152 2.271-.392.818-.731 1.393-1.41 2.154a7.973 7.973 0 0 1-.642.643 1.999 1.999 0 0 1 .412.565 5.886 5.886 0 0 1 1.585.074c.81.146 1.324.434 2.194 1.061l.016.011.213.152c.619.44.877.546 1.473.546.609 0 .91-.121 1.523-.552l.207-.146c.876-.632 1.407-.928 2.231-1.076a6.664 6.664 0 0 1 1.559-.074 1.999 1.999 0 0 1 .417-.567 8.409 8.409 0 0 1-.616-.616 9.235 9.235 0 0 1-1.447-2.16c-.363-.749-.47-1.54-.137-2.321.04-.098.085-.19.132-.276a2 2 0 0 1-.469-1.435zm-10.315-.102c.419 0 .6.305 1.219.305.157 0 .26-.035.326-.066-.009-.156-.099-1.986-.099-2.729 0-1.688.72-2.69 1.543-3.514C8.893 3.65 10.175 3 11.996 3c1.82 0 3.066.653 3.952 1.478.886.825 1.551 1.93 1.551 3.528 0 1.555-.099 2.594-.108 2.716a.59.59 0 0 0 .279.065c.63 0 .63-.31 1.33-.31.685 0 .983.57.983.823 0 .621-.833.967-1.33 1.126-.369.117-.931.291-1.075.635-.074.174-.043.4.092.678.003.008 1.26 2.883 3.93 3.326.235.035.391.241.391.483 0 .332-.37.617-.726.782-.443.2-1.091.37-1.952.505-.043.078-.134.485-.235.887-.135.542-.801.366-.991.326A4.997 4.997 0 0 0 16.291 20c-.482.087-.913.378-1.395.726-.713.504-1.465 1.076-2.9 1.076-1.436 0-2.144-.572-2.857-1.076-.482-.348-.905-.637-1.396-.726-.898-.163-1.57.036-1.795.057-.226.02-.842.244-.996-.327-.045-.166-.191-.808-.235-.895-.856-.135-1.508-.313-1.952-.513-.365-.165-.726-.443-.726-.779 0-.235.158-.44.391-.482 2.644-.483 3.766-3.005 3.922-3.33.132-.276.161-.5.091-.679-.143-.343-.704-.513-1.073-.635-.105-.034-1.336-.373-1.336-1.117 0-.24.205-.573.582-.73a1.36 1.36 0 0 1 .465-.092z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14 10.25L17 8v6l-3-2.25V14H7V8h7v2.25zM5.763 17H20V5H4v13.385L5.763 17zm.692 2L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455z"/>'},{svg:'<path d="M17 1L1.15533 8.23675C1.08581 8.2685 1.07616 8.36335 1.13788 8.40845L5.8 11.8154M17 1V19.8031C17 19.8849 16.9071 19.9321 16.841 19.8838L9.44214 14.477M17 1L5.8 11.8154M17 1L9.44214 14.477M5.8 11.8154L9.44214 14.477M5.8 11.8154L6.57033 17.5855C6.58178 17.6712 6.68936 17.703 6.74552 17.6372L9.44214 14.477" stroke="none"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20 3v14a4 4 0 1 1-2-3.465V6H9v11a4 4 0 1 1-2-3.465V3h13z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 13.535V3h8v3h-6v11a4 4 0 1 1-2-3.465z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 4a8 8 0 0 0-8 8h3a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7C2 6.477 6.477 2 12 2s10 4.477 10 10v7a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h3a8 8 0 0 0-8-8zM4 14v5h3v-5H4zm13 0v5h3v-5h-3z"/>'}];var S=a(49549);const A=t=>r.qy` <cdtr-editor-container>
505
+ <cdtr-title><lang-text text="${t.title}"></lang-text></cdtr-title>
506
+ <cdtr-row style="padding:var(--add-padding-row)" justify="center">
507
+ ${(0,S.u)(H(),t=>t.svg,e=>{const a=(new DOMParser).parseFromString(`<svg\n width="30"\n height="30"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 24 24">${e.svg}</svg>`,"text/xml").firstChild;return r.qy`<cdtr-col sm="3">
508
+ <paper-button style="min-width:0;padding:3px" @click=${()=>t.onChange(e)}>
509
+ ${a}
510
+ </paper-button>
511
+ </cdtr-col>`})}
512
+ </cdtr-row>
513
+ </cdtr-editor-container>`,R=t=>r.qy`
514
+ <cdtr-editor-container pt="0">
515
+ <cdtr-row @click=${t=>{const e=t.currentTarget;if(e){if(t.target.closest("cdtr-gallery"))return;const a=e.querySelector("cdtr-gallery");a&&(a.opened&&(a.opened=!1),setTimeout(()=>{a.opened=!0},100))}}} style="padding:0.7rem 0px;" justify="${t.justify||"center"}" alignItems="center">
516
+ ${t.src&&t.hasPreview?r.qy`
517
+ <div style="position: relative; width: 100%; margin-bottom: 10px; border: 1px solid #eee; border-radius: 4px; overflow: hidden;">
518
+ <img
519
+ src="${t.src}"
520
+ style="${t.previewWidth?`width: ${t.previewWidth}; max-width: 100%;`:"max-width: 100%;"} height: auto; object-fit: contain; display: block; margin: 0 auto;"
521
+ onerror="this.style.display='none'"
522
+ />
523
+ ${t.isDeletable?r.qy`
524
+ <paper-button
525
+ style="position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.5); color: white; padding: 4px 8px; min-width: auto;"
526
+ @click=${e=>{e.stopPropagation(),"function"==typeof t.onDelete&&t.onDelete(e)}}
527
+ >
528
+ <lang-text text="delete"></lang-text>
529
+ </paper-button>
530
+ `:""}
531
+ </div>
532
+ `:""}
533
+ <paper-button style="margin-top:10px;width:100%;background:var(--color-primary, #6366f1);color:${t.buttonProps?.color||"var(--color-primary-text, #ffffff)"};"><lang-text text="${t.text||"gallery"}" ></lang-text>
534
+ </paper-button>
535
+ <cdtr-gallery
536
+ @close=${e=>{e.opened=!1,"function"==typeof t.close&&t.close(e)}}
537
+ .opened=${t.opened}
538
+ @file=${e=>{e.target.opened=!1,"function"==typeof t.onChange&&t.onChange(e)}}
539
+ ></cdtr-gallery>
540
+ </cdtr-row>
541
+ </cdtr-editor-container>
542
+ `,T=t=>{const e=JSON.parse(JSON.stringify(t.data)),a=e[0].items.length;if(""!==e[e.length-1].items[0].value){const t={items:[]};e.push(t);for(let r=0;r<a;r++)t.items.push({key:e[0].items[r].key,value:""})}""!==e[e.length-1].items[0].key&&e.forEach(t=>{t.items.push({key:"",value:""})});return r.qy`
543
+ <div>
544
+ <div style="width:100%;overflow-x:auto;">
545
+ <cdtr-editor-container>
546
+ <table
547
+ style="width:${t.width||"200px"};font-family: arial, sans-serif;
548
+ border-collapse: collapse;"
549
+ >
550
+ <thead>
551
+ <tr>
552
+ ${e[0].items.map((a,o)=>r.qy`<th
553
+ style=" border: 1px solid #dddddd;
554
+ padding: 8px;"
555
+ >
556
+ <cdtr-input
557
+ inputStyle="font-weight:700;border:none;"
558
+ @change=${a=>((a,r)=>{t.onChangeHeader&&(e.forEach((t,e)=>{t.items[r].key=a}),V(e),t.onChangeHeader(e,a,r))})(a.target.value,o)}
559
+ value=${a.key}
560
+ ></cdtr-input>
561
+ </th> `)}
562
+ </tr>
563
+ </thead>
564
+ <tbody>
565
+ ${e.map((a,o)=>r.qy`
566
+ <tr style="color: ${a.color}">
567
+ ${a.items.map((i,s)=>r.qy`<td
568
+ style=" border: 1px solid #dddddd;
569
+ padding: 8px;"
570
+ >
571
+ <cdtr-input
572
+ inputStyle="border:none;"
573
+ .disabled=${0!==s&&""===a.items[0].value}
574
+ @change=${a=>((a,r)=>{let{groupIndex:o,itemIndex:i}=r;t.onChangeValue&&(e[o].items[i].value=a,V(e),t.onChangeValue(e,{groupIndex:o,itemIndex:i,value:a}))})(a.target.value,{itemIndex:s,groupIndex:o})}
575
+ value=${i.value}
576
+ ></cdtr-input>
577
+ </td>`)}
578
+ </tr>
579
+ `)}
580
+ </tbody>
581
+ </table>
582
+ </cdtr-editor-container>
583
+ </div>
584
+ <cdtr-editor-container>
585
+ <h3>
586
+ <lang-text text="cols_color"></lang-text>
587
+ </h3>
588
+ </cdtr-editor-container>
589
+
590
+ ${e[0].items.map((a,o)=>r.qy`
591
+ <cdtr-editor-container>
592
+ <cdtr-row justify="space-between" alignItems="center">
593
+ <b>${a.key}</b>
594
+ ${t.editableColor&&a.key?r.qy`<color-playground
595
+ @change=${a=>((a,r)=>{t.onChangeHeader&&(e[r].color=a,V(e),t.onChangeHeader(e,a,r))})(a.target.value,o)}
596
+ value=${e[o].color}
597
+ style="height:18px"
598
+ ></color-playground>`:null}
599
+ </cdtr-row>
600
+ </cdtr-editor-container>
601
+ `)}
602
+ </div>
603
+ `};function V(t){t.forEach((t,e)=>{t.items=Array.from(t.items).filter(t=>t.key)})}const q=t=>r.qy`
604
+ <cdtr-editor-container>
605
+ <cdtr-link-element
606
+ .autofocus=${t.autofocus}
607
+ .href=${t.href||""}
608
+ .protocol=${t.protocol}
609
+ .target=${t.target}
610
+ @change=${t.onChange}
611
+ ></cdtr-link-element
612
+ ></cdtr-editor-container>`,E=[{name:"solid",value:"solid"},{name:"dashed",value:"dashed"},{name:"dotted",value:"dotted"},{name:"outset",value:"outset"},{name:"groove",value:"groove"},{name:"double",value:"double"},{name:"ridge",value:"ridge"}],B=t=>r.qy`<cdtr-editor-container>
613
+ <cdtr-row alignItems="center" jusitfyContent="space-between">
614
+ <cdtr-col>
615
+ <cdtr-title><lang-text text="type"></lang-text></cdtr-title>
616
+ <cdtr-col>
617
+ <cdtr-row>
618
+ <cdtr-dropdown @change=${t.onChange}>
619
+ <cdtr-dropdown-button
620
+ minWidth=${100}
621
+ class=" dropdown-button"
622
+ slot="trigger"
623
+ ><lang-text text="${t.borderType||t.value}"></lang-text>
624
+ </cdtr-dropdown-button>
625
+ <div slot="content">
626
+ ${E.map(e=>r.qy`<cdtr-dropdown-item
627
+ .focused=${e.value===t.borderStyle||e.value===t.value}
628
+ .selected=${e.value===t.borderStyle||e.value===t.value}
629
+ value="${e.value}"
630
+ ><lang-text text="${e.value}"></lang-text>
631
+ </cdtr-dropdown-item>`)}
632
+ </div>
633
+ </cdtr-dropdown>
634
+ </cdtr-row>
635
+ </cdtr-col>
636
+ </cdtr-col>
637
+ <cdtr-col sm="3">
638
+ <hr
639
+ style="border-top-color:${t.color};width:60%;margin:10px;margin-top:27px;border-top-width:${t.borderTopWidth}px;border-top-style:${t.borderStyle||t.value};"
640
+ />
641
+ </cdtr-col>
642
+ </cdtr-row>
643
+ </cdtr-editor-container>`,F=t=>{const e="alignItems"===t.type?[{value:"flex-start",label:"top"},{value:"center",label:"middle"},{value:"flex-end",label:"bottom"}]:[{value:"flex-end",label:"right"},{value:"center",label:"center"},{value:"flex-start",label:"left"}];"end"===t.value?t.value="flex-end":"start"===t.value&&(t.value="flex-start");const a=e.find(e=>e.value===t.value)?.label;return r.qy` <cdtr-editor-container>
644
+ <cdtr-title>
645
+ <lang-text text=${t.title||"justifyContent"}></lang-text>
646
+ </cdtr-title>
647
+ <cdtr-dropdown style="width:100%" @change=${t.onChange}>
648
+ <cdtr-dropdown-button
649
+ minWidth=${100}
650
+ class="dropdown-button"
651
+ slot="trigger"
652
+ ><lang-text text="${a||t.value}"></lang-text>
653
+ </cdtr-dropdown-button>
654
+ <div slot="content">
655
+ ${e.map(e=>r.qy`<cdtr-dropdown-item
656
+ .focused=${e.value===t.value}
657
+ .selected=${e.value===t.value}
658
+ .value="${e.value}"
659
+ ><lang-text text="${e.label}"></lang-text>
660
+ </cdtr-dropdown-item>`)}
661
+ </div>
662
+ </cdtr-dropdown>
663
+ </cdtr-editor-container>`};class P extends r.WF{constructor(){super(),this.onInput=this.onInput.bind(this),this.isLocked=!0,this.borderTopRightRadius=0,this.borderTopLeftRadius=0,this.borderBottomRightRadius=0,this.borderBottomLeftRadius=0}connectedCallback(){super.connectedCallback()}onInput(t,e){t.preventDefault();const a=t.target.value,r=a;this.isLocked?(this.borderTopRightRadius=a,this.borderTopLeftRadius=a,this.borderBottomRightRadius=a,this.borderBottomLeftRadius=a,this.json={borderTopRightRadius:r,borderTopLeftRadius:r,borderBottomRightRadius:r,borderBottomLeftRadius:r,borderRadius:null}):(this.borderTopRightRadius=parseInt(this.borderTopRightRadius||0),this.borderTopLeftRadius=parseInt(this.borderTopLeftRadius||0),this.borderBottomRightRadius=parseInt(this.borderBottomRightRadius||0),this.borderBottomLeftRadius=parseInt(this.borderBottomLeftRadius||0),this.json={borderTopRightRadius:parseInt(this.borderTopRightRadius||0),borderTopLeftRadius:parseInt(this.borderTopLeftRadius||0),borderBottomRightRadius:parseInt(this.borderBottomRightRadius||0),borderBottomLeftRadius:parseInt(this.borderBottomLeftRadius||0),borderRadius:null},this.json[e]=r),this.value=a,this.radiusKey=e;const o=new UIEvent("input",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(o)}resolveIcon(t){let e;switch(t){case"borderTopRightRadius":e="arrowTopRight";break;case"borderTopLeftRadius":e="arrowTopLeft";break;case"borderBottomRightRadius":e="arrowBottomRight";break;case"borderBottomLeftRadius":e="arrowBottomLeft"}return r.qy`<cdtr-icon
664
+ width="15"
665
+ height="15"
666
+ icon="${e}"
667
+ ></cdtr-icon>`}onChangeLock(){this.isLocked=!this.isLocked}render(){this.elementId&&this.elementId!==this.lastElementId&&(this.lastElementId=this.elementId,this.isLocked=this.borderTopRightRadius===this.borderTopLeftRadius&&this.borderBottomRightRadius===this.borderBottomLeftRadius&&this.borderTopRightRadius===this.borderBottomLeftRadius);this.onChange;const t=this.onInput;return r.qy`<cdtr-row
668
+ alignItems="center"
669
+ spacing="3px"
670
+ style="position:relative;"
671
+ >
672
+ ${["borderTopRightRadius","borderTopLeftRadius","borderBottomRightRadius","borderBottomLeftRadius"].map(e=>r.qy`<cdtr-col>
673
+ ${this.resolveIcon(e)}
674
+ <cdtr-number-input
675
+ .type=${"number"}
676
+ .max=${300}
677
+ .min=${0}
678
+ value="${parseFloat(this[e])}"
679
+ @input=${a=>t(a,e)}
680
+ style="width:100%"
681
+ ></cdtr-number-input
682
+ ></cdtr-col>`)}
683
+ <cdtr-button @click=${this.onChangeLock}>
684
+ <cdtr-icon
685
+ style="height:10px"
686
+ width="20"
687
+ height="20"
688
+ .icon="${this.isLocked?"lock":"unlock"}"
689
+ ></cdtr-icon>
690
+ </cdtr-button>
691
+ </cdtr-row>`}}P.properties={value:{type:Number},json:{type:Object},onChange:{type:Function},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},isLocked:{type:Boolean},elementId:{type:String},radiusKey:{type:String}},customElements.define("cdtr-radius-editor",P);const W=t=>r.qy` <cdtr-editor-container>
692
+ <cdtr-row>
693
+ <cdtr-title><lang-text text="${t.title}"></lang-text></cdtr-title>
694
+ </cdtr-row>
695
+ <cdtr-radius-editor
696
+ .elementId=${t.elementId}
697
+ @input=${t.onInput}
698
+ .value=${t.value}
699
+ .borderTopRightRadius=${t.borderTopRightRadius||t.value||0}
700
+ .borderTopLeftRadius=${t.borderTopLeftRadius||t.value||0}
701
+ .borderBottomRightRadius=${t.borderBottomRightRadius||t.value||0}
702
+ .borderBottomLeftRadius=${t.borderBottomLeftRadius||t.value||0}
703
+ ></cdtr-radius-editor>
704
+ </cdtr-editor-container>`,j=t=>r.qy` <cdtr-editor-container>
705
+ <cdtr-title class="dir-lang"
706
+ ><lang-text text="choose_your_duo_date"></lang-text
707
+ ></cdtr-title>
708
+ <cdtr-datetimepicker
709
+ @change=${t.onChange}
710
+ .value="${t.value}"
711
+ ></cdtr-datetimepicker>
712
+ </cdtr-editor-container>`,N=t=>{let e="";return t.bgColor&&(e+=`background:${t.bgColor};`),t.color&&(e+=`color:${t.color};`),t.fontSize&&(e+=`font-size:${t.fontSize};`),r.qy` <cdtr-editor-container>
713
+ <paper-button fullwidth style=${e} @click=${t.onClick}
714
+ ><lang-text text="${t.text}"></lang-text>${t.icon?r.qy`${" "}<cdtr-icon
715
+ style="margin-right:5px;display:block;font-size:12px;"
716
+ width="15px"
717
+ color="${t.color}"
718
+ icon=${t.icon}
719
+ ></cdtr-icon>`:null}</paper-button
720
+ >
721
+ </cdtr-editor-container>`},U=t=>r.qy` <cdtr-editor-container>
722
+ <cdtr-title><lang-text text="${t.title}"></lang-text></cdtr-title>
723
+ <cdtr-merge-tags></cdtr-merge-tags>
724
+ </cdtr-editor-container>`;a(58691);var D=a(86959);const O=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{const a=await fetch((0,D.Ay)()?"http://localhost:8000/api/v1/prompt/image":"https://agent.creaditor.ai/api/v1/prompt/image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:t,options:{size:e.size||"1024x1024",quality:e.quality||"standard",style:e.style||"vivid",context:e.context||""}})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const r=await a.json();return{status:r.status||"complete",image:r.image,metadata:{prompt:r.metadata?.prompt||t,size:r.metadata?.size||e.size||"1024x1024",quality:r.metadata?.quality||e.quality||"standard",style:r.metadata?.style||e.style||"vivid",fal_ai_result:r.metadata?.fal_ai_result||r}}}catch(t){throw console.error("Error generating image:",t),t}};var G=a(13681);class K extends r.WF{constructor(){super(),this.generatedImage=localStorage.getItem("lastGeneratedImage")||"",this.isGenerating=!1}handleInsertImage(t){const e=t.startsWith("data:")||!t.startsWith("http");G.vP.dispatch("on:upload-file",{image:t,type:e?"base64":"url"})}async handleGenerateImage(t,e){try{this.isGenerating=!0,this.requestUpdate();const a=n.Ay.getSelectedComponent(),r=a[0].closest("section"),o=r?.element,i=o?o.innerText:"",s=i.length>500?i.slice(-500):i;e.context=s;const l=await O(t,e);return this.generatedImage=l.image,localStorage.setItem("lastGeneratedImage",l.image),this.isGenerating=!1,this.requestUpdate(),l}catch(t){throw this.isGenerating=!1,this.requestUpdate(),console.error("Failed to generate image:",t),t}}render(){return r.qy` <cdtr-editor-container>
725
+ <cdtr-image-prompt-editor
726
+ @insert-image=${t=>this.handleInsertImage(t.detail.imageUrl)}
727
+ .generatedImage=${this.generatedImage}
728
+ .isLoading=${this.isGenerating}
729
+ @generate-image=${t=>this.handleGenerateImage(t.detail.prompt,t.detail.options)}
730
+ ></cdtr-image-prompt-editor>
731
+ </cdtr-editor-container>`}}K.properties={generatedImage:{type:String},isGenerating:{type:Boolean}},customElements.define("cdtr-image-prompt-builder",K);const J=JSON.parse('[{"src":"http://app.creaditor.com/assets/bullets/images/1.png","name":"Bullet 1"},{"src":"http://app.creaditor.com/assets/bullets/images/10.png","name":"Bullet 10"},{"src":"http://app.creaditor.com/assets/bullets/images/11.png","name":"Bullet 11"},{"src":"http://app.creaditor.com/assets/bullets/images/12.png","name":"Bullet 12"},{"src":"http://app.creaditor.com/assets/bullets/images/13.png","name":"Bullet 13"},{"src":"http://app.creaditor.com/assets/bullets/images/14.png","name":"Bullet 14"},{"src":"http://app.creaditor.com/assets/bullets/images/1468855650_office-65-14.png","name":"Office Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/1468857210_88.png","name":"Number 88"},{"src":"http://app.creaditor.com/assets/bullets/images/1469019930_heart.png","name":"Heart"},{"src":"http://app.creaditor.com/assets/bullets/images/1469019990_2.png","name":"Number 2"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020015_number-one.png","name":"Number One"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020019_number-two.png","name":"Number Two"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020022_number-three.png","name":"Number Three"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020025_number-four.png","name":"Number Four"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020028_number-six.png","name":"Number Six"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020031_number-five.png","name":"Number Five"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020035_number-seven.png","name":"Number Seven"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020041_number-eight.png","name":"Number Eight"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020045_number-nine.png","name":"Number Nine"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020299_free-16.png","name":"Free Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020371_pen_stroke_sketch_doodle_lineart_144.png","name":"Pen Sketch"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020375_sale.png","name":"Sale"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020407_question_mark.png","name":"Question Mark"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020420_check.png","name":"Check"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020468_pen_stroke_sketch_doodle_lineart_104.png","name":"Pen Doodle"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020485_help-questionmark.png","name":"Help Question"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020538_sign-check.png","name":"Sign Check"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020540_check.png","name":"Check Mark"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020585_ic_keyboard_arrow_right_48px.png","name":"Arrow Right"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020603_right.png","name":"Right Arrow"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020616_DoubleChevronRight.png","name":"Double Chevron Right"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020625_InterfaceExpendet-01.png","name":"Interface Expand"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020634_refresh.png","name":"Refresh"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020654_arrow_pencil_left-mediuem.png","name":"Arrow Pencil Left"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020664_Streamline-21.png","name":"Streamline"},{"src":"http://app.creaditor.com/assets/bullets/images/1469020671_Next_Arrow_Direction_Forward_Continue_Move.png","name":"Next Arrow"},{"src":"http://app.creaditor.com/assets/bullets/images/15.png","name":"Bullet 15"},{"src":"http://app.creaditor.com/assets/bullets/images/16.png","name":"Bullet 16"},{"src":"http://app.creaditor.com/assets/bullets/images/17.png","name":"Bullet 17"},{"src":"http://app.creaditor.com/assets/bullets/images/18.png","name":"Bullet 18"},{"src":"http://app.creaditor.com/assets/bullets/images/19.png","name":"Bullet 19"},{"src":"http://app.creaditor.com/assets/bullets/images/2.png","name":"Bullet 2"},{"src":"http://app.creaditor.com/assets/bullets/images/20.png","name":"Bullet 20"},{"src":"http://app.creaditor.com/assets/bullets/images/21.png","name":"Bullet 21"},{"src":"http://app.creaditor.com/assets/bullets/images/22.png","name":"Bullet 22"},{"src":"http://app.creaditor.com/assets/bullets/images/23.png","name":"Bullet 23"},{"src":"http://app.creaditor.com/assets/bullets/images/24.png","name":"Bullet 24"},{"src":"http://app.creaditor.com/assets/bullets/images/25.png","name":"Bullet 25"},{"src":"http://app.creaditor.com/assets/bullets/images/3.png","name":"Bullet 3"},{"src":"http://app.creaditor.com/assets/bullets/images/4.png","name":"Bullet 4"},{"src":"http://app.creaditor.com/assets/bullets/images/5.png","name":"Bullet 5"},{"src":"http://app.creaditor.com/assets/bullets/images/6.png","name":"Bullet 6"},{"src":"http://app.creaditor.com/assets/bullets/images/7.png","name":"Bullet 7"},{"src":"http://app.creaditor.com/assets/bullets/images/8.png","name":"Bullet 8"},{"src":"http://app.creaditor.com/assets/bullets/images/9.png","name":"Bullet 9"},{"src":"http://app.creaditor.com/assets/bullets/images/Add-48.png","name":"Add"},{"src":"http://app.creaditor.com/assets/bullets/images/addition-icon.png","name":"Addition"},{"src":"http://app.creaditor.com/assets/bullets/images/Arrow-next-3-icon.png","name":"Arrow Next 3"},{"src":"http://app.creaditor.com/assets/bullets/images/Arrow-next-5-icon.png","name":"Arrow Next 5"},{"src":"http://app.creaditor.com/assets/bullets/images/Arrow-previous-3-icon.png","name":"Arrow Previous 3"},{"src":"http://app.creaditor.com/assets/bullets/images/Arrow-prevous-5-icon.png","name":"Arrow Previous 5"},{"src":"http://app.creaditor.com/assets/bullets/images/Bulb-icon.png","name":"Bulb"},{"src":"http://app.creaditor.com/assets/bullets/images/Cart-add-icon%20(1).png","name":"Cart Add"},{"src":"http://app.creaditor.com/assets/bullets/images/cart-add-icon.png","name":"Cart Add Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/cart-icon.png","name":"Cart"},{"src":"http://app.creaditor.com/assets/bullets/images/Check-3-icon.png","name":"Check 3"},{"src":"http://app.creaditor.com/assets/bullets/images/close-icon.png","name":"Close"},{"src":"http://app.creaditor.com/assets/bullets/images/cloud-icon.png","name":"Cloud"},{"src":"http://app.creaditor.com/assets/bullets/images/contact-icon.png","name":"Contact"},{"src":"http://app.creaditor.com/assets/bullets/images/Crown-48.png","name":"Crown"},{"src":"http://app.creaditor.com/assets/bullets/images/currency-icon.png","name":"Currency"},{"src":"http://app.creaditor.com/assets/bullets/images/Dollar-48.png","name":"Dollar"},{"src":"http://app.creaditor.com/assets/bullets/images/download-icon.png","name":"Download"},{"src":"http://app.creaditor.com/assets/bullets/images/error-48.png","name":"Error"},{"src":"http://app.creaditor.com/assets/bullets/images/fastforward-icon.png","name":"Fast Forward"},{"src":"http://app.creaditor.com/assets/bullets/images/fastrewind-icon.png","name":"Fast Rewind"},{"src":"http://app.creaditor.com/assets/bullets/images/Favorites-icon.png","name":"Favorites"},{"src":"http://app.creaditor.com/assets/bullets/images/Favourite-icon.png","name":"Favourite"},{"src":"http://app.creaditor.com/assets/bullets/images/Fire-48.png","name":"Fire"},{"src":"http://app.creaditor.com/assets/bullets/images/Heart-48.png","name":"Heart"},{"src":"http://app.creaditor.com/assets/bullets/images/heart-favourite-icon.png","name":"Heart Favourite"},{"src":"http://app.creaditor.com/assets/bullets/images/heart-icon.png","name":"Heart Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/heart-plus-icon.png","name":"Heart Plus"},{"src":"http://app.creaditor.com/assets/bullets/images/Info-48.png","name":"Info"},{"src":"http://app.creaditor.com/assets/bullets/images/info-icon.png","name":"Info Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/information-icon.png","name":"Information"},{"src":"http://app.creaditor.com/assets/bullets/images/light-icon.png","name":"Light"},{"src":"http://app.creaditor.com/assets/bullets/images/like-icon.png","name":"Like"},{"src":"http://app.creaditor.com/assets/bullets/images/location-icon.png","name":"Location"},{"src":"http://app.creaditor.com/assets/bullets/images/love-48.png","name":"Love"},{"src":"http://app.creaditor.com/assets/bullets/images/new-icon.png","name":"New"},{"src":"http://app.creaditor.com/assets/bullets/images/next-icon%20(1).png","name":"Next Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/next-icon.png","name":"Next"},{"src":"http://app.creaditor.com/assets/bullets/images/phone-call-icon.png","name":"Phone Call"},{"src":"http://app.creaditor.com/assets/bullets/images/phone-icon.png","name":"Phone"},{"src":"http://app.creaditor.com/assets/bullets/images/plus-icon.png","name":"Plus"},{"src":"http://app.creaditor.com/assets/bullets/images/sale-tag-icon.png","name":"Sale Tag"},{"src":"http://app.creaditor.com/assets/bullets/images/settings-2-icon.png","name":"Settings 2"},{"src":"http://app.creaditor.com/assets/bullets/images/settings-icon.png","name":"Settings"},{"src":"http://app.creaditor.com/assets/bullets/images/shopping-icon.png","name":"Shopping"},{"src":"http://app.creaditor.com/assets/bullets/images/songs-icon.png","name":"Songs"},{"src":"http://app.creaditor.com/assets/bullets/images/sound-2-icon.png","name":"Sound 2"},{"src":"http://app.creaditor.com/assets/bullets/images/star-icon%20(1).png","name":"Star Icon"},{"src":"http://app.creaditor.com/assets/bullets/images/star-icon.png","name":"Star"},{"src":"http://app.creaditor.com/assets/bullets/images/stop-icon.png","name":"Stop"},{"src":"http://app.creaditor.com/assets/bullets/images/sun-icon.png","name":"Sun"},{"src":"http://app.creaditor.com/assets/bullets/images/tick-icon.png","name":"Tick"},{"src":"http://app.creaditor.com/assets/bullets/images/warning-icon.png","name":"Warning"},{"src":"http://app.creaditor.com/assets/bullets/images/zoom-in-icon.png","name":"Zoom In"},{"src":"http://app.creaditor.com/assets/bullets/images/zoom-seach-icon.png","name":"Zoom Search"},{"src":"http://app.creaditor.com/assets/bullets/images/zoom-search-2-icon.png","name":"Zoom Search 2"}]'),Z="https://img.creaditor.ai",X="creaditor_icons_last_search";function Q(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=e.width??24,r=e.height??24;let o=e.color??"000000";o.startsWith("#")&&(o=o.slice(1));return`${`${Z}/icons/serve/${encodeURIComponent(t.category)}/${encodeURIComponent(t.name)}.png`}?${new URLSearchParams({width:String(a),height:String(r),color:o}).toString()}`}class Y extends r.WF{constructor(){super(),this.selectedIcon="",this.searchTerm="",this.filteredImages=J,this.useIconsApi=!1,this.iconColor="000000",this.iconSize=24,this._tab="local",this._apiIcons=[],this._apiLoading=!1,this._apiSearchDebounce=null}updated(t){if(super.updated?.(t),t.has("useIconsApi")&&this.useIconsApi&&(this._tab="api"),"api"===this._tab&&0===this._apiIcons.length&&!this._apiLoading){const t=this._getLastSearch();t?(this.searchTerm=t,this._fetchApiIcons(t)):(this.searchTerm="",this._fetchCategories())}}render(){const t=this.useIconsApi,e="api"===this._tab;return r.qy`
732
+ <div class="gallery-container">
733
+ ${t?r.qy`
734
+ <div class="tabs">
735
+ <button
736
+ class="tab ${"local"===this._tab?"active":""}"
737
+ @click=${()=>this._tab="local"}
738
+ >
739
+ <lang-text text="icons_color_images"></lang-text>
740
+ </button>
741
+ <button
742
+ class="tab ${"api"===this._tab?"active":""}"
743
+ @click=${()=>this._tab="api"}
744
+ >
745
+ <lang-text text="icons_svg_icons"></lang-text>
746
+ </button>
747
+ </div>
748
+ `:""}
749
+
750
+ ${e?r.qy`
751
+ <div class="api-hint">
752
+ <lang-text text="icons_search_svg_hint"></lang-text>
753
+ </div>
754
+ `:""}
755
+
756
+ <div class="search-container">
757
+ <cdtr-input
758
+ type="search"
759
+ class="search-input"
760
+ placeholder=${o.M.get("lang",e?"icons_search_placeholder":"search")||(e?"Search icons (e.g. arrow, user, email)…":"search")}
761
+ .value=${this.searchTerm}
762
+ @input=${this._handleSearch}
763
+ ></cdtr-input>
764
+ </div>
765
+
766
+ ${e&&this._apiLoading?r.qy`<div class="loading"><lang-text text="loading"></lang-text></div>`:r.qy`
767
+ <div class="gallery-grid">
768
+ ${this._gridContent(e)}
769
+ </div>
770
+ `}
771
+ </div>
772
+ `}_gridContent(t){if(t){if(0===this._apiIcons.length){const t=this.searchTerm.trim()?"icons_no_svg_results":"icons_type_to_search";return r.qy`<div class="no-results"><lang-text text="${t}"></lang-text></div>`}const t=this.iconColor||"000000",e=this.iconSize||24;return this._apiIcons.map(a=>r.qy`
773
+ <div
774
+ class="icon-item ${this._isApiIconSelected(a,t,e)?"selected":""}"
775
+ @click=${()=>this._selectApiIcon(a)}
776
+ title="${a.name}"
777
+ >
778
+ <img
779
+ src="${Q(a,{width:e,height:e,color:t})}"
780
+ alt="${a.name}"
781
+ class="icon-image"
782
+ loading="lazy"
783
+ @error=${this._handleImageError}
784
+ />
785
+ <div class="icon-name">${a.name}</div>
786
+ </div>
787
+ `)}return 0===this.filteredImages.length?r.qy`
788
+ <div class="no-results">
789
+ <lang-text text="icons_no_local_results"></lang-text>
790
+ </div>
791
+ `:this.filteredImages.map(t=>r.qy`
792
+ <div
793
+ class="icon-item ${this.selectedIcon===t.src?"selected":""}"
794
+ @click=${()=>this._selectIcon(t)}
795
+ title="${t.name}"
796
+ >
797
+ <img
798
+ src="${t.src}"
799
+ alt="${t.name}"
800
+ class="icon-image"
801
+ loading="lazy"
802
+ @error=${this._handleImageError}
803
+ />
804
+ <div class="icon-name">${t.name}</div>
805
+ </div>
806
+ `)}_isApiIconSelected(t,e,a){const r=Q(t,{width:a,height:a,color:e});return this.selectedIcon===r}_handleSearch(t){this.searchTerm=t.target.value;const e=this.searchTerm.trim().toLowerCase();if("api"===this._tab)return this._apiSearchDebounce&&clearTimeout(this._apiSearchDebounce),e?void(this._apiSearchDebounce=setTimeout(()=>this._fetchApiIcons(e),550)):(this.searchTerm="",void this._fetchCategories());this.filteredImages=J.filter(t=>(t.name||"").toLowerCase().includes(e))}_getLastSearch(){try{return localStorage.getItem(X)||""}catch{return""}}_setLastSearch(t){try{t?localStorage.setItem(X,t):localStorage.removeItem(X)}catch{}}async _fetchCategories(){this._apiLoading=!0,this._apiIcons=[];try{const t=await fetch("https://img.creaditor.ai/icons/categories");if(!t.ok)throw new Error(t.statusText);const e=await t.json(),a=(e.categories||[]).flatMap(t=>t.icons||[]);this._apiIcons=a}catch(t){this._apiIcons=[],console.warn("Icons categories fetch failed:",t)}finally{this._apiLoading=!1}}async _fetchApiIcons(t){this._apiLoading=!0,this._apiIcons=[];const e=(t||"").trim();e&&this._setLastSearch(e);try{const t=new URLSearchParams({q:e,format:"png",limit:"50",width:String(this.iconSize||24),height:String(this.iconSize||24)}),a=(this.iconColor||"000000").replace(/^#/,"");t.set("color",a);const r=await fetch(`${Z}/icons/search?${t.toString()}`);if(!r.ok)throw new Error(r.statusText);const o=await r.json();this._apiIcons=o.icons||[]}catch(t){this._apiIcons=[],console.warn("Icons API search failed:",t)}finally{this._apiLoading=!1}}_selectApiIcon(t){const e=this.iconColor||"000000",a=this.iconSize||24,r=Q(t,{width:a,height:a,color:e});this.selectedIcon=r,this.dispatchEvent(new CustomEvent("icon-selected",{detail:{src:r,urlPng:r,urlSvg:t.urlSvg||t.src,name:t.name,category:t.category,size:{width:a,height:a},color:e},bubbles:!0,composed:!0}))}_selectIcon(t){this.selectedIcon=t.src,this.dispatchEvent(new CustomEvent("icon-selected",{detail:{src:t.src,name:t.name},bubbles:!0,composed:!0}))}_handleImageError(t){t.target.style.display="none";const e=t.target.parentElement.querySelector(".icon-name");e&&(e.textContent=o.M.get("lang","icons_error_loading")||"Error loading")}}Y.properties={selectedIcon:{type:String},useIconsApi:{type:Boolean},iconColor:{type:String},iconSize:{type:Number},searchTerm:{type:String},filteredImages:{type:Array},_tab:{type:String,state:!0},_apiIcons:{type:Array,state:!0},_apiLoading:{type:Boolean,state:!0},_apiSearchDebounce:{type:Object,state:!0}},Y.styles=r.AH`
807
+ :host {
808
+ display: block;
809
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
810
+ sans-serif;
811
+ }
812
+
813
+ .gallery-container {
814
+ max-width: 100%;
815
+ margin: 0 auto;
816
+ padding: 16px;
817
+ }
818
+
819
+ .tabs {
820
+ display: flex;
821
+ gap: 4px;
822
+ margin-bottom: 12px;
823
+ }
824
+
825
+ .tab {
826
+ padding: 8px 12px;
827
+ border: 1px solid #ddd;
828
+ border-radius: 4px;
829
+ background: #f5f5f5;
830
+ cursor: pointer;
831
+ font-size: 13px;
832
+ }
833
+
834
+ .tab:hover {
835
+ background: #eee;
836
+ }
837
+
838
+ .tab.active {
839
+ background: #007bff;
840
+ color: #fff;
841
+ border-color: #007bff;
842
+ }
843
+
844
+ .search-container {
845
+ margin-bottom: 16px;
846
+ }
847
+
848
+ .search-input {
849
+ width: 100%;
850
+ padding: 8px 12px;
851
+ border: 1px solid #ddd;
852
+ border-radius: 4px;
853
+ font-size: 14px;
854
+ box-sizing: border-box;
855
+ }
856
+
857
+ .search-input:focus {
858
+ outline: none;
859
+ border-color: var(--color-primary, #6366f1);
860
+ box-shadow: 0 0 0 3px var(--color-primary-ring, rgba(99, 102, 241, 0.15));
861
+ }
862
+
863
+ .gallery-grid {
864
+ display: grid;
865
+ grid-template-columns: repeat(2, 1fr);
866
+ gap: 12px;
867
+ max-height: 400px;
868
+ overflow-y: auto;
869
+ border: 1px solid #e0e0e0;
870
+ border-radius: 8px;
871
+ padding: 12px;
872
+ background-color: #fafafa;
873
+ }
874
+
875
+ .icon-item {
876
+ display: flex;
877
+ flex-direction: column;
878
+ align-items: center;
879
+ padding: 16px 12px;
880
+ border: 2px solid transparent;
881
+ border-radius: 6px;
882
+ cursor: pointer;
883
+ transition: all 0.2s ease;
884
+ background-color: white;
885
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
886
+ min-height: 30px;
887
+ }
888
+
889
+ .icon-item:hover {
890
+ border-color: #007bff;
891
+ transform: translateY(-2px);
892
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
893
+ }
894
+
895
+ .icon-item.selected {
896
+ border-color: #28a745;
897
+ background-color: #f8fff9;
898
+ }
899
+
900
+ .icon-image {
901
+ width: 26px;
902
+ height: 26px;
903
+ object-fit: contain;
904
+ margin-bottom: 6px;
905
+ }
906
+
907
+ .icon-name {
908
+ font-size: 11px;
909
+ text-align: center;
910
+ color: #666;
911
+ word-break: break-word;
912
+ line-height: 1.3;
913
+ max-width: 100%;
914
+ font-weight: 500;
915
+ }
916
+
917
+ .no-results {
918
+ text-align: center;
919
+ color: #666;
920
+ font-style: italic;
921
+ padding: 40px 20px;
922
+ }
923
+
924
+ .api-hint {
925
+ font-size: 12px;
926
+ color: #666;
927
+ margin-bottom: 12px;
928
+ }
929
+
930
+ .loading {
931
+ text-align: center;
932
+ padding: 24px;
933
+ color: #666;
934
+ }
935
+ `,customElements.define("icons-gallery",Y);const tt="https://img.creaditor.ai",et="creaditor_giphy_last_search";class at extends r.WF{constructor(){super(),this.selectedSrc="",this.searchTerm="",this._gifs=[],this._loading=!1,this._searchDebounce=null}connectedCallback(){super.connectedCallback();const t=this._getLastSearch();t&&t.trim()?(this.searchTerm=t,this._doSearch()):this._loadTrending()}_getLastSearch(){try{return sessionStorage.getItem(et)||""}catch{return""}}_setLastSearch(t){try{t&&t.trim()?sessionStorage.setItem(et,t.trim()):sessionStorage.removeItem(et)}catch{}}render(){return r.qy`
936
+ <div class="picker-container">
937
+ <div class="search-row">
938
+ <input
939
+ type="search"
940
+ class="search-input"
941
+ placeholder=${o.M.get("lang","giphy_search_placeholder")||"Search GIFs (e.g. happy, celebration…)"}
942
+ .value=${this.searchTerm}
943
+ @input=${this._handleSearchInput}
944
+ @keydown=${t=>"Enter"===t.key&&this._doSearch()}
945
+ />
946
+ <button class="search-btn" @click=${()=>this._doSearch()}><lang-text text="search"></lang-text></button>
947
+ <button class="random-btn" @click=${this._loadRandom} title=${o.M.get("lang","giphy_random_title")||"Random GIF"}>🎲</button>
948
+ </div>
949
+
950
+ <div class="gallery-grid">
951
+ ${this._loading?r.qy`<div class="loading"><lang-text text="loading"></lang-text></div>`:0===this._gifs.length?r.qy`<div class="no-results"><lang-text text="${this._getEmptyMessageKey()}"></lang-text></div>`:this._gifs.map(t=>this._renderGifItem(t))}
952
+ </div>
953
+ </div>
954
+ `}_getEmptyMessageKey(){return this.searchTerm.trim()?"giphy_no_results":"giphy_no_available"}_renderGifItem(t){const e=function(t){return"string"==typeof t?t:t?.images.fixed_height.url||t?.images?.fixed_height?.url?t.images.fixed_height.url:t?.images?.fixed_height_small?.webp?t.images.fixed_height_small.url:t?.images?.original?.webp?t.images.original.url:t?.images?.downsized?.webp?t.images.downsized.url:null}(t);if(!e)return null;const a=function(t){return"string"==typeof t?"GIF":t?.title||t?.slug||"GIF"}(t),o=this.selectedSrc===e;return r.qy`
955
+ <div
956
+ class="gif-item ${o?"selected":""}"
957
+ @click=${()=>this._selectGif(e,a)}
958
+ title="${a}"
959
+ >
960
+ <img src="${e}" alt="${a}" loading="lazy" />
961
+ </div>
962
+ `}_handleSearchInput(t){this.searchTerm=t.target.value,this._searchDebounce&&clearTimeout(this._searchDebounce);if(!this.searchTerm.trim())return this._loadTrending(),void this._setLastSearch("");this._searchDebounce=setTimeout(()=>this._doSearch(),400)}async _doSearch(){const t=this.searchTerm.trim();if(t){this._loading=!0,this._gifs=[];try{const e=await fetch(`${tt}/giphy/search?${new URLSearchParams({q:t,limit:20})}`);if(!e.ok)throw new Error(e.statusText);const a=await e.json();this._gifs=this._normalizeResponse(a),this._setLastSearch(t)}catch(t){console.warn("Giphy search failed:",t),this._gifs=[]}finally{this._loading=!1}}else this._loadTrending()}async _loadTrending(){this._loading=!0,this._gifs=[];try{const t=await fetch(`${tt}/giphy/trending?limit=20`);if(!t.ok)throw new Error(t.statusText);const e=await t.json();this._gifs=this._normalizeResponse(e)}catch(t){console.warn("Giphy trending failed:",t),this._gifs=[]}finally{this._loading=!1}}async _loadRandom(){this._loading=!0,this._gifs=[];try{const t=this.searchTerm.trim()||"fun",e=await fetch(`${tt}/giphy/random?${new URLSearchParams({tag:t})}`);if(!e.ok)throw new Error(e.statusText);const a=await e.json(),r=this._normalizeResponse(a);this._gifs=Array.isArray(r)?r:r?[r]:[]}catch(t){console.warn("Giphy random failed:",t),this._gifs=[]}finally{this._loading=!1}}_normalizeResponse(t){return Array.isArray(t)?t:t?.data&&Array.isArray(t.data)?t.data:t?.data&&"object"==typeof t.data?[t.data]:[]}_selectGif(t,e){this.selectedSrc=t,this.dispatchEvent(new CustomEvent("gif-selected",{detail:{src:t,alt:e},bubbles:!0,composed:!0}))}}at.properties={selectedSrc:{type:String},searchTerm:{type:String},_gifs:{type:Array,state:!0},_loading:{type:Boolean,state:!0},_searchDebounce:{type:Object,state:!0}},at.styles=r.AH`
963
+ :host {
964
+ display: block;
965
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
966
+ }
967
+
968
+ .picker-container {
969
+ max-width: 100%;
970
+ margin: 0 auto;
971
+ padding: 16px;
972
+ }
973
+
974
+ .search-row {
975
+ display: flex;
976
+ gap: 8px;
977
+ margin-bottom: 12px;
978
+ }
979
+
980
+ .search-input {
981
+ flex: 1;
982
+ padding: 8px 12px;
983
+ border: 1px solid #ddd;
984
+ border-radius: 4px;
985
+ font-size: 14px;
986
+ box-sizing: border-box;
987
+ }
988
+
989
+ .search-input:focus {
990
+ outline: none;
991
+ border-color: var(--color-primary, #6366f1);
992
+ box-shadow: 0 0 0 3px var(--color-primary-ring, rgba(99, 102, 241, 0.15));
993
+ }
994
+
995
+ .search-btn {
996
+ padding: 8px 16px;
997
+ background: var(--primary, #007bff);
998
+ color: #fff;
999
+ border: none;
1000
+ border-radius: 4px;
1001
+ cursor: pointer;
1002
+ font-size: 14px;
1003
+ }
1004
+
1005
+ .search-btn:hover {
1006
+ opacity: 0.9;
1007
+ }
1008
+
1009
+ .random-btn {
1010
+ padding: 8px 12px;
1011
+ background: #6c757d;
1012
+ color: #fff;
1013
+ border: none;
1014
+ border-radius: 4px;
1015
+ cursor: pointer;
1016
+ font-size: 13px;
1017
+ }
1018
+
1019
+ .random-btn:hover {
1020
+ background: #5a6268;
1021
+ }
1022
+
1023
+ .gallery-grid {
1024
+ display: grid;
1025
+ grid-template-columns: repeat(2, 1fr);
1026
+ gap: 8px;
1027
+ max-height: 320px;
1028
+ overflow-y: auto;
1029
+ border: 1px solid #e0e0e0;
1030
+ border-radius: 8px;
1031
+ padding: 12px;
1032
+ background-color: #fafafa;
1033
+ }
1034
+
1035
+ .gif-item {
1036
+ position: relative;
1037
+ border: 2px solid transparent;
1038
+ border-radius: 6px;
1039
+ cursor: pointer;
1040
+ overflow: hidden;
1041
+ background: #fff;
1042
+ aspect-ratio: 1;
1043
+ min-height: 120px;
1044
+ }
1045
+
1046
+ .gif-item:hover {
1047
+ border-color: var(--color-primary, #6366f1);
1048
+ }
1049
+
1050
+ .gif-item.selected {
1051
+ border-color: #28a745;
1052
+ }
1053
+
1054
+ .gif-item img {
1055
+ width: 100%;
1056
+ height: 100%;
1057
+ object-fit: cover;
1058
+ display: block;
1059
+ }
1060
+
1061
+ .no-results {
1062
+ text-align: center;
1063
+ color: #666;
1064
+ padding: 40px 20px;
1065
+ grid-column: 1 / -1;
1066
+ }
1067
+
1068
+ .loading {
1069
+ text-align: center;
1070
+ padding: 24px;
1071
+ color: #666;
1072
+ grid-column: 1 / -1;
1073
+ }
1074
+ `,customElements.define("giphy-picker",at);const rt=t=>r.qy`<cdtr-editor-container>
1075
+ <cdtr-col sm="12">
1076
+ <cdtr-title style="display:block" class="align-lang"
1077
+ ><lang-text text="${t.title||"spacing"}"></lang-text
1078
+ ></cdtr-title>
1079
+ </cdtr-col>
1080
+ <cdtr-row justify="center">
1081
+ <cdtr-spacing
1082
+ .topValue="${t.value?.top||0}"
1083
+ .bottomValue="${t.value?.bottom||0}"
1084
+ .leftValue="${t.value?.left||0}"
1085
+ .rightValue="${t.value?.right||0}"
1086
+ max=${t.max||"20"}
1087
+ @input=${t.onChange}
1088
+ isLock=${t.isLock||!0}
1089
+ .hasLeft=${t.hasLeft||!0}
1090
+ .hasRight=${t.hasRight||!0}
1091
+ .hasTop=${t.hasTop||!0}
1092
+ .hasBottom=${t.hasBottom||!0}
1093
+ ></cdtr-spacing>
1094
+ </cdtr-row>
1095
+ </cdtr-editor-container>`;var ot=a(12258),it=a(40648),st=a(15155);const nt=t=>r.qy`
1096
+ <cdtr-editor-container pt="0">
1097
+ <cdtr-row style="padding:0.7rem 0px;" justify="${t.justify||"center"}" alignItems="center">
1098
+ ${t.src&&t.hasPreview?r.qy`
1099
+ <div style="position: relative; width: 100%; margin-bottom: 10px; border: 1px solid #eee; border-radius: 4px; overflow: hidden;">
1100
+ <img
1101
+ src="${t.src}"
1102
+ style="width: 100%; height: 120px; object-fit: cover; display: block;"
1103
+ onerror="this.style.display='none'"
1104
+ />
1105
+ ${t.isDeletable?r.qy`
1106
+ <paper-button
1107
+ style="position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.5); color: white; padding: 4px 8px; min-width: auto;"
1108
+ @click=${e=>{e.stopPropagation(),"function"==typeof t.onDelete&&t.onDelete(e)}}
1109
+ >
1110
+ <lang-text text="delete"></lang-text>
1111
+ </paper-button>
1112
+ `:""}
1113
+ </div>
1114
+ `:""}
1115
+ <paper-button @click=${t=>{const e=t.currentTarget;if(e){const a=t.target.parentElement?.closest("cdtr-gallery");if(a)return;const r=e.parentElement?.querySelector("cdtr-gallery");r&&(r.opened&&(r.opened=!1),setTimeout(()=>{r.opened=!0},100))}}} style="margin-top:10px;width:100%;background:var(--color-primary, #6366f1);color:${t.buttonProps?.color||"var(--color-primary-text, #ffffff)"};"><lang-text text="${t.text||"gallery"}" ></lang-text>
1116
+ </paper-button>
1117
+ <cdtr-gallery
1118
+ @close=${e=>{e.opened=!1,"function"==typeof t.close&&t.close(e)}}
1119
+ .opened=${t.opened}
1120
+ @file=${e=>{e.target.opened=!1,"function"==typeof t.onChange&&t.onChange(e)}}
1121
+ ></cdtr-gallery>
1122
+ ${t.hasInput?r.qy`
1123
+ <cdtr-input placeholder="https://...png,jpg,jpeg,gif,svg"
1124
+ .value=${t.src}
1125
+ fullWidth
1126
+ style="margin-top:10px;"
1127
+ @input=${e=>{t.onChange({detail:{src:e.target.value}})}}
1128
+ ></cdtr-input>
1129
+ `:null}
1130
+ </cdtr-row>
1131
+ </cdtr-editor-container>
1132
+ `;a.e(4217).then(a.bind(a,94217));a(45888);Promise.resolve().then(a.bind(a,58691));class lt extends r.WF{constructor(){super(),this.editor={},this.tabName="",this.factory=this.factory.bind(this),this.execCommandWrapper=this.execCommandWrapper.bind(this),this.connectWith=this.connectWith.bind(this),this.changeTab=this.changeTab.bind(this),this.$select=this.$select.bind(this),this.$update=this.$update.bind(this),this.handleJustifyContent=this.handleJustifyContent.bind(this),this.handleAlignItems=this.handleAlignItems.bind(this)}$select(){this.editor&&this.editor.select&&this.editor.select({changeTab:this.changeTab,tab:this.tabName}),this.connectWith("select")}$update(){this.connectWith("update")}_sectionScope(){return`${this.type||""}:${this.tabName||""}`}_applyPersistedOpen(t){const e=this._sectionScope();for(const a of t)if(a&&"section"===a.type){a.persistKey=`${e}::${a.label}`;const t=(0,it.i)(a.persistKey);void 0!==t&&(a.open=t)}return t}connectedCallback(){super.connectedCallback(),n.Ay.on("update",this.$update),n.Ay.on("select",this.$select),this.connectWith("load")}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.$update),n.Ay.off("select",this.$select)}connectWith(){const t=new UIEvent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const e=n.Ay.components.find(t=>t.type===this.type);e&&"function"==typeof e.createEditor&&(this.component={...e},this.props=e.props,this.editor=e.createEditor(this.commandsBuilder()))}factory(t,e){if("function"==typeof t&&(t=t()),t.debug,"boolean"==typeof t.active&&!t.active)return null;if("function"==typeof t.active){if(!1===t.active())return null}const a=t.type;switch(a){case"background":return nt(t);case"datetime":return j(t);case"radius":return W(t);case"justifyContent":case"alignItems":return F(t,a);case"node":case"lit":case"custom":return t.node();case"button":return N(t);case"borderpicker":return B(t);case"linkpicker":return q(t);case"input":return(0,i.A)(t);case"dropdown":return(0,s.A)(t);case"fontSize":return c(t);case"fontFamily":return l(t);case"mergeTags":return U(t);case"boxShadow":return v(t);case"colorpicker":return d(t);case"slider":return p(t);case"divider":return b(t);case"heading":return(0,h.A)(t);case"option":return f(t);case"checkbox":return y(t);case"stringListBuilder":return x(t);case"chipsInput":return $(t);case"typography":return M(t);case"icons":return r.qy`<icons-gallery
1133
+ .selectedIcon=${t.selectedIcon}
1134
+ .useIconsApi=${!0===t.useIconsApi}
1135
+ .iconColor=${t.iconColor??"000000"}
1136
+ .iconSize=${"number"==typeof t.iconSize?t.iconSize:24}
1137
+ @icon-selected=${t.onChange}
1138
+ ></icons-gallery>`;case"info":return I(t);case"svgpicker":return A(t);case"gallery":return"ai-edit"===o.M.get("config","mode")?null:R(t);case"giphy":return r.qy`<giphy-picker
1139
+ .selectedSrc=${t.selectedSrc||""}
1140
+ @gif-selected=${t.onChange}
1141
+ ></giphy-picker>`;case"table":return T(t);case"accordion":return r.qy`<cdtr-accordion-item
1142
+ .onToggle=${t.onToggle}
1143
+ .label="${t.label}"
1144
+ .isOpen=${t.isOpen}
1145
+ >
1146
+ ${t.children.map(t=>this.factory(t))}
1147
+ </cdtr-accordion-item>`;case"imagePrompt":return document.createElement("cdtr-image-prompt-builder");case"spacingPicker":return rt(t);case"section":return(0,ot.A)(t,(t.children||[]).map((t,e)=>this.factory(t,e)));case"colorSwatchGroup":return(0,st.A)(t)}}execCommandWrapper(t,e){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.components=[this.component],n.Ay.store().execCommand(t,e,a)}commandsBuilder(){return{tab:this.tabName,helpers:{Url:z.A,deepMerge:k()},commands:{execCommand:this.execCommandWrapper,injectEditor:o.M.get("injectEditor")}}}changeTab(t){this.tabName=t,"function"==typeof this.component?.createEditor&&(this.editor=this.component.createEditor(this.commandsBuilder()))}getColElementData(t){const e=t[0]?.closest("col");return e?{colElement:e,justifyValue:e.props.justify,alignItemsValue:e.props.alignItems,colElementRect:e.element.getBoundingClientRect()}:null}shouldShowDesignControls(t,e){const a=t[0]?.element.getBoundingClientRect(),r=t[0]?.type,o=e.find(t=>t.selected)?.text;let i=("design"===o||void 0===o)&&!["root","section","block","row","col"].includes(r);const s=this.getColElementData(t);return s&&s.colElementRect.width===a.width&&(i=!1),i}handleJustifyContent(t){const e=t.target.value,a=n.Ay.getSelectedComponent(),r=a[0]?.closest("col");r&&n.Ay.store().execCommand("justify",e,{find:"col"})}handleAlignItems(t){const e=t.target.value,a=n.Ay.getSelectedComponent(),r=a[0]?.closest("col");r&&n.Ay.store().execCommand("alignItems",e,{find:"col"})}renderJustifyAlignControls(t){return t?(0,ot.A)({label:"alignment",open:!1},[F({value:t.justifyValue,onChange:this.handleJustifyContent}),F({value:t.alignItemsValue,type:"alignItems",title:"alignItems",onChange:this.handleAlignItems})]):null}preprocessLayout(t){if(!t||0===t.length)return t;if(t.some(t=>t&&"section"===t.type))return this._applyPersistedOpen(t);t=t.filter(t=>!!t&&("boolean"==typeof t.active?t.active:"function"!=typeof t.active||!1!==t.active()));const e=[];let a=[];for(const r of t)r&&("function"!=typeof r?"divider"===r.type?(a.length>0&&e.push(a),a=[]):"heading"===r.type?(a.length>0&&e.push(a),a=[r]):a.push(r):a.push(r));a.length>0&&e.push(a);const r=[];let o=0;for(let t=0;t<e.length;t++){const a=e[t];if(a[0]&&"heading"===a[0].type){const t=a[0].text||"settings",e=a.slice(1);e.length>0&&(o++,r.push({type:"section",label:t,open:!0,children:e}))}else r.push(...a)}if(o>=4){let t=0;for(const e of r)"section"===e.type&&(t++,e.open=t<=2)}return this._applyPersistedOpen(r)}createRenderRoot(){return this}render(){if(!this.editor)return;if("function"!=typeof this.editor.tabs)return;const t=n.Ay.getSelectedComponent(),e=this.editor?.tabs(this.tabName),a=this.getColElementData(t),o=this.shouldShowDesignControls(t,e),i=this.preprocessLayout(this.editor.layout({tabs:e,tab:e.find(t=>t.selected)||e[0]||{text:"style"},changeTab:this.changeTab}));return r.qy`<cdtr-editor-tabs
1148
+ .value=${this.tabName}
1149
+ @tabChanged=${t=>this.changeTab(t.target.value)}
1150
+ .tabs=${e}
1151
+ >
1152
+ <div slot="content">
1153
+ ${i.map(this.factory)}
1154
+ ${o?this.renderJustifyAlignControls(a):null}
1155
+ </div>
1156
+ </cdtr-editor-tabs> `}}lt.styles=r.AH`
1157
+ [disabled] {
1158
+ opacity: 0.3;
1159
+ pointer-events: none;
1160
+ }
1161
+ /* Product accent, not --primary: that is the host's brand and may be a
1162
+ gradient. Mirrors block-editor's primary/secondary pair. */
1163
+ paper-button.gallery {
1164
+ background: var(--color-primary, #6366f1);
1165
+ color: var(--color-primary-text, #ffffff);
1166
+ }
1167
+ paper-button.gallery:hover {
1168
+ background: var(--color-primary-hover, #4f46e5);
1169
+ }
1170
+ paper-button.backgrounds {
1171
+ background: var(--color-bg-muted, #f4f4f6);
1172
+ color: var(--color-text-secondary, #555);
1173
+ }
1174
+ paper-button.backgrounds:hover {
1175
+ background: #eaeaed;
1176
+ }
1177
+ `,lt.properties={type:{type:String},editor:{},tabName:{type:String},tabs:{type:Array}},customElements.define("cdtr-editor-builder",lt)},92384(t,e,a){a.r(e),a.d(e,{FONT_WEIGHTS:()=>s,FontFamilyEditor:()=>n});var r=a(59929),o=a(40120),i=a(86319);const s=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class n extends r.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,a=this.fontFamilies.find(t=>t.name===e);if(!a)return void console.error("cant set font family, font family not founded..");(0,o.sw)(a),this.value=a.cssRule,this.name=e;const r=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(r)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}async connectedCallback(){super.connectedCallback();const t=await(0,o.VH)(),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=r.qy`<cdtr-dropdown
1178
+ style="width:100%"
1179
+ .value="${this.name}"
1180
+ @change=${this.onchangeFontFamily}
1181
+ >
1182
+ <cdtr-dropdown-button
1183
+ minWidth=${100}
1184
+ class="dropdown-button"
1185
+ slot="trigger"
1186
+ ><lang-text text="${this.name}"></lang-text>
1187
+ </cdtr-dropdown-button>
1188
+ <div slot="content">
1189
+ <cdtr-input
1190
+ .placeholder="${i.M.get("lang","search")}.."
1191
+ @input=${this.onFilteredFonts}
1192
+ type="search"
1193
+ ></cdtr-input>
1194
+ ${this.filteredFonts.map(t=>r.qy`<cdtr-dropdown-item
1195
+ .focused=${t.name===this.name}
1196
+ .selected=${t.name===this.name}
1197
+ value="${t.name}"
1198
+ ><span
1199
+ style="font-family:${t.cssRule};"
1200
+ text="${t.name}"
1201
+ data-foo="${t.cssRule}"
1202
+ >${t.name}</span>
1203
+ </cdtr-dropdown-item>`)}
1204
+ </div>
1205
+ </cdtr-dropdown>`,a=r.qy`
1206
+ <cdtr-editor-container>
1207
+ <cdtr-row alignItems="center" justify="space-between">
1208
+ <cdtr-col sm="12">
1209
+ <cdtr-row alignItems="center" justify="flex-end">
1210
+ ${e}
1211
+ </cdtr-row>
1212
+ </cdtr-col>
1213
+ </cdtr-row>
1214
+ </cdtr-editor-container>
1215
+ `,o=s.find(t=>String(t.value)===String(this.weight))||s.find(t=>400===t.value),n=r.qy`<cdtr-dropdown
1216
+ style="width:100%"
1217
+ .value="${String(o?.value)}"
1218
+ @change=${this.onchangeFontWeight}
1219
+ >
1220
+ <cdtr-dropdown-button
1221
+ minWidth=${100}
1222
+ class="dropdown-button"
1223
+ slot="trigger"
1224
+ >${o?.value}
1225
+ </cdtr-dropdown-button>
1226
+ <div slot="content">
1227
+ ${s.map(t=>r.qy`<cdtr-dropdown-item
1228
+ .focused=${String(t.value)===String(o?.value)}
1229
+ .selected=${String(t.value)===String(o?.value)}
1230
+ value="${t.value}"
1231
+ ><span style="font-weight:${t.value};">${t.value}</span>
1232
+ </cdtr-dropdown-item>`)}
1233
+ </div>
1234
+ </cdtr-dropdown>`,l=r.qy`
1235
+ <cdtr-editor-container>
1236
+ <cdtr-row alignItems="center" justify="space-between">
1237
+ <cdtr-title pb="0" style="display:block" class="align-lang"
1238
+ ><lang-text text="fontWeight"></lang-text
1239
+ ></cdtr-title>
1240
+ <cdtr-col sm="12">
1241
+ <cdtr-row alignItems="center" justify="flex-end">
1242
+ ${n}
1243
+ </cdtr-row>
1244
+ </cdtr-col>
1245
+ </cdtr-row>
1246
+ </cdtr-editor-container>
1247
+ `;return this.light?this.showWeight?r.qy`<div class="toolbar-flat">${e}${n}</div>`:r.qy`<div class="toolbar-flat">${e}</div>`:this.showWeight?r.qy`${a}${l}`:a}}n.properties={value:{type:String},name:{type:String},fontFamilies:{type:Array},filteredFonts:{type:Array},isOpen:{type:Boolean},light:{type:Boolean},showWeight:{type:Boolean,attribute:!1},weight:{}},n.styles=r.AH`
1248
+ .dropdown-button {
1249
+ min-width: 100px;
1250
+ }
1251
+ /* Toolbar ("light") mode: flatten the picker so it reads as one of the
1252
+ flat icon controls rather than a bordered <select>. Scoped to this
1253
+ instance only — the bordered look is preserved everywhere else. */
1254
+ .toolbar-flat cdtr-dropdown-button::part(button) {
1255
+ height: 28px;
1256
+ padding: 0 6px 0 8px;
1257
+ border-color: transparent !important;
1258
+ background: transparent !important;
1259
+ border-radius: 7px;
1260
+ color: #444b58;
1261
+ font-size: 13px;
1262
+ font-weight: 500;
1263
+ transition: background 0.12s ease, color 0.12s ease;
1264
+ }
1265
+ .toolbar-flat cdtr-dropdown-button::part(button):hover {
1266
+ border-color: transparent !important;
1267
+ background: rgba(16, 24, 40, 0.055) !important;
1268
+ color: #14171f;
1269
+ }
1270
+ `,customElements.define("cdtr-font-family-editor",n)},13681(t,e,a){a.d(e,{vP:()=>d});const r=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=r,window[r]||(window[r]={});const o=window[r],i=window.__cdtrEvents||{};function s(t){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then(t=>Array.from(new Uint8Array(t)).map(t=>t.toString(16).padStart(2,"0")).join(""))}function n(t){if(t.length%2!=0)throw new Error("Invalid hex string");const e=new Uint8Array(t.length/2);for(let a=0;a<t.length;a+=2)e[a/2]=parseInt(t.substr(a,2),16);return e}async function l(t){const e=await s(t),a=o[e];if(a){const t=await crypto.subtle.importKey("raw",n(e),{name:"AES-GCM"},!1,["encrypt","decrypt"]),r=await async function(t,e,a){const r=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,a);return(new TextDecoder).decode(r)}(t,a.iv,a.encrypted);return JSON.parse(r)}return null}function c(t,e){if(i[t])for(const a in i[t])Object.prototype.hasOwnProperty.call(i[t],a)&&i[t][a].forEach(t=>t(e));Array.isArray(i["*"])&&i["*"].forEach(t=>t(e))}window.__cdtrEvents=i;const d={set:async function(t,e){const a=JSON.parse(JSON.stringify(e)),r=await s(t),l=await crypto.subtle.importKey("raw",n(r),{name:"AES-GCM"},!1,["encrypt","decrypt"]),d=await async function(t,e){const a=crypto.getRandomValues(new Uint8Array(12)),r=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"AES-GCM",iv:a},t,r);return{iv:a,encrypted:new Uint8Array(o)}}(l,JSON.stringify(a));o[r]=d,i.set&&i.set[r]&&i.set[r].forEach(t=>t(a)),Array.isArray(i["*"])&&i["*"].forEach(t=>t(a)),c(t,a)},get:l,remove:async function(t){const e=await s(t);delete o[e]},on:async function(t,e,a){i[t]||(i[t]={});const r=await s(e);i[t][r]||(i[t][r]=[]),i[t][r].push(t=>{!function(){const t=(new Error).stack;if(t&&t.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),a(t)});const o=await l(e);return o&&a(o),r},off:function(t,e){i[t]&&i[t][e]&&delete i[t][e]},dispatch:c,OPTIONS:{SET:"set"}}},88385(t,e,a){a.d(e,{A:()=>n});const r=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function i(t){const e={},a=/([^&=]+)=?([^&]*)/g,r=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let i,s=-1!==o?t.substring(o+1):"";for(;null!==(i=a.exec(s));){const t=r(i[1]),a=r(i[2]);t&&(e[t]=a)}return e}function s(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class n{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...i(t)};const a=t.indexOf("?");return this.url=a>-1?t.slice(0,a):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??n.getProtocol(this.href);const a=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=r(a),this.isPhone=o(a),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...i(this.href)},this.url=s(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.params[t]=e,this.href=this.getUrlWithParams()}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const a in this.params){const r=this.params[a],o=encodeURIComponent(a).replace(/%24/g,"$");if(r){const a=encodeURIComponent(r).replace(/%24/g,"$");t+=`${o}=${a}&`,e+=`${o}=${a}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const a=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return a(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const r=this.extractPhoneFromTextUsingRegex(t);return r.length>0?a("https://wa.me/"+r[0]+e):a("https://wa.me/"+e)}return a(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}n.resetURL=s}}]);