super 0.17.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/app/assets/javascripts/super/application.js +1260 -117
  4. data/app/assets/stylesheets/super/application.css +90711 -90034
  5. data/app/controllers/super/application_controller.rb +34 -4
  6. data/app/controllers/super/substructure_controller.rb +125 -29
  7. data/app/helpers/super/form_builder_helper.rb +4 -4
  8. data/app/views/layouts/super/application.html.erb +1 -1
  9. data/app/views/super/application/_batch_button.html.erb +12 -0
  10. data/app/views/super/application/_batch_checkbox.csv.erb +1 -0
  11. data/app/views/super/application/_batch_checkbox.html.erb +9 -0
  12. data/app/views/super/application/_batch_form.html.erb +3 -0
  13. data/app/views/super/application/_collection_header.html.erb +7 -6
  14. data/app/views/super/application/_csv_button.html.erb +25 -0
  15. data/app/views/super/application/_display_actions.html.erb +2 -2
  16. data/app/views/super/application/_form.html.erb +1 -1
  17. data/app/views/super/application/_layout.html.erb +13 -14
  18. data/app/views/super/application/_link.html.erb +8 -0
  19. data/app/views/super/application/_member_header.html.erb +7 -7
  20. data/app/views/super/application/_pagination.html.erb +2 -4
  21. data/app/views/super/application/_site_footer.html.erb +1 -1
  22. data/app/views/super/application/_site_header.html.erb +4 -4
  23. data/app/views/super/application/_view_chain.html.erb +5 -0
  24. data/app/views/super/application/index.csv.erb +14 -0
  25. data/config/locales/en.yml +15 -1
  26. data/frontend/super-frontend/dist/application.css +90711 -90034
  27. data/frontend/super-frontend/dist/application.js +6512 -5379
  28. data/frontend/super-frontend/dist/package.json +13 -0
  29. data/lib/generators/super/webpacker/USAGE +1 -7
  30. data/lib/generators/super/webpacker/templates/pack_super_application.js.tt +2 -0
  31. data/lib/generators/super/webpacker/webpacker_generator.rb +10 -6
  32. data/lib/super/action_inquirer.rb +3 -0
  33. data/lib/super/cheat.rb +1 -0
  34. data/lib/super/display/schema_types.rb +6 -0
  35. data/lib/super/display.rb +2 -1
  36. data/lib/super/engine.rb +5 -0
  37. data/lib/super/error.rb +11 -0
  38. data/lib/super/form/schema_types.rb +8 -36
  39. data/lib/super/form_builder/action_text_methods.rb +16 -0
  40. data/lib/super/form_builder/base_methods.rb +73 -0
  41. data/lib/super/form_builder/flatpickr_methods.rb +75 -0
  42. data/lib/super/form_builder/option_methods.rb +73 -0
  43. data/lib/super/form_builder.rb +143 -0
  44. data/lib/super/layout.rb +9 -33
  45. data/lib/super/link.rb +49 -70
  46. data/lib/super/link_builder.rb +24 -47
  47. data/lib/super/packaged_asset.rb +49 -0
  48. data/lib/super/pagination.rb +2 -1
  49. data/lib/super/reorderable_hash.rb +88 -0
  50. data/lib/super/reset.rb +20 -1
  51. data/lib/super/useful/i19.rb +35 -0
  52. data/lib/super/version.rb +1 -1
  53. data/lib/super/view_chain.rb +25 -0
  54. data/lib/super.rb +9 -1
  55. metadata +55 -10
  56. data/lib/generators/super/webpacker/templates/pack_super_application.js.erb.tt +0 -2
  57. data/lib/super/form/builder.rb +0 -289
