@spscommerce/ds-web-components 8.45.4 → 8.45.5

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.
package/dist/lib/index.js CHANGED
@@ -23,41 +23,9 @@ var g = {}, ze;
23
23
  function Tt() {
24
24
  if (ze) return g;
25
25
  ze = 1, Object.defineProperty(g, "__esModule", { value: !0 });
26
- /**
27
- * @license
28
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
29
- *
30
- * Licensed under the Apache License, Version 2.0 (the "License");
31
- * you may not use this file except in compliance with the License.
32
- * You may obtain a copy of the License at
33
- *
34
- * http://www.apache.org/licenses/LICENSE-2.0
35
- *
36
- * Unless required by applicable law or agreed to in writing, software
37
- * distributed under the License is distributed on an "AS-IS" BASIS,
38
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
39
- * See the License for the specific language governing permissions and
40
- * limitations under the License.
41
- */
42
26
  var e = {
43
27
  default: "__default"
44
28
  };
45
- /**
46
- * @license
47
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
48
- *
49
- * Licensed under the Apache License, Version 2.0 (the "License");
50
- * you may not use this file except in compliance with the License.
51
- * You may obtain a copy of the License at
52
- *
53
- * http://www.apache.org/licenses/LICENSE-2.0
54
- *
55
- * Unless required by applicable law or agreed to in writing, software
56
- * distributed under the License is distributed on an "AS-IS" BASIS,
57
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
58
- * See the License for the specific language governing permissions and
59
- * limitations under the License.
60
- */
61
29
  var s = Object.prototype.hasOwnProperty;
62
30
  function i() {
63
31
  }
@@ -72,22 +40,6 @@ function Tt() {
72
40
  for (; t.length > n; )
73
41
  t.pop();
74
42
  }
75
- /**
76
- * @license
77
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
78
- *
79
- * Licensed under the Apache License, Version 2.0 (the "License");
80
- * you may not use this file except in compliance with the License.
81
- * You may obtain a copy of the License at
82
- *
83
- * http://www.apache.org/licenses/LICENSE-2.0
84
- *
85
- * Unless required by applicable law or agreed to in writing, software
86
- * distributed under the License is distributed on an "AS-IS" BASIS,
87
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
88
- * See the License for the specific language governing permissions and
89
- * limitations under the License.
90
- */
91
43
  function f(t) {
92
44
  if (t.lastIndexOf("xml:", 0) === 0)
93
45
  return "http://www.w3.org/XML/1998/namespace";
@@ -128,22 +80,6 @@ function Tt() {
128
80
  var l = Z[n] || Z[e.default];
129
81
  l(t, n, a);
130
82
  }
131
- /**
132
- * @license
133
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
134
- *
135
- * Licensed under the Apache License, Version 2.0 (the "License");
136
- * you may not use this file except in compliance with the License.
137
- * You may obtain a copy of the License at
138
- *
139
- * http://www.apache.org/licenses/LICENSE-2.0
140
- *
141
- * Unless required by applicable law or agreed to in writing, software
142
- * distributed under the License is distributed on an "AS-IS" BASIS,
143
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
144
- * See the License for the specific language governing permissions and
145
- * limitations under the License.
146
- */
147
83
  var J = !1, pe = !1;
148
84
  function ye(t, n) {
149
85
  if (!n)
@@ -204,45 +140,13 @@ function Tt() {
204
140
  throw new Error("Expected value to be defined");
205
141
  return t;
206
142
  }
207
- /**
208
- * @license
209
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
210
- *
211
- * Licensed under the Apache License, Version 2.0 (the "License");
212
- * you may not use this file except in compliance with the License.
213
- * You may obtain a copy of the License at
214
- *
215
- * http://www.apache.org/licenses/LICENSE-2.0
216
- *
217
- * Unless required by applicable law or agreed to in writing, software
218
- * distributed under the License is distributed on an "AS-IS" BASIS,
219
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220
- * See the License for the specific language governing permissions and
221
- * limitations under the License.
222
- */
223
143
  var M = {
224
144
  nodesCreated: null,
225
145
  nodesDeleted: null
226
146
  };
227
- /**
228
- * @license
229
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
230
- *
231
- * Licensed under the Apache License, Version 2.0 (the "License");
232
- * you may not use this file except in compliance with the License.
233
- * You may obtain a copy of the License at
234
- *
235
- * http://www.apache.org/licenses/LICENSE-2.0
236
- *
237
- * Unless required by applicable law or agreed to in writing, software
238
- * distributed under the License is distributed on an "AS-IS" BASIS,
239
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
240
- * See the License for the specific language governing permissions and
241
- * limitations under the License.
242
- */
243
147
  var at = (
244
148
  /** @class */
245
- function() {
149
+ (function() {
246
150
  function t() {
247
151
  this.created = [], this.deleted = [];
248
152
  }
@@ -253,24 +157,8 @@ function Tt() {
253
157
  }, t.prototype.notifyChanges = function() {
254
158
  M.nodesCreated && this.created.length > 0 && M.nodesCreated(this.created), M.nodesDeleted && this.deleted.length > 0 && M.nodesDeleted(this.deleted);
255
159
  }, t;
256
- }()
160
+ })()
257
161
  );
258
- /**
259
- * @license
260
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
261
- *
262
- * Licensed under the Apache License, Version 2.0 (the "License");
263
- * you may not use this file except in compliance with the License.
264
- * You may obtain a copy of the License at
265
- *
266
- * http://www.apache.org/licenses/LICENSE-2.0
267
- *
268
- * Unless required by applicable law or agreed to in writing, software
269
- * distributed under the License is distributed on an "AS-IS" BASIS,
270
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
271
- * See the License for the specific language governing permissions and
272
- * limitations under the License.
273
- */
274
162
  function ot(t) {
275
163
  return t.nodeType === 11 || t.nodeType === 9;
276
164
  }
@@ -309,25 +197,9 @@ function Tt() {
309
197
  t.insertBefore(d, l), d = h;
310
198
  }
311
199
  }
312
- /**
313
- * @license
314
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
315
- *
316
- * Licensed under the Apache License, Version 2.0 (the "License");
317
- * you may not use this file except in compliance with the License.
318
- * You may obtain a copy of the License at
319
- *
320
- * http://www.apache.org/licenses/LICENSE-2.0
321
- *
322
- * Unless required by applicable law or agreed to in writing, software
323
- * distributed under the License is distributed on an "AS-IS" BASIS,
324
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
325
- * See the License for the specific language governing permissions and
326
- * limitations under the License.
327
- */
328
200
  var ft = (
329
201
  /** @class */
330
- function() {
202
+ (function() {
331
203
  function t(n, a, l) {
332
204
  this._attrsArr = null, this.staticsApplied = !1, this.nameOrCtor = n, this.key = a, this.text = l;
333
205
  }
@@ -337,7 +209,7 @@ function Tt() {
337
209
  }, t.prototype.getAttrsArr = function(n) {
338
210
  return this._attrsArr || (this._attrsArr = new Array(n));
339
211
  }, t;
340
- }()
212
+ })()
341
213
  );
342
214
  function he(t, n, a, l) {
343
215
  var d = new ft(n, a, l);
@@ -376,22 +248,6 @@ function Tt() {
376
248
  d[y] = S, d[y + 1] = w;
377
249
  }
378
250
  }
379
- /**
380
- * @license
381
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
382
- *
383
- * Licensed under the Apache License, Version 2.0 (the "License");
384
- * you may not use this file except in compliance with the License.
385
- * You may obtain a copy of the License at
386
- *
387
- * http://www.apache.org/licenses/LICENSE-2.0
388
- *
389
- * Unless required by applicable law or agreed to in writing, software
390
- * distributed under the License is distributed on an "AS-IS" BASIS,
391
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
392
- * See the License for the specific language governing permissions and
393
- * limitations under the License.
394
- */
395
251
  function bt(t, n) {
396
252
  return t === "svg" ? "http://www.w3.org/2000/svg" : t === "math" ? "http://www.w3.org/1998/Math/MathML" : n == null || H(n).nameOrCtor === "foreignObject" ? null : n.namespaceURI;
397
253
  }
@@ -409,22 +265,6 @@ function Tt() {
409
265
  var n = t.createTextNode("");
410
266
  return he(n, "#text", null), n;
411
267
  }
412
- /**
413
- * @license
414
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
415
- *
416
- * Licensed under the Apache License, Version 2.0 (the "License");
417
- * you may not use this file except in compliance with the License.
418
- * You may obtain a copy of the License at
419
- *
420
- * http://www.apache.org/licenses/LICENSE-2.0
421
- *
422
- * Unless required by applicable law or agreed to in writing, software
423
- * distributed under the License is distributed on an "AS-IS" BASIS,
424
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
425
- * See the License for the specific language governing permissions and
426
- * limitations under the License.
427
- */
428
268
  var q = null, v = null, x = null, T = null, ie = [], re = [];
429
269
  function ae() {
430
270
  return re;
@@ -508,22 +348,6 @@ function Tt() {
508
348
  function Ot() {
509
349
  process.env.NODE_ENV !== "production" && (it("skip", v), se(!0)), v = x.lastChild;
510
350
  }
511
- /**
512
- * @license
513
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
514
- *
515
- * Licensed under the Apache License, Version 2.0 (the "License");
516
- * you may not use this file except in compliance with the License.
517
- * You may obtain a copy of the License at
518
- *
519
- * http://www.apache.org/licenses/LICENSE-2.0
520
- *
521
- * Unless required by applicable law or agreed to in writing, software
522
- * distributed under the License is distributed on an "AS-IS" BASIS,
523
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
524
- * See the License for the specific language governing permissions and
525
- * limitations under the License.
526
- */
527
351
  var je = 3, I = r();
528
352
  function Dt(t, n, a) {
529
353
  if (n.staticsApplied = !0, !(!a || !a.length)) {
@@ -615,22 +439,6 @@ function Tt() {
615
439
  }
616
440
  return n;
617
441
  }
618
- /**
619
- * @license
620
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
621
- *
622
- * Licensed under the Apache License, Version 2.0 (the "License");
623
- * you may not use this file except in compliance with the License.
624
- * You may obtain a copy of the License at
625
- *
626
- * http://www.apache.org/licenses/LICENSE-2.0
627
- *
628
- * Unless required by applicable law or agreed to in writing, software
629
- * distributed under the License is distributed on an "AS-IS" BASIS,
630
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
631
- * See the License for the specific language governing permissions and
632
- * limitations under the License.
633
- */
634
442
  return g.applyAttr = V, g.applyProp = xe, g.attributes = Z, g.close = Be, g.currentElement = St, g.currentPointer = At, g.open = $e, g.patch = Ee, g.patchInner = Ee, g.patchOuter = _t, g.skip = Ot, g.skipNode = fe, g.getKey = mt, g.clearCache = De, g.importNode = Oe, g.isDataInitialized = gt, g.notifications = M, g.symbols = e, g.attr = kt, g.elementClose = Te, g.elementOpen = ge, g.elementOpenEnd = It, g.elementOpenStart = Pt, g.elementVoid = Lt, g.text = Ft, g.key = Et, g;
635
443
  }
636
444
  var A = Tt();
@@ -638,7 +446,7 @@ function Ve(e) {
638
446
  let s = A.currentPointer();
639
447
  return s instanceof Comment && s.data !== e ? s.data = e : (s = document.createComment(e), A.currentElement().appendChild(s)), A.skipNode(), s;
640
448
  }
641
- const U = Symbol("ComponentMetadata"), E = Object.freeze({
449
+ const U = /* @__PURE__ */ Symbol("ComponentMetadata"), E = Object.freeze({
642
450
  has(e, s) {
643
451
  return !!(e[U] && Object.prototype.hasOwnProperty.call(e[U], s));
644
452
  },
@@ -648,7 +456,7 @@ const U = Symbol("ComponentMetadata"), E = Object.freeze({
648
456
  get(e, s, i) {
649
457
  return e[U] && e[U][s] || i;
650
458
  }
651
- }), We = Symbol("ds-web-components:pragma:listeners-attached"), qe = "idom-pragma:content-begin", me = "idom-pragma:content-end";
459
+ }), We = /* @__PURE__ */ Symbol("ds-web-components:pragma:listeners-attached"), qe = "idom-pragma:content-begin", me = "idom-pragma:content-end";
652
460
  function ve(e) {
653
461
  for (const s of e)
654
462
  if (typeof s == "function")
@@ -706,7 +514,7 @@ function as(e) {
706
514
  }
707
515
  };
708
516
  }
709
- const He = Symbol("Component Attribute Bindings"), K = Symbol("Component Class Bindings"), be = Symbol("Component Style Bindings"), Ut = {
517
+ const He = /* @__PURE__ */ Symbol("Component Attribute Bindings"), K = /* @__PURE__ */ Symbol("Component Class Bindings"), be = /* @__PURE__ */ Symbol("Component Style Bindings"), Ut = {
710
518
  __initialized: !1,
711
519
  __observer: null,
712
520
  __queuedUpdate: null,
@@ -1,186 +1,6 @@
1
- (function(i,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("@spscommerce/ds-shared"),require("@spscommerce/utils"),require("@spscommerce/i18n")):typeof define=="function"&&define.amd?define(["exports","@spscommerce/ds-shared","@spscommerce/utils","@spscommerce/i18n"],L):(i=typeof globalThis<"u"?globalThis:i||self,L(i.DSWebComponents={},i.dsShared,i.utils,i.i18n))})(this,function(i,L,f,D){"use strict";const Ke={};var g={},_e;function Qe(){if(_e)return g;_e=1,Object.defineProperty(g,"__esModule",{value:!0});/**
2
- * @license
3
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS-IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */var e={default:"__default"};/**
17
- * @license
18
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
19
- *
20
- * Licensed under the Apache License, Version 2.0 (the "License");
21
- * you may not use this file except in compliance with the License.
22
- * You may obtain a copy of the License at
23
- *
24
- * http://www.apache.org/licenses/LICENSE-2.0
25
- *
26
- * Unless required by applicable law or agreed to in writing, software
27
- * distributed under the License is distributed on an "AS-IS" BASIS,
28
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
- * See the License for the specific language governing permissions and
30
- * limitations under the License.
31
- */var t=Object.prototype.hasOwnProperty;function a(){}a.prototype=Object.create(null);function r(n,s){return t.call(n,s)}function l(){return new a}function p(n,s){for(;n.length>s;)n.pop()}/**
32
- * @license
33
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
34
- *
35
- * Licensed under the Apache License, Version 2.0 (the "License");
36
- * you may not use this file except in compliance with the License.
37
- * You may obtain a copy of the License at
38
- *
39
- * http://www.apache.org/licenses/LICENSE-2.0
40
- *
41
- * Unless required by applicable law or agreed to in writing, software
42
- * distributed under the License is distributed on an "AS-IS" BASIS,
43
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
- * See the License for the specific language governing permissions and
45
- * limitations under the License.
46
- */function u(n){if(n.lastIndexOf("xml:",0)===0)return"http://www.w3.org/XML/1998/namespace";if(n.lastIndexOf("xlink:",0)===0)return"http://www.w3.org/1999/xlink"}function R(n,s,o){if(o==null)n.removeAttribute(s);else{var c=u(s);c?n.setAttributeNS(c,s,String(o)):n.setAttribute(s,String(o))}}function xe(n,s,o){n[s]=o}function mt(n,s,o){s.indexOf("-")>=0?n.setProperty(s,o):n[s]=o}function gt(n,s,o){if(typeof o=="string")n.style.cssText=o;else{n.style.cssText="";var c=n.style;for(var h in o)r(o,h)&&mt(c,h,o[h])}}function vt(n,s,o){var c=typeof o;c==="object"||c==="function"?xe(n,s,o):R(n,s,o)}var K=l();K[e.default]=vt,K.style=gt;function Q(n,s,o){var c=K[s]||K[e.default];c(n,s,o)}/**
47
- * @license
48
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
49
- *
50
- * Licensed under the Apache License, Version 2.0 (the "License");
51
- * you may not use this file except in compliance with the License.
52
- * You may obtain a copy of the License at
53
- *
54
- * http://www.apache.org/licenses/LICENSE-2.0
55
- *
56
- * Unless required by applicable law or agreed to in writing, software
57
- * distributed under the License is distributed on an "AS-IS" BASIS,
58
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
- * See the License for the specific language governing permissions and
60
- * limitations under the License.
61
- */var Z=!1,ge=!1;function Fe(n,s){if(!s)throw new Error("Cannot call "+n+"() unless in patch.")}function Ct(n,s){if(n!==s){for(var o=n,c=[];o&&o!==s;)c.push(o.nodeName.toLowerCase()),o=o.parentNode;throw new Error(`One or more tags were not closed:
1
+ (function(i,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("@spscommerce/ds-shared"),require("@spscommerce/utils"),require("@spscommerce/i18n")):typeof define=="function"&&define.amd?define(["exports","@spscommerce/ds-shared","@spscommerce/utils","@spscommerce/i18n"],L):(i=typeof globalThis<"u"?globalThis:i||self,L(i.DSWebComponents={},i.dsShared,i.utils,i.i18n))})(this,(function(i,L,f,D){"use strict";const Ke={};var g={},_e;function Qe(){if(_e)return g;_e=1,Object.defineProperty(g,"__esModule",{value:!0});var e={default:"__default"};var t=Object.prototype.hasOwnProperty;function a(){}a.prototype=Object.create(null);function r(n,s){return t.call(n,s)}function l(){return new a}function p(n,s){for(;n.length>s;)n.pop()}function u(n){if(n.lastIndexOf("xml:",0)===0)return"http://www.w3.org/XML/1998/namespace";if(n.lastIndexOf("xlink:",0)===0)return"http://www.w3.org/1999/xlink"}function R(n,s,o){if(o==null)n.removeAttribute(s);else{var c=u(s);c?n.setAttributeNS(c,s,String(o)):n.setAttribute(s,String(o))}}function xe(n,s,o){n[s]=o}function mt(n,s,o){s.indexOf("-")>=0?n.setProperty(s,o):n[s]=o}function gt(n,s,o){if(typeof o=="string")n.style.cssText=o;else{n.style.cssText="";var c=n.style;for(var h in o)r(o,h)&&mt(c,h,o[h])}}function vt(n,s,o){var c=typeof o;c==="object"||c==="function"?xe(n,s,o):R(n,s,o)}var K=l();K[e.default]=vt,K.style=gt;function Q(n,s,o){var c=K[s]||K[e.default];c(n,s,o)}var Z=!1,ge=!1;function Fe(n,s){if(!s)throw new Error("Cannot call "+n+"() unless in patch.")}function Ct(n,s){if(n!==s){for(var o=n,c=[];o&&o!==s;)c.push(o.nodeName.toLowerCase()),o=o.parentNode;throw new Error(`One or more tags were not closed:
62
2
  `+c.join(`
63
- `))}}function bt(n){n||console.warn("patchOuter requires the node have a parent if there is a key.")}function H(n){if(Z)throw new Error(n+"() can not be called between elementOpenStart() and elementOpenEnd().")}function ke(n){if(ge)throw new Error(n+"() may not be called inside an element that has called skip().")}function ve(n){if(!Z)throw new Error(n+"() can only be called after calling elementOpenStart().")}function wt(){if(Z)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")}function St(n,s){if(n!==s)throw new Error('Received a call to close "'+s+'" but "'+n+'" was open.')}function _t(n,s){if(s!==null)throw new Error(n+"() must come before any child declarations inside the current element.")}function Nt(n,s,o,c){ie(n);var h=n,m=s,y=m.nextSibling===o&&m.previousSibling===c,b=m.nextSibling===h.nextSibling&&m.previousSibling===c,A=m===h;if(!y&&!b&&!A)throw new Error("There must be exactly one top level call corresponding to the patched element.")}function ne(n){var s=Z;return Z=n,s}function se(n){var s=ge;return ge=n,s}function ie(n){if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Expected value to be defined");return n}/**
64
- * @license
65
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
66
- *
67
- * Licensed under the Apache License, Version 2.0 (the "License");
68
- * you may not use this file except in compliance with the License.
69
- * You may obtain a copy of the License at
70
- *
71
- * http://www.apache.org/licenses/LICENSE-2.0
72
- *
73
- * Unless required by applicable law or agreed to in writing, software
74
- * distributed under the License is distributed on an "AS-IS" BASIS,
75
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
- * See the License for the specific language governing permissions and
77
- * limitations under the License.
78
- */var Y={nodesCreated:null,nodesDeleted:null};/**
79
- * @license
80
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
81
- *
82
- * Licensed under the Apache License, Version 2.0 (the "License");
83
- * you may not use this file except in compliance with the License.
84
- * You may obtain a copy of the License at
85
- *
86
- * http://www.apache.org/licenses/LICENSE-2.0
87
- *
88
- * Unless required by applicable law or agreed to in writing, software
89
- * distributed under the License is distributed on an "AS-IS" BASIS,
90
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
91
- * See the License for the specific language governing permissions and
92
- * limitations under the License.
93
- */var yt=function(){function n(){this.created=[],this.deleted=[]}return n.prototype.markCreated=function(s){this.created.push(s)},n.prototype.markDeleted=function(s){this.deleted.push(s)},n.prototype.notifyChanges=function(){Y.nodesCreated&&this.created.length>0&&Y.nodesCreated(this.created),Y.nodesDeleted&&this.deleted.length>0&&Y.nodesDeleted(this.deleted)},n}();/**
94
- * @license
95
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
96
- *
97
- * Licensed under the Apache License, Version 2.0 (the "License");
98
- * you may not use this file except in compliance with the License.
99
- * You may obtain a copy of the License at
100
- *
101
- * http://www.apache.org/licenses/LICENSE-2.0
102
- *
103
- * Unless required by applicable law or agreed to in writing, software
104
- * distributed under the License is distributed on an "AS-IS" BASIS,
105
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
- * See the License for the specific language governing permissions and
107
- * limitations under the License.
108
- */function At(n){return n.nodeType===11||n.nodeType===9}function Ce(n){return n.nodeType===1}function Ot(n){return n.nodeType===3}function Dt(n,s){for(var o=[],c=n;c!==s;){var h=c;o.push(h),c=h.parentNode}return o}var Pt=Node.prototype.getRootNode||function(){for(var n=this,s=n;n;)s=n,n=n.parentNode;return s};function Et(n){var s=Pt.call(n);return At(s)?s.activeElement:null}function It(n,s){var o=Et(n);return!o||!n.contains(o)?[]:Dt(o,s)}function xt(n,s,o){for(var c=s.nextSibling,h=o;h!==null&&h!==s;){var m=h.nextSibling;n.insertBefore(h,c),h=m}}/**
109
- * @license
110
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
111
- *
112
- * Licensed under the Apache License, Version 2.0 (the "License");
113
- * you may not use this file except in compliance with the License.
114
- * You may obtain a copy of the License at
115
- *
116
- * http://www.apache.org/licenses/LICENSE-2.0
117
- *
118
- * Unless required by applicable law or agreed to in writing, software
119
- * distributed under the License is distributed on an "AS-IS" BASIS,
120
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121
- * See the License for the specific language governing permissions and
122
- * limitations under the License.
123
- */var Ft=function(){function n(s,o,c){this._attrsArr=null,this.staticsApplied=!1,this.nameOrCtor=s,this.key=o,this.text=c}return n.prototype.hasEmptyAttrsArr=function(){var s=this._attrsArr;return!s||!s.length},n.prototype.getAttrsArr=function(s){return this._attrsArr||(this._attrsArr=new Array(s))},n}();function be(n,s,o,c){var h=new Ft(s,o,c);return n.__incrementalDOMData=h,h}function q(n,s){return Le(n,s)}function kt(n){return!!n.__incrementalDOMData}function Lt(n){return ie(n.__incrementalDOMData),q(n).key}function Le(n,s){if(n.__incrementalDOMData)return n.__incrementalDOMData;var o=Ce(n)?n.localName:n.nodeName,c=Ce(n)?n.getAttribute("key")||s:null,h=Ot(n)?n.data:void 0,m=be(n,o,c,h);return Ce(n)&&Tt(n,m),m}function Te(n){Le(n);for(var s=n.firstChild;s;s=s.nextSibling)Te(s)}function Ue(n){n.__incrementalDOMData=null;for(var s=n.firstChild;s;s=s.nextSibling)Ue(s)}function Tt(n,s){var o=n.attributes,c=o.length;if(c)for(var h=s.getAttrsArr(c),m=0,y=0;m<c;m+=1,y+=2){var b=o[m],A=b.name,_=b.value;h[y]=A,h[y+1]=_}}/**
124
- * @license
125
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
126
- *
127
- * Licensed under the Apache License, Version 2.0 (the "License");
128
- * you may not use this file except in compliance with the License.
129
- * You may obtain a copy of the License at
130
- *
131
- * http://www.apache.org/licenses/LICENSE-2.0
132
- *
133
- * Unless required by applicable law or agreed to in writing, software
134
- * distributed under the License is distributed on an "AS-IS" BASIS,
135
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136
- * See the License for the specific language governing permissions and
137
- * limitations under the License.
138
- */function Ut(n,s){return n==="svg"?"http://www.w3.org/2000/svg":n==="math"?"http://www.w3.org/1998/Math/MathML":s==null||q(s).nameOrCtor==="foreignObject"?null:s.namespaceURI}function Rt(n,s,o,c){var h;if(typeof o=="function")h=new o;else{var m=Ut(o,s);m?h=n.createElementNS(m,o):h=n.createElement(o)}return be(h,o,c),h}function $t(n){var s=n.createTextNode("");return be(s,"#text",null),s}/**
139
- * @license
140
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
141
- *
142
- * Licensed under the Apache License, Version 2.0 (the "License");
143
- * you may not use this file except in compliance with the License.
144
- * You may obtain a copy of the License at
145
- *
146
- * http://www.apache.org/licenses/LICENSE-2.0
147
- *
148
- * Unless required by applicable law or agreed to in writing, software
149
- * distributed under the License is distributed on an "AS-IS" BASIS,
150
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
151
- * See the License for the specific language governing permissions and
152
- * limitations under the License.
153
- */var G=null,C=null,N=null,z=null,ae=[],re=[];function oe(){return re}function Re(n){var s=function(o,c,h){var m=G,y=z,b=ae,A=re,_=C,I=N,k=!1,ce=!1;G=new yt,z=o.ownerDocument,re=[],N=o.parentNode,ae=It(o,N),process.env.NODE_ENV!=="production"&&(k=ne(!1),ce=se(!1));try{var Mt=n(o,c,h);return process.env.NODE_ENV!=="production"&&wt(),Mt}finally{z=y,re=A,C=_,N=I,ae=b,G.notifyChanges(),ne(k),se(ce),G=m}};return s}var $e=Re(function(n,s,o){return C=n,ze(),s(o),Ve(),process.env.NODE_ENV!=="production"&&Ct(C,n),n}),Bt=Re(function(n,s,o){var c={nextSibling:n},h=null,m=null;return process.env.NODE_ENV!=="production"&&(h=n.nextSibling,m=n.previousSibling),C=c,s(o),process.env.NODE_ENV!=="production"&&(bt(N),Nt(c,C,h,m)),N&&We(N,le(),n.nextSibling),c===C?null:C});function Be(n,s,o){var c=q(n,o);return s==c.nameOrCtor&&o==c.key}function jt(n,s,o){if(!n)return null;if(Be(n,s,o))return n;if(o){for(;n=n.nextSibling;)if(Be(n,s,o))return n}return null}function Wt(n,s){var o;return n==="#text"?o=$t(z):o=Rt(z,N,n,s),G.markCreated(o),o}function je(n,s){var o=jt(C,n,s),c=o||Wt(n,s);c!==C&&(ae.indexOf(c)>=0?xt(N,c,C):N.insertBefore(c,C),C=c)}function We(n,s,o){for(var c=n,h=s;h!==o;){var m=h.nextSibling;c.removeChild(h),G.markDeleted(h),h=m}}function ze(){N=C,C=null}function le(){return C?C.nextSibling:N.firstChild}function we(){C=le()}function Ve(){We(N,le(),null),C=N,N=N.parentNode}function He(n,s){return we(),je(n,s),ze(),N}function qe(){return process.env.NODE_ENV!=="production"&&se(!1),Ve(),C}function zt(){return we(),je("#text",null),C}function Vt(){return process.env.NODE_ENV!=="production"&&(Fe("currentElement",z),H("currentElement")),N}function Ht(){return process.env.NODE_ENV!=="production"&&(Fe("currentPointer",z),H("currentPointer")),le()}function qt(){process.env.NODE_ENV!=="production"&&(_t("skip",C),se(!0)),C=N.lastChild}/**
154
- * @license
155
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
156
- *
157
- * Licensed under the Apache License, Version 2.0 (the "License");
158
- * you may not use this file except in compliance with the License.
159
- * You may obtain a copy of the License at
160
- *
161
- * http://www.apache.org/licenses/LICENSE-2.0
162
- *
163
- * Unless required by applicable law or agreed to in writing, software
164
- * distributed under the License is distributed on an "AS-IS" BASIS,
165
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
166
- * See the License for the specific language governing permissions and
167
- * limitations under the License.
168
- */var Ge=3,x=l();function Gt(n,s,o){if(s.staticsApplied=!0,!(!o||!o.length)){if(s.hasEmptyAttrsArr()){for(var c=0;c<o.length;c+=2)Q(n,o[c],o[c+1]);return}for(var c=0;c<o.length;c+=2)x[o[c]]=c+1;for(var h=s.getAttrsArr(0),m=0,c=0;c<h.length;c+=2){var y=h[c],b=h[c+1],A=x[y];if(A){o[A]===b&&delete x[y];continue}h[m]=y,h[m+1]=b,m+=2}p(h,m);for(var y in x)Q(n,y,o[x[y]]),delete x[y]}}function Se(n,s,o){process.env.NODE_ENV!=="production"&&(H("elementOpen"),ke("elementOpen"));var c=He(n,s),h=q(c);h.staticsApplied||Gt(c,h,o);var m=Math.max(0,arguments.length-Ge),y=h.hasEmptyAttrsArr();if(!m&&y)return c;for(var b=h.getAttrsArr(m),A=Ge,_=0;A<arguments.length;A+=2,_+=2){var I=arguments[A];if(y)b[_]=I;else if(b[_]!==I)break;var k=arguments[A+1];(y||b[_+1]!==k)&&(b[_+1]=k,Q(c,I,k))}if(A<arguments.length||_<b.length){for(var ce=_;_<b.length;_+=2)x[b[_]]=b[_+1];for(_=ce;A<arguments.length;A+=2,_+=2){var I=arguments[A],k=arguments[A+1];x[I]!==k&&Q(c,I,k),b[_]=I,b[_+1]=k,delete x[I]}p(b,_);for(var I in x)Q(c,I,void 0),delete x[I]}return c}function Xt(n,s,o){var c=oe();process.env.NODE_ENV!=="production"&&(H("elementOpenStart"),ne(!0)),c[0]=n,c[1]=s,c[2]=o}function Kt(n){var s=oe();process.env.NODE_ENV!=="production"&&(ve("key"),ie(s)),s[1]=n}function Qt(n,s){var o=oe();process.env.NODE_ENV!=="production"&&ve("attr"),o.push(n),o.push(s)}function Zt(){var n=oe();process.env.NODE_ENV!=="production"&&(ve("elementOpenEnd"),ne(!1)),ie(n);var s=Se.apply(null,n);return p(n,0),s}function Xe(n){process.env.NODE_ENV!=="production"&&H("elementClose");var s=qe();return process.env.NODE_ENV!=="production"&&St(q(s).nameOrCtor,n),s}function Yt(n,s,o){return Se.apply(null,arguments),Xe(n)}function Jt(n){process.env.NODE_ENV!=="production"&&(H("text"),ke("text"));var s=zt(),o=q(s);if(o.text!==n){o.text=n;for(var c=n,h=1;h<arguments.length;h+=1){var m=arguments[h];c=m(c)}s.data=c}return s}/**
169
- * @license
170
- * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
171
- *
172
- * Licensed under the Apache License, Version 2.0 (the "License");
173
- * you may not use this file except in compliance with the License.
174
- * You may obtain a copy of the License at
175
- *
176
- * http://www.apache.org/licenses/LICENSE-2.0
177
- *
178
- * Unless required by applicable law or agreed to in writing, software
179
- * distributed under the License is distributed on an "AS-IS" BASIS,
180
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
181
- * See the License for the specific language governing permissions and
182
- * limitations under the License.
183
- */return g.applyAttr=R,g.applyProp=xe,g.attributes=K,g.close=qe,g.currentElement=Vt,g.currentPointer=Ht,g.open=He,g.patch=$e,g.patchInner=$e,g.patchOuter=Bt,g.skip=qt,g.skipNode=we,g.getKey=Lt,g.clearCache=Ue,g.importNode=Te,g.isDataInitialized=kt,g.notifications=Y,g.symbols=e,g.attr=Qt,g.elementClose=Xe,g.elementOpen=Se,g.elementOpenEnd=Zt,g.elementOpenStart=Xt,g.elementVoid=Yt,g.text=Jt,g.key=Kt,g}var O=Qe();function Ne(e){let t=O.currentPointer();return t instanceof Comment&&t.data!==e?t.data=e:(t=document.createComment(e),O.currentElement().appendChild(t)),O.skipNode(),t}const $=Symbol("ComponentMetadata"),P=Object.freeze({has(e,t){return!!(e[$]&&Object.prototype.hasOwnProperty.call(e[$],t))},add(e,t){e[$]?Object.assign(e[$],t):e[$]=t},get(e,t,a){return e[$]&&e[$][t]||a}}),ye=Symbol("ds-web-components:pragma:listeners-attached"),Ae="idom-pragma:content-begin",pe="idom-pragma:content-end";function de(e){for(const t of e)if(typeof t=="function")t();else if(typeof t=="string")O.text(t);else if(t instanceof Set)de(Array.from(t));else if(Array.isArray(t)&&t.length>0){let a=O.currentPointer();if(Ne(Ae),a===null){const r=O.currentElement();for(let l=0;l<t.length;l+=1)r.contains(t[l])||r.appendChild(t[l]),O.skipNode()}for(;a&&a.data!==pe;)O.skipNode(),a=O.currentPointer();Ne(pe)}}function d(e,t,...a){if(t){for(const r of Object.keys(t))if(r.toUpperCase()==="DATA-FRAGMENT")return()=>de(a)}return()=>{O.elementOpenStart(e);const r=[];if(t)for(const p of Object.keys(t))p.toUpperCase()==="CLASSNAME"?O.attr("class",t[p]):/^on[A-Z]/.test(p)?r.push(p):O.attr(p,t[p]);O.elementOpenEnd(e);const l=O.currentElement();if(!l[ye]){for(const p of r)l.addEventListener(p.substr(2).toLowerCase(),t[p]);l[ye]=!0}de(a),O.elementClose(e)}}function Oe(e,t){customElements.get(e)||customElements.define(e,t)}function Ze(...e){for(const t of e)Oe(P.get(t,"tag"),t)}function Ye(e){return function(...a){for(const r of a){const l=`${e}${P.get(r,"tag").substr(3)}`;Oe(l,r)}}}const he=Symbol("Component Attribute Bindings"),B=Symbol("Component Class Bindings"),J=Symbol("Component Style Bindings"),Je={__initialized:!1,__observer:null,__queuedUpdate:null,__managedClasses:new Set,__updateHostBindings(){const e=this;for(const t of Object.keys(e[he]||{}))e.setAttribute(t,e[he][t]);for(const t of Object.keys(e[J]||{}))e.style[t]=e[J][t];for(const t of e.__managedClasses)e.classList.remove(t);for(const t of(e[B]||[]).filter(Boolean))e.__managedClasses.add(t),e.classList.add(t);for(const t of(e.getAttribute("classname")||"").split(/\w+/).filter(Boolean))e.classList.add(t)},__updateChildQueries(e){const t=this;for(const a of P.get(t.constructor,"childQueries",[]))if(!e||e&&a.refresh){const r=a.all?t.querySelectorAll:t.querySelector;t[a.key]=r.call(t,a.selector)}},__gatherChildren(){const e=this;let t=Array.from(e.childNodes),a=null,r=t.length;for(let l=0;l<t.length;l+=1){const p=t[l];p instanceof Comment&&(p.data===Ae?a=l+1:p.data===pe&&(r=l-1))}if(a===null)for(const l of t)l.parentNode.removeChild(l);else t=t.slice(a,r);P.has(e.constructor,"contentProp")&&(e[P.get(e.constructor,"contentProp")]=t)},__startMutObs(){const e=this;e.__observer||(e.__observer=new MutationObserver(()=>{e.contentChangedCallback&&e.contentChangedCallback(),e.__gatherChildren(),e.update()})),e.__observer.observe(e,{childList:!0})},__stopMutObs(){const e=this;e.__observer&&e.__observer.disconnect()},__doRender(){const e=this;e.__stopMutObs(),O.patch(e,e.render()),e.__startMutObs()},update(){const e=this;e.__initialized&&!e.__queuedUpdate&&(e.__queuedUpdate=window.requestAnimationFrame(()=>{e.__doRender(),setTimeout(()=>{e.__updateChildQueries(!0),e.__updateHostBindings()},0),e.__queuedUpdate=null}))},attributeChangedCallback(e,t,a){const r=this,l=a===""?!0:a;l!==t&&(r.__cbAttributeChanged&&r.__cbAttributeChanged(e,r[e],l),e!=="style"&&(r[e]=l),r.__initialized&&r.update())},connectedCallback(){const e=this;e.__cbConnected&&e.__cbConnected();const t=P.get(e.constructor,"eventListeners",[]);setTimeout(()=>{if(!e.__initialized){e.__gatherChildren();for(const[,a]of t)e[a]=e[a].bind(e);e.__initialized=!0}for(const[a,r]of t)e.addEventListener(a,e[r]);e.__doRender(),setTimeout(()=>{e.__updateChildQueries(),e.__updateHostBindings()},0)},0)},disconnectedCallback(){const e=this;e.__cbDisconnected&&e.__cbDisconnected();for(const[t,a]of P.get(e.constructor,"eventListeners",[]))e.removeEventListener(t,e[a]);e.__stopMutObs()}};function j(e){return t=>{P.add(t,e),Object.assign(t.prototype,{__cbAttributeChanged:t.prototype.attributeChangedCallback,__cbConnected:t.prototype.connectedCallback,__cbDisconnected:t.prototype.disconnectedCallback},Je)}}function M(){return(e,t)=>{P.add(e.constructor,{contentProp:t})}}function ee(e){return(t,a)=>{Object.defineProperty(t,a,{get(){return Object.defineProperty(this,a,{value:{dispatch:r=>{const l=new CustomEvent(e||a,{detail:r});return this.dispatchEvent(l),l}}}),this[a]},configurable:!0})}}function X(e){return(t,a)=>{const r=P.get(t.constructor,"eventListeners",[]);r.push([e,a]),P.add(t.constructor,{eventListeners:r})}}function v(e){return(t,a)=>{const r=t.constructor,l=a.toLowerCase();if(r.observedAttributes=r.observedAttributes||["classname","className","style"],r.observedAttributes.push(a),r.observedAttributes.push(l),l!==a&&Object.defineProperty(t,a,{get(){return this[l]},set(p){this[l]=p}}),e){const p=Symbol.for(a);Object.defineProperty(t,l,{get(){return this[p]},set(u){let R=u;e===Boolean&&typeof u=="string"&&u.toLowerCase()==="false"?R=!1:R=e(u),this[p]=R}})}}}function De(e,t,a){return(r,l)=>{const p=P.get(r.constructor,"childQueries",[]);p.push({key:l,selector:e,all:a,refresh:t.refresh}),P.add(r.constructor,{childQueries:p})}}function te(e,t={}){return De(e,t)}function Pe(e,t={}){return De(e,t,!0)}function ue(){return(e,t)=>{const a=Symbol(t);Object.defineProperties(e,{[a]:{writable:!0,enumerable:!1,configurable:!1,value:e[t]},[t]:{get(){return this[a]},set(r){this[a]!==r&&(this[a]=r,this.update())}}})}}var fe=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(fe||{}),Me=Object.defineProperty,et=Object.getOwnPropertyDescriptor,w=(e,t,a,r)=>{for(var l=r>1?void 0:r?et(t,a):t,p=e.length-1,u;p>=0;p--)(u=e[p])&&(l=(r?u(t,a,l):u(l))||l);return r&&l&&Me(t,a,l),l};const S="sps-file-upload";i.SpsFileUploadComponent=class extends HTMLElement{constructor(){super(),this.shown=!0,this.files=[],this.acceptMIMETypes=new Set,this.active=!1,this.error=!1,this.namesOfUnsupportedFiles=[],this.handleBrowseLinkClick=this.handleBrowseLinkClick.bind(this),this.handleDownloadButtonClick=this.handleDownloadButtonClick.bind(this),this.handleFileInputChange=this.handleFileInputChange.bind(this),this.dismiss=this.dismiss.bind(this)}get[B](){return[S,this.active&&`${S}--active`,this.error&&`${S}--error`,!this.shown&&`${S}--hidden`,this.mini&&`${S}--mini`,this.constrainContentWidth&&`${S}--constrained-content-width`]}connectedCallback(){this.description=this.description||(this.multiple?"Files":"File"),this.acceptExtensions&&this.processAcceptExtensions(this.acceptExtensions),this.maxSize&&this.parseAndValidateMaxSize(this.maxSize)}attributeChangedCallback(t,a,r){t==="acceptExtensions"&&this.processAcceptExtensions(r),t==="maxSize"&&this.parseAndValidateMaxSize(r)}dismiss(){this.dismissable&&(this.shown=!1,this.update(),this.dismissal.dispatch())}show(){this.dismissable&&(this.shown=!0,this.update())}render(){const t=this.error?L.SpsIcon.EXCLAMATION_CIRCLE:L.SpsIcon.UPLOAD_CLOUD,a=(this.multiple?D.i18nWoodland.t("fileUpload.instructions.other",{defaultValue:"Drag and drop your files here or |browse for files| on your desktop."}):D.i18nWoodland.t("fileUpload.instructions.one",{defaultValue:"Drag and drop your file here or |browse for a file| on your desktop."})).split("|");return d("div",{"data-fragment":!0},d("div",{className:`${S}__content`},this.processing?d("div",{"data-fragment":!0},d("i",{className:"sps-spinner sps-spinner--medium","aria-hidden":"true"}),d("div",{className:`${S}__instructions`},D.i18nWoodland.t("fileUpload.processing",{defaultValue:"Processing Upload..."}))):d("div",{"data-fragment":!0},d("i",{className:`sps-icon sps-icon-${t} ${S}__icon-primary`,"aria-hidden":"true"}),d("div",{className:`${S}__title`},this.error?d("div",{"data-fragment":!0},D.i18nWoodland.t(this.namesOfUnsupportedFiles.length>1?"fileUpload.cancelled_plural":"fileUpload.cancelled",{defaultValue:this.namesOfUnsupportedFiles.length>1?"File Upload(s) Failed":"File Upload Failed"})):d("div",{"data-fragment":!0},D.i18nWoodland.t("fileUpload.title",{description:this.description,defaultValue:`Upload Your ${this.description}`}))),this.error?d("div",{className:`${S}__errored-files`},new Set(this.namesOfUnsupportedFiles.map((r,l)=>{const p=Math.floor(r.length/2);return d("div",{className:`${S}__errored-filename`,key:r},d("span",{className:`${S}__errored-filename-segment`},r.substr(0,p)),d("div",{className:`${S}__errored-filename-segment`},d("span",null,r.substr(p))),l<this.namesOfUnsupportedFiles.length-1?",":"")}))):d("span",null),d("div",{className:`${S}__instructions`},d("div",{"data-fragment":!0},d("span",null,a[0]),d("a",{href:"",onClick:this.handleBrowseLinkClick},a[1]),d("span",null,a[2]))),d("div",{className:`${S}__requirements`},this.acceptExtensions?d("span",null,"("," ",D.i18nWoodland.t("fileUpload.acceptedTypes",{fileTypes:this.acceptExtensionsDescription,defaultValue:`${this.acceptExtensionsDescription} format accepted`})," ",")"):"",this.maxSize?d("span",null,"("," ",D.i18nWoodland.t("fileUpload.maximumSize",{size:this.maxSize,defaultValue:`${this.maxSize} maximum`})," ",")"):"",this.customRequirement?d("span",null," ",this.customRequirement," "):""),this.downloadLabel&&d("div",{className:`sps-button sps-button--link ${S}__download-button`,onClick:this.handleDownloadButtonClick},d("button",{type:"button"},d("i",{className:"sps-icon sps-icon-download-cloud","aria-hidden":"true"})," ",this.downloadLabel)))),this.dismissable&&!this.processing&&d("div",{className:`sps-button sps-button--icon ${S}__close-button`,onClick:this.dismiss},d("button",{type:"button",title:D.i18nWoodland.t("fileUpload.close",{defaultValue:"Close"})},d("i",{className:"sps-icon sps-icon-x","aria-hidden":"true"}))),d("form",null,d("input",{type:"file",accept:this.accept||"*/*",multiple:this.multiple||null,onChange:this.handleFileInputChange})))}parseAndValidateMaxSize(t){try{this.maxSizeBytes=f.parseFileSize(t)}catch{throw new Error(`Could not parse "${t}" as a file size.`)}}processAcceptExtensions(t){const r=(Array.isArray(t)?t:t.trim().split(/\s?,\s?/)).map(p=>p.replace(/^\./,"")),l=r.map(p=>`.${p}`.toLowerCase());this.acceptExtensionsDescription=l.map((p,u)=>u>0&&u===l.length-1?`or ${p}`:p).join(l.length>2?", ":" "),this.acceptMIMETypes.clear();for(const p of r)for(const u of fe[p.toUpperCase()].split(","))this.acceptMIMETypes.add(u);this.accept=l.concat(Array.from(this.acceptMIMETypes)).join(",")}selectFiles(t){this.namesOfUnsupportedFiles=[];const a=Array.from(t);for(const r of a)this.acceptExtensions&&!this.acceptMIMETypes.has(r.type)&&this.namesOfUnsupportedFiles.push(r.name),this.maxSize&&r.size>this.maxSizeBytes&&this.namesOfUnsupportedFiles.indexOf(r.name)===-1&&this.namesOfUnsupportedFiles.push(r.name);this.namesOfUnsupportedFiles.length?(this.error=!0,this.fileInput.value=null,this.update()):(this.files=a,this.selection.dispatch(a))}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragEnter(t){t.preventDefault(),this.active=!0,this.error=!1,this.update()}handleDragLeave(t){t.preventDefault(),this.active=!1,this.update()}handleDrop(t){t.preventDefault(),t.stopPropagation(),this.active=!1,t.dataTransfer.items?this.selectFiles(Array.from(t.dataTransfer.items).map(a=>a.getAsFile())):this.selectFiles(t.dataTransfer.files),this.update()}handleBrowseLinkClick(t){t.preventDefault(),this.error=!1,this.update(),this.fileInput.click()}handleDownloadButtonClick(){this.download.dispatch()}handleFileInputChange(t){t.stopPropagation(),this.selectFiles(t.target.files)}},i.SpsFileUploadComponent.displayName=S,i.SpsFileUploadComponent.props={description:"string",multiple:"boolean",dismissable:"boolean",processing:"boolean",mini:"boolean",downloadLabel:"string",acceptExtensions:"Array<string> | string",maxSize:"string",customRequirement:"string",selection:{event:!0,type:"CustomEvent<Array<File>>"},dismissal:{event:!0,type:"CustomEvent<void>"},download:{event:!0,type:"CustomEvent<void>"}},w([v()],i.SpsFileUploadComponent.prototype,"description",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"multiple",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"shown",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"dismissable",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"processing",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"mini",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"constrainContentWidth",2),w([v()],i.SpsFileUploadComponent.prototype,"downloadLabel",2),w([v()],i.SpsFileUploadComponent.prototype,"acceptExtensions",2),w([v()],i.SpsFileUploadComponent.prototype,"maxSize",2),w([v()],i.SpsFileUploadComponent.prototype,"customRequirement",2),w([ee()],i.SpsFileUploadComponent.prototype,"selection",2),w([ee()],i.SpsFileUploadComponent.prototype,"dismissal",2),w([ee()],i.SpsFileUploadComponent.prototype,"download",2),w([te("input[type='file']")],i.SpsFileUploadComponent.prototype,"fileInput",2),w([X("dragover")],i.SpsFileUploadComponent.prototype,"handleDragOver",1),w([X("dragenter")],i.SpsFileUploadComponent.prototype,"handleDragEnter",1),w([X("dragleave")],i.SpsFileUploadComponent.prototype,"handleDragLeave",1),w([X("drop")],i.SpsFileUploadComponent.prototype,"handleDrop",1),i.SpsFileUploadComponent=w([j({tag:S})],i.SpsFileUploadComponent);const tt={basic:{label:"Basic File Upload",description:f.code`
3
+ `))}}function bt(n){n||console.warn("patchOuter requires the node have a parent if there is a key.")}function H(n){if(Z)throw new Error(n+"() can not be called between elementOpenStart() and elementOpenEnd().")}function ke(n){if(ge)throw new Error(n+"() may not be called inside an element that has called skip().")}function ve(n){if(!Z)throw new Error(n+"() can only be called after calling elementOpenStart().")}function wt(){if(Z)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")}function St(n,s){if(n!==s)throw new Error('Received a call to close "'+s+'" but "'+n+'" was open.')}function _t(n,s){if(s!==null)throw new Error(n+"() must come before any child declarations inside the current element.")}function Nt(n,s,o,c){ie(n);var h=n,m=s,y=m.nextSibling===o&&m.previousSibling===c,b=m.nextSibling===h.nextSibling&&m.previousSibling===c,A=m===h;if(!y&&!b&&!A)throw new Error("There must be exactly one top level call corresponding to the patched element.")}function ne(n){var s=Z;return Z=n,s}function se(n){var s=ge;return ge=n,s}function ie(n){if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Expected value to be defined");return n}var Y={nodesCreated:null,nodesDeleted:null};var yt=(function(){function n(){this.created=[],this.deleted=[]}return n.prototype.markCreated=function(s){this.created.push(s)},n.prototype.markDeleted=function(s){this.deleted.push(s)},n.prototype.notifyChanges=function(){Y.nodesCreated&&this.created.length>0&&Y.nodesCreated(this.created),Y.nodesDeleted&&this.deleted.length>0&&Y.nodesDeleted(this.deleted)},n})();function At(n){return n.nodeType===11||n.nodeType===9}function Ce(n){return n.nodeType===1}function Ot(n){return n.nodeType===3}function Dt(n,s){for(var o=[],c=n;c!==s;){var h=c;o.push(h),c=h.parentNode}return o}var Pt=Node.prototype.getRootNode||function(){for(var n=this,s=n;n;)s=n,n=n.parentNode;return s};function Et(n){var s=Pt.call(n);return At(s)?s.activeElement:null}function It(n,s){var o=Et(n);return!o||!n.contains(o)?[]:Dt(o,s)}function xt(n,s,o){for(var c=s.nextSibling,h=o;h!==null&&h!==s;){var m=h.nextSibling;n.insertBefore(h,c),h=m}}var Ft=(function(){function n(s,o,c){this._attrsArr=null,this.staticsApplied=!1,this.nameOrCtor=s,this.key=o,this.text=c}return n.prototype.hasEmptyAttrsArr=function(){var s=this._attrsArr;return!s||!s.length},n.prototype.getAttrsArr=function(s){return this._attrsArr||(this._attrsArr=new Array(s))},n})();function be(n,s,o,c){var h=new Ft(s,o,c);return n.__incrementalDOMData=h,h}function q(n,s){return Le(n,s)}function kt(n){return!!n.__incrementalDOMData}function Lt(n){return ie(n.__incrementalDOMData),q(n).key}function Le(n,s){if(n.__incrementalDOMData)return n.__incrementalDOMData;var o=Ce(n)?n.localName:n.nodeName,c=Ce(n)?n.getAttribute("key")||s:null,h=Ot(n)?n.data:void 0,m=be(n,o,c,h);return Ce(n)&&Tt(n,m),m}function Te(n){Le(n);for(var s=n.firstChild;s;s=s.nextSibling)Te(s)}function Ue(n){n.__incrementalDOMData=null;for(var s=n.firstChild;s;s=s.nextSibling)Ue(s)}function Tt(n,s){var o=n.attributes,c=o.length;if(c)for(var h=s.getAttrsArr(c),m=0,y=0;m<c;m+=1,y+=2){var b=o[m],A=b.name,_=b.value;h[y]=A,h[y+1]=_}}function Ut(n,s){return n==="svg"?"http://www.w3.org/2000/svg":n==="math"?"http://www.w3.org/1998/Math/MathML":s==null||q(s).nameOrCtor==="foreignObject"?null:s.namespaceURI}function Rt(n,s,o,c){var h;if(typeof o=="function")h=new o;else{var m=Ut(o,s);m?h=n.createElementNS(m,o):h=n.createElement(o)}return be(h,o,c),h}function $t(n){var s=n.createTextNode("");return be(s,"#text",null),s}var G=null,C=null,N=null,z=null,ae=[],re=[];function oe(){return re}function Re(n){var s=function(o,c,h){var m=G,y=z,b=ae,A=re,_=C,I=N,k=!1,ce=!1;G=new yt,z=o.ownerDocument,re=[],N=o.parentNode,ae=It(o,N),process.env.NODE_ENV!=="production"&&(k=ne(!1),ce=se(!1));try{var Mt=n(o,c,h);return process.env.NODE_ENV!=="production"&&wt(),Mt}finally{z=y,re=A,C=_,N=I,ae=b,G.notifyChanges(),ne(k),se(ce),G=m}};return s}var $e=Re(function(n,s,o){return C=n,ze(),s(o),Ve(),process.env.NODE_ENV!=="production"&&Ct(C,n),n}),Bt=Re(function(n,s,o){var c={nextSibling:n},h=null,m=null;return process.env.NODE_ENV!=="production"&&(h=n.nextSibling,m=n.previousSibling),C=c,s(o),process.env.NODE_ENV!=="production"&&(bt(N),Nt(c,C,h,m)),N&&We(N,le(),n.nextSibling),c===C?null:C});function Be(n,s,o){var c=q(n,o);return s==c.nameOrCtor&&o==c.key}function jt(n,s,o){if(!n)return null;if(Be(n,s,o))return n;if(o){for(;n=n.nextSibling;)if(Be(n,s,o))return n}return null}function Wt(n,s){var o;return n==="#text"?o=$t(z):o=Rt(z,N,n,s),G.markCreated(o),o}function je(n,s){var o=jt(C,n,s),c=o||Wt(n,s);c!==C&&(ae.indexOf(c)>=0?xt(N,c,C):N.insertBefore(c,C),C=c)}function We(n,s,o){for(var c=n,h=s;h!==o;){var m=h.nextSibling;c.removeChild(h),G.markDeleted(h),h=m}}function ze(){N=C,C=null}function le(){return C?C.nextSibling:N.firstChild}function we(){C=le()}function Ve(){We(N,le(),null),C=N,N=N.parentNode}function He(n,s){return we(),je(n,s),ze(),N}function qe(){return process.env.NODE_ENV!=="production"&&se(!1),Ve(),C}function zt(){return we(),je("#text",null),C}function Vt(){return process.env.NODE_ENV!=="production"&&(Fe("currentElement",z),H("currentElement")),N}function Ht(){return process.env.NODE_ENV!=="production"&&(Fe("currentPointer",z),H("currentPointer")),le()}function qt(){process.env.NODE_ENV!=="production"&&(_t("skip",C),se(!0)),C=N.lastChild}var Ge=3,x=l();function Gt(n,s,o){if(s.staticsApplied=!0,!(!o||!o.length)){if(s.hasEmptyAttrsArr()){for(var c=0;c<o.length;c+=2)Q(n,o[c],o[c+1]);return}for(var c=0;c<o.length;c+=2)x[o[c]]=c+1;for(var h=s.getAttrsArr(0),m=0,c=0;c<h.length;c+=2){var y=h[c],b=h[c+1],A=x[y];if(A){o[A]===b&&delete x[y];continue}h[m]=y,h[m+1]=b,m+=2}p(h,m);for(var y in x)Q(n,y,o[x[y]]),delete x[y]}}function Se(n,s,o){process.env.NODE_ENV!=="production"&&(H("elementOpen"),ke("elementOpen"));var c=He(n,s),h=q(c);h.staticsApplied||Gt(c,h,o);var m=Math.max(0,arguments.length-Ge),y=h.hasEmptyAttrsArr();if(!m&&y)return c;for(var b=h.getAttrsArr(m),A=Ge,_=0;A<arguments.length;A+=2,_+=2){var I=arguments[A];if(y)b[_]=I;else if(b[_]!==I)break;var k=arguments[A+1];(y||b[_+1]!==k)&&(b[_+1]=k,Q(c,I,k))}if(A<arguments.length||_<b.length){for(var ce=_;_<b.length;_+=2)x[b[_]]=b[_+1];for(_=ce;A<arguments.length;A+=2,_+=2){var I=arguments[A],k=arguments[A+1];x[I]!==k&&Q(c,I,k),b[_]=I,b[_+1]=k,delete x[I]}p(b,_);for(var I in x)Q(c,I,void 0),delete x[I]}return c}function Xt(n,s,o){var c=oe();process.env.NODE_ENV!=="production"&&(H("elementOpenStart"),ne(!0)),c[0]=n,c[1]=s,c[2]=o}function Kt(n){var s=oe();process.env.NODE_ENV!=="production"&&(ve("key"),ie(s)),s[1]=n}function Qt(n,s){var o=oe();process.env.NODE_ENV!=="production"&&ve("attr"),o.push(n),o.push(s)}function Zt(){var n=oe();process.env.NODE_ENV!=="production"&&(ve("elementOpenEnd"),ne(!1)),ie(n);var s=Se.apply(null,n);return p(n,0),s}function Xe(n){process.env.NODE_ENV!=="production"&&H("elementClose");var s=qe();return process.env.NODE_ENV!=="production"&&St(q(s).nameOrCtor,n),s}function Yt(n,s,o){return Se.apply(null,arguments),Xe(n)}function Jt(n){process.env.NODE_ENV!=="production"&&(H("text"),ke("text"));var s=zt(),o=q(s);if(o.text!==n){o.text=n;for(var c=n,h=1;h<arguments.length;h+=1){var m=arguments[h];c=m(c)}s.data=c}return s}return g.applyAttr=R,g.applyProp=xe,g.attributes=K,g.close=qe,g.currentElement=Vt,g.currentPointer=Ht,g.open=He,g.patch=$e,g.patchInner=$e,g.patchOuter=Bt,g.skip=qt,g.skipNode=we,g.getKey=Lt,g.clearCache=Ue,g.importNode=Te,g.isDataInitialized=kt,g.notifications=Y,g.symbols=e,g.attr=Qt,g.elementClose=Xe,g.elementOpen=Se,g.elementOpenEnd=Zt,g.elementOpenStart=Xt,g.elementVoid=Yt,g.text=Jt,g.key=Kt,g}var O=Qe();function Ne(e){let t=O.currentPointer();return t instanceof Comment&&t.data!==e?t.data=e:(t=document.createComment(e),O.currentElement().appendChild(t)),O.skipNode(),t}const $=Symbol("ComponentMetadata"),P=Object.freeze({has(e,t){return!!(e[$]&&Object.prototype.hasOwnProperty.call(e[$],t))},add(e,t){e[$]?Object.assign(e[$],t):e[$]=t},get(e,t,a){return e[$]&&e[$][t]||a}}),ye=Symbol("ds-web-components:pragma:listeners-attached"),Ae="idom-pragma:content-begin",pe="idom-pragma:content-end";function de(e){for(const t of e)if(typeof t=="function")t();else if(typeof t=="string")O.text(t);else if(t instanceof Set)de(Array.from(t));else if(Array.isArray(t)&&t.length>0){let a=O.currentPointer();if(Ne(Ae),a===null){const r=O.currentElement();for(let l=0;l<t.length;l+=1)r.contains(t[l])||r.appendChild(t[l]),O.skipNode()}for(;a&&a.data!==pe;)O.skipNode(),a=O.currentPointer();Ne(pe)}}function d(e,t,...a){if(t){for(const r of Object.keys(t))if(r.toUpperCase()==="DATA-FRAGMENT")return()=>de(a)}return()=>{O.elementOpenStart(e);const r=[];if(t)for(const p of Object.keys(t))p.toUpperCase()==="CLASSNAME"?O.attr("class",t[p]):/^on[A-Z]/.test(p)?r.push(p):O.attr(p,t[p]);O.elementOpenEnd(e);const l=O.currentElement();if(!l[ye]){for(const p of r)l.addEventListener(p.substr(2).toLowerCase(),t[p]);l[ye]=!0}de(a),O.elementClose(e)}}function Oe(e,t){customElements.get(e)||customElements.define(e,t)}function Ze(...e){for(const t of e)Oe(P.get(t,"tag"),t)}function Ye(e){return function(...a){for(const r of a){const l=`${e}${P.get(r,"tag").substr(3)}`;Oe(l,r)}}}const he=Symbol("Component Attribute Bindings"),B=Symbol("Component Class Bindings"),J=Symbol("Component Style Bindings"),Je={__initialized:!1,__observer:null,__queuedUpdate:null,__managedClasses:new Set,__updateHostBindings(){const e=this;for(const t of Object.keys(e[he]||{}))e.setAttribute(t,e[he][t]);for(const t of Object.keys(e[J]||{}))e.style[t]=e[J][t];for(const t of e.__managedClasses)e.classList.remove(t);for(const t of(e[B]||[]).filter(Boolean))e.__managedClasses.add(t),e.classList.add(t);for(const t of(e.getAttribute("classname")||"").split(/\w+/).filter(Boolean))e.classList.add(t)},__updateChildQueries(e){const t=this;for(const a of P.get(t.constructor,"childQueries",[]))if(!e||e&&a.refresh){const r=a.all?t.querySelectorAll:t.querySelector;t[a.key]=r.call(t,a.selector)}},__gatherChildren(){const e=this;let t=Array.from(e.childNodes),a=null,r=t.length;for(let l=0;l<t.length;l+=1){const p=t[l];p instanceof Comment&&(p.data===Ae?a=l+1:p.data===pe&&(r=l-1))}if(a===null)for(const l of t)l.parentNode.removeChild(l);else t=t.slice(a,r);P.has(e.constructor,"contentProp")&&(e[P.get(e.constructor,"contentProp")]=t)},__startMutObs(){const e=this;e.__observer||(e.__observer=new MutationObserver(()=>{e.contentChangedCallback&&e.contentChangedCallback(),e.__gatherChildren(),e.update()})),e.__observer.observe(e,{childList:!0})},__stopMutObs(){const e=this;e.__observer&&e.__observer.disconnect()},__doRender(){const e=this;e.__stopMutObs(),O.patch(e,e.render()),e.__startMutObs()},update(){const e=this;e.__initialized&&!e.__queuedUpdate&&(e.__queuedUpdate=window.requestAnimationFrame(()=>{e.__doRender(),setTimeout(()=>{e.__updateChildQueries(!0),e.__updateHostBindings()},0),e.__queuedUpdate=null}))},attributeChangedCallback(e,t,a){const r=this,l=a===""?!0:a;l!==t&&(r.__cbAttributeChanged&&r.__cbAttributeChanged(e,r[e],l),e!=="style"&&(r[e]=l),r.__initialized&&r.update())},connectedCallback(){const e=this;e.__cbConnected&&e.__cbConnected();const t=P.get(e.constructor,"eventListeners",[]);setTimeout(()=>{if(!e.__initialized){e.__gatherChildren();for(const[,a]of t)e[a]=e[a].bind(e);e.__initialized=!0}for(const[a,r]of t)e.addEventListener(a,e[r]);e.__doRender(),setTimeout(()=>{e.__updateChildQueries(),e.__updateHostBindings()},0)},0)},disconnectedCallback(){const e=this;e.__cbDisconnected&&e.__cbDisconnected();for(const[t,a]of P.get(e.constructor,"eventListeners",[]))e.removeEventListener(t,e[a]);e.__stopMutObs()}};function j(e){return t=>{P.add(t,e),Object.assign(t.prototype,{__cbAttributeChanged:t.prototype.attributeChangedCallback,__cbConnected:t.prototype.connectedCallback,__cbDisconnected:t.prototype.disconnectedCallback},Je)}}function M(){return(e,t)=>{P.add(e.constructor,{contentProp:t})}}function ee(e){return(t,a)=>{Object.defineProperty(t,a,{get(){return Object.defineProperty(this,a,{value:{dispatch:r=>{const l=new CustomEvent(e||a,{detail:r});return this.dispatchEvent(l),l}}}),this[a]},configurable:!0})}}function X(e){return(t,a)=>{const r=P.get(t.constructor,"eventListeners",[]);r.push([e,a]),P.add(t.constructor,{eventListeners:r})}}function v(e){return(t,a)=>{const r=t.constructor,l=a.toLowerCase();if(r.observedAttributes=r.observedAttributes||["classname","className","style"],r.observedAttributes.push(a),r.observedAttributes.push(l),l!==a&&Object.defineProperty(t,a,{get(){return this[l]},set(p){this[l]=p}}),e){const p=Symbol.for(a);Object.defineProperty(t,l,{get(){return this[p]},set(u){let R=u;e===Boolean&&typeof u=="string"&&u.toLowerCase()==="false"?R=!1:R=e(u),this[p]=R}})}}}function De(e,t,a){return(r,l)=>{const p=P.get(r.constructor,"childQueries",[]);p.push({key:l,selector:e,all:a,refresh:t.refresh}),P.add(r.constructor,{childQueries:p})}}function te(e,t={}){return De(e,t)}function Pe(e,t={}){return De(e,t,!0)}function ue(){return(e,t)=>{const a=Symbol(t);Object.defineProperties(e,{[a]:{writable:!0,enumerable:!1,configurable:!1,value:e[t]},[t]:{get(){return this[a]},set(r){this[a]!==r&&(this[a]=r,this.update())}}})}}var fe=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(fe||{}),Me=Object.defineProperty,et=Object.getOwnPropertyDescriptor,w=(e,t,a,r)=>{for(var l=r>1?void 0:r?et(t,a):t,p=e.length-1,u;p>=0;p--)(u=e[p])&&(l=(r?u(t,a,l):u(l))||l);return r&&l&&Me(t,a,l),l};const S="sps-file-upload";i.SpsFileUploadComponent=class extends HTMLElement{constructor(){super(),this.shown=!0,this.files=[],this.acceptMIMETypes=new Set,this.active=!1,this.error=!1,this.namesOfUnsupportedFiles=[],this.handleBrowseLinkClick=this.handleBrowseLinkClick.bind(this),this.handleDownloadButtonClick=this.handleDownloadButtonClick.bind(this),this.handleFileInputChange=this.handleFileInputChange.bind(this),this.dismiss=this.dismiss.bind(this)}get[B](){return[S,this.active&&`${S}--active`,this.error&&`${S}--error`,!this.shown&&`${S}--hidden`,this.mini&&`${S}--mini`,this.constrainContentWidth&&`${S}--constrained-content-width`]}connectedCallback(){this.description=this.description||(this.multiple?"Files":"File"),this.acceptExtensions&&this.processAcceptExtensions(this.acceptExtensions),this.maxSize&&this.parseAndValidateMaxSize(this.maxSize)}attributeChangedCallback(t,a,r){t==="acceptExtensions"&&this.processAcceptExtensions(r),t==="maxSize"&&this.parseAndValidateMaxSize(r)}dismiss(){this.dismissable&&(this.shown=!1,this.update(),this.dismissal.dispatch())}show(){this.dismissable&&(this.shown=!0,this.update())}render(){const t=this.error?L.SpsIcon.EXCLAMATION_CIRCLE:L.SpsIcon.UPLOAD_CLOUD,a=(this.multiple?D.i18nWoodland.t("fileUpload.instructions.other",{defaultValue:"Drag and drop your files here or |browse for files| on your desktop."}):D.i18nWoodland.t("fileUpload.instructions.one",{defaultValue:"Drag and drop your file here or |browse for a file| on your desktop."})).split("|");return d("div",{"data-fragment":!0},d("div",{className:`${S}__content`},this.processing?d("div",{"data-fragment":!0},d("i",{className:"sps-spinner sps-spinner--medium","aria-hidden":"true"}),d("div",{className:`${S}__instructions`},D.i18nWoodland.t("fileUpload.processing",{defaultValue:"Processing Upload..."}))):d("div",{"data-fragment":!0},d("i",{className:`sps-icon sps-icon-${t} ${S}__icon-primary`,"aria-hidden":"true"}),d("div",{className:`${S}__title`},this.error?d("div",{"data-fragment":!0},D.i18nWoodland.t(this.namesOfUnsupportedFiles.length>1?"fileUpload.cancelled_plural":"fileUpload.cancelled",{defaultValue:this.namesOfUnsupportedFiles.length>1?"File Upload(s) Failed":"File Upload Failed"})):d("div",{"data-fragment":!0},D.i18nWoodland.t("fileUpload.title",{description:this.description,defaultValue:`Upload Your ${this.description}`}))),this.error?d("div",{className:`${S}__errored-files`},new Set(this.namesOfUnsupportedFiles.map((r,l)=>{const p=Math.floor(r.length/2);return d("div",{className:`${S}__errored-filename`,key:r},d("span",{className:`${S}__errored-filename-segment`},r.substr(0,p)),d("div",{className:`${S}__errored-filename-segment`},d("span",null,r.substr(p))),l<this.namesOfUnsupportedFiles.length-1?",":"")}))):d("span",null),d("div",{className:`${S}__instructions`},d("div",{"data-fragment":!0},d("span",null,a[0]),d("a",{href:"",onClick:this.handleBrowseLinkClick},a[1]),d("span",null,a[2]))),d("div",{className:`${S}__requirements`},this.acceptExtensions?d("span",null,"("," ",D.i18nWoodland.t("fileUpload.acceptedTypes",{fileTypes:this.acceptExtensionsDescription,defaultValue:`${this.acceptExtensionsDescription} format accepted`})," ",")"):"",this.maxSize?d("span",null,"("," ",D.i18nWoodland.t("fileUpload.maximumSize",{size:this.maxSize,defaultValue:`${this.maxSize} maximum`})," ",")"):"",this.customRequirement?d("span",null," ",this.customRequirement," "):""),this.downloadLabel&&d("div",{className:`sps-button sps-button--link ${S}__download-button`,onClick:this.handleDownloadButtonClick},d("button",{type:"button"},d("i",{className:"sps-icon sps-icon-download-cloud","aria-hidden":"true"})," ",this.downloadLabel)))),this.dismissable&&!this.processing&&d("div",{className:`sps-button sps-button--icon ${S}__close-button`,onClick:this.dismiss},d("button",{type:"button",title:D.i18nWoodland.t("fileUpload.close",{defaultValue:"Close"})},d("i",{className:"sps-icon sps-icon-x","aria-hidden":"true"}))),d("form",null,d("input",{type:"file",accept:this.accept||"*/*",multiple:this.multiple||null,onChange:this.handleFileInputChange})))}parseAndValidateMaxSize(t){try{this.maxSizeBytes=f.parseFileSize(t)}catch{throw new Error(`Could not parse "${t}" as a file size.`)}}processAcceptExtensions(t){const r=(Array.isArray(t)?t:t.trim().split(/\s?,\s?/)).map(p=>p.replace(/^\./,"")),l=r.map(p=>`.${p}`.toLowerCase());this.acceptExtensionsDescription=l.map((p,u)=>u>0&&u===l.length-1?`or ${p}`:p).join(l.length>2?", ":" "),this.acceptMIMETypes.clear();for(const p of r)for(const u of fe[p.toUpperCase()].split(","))this.acceptMIMETypes.add(u);this.accept=l.concat(Array.from(this.acceptMIMETypes)).join(",")}selectFiles(t){this.namesOfUnsupportedFiles=[];const a=Array.from(t);for(const r of a)this.acceptExtensions&&!this.acceptMIMETypes.has(r.type)&&this.namesOfUnsupportedFiles.push(r.name),this.maxSize&&r.size>this.maxSizeBytes&&this.namesOfUnsupportedFiles.indexOf(r.name)===-1&&this.namesOfUnsupportedFiles.push(r.name);this.namesOfUnsupportedFiles.length?(this.error=!0,this.fileInput.value=null,this.update()):(this.files=a,this.selection.dispatch(a))}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragEnter(t){t.preventDefault(),this.active=!0,this.error=!1,this.update()}handleDragLeave(t){t.preventDefault(),this.active=!1,this.update()}handleDrop(t){t.preventDefault(),t.stopPropagation(),this.active=!1,t.dataTransfer.items?this.selectFiles(Array.from(t.dataTransfer.items).map(a=>a.getAsFile())):this.selectFiles(t.dataTransfer.files),this.update()}handleBrowseLinkClick(t){t.preventDefault(),this.error=!1,this.update(),this.fileInput.click()}handleDownloadButtonClick(){this.download.dispatch()}handleFileInputChange(t){t.stopPropagation(),this.selectFiles(t.target.files)}},i.SpsFileUploadComponent.displayName=S,i.SpsFileUploadComponent.props={description:"string",multiple:"boolean",dismissable:"boolean",processing:"boolean",mini:"boolean",downloadLabel:"string",acceptExtensions:"Array<string> | string",maxSize:"string",customRequirement:"string",selection:{event:!0,type:"CustomEvent<Array<File>>"},dismissal:{event:!0,type:"CustomEvent<void>"},download:{event:!0,type:"CustomEvent<void>"}},w([v()],i.SpsFileUploadComponent.prototype,"description",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"multiple",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"shown",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"dismissable",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"processing",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"mini",2),w([v(Boolean)],i.SpsFileUploadComponent.prototype,"constrainContentWidth",2),w([v()],i.SpsFileUploadComponent.prototype,"downloadLabel",2),w([v()],i.SpsFileUploadComponent.prototype,"acceptExtensions",2),w([v()],i.SpsFileUploadComponent.prototype,"maxSize",2),w([v()],i.SpsFileUploadComponent.prototype,"customRequirement",2),w([ee()],i.SpsFileUploadComponent.prototype,"selection",2),w([ee()],i.SpsFileUploadComponent.prototype,"dismissal",2),w([ee()],i.SpsFileUploadComponent.prototype,"download",2),w([te("input[type='file']")],i.SpsFileUploadComponent.prototype,"fileInput",2),w([X("dragover")],i.SpsFileUploadComponent.prototype,"handleDragOver",1),w([X("dragenter")],i.SpsFileUploadComponent.prototype,"handleDragEnter",1),w([X("dragleave")],i.SpsFileUploadComponent.prototype,"handleDragLeave",1),w([X("drop")],i.SpsFileUploadComponent.prototype,"handleDrop",1),i.SpsFileUploadComponent=w([j({tag:S})],i.SpsFileUploadComponent);const tt={basic:{label:"Basic File Upload",description:f.code`
184
4
  <p>Simply allow the user to drag-and-drop or select either a single file or multiple files at once.</p>
185
5
  `,examples:{single:{description:"<p>Single file upload</p>",react:f.code`
186
6
  function Component() {
@@ -828,4 +648,4 @@
828
648
  <sps-photo placeholderIcon="building"></sps-photo>
829
649
  </div>
830
650
  </div>
831
- `}}}};i.AttrBindings=he,i.ClassBindings=B,i.Component=j,i.Content=M,i.EventDispatcher=ee,i.EventListener=X,i.MANIFEST=Ke,i.MIMEType=fe,i.Prop=v,i.QuerySelector=te,i.QuerySelectorAll=Pe,i.SpsFileUploadExamples=tt,i.SpsInsightCardExamples=rt,i.SpsNavTabsExamples=dt,i.SpsPhotoDisplayMode=Ie,i.SpsPhotoExamples=ft,i.StyleBindings=J,i.Watch=ue,i.h=d,i.namespaceOverrideRegistrar=Ye,i.register=Ze,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
651
+ `}}}};i.AttrBindings=he,i.ClassBindings=B,i.Component=j,i.Content=M,i.EventDispatcher=ee,i.EventListener=X,i.MANIFEST=Ke,i.MIMEType=fe,i.Prop=v,i.QuerySelector=te,i.QuerySelectorAll=Pe,i.SpsFileUploadExamples=tt,i.SpsInsightCardExamples=rt,i.SpsNavTabsExamples=dt,i.SpsPhotoDisplayMode=Ie,i.SpsPhotoExamples=ft,i.StyleBindings=J,i.Watch=ue,i.h=d,i.namespaceOverrideRegistrar=Ye,i.register=Ze,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));