unpoly-rails 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43b79641405aecb5cb963c79da11e06e50430fd5407d3064a99eda48d14de5f6
4
- data.tar.gz: 4526d0f032d8d81c5c9d46711f9b0ee0151e59b2b6243b9ce0f8d1314a924921
3
+ metadata.gz: f73e8736c31bc9b8dd4c7d575d2a3a9b7b295dd0198204f01ce8f7d5889a3910
4
+ data.tar.gz: 80ce8d19ef2ab72192e65550c94ff5cd6ced43226a8de2b65e8227724e692926
5
5
  SHA512:
6
- metadata.gz: 404ccffc25c6e6f126cc4115495d386c38a185f0995406dfcebb457339cc6cecf3209f53c93d5afff3597def340c86ba48a72fb57c0d1e2ec2ab49c61ca112d4
7
- data.tar.gz: 872e62f9a0bcbcde67eec1d2d42ccb6d4655099a7fccb8485074a8cbe968bbe30332cd38cfd3516b1fe3a5a5e34d9b9c670871573f9c8f2de73035ee0fa8ef8b
6
+ metadata.gz: dcca4fcd163de76a334441b9434f736d916696ea593b5af9c8c3e9f9a47808c39717f71ecde3bfabc8de567423a946c6adbd4494de9157e54047e7b54932a19c
7
+ data.tar.gz: 3fd5f854514d18654951e4c7244047997412d70f483e98a31915486240287983a33b997c84c7f9f8ec7731c0fbf51498c93a62909a0555d6d58b509752df39a7
@@ -50,17 +50,33 @@ up.migrate = (function () {
50
50
  }
51
51
  });
52
52
  }