@@ -1,6 +1,905 @@
1
1
  var Super = (function (exports) {
2
2
  'use strict';
3
3
 
4
+ (function () {
5
+
6
+ var n = window.Document.prototype.createElement,
7
+ p = window.Document.prototype.createElementNS,
8
+ aa = window.Document.prototype.importNode,
9
+ ba = window.Document.prototype.prepend,
10
+ ca = window.Document.prototype.append,
11
+ da = window.DocumentFragment.prototype.prepend,
12
+ ea = window.DocumentFragment.prototype.append,
13
+ q = window.Node.prototype.cloneNode,
14
+ r = window.Node.prototype.appendChild,
15
+ t = window.Node.prototype.insertBefore,
16
+ u = window.Node.prototype.removeChild,
17
+ v = window.Node.prototype.replaceChild,
18
+ w = Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"),
19
+ y = window.Element.prototype.attachShadow,
20
+ z = Object.getOwnPropertyDescriptor(window.Element.prototype, "innerHTML"),
21
+ A = window.Element.prototype.getAttribute,
22
+ B = window.Element.prototype.setAttribute,
23
+ C = window.Element.prototype.removeAttribute,
24
+ D = window.Element.prototype.getAttributeNS,
25
+ E = window.Element.prototype.setAttributeNS,
26
+ F = window.Element.prototype.removeAttributeNS,
27
+ G = window.Element.prototype.insertAdjacentElement,
28
+ H = window.Element.prototype.insertAdjacentHTML,
29
+ fa = window.Element.prototype.prepend,
30
+ ha = window.Element.prototype.append,
31
+ ia = window.Element.prototype.before,
32
+ ja = window.Element.prototype.after,
33
+ ka = window.Element.prototype.replaceWith,
34
+ la = window.Element.prototype.remove,
35
+ ma = window.HTMLElement,
36
+ I = Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, "innerHTML"),
37
+ na = window.HTMLElement.prototype.insertAdjacentElement,
38
+ oa = window.HTMLElement.prototype.insertAdjacentHTML;
39
+ var pa = new Set();
40
+ "annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function (a) {
41
+ return pa.add(a);
42
+ });
43
+
44
+ function qa(a) {
45
+ var b = pa.has(a);
46
+ a = /^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(a);
47
+ return !b && a;
48
+ }
49
+
50
+ var ra = document.contains ? document.contains.bind(document) : document.documentElement.contains.bind(document.documentElement);
51
+
52
+ function J(a) {
53
+ var b = a.isConnected;
54
+ if (void 0 !== b) return b;
55
+ if (ra(a)) return !0;
56
+
57
+ for (; a && !(a.__CE_isImportDocument || a instanceof Document);) a = a.parentNode || (window.ShadowRoot && a instanceof ShadowRoot ? a.host : void 0);
58
+
59
+ return !(!a || !(a.__CE_isImportDocument || a instanceof Document));
60
+ }
61
+
62
+ function K(a) {
63
+ var b = a.children;
64
+ if (b) return Array.prototype.slice.call(b);
65
+ b = [];
66
+
67
+ for (a = a.firstChild; a; a = a.nextSibling) a.nodeType === Node.ELEMENT_NODE && b.push(a);
68
+
69
+ return b;
70
+ }
71
+
72
+ function L(a, b) {
73
+ for (; b && b !== a && !b.nextSibling;) b = b.parentNode;
74
+
75
+ return b && b !== a ? b.nextSibling : null;
76
+ }
77
+
78
+ function M(a, b, c) {
79
+ for (var f = a; f;) {
80
+ if (f.nodeType === Node.ELEMENT_NODE) {
81
+ var d = f;
82
+ b(d);
83
+ var e = d.localName;
84
+
85
+ if ("link" === e && "import" === d.getAttribute("rel")) {
86
+ f = d.import;
87
+ void 0 === c && (c = new Set());
88
+ if (f instanceof Node && !c.has(f)) for (c.add(f), f = f.firstChild; f; f = f.nextSibling) M(f, b, c);
89
+ f = L(a, d);
90
+ continue;
91
+ } else if ("template" === e) {
92
+ f = L(a, d);
93
+ continue;
94
+ }
95
+
96
+ if (d = d.__CE_shadowRoot) for (d = d.firstChild; d; d = d.nextSibling) M(d, b, c);
97
+ }
98
+
99
+ f = f.firstChild ? f.firstChild : L(a, f);
100
+ }
101
+ }
102
+
103
+ function N() {
104
+ var a = !(null === O || void 0 === O || !O.noDocumentConstructionObserver),
105
+ b = !(null === O || void 0 === O || !O.shadyDomFastWalk);
106
+ this.m = [];
107
+ this.g = [];
108
+ this.j = !1;
109
+ this.shadyDomFastWalk = b;
110
+ this.I = !a;
111
+ }
112
+
113
+ function P(a, b, c, f) {
114
+ var d = window.ShadyDOM;
115
+
116
+ if (a.shadyDomFastWalk && d && d.inUse) {
117
+ if (b.nodeType === Node.ELEMENT_NODE && c(b), b.querySelectorAll) for (a = d.nativeMethods.querySelectorAll.call(b, "*"), b = 0; b < a.length; b++) c(a[b]);
118
+ } else M(b, c, f);
119
+ }
120
+
121
+ function sa(a, b) {
122
+ a.j = !0;
123
+ a.m.push(b);
124
+ }
125
+
126
+ function ta(a, b) {
127
+ a.j = !0;
128
+ a.g.push(b);
129
+ }
130
+
131
+ function Q(a, b) {
132
+ a.j && P(a, b, function (c) {
133
+ return R(a, c);
134
+ });
135
+ }
136
+
137
+ function R(a, b) {
138
+ if (a.j && !b.__CE_patched) {
139
+ b.__CE_patched = !0;
140
+
141
+ for (var c = 0; c < a.m.length; c++) a.m[c](b);
142
+
143
+ for (c = 0; c < a.g.length; c++) a.g[c](b);
144
+ }
145
+ }
146
+
147
+ function S(a, b) {
148
+ var c = [];
149
+ P(a, b, function (d) {
150
+ return c.push(d);
151
+ });
152
+
153
+ for (b = 0; b < c.length; b++) {
154
+ var f = c[b];
155
+ 1 === f.__CE_state ? a.connectedCallback(f) : T(a, f);
156
+ }
157
+ }
158
+
159
+ function U(a, b) {
160
+ var c = [];
161
+ P(a, b, function (d) {
162
+ return c.push(d);
163
+ });
164
+
165
+ for (b = 0; b < c.length; b++) {
166
+ var f = c[b];
167
+ 1 === f.__CE_state && a.disconnectedCallback(f);
168
+ }
169
+ }
170
+
171
+ function V(a, b, c) {
172
+ c = void 0 === c ? {} : c;
173
+
174
+ var f = c.J,
175
+ d = c.upgrade || function (g) {
176
+ return T(a, g);
177
+ },
178
+ e = [];
179
+
180
+ P(a, b, function (g) {
181
+ a.j && R(a, g);
182
+
183
+ if ("link" === g.localName && "import" === g.getAttribute("rel")) {
184
+ var h = g.import;
185
+ h instanceof Node && (h.__CE_isImportDocument = !0, h.__CE_registry = document.__CE_registry);
186
+ h && "complete" === h.readyState ? h.__CE_documentLoadHandled = !0 : g.addEventListener("load", function () {
187
+ var k = g.import;
188
+
189
+ if (!k.__CE_documentLoadHandled) {
190
+ k.__CE_documentLoadHandled = !0;
191
+ var l = new Set();
192
+ f && (f.forEach(function (m) {
193
+ return l.add(m);
194
+ }), l.delete(k));
195
+ V(a, k, {
196
+ J: l,
197
+ upgrade: d
198
+ });
199
+ }
200
+ });
201
+ } else e.push(g);
202
+ }, f);
203
+
204
+ for (b = 0; b < e.length; b++) d(e[b]);
205
+ }
206
+
207
+ function T(a, b) {
208
+ try {
209
+ var c = b.ownerDocument,
210
+ f = c.__CE_registry;
211
+ var d = f && (c.defaultView || c.__CE_isImportDocument) ? W(f, b.localName) : void 0;
212
+
213
+ if (d && void 0 === b.__CE_state) {
214
+ d.constructionStack.push(b);
215
+
216
+ try {
217
+ try {
218
+ if (new d.constructorFunction() !== b) throw Error("The custom element constructor did not produce the element being upgraded.");
219
+ } finally {
220
+ d.constructionStack.pop();
221
+ }
222
+ } catch (k) {
223
+ throw b.__CE_state = 2, k;
224
+ }
225
+
226
+ b.__CE_state = 1;
227
+ b.__CE_definition = d;
228
+
229
+ if (d.attributeChangedCallback && b.hasAttributes()) {
230
+ var e = d.observedAttributes;
231
+
232
+ for (d = 0; d < e.length; d++) {
233
+ var g = e[d],
234
+ h = b.getAttribute(g);
235
+ null !== h && a.attributeChangedCallback(b, g, null, h, null);
236
+ }
237
+ }
238
+
239
+ J(b) && a.connectedCallback(b);
240
+ }
241
+ } catch (k) {
242
+ X(k);
243
+ }
244
+ }
245
+
246
+ N.prototype.connectedCallback = function (a) {
247
+ var b = a.__CE_definition;
248
+ if (b.connectedCallback) try {
249
+ b.connectedCallback.call(a);
250
+ } catch (c) {
251
+ X(c);
252
+ }
253
+ };
254
+
255
+ N.prototype.disconnectedCallback = function (a) {
256
+ var b = a.__CE_definition;
257
+ if (b.disconnectedCallback) try {
258
+ b.disconnectedCallback.call(a);
259
+ } catch (c) {
260
+ X(c);
261
+ }
262
+ };
263
+
264
+ N.prototype.attributeChangedCallback = function (a, b, c, f, d) {
265
+ var e = a.__CE_definition;
266
+ if (e.attributeChangedCallback && -1 < e.observedAttributes.indexOf(b)) try {
267
+ e.attributeChangedCallback.call(a, b, c, f, d);
268
+ } catch (g) {
269
+ X(g);
270
+ }
271
+ };
272
+
273
+ function ua(a, b, c, f) {
274
+ var d = b.__CE_registry;
275
+ if (d && (null === f || "http://www.w3.org/1999/xhtml" === f) && (d = W(d, c))) try {
276
+ var e = new d.constructorFunction();
277
+ if (void 0 === e.__CE_state || void 0 === e.__CE_definition) throw Error("Failed to construct '" + c + "': The returned value was not constructed with the HTMLElement constructor.");
278
+ if ("http://www.w3.org/1999/xhtml" !== e.namespaceURI) throw Error("Failed to construct '" + c + "': The constructed element's namespace must be the HTML namespace.");
279
+ if (e.hasAttributes()) throw Error("Failed to construct '" + c + "': The constructed element must not have any attributes.");
280
+ if (null !== e.firstChild) throw Error("Failed to construct '" + c + "': The constructed element must not have any children.");
281
+ if (null !== e.parentNode) throw Error("Failed to construct '" + c + "': The constructed element must not have a parent node.");
282
+ if (e.ownerDocument !== b) throw Error("Failed to construct '" + c + "': The constructed element's owner document is incorrect.");
283
+ if (e.localName !== c) throw Error("Failed to construct '" + c + "': The constructed element's local name is incorrect.");
284
+ return e;
285
+ } catch (g) {
286
+ return X(g), b = null === f ? n.call(b, c) : p.call(b, f, c), Object.setPrototypeOf(b, HTMLUnknownElement.prototype), b.__CE_state = 2, b.__CE_definition = void 0, R(a, b), b;
287
+ }
288
+ b = null === f ? n.call(b, c) : p.call(b, f, c);
289
+ R(a, b);
290
+ return b;
291
+ }
292
+
293
+ function X(a) {
294
+ var b = a.message,
295
+ c = a.sourceURL || a.fileName || "",
296
+ f = a.line || a.lineNumber || 0,
297
+ d = a.column || a.columnNumber || 0,
298
+ e = void 0;
299
+ void 0 === ErrorEvent.prototype.initErrorEvent ? e = new ErrorEvent("error", {
300
+ cancelable: !0,
301
+ message: b,
302
+ filename: c,
303
+ lineno: f,
304
+ colno: d,
305
+ error: a
306
+ }) : (e = document.createEvent("ErrorEvent"), e.initErrorEvent("error", !1, !0, b, c, f), e.preventDefault = function () {
307
+ Object.defineProperty(this, "defaultPrevented", {
308
+ configurable: !0,
309
+ get: function () {
310
+ return !0;
311
+ }
312
+ });
313
+ });
314
+ void 0 === e.error && Object.defineProperty(e, "error", {
315
+ configurable: !0,
316
+ enumerable: !0,
317
+ get: function () {
318
+ return a;
319
+ }
320
+ });
321
+ window.dispatchEvent(e);
322
+ e.defaultPrevented || console.error(a);
323
+ }
324
+
325
+ function va() {
326
+ var a = this;
327
+ this.g = void 0;
328
+ this.F = new Promise(function (b) {
329
+ a.l = b;
330
+ });
331
+ }
332
+
333
+ va.prototype.resolve = function (a) {
334
+ if (this.g) throw Error("Already resolved.");
335
+ this.g = a;
336
+ this.l(a);
337
+ };
338
+
339
+ function wa(a) {
340
+ var b = document;
341
+ this.l = void 0;
342
+ this.h = a;
343
+ this.g = b;
344
+ V(this.h, this.g);
345
+ "loading" === this.g.readyState && (this.l = new MutationObserver(this.G.bind(this)), this.l.observe(this.g, {
346
+ childList: !0,
347
+ subtree: !0
348
+ }));
349
+ }
350
+
351
+ function xa(a) {
352
+ a.l && a.l.disconnect();
353
+ }
354
+
355
+ wa.prototype.G = function (a) {
356
+ var b = this.g.readyState;
357
+ "interactive" !== b && "complete" !== b || xa(this);
358
+
359
+ for (b = 0; b < a.length; b++) for (var c = a[b].addedNodes, f = 0; f < c.length; f++) V(this.h, c[f]);
360
+ };
361
+
362
+ function Y(a) {
363
+ this.s = new Map();
364
+ this.u = new Map();
365
+ this.C = new Map();
366
+ this.A = !1;
367
+ this.B = new Map();
368
+
369
+ this.o = function (b) {
370
+ return b();
371
+ };
372
+
373
+ this.i = !1;
374
+ this.v = [];
375
+ this.h = a;
376
+ this.D = a.I ? new wa(a) : void 0;
377
+ }
378
+
379
+ Y.prototype.H = function (a, b) {
380
+ var c = this;
381
+ if (!(b instanceof Function)) throw new TypeError("Custom element constructor getters must be functions.");
382
+ ya(this, a);
383
+ this.s.set(a, b);
384
+ this.v.push(a);
385
+ this.i || (this.i = !0, this.o(function () {
386
+ return za(c);
387
+ }));
388
+ };
389
+
390
+ Y.prototype.define = function (a, b) {
391
+ var c = this;
392
+ if (!(b instanceof Function)) throw new TypeError("Custom element constructors must be functions.");
393
+ ya(this, a);
394
+ Aa(this, a, b);
395
+ this.v.push(a);
396
+ this.i || (this.i = !0, this.o(function () {
397
+ return za(c);
398
+ }));
399
+ };
400
+
401
+ function ya(a, b) {
402
+ if (!qa(b)) throw new SyntaxError("The element name '" + b + "' is not valid.");
403
+ if (W(a, b)) throw Error("A custom element with name '" + (b + "' has already been defined."));
404
+ if (a.A) throw Error("A custom element is already being defined.");
405
+ }
406
+
407
+ function Aa(a, b, c) {
408
+ a.A = !0;
409
+ var f;
410
+
411
+ try {
412
+ var d = c.prototype;
413
+ if (!(d instanceof Object)) throw new TypeError("The custom element constructor's prototype is not an object.");
414
+
415
+ var e = function (m) {
416
+ var x = d[m];
417
+ if (void 0 !== x && !(x instanceof Function)) throw Error("The '" + m + "' callback must be a function.");
418
+ return x;
419
+ };
420
+
421
+ var g = e("connectedCallback");
422
+ var h = e("disconnectedCallback");
423
+ var k = e("adoptedCallback");
424
+ var l = (f = e("attributeChangedCallback")) && c.observedAttributes || [];
425
+ } catch (m) {
426
+ throw m;
427
+ } finally {
428
+ a.A = !1;
429
+ }
430
+
431
+ c = {
432
+ localName: b,
433
+ constructorFunction: c,
434
+ connectedCallback: g,
435
+ disconnectedCallback: h,
436
+ adoptedCallback: k,
437
+ attributeChangedCallback: f,
438
+ observedAttributes: l,
439
+ constructionStack: []
440
+ };
441
+ a.u.set(b, c);
442
+ a.C.set(c.constructorFunction, c);
443
+ return c;
444
+ }
445
+
446
+ Y.prototype.upgrade = function (a) {
447
+ V(this.h, a);
448
+ };
449
+
450
+ function za(a) {
451
+ if (!1 !== a.i) {
452
+ a.i = !1;
453
+
454
+ for (var b = [], c = a.v, f = new Map(), d = 0; d < c.length; d++) f.set(c[d], []);
455
+
456
+ V(a.h, document, {
457
+ upgrade: function (k) {
458
+ if (void 0 === k.__CE_state) {
459
+ var l = k.localName,
460
+ m = f.get(l);
461
+ m ? m.push(k) : a.u.has(l) && b.push(k);
462
+ }
463
+ }
464
+ });
465
+
466
+ for (d = 0; d < b.length; d++) T(a.h, b[d]);
467
+
468
+ for (d = 0; d < c.length; d++) {
469
+ for (var e = c[d], g = f.get(e), h = 0; h < g.length; h++) T(a.h, g[h]);
470
+
471
+ (e = a.B.get(e)) && e.resolve(void 0);
472
+ }
473
+
474
+ c.length = 0;
475
+ }
476
+ }
477
+
478
+ Y.prototype.get = function (a) {
479
+ if (a = W(this, a)) return a.constructorFunction;
480
+ };
481
+
482
+ Y.prototype.whenDefined = function (a) {
483
+ if (!qa(a)) return Promise.reject(new SyntaxError("'" + a + "' is not a valid custom element name."));
484
+ var b = this.B.get(a);
485
+ if (b) return b.F;
486
+ b = new va();
487
+ this.B.set(a, b);
488
+ var c = this.u.has(a) || this.s.has(a);
489
+ a = -1 === this.v.indexOf(a);
490
+ c && a && b.resolve(void 0);
491
+ return b.F;
492
+ };
493
+
494
+ Y.prototype.polyfillWrapFlushCallback = function (a) {
495
+ this.D && xa(this.D);
496
+ var b = this.o;
497
+
498
+ this.o = function (c) {
499
+ return a(function () {
500
+ return b(c);
501
+ });
502
+ };
503
+ };
504
+
505
+ function W(a, b) {
506
+ var c = a.u.get(b);
507
+ if (c) return c;
508
+
509
+ if (c = a.s.get(b)) {
510
+ a.s.delete(b);
511
+
512
+ try {
513
+ return Aa(a, b, c());
514
+ } catch (f) {
515
+ X(f);
516
+ }
517
+ }
518
+ }
519
+
520
+ window.CustomElementRegistry = Y;
521
+ Y.prototype.define = Y.prototype.define;
522
+ Y.prototype.upgrade = Y.prototype.upgrade;
523
+ Y.prototype.get = Y.prototype.get;
524
+ Y.prototype.whenDefined = Y.prototype.whenDefined;
525
+ Y.prototype.polyfillDefineLazy = Y.prototype.H;
526
+ Y.prototype.polyfillWrapFlushCallback = Y.prototype.polyfillWrapFlushCallback;
527
+
528
+ function Z(a, b, c) {
529
+ function f(d) {
530
+ return function (e) {
531
+ for (var g = [], h = 0; h < arguments.length; ++h) g[h] = arguments[h];
532
+
533
+ h = [];
534
+
535
+ for (var k = [], l = 0; l < g.length; l++) {
536
+ var m = g[l];
537
+ m instanceof Element && J(m) && k.push(m);
538
+ if (m instanceof DocumentFragment) for (m = m.firstChild; m; m = m.nextSibling) h.push(m);else h.push(m);
539
+ }
540
+
541
+ d.apply(this, g);
542
+
543
+ for (g = 0; g < k.length; g++) U(a, k[g]);
544
+
545
+ if (J(this)) for (g = 0; g < h.length; g++) k = h[g], k instanceof Element && S(a, k);
546
+ };
547
+ }
548
+
549
+ void 0 !== c.prepend && (b.prepend = f(c.prepend));
550
+ void 0 !== c.append && (b.append = f(c.append));
551
+ }
552
+
553
+ function Ba(a) {
554
+ Document.prototype.createElement = function (b) {
555
+ return ua(a, this, b, null);
556
+ };
557
+
558
+ Document.prototype.importNode = function (b, c) {
559
+ b = aa.call(this, b, !!c);
560
+ this.__CE_registry ? V(a, b) : Q(a, b);
561
+ return b;
562
+ };
563
+
564
+ Document.prototype.createElementNS = function (b, c) {
565
+ return ua(a, this, c, b);
566
+ };
567
+
568
+ Z(a, Document.prototype, {
569
+ prepend: ba,
570
+ append: ca
571
+ });
572
+ }
573
+
574
+ function Ca(a) {
575
+ function b(f) {
576
+ return function (d) {
577
+ for (var e = [], g = 0; g < arguments.length; ++g) e[g] = arguments[g];
578
+
579
+ g = [];
580
+
581
+ for (var h = [], k = 0; k < e.length; k++) {
582
+ var l = e[k];
583
+ l instanceof Element && J(l) && h.push(l);
584
+ if (l instanceof DocumentFragment) for (l = l.firstChild; l; l = l.nextSibling) g.push(l);else g.push(l);
585
+ }
586
+
587
+ f.apply(this, e);
588
+
589
+ for (e = 0; e < h.length; e++) U(a, h[e]);
590
+
591
+ if (J(this)) for (e = 0; e < g.length; e++) h = g[e], h instanceof Element && S(a, h);
592
+ };
593
+ }
594
+
595
+ var c = Element.prototype;
596
+ void 0 !== ia && (c.before = b(ia));
597
+ void 0 !== ja && (c.after = b(ja));
598
+ void 0 !== ka && (c.replaceWith = function (f) {
599
+ for (var d = [], e = 0; e < arguments.length; ++e) d[e] = arguments[e];
600
+
601
+ e = [];
602
+
603
+ for (var g = [], h = 0; h < d.length; h++) {
604
+ var k = d[h];
605
+ k instanceof Element && J(k) && g.push(k);
606
+ if (k instanceof DocumentFragment) for (k = k.firstChild; k; k = k.nextSibling) e.push(k);else e.push(k);
607
+ }
608
+
609
+ h = J(this);
610
+ ka.apply(this, d);
611
+
612
+ for (d = 0; d < g.length; d++) U(a, g[d]);
613
+
614
+ if (h) for (U(a, this), d = 0; d < e.length; d++) g = e[d], g instanceof Element && S(a, g);
615
+ });
616
+ void 0 !== la && (c.remove = function () {
617
+ var f = J(this);
618
+ la.call(this);
619
+ f && U(a, this);
620
+ });
621
+ }
622
+
623
+ function Da(a) {
624
+ function b(d, e) {
625
+ Object.defineProperty(d, "innerHTML", {
626
+ enumerable: e.enumerable,
627
+ configurable: !0,
628
+ get: e.get,
629
+ set: function (g) {
630
+ var h = this,
631
+ k = void 0;
632
+ J(this) && (k = [], P(a, this, function (x) {
633
+ x !== h && k.push(x);
634
+ }));
635
+ e.set.call(this, g);
636
+ if (k) for (var l = 0; l < k.length; l++) {
637
+ var m = k[l];
638
+ 1 === m.__CE_state && a.disconnectedCallback(m);
639
+ }
640
+ this.ownerDocument.__CE_registry ? V(a, this) : Q(a, this);
641
+ return g;
642
+ }
643
+ });
644
+ }
645
+
646
+ function c(d, e) {
647
+ d.insertAdjacentElement = function (g, h) {
648
+ var k = J(h);
649
+ g = e.call(this, g, h);
650
+ k && U(a, h);
651
+ J(g) && S(a, h);
652
+ return g;
653
+ };
654
+ }
655
+
656
+ function f(d, e) {
657
+ function g(h, k) {
658
+ for (var l = []; h !== k; h = h.nextSibling) l.push(h);
659
+
660
+ for (k = 0; k < l.length; k++) V(a, l[k]);
661
+ }
662
+
663
+ d.insertAdjacentHTML = function (h, k) {
664
+ h = h.toLowerCase();
665
+
666
+ if ("beforebegin" === h) {
667
+ var l = this.previousSibling;
668
+ e.call(this, h, k);
669
+ g(l || this.parentNode.firstChild, this);
670
+ } else if ("afterbegin" === h) l = this.firstChild, e.call(this, h, k), g(this.firstChild, l);else if ("beforeend" === h) l = this.lastChild, e.call(this, h, k), g(l || this.firstChild, null);else if ("afterend" === h) l = this.nextSibling, e.call(this, h, k), g(this.nextSibling, l);else throw new SyntaxError("The value provided (" + String(h) + ") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");
671
+ };
672
+ }
673
+
674
+ y && (Element.prototype.attachShadow = function (d) {
675
+ d = y.call(this, d);
676
+
677
+ if (a.j && !d.__CE_patched) {
678
+ d.__CE_patched = !0;
679
+
680
+ for (var e = 0; e < a.m.length; e++) a.m[e](d);
681
+ }
682
+
683
+ return this.__CE_shadowRoot = d;
684
+ });
685
+ z && z.get ? b(Element.prototype, z) : I && I.get ? b(HTMLElement.prototype, I) : ta(a, function (d) {
686
+ b(d, {
687
+ enumerable: !0,
688
+ configurable: !0,
689
+ get: function () {
690
+ return q.call(this, !0).innerHTML;
691
+ },
692
+ set: function (e) {
693
+ var g = "template" === this.localName,
694
+ h = g ? this.content : this,
695
+ k = p.call(document, this.namespaceURI, this.localName);
696
+
697
+ for (k.innerHTML = e; 0 < h.childNodes.length;) u.call(h, h.childNodes[0]);
698
+
699
+ for (e = g ? k.content : k; 0 < e.childNodes.length;) r.call(h, e.childNodes[0]);
700
+ }
701
+ });
702
+ });
703
+
704
+ Element.prototype.setAttribute = function (d, e) {
705
+ if (1 !== this.__CE_state) return B.call(this, d, e);
706
+ var g = A.call(this, d);
707
+ B.call(this, d, e);
708
+ e = A.call(this, d);
709
+ a.attributeChangedCallback(this, d, g, e, null);
710
+ };
711
+
712
+ Element.prototype.setAttributeNS = function (d, e, g) {
713
+ if (1 !== this.__CE_state) return E.call(this, d, e, g);
714
+ var h = D.call(this, d, e);
715
+ E.call(this, d, e, g);
716
+ g = D.call(this, d, e);
717
+ a.attributeChangedCallback(this, e, h, g, d);
718
+ };
719
+
720
+ Element.prototype.removeAttribute = function (d) {
721
+ if (1 !== this.__CE_state) return C.call(this, d);
722
+ var e = A.call(this, d);
723
+ C.call(this, d);
724
+ null !== e && a.attributeChangedCallback(this, d, e, null, null);
725
+ };
726
+
727
+ Element.prototype.removeAttributeNS = function (d, e) {
728
+ if (1 !== this.__CE_state) return F.call(this, d, e);
729
+ var g = D.call(this, d, e);
730
+ F.call(this, d, e);
731
+ var h = D.call(this, d, e);
732
+ g !== h && a.attributeChangedCallback(this, e, g, h, d);
733
+ };
734
+
735
+ na ? c(HTMLElement.prototype, na) : G && c(Element.prototype, G);
736
+ oa ? f(HTMLElement.prototype, oa) : H && f(Element.prototype, H);
737
+ Z(a, Element.prototype, {
738
+ prepend: fa,
739
+ append: ha
740
+ });
741
+ Ca(a);
742
+ }
743
+ var Ea = {};
744
+
745
+ function Fa(a) {
746
+ function b() {
747
+ var c = this.constructor;
748
+
749
+ var f = document.__CE_registry.C.get(c);
750
+
751
+ if (!f) throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");
752
+ var d = f.constructionStack;
753
+ if (0 === d.length) return d = n.call(document, f.localName), Object.setPrototypeOf(d, c.prototype), d.__CE_state = 1, d.__CE_definition = f, R(a, d), d;
754
+ var e = d.length - 1,
755
+ g = d[e];
756
+ if (g === Ea) throw Error("Failed to construct '" + f.localName + "': This element was already constructed.");
757
+ d[e] = Ea;
758
+ Object.setPrototypeOf(g, c.prototype);
759
+ R(a, g);
760
+ return g;
761
+ }
762
+
763
+ b.prototype = ma.prototype;
764
+ Object.defineProperty(HTMLElement.prototype, "constructor", {
765
+ writable: !0,
766
+ configurable: !0,
767
+ enumerable: !1,
768
+ value: b
769
+ });
770
+ window.HTMLElement = b;
771
+ }
772
+
773
+ function Ga(a) {
774
+ function b(c, f) {
775
+ Object.defineProperty(c, "textContent", {
776
+ enumerable: f.enumerable,
777
+ configurable: !0,
778
+ get: f.get,
779
+ set: function (d) {
780
+ if (this.nodeType === Node.TEXT_NODE) f.set.call(this, d);else {
781
+ var e = void 0;
782
+
783
+ if (this.firstChild) {
784
+ var g = this.childNodes,
785
+ h = g.length;
786
+
787
+ if (0 < h && J(this)) {
788
+ e = Array(h);
789
+
790
+ for (var k = 0; k < h; k++) e[k] = g[k];
791
+ }
792
+ }
793
+
794
+ f.set.call(this, d);
795
+ if (e) for (d = 0; d < e.length; d++) U(a, e[d]);
796
+ }
797
+ }
798
+ });
799
+ }
800
+
801
+ Node.prototype.insertBefore = function (c, f) {
802
+ if (c instanceof DocumentFragment) {
803
+ var d = K(c);
804
+ c = t.call(this, c, f);
805
+ if (J(this)) for (f = 0; f < d.length; f++) S(a, d[f]);
806
+ return c;
807
+ }
808
+
809
+ d = c instanceof Element && J(c);
810
+ f = t.call(this, c, f);
811
+ d && U(a, c);
812
+ J(this) && S(a, c);
813
+ return f;
814
+ };
815
+
816
+ Node.prototype.appendChild = function (c) {
817
+ if (c instanceof DocumentFragment) {
818
+ var f = K(c);
819
+ c = r.call(this, c);
820
+ if (J(this)) for (var d = 0; d < f.length; d++) S(a, f[d]);
821
+ return c;
822
+ }
823
+
824
+ f = c instanceof Element && J(c);
825
+ d = r.call(this, c);
826
+ f && U(a, c);
827
+ J(this) && S(a, c);
828
+ return d;
829
+ };
830
+
831
+ Node.prototype.cloneNode = function (c) {
832
+ c = q.call(this, !!c);
833
+ this.ownerDocument.__CE_registry ? V(a, c) : Q(a, c);
834
+ return c;
835
+ };
836
+
837
+ Node.prototype.removeChild = function (c) {
838
+ var f = c instanceof Element && J(c),
839
+ d = u.call(this, c);
840
+ f && U(a, c);
841
+ return d;
842
+ };
843
+
844
+ Node.prototype.replaceChild = function (c, f) {
845
+ if (c instanceof DocumentFragment) {
846
+ var d = K(c);
847
+ c = v.call(this, c, f);
848
+ if (J(this)) for (U(a, f), f = 0; f < d.length; f++) S(a, d[f]);
849
+ return c;
850
+ }
851
+
852
+ d = c instanceof Element && J(c);
853
+ var e = v.call(this, c, f),
854
+ g = J(this);
855
+ g && U(a, f);
856
+ d && U(a, c);
857
+ g && S(a, c);
858
+ return e;
859
+ };
860
+
861
+ w && w.get ? b(Node.prototype, w) : sa(a, function (c) {
862
+ b(c, {
863
+ enumerable: !0,
864
+ configurable: !0,
865
+ get: function () {
866
+ for (var f = [], d = this.firstChild; d; d = d.nextSibling) d.nodeType !== Node.COMMENT_NODE && f.push(d.textContent);
867
+
868
+ return f.join("");
869
+ },
870
+ set: function (f) {
871
+ for (; this.firstChild;) u.call(this, this.firstChild);
872
+
873
+ null != f && "" !== f && r.call(this, document.createTextNode(f));
874
+ }
875
+ });
876
+ });
877
+ }
878
+ var O = window.customElements;
879
+
880
+ function Ha() {
881
+ var a = new N();
882
+ Fa(a);
883
+ Ba(a);
884
+ Z(a, DocumentFragment.prototype, {
885
+ prepend: da,
886
+ append: ea
887
+ });
888
+ Ga(a);
889
+ Da(a);
890
+ a = new Y(a);
891
+ document.__CE_registry = a;
892
+ Object.defineProperty(window, "customElements", {
893
+ configurable: !0,
894
+ enumerable: !0,
895
+ value: a
896
+ });
897
+ }
898
+
899
+ O && !O.forcePolyfill && "function" == typeof O.define && "function" == typeof O.get || Ha();
900
+ window.__CE_installPolyfill = Ha;
901
+ }).call(self);
902
+
4
903
  /*
5
904
  Details Element Polyfill 2.4.0
6
905
  Copyright © 2019 Javan Makhmali
@@ -228,6 +1127,292 @@ var Super = (function (exports) {
228
1127
  }
229
1128
  })();
230
1129
 
1130
+ const CLOSE_ATTR = 'data-close-dialog';
1131
+ const CLOSE_SELECTOR = `[${CLOSE_ATTR}]`;
1132
+
1133
+ function autofocus(el) {
1134
+ let autofocusElement = Array.from(el.querySelectorAll('[autofocus]')).filter(focusable)[0];
1135
+
1136
+ if (!autofocusElement) {
1137
+ autofocusElement = el;
1138
+ el.setAttribute('tabindex', '-1');
1139
+ }
1140
+
1141
+ autofocusElement.focus();
1142
+ }
1143
+
1144
+ function keydown(event) {
1145
+ const details = event.currentTarget;
1146
+ if (!(details instanceof Element)) return;
1147
+
1148
+ if (event.key === 'Escape' || event.key === 'Esc') {
1149
+ toggleDetails(details, false);
1150
+ event.stopPropagation();
1151
+ } else if (event.key === 'Tab') {
1152
+ restrictTabBehavior(event);
1153
+ }
1154
+ }
1155
+
1156
+ function focusable(el) {
1157
+ return el.tabIndex >= 0 && !el.disabled && visible(el);
1158
+ }
1159
+
1160
+ function visible(el) {
1161
+ return !el.hidden && (!el.type || el.type !== 'hidden') && (el.offsetWidth > 0 || el.offsetHeight > 0);
1162
+ }
1163
+
1164
+ function restrictTabBehavior(event) {
1165
+ if (!(event.currentTarget instanceof Element)) return;
1166
+ const dialog = event.currentTarget.querySelector('details-dialog');
1167
+ if (!dialog) return;
1168
+ event.preventDefault();
1169
+ const elements = Array.from(dialog.querySelectorAll('*')).filter(focusable);
1170
+ if (elements.length === 0) return;
1171
+ const movement = event.shiftKey ? -1 : 1;
1172
+ const root = dialog.getRootNode();
1173
+ const currentFocus = dialog.contains(root.activeElement) ? root.activeElement : null;
1174
+ let targetIndex = movement === -1 ? -1 : 0;
1175
+
1176
+ if (currentFocus instanceof HTMLElement) {
1177
+ const currentIndex = elements.indexOf(currentFocus);
1178
+
1179
+ if (currentIndex !== -1) {
1180
+ targetIndex = currentIndex + movement;
1181
+ }
1182
+ }
1183
+
1184
+ if (targetIndex < 0) {
1185
+ targetIndex = elements.length - 1;
1186
+ } else {
1187
+ targetIndex = targetIndex % elements.length;
1188
+ }
1189
+
1190
+ elements[targetIndex].focus();
1191
+ }
1192
+
1193
+ function allowClosingDialog(details) {
1194
+ const dialog = details.querySelector('details-dialog');
1195
+ if (!(dialog instanceof DetailsDialogElement)) return true;
1196
+ return dialog.dispatchEvent(new CustomEvent('details-dialog-close', {
1197
+ bubbles: true,
1198
+ cancelable: true
1199
+ }));
1200
+ }
1201
+
1202
+ function onSummaryClick(event) {
1203
+ if (!(event.currentTarget instanceof Element)) return;
1204
+ const details = event.currentTarget.closest('details');
1205
+ if (!details || !details.hasAttribute('open')) return;
1206
+
1207
+ if (!allowClosingDialog(details)) {
1208
+ event.preventDefault();
1209
+ event.stopPropagation();
1210
+ }
1211
+ }
1212
+
1213
+ function toggle(event) {
1214
+ const details = event.currentTarget;
1215
+ if (!(details instanceof Element)) return;
1216
+ const dialog = details.querySelector('details-dialog');
1217
+ if (!(dialog instanceof DetailsDialogElement)) return;
1218
+
1219
+ if (details.hasAttribute('open')) {
1220
+ const root = 'getRootNode' in dialog ? dialog.getRootNode() : document;
1221
+
1222
+ if (root.activeElement instanceof HTMLElement) {
1223
+ initialized.set(dialog, {
1224
+ details,
1225
+ activeElement: root.activeElement
1226
+ });
1227
+ }
1228
+
1229
+ autofocus(dialog);
1230
+ details.addEventListener('keydown', keydown);
1231
+ } else {
1232
+ for (const form of dialog.querySelectorAll('form')) {
1233
+ form.reset();
1234
+ }
1235
+
1236
+ const focusElement = findFocusElement(details, dialog);
1237
+ if (focusElement) focusElement.focus();
1238
+ details.removeEventListener('keydown', keydown);
1239
+ }
1240
+ }
1241
+
1242
+ function findFocusElement(details, dialog) {
1243
+ const state = initialized.get(dialog);
1244
+
1245
+ if (state && state.activeElement instanceof HTMLElement) {
1246
+ return state.activeElement;
1247
+ } else {
1248
+ return details.querySelector('summary');
1249
+ }
1250
+ }
1251
+
1252
+ function toggleDetails(details, open) {
1253
+ if (open === details.hasAttribute('open')) return;
1254
+
1255
+ if (open) {
1256
+ details.setAttribute('open', '');
1257
+ } else if (allowClosingDialog(details)) {
1258
+ details.removeAttribute('open');
1259
+ }
1260
+ }
1261
+
1262
+ function loadIncludeFragment(event) {
1263
+ const details = event.currentTarget;
1264
+ if (!(details instanceof Element)) return;
1265
+ const dialog = details.querySelector('details-dialog');
1266
+ if (!(dialog instanceof DetailsDialogElement)) return;
1267
+ const loader = dialog.querySelector('include-fragment:not([src])');
1268
+ if (!loader) return;
1269
+ const src = dialog.src;
1270
+ if (src === null) return;
1271
+ loader.addEventListener('loadend', () => {
1272
+ if (details.hasAttribute('open')) autofocus(dialog);
1273
+ });
1274
+ loader.setAttribute('src', src);
1275
+ removeIncludeFragmentEventListeners(details);
1276
+ }
1277
+
1278
+ function updateIncludeFragmentEventListeners(details, src, preload) {
1279
+ removeIncludeFragmentEventListeners(details);
1280
+
1281
+ if (src) {
1282
+ details.addEventListener('toggle', loadIncludeFragment, {
1283
+ once: true
1284
+ });
1285
+ }
1286
+
1287
+ if (src && preload) {
1288
+ details.addEventListener('mouseover', loadIncludeFragment, {
1289
+ once: true
1290
+ });
1291
+ }
1292
+ }
1293
+
1294
+ function removeIncludeFragmentEventListeners(details) {
1295
+ details.removeEventListener('toggle', loadIncludeFragment);
1296
+ details.removeEventListener('mouseover', loadIncludeFragment);
1297
+ }
1298
+
1299
+ const initialized = new WeakMap();
1300
+
1301
+ class DetailsDialogElement extends HTMLElement {
1302
+ static get CLOSE_ATTR() {
1303
+ return CLOSE_ATTR;
1304
+ }
1305
+
1306
+ static get CLOSE_SELECTOR() {
1307
+ return CLOSE_SELECTOR;
1308
+ }
1309
+
1310
+ constructor() {
1311
+ super();
1312
+ initialized.set(this, {
1313
+ details: null,
1314
+ activeElement: null
1315
+ });
1316
+ this.addEventListener('click', function ({
1317
+ target
1318
+ }) {
1319
+ if (!(target instanceof Element)) return;
1320
+ const details = target.closest('details');
1321
+
1322
+ if (details && target.closest(CLOSE_SELECTOR)) {
1323
+ toggleDetails(details, false);
1324
+ }
1325
+ });
1326
+ }
1327
+
1328
+ get src() {
1329
+ return this.getAttribute('src');
1330
+ }
1331
+
1332
+ set src(value) {
1333
+ this.setAttribute('src', value || '');
1334
+ }
1335
+
1336
+ get preload() {
1337
+ return this.hasAttribute('preload');
1338
+ }
1339
+
1340
+ set preload(value) {
1341
+ value ? this.setAttribute('preload', '') : this.removeAttribute('preload');
1342
+ }
1343
+
1344
+ connectedCallback() {
1345
+ this.setAttribute('role', 'dialog');
1346
+ this.setAttribute('aria-modal', 'true');
1347
+ const state = initialized.get(this);
1348
+ if (!state) return;
1349
+ const details = this.parentElement;
1350
+ if (!details) return;
1351
+ const summary = details.querySelector('summary');
1352
+
1353
+ if (summary) {
1354
+ if (!summary.hasAttribute('role')) summary.setAttribute('role', 'button');
1355
+ summary.addEventListener('click', onSummaryClick, {
1356
+ capture: true
1357
+ });
1358
+ }
1359
+
1360
+ details.addEventListener('toggle', toggle);
1361
+ state.details = details;
1362
+ updateIncludeFragmentEventListeners(details, this.src, this.preload);
1363
+ }
1364
+
1365
+ disconnectedCallback() {
1366
+ const state = initialized.get(this);
1367
+ if (!state) return;
1368
+ const {
1369
+ details
1370
+ } = state;
1371
+ if (!details) return;
1372
+ details.removeEventListener('toggle', toggle);
1373
+ removeIncludeFragmentEventListeners(details);
1374
+ const summary = details.querySelector('summary');
1375
+
1376
+ if (summary) {
1377
+ summary.removeEventListener('click', onSummaryClick, {
1378
+ capture: true
1379
+ });
1380
+ }
1381
+
1382
+ state.details = null;
1383
+ }
1384
+
1385
+ toggle(open) {
1386
+ const state = initialized.get(this);
1387
+ if (!state) return;
1388
+ const {
1389
+ details
1390
+ } = state;
1391
+ if (!details) return;
1392
+ toggleDetails(details, open);
1393
+ }
1394
+
1395
+ static get observedAttributes() {
1396
+ return ['src', 'preload'];
1397
+ }
1398
+
1399
+ attributeChangedCallback() {
1400
+ const state = initialized.get(this);
1401
+ if (!state) return;
1402
+ const {
1403
+ details
1404
+ } = state;
1405
+ if (!details) return;
1406
+ updateIncludeFragmentEventListeners(details, this.src, this.preload);
1407
+ }
1408
+
1409
+ }
1410
+
1411
+ if (!window.customElements.get('details-dialog')) {
1412
+ window.DetailsDialogElement = DetailsDialogElement;
1413
+ window.customElements.define('details-dialog', DetailsDialogElement);
1414
+ }
1415
+
231
1416
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
232
1417
 
233
1418
  function createCommonjsModule(fn) {
@@ -252,8 +1437,8 @@ var Super = (function (exports) {
252
1437
  exclude: 'form button'
253
1438
  },
254
1439
  inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
255
- formSubmitSelector: 'form',
256
- formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
1440
+ formSubmitSelector: 'form:not([data-turbo=true])',
1441
+ formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
257
1442
  formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',
258
1443
  formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',
259
1444
  fileInputSelector: 'input[name][type=file]:not([disabled])',
@@ -1035,9 +2220,7 @@ var Super = (function (exports) {
1035
2220
  }).call(commonjsGlobal);
1036
2221
  });
1037
2222
 
1038
- var EventListener =
1039
- /** @class */
1040
- function () {
2223
+ var EventListener = function () {
1041
2224
  function EventListener(eventTarget, eventName, eventOptions) {
1042
2225
  this.eventTarget = eventTarget;
1043
2226
  this.eventName = eventName;
@@ -1109,9 +2292,7 @@ var Super = (function (exports) {
1109
2292
  }
1110
2293
  }
1111
2294
 
1112
- var Dispatcher =
1113
- /** @class */
1114
- function () {
2295
+ var Dispatcher = function () {
1115
2296
  function Dispatcher(application) {
1116
2297
  this.application = application;
1117
2298
  this.eventListenerMaps = new Map();
@@ -1257,9 +2438,7 @@ var Super = (function (exports) {
1257
2438
  }
1258
2439
  }
1259
2440
 
1260
- var Action =
1261
- /** @class */
1262
- function () {
2441
+ var Action = function () {
1263
2442
  function Action(element, index, descriptor) {
1264
2443
  this.element = element;
1265
2444
  this.index = index;
@@ -1320,9 +2499,7 @@ var Super = (function (exports) {
1320
2499
  throw new Error(message);
1321
2500
  }
1322
2501
 
1323
- var Binding =
1324
- /** @class */
1325
- function () {
2502
+ var Binding = function () {
1326
2503
  function Binding(context, action) {
1327
2504
  this.context = context;
1328
2505
  this.action = action;
@@ -1448,9 +2625,7 @@ var Super = (function (exports) {
1448
2625
  return Binding;
1449
2626
  }();
1450
2627
 
1451
- var ElementObserver =
1452
- /** @class */
1453
- function () {
2628
+ var ElementObserver = function () {
1454
2629
  function ElementObserver(element, delegate) {
1455
2630
  var _this = this;
1456
2631
 
@@ -1617,9 +2792,7 @@ var Super = (function (exports) {
1617
2792
  return ElementObserver;
1618
2793
  }();
1619
2794
 
1620
- var AttributeObserver =
1621
- /** @class */
1622
- function () {
2795
+ var AttributeObserver = function () {
1623
2796
  function AttributeObserver(element, attributeName, delegate) {
1624
2797
  this.attributeName = attributeName;
1625
2798
  this.delegate = delegate;
@@ -1692,9 +2865,7 @@ var Super = (function (exports) {
1692
2865
  return AttributeObserver;
1693
2866
  }();
1694
2867
 
1695
- var StringMapObserver =
1696
- /** @class */
1697
- function () {
2868
+ var StringMapObserver = function () {
1698
2869
  function StringMapObserver(element, delegate) {
1699
2870
  var _this = this;
1700
2871
 
@@ -1845,9 +3016,7 @@ var Super = (function (exports) {
1845
3016
  }
1846
3017
  }
1847
3018
 
1848
- var Multimap =
1849
- /** @class */
1850
- function () {
3019
+ var Multimap = function () {
1851
3020
  function Multimap() {
1852
3021
  this.valuesByKey = new Map();
1853
3022
  }
@@ -1941,7 +3110,6 @@ var Super = (function (exports) {
1941
3110
  };
1942
3111
  }();
1943
3112
 
1944
- /** @class */
1945
3113
  (function (_super) {
1946
3114
  __extends$1(IndexedMultimap, _super);
1947
3115
 
@@ -1984,9 +3152,7 @@ var Super = (function (exports) {
1984
3152
  return IndexedMultimap;
1985
3153
  })(Multimap);
1986
3154
 
1987
- var TokenListObserver =
1988
- /** @class */
1989
- function () {
3155
+ var TokenListObserver = function () {
1990
3156
  function TokenListObserver(element, attributeName, delegate) {
1991
3157
  this.attributeObserver = new AttributeObserver(element, attributeName, this);
1992
3158
  this.delegate = delegate;
@@ -2122,9 +3288,7 @@ var Super = (function (exports) {
2122
3288
  return left && right && left.index == right.index && left.content == right.content;
2123
3289
  }
2124
3290
 
2125
- var ValueListObserver =
2126
- /** @class */
2127
- function () {
3291
+ var ValueListObserver = function () {
2128
3292
  function ValueListObserver(element, attributeName, delegate) {
2129
3293
  this.tokenListObserver = new TokenListObserver(element, attributeName, this);
2130
3294
  this.delegate = delegate;
@@ -2225,9 +3389,7 @@ var Super = (function (exports) {
2225
3389
  return ValueListObserver;
2226
3390
  }();
2227
3391
 
2228
- var BindingObserver =
2229
- /** @class */
2230
- function () {
3392
+ var BindingObserver = function () {
2231
3393
  function BindingObserver(context, delegate) {
2232
3394
  this.context = context;
2233
3395
  this.delegate = delegate;
@@ -2329,9 +3491,7 @@ var Super = (function (exports) {
2329
3491
  return BindingObserver;
2330
3492
  }();
2331
3493
 
2332
- var ValueObserver =
2333
- /** @class */
2334
- function () {
3494
+ var ValueObserver = function () {
2335
3495
  function ValueObserver(context, receiver) {
2336
3496
  this.context = context;
2337
3497
  this.receiver = receiver;
@@ -2409,9 +3569,7 @@ var Super = (function (exports) {
2409
3569
  return ValueObserver;
2410
3570
  }();
2411
3571
 
2412
- var Context =
2413
- /** @class */
2414
- function () {
3572
+ var Context = function () {
2415
3573
  function Context(module, scope) {
2416
3574
  this.module = module;
2417
3575
  this.scope = scope;
@@ -2684,18 +3842,15 @@ var Super = (function (exports) {
2684
3842
  return extendWithReflect;
2685
3843
  } catch (error) {
2686
3844
  return function (constructor) {
2687
- return (
2688
- /** @class */
2689
- function (_super) {
2690
- __extends(extended, _super);
3845
+ return function (_super) {
3846
+ __extends(extended, _super);
2691
3847
 
2692
- function extended() {
2693
- return _super !== null && _super.apply(this, arguments) || this;
2694
- }
3848
+ function extended() {
3849
+ return _super !== null && _super.apply(this, arguments) || this;
3850
+ }
2695
3851
 
2696
- return extended;
2697
- }(constructor)
2698
- );
3852
+ return extended;
3853
+ }(constructor);
2699
3854
  };
2700
3855
  }
2701
3856
  }();
@@ -2709,9 +3864,7 @@ var Super = (function (exports) {
2709
3864
  };
2710
3865
  }
2711
3866
 
2712
- var Module =
2713
- /** @class */
2714
- function () {
3867
+ var Module = function () {
2715
3868
  function Module(application, definition) {
2716
3869
  this.application = application;
2717
3870
  this.definition = blessDefinition(definition);
@@ -2770,9 +3923,7 @@ var Super = (function (exports) {
2770
3923
  return Module;
2771
3924
  }();
2772
3925
 
2773
- var ClassMap =
2774
- /** @class */
2775
- function () {
3926
+ var ClassMap = function () {
2776
3927
  function ClassMap(scope) {
2777
3928
  this.scope = scope;
2778
3929
  }
@@ -2817,9 +3968,7 @@ var Super = (function (exports) {
2817
3968
  });
2818
3969
  }
2819
3970
 
2820
- var DataMap =
2821
- /** @class */
2822
- function () {
3971
+ var DataMap = function () {
2823
3972
  function DataMap(scope) {
2824
3973
  this.scope = scope;
2825
3974
  }
@@ -2872,9 +4021,7 @@ var Super = (function (exports) {
2872
4021
  return DataMap;
2873
4022
  }();
2874
4023
 
2875
- var Guide =
2876
- /** @class */
2877
- function () {
4024
+ var Guide = function () {
2878
4025
  function Guide(logger) {
2879
4026
  this.warnedKeysByObject = new WeakMap();
2880
4027
  this.logger = logger;
@@ -2910,9 +4057,7 @@ var Super = (function (exports) {
2910
4057
  return r;
2911
4058
  };
2912
4059
 
2913
- var TargetSet =
2914
- /** @class */
2915
- function () {
4060
+ var TargetSet = function () {
2916
4061
  function TargetSet(scope) {
2917
4062
  this.scope = scope;
2918
4063
  }
@@ -3033,9 +4178,7 @@ var Super = (function (exports) {
3033
4178
  return r;
3034
4179
  };
3035
4180
 
3036
- var Scope =
3037
- /** @class */
3038
- function () {
4181
+ var Scope = function () {
3039
4182
  function Scope(schema, element, identifier, logger) {
3040
4183
  var _this = this;
3041
4184
 
@@ -3075,9 +4218,7 @@ var Super = (function (exports) {
3075
4218
  return Scope;
3076
4219
  }();
3077
4220
 
3078
- var ScopeObserver =
3079
- /** @class */
3080
- function () {
4221
+ var ScopeObserver = function () {
3081
4222
  function ScopeObserver(element, schema, delegate) {
3082
4223
  this.element = element;
3083
4224
  this.schema = schema;
@@ -3158,9 +4299,7 @@ var Super = (function (exports) {
3158
4299
  return ScopeObserver;
3159
4300
  }();
3160
4301
 
3161
- var Router =
3162
- /** @class */
3163
- function () {
4302
+ var Router = function () {
3164
4303
  function Router(application) {
3165
4304
  this.application = application;
3166
4305
  this.scopeObserver = new ScopeObserver(this.element, this.schema, this);
@@ -3456,9 +4595,7 @@ var Super = (function (exports) {
3456
4595
  return r;
3457
4596
  };
3458
4597
 
3459
- var Application =
3460
- /** @class */
3461
- function () {
4598
+ var Application = function () {
3462
4599
  function Application(element, schema) {
3463
4600
  if (element === void 0) {
3464
4601
  element = document.documentElement;
@@ -3802,9 +4939,7 @@ var Super = (function (exports) {
3802
4939
  return "" + value;
3803
4940
  }
3804
4941
 
3805
- var Controller =
3806
- /** @class */
3807
- function () {
4942
+ var Controller = function () {
3808
4943
  function Controller(context) {
3809
4944
  this.context = context;
3810
4945
  }
@@ -3951,6 +5086,8 @@ var Super = (function (exports) {
3951
5086
  function _possibleConstructorReturn(self, call) {
3952
5087
  if (call && (typeof call === "object" || typeof call === "function")) {
3953
5088
  return call;
5089
+ } else if (call !== void 0) {
5090
+ throw new TypeError("Derived constructors may only return object or undefined");
3954
5091
  }
3955
5092
 
3956
5093
  return _assertThisInitialized(self);
@@ -4015,6 +5152,42 @@ var Super = (function (exports) {
4015
5152
  return _super.apply(this, arguments);
4016
5153
  }
4017
5154
 
5155
+ _createClass(_default, [{
5156
+ key: "submit",
5157
+ value: function submit() {
5158
+ var form = this.element.closest("form");
5159
+ form.method = this.methodValue;
5160
+ form.action = this.actionValue;
5161
+ var authenticityTokenInput = document.createElement("input");
5162
+ authenticityTokenInput.type = "hidden";
5163
+ authenticityTokenInput.name = document.querySelector("meta[name='csrf-param']").content;
5164
+ authenticityTokenInput.value = document.querySelector("meta[name='csrf-token']").content;
5165
+ form.appendChild(authenticityTokenInput);
5166
+ }
5167
+ }], [{
5168
+ key: "values",
5169
+ get: function get() {
5170
+ return {
5171
+ method: String,
5172
+ action: String
5173
+ };
5174
+ }
5175
+ }]);
5176
+
5177
+ return _default;
5178
+ }(Controller);
5179
+
5180
+ var _default$6 = /*#__PURE__*/function (_Controller) {
5181
+ _inherits(_default, _Controller);
5182
+
5183
+ var _super = _createSuper(_default);
5184
+
5185
+ function _default() {
5186
+ _classCallCheck(this, _default);
5187
+
5188
+ return _super.apply(this, arguments);
5189
+ }
5190
+
4018
5191
  _createClass(_default, [{
4019
5192
  key: "call",
4020
5193
  value: function call() {
@@ -4040,7 +5213,7 @@ var Super = (function (exports) {
4040
5213
  return _default;
4041
5214
  }(Controller);
4042
5215
 
4043
- var _default$6 = /*#__PURE__*/function (_Controller) {
5216
+ var _default$5 = /*#__PURE__*/function (_Controller) {
4044
5217
  _inherits(_default, _Controller);
4045
5218
 
4046
5219
  var _super = _createSuper(_default);
@@ -4064,36 +5237,6 @@ var Super = (function (exports) {
4064
5237
  return _default;
4065
5238
  }(Controller);
4066
5239
 
4067
- var _default$5 = /*#__PURE__*/function (_Controller) {
4068
- _inherits(_default, _Controller);
4069
-
4070
- var _super = _createSuper(_default);
4071
-
4072
- function _default() {
4073
- _classCallCheck(this, _default);
4074
-
4075
- return _super.apply(this, arguments);
4076
- }
4077
-
4078
- _createClass(_default, [{
4079
- key: "close",
4080
- value: function close(event) {
4081
- if (!this.element.hasAttribute("open")) {
4082
- return true;
4083
- }
4084
-
4085
- if (this.element === event.target || this.element.contains(event.target)) {
4086
- return true;
4087
- }
4088
-
4089
- this.element.removeAttribute("open");
4090
- return true;
4091
- }
4092
- }]);
4093
-
4094
- return _default;
4095
- }(Controller);
4096
-
4097
5240
  var _default$4 = /*#__PURE__*/function (_Controller) {
4098
5241
  _inherits(_default, _Controller);
4099
5242
 
@@ -6544,9 +7687,9 @@ var Super = (function (exports) {
6544
7687
 
6545
7688
  var StimulusApplication = Application.start();
6546
7689
  StimulusApplication.register("apply-template", _default$8);
6547
- StimulusApplication.register("clean-filter-param", _default$7);
6548
- StimulusApplication.register("clean-filter-params", _default$6);
6549
- StimulusApplication.register("click-outside-to-close", _default$5);
7690
+ StimulusApplication.register("batch", _default$7);
7691
+ StimulusApplication.register("clean-filter-param", _default$6);
7692
+ StimulusApplication.register("clean-filter-params", _default$5);
6550
7693
  StimulusApplication.register("delete", _default$4);
6551
7694
  StimulusApplication.register("flatpickr", _default$3);
6552
7695
  StimulusApplication.register("tab-container", _default$2);
@@ -6560,4 +7703,4 @@ var Super = (function (exports) {
6560
7703
 
6561
7704
  return exports;
6562
7705
 
6563
- }({}));
7706
+ })({});