lookbook 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/lookbook/css/lookbook.css +76 -2
- data/app/assets/lookbook/js/app.js +20 -2
- data/app/{components/lookbook/params_editor/field/component.js → assets/lookbook/js/components/params_input.js} +1 -14
- data/app/assets/lookbook/js/lookbook.js +2 -1
- data/app/components/lookbook/base_component.rb +2 -3
- data/app/components/lookbook/button/component.html.erb +2 -2
- data/app/components/lookbook/button/component.rb +6 -1
- data/app/components/lookbook/button_group/component.rb +3 -4
- data/app/components/lookbook/copy_button/component.html.erb +1 -1
- data/app/components/lookbook/debug_menu/component.html.erb +51 -0
- data/app/components/lookbook/debug_menu/component.rb +18 -0
- data/app/components/lookbook/embed/component.html.erb +3 -3
- data/app/components/lookbook/header/component.html.erb +19 -44
- data/app/components/lookbook/inspector_panel/component.html.erb +5 -3
- data/app/components/lookbook/inspector_panel/component.rb +6 -18
- data/app/components/lookbook/nav/component.js +4 -0
- data/app/components/lookbook/nav/component.rb +1 -1
- data/app/components/lookbook/nav/item/component.html.erb +4 -4
- data/app/components/lookbook/nav/item/component.rb +1 -1
- data/app/components/lookbook/page_tabs/component.html.erb +4 -4
- data/app/components/lookbook/page_tabs/component.rb +1 -1
- data/app/components/lookbook/params/editor/component.html.erb +21 -0
- data/app/components/lookbook/{params_editor → params/editor}/component.js +1 -1
- data/app/components/lookbook/params/editor/component.rb +40 -0
- data/app/components/lookbook/params/field/component.css +76 -0
- data/app/components/lookbook/params/field/component.html.erb +27 -0
- data/app/components/lookbook/params/field/component.js +7 -0
- data/app/components/lookbook/params/field/component.rb +101 -0
- data/app/components/lookbook/tabs/component.html.erb +2 -2
- data/app/components/lookbook/tag_component.rb +1 -0
- data/app/components/lookbook/viewport/component.css +1 -1
- data/app/components/lookbook/viewport/component.html.erb +11 -0
- data/app/controllers/lookbook/previews_controller.rb +1 -1
- data/app/helpers/lookbook/component_helper.rb +45 -26
- data/app/helpers/lookbook/page_helper.rb +1 -1
- data/app/views/layouts/lookbook/application.html.erb +18 -4
- data/app/views/layouts/lookbook/page.html.erb +4 -4
- data/app/views/layouts/lookbook/shell.html.erb +4 -4
- data/app/views/layouts/lookbook/skeleton.html.erb +0 -6
- data/app/views/lookbook/error.html.erb +1 -1
- data/app/views/lookbook/pages/show.html.erb +2 -2
- data/app/views/lookbook/previews/inputs/_color.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_range.html.erb +15 -0
- data/app/views/lookbook/previews/inputs/_select.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_text.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_textarea.html.erb +5 -0
- data/app/views/lookbook/previews/inputs/_toggle.html.erb +20 -0
- data/app/views/lookbook/previews/panels/_content.html.erb +2 -2
- data/app/views/lookbook/previews/panels/_notes.html.erb +2 -2
- data/app/views/lookbook/previews/panels/_output.html.erb +1 -1
- data/app/views/lookbook/previews/panels/_params.html.erb +3 -3
- data/app/views/lookbook/previews/panels/_preview.html.erb +1 -1
- data/app/views/lookbook/previews/panels/_source.html.erb +2 -2
- data/app/views/lookbook/previews/show.html.erb +13 -19
- data/lib/lookbook/config.rb +16 -1
- data/lib/lookbook/engine.rb +16 -6
- data/lib/lookbook/markdown.rb +1 -1
- data/lib/lookbook/panels.rb +14 -4
- data/lib/lookbook/params.rb +66 -35
- data/lib/lookbook/parser.rb +1 -0
- data/lib/lookbook/preview.rb +10 -4
- data/lib/lookbook/preview_controller.rb +7 -19
- data/lib/lookbook/preview_example.rb +1 -1
- data/lib/lookbook/source_inspector.rb +10 -4
- data/lib/lookbook/tag.rb +13 -3
- data/lib/lookbook/tag_options.rb +111 -0
- data/lib/lookbook/tags.rb +6 -2
- data/lib/lookbook/template_parser.rb +72 -0
- data/lib/lookbook/theme.rb +1 -1
- data/lib/lookbook/utils.rb +23 -0
- data/lib/lookbook/version.rb +1 -1
- data/lib/lookbook.rb +2 -0
- data/public/lookbook-assets/css/lookbook.css +369 -126
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/js/embed.js +13 -13
- data/public/lookbook-assets/js/embed.js.map +1 -1
- data/public/lookbook-assets/js/lookbook.js +706 -621
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +42 -10
- data/app/components/lookbook/params_editor/component.html.erb +0 -3
- data/app/components/lookbook/params_editor/component.rb +0 -11
- data/app/components/lookbook/params_editor/field/component.html.erb +0 -49
- data/app/components/lookbook/params_editor/field/component.rb +0 -44
|
@@ -177,16 +177,16 @@ function $caa9439642c6336c$var$onMutate(mutations) {
|
|
|
177
177
|
let removedNodes = [];
|
|
178
178
|
let addedAttributes = new Map();
|
|
179
179
|
let removedAttributes = new Map();
|
|
180
|
-
for(let
|
|
181
|
-
if (mutations[
|
|
182
|
-
if (mutations[
|
|
183
|
-
mutations[
|
|
184
|
-
mutations[
|
|
185
|
-
}
|
|
186
|
-
if (mutations[
|
|
187
|
-
let el = mutations[
|
|
188
|
-
let name = mutations[
|
|
189
|
-
let oldValue = mutations[
|
|
180
|
+
for(let i = 0; i < mutations.length; i++){
|
|
181
|
+
if (mutations[i].target._x_ignoreMutationObserver) continue;
|
|
182
|
+
if (mutations[i].type === "childList") {
|
|
183
|
+
mutations[i].addedNodes.forEach((node)=>node.nodeType === 1 && addedNodes.push(node));
|
|
184
|
+
mutations[i].removedNodes.forEach((node)=>node.nodeType === 1 && removedNodes.push(node));
|
|
185
|
+
}
|
|
186
|
+
if (mutations[i].type === "attributes") {
|
|
187
|
+
let el = mutations[i].target;
|
|
188
|
+
let name = mutations[i].attributeName;
|
|
189
|
+
let oldValue = mutations[i].oldValue;
|
|
190
190
|
let add2 = ()=>{
|
|
191
191
|
if (!addedAttributes.has(el)) addedAttributes.set(el, []);
|
|
192
192
|
addedAttributes.get(el).push({
|
|
@@ -211,10 +211,10 @@ function $caa9439642c6336c$var$onMutate(mutations) {
|
|
|
211
211
|
addedAttributes.forEach((attrs, el)=>{
|
|
212
212
|
$caa9439642c6336c$var$onAttributeAddeds.forEach((i)=>i(el, attrs));
|
|
213
213
|
});
|
|
214
|
-
for (let
|
|
215
|
-
if (addedNodes.includes(
|
|
216
|
-
$caa9439642c6336c$var$onElRemoveds.forEach((i)=>i(
|
|
217
|
-
if (
|
|
214
|
+
for (let node of removedNodes){
|
|
215
|
+
if (addedNodes.includes(node)) continue;
|
|
216
|
+
$caa9439642c6336c$var$onElRemoveds.forEach((i)=>i(node));
|
|
217
|
+
if (node._x_cleanups) while(node._x_cleanups.length)node._x_cleanups.pop()();
|
|
218
218
|
}
|
|
219
219
|
addedNodes.forEach((node)=>{
|
|
220
220
|
node._x_ignoreSelf = true;
|
|
@@ -495,8 +495,24 @@ function $caa9439642c6336c$var$directive(name, callback) {
|
|
|
495
495
|
$caa9439642c6336c$var$directiveHandlers[name] = callback;
|
|
496
496
|
}
|
|
497
497
|
function $caa9439642c6336c$var$directives(el, attributes, originalAttributeOverride) {
|
|
498
|
+
attributes = Array.from(attributes);
|
|
499
|
+
if (el._x_virtualDirectives) {
|
|
500
|
+
let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value])=>({
|
|
501
|
+
name: name,
|
|
502
|
+
value: value
|
|
503
|
+
}));
|
|
504
|
+
let staticAttributes = $caa9439642c6336c$var$attributesOnly(vAttributes);
|
|
505
|
+
vAttributes = vAttributes.map((attribute)=>{
|
|
506
|
+
if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {
|
|
507
|
+
name: `x-bind:${attribute.name}`,
|
|
508
|
+
value: `"${attribute.value}"`
|
|
509
|
+
};
|
|
510
|
+
return attribute;
|
|
511
|
+
});
|
|
512
|
+
attributes = attributes.concat(vAttributes);
|
|
513
|
+
}
|
|
498
514
|
let transformedAttributeMap = {};
|
|
499
|
-
let directives2 =
|
|
515
|
+
let directives2 = attributes.map($caa9439642c6336c$var$toTransformedAttributes((newName, oldName)=>transformedAttributeMap[newName] = oldName)).filter($caa9439642c6336c$var$outNonAlpineAttributes).map($caa9439642c6336c$var$toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort($caa9439642c6336c$var$byPriority);
|
|
500
516
|
return directives2.map((directive2)=>{
|
|
501
517
|
return $caa9439642c6336c$var$getDirectiveHandler(el, directive2);
|
|
502
518
|
});
|
|
@@ -617,8 +633,7 @@ var $caa9439642c6336c$var$directiveOrder = [
|
|
|
617
633
|
"show",
|
|
618
634
|
"if",
|
|
619
635
|
$caa9439642c6336c$var$DEFAULT,
|
|
620
|
-
"teleport"
|
|
621
|
-
"element"
|
|
636
|
+
"teleport"
|
|
622
637
|
];
|
|
623
638
|
function $caa9439642c6336c$var$byPriority(a, b) {
|
|
624
639
|
let typeA = $caa9439642c6336c$var$directiveOrder.indexOf(a.type) === -1 ? $caa9439642c6336c$var$DEFAULT : a.type;
|
|
@@ -931,9 +946,8 @@ function $caa9439642c6336c$var$registerTransitionObject(el, setFunction, default
|
|
|
931
946
|
};
|
|
932
947
|
}
|
|
933
948
|
window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
};
|
|
949
|
+
const nextTick2 = document.visibilityState === "visible" ? requestAnimationFrame : setTimeout;
|
|
950
|
+
let clickAwayCompatibleShow = ()=>nextTick2(show);
|
|
937
951
|
if (value) {
|
|
938
952
|
if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();
|
|
939
953
|
else el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();
|
|
@@ -950,7 +964,7 @@ window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value
|
|
|
950
964
|
if (closest) {
|
|
951
965
|
if (!closest._x_hideChildren) closest._x_hideChildren = [];
|
|
952
966
|
closest._x_hideChildren.push(el);
|
|
953
|
-
} else
|
|
967
|
+
} else nextTick2(()=>{
|
|
954
968
|
let hideAfterChildren = (el2)=>{
|
|
955
969
|
let carry = Promise.all([
|
|
956
970
|
el2._x_hidePromise,
|
|
@@ -1278,8 +1292,10 @@ function $caa9439642c6336c$var$getStores() {
|
|
|
1278
1292
|
}
|
|
1279
1293
|
// packages/alpinejs/src/binds.js
|
|
1280
1294
|
var $caa9439642c6336c$var$binds = {};
|
|
1281
|
-
function $caa9439642c6336c$var$bind2(name,
|
|
1282
|
-
|
|
1295
|
+
function $caa9439642c6336c$var$bind2(name, bindings) {
|
|
1296
|
+
let getBindings = typeof bindings !== "function" ? ()=>bindings : bindings;
|
|
1297
|
+
if (name instanceof Element) $caa9439642c6336c$var$applyBindingsObject(name, getBindings());
|
|
1298
|
+
else $caa9439642c6336c$var$binds[name] = getBindings;
|
|
1283
1299
|
}
|
|
1284
1300
|
function $caa9439642c6336c$var$injectBindingProviders(obj) {
|
|
1285
1301
|
Object.entries($caa9439642c6336c$var$binds).forEach(([name, callback])=>{
|
|
@@ -1293,6 +1309,26 @@ function $caa9439642c6336c$var$injectBindingProviders(obj) {
|
|
|
1293
1309
|
});
|
|
1294
1310
|
return obj;
|
|
1295
1311
|
}
|
|
1312
|
+
function $caa9439642c6336c$var$applyBindingsObject(el, obj, original) {
|
|
1313
|
+
let cleanupRunners = [];
|
|
1314
|
+
while(cleanupRunners.length)cleanupRunners.pop()();
|
|
1315
|
+
let attributes = Object.entries(obj).map(([name, value])=>({
|
|
1316
|
+
name: name,
|
|
1317
|
+
value: value
|
|
1318
|
+
}));
|
|
1319
|
+
let staticAttributes = $caa9439642c6336c$var$attributesOnly(attributes);
|
|
1320
|
+
attributes = attributes.map((attribute)=>{
|
|
1321
|
+
if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {
|
|
1322
|
+
name: `x-bind:${attribute.name}`,
|
|
1323
|
+
value: `"${attribute.value}"`
|
|
1324
|
+
};
|
|
1325
|
+
return attribute;
|
|
1326
|
+
});
|
|
1327
|
+
$caa9439642c6336c$var$directives(el, attributes, original).map((handle)=>{
|
|
1328
|
+
cleanupRunners.push(handle.runCleanups);
|
|
1329
|
+
handle();
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1296
1332
|
// packages/alpinejs/src/datas.js
|
|
1297
1333
|
var $caa9439642c6336c$var$datas = {};
|
|
1298
1334
|
function $caa9439642c6336c$var$data(name, callback) {
|
|
@@ -1325,7 +1361,7 @@ var $caa9439642c6336c$var$Alpine = {
|
|
|
1325
1361
|
get raw () {
|
|
1326
1362
|
return $caa9439642c6336c$var$raw;
|
|
1327
1363
|
},
|
|
1328
|
-
version: "3.10.
|
|
1364
|
+
version: "3.10.3",
|
|
1329
1365
|
flushAndStopDeferringMutations: $caa9439642c6336c$var$flushAndStopDeferringMutations,
|
|
1330
1366
|
dontAutoEvaluateFunctions: $caa9439642c6336c$var$dontAutoEvaluateFunctions,
|
|
1331
1367
|
disableEffectScheduling: $caa9439642c6336c$var$disableEffectScheduling,
|
|
@@ -1395,8 +1431,8 @@ var $caa9439642c6336c$var$slotFlagsText = {
|
|
|
1395
1431
|
};
|
|
1396
1432
|
var $caa9439642c6336c$var$specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
1397
1433
|
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`);
|
|
1398
|
-
var $caa9439642c6336c$var$EMPTY_OBJ = {};
|
|
1399
|
-
var $caa9439642c6336c$var$EMPTY_ARR = [];
|
|
1434
|
+
var $caa9439642c6336c$var$EMPTY_OBJ = Object.freeze({});
|
|
1435
|
+
var $caa9439642c6336c$var$EMPTY_ARR = Object.freeze([]);
|
|
1400
1436
|
var $caa9439642c6336c$var$extend = Object.assign;
|
|
1401
1437
|
var $caa9439642c6336c$var$hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1402
1438
|
var $caa9439642c6336c$var$hasOwn = (val, key)=>$caa9439642c6336c$var$hasOwnProperty.call(val, key);
|
|
@@ -1431,8 +1467,8 @@ var $caa9439642c6336c$var$hasChanged = (value, oldValue)=>value !== oldValue &&
|
|
|
1431
1467
|
var $caa9439642c6336c$var$targetMap = new WeakMap();
|
|
1432
1468
|
var $caa9439642c6336c$var$effectStack = [];
|
|
1433
1469
|
var $caa9439642c6336c$var$activeEffect;
|
|
1434
|
-
var $caa9439642c6336c$var$ITERATE_KEY = Symbol("");
|
|
1435
|
-
var $caa9439642c6336c$var$MAP_KEY_ITERATE_KEY = Symbol("");
|
|
1470
|
+
var $caa9439642c6336c$var$ITERATE_KEY = Symbol("iterate");
|
|
1471
|
+
var $caa9439642c6336c$var$MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
|
|
1436
1472
|
function $caa9439642c6336c$var$isEffect(fn) {
|
|
1437
1473
|
return fn && fn._isEffect === true;
|
|
1438
1474
|
}
|
|
@@ -1506,6 +1542,12 @@ function $caa9439642c6336c$var$track(target, type, key) {
|
|
|
1506
1542
|
if (!dep.has($caa9439642c6336c$var$activeEffect)) {
|
|
1507
1543
|
dep.add($caa9439642c6336c$var$activeEffect);
|
|
1508
1544
|
$caa9439642c6336c$var$activeEffect.deps.push(dep);
|
|
1545
|
+
if ($caa9439642c6336c$var$activeEffect.options.onTrack) $caa9439642c6336c$var$activeEffect.options.onTrack({
|
|
1546
|
+
effect: $caa9439642c6336c$var$activeEffect,
|
|
1547
|
+
target: target,
|
|
1548
|
+
type: type,
|
|
1549
|
+
key: key
|
|
1550
|
+
});
|
|
1509
1551
|
}
|
|
1510
1552
|
}
|
|
1511
1553
|
function $caa9439642c6336c$var$trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
@@ -1542,6 +1584,15 @@ function $caa9439642c6336c$var$trigger(target, type, key, newValue, oldValue, ol
|
|
|
1542
1584
|
}
|
|
1543
1585
|
}
|
|
1544
1586
|
const run = (effect3)=>{
|
|
1587
|
+
if (effect3.options.onTrigger) effect3.options.onTrigger({
|
|
1588
|
+
effect: effect3,
|
|
1589
|
+
target: target,
|
|
1590
|
+
key: key,
|
|
1591
|
+
type: type,
|
|
1592
|
+
newValue: newValue,
|
|
1593
|
+
oldValue: oldValue,
|
|
1594
|
+
oldTarget: oldTarget
|
|
1595
|
+
});
|
|
1545
1596
|
if (effect3.options.scheduler) effect3.options.scheduler(effect3);
|
|
1546
1597
|
else effect3();
|
|
1547
1598
|
};
|
|
@@ -1650,9 +1701,11 @@ var $caa9439642c6336c$var$mutableHandlers = {
|
|
|
1650
1701
|
var $caa9439642c6336c$var$readonlyHandlers = {
|
|
1651
1702
|
get: $caa9439642c6336c$var$readonlyGet,
|
|
1652
1703
|
set (target, key) {
|
|
1704
|
+
console.warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1653
1705
|
return true;
|
|
1654
1706
|
},
|
|
1655
1707
|
deleteProperty (target, key) {
|
|
1708
|
+
console.warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1656
1709
|
return true;
|
|
1657
1710
|
}
|
|
1658
1711
|
};
|
|
@@ -1711,7 +1764,7 @@ function $caa9439642c6336c$var$set$1(key, value) {
|
|
|
1711
1764
|
if (!hadKey) {
|
|
1712
1765
|
key = $caa9439642c6336c$var$toRaw(key);
|
|
1713
1766
|
hadKey = has2.call(target, key);
|
|
1714
|
-
}
|
|
1767
|
+
} else $caa9439642c6336c$var$checkIdentityKeys(target, has2, key);
|
|
1715
1768
|
const oldValue = get3.call(target, key);
|
|
1716
1769
|
target.set(key, value);
|
|
1717
1770
|
if (!hadKey) $caa9439642c6336c$var$trigger(target, "add", key, value);
|
|
@@ -1725,7 +1778,7 @@ function $caa9439642c6336c$var$deleteEntry(key) {
|
|
|
1725
1778
|
if (!hadKey) {
|
|
1726
1779
|
key = $caa9439642c6336c$var$toRaw(key);
|
|
1727
1780
|
hadKey = has2.call(target, key);
|
|
1728
|
-
}
|
|
1781
|
+
} else $caa9439642c6336c$var$checkIdentityKeys(target, has2, key);
|
|
1729
1782
|
const oldValue = get3 ? get3.call(target, key) : void 0;
|
|
1730
1783
|
const result = target.delete(key);
|
|
1731
1784
|
if (hadKey) $caa9439642c6336c$var$trigger(target, "delete", key, void 0, oldValue);
|
|
@@ -1734,7 +1787,7 @@ function $caa9439642c6336c$var$deleteEntry(key) {
|
|
|
1734
1787
|
function $caa9439642c6336c$var$clear() {
|
|
1735
1788
|
const target = $caa9439642c6336c$var$toRaw(this);
|
|
1736
1789
|
const hadItems = target.size !== 0;
|
|
1737
|
-
const oldTarget =
|
|
1790
|
+
const oldTarget = $caa9439642c6336c$var$isMap(target) ? new Map(target) : new Set(target);
|
|
1738
1791
|
const result = target.clear();
|
|
1739
1792
|
if (hadItems) $caa9439642c6336c$var$trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1740
1793
|
return result;
|
|
@@ -1783,6 +1836,10 @@ function $caa9439642c6336c$var$createIterableMethod(method, isReadonly, isShallo
|
|
|
1783
1836
|
}
|
|
1784
1837
|
function $caa9439642c6336c$var$createReadonlyMethod(type) {
|
|
1785
1838
|
return function(...args) {
|
|
1839
|
+
{
|
|
1840
|
+
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1841
|
+
console.warn(`${$caa9439642c6336c$var$capitalize(type)} operation ${key}failed: target is readonly.`, $caa9439642c6336c$var$toRaw(this));
|
|
1842
|
+
}
|
|
1786
1843
|
return type === "delete" ? false : this;
|
|
1787
1844
|
};
|
|
1788
1845
|
}
|
|
@@ -1879,6 +1936,13 @@ var $caa9439642c6336c$var$readonlyCollectionHandlers = {
|
|
|
1879
1936
|
var $caa9439642c6336c$var$shallowReadonlyCollectionHandlers = {
|
|
1880
1937
|
get: $caa9439642c6336c$var$createInstrumentationGetter(true, true)
|
|
1881
1938
|
};
|
|
1939
|
+
function $caa9439642c6336c$var$checkIdentityKeys(target, has2, key) {
|
|
1940
|
+
const rawKey = $caa9439642c6336c$var$toRaw(key);
|
|
1941
|
+
if (rawKey !== key && has2.call(target, rawKey)) {
|
|
1942
|
+
const type = $caa9439642c6336c$var$toRawType(target);
|
|
1943
|
+
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.`);
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1882
1946
|
var $caa9439642c6336c$var$reactiveMap = new WeakMap();
|
|
1883
1947
|
var $caa9439642c6336c$var$shallowReactiveMap = new WeakMap();
|
|
1884
1948
|
var $caa9439642c6336c$var$readonlyMap = new WeakMap();
|
|
@@ -1908,7 +1972,10 @@ function $caa9439642c6336c$var$readonly(target) {
|
|
|
1908
1972
|
return $caa9439642c6336c$var$createReactiveObject(target, true, $caa9439642c6336c$var$readonlyHandlers, $caa9439642c6336c$var$readonlyCollectionHandlers, $caa9439642c6336c$var$readonlyMap);
|
|
1909
1973
|
}
|
|
1910
1974
|
function $caa9439642c6336c$var$createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {
|
|
1911
|
-
if (!$caa9439642c6336c$var$isObject(target))
|
|
1975
|
+
if (!$caa9439642c6336c$var$isObject(target)) {
|
|
1976
|
+
console.warn(`value cannot be made reactive: ${String(target)}`);
|
|
1977
|
+
return target;
|
|
1978
|
+
}
|
|
1912
1979
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1913
1980
|
const existingProxy = proxyMap.get(target);
|
|
1914
1981
|
if (existingProxy) return existingProxy;
|
|
@@ -2101,9 +2168,9 @@ function $caa9439642c6336c$var$on(el, event, modifiers, callback) {
|
|
|
2101
2168
|
handler3 = $caa9439642c6336c$var$debounce(handler3, wait);
|
|
2102
2169
|
}
|
|
2103
2170
|
if (modifiers.includes("throttle")) {
|
|
2104
|
-
let
|
|
2105
|
-
let
|
|
2106
|
-
handler3 = $caa9439642c6336c$var$throttle(handler3,
|
|
2171
|
+
let nextModifier1 = modifiers[modifiers.indexOf("throttle") + 1] || "invalid-wait";
|
|
2172
|
+
let wait1 = $caa9439642c6336c$var$isNumeric(nextModifier1.split("ms")[0]) ? Number(nextModifier1.split("ms")[0]) : 250;
|
|
2173
|
+
handler3 = $caa9439642c6336c$var$throttle(handler3, wait1);
|
|
2107
2174
|
}
|
|
2108
2175
|
listenerTarget.addEventListener(event, handler3, options);
|
|
2109
2176
|
return ()=>{
|
|
@@ -2309,7 +2376,17 @@ $caa9439642c6336c$var$directive("html", (el, { expression: expression }, { effe
|
|
|
2309
2376
|
// packages/alpinejs/src/directives/x-bind.js
|
|
2310
2377
|
$caa9439642c6336c$var$mapAttributes($caa9439642c6336c$var$startingWith(":", $caa9439642c6336c$var$into($caa9439642c6336c$var$prefix("bind:"))));
|
|
2311
2378
|
$caa9439642c6336c$var$directive("bind", (el, { value: value , modifiers: modifiers , expression: expression , original: original }, { effect: effect3 })=>{
|
|
2312
|
-
if (!value)
|
|
2379
|
+
if (!value) {
|
|
2380
|
+
let bindingProviders = {};
|
|
2381
|
+
$caa9439642c6336c$var$injectBindingProviders(bindingProviders);
|
|
2382
|
+
let getBindings = $caa9439642c6336c$var$evaluateLater(el, expression);
|
|
2383
|
+
getBindings((bindings)=>{
|
|
2384
|
+
$caa9439642c6336c$var$applyBindingsObject(el, bindings, original);
|
|
2385
|
+
}, {
|
|
2386
|
+
scope: bindingProviders
|
|
2387
|
+
});
|
|
2388
|
+
return;
|
|
2389
|
+
}
|
|
2313
2390
|
if (value === "key") return $caa9439642c6336c$var$storeKeyForXFor(el, expression);
|
|
2314
2391
|
let evaluate2 = $caa9439642c6336c$var$evaluateLater(el, expression);
|
|
2315
2392
|
effect3(()=>evaluate2((result)=>{
|
|
@@ -2317,33 +2394,6 @@ $caa9439642c6336c$var$directive("bind", (el, { value: value , modifiers: modifie
|
|
|
2317
2394
|
$caa9439642c6336c$var$mutateDom(()=>$caa9439642c6336c$var$bind(el, value, result, modifiers));
|
|
2318
2395
|
}));
|
|
2319
2396
|
});
|
|
2320
|
-
function $caa9439642c6336c$var$applyBindingsObject(el, expression, original, effect3) {
|
|
2321
|
-
let bindingProviders = {};
|
|
2322
|
-
$caa9439642c6336c$var$injectBindingProviders(bindingProviders);
|
|
2323
|
-
let getBindings = $caa9439642c6336c$var$evaluateLater(el, expression);
|
|
2324
|
-
let cleanupRunners = [];
|
|
2325
|
-
while(cleanupRunners.length)cleanupRunners.pop()();
|
|
2326
|
-
getBindings((bindings)=>{
|
|
2327
|
-
let attributes = Object.entries(bindings).map(([name, value])=>({
|
|
2328
|
-
name: name,
|
|
2329
|
-
value: value
|
|
2330
|
-
}));
|
|
2331
|
-
let staticAttributes = $caa9439642c6336c$var$attributesOnly(attributes);
|
|
2332
|
-
attributes = attributes.map((attribute)=>{
|
|
2333
|
-
if (staticAttributes.find((attr)=>attr.name === attribute.name)) return {
|
|
2334
|
-
name: `x-bind:${attribute.name}`,
|
|
2335
|
-
value: `"${attribute.value}"`
|
|
2336
|
-
};
|
|
2337
|
-
return attribute;
|
|
2338
|
-
});
|
|
2339
|
-
$caa9439642c6336c$var$directives(el, attributes, original).map((handle)=>{
|
|
2340
|
-
cleanupRunners.push(handle.runCleanups);
|
|
2341
|
-
handle();
|
|
2342
|
-
});
|
|
2343
|
-
}, {
|
|
2344
|
-
scope: bindingProviders
|
|
2345
|
-
});
|
|
2346
|
-
}
|
|
2347
2397
|
function $caa9439642c6336c$var$storeKeyForXFor(el, expression) {
|
|
2348
2398
|
el._x_keyExpression = expression;
|
|
2349
2399
|
}
|
|
@@ -2373,7 +2423,9 @@ $caa9439642c6336c$var$directive("data", $caa9439642c6336c$var$skipDuringClone((e
|
|
|
2373
2423
|
$caa9439642c6336c$var$directive("show", (el, { modifiers: modifiers , expression: expression }, { effect: effect3 })=>{
|
|
2374
2424
|
let evaluate2 = $caa9439642c6336c$var$evaluateLater(el, expression);
|
|
2375
2425
|
if (!el._x_doHide) el._x_doHide = ()=>{
|
|
2376
|
-
$caa9439642c6336c$var$mutateDom(()=>
|
|
2426
|
+
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2427
|
+
el.style.setProperty("display", "none", modifiers.includes("important") ? "important" : void 0);
|
|
2428
|
+
});
|
|
2377
2429
|
};
|
|
2378
2430
|
if (!el._x_doShow) el._x_doShow = ()=>{
|
|
2379
2431
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
@@ -2438,11 +2490,11 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2438
2490
|
});
|
|
2439
2491
|
scopes.push(scope2);
|
|
2440
2492
|
});
|
|
2441
|
-
else for(let
|
|
2442
|
-
let scope2 = $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, items[
|
|
2493
|
+
else for(let i = 0; i < items.length; i++){
|
|
2494
|
+
let scope2 = $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, items[i], i, items);
|
|
2443
2495
|
evaluateKey((value)=>keys.push(value), {
|
|
2444
2496
|
scope: {
|
|
2445
|
-
index:
|
|
2497
|
+
index: i,
|
|
2446
2498
|
...scope2
|
|
2447
2499
|
}
|
|
2448
2500
|
});
|
|
@@ -2452,44 +2504,44 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2452
2504
|
let moves = [];
|
|
2453
2505
|
let removes = [];
|
|
2454
2506
|
let sames = [];
|
|
2455
|
-
for(let
|
|
2456
|
-
let key = prevKeys[
|
|
2507
|
+
for(let i1 = 0; i1 < prevKeys.length; i1++){
|
|
2508
|
+
let key = prevKeys[i1];
|
|
2457
2509
|
if (keys.indexOf(key) === -1) removes.push(key);
|
|
2458
2510
|
}
|
|
2459
2511
|
prevKeys = prevKeys.filter((key)=>!removes.includes(key));
|
|
2460
2512
|
let lastKey = "template";
|
|
2461
|
-
for(let
|
|
2462
|
-
let
|
|
2463
|
-
let prevIndex = prevKeys.indexOf(
|
|
2513
|
+
for(let i2 = 0; i2 < keys.length; i2++){
|
|
2514
|
+
let key1 = keys[i2];
|
|
2515
|
+
let prevIndex = prevKeys.indexOf(key1);
|
|
2464
2516
|
if (prevIndex === -1) {
|
|
2465
|
-
prevKeys.splice(
|
|
2517
|
+
prevKeys.splice(i2, 0, key1);
|
|
2466
2518
|
adds.push([
|
|
2467
2519
|
lastKey,
|
|
2468
|
-
|
|
2520
|
+
i2
|
|
2469
2521
|
]);
|
|
2470
|
-
} else if (prevIndex !==
|
|
2471
|
-
let keyInSpot = prevKeys.splice(
|
|
2522
|
+
} else if (prevIndex !== i2) {
|
|
2523
|
+
let keyInSpot = prevKeys.splice(i2, 1)[0];
|
|
2472
2524
|
let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0];
|
|
2473
|
-
prevKeys.splice(
|
|
2525
|
+
prevKeys.splice(i2, 0, keyForSpot);
|
|
2474
2526
|
prevKeys.splice(prevIndex, 0, keyInSpot);
|
|
2475
2527
|
moves.push([
|
|
2476
2528
|
keyInSpot,
|
|
2477
2529
|
keyForSpot
|
|
2478
2530
|
]);
|
|
2479
|
-
} else sames.push(
|
|
2480
|
-
lastKey =
|
|
2481
|
-
}
|
|
2482
|
-
for(let
|
|
2483
|
-
let
|
|
2484
|
-
if (!!lookup[
|
|
2485
|
-
lookup[
|
|
2486
|
-
lookup[
|
|
2487
|
-
delete lookup[
|
|
2488
|
-
}
|
|
2489
|
-
for(let
|
|
2490
|
-
let [
|
|
2491
|
-
let elInSpot = lookup[
|
|
2492
|
-
let elForSpot = lookup[
|
|
2531
|
+
} else sames.push(key1);
|
|
2532
|
+
lastKey = key1;
|
|
2533
|
+
}
|
|
2534
|
+
for(let i3 = 0; i3 < removes.length; i3++){
|
|
2535
|
+
let key2 = removes[i3];
|
|
2536
|
+
if (!!lookup[key2]._x_effects) lookup[key2]._x_effects.forEach($caa9439642c6336c$var$dequeueJob);
|
|
2537
|
+
lookup[key2].remove();
|
|
2538
|
+
lookup[key2] = null;
|
|
2539
|
+
delete lookup[key2];
|
|
2540
|
+
}
|
|
2541
|
+
for(let i4 = 0; i4 < moves.length; i4++){
|
|
2542
|
+
let [keyInSpot1, keyForSpot1] = moves[i4];
|
|
2543
|
+
let elInSpot = lookup[keyInSpot1];
|
|
2544
|
+
let elForSpot = lookup[keyForSpot1];
|
|
2493
2545
|
let marker = document.createElement("div");
|
|
2494
2546
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2495
2547
|
elForSpot.after(marker);
|
|
@@ -2499,24 +2551,24 @@ function $caa9439642c6336c$var$loop(el, iteratorNames, evaluateItems, evaluateKe
|
|
|
2499
2551
|
elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl);
|
|
2500
2552
|
marker.remove();
|
|
2501
2553
|
});
|
|
2502
|
-
$caa9439642c6336c$var$refreshScope(elForSpot, scopes[keys.indexOf(
|
|
2554
|
+
$caa9439642c6336c$var$refreshScope(elForSpot, scopes[keys.indexOf(keyForSpot1)]);
|
|
2503
2555
|
}
|
|
2504
|
-
for(let
|
|
2505
|
-
let [lastKey2, index] = adds[
|
|
2556
|
+
for(let i5 = 0; i5 < adds.length; i5++){
|
|
2557
|
+
let [lastKey2, index] = adds[i5];
|
|
2506
2558
|
let lastEl = lastKey2 === "template" ? templateEl : lookup[lastKey2];
|
|
2507
2559
|
if (lastEl._x_currentIfEl) lastEl = lastEl._x_currentIfEl;
|
|
2508
|
-
let
|
|
2509
|
-
let
|
|
2560
|
+
let scope21 = scopes[index];
|
|
2561
|
+
let key3 = keys[index];
|
|
2510
2562
|
let clone2 = document.importNode(templateEl.content, true).firstElementChild;
|
|
2511
|
-
$caa9439642c6336c$var$addScopeToNode(clone2, $caa9439642c6336c$var$reactive(
|
|
2563
|
+
$caa9439642c6336c$var$addScopeToNode(clone2, $caa9439642c6336c$var$reactive(scope21), templateEl);
|
|
2512
2564
|
$caa9439642c6336c$var$mutateDom(()=>{
|
|
2513
2565
|
lastEl.after(clone2);
|
|
2514
2566
|
$caa9439642c6336c$var$initTree(clone2);
|
|
2515
2567
|
});
|
|
2516
|
-
if (typeof
|
|
2517
|
-
lookup[
|
|
2568
|
+
if (typeof key3 === "object") $caa9439642c6336c$var$warn("x-for key cannot be an object, it must be a string or an integer", templateEl);
|
|
2569
|
+
lookup[key3] = clone2;
|
|
2518
2570
|
}
|
|
2519
|
-
for(let
|
|
2571
|
+
for(let i6 = 0; i6 < sames.length; i6++)$caa9439642c6336c$var$refreshScope(lookup[sames[i6]], scopes[keys.indexOf(sames[i6])]);
|
|
2520
2572
|
templateEl._x_prevKeys = keys;
|
|
2521
2573
|
});
|
|
2522
2574
|
}
|
|
@@ -2545,8 +2597,8 @@ function $caa9439642c6336c$var$getIterationScopeVariables(iteratorNames, item, i
|
|
|
2545
2597
|
scopeVariables[name] = item[i];
|
|
2546
2598
|
});
|
|
2547
2599
|
} else if (/^\{.*\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === "object") {
|
|
2548
|
-
let
|
|
2549
|
-
|
|
2600
|
+
let names1 = iteratorNames.item.replace("{", "").replace("}", "").split(",").map((i)=>i.trim());
|
|
2601
|
+
names1.forEach((name)=>{
|
|
2550
2602
|
scopeVariables[name] = item[name];
|
|
2551
2603
|
});
|
|
2552
2604
|
} else scopeVariables[iteratorNames.item] = item;
|
|
@@ -2695,7 +2747,9 @@ function $512e3a9270ec7803$var$dom(el) {
|
|
|
2695
2747
|
return new $512e3a9270ec7803$var$DomManager(el);
|
|
2696
2748
|
}
|
|
2697
2749
|
function $512e3a9270ec7803$var$createElement(html) {
|
|
2698
|
-
|
|
2750
|
+
const template = document.createElement("template");
|
|
2751
|
+
template.innerHTML = html;
|
|
2752
|
+
return template.content.firstElementChild;
|
|
2699
2753
|
}
|
|
2700
2754
|
function $512e3a9270ec7803$var$textOrComment(el) {
|
|
2701
2755
|
return el.nodeType === 3 || el.nodeType === 8;
|
|
@@ -2774,11 +2828,11 @@ async function $512e3a9270ec7803$export$2e5e8c41f5d4e7c7(from, toHtml, options)
|
|
|
2774
2828
|
}
|
|
2775
2829
|
}
|
|
2776
2830
|
for(let i1 = toAttributes.length - 1; i1 >= 0; i1--){
|
|
2777
|
-
let
|
|
2831
|
+
let name1 = toAttributes[i1].name;
|
|
2778
2832
|
let value = toAttributes[i1].value;
|
|
2779
|
-
if (from2.getAttribute(
|
|
2780
|
-
from2.setAttribute(
|
|
2781
|
-
await breakpoint(`Set [${
|
|
2833
|
+
if (from2.getAttribute(name1) !== value) {
|
|
2834
|
+
from2.setAttribute(name1, value);
|
|
2835
|
+
await breakpoint(`Set [${name1}] attribute to: "${value}"`);
|
|
2782
2836
|
}
|
|
2783
2837
|
}
|
|
2784
2838
|
}
|
|
@@ -4613,7 +4667,7 @@ var $69a8ec8dbeef3157$var$require_tippy_cjs = $69a8ec8dbeef3157$var$__commonJS((
|
|
|
4613
4667
|
return value.replace(spacesAndTabs, " ").replace(lineStartWithSpaces, "").trim();
|
|
4614
4668
|
}
|
|
4615
4669
|
function getDevMessage(message) {
|
|
4616
|
-
return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77
|
|
4670
|
+
return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77 This is a development-only message. It will be removed in production.\n ");
|
|
4617
4671
|
}
|
|
4618
4672
|
function getFormattedMessage(message) {
|
|
4619
4673
|
return [
|
|
@@ -6510,7 +6564,7 @@ var $5267f0d63de538ba$exports = {};
|
|
|
6510
6564
|
var cookie = window.document.cookie;
|
|
6511
6565
|
var location = cookie.indexOf(encodeURIComponent(storageKey) + "=");
|
|
6512
6566
|
if (location !== -1) storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
|
|
6513
|
-
} catch (
|
|
6567
|
+
} catch (ignore1) {}
|
|
6514
6568
|
// If the stored level is not valid, treat it as if nothing was stored.
|
|
6515
6569
|
if (self.levels[storedLevel] === undefined) storedLevel = undefined;
|
|
6516
6570
|
return storedLevel;
|
|
@@ -6525,7 +6579,7 @@ var $5267f0d63de538ba$exports = {};
|
|
|
6525
6579
|
// Use session cookie as fallback
|
|
6526
6580
|
try {
|
|
6527
6581
|
window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
6528
|
-
} catch (
|
|
6582
|
+
} catch (ignore1) {}
|
|
6529
6583
|
}
|
|
6530
6584
|
/*
|
|
6531
6585
|
*
|
|
@@ -6780,7 +6834,7 @@ function $aabd7bdddb195dac$export$2e2bcd8739ae039(Alpine, { prefix: prefix }) {
|
|
|
6780
6834
|
init () {
|
|
6781
6835
|
(0, $9930d46698775b42$export$33d4bfa367d0ee08)(`(min-width: ${(0, $4d527fa4ac70acba$export$2e2bcd8739ae039).desktopWidth}px)`, (matches)=>{
|
|
6782
6836
|
this._isDesktop = matches;
|
|
6783
|
-
(0, (/*@__PURE__*/$parcel$interopDefault($5267f0d63de538ba$exports))).debug(`Media query 'desktop': ${matches ? "
|
|
6837
|
+
(0, (/*@__PURE__*/$parcel$interopDefault($5267f0d63de538ba$exports))).debug(`Media query 'desktop': ${matches ? "✅ match" : "❌ no match"}`);
|
|
6784
6838
|
});
|
|
6785
6839
|
},
|
|
6786
6840
|
get desktop () {
|
|
@@ -6972,7 +7026,7 @@ function $af7ba71c6eecd94a$export$2e2bcd8739ae039(Alpine, { prefix: prefix }) {
|
|
|
6972
7026
|
var $7d6b1fa982d8364d$exports = {};
|
|
6973
7027
|
(function(global, factory) {
|
|
6974
7028
|
factory($7d6b1fa982d8364d$exports);
|
|
6975
|
-
})($7d6b1fa982d8364d$exports, function(
|
|
7029
|
+
})($7d6b1fa982d8364d$exports, function(exports1) {
|
|
6976
7030
|
"use strict";
|
|
6977
7031
|
var adapters = {
|
|
6978
7032
|
logger: self.console,
|
|
@@ -7023,7 +7077,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7023
7077
|
var clamp = function clamp(number, min, max) {
|
|
7024
7078
|
return Math.max(min, Math.min(max, number));
|
|
7025
7079
|
};
|
|
7026
|
-
var
|
|
7080
|
+
var ConnectionMonitor = function() {
|
|
7027
7081
|
function ConnectionMonitor(connection) {
|
|
7028
7082
|
classCallCheck(this, ConnectionMonitor);
|
|
7029
7083
|
this.visibilityDidChange = this.visibilityDidChange.bind(this);
|
|
@@ -7110,12 +7164,12 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7110
7164
|
};
|
|
7111
7165
|
return ConnectionMonitor;
|
|
7112
7166
|
}();
|
|
7113
|
-
|
|
7167
|
+
ConnectionMonitor.pollInterval = {
|
|
7114
7168
|
min: 3,
|
|
7115
7169
|
max: 30,
|
|
7116
7170
|
multiplier: 5
|
|
7117
7171
|
};
|
|
7118
|
-
|
|
7172
|
+
ConnectionMonitor.staleThreshold = 6;
|
|
7119
7173
|
var INTERNAL = {
|
|
7120
7174
|
message_types: {
|
|
7121
7175
|
welcome: "welcome",
|
|
@@ -7138,13 +7192,13 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7138
7192
|
var message_types = INTERNAL.message_types, protocols = INTERNAL.protocols;
|
|
7139
7193
|
var supportedProtocols = protocols.slice(0, protocols.length - 1);
|
|
7140
7194
|
var indexOf = [].indexOf;
|
|
7141
|
-
var
|
|
7195
|
+
var Connection = function() {
|
|
7142
7196
|
function Connection(consumer) {
|
|
7143
7197
|
classCallCheck(this, Connection);
|
|
7144
7198
|
this.open = this.open.bind(this);
|
|
7145
7199
|
this.consumer = consumer;
|
|
7146
7200
|
this.subscriptions = this.consumer.subscriptions;
|
|
7147
|
-
this.monitor = new
|
|
7201
|
+
this.monitor = new ConnectionMonitor(this);
|
|
7148
7202
|
this.disconnected = true;
|
|
7149
7203
|
}
|
|
7150
7204
|
Connection.prototype.send = function send(data) {
|
|
@@ -7218,8 +7272,8 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7218
7272
|
};
|
|
7219
7273
|
return Connection;
|
|
7220
7274
|
}();
|
|
7221
|
-
|
|
7222
|
-
|
|
7275
|
+
Connection.reopenDelay = 500;
|
|
7276
|
+
Connection.prototype.events = {
|
|
7223
7277
|
message: function message(event) {
|
|
7224
7278
|
if (!this.isProtocolSupported()) return;
|
|
7225
7279
|
var _JSON$parse = JSON.parse(event.data), identifier = _JSON$parse.identifier, message = _JSON$parse.message, reason = _JSON$parse.reason, reconnect = _JSON$parse.reconnect, type = _JSON$parse.type;
|
|
@@ -7273,7 +7327,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7273
7327
|
}
|
|
7274
7328
|
return object;
|
|
7275
7329
|
};
|
|
7276
|
-
var
|
|
7330
|
+
var Subscription = function() {
|
|
7277
7331
|
function Subscription(consumer) {
|
|
7278
7332
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7279
7333
|
var mixin = arguments[2];
|
|
@@ -7299,7 +7353,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7299
7353
|
};
|
|
7300
7354
|
return Subscription;
|
|
7301
7355
|
}();
|
|
7302
|
-
var
|
|
7356
|
+
var SubscriptionGuarantor = function() {
|
|
7303
7357
|
function SubscriptionGuarantor(subscriptions) {
|
|
7304
7358
|
classCallCheck(this, SubscriptionGuarantor);
|
|
7305
7359
|
this.subscriptions = subscriptions;
|
|
@@ -7336,11 +7390,11 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7336
7390
|
};
|
|
7337
7391
|
return SubscriptionGuarantor;
|
|
7338
7392
|
}();
|
|
7339
|
-
var
|
|
7393
|
+
var Subscriptions = function() {
|
|
7340
7394
|
function Subscriptions(consumer) {
|
|
7341
7395
|
classCallCheck(this, Subscriptions);
|
|
7342
7396
|
this.consumer = consumer;
|
|
7343
|
-
this.guarantor = new
|
|
7397
|
+
this.guarantor = new SubscriptionGuarantor(this);
|
|
7344
7398
|
this.subscriptions = [];
|
|
7345
7399
|
}
|
|
7346
7400
|
Subscriptions.prototype.create = function create(channelName, mixin) {
|
|
@@ -7348,7 +7402,7 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7348
7402
|
var params = (typeof channel === "undefined" ? "undefined" : _typeof(channel)) === "object" ? channel : {
|
|
7349
7403
|
channel: channel
|
|
7350
7404
|
};
|
|
7351
|
-
var subscription = new
|
|
7405
|
+
var subscription = new Subscription(this.consumer, params, mixin);
|
|
7352
7406
|
return this.add(subscription);
|
|
7353
7407
|
};
|
|
7354
7408
|
Subscriptions.prototype.add = function add(subscription) {
|
|
@@ -7399,12 +7453,12 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7399
7453
|
].concat(args));
|
|
7400
7454
|
});
|
|
7401
7455
|
};
|
|
7402
|
-
Subscriptions.prototype.notify = function notify(
|
|
7456
|
+
Subscriptions.prototype.notify = function notify(subscription, callbackName) {
|
|
7403
7457
|
for(var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++)args[_key2 - 2] = arguments[_key2];
|
|
7404
7458
|
var subscriptions = void 0;
|
|
7405
|
-
if (typeof
|
|
7459
|
+
if (typeof subscription === "string") subscriptions = this.findAll(subscription);
|
|
7406
7460
|
else subscriptions = [
|
|
7407
|
-
|
|
7461
|
+
subscription
|
|
7408
7462
|
];
|
|
7409
7463
|
return subscriptions.map(function(subscription) {
|
|
7410
7464
|
return typeof subscription[callbackName] === "function" ? subscription[callbackName].apply(subscription, args) : undefined;
|
|
@@ -7429,12 +7483,12 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7429
7483
|
};
|
|
7430
7484
|
return Subscriptions;
|
|
7431
7485
|
}();
|
|
7432
|
-
var
|
|
7486
|
+
var Consumer = function() {
|
|
7433
7487
|
function Consumer(url) {
|
|
7434
7488
|
classCallCheck(this, Consumer);
|
|
7435
7489
|
this._url = url;
|
|
7436
|
-
this.subscriptions = new
|
|
7437
|
-
this.connection = new
|
|
7490
|
+
this.subscriptions = new Subscriptions(this);
|
|
7491
|
+
this.connection = new Connection(this);
|
|
7438
7492
|
}
|
|
7439
7493
|
Consumer.prototype.send = function send(data) {
|
|
7440
7494
|
return this.connection.send(data);
|
|
@@ -7472,25 +7526,25 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7472
7526
|
}
|
|
7473
7527
|
function createConsumer() {
|
|
7474
7528
|
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getConfig("url") || INTERNAL.default_mount_path;
|
|
7475
|
-
return new
|
|
7529
|
+
return new Consumer(url);
|
|
7476
7530
|
}
|
|
7477
7531
|
function getConfig(name) {
|
|
7478
7532
|
var element = document.head.querySelector("meta[name='action-cable-" + name + "']");
|
|
7479
7533
|
if (element) return element.getAttribute("content");
|
|
7480
7534
|
}
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
Object.defineProperty(
|
|
7535
|
+
exports1.Connection = Connection;
|
|
7536
|
+
exports1.ConnectionMonitor = ConnectionMonitor;
|
|
7537
|
+
exports1.Consumer = Consumer;
|
|
7538
|
+
exports1.INTERNAL = INTERNAL;
|
|
7539
|
+
exports1.Subscription = Subscription;
|
|
7540
|
+
exports1.Subscriptions = Subscriptions;
|
|
7541
|
+
exports1.SubscriptionGuarantor = SubscriptionGuarantor;
|
|
7542
|
+
exports1.adapters = adapters;
|
|
7543
|
+
exports1.createWebSocketURL = createWebSocketURL;
|
|
7544
|
+
exports1.logger = logger;
|
|
7545
|
+
exports1.createConsumer = createConsumer;
|
|
7546
|
+
exports1.getConfig = getConfig;
|
|
7547
|
+
Object.defineProperty(exports1, "__esModule", {
|
|
7494
7548
|
value: true
|
|
7495
7549
|
});
|
|
7496
7550
|
});
|
|
@@ -7516,8 +7570,8 @@ var $7d6b1fa982d8364d$exports = {};
|
|
|
7516
7570
|
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
7517
7571
|
*
|
|
7518
7572
|
* @returns {Function} A new, throttled, function.
|
|
7519
|
-
*/ function $c5d017602d25d050$export$de363e709c412c8a(delay, callback,
|
|
7520
|
-
var _ref =
|
|
7573
|
+
*/ function $c5d017602d25d050$export$de363e709c412c8a(delay, callback, options) {
|
|
7574
|
+
var _ref = options || {}, _ref$noTrailing = _ref.noTrailing, noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, _ref$noLeading = _ref.noLeading, noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, _ref$debounceMode = _ref.debounceMode, debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
7521
7575
|
/*
|
|
7522
7576
|
* After wrapper has stopped being called, this timeout ensures that
|
|
7523
7577
|
* `callback` is executed at the proper times in `throttle` and `end`
|
|
@@ -7678,8 +7732,15 @@ async function $e8e1f68a69f95ce8$export$51c59e2af49c1a92(url, selector) {
|
|
|
7678
7732
|
|
|
7679
7733
|
function $d709d0f4027033b2$export$2e2bcd8739ae039() {
|
|
7680
7734
|
return {
|
|
7735
|
+
_requestsInProgress: 0,
|
|
7681
7736
|
version: Alpine.$persist("").as("lookbook-version"),
|
|
7682
7737
|
location: window.location,
|
|
7738
|
+
get sidebarHidden () {
|
|
7739
|
+
return this.$store.layout.sidebar.hidden;
|
|
7740
|
+
},
|
|
7741
|
+
get loading () {
|
|
7742
|
+
return this._requestsInProgress > 0;
|
|
7743
|
+
},
|
|
7683
7744
|
init () {
|
|
7684
7745
|
if (window.SOCKET_PATH) {
|
|
7685
7746
|
console.log("SOCKET CREATED");
|
|
@@ -7709,10 +7770,12 @@ function $d709d0f4027033b2$export$2e2bcd8739ae039() {
|
|
|
7709
7770
|
async updateDOM () {
|
|
7710
7771
|
this.debug("Starting DOM update");
|
|
7711
7772
|
this.$dispatch("dom:update-start");
|
|
7773
|
+
this.requestStart();
|
|
7712
7774
|
try {
|
|
7713
7775
|
const { fragment: fragment , title: title } = await (0, $e8e1f68a69f95ce8$export$51c59e2af49c1a92)(window.location, `#${this.$root.id}`);
|
|
7714
7776
|
(0, $e263283f97229955$export$2e5e8c41f5d4e7c7)(this.$root, fragment);
|
|
7715
7777
|
document.title = title;
|
|
7778
|
+
this.requestEnd();
|
|
7716
7779
|
this.$dispatch("dom:update-complete");
|
|
7717
7780
|
this.debug("DOM update complete");
|
|
7718
7781
|
} catch (err) {
|
|
@@ -7726,8 +7789,11 @@ function $d709d0f4027033b2$export$2e2bcd8739ae039() {
|
|
|
7726
7789
|
closeMobileSidebar () {
|
|
7727
7790
|
if (this.$store.layout.mobile && !this.sidebarHidden) this.toggleSidebar();
|
|
7728
7791
|
},
|
|
7729
|
-
|
|
7730
|
-
|
|
7792
|
+
requestStart () {
|
|
7793
|
+
this._requestsInProgress += 1;
|
|
7794
|
+
},
|
|
7795
|
+
requestEnd () {
|
|
7796
|
+
if (this._requestsInProgress > 0) this._requestsInProgress -= 1;
|
|
7731
7797
|
},
|
|
7732
7798
|
...Alpine.$log
|
|
7733
7799
|
};
|
|
@@ -7755,7 +7821,7 @@ function $5439cede634b2921$var$toCamel(s) {
|
|
|
7755
7821
|
}
|
|
7756
7822
|
|
|
7757
7823
|
|
|
7758
|
-
var $
|
|
7824
|
+
var $205fb3dd9870d001$exports = {};
|
|
7759
7825
|
var $cbd28b10fa9798c7$exports = {};
|
|
7760
7826
|
|
|
7761
7827
|
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
|
|
@@ -7795,10 +7861,10 @@ function $1fa2a5446b18c455$export$af51f0f06c0f328a(node) {
|
|
|
7795
7861
|
// and applies them to the HTMLElements such as popper and arrow
|
|
7796
7862
|
function $dfb41fce0bddd2d8$var$applyStyles(_ref) {
|
|
7797
7863
|
var state = _ref.state;
|
|
7798
|
-
Object.keys(state.elements).forEach(function(
|
|
7799
|
-
var style = state.styles[
|
|
7800
|
-
var attributes = state.attributes[
|
|
7801
|
-
var element = state.elements[
|
|
7864
|
+
Object.keys(state.elements).forEach(function(name) {
|
|
7865
|
+
var style = state.styles[name] || {};
|
|
7866
|
+
var attributes = state.attributes[name] || {};
|
|
7867
|
+
var element = state.elements[name]; // arrow is optional + virtual elements
|
|
7802
7868
|
if (!(0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element) || !(0, $59d97a6bab2b727e$export$2e2bcd8739ae039)(element)) return;
|
|
7803
7869
|
// Flow doesn't support to extend this property, but it's the most
|
|
7804
7870
|
// effective way to apply styles to an HTMLElement
|
|
@@ -7833,12 +7899,12 @@ function $dfb41fce0bddd2d8$var$effect(_ref2) {
|
|
|
7833
7899
|
var element = state.elements[name];
|
|
7834
7900
|
var attributes = state.attributes[name] || {};
|
|
7835
7901
|
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
|
|
7836
|
-
var
|
|
7902
|
+
var style = styleProperties.reduce(function(style, property) {
|
|
7837
7903
|
style[property] = "";
|
|
7838
7904
|
return style;
|
|
7839
7905
|
}, {}); // arrow is optional + virtual elements
|
|
7840
7906
|
if (!(0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element) || !(0, $59d97a6bab2b727e$export$2e2bcd8739ae039)(element)) return;
|
|
7841
|
-
Object.assign(element.style,
|
|
7907
|
+
Object.assign(element.style, style);
|
|
7842
7908
|
Object.keys(attributes).forEach(function(attribute) {
|
|
7843
7909
|
element.removeAttribute(attribute);
|
|
7844
7910
|
});
|
|
@@ -7863,27 +7929,46 @@ var $a435872b5ba665df$export$96ec731ed4dcb222 = Math.min;
|
|
|
7863
7929
|
var $a435872b5ba665df$export$2077e0241d6afd3c = Math.round;
|
|
7864
7930
|
|
|
7865
7931
|
|
|
7866
|
-
|
|
7932
|
+
|
|
7933
|
+
function $beb42d7aceecf8c8$export$2e2bcd8739ae039() {
|
|
7934
|
+
var uaData = navigator.userAgentData;
|
|
7935
|
+
if (uaData != null && uaData.brands) return uaData.brands.map(function(item) {
|
|
7936
|
+
return item.brand + "/" + item.version;
|
|
7937
|
+
}).join(" ");
|
|
7938
|
+
return navigator.userAgent;
|
|
7939
|
+
}
|
|
7940
|
+
|
|
7941
|
+
|
|
7942
|
+
function $f6bdda075fc14cbf$export$2e2bcd8739ae039() {
|
|
7943
|
+
return !/^((?!chrome|android).)*safari/i.test((0, $beb42d7aceecf8c8$export$2e2bcd8739ae039)());
|
|
7944
|
+
}
|
|
7945
|
+
|
|
7946
|
+
|
|
7947
|
+
function $b854957821c00430$export$2e2bcd8739ae039(element, includeScale, isFixedStrategy) {
|
|
7867
7948
|
if (includeScale === void 0) includeScale = false;
|
|
7868
|
-
|
|
7949
|
+
if (isFixedStrategy === void 0) isFixedStrategy = false;
|
|
7950
|
+
var clientRect = element.getBoundingClientRect();
|
|
7869
7951
|
var scaleX = 1;
|
|
7870
7952
|
var scaleY = 1;
|
|
7871
|
-
if ((0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element)
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7953
|
+
if (includeScale && (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element)) {
|
|
7954
|
+
scaleX = element.offsetWidth > 0 ? (0, $a435872b5ba665df$export$2077e0241d6afd3c)(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
7955
|
+
scaleY = element.offsetHeight > 0 ? (0, $a435872b5ba665df$export$2077e0241d6afd3c)(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
7956
|
+
}
|
|
7957
|
+
var _ref = (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(element) ? (0, $f41f4520bee001a7$export$2e2bcd8739ae039)(element) : window, visualViewport = _ref.visualViewport;
|
|
7958
|
+
var addVisualOffsets = !(0, $f6bdda075fc14cbf$export$2e2bcd8739ae039)() && isFixedStrategy;
|
|
7959
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
7960
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
7961
|
+
var width = clientRect.width / scaleX;
|
|
7962
|
+
var height = clientRect.height / scaleY;
|
|
7878
7963
|
return {
|
|
7879
|
-
width:
|
|
7880
|
-
height:
|
|
7881
|
-
top:
|
|
7882
|
-
right:
|
|
7883
|
-
bottom:
|
|
7884
|
-
left:
|
|
7885
|
-
x:
|
|
7886
|
-
y:
|
|
7964
|
+
width: width,
|
|
7965
|
+
height: height,
|
|
7966
|
+
top: y,
|
|
7967
|
+
right: x + width,
|
|
7968
|
+
bottom: y + height,
|
|
7969
|
+
left: x,
|
|
7970
|
+
x: x,
|
|
7971
|
+
y: y
|
|
7887
7972
|
};
|
|
7888
7973
|
}
|
|
7889
7974
|
|
|
@@ -7965,7 +8050,7 @@ function $a195ad21b1cffe79$export$2e2bcd8739ae039(elementOrVirtualElement, offse
|
|
|
7965
8050
|
var isOffsetParentAnElement = (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(offsetParent);
|
|
7966
8051
|
var offsetParentIsScaled = (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(offsetParent) && $a195ad21b1cffe79$var$isElementScaled(offsetParent);
|
|
7967
8052
|
var documentElement = (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(offsetParent);
|
|
7968
|
-
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(elementOrVirtualElement, offsetParentIsScaled);
|
|
8053
|
+
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
|
7969
8054
|
var scroll = {
|
|
7970
8055
|
scrollLeft: 0,
|
|
7971
8056
|
scrollTop: 0
|
|
@@ -8068,14 +8153,15 @@ function $b7f6a1d3d9524a70$export$2e2bcd8739ae039(element) {
|
|
|
8068
8153
|
|
|
8069
8154
|
|
|
8070
8155
|
|
|
8156
|
+
|
|
8071
8157
|
function $4acba801a6bfbaa3$var$getTrueOffsetParent(element) {
|
|
8072
8158
|
if (!(0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element) || (0, $392247934674b5b4$export$2e2bcd8739ae039)(element).position === "fixed") return null;
|
|
8073
8159
|
return element.offsetParent;
|
|
8074
8160
|
} // `.offsetParent` reports `null` for fixed elements, while absolute elements
|
|
8075
8161
|
// return the containing block
|
|
8076
8162
|
function $4acba801a6bfbaa3$var$getContainingBlock(element) {
|
|
8077
|
-
var isFirefox =
|
|
8078
|
-
var isIE =
|
|
8163
|
+
var isFirefox = /firefox/i.test((0, $beb42d7aceecf8c8$export$2e2bcd8739ae039)());
|
|
8164
|
+
var isIE = /Trident/i.test((0, $beb42d7aceecf8c8$export$2e2bcd8739ae039)());
|
|
8079
8165
|
if (isIE && (0, $1fa2a5446b18c455$export$1b3bfaa9684536aa)(element)) {
|
|
8080
8166
|
// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
|
|
8081
8167
|
var elementCss = (0, $392247934674b5b4$export$2e2bcd8739ae039)(element);
|
|
@@ -8215,7 +8301,7 @@ function $d6d1d118731c5c9c$export$2e2bcd8739ae039(fn) {
|
|
|
8215
8301
|
|
|
8216
8302
|
|
|
8217
8303
|
function $6af99e74d4c8a734$export$2e2bcd8739ae039(modifiers) {
|
|
8218
|
-
var
|
|
8304
|
+
var merged = modifiers.reduce(function(merged, current) {
|
|
8219
8305
|
var existing = merged[current.name];
|
|
8220
8306
|
merged[current.name] = existing ? Object.assign({}, existing, current, {
|
|
8221
8307
|
options: Object.assign({}, existing.options, current.options),
|
|
@@ -8223,8 +8309,8 @@ function $6af99e74d4c8a734$export$2e2bcd8739ae039(modifiers) {
|
|
|
8223
8309
|
}) : current;
|
|
8224
8310
|
return merged;
|
|
8225
8311
|
}, {}); // IE11 does not support Object.values
|
|
8226
|
-
return Object.keys(
|
|
8227
|
-
return
|
|
8312
|
+
return Object.keys(merged).map(function(key) {
|
|
8313
|
+
return merged[key];
|
|
8228
8314
|
});
|
|
8229
8315
|
}
|
|
8230
8316
|
|
|
@@ -8248,16 +8334,16 @@ function $8e357be334f3fad9$var$areValidElements() {
|
|
|
8248
8334
|
function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
8249
8335
|
if (generatorOptions === void 0) generatorOptions = {};
|
|
8250
8336
|
var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? $8e357be334f3fad9$var$DEFAULT_OPTIONS : _generatorOptions$def2;
|
|
8251
|
-
return function createPopper(
|
|
8252
|
-
if (
|
|
8253
|
-
var
|
|
8337
|
+
return function createPopper(reference, popper, options) {
|
|
8338
|
+
if (options === void 0) options = defaultOptions;
|
|
8339
|
+
var state = {
|
|
8254
8340
|
placement: "bottom",
|
|
8255
8341
|
orderedModifiers: [],
|
|
8256
8342
|
options: Object.assign({}, $8e357be334f3fad9$var$DEFAULT_OPTIONS, defaultOptions),
|
|
8257
8343
|
modifiersData: {},
|
|
8258
8344
|
elements: {
|
|
8259
|
-
reference:
|
|
8260
|
-
popper:
|
|
8345
|
+
reference: reference,
|
|
8346
|
+
popper: popper
|
|
8261
8347
|
},
|
|
8262
8348
|
attributes: {},
|
|
8263
8349
|
styles: {}
|
|
@@ -8265,18 +8351,18 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
|
8265
8351
|
var effectCleanupFns = [];
|
|
8266
8352
|
var isDestroyed = false;
|
|
8267
8353
|
var instance = {
|
|
8268
|
-
state:
|
|
8354
|
+
state: state,
|
|
8269
8355
|
setOptions: function setOptions(setOptionsAction) {
|
|
8270
|
-
var options = typeof setOptionsAction === "function" ? setOptionsAction(
|
|
8356
|
+
var options = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
|
|
8271
8357
|
cleanupModifierEffects();
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
reference: (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(
|
|
8275
|
-
popper: (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(
|
|
8358
|
+
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
8359
|
+
state.scrollParents = {
|
|
8360
|
+
reference: (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(reference) ? (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(reference) : reference.contextElement ? (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(reference.contextElement) : [],
|
|
8361
|
+
popper: (0, $f14b4e1cd31512ee$export$2e2bcd8739ae039)(popper)
|
|
8276
8362
|
}; // Orders the modifiers based on their dependencies and `phase`
|
|
8277
8363
|
// properties
|
|
8278
|
-
var orderedModifiers = (0, $6e11c0a2f23600d6$export$2e2bcd8739ae039)((0, $6af99e74d4c8a734$export$2e2bcd8739ae039)([].concat(defaultModifiers,
|
|
8279
|
-
|
|
8364
|
+
var orderedModifiers = (0, $6e11c0a2f23600d6$export$2e2bcd8739ae039)((0, $6af99e74d4c8a734$export$2e2bcd8739ae039)([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
|
|
8365
|
+
state.orderedModifiers = orderedModifiers.filter(function(m) {
|
|
8280
8366
|
return m.enabled;
|
|
8281
8367
|
}); // Validate the provided modifiers so that the consumer will get warned
|
|
8282
8368
|
var modifiers, _ref, name, flipModifier, _ref2, name1, _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, margin;
|
|
@@ -8290,40 +8376,40 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
|
8290
8376
|
// prefer the async Popper#update method
|
|
8291
8377
|
forceUpdate: function forceUpdate() {
|
|
8292
8378
|
if (isDestroyed) return;
|
|
8293
|
-
var _state$elements =
|
|
8379
|
+
var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
|
|
8294
8380
|
// anymore
|
|
8295
8381
|
if (!$8e357be334f3fad9$var$areValidElements(reference, popper)) return;
|
|
8296
8382
|
// Store the reference and popper rects to be read by modifiers
|
|
8297
|
-
|
|
8298
|
-
reference: (0, $a195ad21b1cffe79$export$2e2bcd8739ae039)(reference, (0, $4acba801a6bfbaa3$export$2e2bcd8739ae039)(popper),
|
|
8383
|
+
state.rects = {
|
|
8384
|
+
reference: (0, $a195ad21b1cffe79$export$2e2bcd8739ae039)(reference, (0, $4acba801a6bfbaa3$export$2e2bcd8739ae039)(popper), state.options.strategy === "fixed"),
|
|
8299
8385
|
popper: (0, $e287ac773d355028$export$2e2bcd8739ae039)(popper)
|
|
8300
8386
|
}; // Modifiers have the ability to reset the current update cycle. The
|
|
8301
8387
|
// most common use case for this is the `flip` modifier changing the
|
|
8302
8388
|
// placement, which then needs to re-run all the modifiers, because the
|
|
8303
8389
|
// logic was previously ran for the previous placement and is therefore
|
|
8304
8390
|
// stale/incorrect
|
|
8305
|
-
|
|
8306
|
-
|
|
8391
|
+
state.reset = false;
|
|
8392
|
+
state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
|
|
8307
8393
|
// is filled with the initial data specified by the modifier. This means
|
|
8308
8394
|
// it doesn't persist and is fresh on each update.
|
|
8309
8395
|
// To ensure persistent data, use `${name}#persistent`
|
|
8310
|
-
|
|
8311
|
-
return
|
|
8396
|
+
state.orderedModifiers.forEach(function(modifier) {
|
|
8397
|
+
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
8312
8398
|
});
|
|
8313
8399
|
var __debug_loops__ = 0;
|
|
8314
|
-
for(var index = 0; index <
|
|
8315
|
-
if (
|
|
8316
|
-
|
|
8400
|
+
for(var index = 0; index < state.orderedModifiers.length; index++){
|
|
8401
|
+
if (state.reset === true) {
|
|
8402
|
+
state.reset = false;
|
|
8317
8403
|
index = -1;
|
|
8318
8404
|
continue;
|
|
8319
8405
|
}
|
|
8320
|
-
var _state$orderedModifie =
|
|
8321
|
-
if (typeof fn === "function")
|
|
8322
|
-
state:
|
|
8406
|
+
var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
|
|
8407
|
+
if (typeof fn === "function") state = fn({
|
|
8408
|
+
state: state,
|
|
8323
8409
|
options: _options,
|
|
8324
8410
|
name: name,
|
|
8325
8411
|
instance: instance
|
|
8326
|
-
}) ||
|
|
8412
|
+
}) || state;
|
|
8327
8413
|
}
|
|
8328
8414
|
},
|
|
8329
8415
|
// Async and optimistically optimized update – it will not be executed if
|
|
@@ -8331,7 +8417,7 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
|
8331
8417
|
update: (0, $d6d1d118731c5c9c$export$2e2bcd8739ae039)(function() {
|
|
8332
8418
|
return new Promise(function(resolve) {
|
|
8333
8419
|
instance.forceUpdate();
|
|
8334
|
-
resolve(
|
|
8420
|
+
resolve(state);
|
|
8335
8421
|
});
|
|
8336
8422
|
}),
|
|
8337
8423
|
destroy: function destroy() {
|
|
@@ -8339,20 +8425,20 @@ function $8e357be334f3fad9$export$ed5e13716264f202(generatorOptions) {
|
|
|
8339
8425
|
isDestroyed = true;
|
|
8340
8426
|
}
|
|
8341
8427
|
};
|
|
8342
|
-
if (!$8e357be334f3fad9$var$areValidElements(
|
|
8343
|
-
instance.setOptions(
|
|
8344
|
-
if (!isDestroyed &&
|
|
8428
|
+
if (!$8e357be334f3fad9$var$areValidElements(reference, popper)) return instance;
|
|
8429
|
+
instance.setOptions(options).then(function(state) {
|
|
8430
|
+
if (!isDestroyed && options.onFirstUpdate) options.onFirstUpdate(state);
|
|
8345
8431
|
}); // Modifiers have the ability to execute arbitrary code before the first
|
|
8346
8432
|
// update cycle runs. They will be executed in the same order as the update
|
|
8347
8433
|
// cycle. This is useful when a modifier adds some persistent data that
|
|
8348
8434
|
// other modifiers need to use, but the modifier is run after the dependent
|
|
8349
8435
|
// one.
|
|
8350
8436
|
function runModifierEffects() {
|
|
8351
|
-
|
|
8437
|
+
state.orderedModifiers.forEach(function(_ref3) {
|
|
8352
8438
|
var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {} : _ref3$options, effect = _ref3.effect;
|
|
8353
8439
|
if (typeof effect === "function") {
|
|
8354
8440
|
var cleanupFn = effect({
|
|
8355
|
-
state:
|
|
8441
|
+
state: state,
|
|
8356
8442
|
name: name,
|
|
8357
8443
|
instance: instance,
|
|
8358
8444
|
options: options
|
|
@@ -8627,15 +8713,15 @@ var $03e421bdaa8eda14$export$2e2bcd8739ae039 = {
|
|
|
8627
8713
|
|
|
8628
8714
|
|
|
8629
8715
|
|
|
8630
|
-
function $b2dec03e76957d70$export$7fa02d8595b015ed(placement, rects,
|
|
8716
|
+
function $b2dec03e76957d70$export$7fa02d8595b015ed(placement, rects, offset) {
|
|
8631
8717
|
var basePlacement = (0, $923eec132c8d334b$export$2e2bcd8739ae039)(placement);
|
|
8632
8718
|
var invertDistance = [
|
|
8633
8719
|
(0, $9b56e55559dfbda1$export$eabcd2c8791e7bf4),
|
|
8634
8720
|
(0, $9b56e55559dfbda1$export$1e95b668f3b82d)
|
|
8635
8721
|
].indexOf(basePlacement) >= 0 ? -1 : 1;
|
|
8636
|
-
var _ref = typeof
|
|
8722
|
+
var _ref = typeof offset === "function" ? offset(Object.assign({}, rects, {
|
|
8637
8723
|
placement: placement
|
|
8638
|
-
})) :
|
|
8724
|
+
})) : offset, skidding = _ref[0], distance = _ref[1];
|
|
8639
8725
|
skidding = skidding || 0;
|
|
8640
8726
|
distance = (distance || 0) * invertDistance;
|
|
8641
8727
|
return [
|
|
@@ -8651,12 +8737,12 @@ function $b2dec03e76957d70$export$7fa02d8595b015ed(placement, rects, offset1) {
|
|
|
8651
8737
|
}
|
|
8652
8738
|
function $b2dec03e76957d70$var$offset(_ref2) {
|
|
8653
8739
|
var state = _ref2.state, options = _ref2.options, name = _ref2.name;
|
|
8654
|
-
var _options$offset = options.offset,
|
|
8740
|
+
var _options$offset = options.offset, offset = _options$offset === void 0 ? [
|
|
8655
8741
|
0,
|
|
8656
8742
|
0
|
|
8657
8743
|
] : _options$offset;
|
|
8658
8744
|
var data = (0, $9b56e55559dfbda1$export$803cd8101b6c182b).reduce(function(acc, placement) {
|
|
8659
|
-
acc[placement] = $b2dec03e76957d70$export$7fa02d8595b015ed(placement, state.rects,
|
|
8745
|
+
acc[placement] = $b2dec03e76957d70$export$7fa02d8595b015ed(placement, state.rects, offset);
|
|
8660
8746
|
return acc;
|
|
8661
8747
|
}, {});
|
|
8662
8748
|
var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
|
|
@@ -8706,29 +8792,20 @@ function $e23a845ff98433e2$export$2e2bcd8739ae039(placement) {
|
|
|
8706
8792
|
|
|
8707
8793
|
|
|
8708
8794
|
|
|
8709
|
-
|
|
8795
|
+
|
|
8796
|
+
function $ed6afea5d5a4d314$export$2e2bcd8739ae039(element, strategy) {
|
|
8710
8797
|
var win = (0, $f41f4520bee001a7$export$2e2bcd8739ae039)(element);
|
|
8711
8798
|
var html = (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(element);
|
|
8712
8799
|
var visualViewport = win.visualViewport;
|
|
8713
8800
|
var width = html.clientWidth;
|
|
8714
8801
|
var height = html.clientHeight;
|
|
8715
8802
|
var x = 0;
|
|
8716
|
-
var y = 0;
|
|
8717
|
-
// can be obscured underneath it.
|
|
8718
|
-
// Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
|
|
8719
|
-
// if it isn't open, so if this isn't available, the popper will be detected
|
|
8720
|
-
// to overflow the bottom of the screen too early.
|
|
8803
|
+
var y = 0;
|
|
8721
8804
|
if (visualViewport) {
|
|
8722
8805
|
width = visualViewport.width;
|
|
8723
|
-
height = visualViewport.height;
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
// Safari returns a number <= 0, usually < -1 when pinch-zoomed
|
|
8727
|
-
// Feature detection fails in mobile emulation mode in Chrome.
|
|
8728
|
-
// Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
|
|
8729
|
-
// 0.001
|
|
8730
|
-
// Fallback here: "Not Safari" userAgent
|
|
8731
|
-
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
|
8806
|
+
height = visualViewport.height;
|
|
8807
|
+
var layoutViewport = (0, $f6bdda075fc14cbf$export$2e2bcd8739ae039)();
|
|
8808
|
+
if (layoutViewport || !layoutViewport && strategy === "fixed") {
|
|
8732
8809
|
x = visualViewport.offsetLeft;
|
|
8733
8810
|
y = visualViewport.offsetTop;
|
|
8734
8811
|
}
|
|
@@ -8801,8 +8878,8 @@ function $611b7cfc3d40c8f5$export$2e2bcd8739ae039(rect) {
|
|
|
8801
8878
|
|
|
8802
8879
|
|
|
8803
8880
|
|
|
8804
|
-
function $1ae21a55ad42cc80$var$getInnerBoundingClientRect(element) {
|
|
8805
|
-
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(element);
|
|
8881
|
+
function $1ae21a55ad42cc80$var$getInnerBoundingClientRect(element, strategy) {
|
|
8882
|
+
var rect = (0, $b854957821c00430$export$2e2bcd8739ae039)(element, false, strategy === "fixed");
|
|
8806
8883
|
rect.top = rect.top + element.clientTop;
|
|
8807
8884
|
rect.left = rect.left + element.clientLeft;
|
|
8808
8885
|
rect.bottom = rect.top + element.clientHeight;
|
|
@@ -8813,8 +8890,8 @@ function $1ae21a55ad42cc80$var$getInnerBoundingClientRect(element) {
|
|
|
8813
8890
|
rect.y = rect.top;
|
|
8814
8891
|
return rect;
|
|
8815
8892
|
}
|
|
8816
|
-
function $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent) {
|
|
8817
|
-
return clippingParent === (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) ? (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $ed6afea5d5a4d314$export$2e2bcd8739ae039)(element)) : (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(clippingParent) ? $1ae21a55ad42cc80$var$getInnerBoundingClientRect(clippingParent) : (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $048158ac5222e515$export$2e2bcd8739ae039)((0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(element)));
|
|
8893
|
+
function $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent, strategy) {
|
|
8894
|
+
return clippingParent === (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) ? (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $ed6afea5d5a4d314$export$2e2bcd8739ae039)(element, strategy)) : (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(clippingParent) ? $1ae21a55ad42cc80$var$getInnerBoundingClientRect(clippingParent, strategy) : (0, $611b7cfc3d40c8f5$export$2e2bcd8739ae039)((0, $048158ac5222e515$export$2e2bcd8739ae039)((0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(element)));
|
|
8818
8895
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
8819
8896
|
// clipping (or hiding) overflowing elements with a position different from
|
|
8820
8897
|
// `initial`
|
|
@@ -8831,20 +8908,20 @@ function $1ae21a55ad42cc80$var$getClippingParents(element) {
|
|
|
8831
8908
|
return (0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(clippingParent) && (0, $d1f185f47d247fa7$export$2e2bcd8739ae039)(clippingParent, clipperElement) && (0, $59d97a6bab2b727e$export$2e2bcd8739ae039)(clippingParent) !== "body";
|
|
8832
8909
|
});
|
|
8833
8910
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
8834
|
-
function $1ae21a55ad42cc80$export$2e2bcd8739ae039(element, boundary, rootBoundary) {
|
|
8911
|
+
function $1ae21a55ad42cc80$export$2e2bcd8739ae039(element, boundary, rootBoundary, strategy) {
|
|
8835
8912
|
var mainClippingParents = boundary === "clippingParents" ? $1ae21a55ad42cc80$var$getClippingParents(element) : [].concat(boundary);
|
|
8836
8913
|
var clippingParents = [].concat(mainClippingParents, [
|
|
8837
8914
|
rootBoundary
|
|
8838
8915
|
]);
|
|
8839
8916
|
var firstClippingParent = clippingParents[0];
|
|
8840
8917
|
var clippingRect = clippingParents.reduce(function(accRect, clippingParent) {
|
|
8841
|
-
var rect = $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent);
|
|
8918
|
+
var rect = $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, clippingParent, strategy);
|
|
8842
8919
|
accRect.top = (0, $a435872b5ba665df$export$8960430cfd85939f)(rect.top, accRect.top);
|
|
8843
8920
|
accRect.right = (0, $a435872b5ba665df$export$96ec731ed4dcb222)(rect.right, accRect.right);
|
|
8844
8921
|
accRect.bottom = (0, $a435872b5ba665df$export$96ec731ed4dcb222)(rect.bottom, accRect.bottom);
|
|
8845
8922
|
accRect.left = (0, $a435872b5ba665df$export$8960430cfd85939f)(rect.left, accRect.left);
|
|
8846
8923
|
return accRect;
|
|
8847
|
-
}, $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, firstClippingParent));
|
|
8924
|
+
}, $1ae21a55ad42cc80$var$getClientRectFromMixedType(element, firstClippingParent, strategy));
|
|
8848
8925
|
clippingRect.width = clippingRect.right - clippingRect.left;
|
|
8849
8926
|
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
|
8850
8927
|
clippingRect.x = clippingRect.left;
|
|
@@ -8884,12 +8961,12 @@ function $f5b522f3e076d616$export$2e2bcd8739ae039(value, keys) {
|
|
|
8884
8961
|
|
|
8885
8962
|
function $223e3075705edc49$export$2e2bcd8739ae039(state, options) {
|
|
8886
8963
|
if (options === void 0) options = {};
|
|
8887
|
-
var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? (0, $9b56e55559dfbda1$export$390fd549c5303b4d) : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? (0, $9b56e55559dfbda1$export$ae5ab1c730825774) : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
8964
|
+
var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? (0, $9b56e55559dfbda1$export$390fd549c5303b4d) : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? (0, $9b56e55559dfbda1$export$d7b7311ec04a3e8f) : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? (0, $9b56e55559dfbda1$export$ae5ab1c730825774) : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
8888
8965
|
var paddingObject = (0, $4867192599152955$export$2e2bcd8739ae039)(typeof padding !== "number" ? padding : (0, $f5b522f3e076d616$export$2e2bcd8739ae039)(padding, (0, $9b56e55559dfbda1$export$aec2ce47c367b8c3)));
|
|
8889
8966
|
var altContext = elementContext === (0, $9b56e55559dfbda1$export$ae5ab1c730825774) ? (0, $9b56e55559dfbda1$export$ca50aac9f3ba507f) : (0, $9b56e55559dfbda1$export$ae5ab1c730825774);
|
|
8890
8967
|
var popperRect = state.rects.popper;
|
|
8891
8968
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
8892
|
-
var clippingClientRect = (0, $1ae21a55ad42cc80$export$2e2bcd8739ae039)((0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(element) ? element : element.contextElement || (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(state.elements.popper), boundary, rootBoundary);
|
|
8969
|
+
var clippingClientRect = (0, $1ae21a55ad42cc80$export$2e2bcd8739ae039)((0, $1fa2a5446b18c455$export$45a5e7f76e0caa8d)(element) ? element : element.contextElement || (0, $3e02d6708e2a16ac$export$2e2bcd8739ae039)(state.elements.popper), boundary, rootBoundary, strategy);
|
|
8893
8970
|
var referenceClientRect = (0, $b854957821c00430$export$2e2bcd8739ae039)(state.elements.reference);
|
|
8894
8971
|
var popperOffsets = (0, $05d4a7bd7e0110bf$export$2e2bcd8739ae039)({
|
|
8895
8972
|
reference: referenceClientRect,
|
|
@@ -8931,8 +9008,8 @@ function $223e3075705edc49$export$2e2bcd8739ae039(state, options) {
|
|
|
8931
9008
|
|
|
8932
9009
|
function $4ec2b0d0092c1820$export$2e2bcd8739ae039(state, options) {
|
|
8933
9010
|
if (options === void 0) options = {};
|
|
8934
|
-
var _options = options,
|
|
8935
|
-
var variation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(
|
|
9011
|
+
var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? (0, $9b56e55559dfbda1$export$803cd8101b6c182b) : _options$allowedAutoP;
|
|
9012
|
+
var variation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(placement);
|
|
8936
9013
|
var placements = variation ? flipVariations ? (0, $9b56e55559dfbda1$export$368f9a87e87fa4e1) : (0, $9b56e55559dfbda1$export$368f9a87e87fa4e1).filter(function(placement) {
|
|
8937
9014
|
return (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(placement) === variation;
|
|
8938
9015
|
}) : (0, $9b56e55559dfbda1$export$aec2ce47c367b8c3);
|
|
@@ -8995,16 +9072,16 @@ function $d886080699dc4994$var$flip(_ref) {
|
|
|
8995
9072
|
var makeFallbackChecks = true;
|
|
8996
9073
|
var firstFittingPlacement = placements[0];
|
|
8997
9074
|
for(var i = 0; i < placements.length; i++){
|
|
8998
|
-
var
|
|
8999
|
-
var _basePlacement = (0, $923eec132c8d334b$export$2e2bcd8739ae039)(
|
|
9000
|
-
var isStartVariation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(
|
|
9075
|
+
var placement = placements[i];
|
|
9076
|
+
var _basePlacement = (0, $923eec132c8d334b$export$2e2bcd8739ae039)(placement);
|
|
9077
|
+
var isStartVariation = (0, $6572b8fb6297a772$export$2e2bcd8739ae039)(placement) === (0, $9b56e55559dfbda1$export$b3571188c770cc5a);
|
|
9001
9078
|
var isVertical = [
|
|
9002
9079
|
(0, $9b56e55559dfbda1$export$1e95b668f3b82d),
|
|
9003
9080
|
(0, $9b56e55559dfbda1$export$40e543e69a8b3fbb)
|
|
9004
9081
|
].indexOf(_basePlacement) >= 0;
|
|
9005
9082
|
var len = isVertical ? "width" : "height";
|
|
9006
9083
|
var overflow = (0, $223e3075705edc49$export$2e2bcd8739ae039)(state, {
|
|
9007
|
-
placement:
|
|
9084
|
+
placement: placement,
|
|
9008
9085
|
boundary: boundary,
|
|
9009
9086
|
rootBoundary: rootBoundary,
|
|
9010
9087
|
altBoundary: altBoundary,
|
|
@@ -9019,11 +9096,11 @@ function $d886080699dc4994$var$flip(_ref) {
|
|
|
9019
9096
|
if (checks.every(function(check) {
|
|
9020
9097
|
return check;
|
|
9021
9098
|
})) {
|
|
9022
|
-
firstFittingPlacement =
|
|
9099
|
+
firstFittingPlacement = placement;
|
|
9023
9100
|
makeFallbackChecks = false;
|
|
9024
9101
|
break;
|
|
9025
9102
|
}
|
|
9026
|
-
checksMap.set(
|
|
9103
|
+
checksMap.set(placement, checks);
|
|
9027
9104
|
}
|
|
9028
9105
|
if (makeFallbackChecks) {
|
|
9029
9106
|
// `2` may be desired in some cases – research later
|
|
@@ -9040,8 +9117,8 @@ function $d886080699dc4994$var$flip(_ref) {
|
|
|
9040
9117
|
return "break";
|
|
9041
9118
|
}
|
|
9042
9119
|
};
|
|
9043
|
-
for(var
|
|
9044
|
-
var _ret = _loop(
|
|
9120
|
+
for(var _i = numberOfChecks; _i > 0; _i--){
|
|
9121
|
+
var _ret = _loop(_i);
|
|
9045
9122
|
if (_ret === "break") break;
|
|
9046
9123
|
}
|
|
9047
9124
|
}
|
|
@@ -9558,7 +9635,7 @@ function $b013befce1f6217f$var$clean(value) {
|
|
|
9558
9635
|
return value.replace(spacesAndTabs, " ").replace(lineStartWithSpaces, "").trim();
|
|
9559
9636
|
}
|
|
9560
9637
|
function $b013befce1f6217f$var$getDevMessage(message) {
|
|
9561
|
-
return $b013befce1f6217f$var$clean("\n %ctippy.js\n\n %c" + $b013befce1f6217f$var$clean(message) + "\n\n %c\uD83D\uDC77
|
|
9638
|
+
return $b013befce1f6217f$var$clean("\n %ctippy.js\n\n %c" + $b013befce1f6217f$var$clean(message) + "\n\n %c\uD83D\uDC77 This is a development-only message. It will be removed in production.\n ");
|
|
9562
9639
|
}
|
|
9563
9640
|
function $b013befce1f6217f$var$getFormattedMessage(message) {
|
|
9564
9641
|
return [
|
|
@@ -9669,7 +9746,7 @@ var $b013befce1f6217f$var$setDefaultProps = function setDefaultProps(partialProp
|
|
|
9669
9746
|
};
|
|
9670
9747
|
function $b013befce1f6217f$var$getExtendedPassedProps(passedProps) {
|
|
9671
9748
|
var plugins = passedProps.plugins || [];
|
|
9672
|
-
var
|
|
9749
|
+
var pluginProps = plugins.reduce(function(acc, plugin) {
|
|
9673
9750
|
var name = plugin.name, defaultValue = plugin.defaultValue;
|
|
9674
9751
|
if (name) {
|
|
9675
9752
|
var _name;
|
|
@@ -9677,7 +9754,7 @@ function $b013befce1f6217f$var$getExtendedPassedProps(passedProps) {
|
|
|
9677
9754
|
}
|
|
9678
9755
|
return acc;
|
|
9679
9756
|
}, {});
|
|
9680
|
-
return Object.assign({}, passedProps,
|
|
9757
|
+
return Object.assign({}, passedProps, pluginProps);
|
|
9681
9758
|
}
|
|
9682
9759
|
function $b013befce1f6217f$var$getDataAttributeProps(reference, plugins) {
|
|
9683
9760
|
var propKeys = plugins ? Object.keys($b013befce1f6217f$var$getExtendedPassedProps(Object.assign({}, $b013befce1f6217f$var$defaultProps, {
|
|
@@ -9772,16 +9849,16 @@ function $b013befce1f6217f$var$getChildren(popper) {
|
|
|
9772
9849
|
}
|
|
9773
9850
|
function $b013befce1f6217f$var$render(instance) {
|
|
9774
9851
|
var popper = $b013befce1f6217f$var$div();
|
|
9775
|
-
var
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
var
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
$b013befce1f6217f$var$setContent(
|
|
9783
|
-
popper.appendChild(
|
|
9784
|
-
|
|
9852
|
+
var box = $b013befce1f6217f$var$div();
|
|
9853
|
+
box.className = $b013befce1f6217f$var$BOX_CLASS;
|
|
9854
|
+
box.setAttribute("data-state", "hidden");
|
|
9855
|
+
box.setAttribute("tabindex", "-1");
|
|
9856
|
+
var content = $b013befce1f6217f$var$div();
|
|
9857
|
+
content.className = $b013befce1f6217f$var$CONTENT_CLASS;
|
|
9858
|
+
content.setAttribute("data-state", "hidden");
|
|
9859
|
+
$b013befce1f6217f$var$setContent(content, instance.props);
|
|
9860
|
+
popper.appendChild(box);
|
|
9861
|
+
box.appendChild(content);
|
|
9785
9862
|
onUpdate(instance.props, instance.props);
|
|
9786
9863
|
function onUpdate(prevProps, nextProps) {
|
|
9787
9864
|
var _getChildren = $b013befce1f6217f$var$getChildren(popper), box = _getChildren.box, content = _getChildren.content, arrow = _getChildren.arrow;
|
|
@@ -9832,10 +9909,10 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9832
9909
|
var currentTarget; // ===========================================================================
|
|
9833
9910
|
// 🔑 Public members
|
|
9834
9911
|
// ===========================================================================
|
|
9835
|
-
var
|
|
9912
|
+
var id = $b013befce1f6217f$var$idCounter++;
|
|
9836
9913
|
var popperInstance = null;
|
|
9837
9914
|
var plugins = $b013befce1f6217f$var$unique(props.plugins);
|
|
9838
|
-
var
|
|
9915
|
+
var state = {
|
|
9839
9916
|
// Is the instance currently enabled?
|
|
9840
9917
|
isEnabled: true,
|
|
9841
9918
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -9847,19 +9924,19 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9847
9924
|
// Has the tippy finished transitioning in?
|
|
9848
9925
|
isShown: false
|
|
9849
9926
|
};
|
|
9850
|
-
var
|
|
9927
|
+
var instance = {
|
|
9851
9928
|
// properties
|
|
9852
|
-
id:
|
|
9929
|
+
id: id,
|
|
9853
9930
|
reference: reference,
|
|
9854
9931
|
popper: $b013befce1f6217f$var$div(),
|
|
9855
9932
|
popperInstance: popperInstance,
|
|
9856
9933
|
props: props,
|
|
9857
|
-
state:
|
|
9934
|
+
state: state,
|
|
9858
9935
|
plugins: plugins,
|
|
9859
9936
|
// methods
|
|
9860
9937
|
clearDelayTimeouts: clearDelayTimeouts,
|
|
9861
9938
|
setProps: setProps,
|
|
9862
|
-
setContent:
|
|
9939
|
+
setContent: setContent,
|
|
9863
9940
|
show: show,
|
|
9864
9941
|
hide: hide,
|
|
9865
9942
|
hideWithInteractivity: hideWithInteractivity,
|
|
@@ -9869,40 +9946,40 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9869
9946
|
destroy: destroy
|
|
9870
9947
|
}; // TODO: Investigate why this early return causes a TDZ error in the tests —
|
|
9871
9948
|
// it doesn't seem to happen in the browser
|
|
9872
|
-
/* istanbul ignore if */ if (!props.render) return
|
|
9949
|
+
/* istanbul ignore if */ if (!props.render) return instance;
|
|
9873
9950
|
// ===========================================================================
|
|
9874
9951
|
// Initial mutations
|
|
9875
9952
|
// ===========================================================================
|
|
9876
|
-
var _props$render = props.render(
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
reference._tippy =
|
|
9881
|
-
|
|
9953
|
+
var _props$render = props.render(instance), popper = _props$render.popper, onUpdate = _props$render.onUpdate;
|
|
9954
|
+
popper.setAttribute("data-tippy-root", "");
|
|
9955
|
+
popper.id = "tippy-" + instance.id;
|
|
9956
|
+
instance.popper = popper;
|
|
9957
|
+
reference._tippy = instance;
|
|
9958
|
+
popper._tippy = instance;
|
|
9882
9959
|
var pluginsHooks = plugins.map(function(plugin) {
|
|
9883
|
-
return plugin.fn(
|
|
9960
|
+
return plugin.fn(instance);
|
|
9884
9961
|
});
|
|
9885
9962
|
var hasAriaExpanded = reference.hasAttribute("aria-expanded");
|
|
9886
9963
|
addListeners();
|
|
9887
9964
|
handleAriaExpandedAttribute();
|
|
9888
9965
|
handleStyles();
|
|
9889
9966
|
invokeHook("onCreate", [
|
|
9890
|
-
|
|
9967
|
+
instance
|
|
9891
9968
|
]);
|
|
9892
9969
|
if (props.showOnCreate) scheduleShow();
|
|
9893
9970
|
// Prevent a tippy with a delay from hiding if the cursor left then returned
|
|
9894
9971
|
// before it started hiding
|
|
9895
|
-
|
|
9896
|
-
if (
|
|
9972
|
+
popper.addEventListener("mouseenter", function() {
|
|
9973
|
+
if (instance.props.interactive && instance.state.isVisible) instance.clearDelayTimeouts();
|
|
9897
9974
|
});
|
|
9898
|
-
|
|
9899
|
-
if (
|
|
9975
|
+
popper.addEventListener("mouseleave", function() {
|
|
9976
|
+
if (instance.props.interactive && instance.props.trigger.indexOf("mouseenter") >= 0) getDocument().addEventListener("mousemove", debouncedOnMouseMove);
|
|
9900
9977
|
});
|
|
9901
|
-
return
|
|
9978
|
+
return instance; // ===========================================================================
|
|
9902
9979
|
// 🔒 Private methods
|
|
9903
9980
|
// ===========================================================================
|
|
9904
9981
|
function getNormalizedTouchSettings() {
|
|
9905
|
-
var touch =
|
|
9982
|
+
var touch = instance.props.touch;
|
|
9906
9983
|
return Array.isArray(touch) ? touch : [
|
|
9907
9984
|
touch,
|
|
9908
9985
|
0
|
|
@@ -9914,7 +9991,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9914
9991
|
function getIsDefaultRenderFn() {
|
|
9915
9992
|
var _instance$props$rende;
|
|
9916
9993
|
// @ts-ignore
|
|
9917
|
-
return !!((_instance$props$rende =
|
|
9994
|
+
return !!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy);
|
|
9918
9995
|
}
|
|
9919
9996
|
function getCurrentTarget() {
|
|
9920
9997
|
return currentTarget || reference;
|
|
@@ -9924,23 +10001,23 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9924
10001
|
return parent ? $b013befce1f6217f$var$getOwnerDocument(parent) : document;
|
|
9925
10002
|
}
|
|
9926
10003
|
function getDefaultTemplateChildren() {
|
|
9927
|
-
return $b013befce1f6217f$var$getChildren(
|
|
10004
|
+
return $b013befce1f6217f$var$getChildren(popper);
|
|
9928
10005
|
}
|
|
9929
10006
|
function getDelay(isShow) {
|
|
9930
10007
|
// For touch or keyboard input, force `0` delay for UX reasons
|
|
9931
10008
|
// Also if the instance is mounted but not visible (transitioning out),
|
|
9932
10009
|
// ignore delay
|
|
9933
|
-
if (
|
|
10010
|
+
if (instance.state.isMounted && !instance.state.isVisible || $b013befce1f6217f$var$currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === "focus") {
|
|
9934
10011
|
return 0;
|
|
9935
10012
|
}
|
|
9936
|
-
return $b013befce1f6217f$var$getValueAtIndexOrReturn(
|
|
10013
|
+
return $b013befce1f6217f$var$getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, $b013befce1f6217f$var$defaultProps.delay);
|
|
9937
10014
|
}
|
|
9938
10015
|
function handleStyles(fromHide) {
|
|
9939
10016
|
if (fromHide === void 0) {
|
|
9940
10017
|
fromHide = false;
|
|
9941
10018
|
}
|
|
9942
|
-
|
|
9943
|
-
|
|
10019
|
+
popper.style.pointerEvents = instance.props.interactive && !fromHide ? "" : "none";
|
|
10020
|
+
popper.style.zIndex = "" + instance.props.zIndex;
|
|
9944
10021
|
}
|
|
9945
10022
|
function invokeHook(hook, args, shouldInvokePropsHook) {
|
|
9946
10023
|
if (shouldInvokePropsHook === void 0) {
|
|
@@ -9953,20 +10030,20 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9953
10030
|
});
|
|
9954
10031
|
if (shouldInvokePropsHook) {
|
|
9955
10032
|
var _instance$props;
|
|
9956
|
-
(_instance$props =
|
|
10033
|
+
(_instance$props = instance.props)[hook].apply(_instance$props, args);
|
|
9957
10034
|
}
|
|
9958
10035
|
}
|
|
9959
10036
|
function handleAriaContentAttribute() {
|
|
9960
|
-
var aria =
|
|
10037
|
+
var aria = instance.props.aria;
|
|
9961
10038
|
if (!aria.content) {
|
|
9962
10039
|
return;
|
|
9963
10040
|
}
|
|
9964
10041
|
var attr = "aria-" + aria.content;
|
|
9965
|
-
var id =
|
|
9966
|
-
var nodes = $b013befce1f6217f$var$normalizeToArray(
|
|
10042
|
+
var id = popper.id;
|
|
10043
|
+
var nodes = $b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference);
|
|
9967
10044
|
nodes.forEach(function(node) {
|
|
9968
10045
|
var currentValue = node.getAttribute(attr);
|
|
9969
|
-
if (
|
|
10046
|
+
if (instance.state.isVisible) {
|
|
9970
10047
|
node.setAttribute(attr, currentValue ? currentValue + " " + id : id);
|
|
9971
10048
|
} else {
|
|
9972
10049
|
var nextValue = currentValue && currentValue.replace(id, "").trim();
|
|
@@ -9979,13 +10056,13 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
9979
10056
|
});
|
|
9980
10057
|
}
|
|
9981
10058
|
function handleAriaExpandedAttribute() {
|
|
9982
|
-
if (hasAriaExpanded || !
|
|
10059
|
+
if (hasAriaExpanded || !instance.props.aria.expanded) {
|
|
9983
10060
|
return;
|
|
9984
10061
|
}
|
|
9985
|
-
var nodes = $b013befce1f6217f$var$normalizeToArray(
|
|
10062
|
+
var nodes = $b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference);
|
|
9986
10063
|
nodes.forEach(function(node) {
|
|
9987
|
-
if (
|
|
9988
|
-
node.setAttribute("aria-expanded",
|
|
10064
|
+
if (instance.props.interactive) {
|
|
10065
|
+
node.setAttribute("aria-expanded", instance.state.isVisible && node === getCurrentTarget() ? "true" : "false");
|
|
9989
10066
|
} else {
|
|
9990
10067
|
node.removeAttribute("aria-expanded");
|
|
9991
10068
|
}
|
|
@@ -10005,27 +10082,27 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10005
10082
|
}
|
|
10006
10083
|
}
|
|
10007
10084
|
var actualTarget = event.composedPath && event.composedPath()[0] || event.target; // Clicked on interactive popper
|
|
10008
|
-
if (
|
|
10085
|
+
if (instance.props.interactive && $b013befce1f6217f$var$actualContains(popper, actualTarget)) {
|
|
10009
10086
|
return;
|
|
10010
10087
|
} // Clicked on the event listeners target
|
|
10011
|
-
if ($b013befce1f6217f$var$normalizeToArray(
|
|
10088
|
+
if ($b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference).some(function(el) {
|
|
10012
10089
|
return $b013befce1f6217f$var$actualContains(el, actualTarget);
|
|
10013
10090
|
})) {
|
|
10014
10091
|
if ($b013befce1f6217f$var$currentInput.isTouch) {
|
|
10015
10092
|
return;
|
|
10016
10093
|
}
|
|
10017
|
-
if (
|
|
10094
|
+
if (instance.state.isVisible && instance.props.trigger.indexOf("click") >= 0) {
|
|
10018
10095
|
return;
|
|
10019
10096
|
}
|
|
10020
10097
|
} else {
|
|
10021
10098
|
invokeHook("onClickOutside", [
|
|
10022
|
-
|
|
10099
|
+
instance,
|
|
10023
10100
|
event
|
|
10024
10101
|
]);
|
|
10025
10102
|
}
|
|
10026
|
-
if (
|
|
10027
|
-
|
|
10028
|
-
|
|
10103
|
+
if (instance.props.hideOnClick === true) {
|
|
10104
|
+
instance.clearDelayTimeouts();
|
|
10105
|
+
instance.hide(); // `mousedown` event is fired right before `focus` if pressing the
|
|
10029
10106
|
// currentTarget. This lets a tippy with `focus` trigger know that it
|
|
10030
10107
|
// should not show
|
|
10031
10108
|
didHideDueToDocumentMouseDown = true;
|
|
@@ -10034,7 +10111,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10034
10111
|
}); // The listener gets added in `scheduleShow()`, but this may be hiding it
|
|
10035
10112
|
// before it shows, and hide()'s early bail-out behavior can prevent it
|
|
10036
10113
|
// from being cleaned up
|
|
10037
|
-
if (!
|
|
10114
|
+
if (!instance.state.isMounted) {
|
|
10038
10115
|
removeDocumentPress();
|
|
10039
10116
|
}
|
|
10040
10117
|
}
|
|
@@ -10061,7 +10138,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10061
10138
|
}
|
|
10062
10139
|
function onTransitionedOut(duration, callback) {
|
|
10063
10140
|
onTransitionEnd(duration, function() {
|
|
10064
|
-
if (!
|
|
10141
|
+
if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {
|
|
10065
10142
|
callback();
|
|
10066
10143
|
}
|
|
10067
10144
|
});
|
|
@@ -10089,7 +10166,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10089
10166
|
if (options === void 0) {
|
|
10090
10167
|
options = false;
|
|
10091
10168
|
}
|
|
10092
|
-
var nodes = $b013befce1f6217f$var$normalizeToArray(
|
|
10169
|
+
var nodes = $b013befce1f6217f$var$normalizeToArray(instance.props.triggerTarget || reference);
|
|
10093
10170
|
nodes.forEach(function(node) {
|
|
10094
10171
|
node.addEventListener(eventType, handler, options);
|
|
10095
10172
|
listeners.push({
|
|
@@ -10109,7 +10186,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10109
10186
|
passive: true
|
|
10110
10187
|
});
|
|
10111
10188
|
}
|
|
10112
|
-
$b013befce1f6217f$var$splitBySpaces(
|
|
10189
|
+
$b013befce1f6217f$var$splitBySpaces(instance.props.trigger).forEach(function(eventType) {
|
|
10113
10190
|
if (eventType === "manual") {
|
|
10114
10191
|
return;
|
|
10115
10192
|
}
|
|
@@ -10137,14 +10214,14 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10137
10214
|
function onTrigger(event) {
|
|
10138
10215
|
var _lastTriggerEvent;
|
|
10139
10216
|
var shouldScheduleClickHide = false;
|
|
10140
|
-
if (!
|
|
10217
|
+
if (!instance.state.isEnabled || isEventListenerStopped(event) || didHideDueToDocumentMouseDown) {
|
|
10141
10218
|
return;
|
|
10142
10219
|
}
|
|
10143
10220
|
var wasFocused = ((_lastTriggerEvent = lastTriggerEvent) == null ? void 0 : _lastTriggerEvent.type) === "focus";
|
|
10144
10221
|
lastTriggerEvent = event;
|
|
10145
10222
|
currentTarget = event.currentTarget;
|
|
10146
10223
|
handleAriaExpandedAttribute();
|
|
10147
|
-
if (!
|
|
10224
|
+
if (!instance.state.isVisible && $b013befce1f6217f$var$isMouseEvent(event)) {
|
|
10148
10225
|
// If scrolling, `mouseenter` events can be fired if the cursor lands
|
|
10149
10226
|
// over a new target, but `mousemove` events don't get fired. This
|
|
10150
10227
|
// causes interactive tooltips to get stuck open until the cursor is
|
|
@@ -10153,7 +10230,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10153
10230
|
return listener(event);
|
|
10154
10231
|
});
|
|
10155
10232
|
} // Toggle show/hide when clicking click-triggered tooltips
|
|
10156
|
-
if (event.type === "click" && (
|
|
10233
|
+
if (event.type === "click" && (instance.props.trigger.indexOf("mouseenter") < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) {
|
|
10157
10234
|
shouldScheduleClickHide = true;
|
|
10158
10235
|
} else {
|
|
10159
10236
|
scheduleShow(event);
|
|
@@ -10167,11 +10244,11 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10167
10244
|
}
|
|
10168
10245
|
function onMouseMove(event) {
|
|
10169
10246
|
var target = event.target;
|
|
10170
|
-
var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) ||
|
|
10247
|
+
var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) || popper.contains(target);
|
|
10171
10248
|
if (event.type === "mousemove" && isCursorOverReferenceOrPopper) {
|
|
10172
10249
|
return;
|
|
10173
10250
|
}
|
|
10174
|
-
var popperTreeData = getNestedPopperTree().concat(
|
|
10251
|
+
var popperTreeData = getNestedPopperTree().concat(popper).map(function(popper) {
|
|
10175
10252
|
var _instance$popperInsta;
|
|
10176
10253
|
var instance = popper._tippy;
|
|
10177
10254
|
var state = (_instance$popperInsta = instance.popperInstance) == null ? void 0 : _instance$popperInsta.state;
|
|
@@ -10190,21 +10267,21 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10190
10267
|
}
|
|
10191
10268
|
}
|
|
10192
10269
|
function onMouseLeave(event) {
|
|
10193
|
-
var shouldBail = isEventListenerStopped(event) ||
|
|
10270
|
+
var shouldBail = isEventListenerStopped(event) || instance.props.trigger.indexOf("click") >= 0 && isVisibleFromClick;
|
|
10194
10271
|
if (shouldBail) {
|
|
10195
10272
|
return;
|
|
10196
10273
|
}
|
|
10197
|
-
if (
|
|
10198
|
-
|
|
10274
|
+
if (instance.props.interactive) {
|
|
10275
|
+
instance.hideWithInteractivity(event);
|
|
10199
10276
|
return;
|
|
10200
10277
|
}
|
|
10201
10278
|
scheduleHide(event);
|
|
10202
10279
|
}
|
|
10203
10280
|
function onBlurOrFocusOut(event) {
|
|
10204
|
-
if (
|
|
10281
|
+
if (instance.props.trigger.indexOf("focusin") < 0 && event.target !== getCurrentTarget()) {
|
|
10205
10282
|
return;
|
|
10206
10283
|
} // If focus was moved to within the popper
|
|
10207
|
-
if (
|
|
10284
|
+
if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {
|
|
10208
10285
|
return;
|
|
10209
10286
|
}
|
|
10210
10287
|
scheduleHide(event);
|
|
@@ -10214,8 +10291,8 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10214
10291
|
}
|
|
10215
10292
|
function createPopperInstance() {
|
|
10216
10293
|
destroyPopperInstance();
|
|
10217
|
-
var _instance$props2 =
|
|
10218
|
-
var arrow = getIsDefaultRenderFn() ? $b013befce1f6217f$var$getChildren(
|
|
10294
|
+
var _instance$props2 = instance.props, popperOptions = _instance$props2.popperOptions, placement = _instance$props2.placement, offset = _instance$props2.offset, getReferenceClientRect = _instance$props2.getReferenceClientRect, moveTransition = _instance$props2.moveTransition;
|
|
10295
|
+
var arrow = getIsDefaultRenderFn() ? $b013befce1f6217f$var$getChildren(popper).arrow : null;
|
|
10219
10296
|
var computedReference = getReferenceClientRect ? {
|
|
10220
10297
|
getBoundingClientRect: getReferenceClientRect,
|
|
10221
10298
|
contextElement: getReferenceClientRect.contextElement || getCurrentTarget()
|
|
@@ -10292,27 +10369,27 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10292
10369
|
});
|
|
10293
10370
|
}
|
|
10294
10371
|
modifiers.push.apply(modifiers, (popperOptions == null ? void 0 : popperOptions.modifiers) || []);
|
|
10295
|
-
|
|
10372
|
+
instance.popperInstance = (0, $d3ca9c4a635d8f8b$export$8f7491d57c8f97a9)(computedReference, popper, Object.assign({}, popperOptions, {
|
|
10296
10373
|
placement: placement,
|
|
10297
10374
|
onFirstUpdate: onFirstUpdate,
|
|
10298
10375
|
modifiers: modifiers
|
|
10299
10376
|
}));
|
|
10300
10377
|
}
|
|
10301
10378
|
function destroyPopperInstance() {
|
|
10302
|
-
if (
|
|
10303
|
-
|
|
10304
|
-
|
|
10379
|
+
if (instance.popperInstance) {
|
|
10380
|
+
instance.popperInstance.destroy();
|
|
10381
|
+
instance.popperInstance = null;
|
|
10305
10382
|
}
|
|
10306
10383
|
}
|
|
10307
10384
|
function mount() {
|
|
10308
|
-
var appendTo =
|
|
10385
|
+
var appendTo = instance.props.appendTo;
|
|
10309
10386
|
var parentNode; // By default, we'll append the popper to the triggerTargets's parentNode so
|
|
10310
10387
|
// it's directly after the reference element so the elements inside the
|
|
10311
10388
|
// tippy can be tabbed to
|
|
10312
10389
|
// If there are clipping issues, the user can specify a different appendTo
|
|
10313
10390
|
// and ensure focus management is handled correctly manually
|
|
10314
10391
|
var node = getCurrentTarget();
|
|
10315
|
-
if (
|
|
10392
|
+
if (instance.props.interactive && appendTo === $b013befce1f6217f$var$TIPPY_DEFAULT_APPEND_TO || appendTo === "parent") {
|
|
10316
10393
|
parentNode = node.parentNode;
|
|
10317
10394
|
} else {
|
|
10318
10395
|
parentNode = $b013befce1f6217f$var$invokeWithArgsOrReturn(appendTo, [
|
|
@@ -10320,14 +10397,14 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10320
10397
|
]);
|
|
10321
10398
|
} // The popper element needs to exist on the DOM before its position can be
|
|
10322
10399
|
// updated as Popper needs to read its dimensions
|
|
10323
|
-
if (!parentNode.contains(
|
|
10324
|
-
parentNode.appendChild(
|
|
10400
|
+
if (!parentNode.contains(popper)) {
|
|
10401
|
+
parentNode.appendChild(popper);
|
|
10325
10402
|
}
|
|
10326
|
-
|
|
10403
|
+
instance.state.isMounted = true;
|
|
10327
10404
|
createPopperInstance();
|
|
10328
10405
|
/* istanbul ignore else */ if (false) {
|
|
10329
10406
|
// Accessibility check
|
|
10330
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10407
|
+
$b013befce1f6217f$var$warnWhen(instance.props.interactive && appendTo === $b013befce1f6217f$var$defaultProps.appendTo && node.nextElementSibling !== popper, [
|
|
10331
10408
|
"Interactive tippy element may not be accessible via keyboard",
|
|
10332
10409
|
"navigation because it is not directly after the reference element",
|
|
10333
10410
|
"in the DOM source order.",
|
|
@@ -10344,13 +10421,13 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10344
10421
|
}
|
|
10345
10422
|
}
|
|
10346
10423
|
function getNestedPopperTree() {
|
|
10347
|
-
return $b013befce1f6217f$var$arrayFrom(
|
|
10424
|
+
return $b013befce1f6217f$var$arrayFrom(popper.querySelectorAll("[data-tippy-root]"));
|
|
10348
10425
|
}
|
|
10349
10426
|
function scheduleShow(event) {
|
|
10350
|
-
|
|
10427
|
+
instance.clearDelayTimeouts();
|
|
10351
10428
|
if (event) {
|
|
10352
10429
|
invokeHook("onTrigger", [
|
|
10353
|
-
|
|
10430
|
+
instance,
|
|
10354
10431
|
event
|
|
10355
10432
|
]);
|
|
10356
10433
|
}
|
|
@@ -10362,26 +10439,26 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10362
10439
|
}
|
|
10363
10440
|
if (delay) {
|
|
10364
10441
|
showTimeout = setTimeout(function() {
|
|
10365
|
-
|
|
10442
|
+
instance.show();
|
|
10366
10443
|
}, delay);
|
|
10367
10444
|
} else {
|
|
10368
|
-
|
|
10445
|
+
instance.show();
|
|
10369
10446
|
}
|
|
10370
10447
|
}
|
|
10371
10448
|
function scheduleHide(event) {
|
|
10372
|
-
|
|
10449
|
+
instance.clearDelayTimeouts();
|
|
10373
10450
|
invokeHook("onUntrigger", [
|
|
10374
|
-
|
|
10451
|
+
instance,
|
|
10375
10452
|
event
|
|
10376
10453
|
]);
|
|
10377
|
-
if (!
|
|
10454
|
+
if (!instance.state.isVisible) {
|
|
10378
10455
|
removeDocumentPress();
|
|
10379
10456
|
return;
|
|
10380
10457
|
} // For interactive tippies, scheduleHide is added to a document.body handler
|
|
10381
10458
|
// from onMouseLeave so must intercept scheduled hides from mousemove/leave
|
|
10382
10459
|
// events when trigger contains mouseenter and click, and the tip is
|
|
10383
10460
|
// currently shown as a result of a click.
|
|
10384
|
-
if (
|
|
10461
|
+
if (instance.props.trigger.indexOf("mouseenter") >= 0 && instance.props.trigger.indexOf("click") >= 0 && [
|
|
10385
10462
|
"mouseleave",
|
|
10386
10463
|
"mousemove"
|
|
10387
10464
|
].indexOf(event.type) >= 0 && isVisibleFromClick) {
|
|
@@ -10390,28 +10467,28 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10390
10467
|
var delay = getDelay(false);
|
|
10391
10468
|
if (delay) {
|
|
10392
10469
|
hideTimeout = setTimeout(function() {
|
|
10393
|
-
if (
|
|
10394
|
-
|
|
10470
|
+
if (instance.state.isVisible) {
|
|
10471
|
+
instance.hide();
|
|
10395
10472
|
}
|
|
10396
10473
|
}, delay);
|
|
10397
10474
|
} else {
|
|
10398
10475
|
// Fixes a `transitionend` problem when it fires 1 frame too
|
|
10399
10476
|
// late sometimes, we don't want hide() to be called.
|
|
10400
10477
|
scheduleHideAnimationFrame = requestAnimationFrame(function() {
|
|
10401
|
-
|
|
10478
|
+
instance.hide();
|
|
10402
10479
|
});
|
|
10403
10480
|
}
|
|
10404
10481
|
} // ===========================================================================
|
|
10405
10482
|
// 🔑 Public methods
|
|
10406
10483
|
// ===========================================================================
|
|
10407
10484
|
function enable() {
|
|
10408
|
-
|
|
10485
|
+
instance.state.isEnabled = true;
|
|
10409
10486
|
}
|
|
10410
10487
|
function disable() {
|
|
10411
10488
|
// Disabling the instance should also hide it
|
|
10412
10489
|
// https://github.com/atomiks/tippy.js-react/issues/106
|
|
10413
|
-
|
|
10414
|
-
|
|
10490
|
+
instance.hide();
|
|
10491
|
+
instance.state.isEnabled = false;
|
|
10415
10492
|
}
|
|
10416
10493
|
function clearDelayTimeouts() {
|
|
10417
10494
|
clearTimeout(showTimeout);
|
|
@@ -10420,21 +10497,21 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10420
10497
|
}
|
|
10421
10498
|
function setProps(partialProps) {
|
|
10422
10499
|
/* istanbul ignore else */ if (false) {
|
|
10423
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10500
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("setProps"));
|
|
10424
10501
|
}
|
|
10425
|
-
if (
|
|
10502
|
+
if (instance.state.isDestroyed) {
|
|
10426
10503
|
return;
|
|
10427
10504
|
}
|
|
10428
10505
|
invokeHook("onBeforeUpdate", [
|
|
10429
|
-
|
|
10506
|
+
instance,
|
|
10430
10507
|
partialProps
|
|
10431
10508
|
]);
|
|
10432
10509
|
removeListeners();
|
|
10433
|
-
var prevProps =
|
|
10510
|
+
var prevProps = instance.props;
|
|
10434
10511
|
var nextProps = $b013befce1f6217f$var$evaluateProps(reference, Object.assign({}, prevProps, $b013befce1f6217f$var$removeUndefinedProps(partialProps), {
|
|
10435
10512
|
ignoreAttributes: true
|
|
10436
10513
|
}));
|
|
10437
|
-
|
|
10514
|
+
instance.props = nextProps;
|
|
10438
10515
|
addListeners();
|
|
10439
10516
|
if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
|
|
10440
10517
|
cleanupInteractiveMouseListeners();
|
|
@@ -10452,7 +10529,7 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10452
10529
|
if (onUpdate) {
|
|
10453
10530
|
onUpdate(prevProps, nextProps);
|
|
10454
10531
|
}
|
|
10455
|
-
if (
|
|
10532
|
+
if (instance.popperInstance) {
|
|
10456
10533
|
createPopperInstance(); // Fixes an issue with nested tippies if they are all getting re-rendered,
|
|
10457
10534
|
// and the nested ones get re-rendered first.
|
|
10458
10535
|
// https://github.com/atomiks/tippyjs-react/issues/177
|
|
@@ -10464,24 +10541,24 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10464
10541
|
});
|
|
10465
10542
|
}
|
|
10466
10543
|
invokeHook("onAfterUpdate", [
|
|
10467
|
-
|
|
10544
|
+
instance,
|
|
10468
10545
|
partialProps
|
|
10469
10546
|
]);
|
|
10470
10547
|
}
|
|
10471
|
-
function
|
|
10472
|
-
|
|
10548
|
+
function setContent(content) {
|
|
10549
|
+
instance.setProps({
|
|
10473
10550
|
content: content
|
|
10474
10551
|
});
|
|
10475
10552
|
}
|
|
10476
10553
|
function show() {
|
|
10477
10554
|
/* istanbul ignore else */ if (false) {
|
|
10478
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10555
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("show"));
|
|
10479
10556
|
} // Early bail-out
|
|
10480
|
-
var isAlreadyVisible =
|
|
10481
|
-
var isDestroyed =
|
|
10482
|
-
var isDisabled = !
|
|
10483
|
-
var isTouchAndTouchDisabled = $b013befce1f6217f$var$currentInput.isTouch && !
|
|
10484
|
-
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(
|
|
10557
|
+
var isAlreadyVisible = instance.state.isVisible;
|
|
10558
|
+
var isDestroyed = instance.state.isDestroyed;
|
|
10559
|
+
var isDisabled = !instance.state.isEnabled;
|
|
10560
|
+
var isTouchAndTouchDisabled = $b013befce1f6217f$var$currentInput.isTouch && !instance.props.touch;
|
|
10561
|
+
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(instance.props.duration, 0, $b013befce1f6217f$var$defaultProps.duration);
|
|
10485
10562
|
if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
|
|
10486
10563
|
return;
|
|
10487
10564
|
} // Normalize `disabled` behavior across browsers.
|
|
@@ -10491,19 +10568,19 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10491
10568
|
return;
|
|
10492
10569
|
}
|
|
10493
10570
|
invokeHook("onShow", [
|
|
10494
|
-
|
|
10571
|
+
instance
|
|
10495
10572
|
], false);
|
|
10496
|
-
if (
|
|
10573
|
+
if (instance.props.onShow(instance) === false) {
|
|
10497
10574
|
return;
|
|
10498
10575
|
}
|
|
10499
|
-
|
|
10576
|
+
instance.state.isVisible = true;
|
|
10500
10577
|
if (getIsDefaultRenderFn()) {
|
|
10501
|
-
|
|
10578
|
+
popper.style.visibility = "visible";
|
|
10502
10579
|
}
|
|
10503
10580
|
handleStyles();
|
|
10504
10581
|
addDocumentPress();
|
|
10505
|
-
if (!
|
|
10506
|
-
|
|
10582
|
+
if (!instance.state.isMounted) {
|
|
10583
|
+
popper.style.transition = "none";
|
|
10507
10584
|
} // If flipping to the opposite side after hiding at least once, the
|
|
10508
10585
|
// animation will use the wrong placement without resetting the duration
|
|
10509
10586
|
if (getIsDefaultRenderFn()) {
|
|
@@ -10515,13 +10592,13 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10515
10592
|
}
|
|
10516
10593
|
onFirstUpdate = function onFirstUpdate() {
|
|
10517
10594
|
var _instance$popperInsta2;
|
|
10518
|
-
if (!
|
|
10595
|
+
if (!instance.state.isVisible || ignoreOnFirstUpdate) {
|
|
10519
10596
|
return;
|
|
10520
10597
|
}
|
|
10521
10598
|
ignoreOnFirstUpdate = true; // reflow
|
|
10522
|
-
void
|
|
10523
|
-
|
|
10524
|
-
if (getIsDefaultRenderFn() &&
|
|
10599
|
+
void popper.offsetHeight;
|
|
10600
|
+
popper.style.transition = instance.props.moveTransition;
|
|
10601
|
+
if (getIsDefaultRenderFn() && instance.props.animation) {
|
|
10525
10602
|
var _getDefaultTemplateCh3 = getDefaultTemplateChildren(), _box = _getDefaultTemplateCh3.box, _content = _getDefaultTemplateCh3.content;
|
|
10526
10603
|
$b013befce1f6217f$var$setTransitionDuration([
|
|
10527
10604
|
_box,
|
|
@@ -10534,17 +10611,17 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10534
10611
|
}
|
|
10535
10612
|
handleAriaContentAttribute();
|
|
10536
10613
|
handleAriaExpandedAttribute();
|
|
10537
|
-
$b013befce1f6217f$var$pushIfUnique($b013befce1f6217f$var$mountedInstances,
|
|
10614
|
+
$b013befce1f6217f$var$pushIfUnique($b013befce1f6217f$var$mountedInstances, instance); // certain modifiers (e.g. `maxSize`) require a second update after the
|
|
10538
10615
|
// popper has been positioned for the first time
|
|
10539
|
-
(_instance$popperInsta2 =
|
|
10616
|
+
(_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();
|
|
10540
10617
|
invokeHook("onMount", [
|
|
10541
|
-
|
|
10618
|
+
instance
|
|
10542
10619
|
]);
|
|
10543
|
-
if (
|
|
10620
|
+
if (instance.props.animation && getIsDefaultRenderFn()) {
|
|
10544
10621
|
onTransitionedIn(duration, function() {
|
|
10545
|
-
|
|
10622
|
+
instance.state.isShown = true;
|
|
10546
10623
|
invokeHook("onShown", [
|
|
10547
|
-
|
|
10624
|
+
instance
|
|
10548
10625
|
]);
|
|
10549
10626
|
});
|
|
10550
10627
|
}
|
|
@@ -10553,34 +10630,34 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10553
10630
|
}
|
|
10554
10631
|
function hide() {
|
|
10555
10632
|
/* istanbul ignore else */ if (false) {
|
|
10556
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10633
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("hide"));
|
|
10557
10634
|
} // Early bail-out
|
|
10558
|
-
var isAlreadyHidden = !
|
|
10559
|
-
var isDestroyed =
|
|
10560
|
-
var isDisabled = !
|
|
10561
|
-
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(
|
|
10635
|
+
var isAlreadyHidden = !instance.state.isVisible;
|
|
10636
|
+
var isDestroyed = instance.state.isDestroyed;
|
|
10637
|
+
var isDisabled = !instance.state.isEnabled;
|
|
10638
|
+
var duration = $b013befce1f6217f$var$getValueAtIndexOrReturn(instance.props.duration, 1, $b013befce1f6217f$var$defaultProps.duration);
|
|
10562
10639
|
if (isAlreadyHidden || isDestroyed || isDisabled) {
|
|
10563
10640
|
return;
|
|
10564
10641
|
}
|
|
10565
10642
|
invokeHook("onHide", [
|
|
10566
|
-
|
|
10643
|
+
instance
|
|
10567
10644
|
], false);
|
|
10568
|
-
if (
|
|
10645
|
+
if (instance.props.onHide(instance) === false) {
|
|
10569
10646
|
return;
|
|
10570
10647
|
}
|
|
10571
|
-
|
|
10572
|
-
|
|
10648
|
+
instance.state.isVisible = false;
|
|
10649
|
+
instance.state.isShown = false;
|
|
10573
10650
|
ignoreOnFirstUpdate = false;
|
|
10574
10651
|
isVisibleFromClick = false;
|
|
10575
10652
|
if (getIsDefaultRenderFn()) {
|
|
10576
|
-
|
|
10653
|
+
popper.style.visibility = "hidden";
|
|
10577
10654
|
}
|
|
10578
10655
|
cleanupInteractiveMouseListeners();
|
|
10579
10656
|
removeDocumentPress();
|
|
10580
10657
|
handleStyles(true);
|
|
10581
10658
|
if (getIsDefaultRenderFn()) {
|
|
10582
10659
|
var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content = _getDefaultTemplateCh4.content;
|
|
10583
|
-
if (
|
|
10660
|
+
if (instance.props.animation) {
|
|
10584
10661
|
$b013befce1f6217f$var$setTransitionDuration([
|
|
10585
10662
|
box,
|
|
10586
10663
|
content
|
|
@@ -10593,17 +10670,17 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10593
10670
|
}
|
|
10594
10671
|
handleAriaContentAttribute();
|
|
10595
10672
|
handleAriaExpandedAttribute();
|
|
10596
|
-
if (
|
|
10673
|
+
if (instance.props.animation) {
|
|
10597
10674
|
if (getIsDefaultRenderFn()) {
|
|
10598
|
-
onTransitionedOut(duration,
|
|
10675
|
+
onTransitionedOut(duration, instance.unmount);
|
|
10599
10676
|
}
|
|
10600
10677
|
} else {
|
|
10601
|
-
|
|
10678
|
+
instance.unmount();
|
|
10602
10679
|
}
|
|
10603
10680
|
}
|
|
10604
10681
|
function hideWithInteractivity(event) {
|
|
10605
10682
|
/* istanbul ignore else */ if (false) {
|
|
10606
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10683
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("hideWithInteractivity"));
|
|
10607
10684
|
}
|
|
10608
10685
|
getDocument().addEventListener("mousemove", debouncedOnMouseMove);
|
|
10609
10686
|
$b013befce1f6217f$var$pushIfUnique($b013befce1f6217f$var$mouseMoveListeners, debouncedOnMouseMove);
|
|
@@ -10611,12 +10688,12 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10611
10688
|
}
|
|
10612
10689
|
function unmount() {
|
|
10613
10690
|
/* istanbul ignore else */ if (false) {
|
|
10614
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10691
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("unmount"));
|
|
10615
10692
|
}
|
|
10616
|
-
if (
|
|
10617
|
-
|
|
10693
|
+
if (instance.state.isVisible) {
|
|
10694
|
+
instance.hide();
|
|
10618
10695
|
}
|
|
10619
|
-
if (!
|
|
10696
|
+
if (!instance.state.isMounted) {
|
|
10620
10697
|
return;
|
|
10621
10698
|
}
|
|
10622
10699
|
destroyPopperInstance(); // If a popper is not interactive, it will be appended outside the popper
|
|
@@ -10625,31 +10702,31 @@ function $b013befce1f6217f$var$createTippy(reference, passedProps) {
|
|
|
10625
10702
|
getNestedPopperTree().forEach(function(nestedPopper) {
|
|
10626
10703
|
nestedPopper._tippy.unmount();
|
|
10627
10704
|
});
|
|
10628
|
-
if (
|
|
10629
|
-
|
|
10705
|
+
if (popper.parentNode) {
|
|
10706
|
+
popper.parentNode.removeChild(popper);
|
|
10630
10707
|
}
|
|
10631
10708
|
$b013befce1f6217f$var$mountedInstances = $b013befce1f6217f$var$mountedInstances.filter(function(i) {
|
|
10632
|
-
return i !==
|
|
10709
|
+
return i !== instance;
|
|
10633
10710
|
});
|
|
10634
|
-
|
|
10711
|
+
instance.state.isMounted = false;
|
|
10635
10712
|
invokeHook("onHidden", [
|
|
10636
|
-
|
|
10713
|
+
instance
|
|
10637
10714
|
]);
|
|
10638
10715
|
}
|
|
10639
10716
|
function destroy() {
|
|
10640
10717
|
/* istanbul ignore else */ if (false) {
|
|
10641
|
-
$b013befce1f6217f$var$warnWhen(
|
|
10718
|
+
$b013befce1f6217f$var$warnWhen(instance.state.isDestroyed, $b013befce1f6217f$var$createMemoryLeakWarning("destroy"));
|
|
10642
10719
|
}
|
|
10643
|
-
if (
|
|
10720
|
+
if (instance.state.isDestroyed) {
|
|
10644
10721
|
return;
|
|
10645
10722
|
}
|
|
10646
|
-
|
|
10647
|
-
|
|
10723
|
+
instance.clearDelayTimeouts();
|
|
10724
|
+
instance.unmount();
|
|
10648
10725
|
removeListeners();
|
|
10649
10726
|
delete reference._tippy;
|
|
10650
|
-
|
|
10727
|
+
instance.state.isDestroyed = true;
|
|
10651
10728
|
invokeHook("onDestroy", [
|
|
10652
|
-
|
|
10729
|
+
instance
|
|
10653
10730
|
]);
|
|
10654
10731
|
}
|
|
10655
10732
|
}
|
|
@@ -10799,7 +10876,7 @@ var $b013befce1f6217f$export$374c483667c1ea9b = function createSingleton(tippyIn
|
|
|
10799
10876
|
};
|
|
10800
10877
|
}
|
|
10801
10878
|
};
|
|
10802
|
-
var
|
|
10879
|
+
var singleton = $b013befce1f6217f$var$tippy($b013befce1f6217f$var$div(), Object.assign({}, $b013befce1f6217f$var$removeProperties(optionalProps, [
|
|
10803
10880
|
"overrides"
|
|
10804
10881
|
]), {
|
|
10805
10882
|
plugins: [
|
|
@@ -10812,42 +10889,42 @@ var $b013befce1f6217f$export$374c483667c1ea9b = function createSingleton(tippyIn
|
|
|
10812
10889
|
])
|
|
10813
10890
|
})
|
|
10814
10891
|
}));
|
|
10815
|
-
var originalShow =
|
|
10816
|
-
|
|
10892
|
+
var originalShow = singleton.show;
|
|
10893
|
+
singleton.show = function(target) {
|
|
10817
10894
|
originalShow(); // first time, showOnCreate or programmatic call with no params
|
|
10818
10895
|
// default to showing first instance
|
|
10819
|
-
if (!currentTarget && target == null) return prepareInstance(
|
|
10896
|
+
if (!currentTarget && target == null) return prepareInstance(singleton, references[0]);
|
|
10820
10897
|
// triggered from event (do nothing as prepareInstance already called by onTrigger)
|
|
10821
10898
|
// programmatic call with no params when already visible (do nothing again)
|
|
10822
10899
|
if (currentTarget && target == null) return;
|
|
10823
10900
|
// target is index of instance
|
|
10824
|
-
if (typeof target === "number") return references[target] && prepareInstance(
|
|
10901
|
+
if (typeof target === "number") return references[target] && prepareInstance(singleton, references[target]);
|
|
10825
10902
|
// target is a child tippy instance
|
|
10826
10903
|
if (individualInstances.indexOf(target) >= 0) {
|
|
10827
10904
|
var ref = target.reference;
|
|
10828
|
-
return prepareInstance(
|
|
10905
|
+
return prepareInstance(singleton, ref);
|
|
10829
10906
|
} // target is a ReferenceElement
|
|
10830
|
-
if (references.indexOf(target) >= 0) return prepareInstance(
|
|
10907
|
+
if (references.indexOf(target) >= 0) return prepareInstance(singleton, target);
|
|
10831
10908
|
};
|
|
10832
|
-
|
|
10909
|
+
singleton.showNext = function() {
|
|
10833
10910
|
var first = references[0];
|
|
10834
|
-
if (!currentTarget) return
|
|
10911
|
+
if (!currentTarget) return singleton.show(0);
|
|
10835
10912
|
var index = references.indexOf(currentTarget);
|
|
10836
|
-
|
|
10913
|
+
singleton.show(references[index + 1] || first);
|
|
10837
10914
|
};
|
|
10838
|
-
|
|
10915
|
+
singleton.showPrevious = function() {
|
|
10839
10916
|
var last = references[references.length - 1];
|
|
10840
|
-
if (!currentTarget) return
|
|
10917
|
+
if (!currentTarget) return singleton.show(last);
|
|
10841
10918
|
var index = references.indexOf(currentTarget);
|
|
10842
10919
|
var target = references[index - 1] || last;
|
|
10843
|
-
|
|
10920
|
+
singleton.show(target);
|
|
10844
10921
|
};
|
|
10845
|
-
var
|
|
10846
|
-
|
|
10922
|
+
var originalSetProps = singleton.setProps;
|
|
10923
|
+
singleton.setProps = function(props) {
|
|
10847
10924
|
overrides = props.overrides || overrides;
|
|
10848
|
-
|
|
10925
|
+
originalSetProps(props);
|
|
10849
10926
|
};
|
|
10850
|
-
|
|
10927
|
+
singleton.setInstances = function(nextInstances) {
|
|
10851
10928
|
enableInstances(true);
|
|
10852
10929
|
interceptSetPropsCleanups.forEach(function(fn) {
|
|
10853
10930
|
return fn();
|
|
@@ -10856,13 +10933,13 @@ var $b013befce1f6217f$export$374c483667c1ea9b = function createSingleton(tippyIn
|
|
|
10856
10933
|
enableInstances(false);
|
|
10857
10934
|
setReferences();
|
|
10858
10935
|
setTriggerTargets();
|
|
10859
|
-
interceptSetPropsCleanups = interceptSetProps(
|
|
10860
|
-
|
|
10936
|
+
interceptSetPropsCleanups = interceptSetProps(singleton);
|
|
10937
|
+
singleton.setProps({
|
|
10861
10938
|
triggerTarget: triggerTargets
|
|
10862
10939
|
});
|
|
10863
10940
|
};
|
|
10864
|
-
interceptSetPropsCleanups = interceptSetProps(
|
|
10865
|
-
return
|
|
10941
|
+
interceptSetPropsCleanups = interceptSetProps(singleton);
|
|
10942
|
+
return singleton;
|
|
10866
10943
|
};
|
|
10867
10944
|
var $b013befce1f6217f$var$BUBBLING_EVENTS_MAP = {
|
|
10868
10945
|
mouseover: "mouseenter",
|
|
@@ -10930,11 +11007,11 @@ var $b013befce1f6217f$var$BUBBLING_EVENTS_MAP = {
|
|
|
10930
11007
|
});
|
|
10931
11008
|
listeners = [];
|
|
10932
11009
|
}
|
|
10933
|
-
function applyMutations(
|
|
10934
|
-
var originalDestroy =
|
|
10935
|
-
var originalEnable =
|
|
10936
|
-
var originalDisable =
|
|
10937
|
-
|
|
11010
|
+
function applyMutations(instance) {
|
|
11011
|
+
var originalDestroy = instance.destroy;
|
|
11012
|
+
var originalEnable = instance.enable;
|
|
11013
|
+
var originalDisable = instance.disable;
|
|
11014
|
+
instance.destroy = function(shouldDestroyChildInstances) {
|
|
10938
11015
|
if (shouldDestroyChildInstances === void 0) shouldDestroyChildInstances = true;
|
|
10939
11016
|
if (shouldDestroyChildInstances) childTippyInstances.forEach(function(instance) {
|
|
10940
11017
|
instance.destroy();
|
|
@@ -10943,21 +11020,21 @@ var $b013befce1f6217f$var$BUBBLING_EVENTS_MAP = {
|
|
|
10943
11020
|
removeEventListeners();
|
|
10944
11021
|
originalDestroy();
|
|
10945
11022
|
};
|
|
10946
|
-
|
|
11023
|
+
instance.enable = function() {
|
|
10947
11024
|
originalEnable();
|
|
10948
11025
|
childTippyInstances.forEach(function(instance) {
|
|
10949
11026
|
return instance.enable();
|
|
10950
11027
|
});
|
|
10951
11028
|
disabled = false;
|
|
10952
11029
|
};
|
|
10953
|
-
|
|
11030
|
+
instance.disable = function() {
|
|
10954
11031
|
originalDisable();
|
|
10955
11032
|
childTippyInstances.forEach(function(instance) {
|
|
10956
11033
|
return instance.disable();
|
|
10957
11034
|
});
|
|
10958
11035
|
disabled = true;
|
|
10959
11036
|
};
|
|
10960
|
-
addEventListeners(
|
|
11037
|
+
addEventListeners(instance);
|
|
10961
11038
|
}
|
|
10962
11039
|
normalizedReturnValue.forEach(applyMutations);
|
|
10963
11040
|
return returnValue;
|
|
@@ -11063,25 +11140,25 @@ var $b013befce1f6217f$export$ac81526b64504ab6 = {
|
|
|
11063
11140
|
// If the instance is interactive, avoid updating the position unless it's
|
|
11064
11141
|
// over the reference element
|
|
11065
11142
|
var isCursorOverReference = event.target ? reference.contains(event.target) : true;
|
|
11066
|
-
var
|
|
11143
|
+
var followCursor = instance.props.followCursor;
|
|
11067
11144
|
var clientX = event.clientX, clientY = event.clientY;
|
|
11068
|
-
var
|
|
11069
|
-
var relativeX = clientX -
|
|
11070
|
-
var relativeY = clientY -
|
|
11145
|
+
var rect = reference.getBoundingClientRect();
|
|
11146
|
+
var relativeX = clientX - rect.left;
|
|
11147
|
+
var relativeY = clientY - rect.top;
|
|
11071
11148
|
if (isCursorOverReference || !instance.props.interactive) instance.setProps({
|
|
11072
11149
|
// @ts-ignore - unneeded DOMRect properties
|
|
11073
11150
|
getReferenceClientRect: function getReferenceClientRect() {
|
|
11074
11151
|
var rect = reference.getBoundingClientRect();
|
|
11075
11152
|
var x = clientX;
|
|
11076
11153
|
var y = clientY;
|
|
11077
|
-
if (
|
|
11154
|
+
if (followCursor === "initial") {
|
|
11078
11155
|
x = rect.left + relativeX;
|
|
11079
11156
|
y = rect.top + relativeY;
|
|
11080
11157
|
}
|
|
11081
|
-
var top =
|
|
11082
|
-
var right =
|
|
11083
|
-
var bottom =
|
|
11084
|
-
var left =
|
|
11158
|
+
var top = followCursor === "horizontal" ? rect.top : y;
|
|
11159
|
+
var right = followCursor === "vertical" ? rect.right : x;
|
|
11160
|
+
var bottom = followCursor === "horizontal" ? rect.bottom : y;
|
|
11161
|
+
var left = followCursor === "vertical" ? rect.left : x;
|
|
11085
11162
|
return {
|
|
11086
11163
|
width: right - left,
|
|
11087
11164
|
height: bottom - top,
|
|
@@ -11117,11 +11194,11 @@ var $b013befce1f6217f$export$ac81526b64504ab6 = {
|
|
|
11117
11194
|
prevProps = instance.props;
|
|
11118
11195
|
},
|
|
11119
11196
|
onAfterUpdate: function onAfterUpdate(_, _ref2) {
|
|
11120
|
-
var
|
|
11197
|
+
var followCursor = _ref2.followCursor;
|
|
11121
11198
|
if (isInternalUpdate) return;
|
|
11122
|
-
if (
|
|
11199
|
+
if (followCursor !== undefined && prevProps.followCursor !== followCursor) {
|
|
11123
11200
|
destroy();
|
|
11124
|
-
if (
|
|
11201
|
+
if (followCursor) {
|
|
11125
11202
|
create();
|
|
11126
11203
|
if (instance.state.isMounted && !wasFocusEvent && !getIsInitialBehavior()) addListener();
|
|
11127
11204
|
} else {
|
|
@@ -11177,7 +11254,7 @@ var $b013befce1f6217f$export$e2b668424a9c728 = {
|
|
|
11177
11254
|
function isEnabled() {
|
|
11178
11255
|
return !!instance.props.inlinePositioning;
|
|
11179
11256
|
}
|
|
11180
|
-
var
|
|
11257
|
+
var placement;
|
|
11181
11258
|
var cursorRectIndex = -1;
|
|
11182
11259
|
var isInternalUpdate = false;
|
|
11183
11260
|
var triedPlacements = [];
|
|
@@ -11189,7 +11266,7 @@ var $b013befce1f6217f$export$e2b668424a9c728 = {
|
|
|
11189
11266
|
var state = _ref2.state;
|
|
11190
11267
|
if (isEnabled()) {
|
|
11191
11268
|
if (triedPlacements.indexOf(state.placement) !== -1) triedPlacements = [];
|
|
11192
|
-
if (
|
|
11269
|
+
if (placement !== state.placement && triedPlacements.indexOf(state.placement) === -1) {
|
|
11193
11270
|
triedPlacements.push(state.placement);
|
|
11194
11271
|
instance.setProps({
|
|
11195
11272
|
// @ts-ignore - unneeded DOMRect properties
|
|
@@ -11198,7 +11275,7 @@ var $b013befce1f6217f$export$e2b668424a9c728 = {
|
|
|
11198
11275
|
}
|
|
11199
11276
|
});
|
|
11200
11277
|
}
|
|
11201
|
-
|
|
11278
|
+
placement = state.placement;
|
|
11202
11279
|
}
|
|
11203
11280
|
}
|
|
11204
11281
|
};
|
|
@@ -11408,16 +11485,6 @@ function $cbd28b10fa9798c7$export$2e2bcd8739ae039() {
|
|
|
11408
11485
|
}
|
|
11409
11486
|
|
|
11410
11487
|
|
|
11411
|
-
var $99486586f6691564$exports = {};
|
|
11412
|
-
|
|
11413
|
-
$parcel$defineInteropFlag($99486586f6691564$exports);
|
|
11414
|
-
|
|
11415
|
-
$parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
|
|
11416
|
-
function $99486586f6691564$export$2e2bcd8739ae039() {
|
|
11417
|
-
return {};
|
|
11418
|
-
}
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
11488
|
var $47a1c62621be0c54$exports = {};
|
|
11422
11489
|
|
|
11423
11490
|
$parcel$defineInteropFlag($47a1c62621be0c54$exports);
|
|
@@ -11474,6 +11541,16 @@ function $47a1c62621be0c54$export$2e2bcd8739ae039() {
|
|
|
11474
11541
|
}
|
|
11475
11542
|
|
|
11476
11543
|
|
|
11544
|
+
var $99486586f6691564$exports = {};
|
|
11545
|
+
|
|
11546
|
+
$parcel$defineInteropFlag($99486586f6691564$exports);
|
|
11547
|
+
|
|
11548
|
+
$parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
|
|
11549
|
+
function $99486586f6691564$export$2e2bcd8739ae039() {
|
|
11550
|
+
return {};
|
|
11551
|
+
}
|
|
11552
|
+
|
|
11553
|
+
|
|
11477
11554
|
var $e398acaded942bbe$exports = {};
|
|
11478
11555
|
|
|
11479
11556
|
$parcel$defineInteropFlag($e398acaded942bbe$exports);
|
|
@@ -11507,31 +11584,6 @@ function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
|
|
|
11507
11584
|
}
|
|
11508
11585
|
|
|
11509
11586
|
|
|
11510
|
-
var $e9904a14dabf652d$exports = {};
|
|
11511
|
-
|
|
11512
|
-
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
|
11513
|
-
|
|
11514
|
-
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
|
11515
|
-
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
|
11516
|
-
return {
|
|
11517
|
-
focussed: false,
|
|
11518
|
-
get active () {
|
|
11519
|
-
return store.active;
|
|
11520
|
-
},
|
|
11521
|
-
get text () {
|
|
11522
|
-
return store.text;
|
|
11523
|
-
},
|
|
11524
|
-
clear () {
|
|
11525
|
-
if (store.raw === "") this.$refs.input.blur();
|
|
11526
|
-
else store.raw = "";
|
|
11527
|
-
},
|
|
11528
|
-
focus () {
|
|
11529
|
-
this.$refs.input.focus();
|
|
11530
|
-
}
|
|
11531
|
-
};
|
|
11532
|
-
}
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
11587
|
var $e1f51f020443edd4$exports = {};
|
|
11536
11588
|
|
|
11537
11589
|
$parcel$defineInteropFlag($e1f51f020443edd4$exports);
|
|
@@ -11634,11 +11686,11 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11634
11686
|
if (true === enabled && "object" === typeof window.console) // eslint-disable-next-line no-console
|
|
11635
11687
|
console[type](formatLogHeader(iframeId), msg);
|
|
11636
11688
|
}
|
|
11637
|
-
function iFrameListener(
|
|
11689
|
+
function iFrameListener(event) {
|
|
11638
11690
|
function resizeIFrame() {
|
|
11639
11691
|
function resize() {
|
|
11640
11692
|
setSize(messageData);
|
|
11641
|
-
setPagePosition(
|
|
11693
|
+
setPagePosition(iframeId);
|
|
11642
11694
|
on("onResized", messageData);
|
|
11643
11695
|
}
|
|
11644
11696
|
ensureInRange("Height");
|
|
@@ -11671,15 +11723,15 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11671
11723
|
return top + bot;
|
|
11672
11724
|
}
|
|
11673
11725
|
function ensureInRange(Dimension) {
|
|
11674
|
-
var max = Number(settings[
|
|
11675
|
-
log(
|
|
11726
|
+
var max = Number(settings[iframeId]["max" + Dimension]), min = Number(settings[iframeId]["min" + Dimension]), dimension = Dimension.toLowerCase(), size = Number(messageData[dimension]);
|
|
11727
|
+
log(iframeId, "Checking " + dimension + " is in range " + min + "-" + max);
|
|
11676
11728
|
if (size < min) {
|
|
11677
11729
|
size = min;
|
|
11678
|
-
log(
|
|
11730
|
+
log(iframeId, "Set " + dimension + " to min value");
|
|
11679
11731
|
}
|
|
11680
11732
|
if (size > max) {
|
|
11681
11733
|
size = max;
|
|
11682
|
-
log(
|
|
11734
|
+
log(iframeId, "Set " + dimension + " to max value");
|
|
11683
11735
|
}
|
|
11684
11736
|
messageData[dimension] = "" + size;
|
|
11685
11737
|
}
|
|
@@ -11687,7 +11739,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11687
11739
|
function checkAllowedOrigin() {
|
|
11688
11740
|
function checkList() {
|
|
11689
11741
|
var i = 0, retCode = false;
|
|
11690
|
-
log(
|
|
11742
|
+
log(iframeId, "Checking connection is from allowed list of origins: " + checkOrigin);
|
|
11691
11743
|
for(; i < checkOrigin.length; i++)if (checkOrigin[i] === origin) {
|
|
11692
11744
|
retCode = true;
|
|
11693
11745
|
break;
|
|
@@ -11695,14 +11747,14 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11695
11747
|
return retCode;
|
|
11696
11748
|
}
|
|
11697
11749
|
function checkSingle() {
|
|
11698
|
-
var remoteHost = settings[
|
|
11699
|
-
log(
|
|
11750
|
+
var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
|
|
11751
|
+
log(iframeId, "Checking connection is from: " + remoteHost);
|
|
11700
11752
|
return origin === remoteHost;
|
|
11701
11753
|
}
|
|
11702
11754
|
return checkOrigin.constructor === Array ? checkList() : checkSingle();
|
|
11703
11755
|
}
|
|
11704
|
-
var origin =
|
|
11705
|
-
if (checkOrigin && "" + origin !== "null" && !checkAllowedOrigin()) throw new Error("Unexpected message received from: " + origin + " for " + messageData.iframe.id + ". Message was: " +
|
|
11756
|
+
var origin = event.origin, checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
|
|
11757
|
+
if (checkOrigin && "" + origin !== "null" && !checkAllowedOrigin()) throw new Error("Unexpected message received from: " + origin + " for " + messageData.iframe.id + ". Message was: " + event.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");
|
|
11706
11758
|
return true;
|
|
11707
11759
|
}
|
|
11708
11760
|
function isMessageForUs() {
|
|
@@ -11717,19 +11769,19 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11717
11769
|
false: 1,
|
|
11718
11770
|
undefined: 1
|
|
11719
11771
|
};
|
|
11720
|
-
if (retCode) log(
|
|
11772
|
+
if (retCode) log(iframeId, "Ignoring init message from meta parent page");
|
|
11721
11773
|
return retCode;
|
|
11722
11774
|
}
|
|
11723
11775
|
function getMsgBody(offset) {
|
|
11724
11776
|
return msg.substr(msg.indexOf(":") + msgHeaderLen + offset);
|
|
11725
11777
|
}
|
|
11726
11778
|
function forwardMsgFromIFrame(msgBody) {
|
|
11727
|
-
log(
|
|
11779
|
+
log(iframeId, "onMessage passed: {iframe: " + messageData.iframe.id + ", message: " + msgBody + "}");
|
|
11728
11780
|
on("onMessage", {
|
|
11729
11781
|
iframe: messageData.iframe,
|
|
11730
11782
|
message: JSON.parse(msgBody)
|
|
11731
11783
|
});
|
|
11732
|
-
log(
|
|
11784
|
+
log(iframeId, "--");
|
|
11733
11785
|
}
|
|
11734
11786
|
function getPageInfo() {
|
|
11735
11787
|
var bodyPosition = document.body.getBoundingClientRect(), iFramePosition = messageData.iframe.getBoundingClientRect();
|
|
@@ -11774,28 +11826,28 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11774
11826
|
function start() {
|
|
11775
11827
|
setListener("Add ", addEventListener);
|
|
11776
11828
|
}
|
|
11777
|
-
var id =
|
|
11829
|
+
var id = iframeId // Create locally scoped copy of iFrame ID
|
|
11778
11830
|
;
|
|
11779
11831
|
start();
|
|
11780
11832
|
if (settings[id]) settings[id].stopPageInfo = stop;
|
|
11781
11833
|
}
|
|
11782
11834
|
function stopPageInfoMonitor() {
|
|
11783
|
-
if (settings[
|
|
11784
|
-
settings[
|
|
11785
|
-
delete settings[
|
|
11835
|
+
if (settings[iframeId] && settings[iframeId].stopPageInfo) {
|
|
11836
|
+
settings[iframeId].stopPageInfo();
|
|
11837
|
+
delete settings[iframeId].stopPageInfo;
|
|
11786
11838
|
}
|
|
11787
11839
|
}
|
|
11788
11840
|
function checkIFrameExists() {
|
|
11789
11841
|
var retBool = true;
|
|
11790
11842
|
if (null === messageData.iframe) {
|
|
11791
|
-
warn(
|
|
11843
|
+
warn(iframeId, "IFrame (" + messageData.id + ") not found");
|
|
11792
11844
|
retBool = false;
|
|
11793
11845
|
}
|
|
11794
11846
|
return retBool;
|
|
11795
11847
|
}
|
|
11796
11848
|
function getElementPosition(target) {
|
|
11797
11849
|
var iFramePosition = target.getBoundingClientRect();
|
|
11798
|
-
getPagePosition(
|
|
11850
|
+
getPagePosition(iframeId);
|
|
11799
11851
|
return {
|
|
11800
11852
|
x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
|
|
11801
11853
|
y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
|
|
@@ -11806,7 +11858,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11806
11858
|
function reposition() {
|
|
11807
11859
|
pagePosition = newPosition;
|
|
11808
11860
|
scrollTo();
|
|
11809
|
-
log(
|
|
11861
|
+
log(iframeId, "--");
|
|
11810
11862
|
}
|
|
11811
11863
|
function calcOffset() {
|
|
11812
11864
|
return {
|
|
@@ -11816,39 +11868,39 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11816
11868
|
}
|
|
11817
11869
|
function scrollParent() {
|
|
11818
11870
|
if (window.parentIFrame) window.parentIFrame["scrollTo" + (addOffset ? "Offset" : "")](newPosition.x, newPosition.y);
|
|
11819
|
-
else warn(
|
|
11871
|
+
else warn(iframeId, "Unable to scroll to requested position, window.parentIFrame not found");
|
|
11820
11872
|
}
|
|
11821
11873
|
var offset = addOffset ? getElementPosition(messageData.iframe) : {
|
|
11822
11874
|
x: 0,
|
|
11823
11875
|
y: 0
|
|
11824
11876
|
}, newPosition = calcOffset();
|
|
11825
|
-
log(
|
|
11877
|
+
log(iframeId, "Reposition requested from iFrame (offset x:" + offset.x + " y:" + offset.y + ")");
|
|
11826
11878
|
if (window.top !== window.self) scrollParent();
|
|
11827
11879
|
else reposition();
|
|
11828
11880
|
}
|
|
11829
11881
|
function scrollTo() {
|
|
11830
|
-
if (false !== on("onScroll", pagePosition)) setPagePosition(
|
|
11882
|
+
if (false !== on("onScroll", pagePosition)) setPagePosition(iframeId);
|
|
11831
11883
|
else unsetPagePosition();
|
|
11832
11884
|
}
|
|
11833
11885
|
function findTarget(location) {
|
|
11834
11886
|
function jumpToTarget() {
|
|
11835
11887
|
var jumpPosition = getElementPosition(target);
|
|
11836
|
-
log(
|
|
11888
|
+
log(iframeId, "Moving to in page link (#" + hash + ") at x: " + jumpPosition.x + " y: " + jumpPosition.y);
|
|
11837
11889
|
pagePosition = {
|
|
11838
11890
|
x: jumpPosition.x,
|
|
11839
11891
|
y: jumpPosition.y
|
|
11840
11892
|
};
|
|
11841
11893
|
scrollTo();
|
|
11842
|
-
log(
|
|
11894
|
+
log(iframeId, "--");
|
|
11843
11895
|
}
|
|
11844
11896
|
function jumpToParent() {
|
|
11845
11897
|
if (window.parentIFrame) window.parentIFrame.moveToAnchor(hash);
|
|
11846
|
-
else log(
|
|
11898
|
+
else log(iframeId, "In page link #" + hash + " not found and window.parentIFrame not found");
|
|
11847
11899
|
}
|
|
11848
11900
|
var hash = location.split("#")[1] || "", hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
|
|
11849
11901
|
if (target) jumpToTarget();
|
|
11850
11902
|
else if (window.top !== window.self) jumpToParent();
|
|
11851
|
-
else log(
|
|
11903
|
+
else log(iframeId, "In page link #" + hash + " not found");
|
|
11852
11904
|
}
|
|
11853
11905
|
function onMouse(event) {
|
|
11854
11906
|
var mousePos = {};
|
|
@@ -11870,10 +11922,10 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11870
11922
|
});
|
|
11871
11923
|
}
|
|
11872
11924
|
function on(funcName, val) {
|
|
11873
|
-
return chkEvent(
|
|
11925
|
+
return chkEvent(iframeId, funcName, val);
|
|
11874
11926
|
}
|
|
11875
11927
|
function actionMsg() {
|
|
11876
|
-
if (settings[
|
|
11928
|
+
if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
|
|
11877
11929
|
switch(messageData.type){
|
|
11878
11930
|
case "close":
|
|
11879
11931
|
closeIFrame(messageData.iframe);
|
|
@@ -11888,7 +11940,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11888
11940
|
onMouse("onMouseLeave");
|
|
11889
11941
|
break;
|
|
11890
11942
|
case "autoResize":
|
|
11891
|
-
settings[
|
|
11943
|
+
settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
|
|
11892
11944
|
break;
|
|
11893
11945
|
case "scrollTo":
|
|
11894
11946
|
scrollRequestFromChild(false);
|
|
@@ -11897,7 +11949,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11897
11949
|
scrollRequestFromChild(true);
|
|
11898
11950
|
break;
|
|
11899
11951
|
case "pageInfo":
|
|
11900
|
-
sendPageInfoToIframe(settings[
|
|
11952
|
+
sendPageInfoToIframe(settings[iframeId] && settings[iframeId].iframe, iframeId);
|
|
11901
11953
|
startPageInfoMonitor();
|
|
11902
11954
|
break;
|
|
11903
11955
|
case "pageInfoStop":
|
|
@@ -11931,19 +11983,19 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
11931
11983
|
for(var iframeId in settings)trigger("iFrame requested init", createOutgoingMsg(iframeId), settings[iframeId].iframe, iframeId);
|
|
11932
11984
|
}
|
|
11933
11985
|
function firstRun() {
|
|
11934
|
-
if (settings[
|
|
11986
|
+
if (settings[iframeId]) settings[iframeId].firstRun = false;
|
|
11935
11987
|
}
|
|
11936
|
-
var msg =
|
|
11988
|
+
var msg = event.data, messageData = {}, iframeId = null;
|
|
11937
11989
|
if ("[iFrameResizerChild]Ready" === msg) iFrameReadyMsgReceived();
|
|
11938
11990
|
else if (isMessageForUs()) {
|
|
11939
11991
|
messageData = processMsg();
|
|
11940
|
-
|
|
11941
|
-
if (settings[
|
|
11942
|
-
if (!isMessageFromMetaParent() && hasSettings(
|
|
11943
|
-
log(
|
|
11992
|
+
iframeId = messageData.id;
|
|
11993
|
+
if (settings[iframeId]) settings[iframeId].loaded = true;
|
|
11994
|
+
if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
|
|
11995
|
+
log(iframeId, "Received: " + msg);
|
|
11944
11996
|
if (checkIFrameExists() && isMessageFromIFrame()) actionMsg();
|
|
11945
11997
|
}
|
|
11946
|
-
} else info(
|
|
11998
|
+
} else info(iframeId, "Ignored: " + msg);
|
|
11947
11999
|
}
|
|
11948
12000
|
function chkEvent(iframeId, funcName, val) {
|
|
11949
12001
|
var func = null, retVal = null;
|
|
@@ -12077,17 +12129,17 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12077
12129
|
function isNumber(value) {
|
|
12078
12130
|
return typeof value === "number";
|
|
12079
12131
|
}
|
|
12080
|
-
function setupIFrame(iframe,
|
|
12132
|
+
function setupIFrame(iframe, options) {
|
|
12081
12133
|
function setLimits() {
|
|
12082
12134
|
function addStyle(style) {
|
|
12083
|
-
var styleValue = settings[
|
|
12135
|
+
var styleValue = settings[iframeId][style];
|
|
12084
12136
|
if (Infinity !== styleValue && 0 !== styleValue) {
|
|
12085
12137
|
iframe.style[style] = isNumber(styleValue) ? styleValue + "px" : styleValue;
|
|
12086
|
-
log(
|
|
12138
|
+
log(iframeId, "Set " + style + " = " + iframe.style[style]);
|
|
12087
12139
|
}
|
|
12088
12140
|
}
|
|
12089
12141
|
function chkMinMax(dimension) {
|
|
12090
|
-
if (settings[
|
|
12142
|
+
if (settings[iframeId]["min" + dimension] > settings[iframeId]["max" + dimension]) throw new Error("Value for min" + dimension + " can not be greater than max" + dimension);
|
|
12091
12143
|
}
|
|
12092
12144
|
chkMinMax("Height");
|
|
12093
12145
|
chkMinMax("Width");
|
|
@@ -12097,7 +12149,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12097
12149
|
addStyle("minWidth");
|
|
12098
12150
|
}
|
|
12099
12151
|
function newId() {
|
|
12100
|
-
var id =
|
|
12152
|
+
var id = options && options.id || defaults.id + count++;
|
|
12101
12153
|
if (null !== document.getElementById(id)) id += count++;
|
|
12102
12154
|
return id;
|
|
12103
12155
|
}
|
|
@@ -12105,15 +12157,15 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12105
12157
|
if ("" === iframeId) {
|
|
12106
12158
|
// eslint-disable-next-line no-multi-assign
|
|
12107
12159
|
iframe.id = iframeId = newId();
|
|
12108
|
-
logEnabled = (
|
|
12160
|
+
logEnabled = (options || {}).log;
|
|
12109
12161
|
log(iframeId, "Added missing iframe ID: " + iframeId + " (" + iframe.src + ")");
|
|
12110
12162
|
}
|
|
12111
12163
|
return iframeId;
|
|
12112
12164
|
}
|
|
12113
12165
|
function setScrolling() {
|
|
12114
|
-
log(
|
|
12115
|
-
iframe.style.overflow = false === (settings[
|
|
12116
|
-
switch(settings[
|
|
12166
|
+
log(iframeId, "IFrame scrolling " + (settings[iframeId] && settings[iframeId].scrolling ? "enabled" : "disabled") + " for " + iframeId);
|
|
12167
|
+
iframe.style.overflow = false === (settings[iframeId] && settings[iframeId].scrolling) ? "hidden" : "auto";
|
|
12168
|
+
switch(settings[iframeId] && settings[iframeId].scrolling){
|
|
12117
12169
|
case "omit":
|
|
12118
12170
|
break;
|
|
12119
12171
|
case true:
|
|
@@ -12123,23 +12175,23 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12123
12175
|
iframe.scrolling = "no";
|
|
12124
12176
|
break;
|
|
12125
12177
|
default:
|
|
12126
|
-
iframe.scrolling = settings[
|
|
12178
|
+
iframe.scrolling = settings[iframeId] ? settings[iframeId].scrolling : "no";
|
|
12127
12179
|
}
|
|
12128
12180
|
}
|
|
12129
12181
|
// The V1 iFrame script expects an int, where as in V2 expects a CSS
|
|
12130
12182
|
// string value such as '1px 3em', so if we have an int for V2, set V1=V2
|
|
12131
12183
|
// and then convert V2 to a string PX value.
|
|
12132
12184
|
function setupBodyMarginValues() {
|
|
12133
|
-
if ("number" === typeof (settings[
|
|
12134
|
-
settings[
|
|
12135
|
-
settings[
|
|
12185
|
+
if ("number" === typeof (settings[iframeId] && settings[iframeId].bodyMargin) || "0" === (settings[iframeId] && settings[iframeId].bodyMargin)) {
|
|
12186
|
+
settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
|
|
12187
|
+
settings[iframeId].bodyMargin = "" + settings[iframeId].bodyMargin + "px";
|
|
12136
12188
|
}
|
|
12137
12189
|
}
|
|
12138
12190
|
function checkReset() {
|
|
12139
12191
|
// Reduce scope of firstRun to function, because IE8's JS execution
|
|
12140
12192
|
// context stack is borked and this value gets externally
|
|
12141
12193
|
// changed midway through running this function!!!
|
|
12142
|
-
var firstRun = settings[
|
|
12194
|
+
var firstRun = settings[iframeId] && settings[iframeId].firstRun, resetRequertMethod = settings[iframeId] && settings[iframeId].heightCalculationMethod in resetRequiredMethods;
|
|
12143
12195
|
if (!firstRun && resetRequertMethod) resetIFrame({
|
|
12144
12196
|
iframe: iframe,
|
|
12145
12197
|
height: 0,
|
|
@@ -12148,16 +12200,16 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12148
12200
|
});
|
|
12149
12201
|
}
|
|
12150
12202
|
function setupIFrameObject() {
|
|
12151
|
-
if (settings[
|
|
12152
|
-
close: closeIFrame.bind(null, settings[
|
|
12153
|
-
removeListeners: removeIframeListeners.bind(null, settings[
|
|
12154
|
-
resize: trigger.bind(null, "Window resize", "resize", settings[
|
|
12203
|
+
if (settings[iframeId]) settings[iframeId].iframe.iFrameResizer = {
|
|
12204
|
+
close: closeIFrame.bind(null, settings[iframeId].iframe),
|
|
12205
|
+
removeListeners: removeIframeListeners.bind(null, settings[iframeId].iframe),
|
|
12206
|
+
resize: trigger.bind(null, "Window resize", "resize", settings[iframeId].iframe),
|
|
12155
12207
|
moveToAnchor: function(anchor) {
|
|
12156
|
-
trigger("Move to anchor", "moveToAnchor:" + anchor, settings[
|
|
12208
|
+
trigger("Move to anchor", "moveToAnchor:" + anchor, settings[iframeId].iframe, iframeId);
|
|
12157
12209
|
},
|
|
12158
12210
|
sendMessage: function(message) {
|
|
12159
12211
|
message = JSON.stringify(message);
|
|
12160
|
-
trigger("Send Message", "message:" + message, settings[
|
|
12212
|
+
trigger("Send Message", "message:" + message, settings[iframeId].iframe, iframeId);
|
|
12161
12213
|
}
|
|
12162
12214
|
};
|
|
12163
12215
|
}
|
|
@@ -12184,8 +12236,8 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12184
12236
|
childList: true
|
|
12185
12237
|
});
|
|
12186
12238
|
}
|
|
12187
|
-
var
|
|
12188
|
-
if (
|
|
12239
|
+
var MutationObserver = getMutationObserver();
|
|
12240
|
+
if (MutationObserver) createDestroyObserver(MutationObserver);
|
|
12189
12241
|
addEventListener(iframe, "load", iFrameLoaded);
|
|
12190
12242
|
trigger("init", msg, iframe, undefined, true);
|
|
12191
12243
|
}
|
|
@@ -12194,7 +12246,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12194
12246
|
}
|
|
12195
12247
|
function copyOptions(options) {
|
|
12196
12248
|
// eslint-disable-next-line no-restricted-syntax
|
|
12197
|
-
for(var option in defaults)if (Object.prototype.hasOwnProperty.call(defaults, option)) settings[
|
|
12249
|
+
for(var option in defaults)if (Object.prototype.hasOwnProperty.call(defaults, option)) settings[iframeId][option] = Object.prototype.hasOwnProperty.call(options, option) ? options[option] : defaults[option];
|
|
12198
12250
|
}
|
|
12199
12251
|
function getTargetOrigin(remoteHost) {
|
|
12200
12252
|
return "" === remoteHost || null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/) ? "*" : remoteHost;
|
|
@@ -12205,12 +12257,12 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12205
12257
|
var name = "on" + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
|
|
12206
12258
|
this[name] = this[key];
|
|
12207
12259
|
delete this[key];
|
|
12208
|
-
warn(
|
|
12260
|
+
warn(iframeId, "Deprecated: '" + key + "' has been renamed '" + name + "'. The old method will be removed in the next major version.");
|
|
12209
12261
|
}
|
|
12210
12262
|
}
|
|
12211
12263
|
function processOptions(options) {
|
|
12212
12264
|
options = options || {};
|
|
12213
|
-
settings[
|
|
12265
|
+
settings[iframeId] = {
|
|
12214
12266
|
firstRun: true,
|
|
12215
12267
|
iframe: iframe,
|
|
12216
12268
|
remoteHost: iframe.src && iframe.src.split("/").slice(0, 3).join("/")
|
|
@@ -12218,20 +12270,20 @@ var $ef5e88eaa61efd95$exports = {};
|
|
|
12218
12270
|
checkOptions(options);
|
|
12219
12271
|
Object.keys(options).forEach(depricate, options);
|
|
12220
12272
|
copyOptions(options);
|
|
12221
|
-
if (settings[
|
|
12273
|
+
if (settings[iframeId]) settings[iframeId].targetOrigin = true === settings[iframeId].checkOrigin ? getTargetOrigin(settings[iframeId].remoteHost) : "*";
|
|
12222
12274
|
}
|
|
12223
12275
|
function beenHere() {
|
|
12224
|
-
return
|
|
12276
|
+
return iframeId in settings && "iFrameResizer" in iframe;
|
|
12225
12277
|
}
|
|
12226
|
-
var
|
|
12278
|
+
var iframeId = ensureHasId(iframe.id);
|
|
12227
12279
|
if (!beenHere()) {
|
|
12228
|
-
processOptions(
|
|
12280
|
+
processOptions(options);
|
|
12229
12281
|
setScrolling();
|
|
12230
12282
|
setLimits();
|
|
12231
12283
|
setupBodyMarginValues();
|
|
12232
|
-
init(createOutgoingMsg(
|
|
12284
|
+
init(createOutgoingMsg(iframeId));
|
|
12233
12285
|
setupIFrameObject();
|
|
12234
|
-
} else warn(
|
|
12286
|
+
} else warn(iframeId, "Ignored iFrame, already setup.");
|
|
12235
12287
|
}
|
|
12236
12288
|
function debouce(fn, time) {
|
|
12237
12289
|
if (null === timer) timer = setTimeout(function() {
|
|
@@ -12397,6 +12449,31 @@ function $e1f51f020443edd4$export$2e2bcd8739ae039(id, embedStore) {
|
|
|
12397
12449
|
}
|
|
12398
12450
|
|
|
12399
12451
|
|
|
12452
|
+
var $e9904a14dabf652d$exports = {};
|
|
12453
|
+
|
|
12454
|
+
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
|
12455
|
+
|
|
12456
|
+
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
|
12457
|
+
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
|
12458
|
+
return {
|
|
12459
|
+
focussed: false,
|
|
12460
|
+
get active () {
|
|
12461
|
+
return store.active;
|
|
12462
|
+
},
|
|
12463
|
+
get text () {
|
|
12464
|
+
return store.text;
|
|
12465
|
+
},
|
|
12466
|
+
clear () {
|
|
12467
|
+
if (store.raw === "") this.$refs.input.blur();
|
|
12468
|
+
else store.raw = "";
|
|
12469
|
+
},
|
|
12470
|
+
focus () {
|
|
12471
|
+
this.$refs.input.focus();
|
|
12472
|
+
}
|
|
12473
|
+
};
|
|
12474
|
+
}
|
|
12475
|
+
|
|
12476
|
+
|
|
12400
12477
|
var $36506012e0c6e9e3$exports = {};
|
|
12401
12478
|
|
|
12402
12479
|
$parcel$defineInteropFlag($36506012e0c6e9e3$exports);
|
|
@@ -12431,6 +12508,9 @@ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
|
|
|
12431
12508
|
const index = store.open.indexOf(id);
|
|
12432
12509
|
if (index > -1) store.open.splice(index, 1);
|
|
12433
12510
|
},
|
|
12511
|
+
closeAll () {
|
|
12512
|
+
store.open.length = 0;
|
|
12513
|
+
},
|
|
12434
12514
|
toggleOpen (id) {
|
|
12435
12515
|
this.isOpen(id) ? this.setClosed(id) : this.setOpen(id);
|
|
12436
12516
|
},
|
|
@@ -12450,24 +12530,6 @@ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
|
|
|
12450
12530
|
}
|
|
12451
12531
|
|
|
12452
12532
|
|
|
12453
|
-
var $b63b9c6d236b3f65$exports = {};
|
|
12454
|
-
|
|
12455
|
-
$parcel$defineInteropFlag($b63b9c6d236b3f65$exports);
|
|
12456
|
-
|
|
12457
|
-
$parcel$export($b63b9c6d236b3f65$exports, "default", () => $b63b9c6d236b3f65$export$2e2bcd8739ae039);
|
|
12458
|
-
|
|
12459
|
-
function $b63b9c6d236b3f65$export$2e2bcd8739ae039() {
|
|
12460
|
-
return {
|
|
12461
|
-
narrow: false,
|
|
12462
|
-
init () {
|
|
12463
|
-
(0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
|
|
12464
|
-
this.narrow = width < 450;
|
|
12465
|
-
});
|
|
12466
|
-
}
|
|
12467
|
-
};
|
|
12468
|
-
}
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
12533
|
var $506dabb2bf255b38$exports = {};
|
|
12472
12534
|
|
|
12473
12535
|
$parcel$defineInteropFlag($506dabb2bf255b38$exports);
|
|
@@ -12501,14 +12563,14 @@ var $7cac9a0d4b75bf4e$var$parseValue = function(value) {
|
|
|
12501
12563
|
var $7cac9a0d4b75bf4e$var$parse = function(rule) {
|
|
12502
12564
|
return rule.split(" ").map($7cac9a0d4b75bf4e$var$parseValue);
|
|
12503
12565
|
};
|
|
12504
|
-
var $7cac9a0d4b75bf4e$var$getSizeAtTrack = function(
|
|
12566
|
+
var $7cac9a0d4b75bf4e$var$getSizeAtTrack = function(index, tracks, gap, end) {
|
|
12505
12567
|
if (gap === void 0) gap = 0;
|
|
12506
12568
|
if (end === void 0) end = false;
|
|
12507
|
-
var newIndex = end ?
|
|
12569
|
+
var newIndex = end ? index + 1 : index;
|
|
12508
12570
|
var trackSum = tracks.slice(0, newIndex).reduce(function(accum, value) {
|
|
12509
12571
|
return accum + value.numeric;
|
|
12510
12572
|
}, 0);
|
|
12511
|
-
var gapSum = gap ?
|
|
12573
|
+
var gapSum = gap ? index * gap : 0;
|
|
12512
12574
|
return trackSum + gapSum;
|
|
12513
12575
|
};
|
|
12514
12576
|
var $7cac9a0d4b75bf4e$var$getStyles = function(rule, ownRules, matchedRules) {
|
|
@@ -12683,8 +12745,8 @@ $7cac9a0d4b75bf4e$var$Gutter.prototype.startDragging = function startDragging(e)
|
|
|
12683
12745
|
});
|
|
12684
12746
|
this.totalFrs = trackFr.length;
|
|
12685
12747
|
if (this.totalFrs) {
|
|
12686
|
-
var
|
|
12687
|
-
if (
|
|
12748
|
+
var track = $7cac9a0d4b75bf4e$var$firstNonZero(trackFr);
|
|
12749
|
+
if (track !== null) this.frToPixels = this.computedPixels[track].numeric / trackFr[track].numeric;
|
|
12688
12750
|
}
|
|
12689
12751
|
if (trackPercentage.length) {
|
|
12690
12752
|
var track$1 = $7cac9a0d4b75bf4e$var$firstNonZero(trackPercentage);
|
|
@@ -13055,7 +13117,7 @@ $parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$exp
|
|
|
13055
13117
|
|
|
13056
13118
|
|
|
13057
13119
|
function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
|
|
13058
|
-
const
|
|
13120
|
+
const initial = store ? store.activeTab : null;
|
|
13059
13121
|
let dropdown = null;
|
|
13060
13122
|
return {
|
|
13061
13123
|
visibleTabsCount: 0,
|
|
@@ -13084,7 +13146,7 @@ function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
|
|
|
13084
13146
|
placement: "bottom",
|
|
13085
13147
|
appendTo: this.$root
|
|
13086
13148
|
});
|
|
13087
|
-
const initialTab =
|
|
13149
|
+
const initialTab = initial ? this.tabs.find((t)=>this._getRef(t) === initial) : this.tabs[0];
|
|
13088
13150
|
this.selectTab(initialTab, true);
|
|
13089
13151
|
this.parentObserver = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this)));
|
|
13090
13152
|
this.$watch("visibleTabsCount", (value)=>{
|
|
@@ -13264,16 +13326,15 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
|
13264
13326
|
}
|
|
13265
13327
|
|
|
13266
13328
|
|
|
13267
|
-
$
|
|
13329
|
+
$205fb3dd9870d001$exports = {
|
|
13268
13330
|
"button": $cbd28b10fa9798c7$exports,
|
|
13269
|
-
"code": $99486586f6691564$exports,
|
|
13270
13331
|
"copy_button": $47a1c62621be0c54$exports,
|
|
13332
|
+
"code": $99486586f6691564$exports,
|
|
13271
13333
|
"dimensions_display": $e398acaded942bbe$exports,
|
|
13272
|
-
"filter": $e9904a14dabf652d$exports,
|
|
13273
13334
|
"embed": $e1f51f020443edd4$exports,
|
|
13335
|
+
"filter": $e9904a14dabf652d$exports,
|
|
13274
13336
|
"icon": $36506012e0c6e9e3$exports,
|
|
13275
13337
|
"nav": $d92d9d5253f84566$exports,
|
|
13276
|
-
"params_editor": $b63b9c6d236b3f65$exports,
|
|
13277
13338
|
"split_layout": $506dabb2bf255b38$exports,
|
|
13278
13339
|
"tab_panels": $a87dacf5139b5e2f$exports,
|
|
13279
13340
|
"tabs": $0db07828cadc68e0$exports,
|
|
@@ -13281,7 +13342,7 @@ $5a1160331e703b26$exports = {
|
|
|
13281
13342
|
};
|
|
13282
13343
|
|
|
13283
13344
|
|
|
13284
|
-
var $
|
|
13345
|
+
var $c43230a66e7bc31a$exports = {};
|
|
13285
13346
|
var $9b24cbeb3a465447$exports = {};
|
|
13286
13347
|
|
|
13287
13348
|
$parcel$defineInteropFlag($9b24cbeb3a465447$exports);
|
|
@@ -13338,12 +13399,57 @@ function $9b24cbeb3a465447$export$2e2bcd8739ae039({ id: id , matchers: matchers
|
|
|
13338
13399
|
}
|
|
13339
13400
|
|
|
13340
13401
|
|
|
13341
|
-
var $
|
|
13402
|
+
var $1a7a7298eec5b755$exports = {};
|
|
13403
|
+
|
|
13404
|
+
$parcel$defineInteropFlag($1a7a7298eec5b755$exports);
|
|
13405
|
+
|
|
13406
|
+
$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
|
|
13407
|
+
|
|
13408
|
+
function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
|
|
13409
|
+
return {
|
|
13410
|
+
narrow: false,
|
|
13411
|
+
init () {
|
|
13412
|
+
(0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
|
|
13413
|
+
this.narrow = width < 500;
|
|
13414
|
+
});
|
|
13415
|
+
}
|
|
13416
|
+
};
|
|
13417
|
+
}
|
|
13418
|
+
|
|
13419
|
+
|
|
13420
|
+
var $e773f8ef556b41ff$exports = {};
|
|
13421
|
+
|
|
13422
|
+
$parcel$defineInteropFlag($e773f8ef556b41ff$exports);
|
|
13423
|
+
|
|
13424
|
+
$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
|
|
13425
|
+
function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
|
|
13426
|
+
return {
|
|
13427
|
+
get isNarrowLayout () {
|
|
13428
|
+
return this.narrow || false;
|
|
13429
|
+
}
|
|
13430
|
+
};
|
|
13431
|
+
}
|
|
13432
|
+
|
|
13433
|
+
|
|
13434
|
+
$c43230a66e7bc31a$exports = {
|
|
13435
|
+
"nav": {
|
|
13436
|
+
"item": $9b24cbeb3a465447$exports
|
|
13437
|
+
},
|
|
13438
|
+
"params": {
|
|
13439
|
+
"editor": $1a7a7298eec5b755$exports,
|
|
13440
|
+
"field": $e773f8ef556b41ff$exports
|
|
13441
|
+
}
|
|
13442
|
+
};
|
|
13443
|
+
|
|
13444
|
+
|
|
13445
|
+
var $6c10158820e535ef$exports = {};
|
|
13446
|
+
|
|
13447
|
+
var $7f7fff78376549af$exports = {};
|
|
13342
13448
|
|
|
13343
|
-
$parcel$defineInteropFlag($
|
|
13449
|
+
$parcel$defineInteropFlag($7f7fff78376549af$exports);
|
|
13344
13450
|
|
|
13345
|
-
$parcel$export($
|
|
13346
|
-
function $
|
|
13451
|
+
$parcel$export($7f7fff78376549af$exports, "default", () => $7f7fff78376549af$export$2e2bcd8739ae039);
|
|
13452
|
+
function $7f7fff78376549af$export$2e2bcd8739ae039({ name: name , value: value }) {
|
|
13347
13453
|
return {
|
|
13348
13454
|
name: name,
|
|
13349
13455
|
value: value,
|
|
@@ -13360,37 +13466,15 @@ function $fa8073e5be19dff9$export$2e2bcd8739ae039({ name: name , value: value }
|
|
|
13360
13466
|
},
|
|
13361
13467
|
validate () {
|
|
13362
13468
|
return this.$root.reportValidity ? this.$root.reportValidity() : true;
|
|
13363
|
-
},
|
|
13364
|
-
get isNarrowLayout () {
|
|
13365
|
-
return this.narrow || false;
|
|
13366
|
-
},
|
|
13367
|
-
bindings: {
|
|
13368
|
-
input: {
|
|
13369
|
-
[":id"]: "`param-${name}`",
|
|
13370
|
-
["x-ref"]: "input",
|
|
13371
|
-
["x-model.debounce.200"]: "value",
|
|
13372
|
-
["@keydown.stop"]: true
|
|
13373
|
-
}
|
|
13374
13469
|
}
|
|
13375
13470
|
};
|
|
13376
13471
|
}
|
|
13377
13472
|
|
|
13378
13473
|
|
|
13379
|
-
$e4eab7529959b73b$exports = {
|
|
13380
|
-
"nav": {
|
|
13381
|
-
"item": $9b24cbeb3a465447$exports
|
|
13382
|
-
},
|
|
13383
|
-
"params_editor": {
|
|
13384
|
-
"field": $fa8073e5be19dff9$exports
|
|
13385
|
-
}
|
|
13386
|
-
};
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
var $4979d2d897a1c01f$exports = {};
|
|
13390
|
-
|
|
13391
13474
|
|
|
13392
|
-
$
|
|
13475
|
+
$6c10158820e535ef$exports = {
|
|
13393
13476
|
"clipboard": $122263eab94cad08$exports,
|
|
13477
|
+
"params_input": $7f7fff78376549af$exports,
|
|
13394
13478
|
"tooltip": $2ef98910f916db6b$exports
|
|
13395
13479
|
};
|
|
13396
13480
|
|
|
@@ -13421,13 +13505,14 @@ const $d73574cc5e9b9e72$var$prefix = window.APP_NAME;
|
|
|
13421
13505
|
// Components
|
|
13422
13506
|
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
|
|
13423
13507
|
[
|
|
13424
|
-
$
|
|
13425
|
-
$
|
|
13426
|
-
$
|
|
13508
|
+
$205fb3dd9870d001$exports,
|
|
13509
|
+
$c43230a66e7bc31a$exports,
|
|
13510
|
+
$6c10158820e535ef$exports
|
|
13427
13511
|
].forEach((scripts)=>{
|
|
13428
|
-
const
|
|
13429
|
-
Object.keys(
|
|
13430
|
-
|
|
13512
|
+
const components = (0, $5439cede634b2921$export$4e811121b221213b)(scripts);
|
|
13513
|
+
Object.keys(components).forEach((name)=>{
|
|
13514
|
+
console.log(name);
|
|
13515
|
+
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data(`${name}Component`, components[name]);
|
|
13431
13516
|
});
|
|
13432
13517
|
});
|
|
13433
13518
|
// Init
|