lookbook 1.5.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,7 @@ function $parcel$export(e, n, v, s) {
12
12
  var $caa9439642c6336c$var$flushPending = false;
13
13
  var $caa9439642c6336c$var$flushing = false;
14
14
  var $caa9439642c6336c$var$queue = [];
15
+ var $caa9439642c6336c$var$lastFlushedIndex = -1;
15
16
  function $caa9439642c6336c$var$scheduler(callback) {
16
17
  $caa9439642c6336c$var$queueJob(callback);
17
18
  }
@@ -21,7 +22,7 @@ function $caa9439642c6336c$var$queueJob(job) {
21
22
  }
22
23
  function $caa9439642c6336c$var$dequeueJob(job) {
23
24
  let index = $caa9439642c6336c$var$queue.indexOf(job);
24
- if (index !== -1) $caa9439642c6336c$var$queue.splice(index, 1);
25
+ if (index !== -1 && index > $caa9439642c6336c$var$lastFlushedIndex) $caa9439642c6336c$var$queue.splice(index, 1);
25
26
  }
26
27
  function $caa9439642c6336c$var$queueFlush() {
27
28
  if (!$caa9439642c6336c$var$flushing && !$caa9439642c6336c$var$flushPending) {
@@ -32,8 +33,12 @@ function $caa9439642c6336c$var$queueFlush() {
32
33
  function $caa9439642c6336c$var$flushJobs() {
33
34
  $caa9439642c6336c$var$flushPending = false;
34
35
  $caa9439642c6336c$var$flushing = true;
35
- for(let i = 0; i < $caa9439642c6336c$var$queue.length; i++)$caa9439642c6336c$var$queue[i]();
36
+ for(let i = 0; i < $caa9439642c6336c$var$queue.length; i++){
37
+ $caa9439642c6336c$var$queue[i]();
38
+ $caa9439642c6336c$var$lastFlushedIndex = i;
39
+ }
36
40
  $caa9439642c6336c$var$queue.length = 0;
41
+ $caa9439642c6336c$var$lastFlushedIndex = -1;
37
42
  $caa9439642c6336c$var$flushing = false;
38
43
  }
39
44
  // packages/alpinejs/src/reactivity.js
@@ -66,7 +71,7 @@ function $caa9439642c6336c$var$elementBoundEffect(el) {
66
71
  let wrappedEffect = (callback)=>{
67
72
  let effectReference = $caa9439642c6336c$var$effect(callback);
68
73
  if (!el._x_effects) {
69
- el._x_effects = new Set();
74
+ el._x_effects = /* @__PURE__ */ new Set();
70
75
  el._x_runEffects = ()=>{
71
76
  el._x_effects.forEach((i)=>i());
72
77
  };
@@ -175,8 +180,8 @@ function $caa9439642c6336c$var$onMutate(mutations) {
175
180
  }
176
181
  let addedNodes = [];
177
182
  let removedNodes = [];
178
- let addedAttributes = new Map();
179
- let removedAttributes = new Map();
183
+ let addedAttributes = /* @__PURE__ */ new Map();
184
+ let removedAttributes = /* @__PURE__ */ new Map();
180
185
  for(let i = 0; i < mutations.length; i++){
181
186
  if (mutations[i].target._x_ignoreMutationObserver) continue;
182
187
  if (mutations[i].type === "childList") {
@@ -422,8 +427,7 @@ function $caa9439642c6336c$var$normalEvaluator(el, expression) {
422
427
  overriddenMagics,
423
428
  ...$caa9439642c6336c$var$closestDataStack(el)
424
429
  ];
425
- if (typeof expression === "function") return $caa9439642c6336c$var$generateEvaluatorFromFunction(dataStack, expression);
426
- let evaluator = $caa9439642c6336c$var$generateEvaluatorFromString(dataStack, expression, el);
430
+ let evaluator = typeof expression === "function" ? $caa9439642c6336c$var$generateEvaluatorFromFunction(dataStack, expression) : $caa9439642c6336c$var$generateEvaluatorFromString(dataStack, expression, el);
427
431
  return $caa9439642c6336c$var$tryCatch.bind(null, el, expression, evaluator);
428
432
  }
429
433
  function $caa9439642c6336c$var$generateEvaluatorFromFunction(dataStack, func) {
@@ -500,8 +504,8 @@ function $caa9439642c6336c$var$directive(name, callback) {
500
504
  console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");
501
505
  return;
502
506
  }
503
- const pos = $caa9439642c6336c$var$directiveOrder.indexOf(directive2) ?? $caa9439642c6336c$var$directiveOrder.indexOf("DEFAULT");
504
- if (pos >= 0) $caa9439642c6336c$var$directiveOrder.splice(pos, 0, name);
507
+ const pos = $caa9439642c6336c$var$directiveOrder.indexOf(directive2);
508
+ $caa9439642c6336c$var$directiveOrder.splice(pos >= 0 ? pos : $caa9439642c6336c$var$directiveOrder.indexOf("DEFAULT"), 0, name);
505
509
  }
506
510
  };
507
511
  }
@@ -532,7 +536,7 @@ function $caa9439642c6336c$var$attributesOnly(attributes) {
532
536
  return Array.from(attributes).map($caa9439642c6336c$var$toTransformedAttributes()).filter((attr)=>!$caa9439642c6336c$var$outNonAlpineAttributes(attr));
533
537
  }
534
538
  var $caa9439642c6336c$var$isDeferringHandlers = false;
535
- var $caa9439642c6336c$var$directiveHandlerStacks = new Map();
539
+ var $caa9439642c6336c$var$directiveHandlerStacks = /* @__PURE__ */ new Map();
536
540
  var $caa9439642c6336c$var$currentHandlerStackKey = Symbol();
537
541
  function $caa9439642c6336c$var$deferHandlingDirectives(callback) {
538
542
  $caa9439642c6336c$var$isDeferringHandlers = true;
@@ -634,17 +638,9 @@ var $caa9439642c6336c$var$directiveOrder = [
634
638
  "ref",
635
639
  "data",
636
640
  "id",
637
- "radio",
638
- "tabs",
639
- "switch",
640
- "disclosure",
641
- "menu",
642
- "listbox",
643
- "combobox",
644
641
  "bind",
645
642
  "init",
646
643
  "for",
647
- "mask",
648
644
  "model",
649
645
  "modelable",
650
646
  "transition",
@@ -663,6 +659,7 @@ function $caa9439642c6336c$var$dispatch(el, name, detail = {}) {
663
659
  el.dispatchEvent(new CustomEvent(name, {
664
660
  detail: detail,
665
661
  bubbles: true,
662
+ // Allows events to pass the shadow DOM barrier.
666
663
  composed: true,
667
664
  cancelable: true
668
665
  }));
@@ -863,7 +860,7 @@ $caa9439642c6336c$var$directive("transition", (el, { value: value , modifiers: m
863
860
  function $caa9439642c6336c$var$registerTransitionsFromClassString(el, classString, stage) {
864
861
  $caa9439642c6336c$var$registerTransitionObject(el, $caa9439642c6336c$var$setClasses, "");
865
862
  let directiveStorageMap = {
866
- enter: (classes)=>{
863
+ "enter": (classes)=>{
867
864
  el._x_transition.enter.during = classes;
868
865
  },
869
866
  "enter-start": (classes)=>{
@@ -872,7 +869,7 @@ function $caa9439642c6336c$var$registerTransitionsFromClassString(el, classStrin
872
869
  "enter-end": (classes)=>{
873
870
  el._x_transition.enter.end = classes;
874
871
  },
875
- leave: (classes)=>{
872
+ "leave": (classes)=>{
876
873
  el._x_transition.leave.during = classes;
877
874
  },
878
875
  "leave-start": (classes)=>{
@@ -1388,7 +1385,7 @@ var $caa9439642c6336c$var$Alpine = {
1388
1385
  get raw () {
1389
1386
  return $caa9439642c6336c$var$raw;
1390
1387
  },
1391
- version: "3.11.1",
1388
+ version: "3.12.0",
1392
1389
  flushAndStopDeferringMutations: $caa9439642c6336c$var$flushAndStopDeferringMutations,
1393
1390
  dontAutoEvaluateFunctions: $caa9439642c6336c$var$dontAutoEvaluateFunctions,
1394
1391
  disableEffectScheduling: $caa9439642c6336c$var$disableEffectScheduling,
@@ -1411,9 +1408,12 @@ var $caa9439642c6336c$var$Alpine = {
1411
1408
  closestRoot: $caa9439642c6336c$var$closestRoot,
1412
1409
  destroyTree: $caa9439642c6336c$var$destroyTree,
1413
1410
  interceptor: $caa9439642c6336c$var$interceptor,
1414
- transition: $caa9439642c6336c$var$transition,
1415
- setStyles: $caa9439642c6336c$var$setStyles,
1416
- mutateDom: $caa9439642c6336c$var$mutateDom,
1411
+ transition: // INTERNAL: not public API and is subject to change without major release.
1412
+ $caa9439642c6336c$var$transition,
1413
+ setStyles: // INTERNAL
1414
+ $caa9439642c6336c$var$setStyles,
1415
+ mutateDom: // INTERNAL
1416
+ $caa9439642c6336c$var$mutateDom,
1417
1417
  directive: $caa9439642c6336c$var$directive,
1418
1418
  throttle: $caa9439642c6336c$var$throttle,
1419
1419
  debounce: $caa9439642c6336c$var$debounce,
@@ -1436,32 +1436,11 @@ var $caa9439642c6336c$var$Alpine = {
1436
1436
  var $caa9439642c6336c$var$alpine_default = $caa9439642c6336c$var$Alpine;
1437
1437
  // node_modules/@vue/shared/dist/shared.esm-bundler.js
1438
1438
  function $caa9439642c6336c$var$makeMap(str, expectsLowerCase) {
1439
- const map = Object.create(null);
1439
+ const map = /* @__PURE__ */ Object.create(null);
1440
1440
  const list = str.split(",");
1441
1441
  for(let i = 0; i < list.length; i++)map[list[i]] = true;
1442
1442
  return expectsLowerCase ? (val)=>!!map[val.toLowerCase()] : (val)=>!!map[val];
1443
1443
  }
1444
- var $caa9439642c6336c$var$PatchFlagNames = {
1445
- [1]: `TEXT`,
1446
- [2]: `CLASS`,
1447
- [4]: `STYLE`,
1448
- [8]: `PROPS`,
1449
- [16]: `FULL_PROPS`,
1450
- [32]: `HYDRATE_EVENTS`,
1451
- [64]: `STABLE_FRAGMENT`,
1452
- [128]: `KEYED_FRAGMENT`,
1453
- [256]: `UNKEYED_FRAGMENT`,
1454
- [512]: `NEED_PATCH`,
1455
- [1024]: `DYNAMIC_SLOTS`,
1456
- [2048]: `DEV_ROOT_FRAGMENT`,
1457
- [-1]: `HOISTED`,
1458
- [-2]: `BAIL`
1459
- };
1460
- var $caa9439642c6336c$var$slotFlagsText = {
1461
- [1]: "STABLE",
1462
- [2]: "DYNAMIC",
1463
- [3]: "FORWARDED"
1464
- };
1465
1444
  var $caa9439642c6336c$var$specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
1466
1445
  var $caa9439642c6336c$var$isBooleanAttr2 = /* @__PURE__ */ $caa9439642c6336c$var$makeMap($caa9439642c6336c$var$specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
1467
1446
  var $caa9439642c6336c$var$EMPTY_OBJ = Object.freeze({});
@@ -1481,7 +1460,7 @@ var $caa9439642c6336c$var$toRawType = (value)=>{
1481
1460
  };
1482
1461
  var $caa9439642c6336c$var$isIntegerKey = (key)=>$caa9439642c6336c$var$isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
1483
1462
  var $caa9439642c6336c$var$cacheStringFunction = (fn)=>{
1484
- const cache = Object.create(null);
1463
+ const cache = /* @__PURE__ */ Object.create(null);
1485
1464
  return (str)=>{
1486
1465
  const hit = cache[str];
1487
1466
  return hit || (cache[str] = fn(str));
@@ -1497,7 +1476,7 @@ var $caa9439642c6336c$var$capitalize = $caa9439642c6336c$var$cacheStringFunction
1497
1476
  var $caa9439642c6336c$var$toHandlerKey = $caa9439642c6336c$var$cacheStringFunction((str)=>str ? `on${$caa9439642c6336c$var$capitalize(str)}` : ``);
1498
1477
  var $caa9439642c6336c$var$hasChanged = (value, oldValue)=>value !== oldValue && (value === value || oldValue === oldValue);
1499
1478
  // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
1500
- var $caa9439642c6336c$var$targetMap = new WeakMap();
1479
+ var $caa9439642c6336c$var$targetMap = /* @__PURE__ */ new WeakMap();
1501
1480
  var $caa9439642c6336c$var$effectStack = [];
1502
1481
  var $caa9439642c6336c$var$activeEffect;
1503
1482
  var $caa9439642c6336c$var$ITERATE_KEY = Symbol("iterate");
@@ -1569,9 +1548,9 @@ function $caa9439642c6336c$var$resetTracking() {
1569
1548
  function $caa9439642c6336c$var$track(target, type, key) {
1570
1549
  if (!$caa9439642c6336c$var$shouldTrack || $caa9439642c6336c$var$activeEffect === void 0) return;
1571
1550
  let depsMap = $caa9439642c6336c$var$targetMap.get(target);
1572
- if (!depsMap) $caa9439642c6336c$var$targetMap.set(target, depsMap = new Map());
1551
+ if (!depsMap) $caa9439642c6336c$var$targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
1573
1552
  let dep = depsMap.get(key);
1574
- if (!dep) depsMap.set(key, dep = new Set());
1553
+ if (!dep) depsMap.set(key, dep = /* @__PURE__ */ new Set());
1575
1554
  if (!dep.has($caa9439642c6336c$var$activeEffect)) {
1576
1555
  dep.add($caa9439642c6336c$var$activeEffect);
1577
1556
  $caa9439642c6336c$var$activeEffect.deps.push(dep);
@@ -1586,7 +1565,7 @@ function $caa9439642c6336c$var$track(target, type, key) {
1586
1565
  function $caa9439642c6336c$var$trigger(target, type, key, newValue, oldValue, oldTarget) {
1587
1566
  const depsMap = $caa9439642c6336c$var$targetMap.get(target);
1588
1567
  if (!depsMap) return;
1589
- const effects = new Set();
1568
+ const effects = /* @__PURE__ */ new Set();
1590
1569
  const add2 = (effectsToAdd)=>{
1591
1570
  if (effectsToAdd) effectsToAdd.forEach((effect3)=>{
1592
1571
  if (effect3 !== $caa9439642c6336c$var$activeEffect || effect3.allowRecurse) effects.add(effect3);
@@ -1848,6 +1827,7 @@ function $caa9439642c6336c$var$createIterableMethod(method, isReadonly, isShallo
1848
1827
  const wrap = isShallow ? $caa9439642c6336c$var$toShallow : isReadonly ? $caa9439642c6336c$var$toReadonly : $caa9439642c6336c$var$toReactive;
1849
1828
  !isReadonly && $caa9439642c6336c$var$track(rawTarget, "iterate", isKeyOnly ? $caa9439642c6336c$var$MAP_KEY_ITERATE_KEY : $caa9439642c6336c$var$ITERATE_KEY);
1850
1829
  return {
1830
+ // iterator protocol
1851
1831
  next () {
1852
1832
  const { value: value , done: done } = innerIterator.next();
1853
1833
  return done ? {
@@ -1861,6 +1841,7 @@ function $caa9439642c6336c$var$createIterableMethod(method, isReadonly, isShallo
1861
1841
  done: done
1862
1842
  };
1863
1843
  },
1844
+ // iterable protocol
1864
1845
  [Symbol.iterator] () {
1865
1846
  return this;
1866
1847
  }
@@ -1976,10 +1957,10 @@ function $caa9439642c6336c$var$checkIdentityKeys(target, has2, key) {
1976
1957
  console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
1977
1958
  }
1978
1959
  }
1979
- var $caa9439642c6336c$var$reactiveMap = new WeakMap();
1980
- var $caa9439642c6336c$var$shallowReactiveMap = new WeakMap();
1981
- var $caa9439642c6336c$var$readonlyMap = new WeakMap();
1982
- var $caa9439642c6336c$var$shallowReadonlyMap = new WeakMap();
1960
+ var $caa9439642c6336c$var$reactiveMap = /* @__PURE__ */ new WeakMap();
1961
+ var $caa9439642c6336c$var$shallowReactiveMap = /* @__PURE__ */ new WeakMap();
1962
+ var $caa9439642c6336c$var$readonlyMap = /* @__PURE__ */ new WeakMap();
1963
+ var $caa9439642c6336c$var$shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
1983
1964
  function $caa9439642c6336c$var$targetTypeMap(rawType) {
1984
1965
  switch(rawType){
1985
1966
  case "Object":
@@ -2137,7 +2118,7 @@ $caa9439642c6336c$var$directive("modelable", (el, { expression: expression }, {
2137
2118
  let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);
2138
2119
  let innerSet = (val)=>evaluateInnerSet(()=>{}, {
2139
2120
  scope: {
2140
- __placeholder: val
2121
+ "__placeholder": val
2141
2122
  }
2142
2123
  });
2143
2124
  let initialValue = innerGet();
@@ -2292,7 +2273,8 @@ function $caa9439642c6336c$var$isListeningForASpecificKeyThatHasntBeenPressed(e,
2292
2273
  "document",
2293
2274
  "prevent",
2294
2275
  "stop",
2295
- "once"
2276
+ "once",
2277
+ "capture"
2296
2278
  ].includes(i);
2297
2279
  });
2298
2280
  if (keyModifiers.includes("debounce")) {
@@ -2330,20 +2312,20 @@ function $caa9439642c6336c$var$keyToModifiers(key) {
2330
2312
  if (!key) return [];
2331
2313
  key = $caa9439642c6336c$var$kebabCase2(key);
2332
2314
  let modifierToKeyMap = {
2333
- ctrl: "control",
2334
- slash: "/",
2335
- space: " ",
2336
- spacebar: " ",
2337
- cmd: "meta",
2338
- esc: "escape",
2339
- up: "arrow-up",
2340
- down: "arrow-down",
2341
- left: "arrow-left",
2342
- right: "arrow-right",
2343
- period: ".",
2344
- equal: "=",
2345
- minus: "-",
2346
- underscore: "_"
2315
+ "ctrl": "control",
2316
+ "slash": "/",
2317
+ "space": " ",
2318
+ "spacebar": " ",
2319
+ "cmd": "meta",
2320
+ "esc": "escape",
2321
+ "up": "arrow-up",
2322
+ "down": "arrow-down",
2323
+ "left": "arrow-left",
2324
+ "right": "arrow-right",
2325
+ "period": ".",
2326
+ "equal": "=",
2327
+ "minus": "-",
2328
+ "underscore": "_"
2347
2329
  };
2348
2330
  modifierToKeyMap[key] = key;
2349
2331
  return Object.keys(modifierToKeyMap).map((modifier)=>{
@@ -2370,10 +2352,11 @@ $caa9439642c6336c$var$directive("model", (el, { modifiers: modifiers , expressio
2370
2352
  if ($caa9439642c6336c$var$isGetterSetter(result)) result.set(value);
2371
2353
  else evaluateSet(()=>{}, {
2372
2354
  scope: {
2373
- __placeholder: value
2355
+ "__placeholder": value
2374
2356
  }
2375
2357
  });
2376
2358
  };
2359
+ if (modifiers.includes("fill") && el.hasAttribute("value") && (getValue() === null || getValue() === "")) setValue(el.value);
2377
2360
  if (typeof expression === "string" && el.type === "radio") $caa9439642c6336c$var$mutateDom(()=>{
2378
2361
  if (!el.hasAttribute("name")) el.setAttribute("name", expression);
2379
2362
  });
@@ -2381,7 +2364,7 @@ $caa9439642c6336c$var$directive("model", (el, { modifiers: modifiers , expressio
2381
2364
  "checkbox",
2382
2365
  "radio"
2383
2366
  ].includes(el.type) || modifiers.includes("lazy") ? "change" : "input";
2384
- let removeListener = $caa9439642c6336c$var$on(el, event, modifiers, (e)=>{
2367
+ let removeListener = $caa9439642c6336c$var$isCloning ? ()=>{} : $caa9439642c6336c$var$on(el, event, modifiers, (e)=>{
2385
2368
  setValue($caa9439642c6336c$var$getInputValue(el, modifiers, e, getValue()));
2386
2369
  });
2387
2370
  if (!el._x_removeModelListeners) el._x_removeModelListeners = {};
@@ -2517,7 +2500,7 @@ $caa9439642c6336c$var$directive("data", $caa9439642c6336c$var$skipDuringClone((e
2517
2500
  let data2 = $caa9439642c6336c$var$evaluate(el, expression, {
2518
2501
  scope: dataProviderContext
2519
2502
  });
2520
- if (data2 === void 0) data2 = {};
2503
+ if (data2 === void 0 || data2 === true) data2 = {};
2521
2504
  $caa9439642c6336c$var$injectMagics(data2, el);
2522
2505
  let reactiveData = $caa9439642c6336c$var$reactive(data2);
2523
2506
  $caa9439642c6336c$var$initInterceptors(reactiveData);
@@ -2569,7 +2552,8 @@ $caa9439642c6336c$var$directive("show", (el, { modifiers: modifiers , expression
2569
2552
  $caa9439642c6336c$var$directive("for", (el, { expression: expression }, { effect: effect3 , cleanup: cleanup2 })=>{
2570
2553
  let iteratorNames = $caa9439642c6336c$var$parseForExpression(expression);
2571
2554
  let evaluateItems = $caa9439642c6336c$var$evaluateLater(el, iteratorNames.items);
2572
- let evaluateKey = $caa9439642c6336c$var$evaluateLater(el, el._x_keyExpression || "index");
2555
+ let evaluateKey = $caa9439642c6336c$var$evaluateLater(el, // the x-bind:key expression is stored for our use instead of evaluated.
2556
+ el._x_keyExpression || "index");
2573
2557
  el._x_prevKeys = [];
2574
2558
  el._x_lookup = {};
2575
2559
  effect3(()=>$caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKey));
@@ -2774,7 +2758,7 @@ $caa9439642c6336c$var$directive("on", $caa9439642c6336c$var$skipDuringClone((el,
2774
2758
  let removeListener = $caa9439642c6336c$var$on(el, value, modifiers, (e)=>{
2775
2759
  evaluate2(()=>{}, {
2776
2760
  scope: {
2777
- $event: e
2761
+ "$event": e
2778
2762
  },
2779
2763
  params: [
2780
2764
  e
@@ -11459,12 +11443,12 @@ var $ef5e88eaa61efd95$exports = {};
11459
11443
  */ // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
11460
11444
  (function(undefined) {
11461
11445
  if (typeof window === "undefined") return; // don't run for server side render
11462
- var count = 0, logEnabled = false, hiddenCheckEnabled = false, msgHeader = "message", msgHeaderLen = msgHeader.length, msgId = "[iFrameSizer]", msgIdLen = msgId.length, pagePosition = null, requestAnimationFrame = window.requestAnimationFrame, resetRequiredMethods = {
11446
+ var count = 0, logEnabled = false, hiddenCheckEnabled = false, msgHeader = "message", msgHeaderLen = msgHeader.length, msgId = "[iFrameSizer]", msgIdLen = msgId.length, pagePosition = null, requestAnimationFrame = window.requestAnimationFrame, resetRequiredMethods = Object.freeze({
11463
11447
  max: 1,
11464
11448
  scroll: 1,
11465
11449
  bodyScroll: 1,
11466
11450
  documentElementScroll: 1
11467
- }, settings = {}, timer = null, defaults = {
11451
+ }), settings = {}, timer = null, defaults = Object.freeze({
11468
11452
  autoResize: true,
11469
11453
  bodyBackground: null,
11470
11454
  bodyMargin: null,
@@ -11503,7 +11487,7 @@ var $ef5e88eaa61efd95$exports = {};
11503
11487
  onScroll: function() {
11504
11488
  return true;
11505
11489
  }
11506
- };
11490
+ });
11507
11491
  function getMutationObserver() {
11508
11492
  return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
11509
11493
  }
@@ -12021,6 +12005,7 @@ var $ef5e88eaa61efd95$exports = {};
12021
12005
  return id;
12022
12006
  }
12023
12007
  function ensureHasId(iframeId) {
12008
+ if (typeof iframeId !== "string") throw new TypeError("Invaild id for iFrame. Expected String");
12024
12009
  if ("" === iframeId) {
12025
12010
  // eslint-disable-next-line no-multi-assign
12026
12011
  iframe.id = iframeId = newId();
@@ -12129,11 +12114,11 @@ var $ef5e88eaa61efd95$exports = {};
12129
12114
  }
12130
12115
  function processOptions(options) {
12131
12116
  options = options || {};
12132
- settings[iframeId] = {
12133
- firstRun: true,
12134
- iframe: iframe,
12135
- remoteHost: iframe.src && iframe.src.split("/").slice(0, 3).join("/")
12136
- };
12117
+ settings[iframeId] = Object.create(null) // Protect against prototype attacks
12118
+ ;
12119
+ settings[iframeId].iframe = iframe;
12120
+ settings[iframeId].firstRun = true;
12121
+ settings[iframeId].remoteHost = iframe.src && iframe.src.split("/").slice(0, 3).join("/");
12137
12122
  checkOptions(options);
12138
12123
  Object.keys(options).forEach(depricate, options);
12139
12124
  copyOptions(options);