53
- function renamedAttribute(oldAttr, newAttr, { scope, mapValue } = {}) {
53
+ function transformAttribute(oldAttr, ...args) {
54
+ let transformer = u.extractCallback(args);
55
+ let { scope } = u.extractOptions(args);
54
56
  let selector = scope || `[${oldAttr}]`;
55
57
  up.macro(selector, { priority: -1000 }, function (element) {
56
58
  if (element.hasAttribute(oldAttr)) {
57
- warn('Attribute [%s] has been renamed to [%s] (found in %o)', oldAttr, newAttr, element);
58
59
  let value = element.getAttribute(oldAttr);
59
- if (mapValue) {
60
- value = mapValue(value);
61
- }
62
- element.setAttribute(newAttr, value);
63
- element.removeAttribute(oldAttr);
60
+ transformer(element, value);
61
+ }
62
+ });
63
+ }
64
+ function renamedAttribute(oldAttr, newAttr, { scope, mapValue } = {}) {
65
+ transformAttribute(oldAttr, { scope }, function (element, value) {
66
+ warn('Attribute [%s] has been renamed to [%s] (found in %o)', oldAttr, newAttr, element);
67
+ if (mapValue) {
68
+ value = u.evalOption(mapValue, value);
69
+ }
70
+ element.setAttribute(newAttr, value);
71
+ });
72
+ }
73
+ function removedAttribute(oldAttr, { scope, replacement } = {}) {
74
+ transformAttribute(oldAttr, { scope }, function (element, _value) {
75
+ if (replacement) {
76
+ warn('Attribute [%s] has been removed (found in %o). Use %s instead.', oldAttr, element, replacement);
77
+ }
78
+ else {
79
+ warn('Attribute [%s] has been removed without replacement (found in %o)', oldAttr, element);
64
80
  }
65
81
  });
66
82
  }
@@ -138,7 +154,9 @@ up.migrate = (function () {
138
154
  renamedProperty,
139
155
  removedProperty,
140
156
  forbiddenPropertyValue,
157
+ transformAttribute,
141
158
  renamedAttribute,
159
+ removedAttribute,
142
160
  formerlyAsync,
143
161
  renamedEvent,
144
162
  removedEvent,
@@ -264,6 +282,7 @@ up.element.all = function (...args) {
264
282
  return root.querySelectorAll(selector);
265
283
  };
266
284
  up.element.toggleClass = function (element, klass, newPresent) {
285
+ up.migrate.deprecated('up.element.toggleClass()', 'element.classList.toggle()');
267
286
  const list = element.classList;
268
287
  if (newPresent == null) {
269
288
  newPresent = !list.contains(klass);
@@ -300,6 +319,7 @@ up.event.nobodyPrevents = function (...args) {
300
319
  return !event.defaultPrevented;
301
320
  };
302
321
  up.$on = function (...definitionArgs) {
322
+ up.migrate.warn('up.$on() has been deprecated. Instead use up.on() with a callback that wraps the given native element in a jQuery collection.');
303
323
  let callback = definitionArgs.pop();
304
324
  callback.upNativeCallback = function (event, element, data) {
305
325
  let $element = jQuery(element);
@@ -308,6 +328,7 @@ up.$on = function (...definitionArgs) {
308
328
  return up.on(...definitionArgs, callback.upNativeCallback);
309
329
  };
310
330
  up.$off = function (...definitionArgs) {
331
+ up.migrate.deprecated('up.$off()', 'up.off()');
311
332
  let $callback = definitionArgs.pop();
312
333
  let nativeCallback = $callback.upNativeCallback;
313
334
  if (!nativeCallback) {
@@ -349,6 +370,7 @@ up.migrate.targetMacro = function (queryAttr, fixedResultAttrs, callback) {
349
370
  });
350
371
  };
351
372
  up.$compiler = function (...definitionArgs) {
373
+ up.migrate.warn('up.$compiler() has been deprecated. Instead use up.compiler() with a callback that wraps the given native element in a jQuery collection.');
352
374
  let $fn = definitionArgs.pop();
353
375
  return up.compiler(...definitionArgs, function (element, ...fnArgs) {
354
376
  let $element = jQuery(element);
@@ -356,6 +378,7 @@ up.$compiler = function (...definitionArgs) {
356
378
  });
357
379
  };
358
380
  up.$macro = function (...definitionArgs) {
381
+ up.migrate.warn('up.$macro() has been deprecated. Instead use up.macro() with a callback that wraps the given native element in a jQuery collection.');
359
382
  let $fn = definitionArgs.pop();
360
383
  return up.macro(...definitionArgs, function (element, ...fnArgs) {
361
384
  let $element = jQuery(element);
@@ -374,7 +397,7 @@ up.migrate.renamedProperty(up.form.config, 'validateTargets', 'groupSelectors');
374
397
  up.migrate.renamedProperty(up.form.config, 'observeDelay', 'watchInputDelay');
375
398
  up.migrate.migratedFormGroupSelectors = function () {
376
399
  return up.form.config.groupSelectors.map((originalSelector) => {
377
- let migratedSelector = originalSelector.replace(/:has\(:origin\)$/, '');
400
+ let migratedSelector = originalSelector.replace(/:has\((:origin|&)\)$/, '');
378
401
  if (originalSelector !== migratedSelector) {
379
402
  up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".', originalSelector);
380
403
  }
@@ -385,7 +408,6 @@ up.migrate.renamedAttribute('up-observe', 'up-watch');
385
408
  up.migrate.renamedAttribute('up-fieldset', 'up-form-group');
386
409
  up.migrate.renamedAttribute('up-delay', 'up-watch-delay', { scope: '[up-autosubmit]' });
387
410
  up.migrate.renamedAttribute('up-delay', 'up-watch-delay', { scope: '[up-watch]' });
388
- up.migrate.renamedAttribute('up-restore-scroll', 'up-scroll', { mapValue: (value) => (value === 'true' ? 'restore' : 'reset') });
389
411
  up.observe = function (...args) {
390
412
  up.migrate.deprecated('up.observe()', 'up.watch()');
391
413
  if (up.util.isList(args[0]) && args[0].length > 1) {
@@ -451,7 +473,7 @@ up.migrate.preprocessRenderOptions = function (options) {
451
473
  }
452
474
  else if (solo === false) {
453
475
  up.migrate.deprecated('Option { solo: false }', "{ abort: false }");
454
- up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo=false] or { solo: false } may no longer be necessary.');
476
+ up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting { solo: false } may no longer be necessary.');
455
477
  options.abort = false;
456
478
  }
457
479
  up.migrate.fixKey(options, 'keep', 'useKeep');
@@ -469,14 +491,22 @@ up.migrate.preprocessRenderOptions = function (options) {
469
491
  up.migrate.deprecated('Option { reveal: false }', "{ scroll: false }");
470
492
  options.scroll = false;
471
493
  }
472
- if (u.isDefined(options.resetScroll)) {
494
+ if (options.resetScroll === true) {
473
495
  up.migrate.deprecated('Option { resetScroll: true }', "{ scroll: 'reset' }");
474
- options.scroll = 'teset';
496
+ options.scroll = 'reset';
497
+ }
498
+ if (options.resetScroll === false) {
499
+ up.migrate.deprecated('Option { resetScroll: false }', "{ scroll: false }");
500
+ options.scroll = false;
475
501
  }
476
- if (u.isDefined(options.restoreScroll)) {
502
+ if (options.restoreScroll === true) {
477
503
  up.migrate.deprecated('Option { restoreScroll: true }', "{ scroll: 'restore' }");
478
504
  options.scroll = 'restore';
479
505
  }
506
+ if (options.restoreScroll === false) {
507
+ up.migrate.deprecated('Option { restoreScroll: false }', "{ scroll: false }");
508
+ options.scroll = false;
509
+ }
480
510
  };
481
511
  up.migrate.postprocessReloadOptions = function (options) {
482
512
  var _a;
@@ -571,18 +601,82 @@ up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
571
601
  /* 12 */
572
602
  /***/ (() => {
573
603
 
574
- up.migrate.parseFollowOptions = function (parser) {
575
- parser.string('flavor');
576
- parser.string('width');
577
- parser.string('height');
578
- parser.boolean('closable');
579
- parser.booleanOrString('solo');
580
- parser.booleanOrString('reveal');
581
- parser.boolean('resetScroll');
582
- parser.boolean('restoreScroll');
583
- parser.booleanOrString('historyVisible');
584
- parser.booleanOrString('clearCache');
585
- };
604
+ up.migrate.renamedAttribute('up-flavor', 'up-mode', { scope: up.link.followSelector });
605
+ up.migrate.renamedAttribute('up-closable', 'up-dismissable', { scope: up.link.followSelector });
606
+ up.migrate.removedAttribute('up-width', { scope: up.link.followSelector, replacement: '[up-size] or [up-class]' });
607
+ up.migrate.removedAttribute('up-height', { scope: up.link.followSelector, replacement: '[up-size] or [up-class]' });
608
+ up.migrate.renamedAttribute('up-history-visible', 'up-history', { scope: up.link.followSelector });
609
+ up.migrate.renamedAttribute('up-clear-cache', 'up-expire-cache', { scope: up.link.followSelector });
610
+ up.migrate.transformAttribute('up-solo', function (link, solo) {
611
+ switch (solo) {
612
+ case '':
613
+ up.migrate.warn('Attribute [up-solo] has been replaced with [up-abort="all"]');
614
+ link.setAttribute('up-abort', 'all');
615
+ break;
616
+ case 'true':
617
+ up.migrate.warn('Attribute [up-solo="true"] has been replaced with [up-abort="all"]');
618
+ link.setAttribute('up-abort', 'all');
619
+ break;
620
+ case 'false':
621
+ up.migrate.warn('Attribute [up-solo="false"] has been replaced with [up-abort="false"]');
622
+ up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo="false"] may no longer be necessary.');
623
+ link.setAttribute('up-abort', 'false');
624
+ break;
625
+ default:
626
+ up.migrate.warn('Attribute [up-solo] has been renamed to [up-abort] and [up-abort] no longer accepts a URL pattern. Check if you can use [up-abort="target"] instead.');
627
+ link.setAttribute('up-abort', 'target');
628
+ }
629
+ });
630
+ up.migrate.transformAttribute('up-reveal', function (link, reveal) {
631
+ switch (reveal) {
632
+ case '':
633
+ up.migrate.warn('Attribute [up-reveal] has been replaced with [up-scroll="target"]');
634
+ link.setAttribute('up-scroll', 'target');
635
+ break;
636
+ case 'true':
637
+ up.migrate.warn('Attribute [up-reveal="true"] has been replaced with [up-scroll="target"]');
638
+ link.setAttribute('up-scroll', 'target');
639
+ break;
640
+ case 'false':
641
+ up.migrate.warn('Attribute [up-reveal="false"] has been replaced with [up-scroll="false"]');
642
+ link.setAttribute('up-scroll', 'false');
643
+ break;
644
+ default:
645
+ up.migrate.warn('Attribute [up-reveal="%s"] has been replaced with [up-scroll="%s"]', reveal);
646
+ }
647
+ });
648
+ up.migrate.transformAttribute('up-reset-scroll', function (link, resetScroll) {
649
+ switch (resetScroll) {
650
+ case '':
651
+ up.migrate.warn('Attribute [up-reset-scroll] has been replaced with [up-scroll="reset"]');
652
+ link.setAttribute('up-scroll', 'reset');
653
+ break;
654
+ case 'true':
655
+ up.migrate.warn('Attribute [up-reset-scroll="true"] has been replaced with [up-scroll="reset"]');
656
+ link.setAttribute('up-scroll', 'reset');
657
+ break;
658
+ case 'false':
659
+ up.migrate.warn('Attribute [up-reset-scroll="false"] has been replaced with [up-scroll="false"]');
660
+ link.setAttribute('up-scroll', 'false');
661
+ break;
662
+ }
663
+ });
664
+ up.migrate.transformAttribute('up-restore-scroll', function (link, restoreScroll) {
665
+ switch (restoreScroll) {
666
+ case '':
667
+ up.migrate.warn('Attribute [up-restore-scroll] has been replaced with [up-scroll="restore"]');
668
+ link.setAttribute('up-scroll', 'restore');
669
+ break;
670
+ case 'true':
671
+ up.migrate.warn('Attribute [up-restore-scroll="true"] has been replaced with [up-scroll="restore"]');
672
+ link.setAttribute('up-scroll', 'restore');
673
+ break;
674
+ case 'false':
675
+ up.migrate.warn('Attribute [up-restore-scroll="false"] has been replaced with [up-scroll="false"]');
676
+ link.setAttribute('up-scroll', 'false');
677
+ break;
678
+ }
679
+ });
586
680
  up.migrate.targetMacro('up-dash', { 'up-preload': '', 'up-instant': '' }, () => up.migrate.deprecated('a[up-dash]', 'up.link.config.instantSelectors and up.link.config.preloadSelectors'));
587
681
  up.migrate.renamedAttribute('up-delay', 'up-preload-delay', { scope: up.link.preloadSelector });
588
682
 
@@ -905,6 +999,7 @@ up.viewport.closest = function (...args) {
905
999
  return up.viewport.get(...args);
906
1000
  };
907
1001
  up.viewport.scroll = function (viewport, top, options = {}) {
1002
+ up.migrate.deprecated('up.scroll()', 'Element#scrollTo()');
908
1003
  viewport = up.fragment.get(viewport, options);
909
1004
  viewport.scrollTo(Object.assign(Object.assign({}, options), { top }));
910
1005
  return up.migrate.formerlyAsync('up.scroll()');
@@ -1 +1 @@
1
- (()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){const a=e.classList;return null==r&&(r=!a.contains(t)),r?a.add(t):a.remove(t)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented},up.$on=function(...e){let t=e.pop();return t.upNativeCallback=function(e,r,a){let p=jQuery(r);t.call(p,e,p,a)},up.on(...e,t.upNativeCallback)},up.$off=function(...e){let t=e.pop().upNativeCallback;return t||up.fail("The callback passed to up.$off() was never registered with up.$on()"),up.off(...e,t)}},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let t=e.replace(/:has\(:origin\)$/,"");return e!==t&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),t}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.migrate.renamedAttribute("up-restore-scroll","up-scroll",{mapValue:e=>"true"===e?"restore":"reset"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo=false] or { solo: false } may no longer be necessary."),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),e.isDefined(t.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="teset"),e.isDefined(t.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore")},up.migrate.postprocessReloadOptions=function(e){var t;let r,a=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=a?Math.floor(.001*new Date(a)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r},up.migrate.resolveOrigin=function(e,{origin:t}={}){return e.replace(/"[^"]*"|'[^']*'|&|:origin\b/g,(function(r){return":origin"!==r&&"&"!==r?r:("&"===r&&up.migrate.deprecated("Origin shorthand '&'",":origin"),t?up.fragment.toTarget(t):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',r,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let t=up.fragment.config.runScripts,r=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>t,set(e){t=e,r=!0}}),up.on("up:framework:boot",(function(){r||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.setAttribute("up-keep",""))}))},234:()=>{up.migrate.renamedEvent("up:app:booted","up:framework:booted")},869:()=>{up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed")},905:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } has been removed. Use { size } or { class } instead.`);e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn(`Option { layer: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:()=>{up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("solo"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible"),e.booleanOrString("clearCache")},up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"}))),r={},a={};function p(e){let t=r[e];if(t)return n(`Event ${e} has been renamed to ${t}`),t;if(e in a){let t=`Event ${e} has been removed`,r=a[e];return r&&(t+=`. Use ${r} instead.`),n(t),e}return e}const u={};function n(r,...a){const p=e.sprintf(r,...a);u[p]||(u[p]=!0,up.log[t.logLevel]("unpoly-migrate",r,...a))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){n(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(n(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(t,r,a,p){const u=e.memoize((()=>p?n(p):n("Property { %s } has been renamed to { %s } (found in %o)",r,a,t)));Object.defineProperty(t,r,{get(){return u(),this[a]},set(e){u(),this[a]=e}})},removedProperty:function(t,r,a){const p=e.memoize((()=>a?n(a):n("Property { %s } has been removed without replacement (found in %o)",r,t)));let u=t[r];Object.defineProperty(t,r,{get:()=>(p(),u),set(e){p(),u=e}})},forbiddenPropertyValue:function(e,t,r,a){let p=e[t];Object.defineProperty(e,t,{get:()=>p,set(e){if(e===r)throw new Error(a);p=e}})},renamedAttribute:function(e,t,{scope:r,mapValue:a}={}){let p=r||`[${e}]`;up.macro(p,{priority:-1e3},(function(r){if(r.hasAttribute(e)){n("Attribute [%s] has been renamed to [%s] (found in %o)",e,t,r);let p=r.getAttribute(e);a&&(p=a(p)),r.setAttribute(t,p),r.removeAttribute(e)}}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return n(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){r[e]=t},removedEvent:function(e,t=null){a[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,p))},fixKey:function(t,r,a){e.isDefined(t[r])&&(n("Property { %s } has been renamed to { %s } (found in %o)",r,a,t),e.renameKey(t,r,a))},warn:n,loaded:!0,config:t}}()},413:()=>{const e=new Error("up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.");up.modal={visit:(e,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge",'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.'),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.forbiddenPropertyValue(up.network.config,"cacheSize",0,"Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable automatic caching during navigation, set up.fragment.config.navigateOptions.cache = false instead."),up.network.config.requestMetaKeys=[],up.migrate.removedProperty(up.network.config,"requestMetaKeys","The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header."),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.migrate.renamedProperty(up.Request.prototype,"preload","background"),up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.getHeader=function(e){return up.migrate.deprecated("up.Response#getHeader()","up.Response#header()"),this.header(e)},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const r=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):r}}a(),up.on("up:framework:reset",a)},69:()=>{up.popup={attach:(e,t={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},t),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync())},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t},up.migrate.titleFromXHR=function(e){let t=e.getResponseHeader("X-Up-Title");if(t){if("false"===t)return!1;if('"'!==t[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),t}}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let a;if(a=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(a)?a:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,a,p){up.macro(`[${r}]`,(function(u){let n;const o=e.copy(a);(n=u.getAttribute(r))?o["up-target"]=n:o["up-follow"]="",t.setMissingAttrs(u,o),u.removeAttribute(r),null==p||p()}))},up.$compiler=function(...e){let t=e.pop();return up.compiler(...e,(function(e,...r){let a=jQuery(e);return t(a,...r)}))},up.$macro=function(...e){let t=e.pop();return up.macro(...e,(function(e,...r){let a=jQuery(e);return t(a,...r)}))}},197:()=>{up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:()=>{up.util.only=function(e,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,t,r={}){return(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(a){var p=t[a];if(void 0!==p)return p.exports;var u=t[a]={exports:{}};return e[a](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(234),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(338),up.framework.stopExtension()})();
1
+ (()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){up.migrate.deprecated("up.element.toggleClass()","element.classList.toggle()");const a=e.classList;return null==r&&(r=!a.contains(t)),r?a.add(t):a.remove(t)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented},up.$on=function(...e){up.migrate.warn("up.$on() has been deprecated. Instead use up.on() with a callback that wraps the given native element in a jQuery collection.");let t=e.pop();return t.upNativeCallback=function(e,r,a){let p=jQuery(r);t.call(p,e,p,a)},up.on(...e,t.upNativeCallback)},up.$off=function(...e){up.migrate.deprecated("up.$off()","up.off()");let t=e.pop().upNativeCallback;return t||up.fail("The callback passed to up.$off() was never registered with up.$on()"),up.off(...e,t)}},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let t=e.replace(/:has\((:origin|&)\)$/,"");return e!==t&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),t}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting { solo: false } may no longer be necessary."),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),!0===t.resetScroll&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="reset"),!1===t.resetScroll&&(up.migrate.deprecated("Option { resetScroll: false }","{ scroll: false }"),t.scroll=!1),!0===t.restoreScroll&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore"),!1===t.restoreScroll&&(up.migrate.deprecated("Option { restoreScroll: false }","{ scroll: false }"),t.scroll=!1)},up.migrate.postprocessReloadOptions=function(e){var t;let r,a=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=a?Math.floor(.001*new Date(a)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r},up.migrate.resolveOrigin=function(e,{origin:t}={}){return e.replace(/"[^"]*"|'[^']*'|&|:origin\b/g,(function(r){return":origin"!==r&&"&"!==r?r:("&"===r&&up.migrate.deprecated("Origin shorthand '&'",":origin"),t?up.fragment.toTarget(t):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',r,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let t=up.fragment.config.runScripts,r=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>t,set(e){t=e,r=!0}}),up.on("up:framework:boot",(function(){r||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.setAttribute("up-keep",""))}))},234:()=>{up.migrate.renamedEvent("up:app:booted","up:framework:booted")},869:()=>{up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed")},905:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } has been removed. Use { size } or { class } instead.`);e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn(`Option { layer: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:()=>{up.migrate.renamedAttribute("up-flavor","up-mode",{scope:up.link.followSelector}),up.migrate.renamedAttribute("up-closable","up-dismissable",{scope:up.link.followSelector}),up.migrate.removedAttribute("up-width",{scope:up.link.followSelector,replacement:"[up-size] or [up-class]"}),up.migrate.removedAttribute("up-height",{scope:up.link.followSelector,replacement:"[up-size] or [up-class]"}),up.migrate.renamedAttribute("up-history-visible","up-history",{scope:up.link.followSelector}),up.migrate.renamedAttribute("up-clear-cache","up-expire-cache",{scope:up.link.followSelector}),up.migrate.transformAttribute("up-solo",(function(e,t){switch(t){case"":up.migrate.warn('Attribute [up-solo] has been replaced with [up-abort="all"]'),e.setAttribute("up-abort","all");break;case"true":up.migrate.warn('Attribute [up-solo="true"] has been replaced with [up-abort="all"]'),e.setAttribute("up-abort","all");break;case"false":up.migrate.warn('Attribute [up-solo="false"] has been replaced with [up-abort="false"]'),up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo="false"] may no longer be necessary.'),e.setAttribute("up-abort","false");break;default:up.migrate.warn('Attribute [up-solo] has been renamed to [up-abort] and [up-abort] no longer accepts a URL pattern. Check if you can use [up-abort="target"] instead.'),e.setAttribute("up-abort","target")}})),up.migrate.transformAttribute("up-reveal",(function(e,t){switch(t){case"":up.migrate.warn('Attribute [up-reveal] has been replaced with [up-scroll="target"]'),e.setAttribute("up-scroll","target");break;case"true":up.migrate.warn('Attribute [up-reveal="true"] has been replaced with [up-scroll="target"]'),e.setAttribute("up-scroll","target");break;case"false":up.migrate.warn('Attribute [up-reveal="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false");break;default:up.migrate.warn('Attribute [up-reveal="%s"] has been replaced with [up-scroll="%s"]',t)}})),up.migrate.transformAttribute("up-reset-scroll",(function(e,t){switch(t){case"":up.migrate.warn('Attribute [up-reset-scroll] has been replaced with [up-scroll="reset"]'),e.setAttribute("up-scroll","reset");break;case"true":up.migrate.warn('Attribute [up-reset-scroll="true"] has been replaced with [up-scroll="reset"]'),e.setAttribute("up-scroll","reset");break;case"false":up.migrate.warn('Attribute [up-reset-scroll="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false")}})),up.migrate.transformAttribute("up-restore-scroll",(function(e,t){switch(t){case"":up.migrate.warn('Attribute [up-restore-scroll] has been replaced with [up-scroll="restore"]'),e.setAttribute("up-scroll","restore");break;case"true":up.migrate.warn('Attribute [up-restore-scroll="true"] has been replaced with [up-scroll="restore"]'),e.setAttribute("up-scroll","restore");break;case"false":up.migrate.warn('Attribute [up-restore-scroll="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false")}})),up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"})));function r(t,...r){let a=e.extractCallback(r),{scope:p}=e.extractOptions(r),u=p||`[${t}]`;up.macro(u,{priority:-1e3},(function(e){if(e.hasAttribute(t)){let r=e.getAttribute(t);a(e,r)}}))}const a={},p={};function u(e){let t=a[e];if(t)return n(`Event ${e} has been renamed to ${t}`),t;if(e in p){let t=`Event ${e} has been removed`,r=p[e];return r&&(t+=`. Use ${r} instead.`),n(t),e}return e}const o={};function n(r,...a){const p=e.sprintf(r,...a);o[p]||(o[p]=!0,up.log[t.logLevel]("unpoly-migrate",r,...a))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){n(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(n(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(t,r,a,p){const u=e.memoize((()=>p?n(p):n("Property { %s } has been renamed to { %s } (found in %o)",r,a,t)));Object.defineProperty(t,r,{get(){return u(),this[a]},set(e){u(),this[a]=e}})},removedProperty:function(t,r,a){const p=e.memoize((()=>a?n(a):n("Property { %s } has been removed without replacement (found in %o)",r,t)));let u=t[r];Object.defineProperty(t,r,{get:()=>(p(),u),set(e){p(),u=e}})},forbiddenPropertyValue:function(e,t,r,a){let p=e[t];Object.defineProperty(e,t,{get:()=>p,set(e){if(e===r)throw new Error(a);p=e}})},transformAttribute:r,renamedAttribute:function(t,a,{scope:p,mapValue:u}={}){r(t,{scope:p},(function(r,p){n("Attribute [%s] has been renamed to [%s] (found in %o)",t,a,r),u&&(p=e.evalOption(u,p)),r.setAttribute(a,p)}))},removedAttribute:function(e,{scope:t,replacement:a}={}){r(e,{scope:t},(function(t,r){a?n("Attribute [%s] has been removed (found in %o). Use %s instead.",e,t,a):n("Attribute [%s] has been removed without replacement (found in %o)",e,t)}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return n(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){a[e]=t},removedEvent:function(e,t=null){p[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,u))},fixKey:function(t,r,a){e.isDefined(t[r])&&(n("Property { %s } has been renamed to { %s } (found in %o)",r,a,t),e.renameKey(t,r,a))},warn:n,loaded:!0,config:t}}()},413:()=>{const e=new Error("up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.");up.modal={visit:(e,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge",'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.'),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.forbiddenPropertyValue(up.network.config,"cacheSize",0,"Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable automatic caching during navigation, set up.fragment.config.navigateOptions.cache = false instead."),up.network.config.requestMetaKeys=[],up.migrate.removedProperty(up.network.config,"requestMetaKeys","The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header."),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.migrate.renamedProperty(up.Request.prototype,"preload","background"),up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.getHeader=function(e){return up.migrate.deprecated("up.Response#getHeader()","up.Response#header()"),this.header(e)},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const r=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):r}}a(),up.on("up:framework:reset",a)},69:()=>{up.popup={attach:(e,t={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},t),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync())},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t},up.migrate.titleFromXHR=function(e){let t=e.getResponseHeader("X-Up-Title");if(t){if("false"===t)return!1;if('"'!==t[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),t}}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let a;if(a=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(a)?a:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,a,p){up.macro(`[${r}]`,(function(u){let o;const n=e.copy(a);(o=u.getAttribute(r))?n["up-target"]=o:n["up-follow"]="",t.setMissingAttrs(u,n),u.removeAttribute(r),null==p||p()}))},up.$compiler=function(...e){up.migrate.warn("up.$compiler() has been deprecated. Instead use up.compiler() with a callback that wraps the given native element in a jQuery collection.");let t=e.pop();return up.compiler(...e,(function(e,...r){let a=jQuery(e);return t(a,...r)}))},up.$macro=function(...e){up.migrate.warn("up.$macro() has been deprecated. Instead use up.macro() with a callback that wraps the given native element in a jQuery collection.");let t=e.pop();return up.macro(...e,(function(e,...r){let a=jQuery(e);return t(a,...r)}))}},197:()=>{up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:()=>{up.util.only=function(e,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,t,r={}){return up.migrate.deprecated("up.scroll()","Element#scrollTo()"),(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(a){var p=t[a];if(void 0!==p)return p.exports;var u=t[a]={exports:{}};return e[a](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(234),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(338),up.framework.stopExtension()})();
@@ -5,7 +5,7 @@
5
5
  /***/ (() => {
6
6
 
7
7
  window.up = {
8
- version: '3.1.0'
8
+ version: '3.1.1'
9
9
  };
10
10
 
11
11
 
@@ -194,6 +194,9 @@ up.util = (function () {
194
194
  function isRegExp(object) {
195
195
  return object instanceof RegExp;
196
196
  }
197
+ function isError(object) {
198
+ return object instanceof Error;
199
+ }
197
200
  function isJQuery(object) {
198
201
  return up.browser.canJQuery() && object instanceof jQuery;
199
202
  }
@@ -390,8 +393,8 @@ up.util = (function () {
390
393
  function queueMicrotask(task) {
391
394
  return Promise.resolve().then(task);
392
395
  }
393
- function last(array) {
394
- return array[array.length - 1];
396
+ function last(value) {
397
+ return value[value.length - 1];
395
398
  }
396
399
  function contains(value, subValue) {
397
400
  return value.indexOf(subValue) >= 0;
@@ -616,14 +619,20 @@ up.util = (function () {
616
619
  });
617
620
  }
618
621
  }
619
- function stringifyArg(arg) {
622
+ function stringifyArg(arg, placeholder = '%o') {
620
623
  let string;
621
624
  const maxLength = 200;
622
- let closer = '';
625
+ if (placeholder === '%c') {
626
+ return '';
627
+ }
628
+ if (placeholder === '%s' && isGiven(arg)) {
629
+ arg = arg.toString();
630
+ }
623
631
  if (isString(arg)) {
624
- string = arg.replace(/[\n\r\t ]+/g, ' ');
625
- string = string.replace(/^[\n\r\t ]+/, '');
626
- string = string.replace(/[\n\r\t ]$/, '');
632
+ string = arg.trim().replace(/[\n\r\t ]+/g, ' ');
633
+ if (placeholder === '%o') {
634
+ string = JSON.stringify(string);
635
+ }
627
636
  }
628
637
  else if (isUndefined(arg)) {
629
638
  string = 'undefined';
@@ -633,24 +642,21 @@ up.util = (function () {
633
642
  }
634
643
  else if (isArray(arg)) {
635
644
  string = `[${map(arg, stringifyArg).join(', ')}]`;
636
- closer = ']';
637
645
  }
638
646
  else if (isJQuery(arg)) {
639
647
  string = `$(${map(arg, stringifyArg).join(', ')})`;
640
- closer = ')';
641
648
  }
642
649
  else if (isElement(arg)) {
643
650
  string = `<${arg.tagName.toLowerCase()}`;
644
- for (let attr of ['id', 'name', 'class']) {
651
+ for (let attr of ['id', 'up-id', 'name', 'class']) {
645
652
  let value = arg.getAttribute(attr);
646
653
  if (value) {
647
654
  string += ` ${attr}="${value}"`;
648
655
  }
649
656
  }
650
657
  string += ">";
651
- closer = '>';
652
658
  }
653
- else if (isRegExp(arg)) {
659
+ else if (isRegExp(arg) || isError(arg)) {
654
660
  string = arg.toString();
655
661
  }
656
662
  else {
@@ -667,14 +673,13 @@ up.util = (function () {
667
673
  }
668
674
  }
669
675
  if (string.length > maxLength) {
670
- string = `${string.substr(0, maxLength)} …`;
671
- string += closer;
676
+ string = `${string.substr(0, maxLength)}…${last(string)}`;
672
677
  }
673
678
  return string;
674
679
  }
675
- const SPRINTF_PLACEHOLDERS = /%[oOdisf]/g;
680
+ const SPRINTF_PLACEHOLDERS = /%[oOdisfc]/g;
676
681
  function sprintf(message, ...args) {
677
- return message.replace(SPRINTF_PLACEHOLDERS, () => stringifyArg(args.shift()));
682
+ return message.replace(SPRINTF_PLACEHOLDERS, (placeholder) => stringifyArg(args.shift(), placeholder));
678
683
  }
679
684
  function negate(fn) {
680
685
  return function (...args) {
@@ -4724,13 +4729,13 @@ up.Layer.OverlayWithViewport = (_a = class OverlayWithViewport extends up.Layer.
4724
4729
  var _a;
4725
4730
  const e = up.element;
4726
4731
  up.Layer.Root = (_a = class Root extends up.Layer {
4727
- get element() {
4728
- return e.root;
4729
- }
4730
4732
  constructor(options) {
4731
4733
  super(options);
4732
4734
  this.setupHandlers();
4733
4735
  }
4736
+ get element() {
4737
+ return e.root;
4738
+ }
4734
4739
  getFirstSwappableElement() {
4735
4740
  return document.body;
4736
4741
  }
@@ -5890,6 +5895,27 @@ up.RenderResult = class RenderResult extends up.Record {
5890
5895
  var _a;
5891
5896
  const u = up.util;
5892
5897
  up.Request = (_a = class Request extends up.Record {
5898
+ constructor(options) {
5899
+ var _a;
5900
+ super(options);
5901
+ this.params = new up.Params(this.params);
5902
+ if (this.wrapMethod == null) {
5903
+ this.wrapMethod = up.network.config.wrapMethod;
5904
+ }
5905
+ this.normalize();
5906
+ if ((this.target || this.layer || this.origin) && !options.basic) {
5907
+ const layerLookupOptions = { origin: this.origin };
5908
+ this.layer = up.layer.get(this.layer, layerLookupOptions);
5909
+ this.failLayer = up.layer.get(this.failLayer || this.layer, layerLookupOptions);
5910
+ this.context || (this.context = this.layer.context || {});
5911
+ this.failContext || (this.failContext = this.failLayer.context || {});
5912
+ this.mode || (this.mode = this.layer.mode);
5913
+ this.failMode || (this.failMode = this.failLayer.mode);
5914
+ }
5915
+ this.deferred = u.newDeferred();
5916
+ (_a = this.badResponseTime) !== null && _a !== void 0 ? _a : (this.badResponseTime = u.evalOption(up.network.config.badResponseTime, this));
5917
+ this.addAutoHeaders();
5918
+ }
5893
5919
  keys() {
5894
5920
  return [
5895
5921
  'method',
@@ -5932,27 +5958,6 @@ up.Request = (_a = class Request extends up.Record {
5932
5958
  builtAt: new Date(),
5933
5959
  };
5934
5960
  }
5935
- constructor(options) {
5936
- var _a;
5937
- super(options);
5938
- this.params = new up.Params(this.params);
5939
- if (this.wrapMethod == null) {
5940
- this.wrapMethod = up.network.config.wrapMethod;
5941
- }
5942
- this.normalize();
5943
- if ((this.target || this.layer || this.origin) && !options.basic) {
5944
- const layerLookupOptions = { origin: this.origin };
5945
- this.layer = up.layer.get(this.layer, layerLookupOptions);
5946
- this.failLayer = up.layer.get(this.failLayer || this.layer, layerLookupOptions);
5947
- this.context || (this.context = this.layer.context || {});
5948
- this.failContext || (this.failContext = this.failLayer.context || {});
5949
- this.mode || (this.mode = this.layer.mode);
5950
- this.failMode || (this.failMode = this.failLayer.mode);
5951
- }
5952
- this.deferred = u.newDeferred();
5953
- (_a = this.badResponseTime) !== null && _a !== void 0 ? _a : (this.badResponseTime = u.evalOption(up.network.config.badResponseTime, this));
5954
- this.addAutoHeaders();
5955
- }
5956
5961
  get xhr() {
5957
5962
  var _a;
5958
5963
  return (_a = this._xhr) !== null && _a !== void 0 ? _a : (this._xhr = new XMLHttpRequest());
@@ -7428,6 +7433,7 @@ up.protocol = (function () {
7428
7433
  /***/ (() => {
7429
7434
 
7430
7435
  up.log = (function () {
7436
+ const u = up.util;
7431
7437
  const config = new up.LogConfig();
7432
7438
  function reset() {
7433
7439
  config.reset();
@@ -7445,13 +7451,11 @@ up.log = (function () {
7445
7451
  function printToStreamStyled(stream, trace, customStyles, message, ...args) {
7446
7452
  if (message) {
7447
7453
  if (config.format) {
7448
- args.unshift('color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;' + customStyles, '');
7449
- message = `%c${trace}%c ${message}`;
7454
+ console[stream](`%c${trace}%c ${message}`, 'color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;' + customStyles, '', ...args);
7450
7455
  }
7451
7456
  else {
7452
- message = `[${trace}] ${message}`;
7457
+ console[stream](`[${trace}] ${u.sprintf(message, ...args)}`);
7453
7458
  }
7454
- console[stream](message, ...args);
7455
7459
  }
7456
7460
  }
7457
7461
  function printUserEvent(event) {
@@ -9430,7 +9434,6 @@ up.link = (function () {
9430
9434
  return options;
9431
9435
  }
9432
9436
  function followOptions(link, options, parserOptions) {
9433
- var _a, _b;
9434
9437
  link = up.fragment.get(link);
9435
9438
  options = parseRequestOptions(link, options, parserOptions);
9436
9439
  const parser = new up.OptionsParser(link, options, Object.assign({ fail: true }, parserOptions));
@@ -9485,7 +9488,6 @@ up.link = (function () {
9485
9488
  parser.booleanOrString('transition');
9486
9489
  parser.string('easing');
9487
9490
  parser.number('duration');
9488
- (_b = (_a = up.migrate).parseFollowOptions) === null || _b === void 0 ? void 0 : _b.call(_a, parser);
9489
9491
  if (!options.guardEvent) {
9490
9492
  options.guardEvent = up.event.build('up:link:follow', { log: 'Following link' });
9491
9493
  }
@@ -9628,7 +9630,8 @@ up.link = (function () {
9628
9630
  convertClicks,
9629
9631
  config,
9630
9632
  combineFollowableSelectors,
9631
- preloadSelector: fullPreloadSelector
9633
+ preloadSelector: fullPreloadSelector,
9634
+ followSelector: fullFollowSelector,
9632
9635
  };
9633
9636
  })();
9634
9637
  up.follow = up.link.follow;
@@ -10026,6 +10029,7 @@ up.form = (function () {
10026
10029
  disable: disableContainer,
10027
10030
  group: findGroup,
10028
10031
  groupSolution: findGroupSolution,
10032
+ groupSelectors: getGroupSelectors,
10029
10033
  get: getForm,
10030
10034
  };
10031
10035
  })();