unpoly-rails 0.57.0 → 0.60.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of unpoly-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +393 -1
- data/Gemfile.lock +5 -2
- data/README.md +1 -1
- data/README_RAILS.md +1 -1
- data/Rakefile +10 -1
- data/design/es6.js +32 -0
- data/design/ie11.txt +9 -0
- data/design/measure_jquery/element_list.js +41 -0
- data/design/measure_jquery/up.on_vs_addEventListener.js +56 -0
- data/design/todo_jquery.txt +13 -0
- data/dist/unpoly-bootstrap3.js +8 -8
- data/dist/unpoly-bootstrap3.min.js +1 -1
- data/dist/unpoly.css +22 -20
- data/dist/unpoly.js +6990 -5336
- data/dist/unpoly.min.css +1 -1
- data/dist/unpoly.min.js +4 -4
- data/lib/assets/javascripts/unpoly-bootstrap3/viewport-ext.coffee +5 -0
- data/lib/assets/javascripts/unpoly.coffee +8 -6
- data/lib/assets/javascripts/unpoly/browser.coffee.erb +23 -118
- data/lib/assets/javascripts/unpoly/classes/body_shifter.coffee +36 -0
- data/lib/assets/javascripts/unpoly/classes/cache.coffee +4 -4
- data/lib/assets/javascripts/unpoly/classes/compile_pass.coffee +45 -39
- data/lib/assets/javascripts/unpoly/classes/config.coffee +9 -0
- data/lib/assets/javascripts/unpoly/classes/css_transition.coffee +18 -27
- data/lib/assets/javascripts/unpoly/classes/divertible_chain.coffee +39 -0
- data/lib/assets/javascripts/unpoly/classes/event_listener.coffee +116 -0
- data/lib/assets/javascripts/unpoly/classes/extract_cascade.coffee +8 -8
- data/lib/assets/javascripts/unpoly/classes/extract_plan.coffee +19 -19
- data/lib/assets/javascripts/unpoly/classes/field_observer.coffee +54 -31
- data/lib/assets/javascripts/unpoly/classes/{focus_tracker.coffee → focus_follower.coffee} +2 -2
- data/lib/assets/javascripts/unpoly/classes/follow_variant.coffee +25 -25
- data/lib/assets/javascripts/unpoly/classes/html_parser.coffee +4 -11
- data/lib/assets/javascripts/unpoly/classes/motion_controller.coffee +157 -0
- data/lib/assets/javascripts/unpoly/classes/params.coffee.erb +525 -0
- data/lib/assets/javascripts/unpoly/classes/record.coffee +8 -2
- data/lib/assets/javascripts/unpoly/classes/rect.js +21 -0
- data/lib/assets/javascripts/unpoly/classes/request.coffee +41 -35
- data/lib/assets/javascripts/unpoly/classes/response.coffee +7 -3
- data/lib/assets/javascripts/unpoly/classes/reveal_motion.coffee +102 -0
- data/lib/assets/javascripts/unpoly/classes/scroll_motion.coffee +67 -0
- data/lib/assets/javascripts/unpoly/classes/selector.coffee +60 -0
- data/lib/assets/javascripts/unpoly/classes/tether.coffee +105 -0
- data/lib/assets/javascripts/unpoly/classes/url_set.coffee +12 -7
- data/lib/assets/javascripts/unpoly/element.coffee.erb +1126 -0
- data/lib/assets/javascripts/unpoly/event.coffee.erb +437 -0
- data/lib/assets/javascripts/unpoly/feedback.coffee +73 -94
- data/lib/assets/javascripts/unpoly/form.coffee.erb +188 -181
- data/lib/assets/javascripts/unpoly/{dom.coffee.erb → fragment.coffee.erb} +250 -283
- data/lib/assets/javascripts/unpoly/framework.coffee +67 -0
- data/lib/assets/javascripts/unpoly/history.coffee +29 -28
- data/lib/assets/javascripts/unpoly/legacy.coffee +60 -0
- data/lib/assets/javascripts/unpoly/link.coffee.erb +127 -119
- data/lib/assets/javascripts/unpoly/log.coffee +99 -19
- data/lib/assets/javascripts/unpoly/modal.coffee.erb +95 -118
- data/lib/assets/javascripts/unpoly/motion.coffee.erb +158 -138
- data/lib/assets/javascripts/unpoly/namespace.coffee.erb +0 -5
- data/lib/assets/javascripts/unpoly/popup.coffee.erb +119 -102
- data/lib/assets/javascripts/unpoly/protocol.coffee +11 -15
- data/lib/assets/javascripts/unpoly/proxy.coffee +62 -65
- data/lib/assets/javascripts/unpoly/radio.coffee +3 -5
- data/lib/assets/javascripts/unpoly/rails.coffee +8 -9
- data/lib/assets/javascripts/unpoly/syntax.coffee.erb +173 -125
- data/lib/assets/javascripts/unpoly/toast.coffee +25 -24
- data/lib/assets/javascripts/unpoly/tooltip.coffee +89 -79
- data/lib/assets/javascripts/unpoly/util.coffee.erb +579 -1074
- data/lib/assets/javascripts/unpoly/{layout.coffee.erb → viewport.coffee.erb} +334 -264
- data/lib/assets/stylesheets/unpoly/dom.sass +1 -1
- data/lib/assets/stylesheets/unpoly/layout.sass +2 -0
- data/lib/assets/stylesheets/unpoly/popup.sass +0 -1
- data/lib/assets/stylesheets/unpoly/tooltip.sass +17 -12
- data/lib/unpoly/rails/version.rb +1 -1
- data/package.json +1 -2
- data/spec_app/Gemfile +2 -1
- data/spec_app/Gemfile.lock +38 -27
- data/spec_app/app/assets/javascripts/integration_test.coffee +1 -0
- data/spec_app/app/assets/javascripts/jasmine_specs.coffee +1 -2
- data/spec_app/app/assets/stylesheets/integration_test.sass +14 -1
- data/spec_app/app/controllers/scroll_test_controller.rb +5 -0
- data/spec_app/app/views/css_test/modal.erb +6 -6
- data/spec_app/app/views/css_test/popup.erb +44 -18
- data/spec_app/app/views/css_test/tooltip.erb +23 -4
- data/spec_app/app/views/error_test/trigger.erb +1 -1
- data/spec_app/app/views/form_test/basics/new.erb +1 -3
- data/spec_app/app/views/pages/start.erb +9 -2
- data/spec_app/app/views/reveal_test/long1.erb +1 -1
- data/spec_app/app/views/reveal_test/long2.erb +1 -1
- data/spec_app/app/views/reveal_test/within_document_viewport.erb +24 -0
- data/spec_app/app/views/reveal_test/within_overflowing_div_viewport.erb +28 -0
- data/spec_app/app/views/scroll_test/long1.erb +30 -0
- data/spec_app/config/routes.rb +1 -0
- data/spec_app/spec/javascripts/helpers/agent_detector.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/async_sequence.js.coffee +1 -0
- data/spec_app/spec/javascripts/helpers/browser_switches.js.coffee +17 -5
- data/spec_app/spec/javascripts/helpers/enable_logging.js.coffee +1 -1
- data/spec_app/spec/javascripts/helpers/fixture.js.coffee +25 -0
- data/spec_app/spec/javascripts/helpers/jquery_no_conflict.js +1 -0
- data/spec_app/spec/javascripts/helpers/last_request.js.coffee +1 -0
- data/spec_app/spec/javascripts/helpers/mock_ajax.js.coffee +1 -1
- data/spec_app/spec/javascripts/helpers/parse_form_data.js.coffee +2 -2
- data/spec_app/spec/javascripts/helpers/protect_jasmine_runner.coffee +4 -1
- data/spec_app/spec/javascripts/helpers/remove_body_margin.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/reset_history.js.coffee +2 -1
- data/spec_app/spec/javascripts/helpers/reset_knife.js.coffee +2 -2
- data/spec_app/spec/javascripts/helpers/reset_up.js.coffee +18 -11
- data/spec_app/spec/javascripts/helpers/restore_body_scroll.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/show_lib_versions.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/spec_util.coffee +47 -0
- data/spec_app/spec/javascripts/helpers/to_be_around.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_array.coffee +5 -0
- data/spec_app/spec/javascripts/helpers/to_be_attached.coffee +6 -2
- data/spec_app/spec/javascripts/helpers/to_be_blank.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_detached.coffee +6 -2
- data/spec_app/spec/javascripts/helpers/to_be_element.js.coffee +8 -0
- data/spec_app/spec/javascripts/helpers/to_be_error.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_given.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_hidden.js.coffee +8 -0
- data/spec_app/spec/javascripts/helpers/to_be_missing.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_present.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_scrolled_to.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_be_visible.js.coffee +9 -0
- data/spec_app/spec/javascripts/helpers/to_contain.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_end_with.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_equal_jquery.js.coffee +1 -2
- data/spec_app/spec/javascripts/helpers/to_equal_node_list.coffee +7 -0
- data/spec_app/spec/javascripts/helpers/to_equal_via_is_equal.js.coffee +7 -0
- data/spec_app/spec/javascripts/helpers/to_have_class.js.coffee +10 -0
- data/spec_app/spec/javascripts/helpers/to_have_descendant.js.coffee +10 -0
- data/spec_app/spec/javascripts/helpers/to_have_length.js.coffee +8 -0
- data/spec_app/spec/javascripts/helpers/to_have_opacity.coffee +7 -3
- data/spec_app/spec/javascripts/helpers/to_have_own_property.js.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_have_request_method.js.coffee +1 -0
- data/spec_app/spec/javascripts/helpers/to_have_text.js.coffee +9 -0
- data/spec_app/spec/javascripts/helpers/to_have_unhandled_rejections.coffee +0 -21
- data/spec_app/spec/javascripts/helpers/to_match_list.coffee +14 -0
- data/spec_app/spec/javascripts/helpers/to_match_selector.coffee +3 -0
- data/spec_app/spec/javascripts/helpers/to_match_text.js.coffee +4 -1
- data/spec_app/spec/javascripts/helpers/to_match_url.coffee +1 -0
- data/spec_app/spec/javascripts/helpers/trigger.js.coffee +91 -7
- data/spec_app/spec/javascripts/helpers/wait_until_dom_ready.js.coffee +3 -0
- data/spec_app/spec/javascripts/up/browser_spec.js.coffee +23 -90
- data/spec_app/spec/javascripts/up/classes/cache_spec.js.coffee +3 -0
- data/spec_app/spec/javascripts/up/classes/config_spec.coffee +24 -0
- data/spec_app/spec/javascripts/up/classes/divertible_chain_spec.coffee +45 -0
- data/spec_app/spec/javascripts/up/classes/focus_tracker_spec.coffee +5 -2
- data/spec_app/spec/javascripts/up/classes/params_spec.coffee +557 -0
- data/spec_app/spec/javascripts/up/classes/request_spec.coffee +7 -4
- data/spec_app/spec/javascripts/up/classes/scroll_motion_spec.js.coffee +51 -0
- data/spec_app/spec/javascripts/up/classes/store/memory_spec.js.coffee +3 -0
- data/spec_app/spec/javascripts/up/classes/store/session_spec.js.coffee +3 -2
- data/spec_app/spec/javascripts/up/element_spec.coffee +897 -0
- data/spec_app/spec/javascripts/up/event_spec.js.coffee +496 -0
- data/spec_app/spec/javascripts/up/feedback_spec.js.coffee +69 -48
- data/spec_app/spec/javascripts/up/form_spec.js.coffee +252 -194
- data/spec_app/spec/javascripts/up/{dom_spec.js.coffee → fragment_spec.js.coffee} +381 -388
- data/spec_app/spec/javascripts/up/history_spec.js.coffee +21 -19
- data/spec_app/spec/javascripts/up/jquery_spec.js.coffee +4 -0
- data/spec_app/spec/javascripts/up/legacy_spec.js.coffee +27 -0
- data/spec_app/spec/javascripts/up/link_spec.js.coffee +163 -160
- data/spec_app/spec/javascripts/up/log_spec.js.coffee +85 -12
- data/spec_app/spec/javascripts/up/modal_spec.js.coffee +141 -123
- data/spec_app/spec/javascripts/up/motion_spec.js.coffee +117 -113
- data/spec_app/spec/javascripts/up/popup_spec.js.coffee +60 -77
- data/spec_app/spec/javascripts/up/protocol_spec.js.coffee +1 -0
- data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +85 -78
- data/spec_app/spec/javascripts/up/radio_spec.js.coffee +29 -22
- data/spec_app/spec/javascripts/up/rails_spec.js.coffee +14 -13
- data/spec_app/spec/javascripts/up/spec_spec.js.coffee +9 -0
- data/spec_app/spec/javascripts/up/syntax_spec.js.coffee +96 -66
- data/spec_app/spec/javascripts/up/toast_spec.js.coffee +37 -0
- data/spec_app/spec/javascripts/up/tooltip_spec.js.coffee +31 -47
- data/spec_app/spec/javascripts/up/util_spec.js.coffee +725 -562
- data/spec_app/spec/javascripts/up/{layout_spec.js.coffee → viewport_spec.js.coffee} +175 -149
- metadata +57 -19
- data/lib/assets/javascripts/unpoly-bootstrap3/layout-ext.coffee +0 -5
- data/lib/assets/javascripts/unpoly/bus.coffee.erb +0 -518
- data/lib/assets/javascripts/unpoly/classes/extract_step.coffee +0 -4
- data/lib/assets/javascripts/unpoly/classes/motion_tracker.coffee +0 -125
- data/lib/assets/javascripts/unpoly/params.coffee.erb +0 -522
- data/spec_app/spec/javascripts/helpers/append_fixture.js.coffee +0 -8
- data/spec_app/spec/javascripts/up/bus_spec.js.coffee +0 -210
- data/spec_app/spec/javascripts/up/namespace_spec.js.coffee +0 -9
- data/spec_app/spec/javascripts/up/params_spec.coffee +0 -768
- data/spec_app/vendor/asset-libs/jasmine-fixture-1.3.4/jasmine-fixture.js +0 -433
- data/spec_app/vendor/asset-libs/jasmine-jquery-2.1.1/.bower.json +0 -26
- data/spec_app/vendor/asset-libs/jasmine-jquery-2.1.1/jasmine-jquery.js +0 -838
data/dist/unpoly.min.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
[up-close]{cursor:pointer}.up-insertion{display:inline-block}[up-href]{cursor:pointer}.up-modal{position:fixed;top:0;left:0;bottom:0;right:0;z-index:10000;overflow-x:hidden}.up-modal-backdrop{z-index:11000;background-color:rgba(90,90,90,0.4);position:absolute;top:0;right:0;bottom:0;left:0}.up-modal-viewport{position:absolute;top:0;left:0;bottom:0;right:0;z-index:12000;overflow-x:hidden;overflow-y:scroll;text-align:center;padding:30px 10px}.up-modal.up-modal-animating{overflow-y:scroll}.up-modal.up-modal-animating .up-modal-viewport{overflow-y:hidden}.up-modal-dialog{z-index:13000;position:relative;box-sizing:border-box;max-width:100%;display:inline-block;text-align:left}.up-modal-content{z-index:14000;padding:20px;background-color:#fff;box-shadow:0 0 10px 1px rgba(0,0,0,0.3)}.up-modal-close{z-index:15000;position:absolute;right:0;top:0;width:36px;text-align:center;line-height:36px;height:36px;font-size:34px;color:#666;cursor:pointer}.up-modal[up-flavor='drawer'] .up-modal-viewport{text-align:left;padding:0}.up-modal[up-flavor='drawer'][up-position='right'] .up-modal-viewport{text-align:right}.up-modal[up-flavor='drawer'] .up-modal-dialog{max-width:350px}.up-modal[up-flavor='drawer'] .up-modal-content{min-height:100vh;box-sizing:border-box}.up-popup{z-index:20000;
|
1
|
+
[up-close]{cursor:pointer}.up-insertion{display:inline-block}.up-bounds{position:absolute}[up-href]{cursor:pointer}.up-modal{position:fixed;top:0;left:0;bottom:0;right:0;z-index:10000;overflow-x:hidden}.up-modal-backdrop{z-index:11000;background-color:rgba(90,90,90,0.4);position:absolute;top:0;right:0;bottom:0;left:0}.up-modal-viewport{position:absolute;top:0;left:0;bottom:0;right:0;z-index:12000;overflow-x:hidden;overflow-y:scroll;text-align:center;padding:30px 10px}.up-modal.up-modal-animating{overflow-y:scroll}.up-modal.up-modal-animating .up-modal-viewport{overflow-y:hidden}.up-modal-dialog{z-index:13000;position:relative;box-sizing:border-box;max-width:100%;display:inline-block;text-align:left}.up-modal-content{z-index:14000;padding:20px;background-color:#fff;box-shadow:0 0 10px 1px rgba(0,0,0,0.3)}.up-modal-close{z-index:15000;position:absolute;right:0;top:0;width:36px;text-align:center;line-height:36px;height:36px;font-size:34px;color:#666;cursor:pointer}.up-modal[up-flavor='drawer'] .up-modal-viewport{text-align:left;padding:0}.up-modal[up-flavor='drawer'][up-position='right'] .up-modal-viewport{text-align:right}.up-modal[up-flavor='drawer'] .up-modal-dialog{max-width:350px}.up-modal[up-flavor='drawer'] .up-modal-content{min-height:100vh;box-sizing:border-box}.up-popup{z-index:20000;background-color:#fff;padding:15px;box-shadow:0 0 4px rgba(0,0,0,0.3)}.up-toast{border-top:3px solid #28b;background-color:white;color:#333;padding:10px;font-family:monospace;font-size:14px;line-height:15px;position:fixed;left:0;bottom:0;right:0;z-index:99999999}.up-toast-variable{font-weight:normal;color:gray}.up-toast-actions{margin-top:7px}.up-toast-action{display:inline-block;word-spacing:-4px;text-decoration:underline;color:#28b;cursor:pointer}.up-toast-action+.up-toast-action{margin-left:12px}.up-tooltip{z-index:30000;position:relative}.up-tooltip:after{content:"";position:absolute;display:block;width:0;height:0;border:6px solid transparent}.up-tooltip[up-position=top]{margin-bottom:10px}.up-tooltip[up-position=top]:after{border-top-color:#111;border-bottom-width:0;bottom:-6px;left:50%;margin-left:-6px}.up-tooltip[up-position=left]{margin-right:10px}.up-tooltip[up-position=left]:after{border-left-color:#111;border-right-width:0;right:-6px;top:50%;margin-top:-6px}.up-tooltip[up-position=right]{margin-left:10px}.up-tooltip[up-position=right]:after{border-right-color:#111;border-left-width:0;left:-6px;top:50%;margin-top:-6px}.up-tooltip[up-position=bottom]{margin-top:10px}.up-tooltip[up-position=bottom]:after{border-bottom-color:#111;border-top-width:0;top:-6px;left:50%;margin-left:-6px}.up-tooltip-content{background-color:#111;color:white;padding:6px 9px;white-space:nowrap}
|
data/dist/unpoly.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(){window.up={version:"0.57.0",deprecateRenamedModule:function(t,e){return"function"==typeof Object.defineProperty?Object.defineProperty(up,t,{get:function(){return up.warn("Deprecated: up."+t+" has been renamed to up."+e),up[e]}}):void 0}}}).call(this),function(){var t=[].slice,e={}.hasOwnProperty,n=function(t,e){return function(){return t.apply(e,arguments)}};up.util=function(r){var o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C,F,$,A,O,R,j,D,M,U,_,N,q,L,z,H,I,K,V,B,Q,W,X,J,G,Y,Z,tt,et,nt,rt,ot,it,ut,st,at,lt,pt,ct,ft,ht,dt,mt,vt,gt,yt,bt,wt,kt,Tt,St,Et,Pt,xt,Ct,Ft,$t,At,Ot,Rt,jt,Dt,Mt,Ut,_t,Nt,qt,Lt,zt,Ht,It,Kt,Vt,Bt,Qt,Wt,Xt,Jt,Gt,Yt,Zt,te,ee,ne,re,oe,ie,ue,se,ae,le,pe,ce,fe,he,de,me,ve,ge,ye,be,we,ke,Te,Se,Ee,Pe,xe,Ce,Fe,$e,Ae,Oe,Re,je,De,Me,Ue,_e,Ne,qe,Le,ze,He,Ie,Ke,Ve,Be;return Yt=function(){},y=function(){return Promise.resolve()},It=function(e){var n,r;return r=void 0,n=!1,function(){var o;return o=1<=arguments.length?t.call(arguments,0):[],n?r:(n=!0,r=e.apply(null,o))}},$t=function(t,e){return e=e.toString(),(""===e||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},ee=function(t,e){var n,r,o;return r=le(t),n=r.protocol+"//"+r.hostname,$t(r.protocol,r.port)||(n+=":"+r.port),o=r.pathname,"/"!==o[0]&&(o="/"+o),(null!=e?e.stripTrailingSlash:void 0)===!0&&(o=o.replace(/\/$/,"")),n+=o,(null!=e?e.search:void 0)!==!1&&(n+=r.search),(null!=e?e.hash:void 0)===!0&&(n+=r.hash),n},ct=function(t){var e;return e=le(location.href),t=le(t),e.protocol!==t.protocol||e.host!==t.host},le=function(t){var e;return wt(t)&&(t=Z(t)),t.pathname?t:(e=r("<a>").attr({href:t}).get(0),at(e.hostname)&&(e.href=e.href),e)},Zt=function(t){return t?t.toUpperCase():"GET"},Vt=function(t){return"GET"!==t&&"HEAD"!==t},o=function(t){var e,n,o,i,u,s,a,l,p,c,f,h,d,m,v,g;for(v=t.split(/[ >]/),o=null,c=f=0,d=v.length;f<d;c=++f){for(s=v[c],u=s.match(/(^|\.|\#)[A-Za-z0-9\-_]+/g),g="div",i=[],p=null,h=0,m=u.length;h<m;h++)switch(a=u[h],a[0]){case".":i.push(a.substr(1));break;case"#":p=a.substr(1);break;default:g=a}l="<"+g,i.length&&(l+=' class="'+i.join(" ")+'"'),p&&(l+=' id="'+p+'"'),l+=">",e=r(l),n&&e.appendTo(n),0===c&&(o=e),n=e}return o},i=function(t,e){var n;return null==e&&(e=document.body),n=o(t),n.addClass("up-placeholder"),n.appendTo(e),n},Fe=function(t){var e,n,o,i,u,s,a,l,p,c;if(e=r(t),p=void 0,Ft(e))p=z(e);else if(c=fe(e.attr("up-id")))p=b("up-id",c);else if(i=fe(e.attr("id")))p=i.match(/^[a-z0-9\-_]+$/i)?"#"+i:b("id",i);else if(l=fe(e.attr("name")))p=z(e)+b("name",l);else if(o=fe(Gt(e)))for(p="",u=0,a=o.length;u<a;u++)s=o[u],p+="."+s;else p=(n=fe(e.attr("aria-label")))?b("aria-label",n):z(e);return p},Ft=function(t){return t.is("html, body, head, title")},z=function(t){return t.prop("tagName").toLowerCase()},b=function(t,e){return e=e.replace(/"/g,'\\"'),"["+t+'="'+e+'"]'},Gt=function(t){var e,n;return e=t.attr("class")||"",n=je(e),be(n,function(t){return t.match(/^up-/)})},j=function(t){var e;return e=new DOMParser,e.parseFromString(t,"text/html")},g=function(){var n,r,o,i,u,s,a;for(s=arguments[0],u=2<=arguments.length?t.call(arguments,1):[],n=0,o=u.length;n<o;n++){i=u[n];for(r in i)e.call(i,r)&&(a=i[r],s[r]=a)}return s},v=Object.assign||g,Ie=function(t){var e,n,r;n=[];for(e in t)r=t[e],n.push(r);return n},re=Object.values||Ie,Ne=r.trim,qt=function(t){return At(t)?function(e){return e[t]}:t},Lt=function(t,e){var n,r,o,i,u;if(0===t.length)return[];for(e=qt(e),u=[],n=o=0,i=t.length;o<i;n=++o)r=t[n],u.push(e(r,n));return u},q=Lt,L=function(t,e){var n,r;for(r=[];(n=t.next())&&!n.done;)r.push(e(n.value));return r},Ue=function(t,e){var n,r,o,i;for(i=[],n=r=0,o=t-1;0<=o?r<=o:r>=o;n=0<=o?++r:--r)i.push(e(n));return i},Tt=function(t){return null===t},Rt=function(t){return void 0===t},ft=function(t){return!Rt(t)},kt=function(t){return Rt(t)||Tt(t)},bt=function(t){return!kt(t)},at=function(t){return!!kt(t)||!yt(t)&&(!(!Et(t)||0!==Object.keys(t).length)||0===t.length)},fe=function(t,e){return null==e&&(e=xt),e(t)?t:void 0},xt=function(t){return!at(t)},yt=function(t){return"function"==typeof t},At=function(t){return"string"==typeof t||t instanceof String},pt=function(t){return"boolean"==typeof t||t instanceof Boolean},St=function(t){return"number"==typeof t||t instanceof Number},Pt=function(t){return"object"==typeof t&&!Tt(t)&&(Rt(t.constructor)||t.constructor===Object)},Et=function(t){var e;return e=typeof t,"object"===e&&!Tt(t)||"function"===e},dt=function(t){return!(!t||1!==t.nodeType)},wt=function(t){return t instanceof jQuery},Ct=function(t){return Et(t)&&yt(t.then)},ut=Array.isArray,gt=function(t){return t instanceof FormData},_e=function(t){return Array.prototype.slice.call(t)},A=function(t){return ut(t)?t=t.slice():Pt(t)&&(t=v({},t)),t},Z=function(t){return wt(t)?t.get(0):At(t)?r(t).get(0):t},Kt=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],v.apply(null,[{}].concat(t.call(e)))},Xt=function(t,e){return e?Kt(e,t):t?A(t):{}},ae=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],_(e,bt)},_=function(t,e){var n,r,o,i;for(i=void 0,r=0,o=t.length;r<o;r++)if(n=t[r],e(n)){i=n;break}return i},d=function(t,e){var n,r,o,i,u;for(e=qt(e),u=!1,r=o=0,i=t.length;o<i;r=++o)if(n=t[r],e(n,r)){u=!0;break}return u},f=function(t,e){var n,r,o,i,u;for(e=qt(e),u=!0,r=o=0,i=t.length;o<i;r=++o)if(n=t[r],!e(n,r)){u=!1;break}return u},P=function(t){return Pe(t,bt)},qe=function(t){return t.length<2?t:Re(m(t))},Le=function(t,e){var n;return t.length<2?t:(e=qt(e),n=new Set,Pe(t,function(t,r){var o;return o=e(t,r),!n.has(o)&&(n.add(o),!0)}))},Re=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},m=function(t){var e;return e=new Set,t.forEach(function(t){return e.add(t)}),e},Pe=function(t,e){var n;return e=qt(e),n=[],q(t,function(t,r){if(e(t,r))return n.push(t)}),n},be=function(t,e){return e=qt(e),Pe(t,function(t,n){return!e(t,n)})},it=function(t,e){return Pe(t,function(t){return F(e,t)})},p=function(t,e){return S(t,e,"add")},Te=function(t,e){return S(t,e,"remove")},S=function(t,e,n){var r;return r=Z(t).classList,ut(e)?q(e,function(t){return r[n](t)}):r[n](e)},c=function(t,e){return p(t,e),function(){return Te(t,e)}},tt=function(t,e){var n;return n=Z(t).classList,n.contains(e)},he=function(){var e,n,r,o;return e=arguments[0],r=2<=arguments.length?t.call(arguments,1):[],o=function(){var t,o,i;for(i=[],t=0,o=r.length;t<o;t++)n=r[t],i.push(e.attr(n));return i}(),_(o,xt)},Oe=function(t,e){return setTimeout(e,t)},Jt=function(t){return setTimeout(t,0)},Bt=function(t){return Promise.resolve().then(t)},Nt=function(t){return t[t.length-1]},E=function(){var t;return t=document.documentElement,{width:t.clientWidth,height:t.clientHeight}},Ee=It(function(){var t,e,n;return t=r("<div>"),e=t.get(0),t.attr("up-viewport",""),Ve(e,{position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"}),t.appendTo(document.body),n=e.offsetWidth-e.clientWidth,t.remove(),n}),N=function(){var t,e,n,o,i,u;return e=document.body,t=r(e),u=document.documentElement,n=ve(t,"overflowY"),i="scroll"===n,o="hidden"===n,i||!o&&u.scrollHeight>u.clientHeight},Be=function(t,e,n){var o,i,u;return o=r(t),i=ye(o,Object.keys(e)),u=function(){return Ve(o,i)},Ve(o,e),n?(n(),u()):u},Y=function(t){return t=Z(t),t.offsetHeight},x=function(t){var e;return e=Be(t,{transition:"none"}),Y(t),e},zt=function(t){var e;return e=Z(t),{top:ge(e,"marginTop"),right:ge(e,"marginRight"),bottom:ge(e,"marginBottom"),left:ge(e,"marginLeft")}},Ht=function(t,e){var n,o,i,u,s,a;return e=Xt(e,{relative:!1,inner:!1,includeMargin:!1}),e.relative?e.relative===!0?u=t.position():(n=r(e.relative),s=t.offset(),n.is(document)?u=s:(i=n.offset(),u={left:s.left-i.left,top:s.top-i.top})):u=t.offset(),o={left:u.left,top:u.top},e.inner?(o.width=t.width(),o.height=t.height()):(o.width=t.outerWidth(),o.height=t.outerHeight()),e.includeMargin&&(a=zt(t),o.left-=a.left,o.top-=a.top,o.height+=a.top+a.bottom,o.width+=a.left+a.right),o},O=function(t,e){var n,r,o,i,u;for(i=t.get(0).attributes,u=[],r=0,o=i.length;r<o;r++)n=i[r],n.specified?u.push(e.attr(n.name,n.value)):u.push(void 0);return u},Ce=function(t,e){var n;return n=r(),t.is(e)&&(n=n.add(t)),n=n.add(t.find(e))},xe=function(t,e){var n,r;return r=Ce(t,e),n=t.parents(e),r.add(n)},I=function(t){return 27===t.keyCode},F=function(t,e){return t.indexOf(e)>=0},T=function(t,e){var n;switch(n=t.attr(e)){case"false":return!1;case"true":case"":case e:return!0;default:return n}},Mt=function(t,e){var n,r;if((n=Z(t))&&(r="function"==typeof n.getAttribute?n.getAttribute(e):void 0,At(r)&&""!==Ne(r)))return JSON.parse(r)},ie=function(){var e,n,r,o,i,u;for(o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],e={},n=0,r=i.length;n<r;n++)u=i[n],u in o&&(e[u]=o[u]);return e},V=function(){var e,n,r,o,i,u;for(o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],e=A(o),n=0,r=i.length;n<r;n++)u=i[n],delete e[u];return e},jt=function(t){return!(t.metaKey||t.shiftKey||t.ctrlKey)},Dt=function(t){var e;return e=Rt(t.button)||0===t.button,e&&jt(t)},ze=function(){return new Promise(Yt)},ne=function(){return r()},Ae=function(t,e){var n,r,o;r=[];for(n in e)o=e[n],kt(t.attr(n))?r.push(t.attr(n,o)):r.push(void 0);return r},ke=function(t,e){var n;if(n=t.indexOf(e),n>=0)return t.splice(n,1),e},K=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],yt(n)?n.apply(null,e):n},C=function(t){var e;return e=se(t),Object.preventExtensions(e),e},se=function(t){var e;return null==t&&(t={}),e={},e.reset=function(){var n;return n=t,yt(n)&&(n=n()),v(e,n)},e.reset(),e},He=function(t){var e,n;return t=Z(t),e=t.parentNode,n=_e(t.childNodes),q(n,function(n){return e.insertBefore(n,t)}),e.removeChild(t)},oe=function(t){var e,n;for(e=void 0;(t=t.parent())&&t.length;)if(n=ve(t,"position"),"absolute"===n||"relative"===n||t.is("body")){e=t;break}return e},vt=function(t){var e,n;for(e=r(t);;){if(n=ve(e,"position"),"fixed"===n)return!0;if(e=e.parent(),0===e.length||e.is(document))return!1}},X=function(t,e){var n,o,i,u;return n=r(t),o=oe(n),i=n.position(),u=o.offset(),Ve(n,{position:"absolute",left:i.left-u.left,top:i.top-u.top+e.scrollTop(),right:"",bottom:""})},W=function(){var e,n,r,o,i,u;throw e=1<=arguments.length?t.call(arguments,0):[],ut(e[0])?(r=e[0],u=e[1]||{}):(r=e,u={}),(o=up.log).error.apply(o,r),Ke().then(function(){return up.toast.open(r,u)}),n=(i=up.browser).sprintf.apply(i,r),new Error(n)},l={"&":"&","<":"<",">":">",'"':"""},H=function(t){return t.replace(/[&<>"]/g,function(t){return l[t]})},ce=function(t,e){var n;return n=t[e],delete t[e],n},Se=function(t,e,n){return t[n]=ce(t,e)},M=function(t,e,n){if(ft(t[e]))return up.warn("Deprecated: Object key { %s } has been renamed to { %s } (found in %o)",e,n,t),Se(t,e,n)},pe=function(t,e){var n,o;return n=r(t),o=n.data(e),n.removeData(e),o},Q=function(t){var e;return e=Nt(t),Pt(e)?t.pop():{}},u=/[^\-\_]+?(?=[A-Z\-\_]|$)/g,$=function(t,e,n){var r;return r=t.match(u),r=Lt(r,n),r.join(e)},Ut=function(t){return $(t,"-",function(t){return t.toLowerCase()})},w=function(t){return $(t,"",function(t,e){return 0===e?t.toLowerCase():t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()})},_t=function(t){return R(t,Ut)},k=function(t){return R(t,w)},R=function(t,e){var n,r,o;r={};for(n in t)o=t[n],n=e(n),r[n]=o;return r},ue=function(t){return ge(t,"opacity")},Ke=It(function(){return r.isReady?Promise.resolve():new Promise(function(t){return r(t)})}),ot=function(t){return t},ht=function(t){return t=Z(t),!r.contains(document.documentElement,t)},de=function(e){var n,r;return n=Wt(),r=function(){var r,o;return r=1<=arguments.length?t.call(arguments,0):[],o=e.apply(null,r),n.resolve(o),o},r.promise=n.promise(),r},a=function(){function e(){this.asap=n(this.asap,this),this.poke=n(this.poke,this),this.allTasks=n(this.allTasks,this),this.promise=n(this.promise,this),this.reset=n(this.reset,this),this.reset()}return e.prototype.reset=function(){return this.queue=[],this.currentTask=void 0},e.prototype.promise=function(){var t;return t=Nt(this.allTasks()),(null!=t?t.promise:void 0)||Promise.resolve()},e.prototype.allTasks=function(){var t;return t=[],this.currentTask&&t.push(this.currentTask),t=t.concat(this.queue)},e.prototype.poke=function(){var t;if(!this.currentTask&&(this.currentTask=this.queue.shift()))return t=this.currentTask(),h(t,function(t){return function(){return t.currentTask=void 0,t.poke()}}(this))},e.prototype.asap=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],this.queue=Lt(e,de),this.poke(),this.promise()},e}(),De=function(t){var e;return e=r(t),e.is("[type=checkbox], [type=radio]")&&!e.is(":checked")?void 0:e.val()},$e=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],function(){return Lt(e,function(t){return t()})}},me=function(t){var e,n;return n=void 0,e=new Promise(function(e){return n=Oe(t,e)}),e.cancel=function(){return clearTimeout(n)},e},rt=function(t){var e,n,r,o;return e=Ht(t),r=E(),n=e.left+.5*e.width,o=.5*r.width,n<o?"left":"right"},U=function(t,e){var n;return n=r("<div></div>"),n.insertAfter(t),t.detach(),n.replaceWith(e),t},nt=function(t){return Ve(t,{display:"none"})},ve=function(t,e){var n;return t=Z(t),n=window.getComputedStyle(t),B(n,e)},ge=function(t,e){var n;return n=ve(t,e),bt(n)?parseFloat(n):void 0},ye=function(t,e){var n;return t=Z(t),n=t.style,B(n,e)},B=function(e,n){return At(n)?e[n]:ie.apply(null,[e].concat(t.call(n)))},Ve=function(t,e){var n,r,o,i;t=Z(t),o=t.style,r=[];for(n in e)i=e[n],i=te(n,i),r.push(o[n]=i);return r},te=function(t,e){return kt(e)?e="":s.has(t)&&(e=D(e)),e},s=m(["top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","width","height","maxWidth","maxHeight","minWidth","minHeight"]),D=function(t){return St(t)||At(t)&&/^\d+$/.test(t)?t.toString()+"px":t},et=function(t){var e,n,r,o,i;return Pt(t)?i=t:(n=Z(n),i=getComputedStyle(n)),o=i.transitionProperty,e=i.transitionDuration,r="none"===o||"all"===o&&0===e,!r},G=function(t){var e,n,r,o;for(e=[],n=0,r=t.length;n<r;n++)o=t[n],ut(o)?e=e.concat(o):e.push(o);return e},J=function(t,e){return G(Lt(t,e))},Ot=function(t){return!!t},h=function(t,e){return t.then(e,e)},Qt=function(t){return null!=t?t["catch"](Yt):void 0},Wt=function(){var t,e,n;return n=void 0,e=void 0,t=new Promise(function(t,r){return n=t,e=r}),t.resolve=n,t.reject=e,t.promise=function(){return t},t},we=function(t){var e;try{return t()}catch(t){return e=t,Promise.reject(e)}},Me=function(t,e){var n,r,o,i,u;for(e=qt(e),u=0,o=0,i=t.length;o<i;o++)n=t[o],r=e(n),bt(r)&&(u+=r);return u},lt=function(t){return r(t).parents("body").length>0},st=function(t){return Object.prototype.hasOwnProperty(t)},mt=function(t,e){return typeof t==typeof e&&(ut(t)?t.length===e.length&&f(t,function(t,n){return mt(t,e[n])}):Et(t)?W("isEqual cannot compare objects yet"):t===e)},je=function(t,e){var n;return null==e&&(e=" "),n=t.split(e),n=Lt(n,Ne),n=Pe(n,xt)},{offsetParent:oe,fixedToAbsolute:X,isFixed:vt,presentAttr:he,parseUrl:le,normalizeUrl:ee,normalizeMethod:Zt,methodAllowsPayload:Vt,createElementFromHtml:j,$createElementFromSelector:o,$createPlaceholder:i,selectorForElement:Fe,attributeSelector:b,assign:v,assignPolyfill:g,copy:A,merge:Kt,options:Xt,option:ae,fail:W,each:q,eachIterator:L,map:Lt,flatMap:J,times:Ue,any:d,all:f,detect:_,select:Pe,reject:be,intersect:it,compact:P,uniq:qe,uniqBy:Le,last:Nt,isNull:Tt,isDefined:ft,isUndefined:Rt,isGiven:bt,isMissing:kt,isPresent:xt,isBlank:at,presence:fe,isObject:Et,isFunction:yt,isString:At,isBoolean:pt,isNumber:St,isElement:dt,isJQuery:wt,isPromise:Ct,isOptions:Pt,isArray:ut,isFormData:gt,isUnmodifiedKeyEvent:jt,isUnmodifiedMouseEvent:Dt,nullJQuery:ne,element:Z,setTimer:Oe,nextFrame:Jt,measure:Ht,addClass:p,removeClass:Te,hasClass:tt,addTemporaryClass:c,writeTemporaryStyle:Be,forceRepaint:Y,concludeCssTransition:x,escapePressed:I,copyAttributes:O,selectInSubtree:Ce,selectInDynasty:xe,contains:F,toArray:_e,castedAttr:T,jsonAttr:Mt,clientSize:E,only:ie,except:V,trim:Ne,unresolvablePromise:ze,setMissingAttrs:Ae,remove:ke,memoize:It,scrollbarWidth:Ee,documentHasVerticalScrollbar:N,config:C,openConfig:se,unwrapElement:He,camelCase:w,camelCaseKeys:k,kebabCase:Ut,kebabCaseKeys:_t,error:W,pluckData:pe,pluckKey:ce,renameKey:Se,deprecateRenamedKey:M,extractOptions:Q,isDetached:ht,noop:Yt,asyncNoop:y,opacity:ue,whenReady:Ke,identity:ot,escapeHtml:H,DivertibleChain:a,submittedValue:De,sequence:$e,promiseTimer:me,previewable:de,evalOption:K,horizontalScreenHalf:rt,detachWith:U,flatten:G,isTruthy:Ot,isSingletonElement:Ft,newDeferred:Wt,always:h,muteRejection:Qt,rejectOnError:we,isBodyDescendant:lt,isBasicObjectProperty:st,isCrossDomain:ct,microtask:Bt,isEqual:mt,hide:nt,cssLength:D,readComputedStyle:ve,readComputedStyleNumber:ge,readInlineStyle:ye,writeInlineStyle:Ve,hasCssTransition:et,splitValues:je,sum:Me,values:re}}(jQuery),up.fail=up.util.fail}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.Cache=function(){function r(t){this.config=null!=t?t:{},this.get=e(this.get,this),this.isFresh=e(this.isFresh,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.timestamp=e(this.timestamp,this),this.alias=e(this.alias,this),this.makeRoomForAnotherKey=e(this.makeRoomForAnotherKey,this),this.keys=e(this.keys,this),this.log=e(this.log,this),this.clear=e(this.clear,this),this.isCachable=e(this.isCachable,this),this.isEnabled=e(this.isEnabled,this),this.normalizeStoreKey=e(this.normalizeStoreKey,this),this.expiryMillis=e(this.expiryMillis,this),this.maxKeys=e(this.maxKeys,this),this.store=this.config.store||new up.store.Memory}return r.prototype.maxKeys=function(){return t.evalOption(this.config.size)},r.prototype.expiryMillis=function(){return t.evalOption(this.config.expiry)},r.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},r.prototype.isEnabled=function(){return 0!==this.maxKeys()&&0!==this.expiryMillis()},r.prototype.isCachable=function(t){return!this.config.cachable||this.config.cachable(t)},r.prototype.clear=function(){return this.store.clear()},r.prototype.log=function(){var t;if(t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix)return t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,t)},r.prototype.keys=function(){return this.store.keys()},r.prototype.makeRoomForAnotherKey=function(){var e,n,r,o;if(o=t.copy(this.keys()),e=this.maxKeys(),e&&o.length>=e&&(n=void 0,r=void 0,t.each(o,function(t){return function(e){var o,i;if(o=t.store.get(e),i=o.timestamp,!r||r>i)return n=e,r=i}}(this)),n))return this.store.remove(n)},r.prototype.alias=function(e,n){var r;if(r=this.get(e,{silent:!0}),t.isDefined(r))return this.set(n,r)},r.prototype.timestamp=function(){return(new Date).valueOf()},r.prototype.set=function(t,e){var n,r;if(this.isEnabled()&&this.isCachable(t))return this.makeRoomForAnotherKey(),n=this.normalizeStoreKey(t),this.log("Setting entry %o to %o",n,e),r={timestamp:this.timestamp(),value:e},this.store.set(n,r)},r.prototype.remove=function(t){var e;if(this.isCachable(t))return e=this.normalizeStoreKey(t),this.store.remove(e)},r.prototype.isFresh=function(t){var e,n;return e=this.expiryMillis(),!e||(n=this.timestamp()-t.timestamp,n<e)},r.prototype.get=function(t,e){var n;return null==e&&(e={}),this.isCachable(t)&&(n=this.store.get(this.normalizeStoreKey(t)))?this.isFresh(n)?(e.silent||this.log("Cache hit for '%s'",t),n.value):(e.silent||this.log("Discarding stale cache entry for '%s'",t),void this.remove(t)):void(e.silent||this.log("Cache miss for '%s'",t))},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.Record=function(){function r(n){this.copy=e(this.copy,this),this.attributes=e(this.attributes,this),t.assign(this,this.attributes(n))}return r.prototype.fields=function(){throw"Return an array of property names"},r.prototype.attributes=function(e){return null==e&&(e=this),t.only.apply(t,[e].concat(n.call(this.fields())))},r.prototype.copy=function(e){var n;return null==e&&(e={}),n=t.merge(this.attributes(),e),new this.constructor(n)},r}()}.call(this),function(){var t;t=up.util,up.CompilePass=function(){function e(t,e,n){this.$root=t,this.compilers=e,null==n&&(n={}),this.root=this.$root[0],this.$skipSubtrees=$(n.skip),this.$skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.$skipSubtrees=void 0)}return e.prototype.compile=function(){return up.log.group("Compiling fragment %o",this.root,function(t){return function(){var e,n,r,o,i;for(o=t.compilers,i=[],n=0,r=o.length;n<r;n++)e=o[n],i.push(t.runCompiler(e));return i}}(this))},e.prototype.runCompiler=function(e){var n;if(n=this.$select(e.selector),n.length)return up.log.group(e.isSystem?void 0:"Compiling '%s' on %d element(s)",e.selector,n.length,function(r){return function(){var o,i,u,s,a;if(e.batch)r.compileBatch(e,n);else for(o=0,u=n.length;o<u;o++)s=n[o],r.compileOneElement(e,$(s));if(i=e.keep)return a=t.isString(i)?i:"",n.attr("up-keep",a)}}(this))},e.prototype.compileOneElement=function(t,e){var n,r,o,i;if(n=[e],1!==t.length&&(r=up.syntax.data(e),n.push(r)),i=t.apply(e[0],n),o=this.normalizeDestructor(i))return up.syntax.destructor(e,o)},e.prototype.compileBatch=function(e,n){var r,o,i;if(r=[n],1!==e.length&&(o=t.map(n,up.syntax.data),r.push(o)),i=e.apply(n.get(),r),this.normalizeDestructor(i))return up.fail("Compilers with { batch: true } cannot return destructors")},e.prototype.normalizeDestructor=function(e){return t.isFunction(e)?e:t.isArray(e)&&t.all(e,t.isFunction)?(up.warn("up.compiler(): Returning an array of destructor functions is deprecated. Return a single function instead."),t.sequence.apply(t,e)):void 0},e.prototype.$select=function(e){var n,r;return t.isFunction(e)&&(e=e()),n=t.selectInSubtree(this.$root,e),(r=this.$skipSubtrees)&&(n=n.filter(function(){var t;return t=$(this),0===t.closest(r).length})),n},e}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.CssTransition=function(){function n(n,r,o){this.startMotion=e(this.startMotion,this),this.resumeOldTransition=e(this.resumeOldTransition,this),this.pauseOldTransition=e(this.pauseOldTransition,this),this.finish=e(this.finish,this),this.onTransitionEnd=e(this.onTransitionEnd,this),this.stopListenToTransitionEnd=e(this.stopListenToTransitionEnd,this),this.listenToTransitionEnd=e(this.listenToTransitionEnd,this),this.stopFallbackTimer=e(this.stopFallbackTimer,this),this.startFallbackTimer=e(this.startFallbackTimer,this),this.onFinishEvent=e(this.onFinishEvent,this),this.stopListenToFinishEvent=e(this.stopListenToFinishEvent,this),this.listenToFinishEvent=e(this.listenToFinishEvent,this),this.start=e(this.start,this),this.$element=n,this.element=t.element(n),this.lastFrameCamel=t.camelCaseKeys(r),this.lastFrameKebab=t.kebabCaseKeys(r),this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),this.finishEvent=o.finishEvent,this.duration=o.duration,this.delay=o.delay,this.totalDuration=this.delay+this.duration,this.easing=o.easing,this.finished=!1}return n.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=t.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},n.prototype.listenToFinishEvent=function(){if(this.finishEvent)return this.$element.on(this.finishEvent,this.onFinishEvent)},n.prototype.stopListenToFinishEvent=function(){if(this.finishEvent)return this.$element.off(this.finishEvent,this.onFinishEvent)},n.prototype.onFinishEvent=function(t){return t.stopPropagation(),this.finish()},n.prototype.startFallbackTimer=function(){var e;return e=100,this.fallbackTimer=t.setTimer(this.totalDuration+e,function(t){return function(){return t.finish()}}(this))},n.prototype.stopFallbackTimer=function(){return clearTimeout(this.fallbackTimer)},n.prototype.listenToTransitionEnd=function(){return this.$element.on("transitionend",this.onTransitionEnd)},n.prototype.stopListenToTransitionEnd=function(){return this.$element.off("transitionend",this.onTransitionEnd)},n.prototype.onTransitionEnd=function(e){var n,r;if(e.target===this.element&&(r=new Date-this.startTime,r>.25*this.totalDuration&&(n=e.originalEvent.propertyName,t.contains(this.lastFrameKeysKebab,n))))return this.finish()},n.prototype.finish=function(){if(!this.finished)return this.finished=!0,this.stopFallbackTimer(),this.stopListenToFinishEvent(),this.stopListenToTransitionEnd(),t.concludeCssTransition(this.element),this.resumeOldTransition(),this.deferred.resolve()},n.prototype.pauseOldTransition=function(){var e,n,r,o;if(e=t.readComputedStyle(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]),t.hasCssTransition(e))return"all"!==e.transitionProperty&&(o=e.transitionProperty.split(/\s*,\s*/),r=t.readComputedStyle(this.element,o),n=t.camelCaseKeys(r),this.setOldTransitionTargetFrame=t.writeTemporaryStyle(this.element,n)),this.setOldTransition=t.concludeCssTransition(this.element)},n.prototype.resumeOldTransition=function(){return"function"==typeof this.setOldTransitionTargetFrame&&this.setOldTransitionTargetFrame(),"function"==typeof this.setOldTransition?this.setOldTransition():void 0},n.prototype.startMotion=function(){return t.writeInlineStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionDelay:this.delay+"ms",transitionTimingFunction:this.easing}),t.writeInlineStyle(this.element,this.lastFrameCamel)},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.ExtractCascade=function(){function n(n,r){this.oldPlanNotFound=e(this.oldPlanNotFound,this),this.matchingPlanNotFound=e(this.matchingPlanNotFound,this),this.bestMatchingSteps=e(this.bestMatchingSteps,this),this.bestPreflightSelector=e(this.bestPreflightSelector,this),this.detectPlan=e(this.detectPlan,this),this.matchingPlan=e(this.matchingPlan,this),this.newPlan=e(this.newPlan,this),this.oldPlan=e(this.oldPlan,this),this.options=t.options(r,{humanizedTarget:"selector",layer:"auto"}),this.options.transition=t.option(this.options.transition,this.options.animation),this.options.hungry=t.option(this.options.hungry,!0),this.candidates=this.buildCandidates(n),this.plans=t.map(this.candidates,function(e){return function(n,r){var o;return o=t.copy(e.options),r>0&&(o.transition=t.option(up.dom.config.fallbackTransition,e.options.transition)),new up.ExtractPlan(n,o)}}(this))}return n.prototype.buildCandidates=function(e){var n;return n=[e,this.options.fallback,up.dom.config.fallbacks],n=t.flatten(n),n=t.select(n,t.isTruthy),n=t.uniq(n),(this.options.fallback===!1||this.options.provideTarget)&&(n=[n[0]]),n},n.prototype.oldPlan=function(){return this.detectPlan("oldExists")},n.prototype.newPlan=function(){return this.detectPlan("newExists")},n.prototype.matchingPlan=function(){return this.detectPlan("matchExists")},n.prototype.detectPlan=function(e){return t.detect(this.plans,function(t){return t[e]()})},n.prototype.bestPreflightSelector=function(){var t;return t=this.options.provideTarget?this.plans[0]:this.oldPlan(),t?(t.resolveNesting(),t.selector()):this.oldPlanNotFound()},n.prototype.bestMatchingSteps=function(){var t;return(t=this.matchingPlan())?(t.addHungrySteps(),t.resolveNesting(),t.steps):this.matchingPlanNotFound()},n.prototype.matchingPlanNotFound=function(){var t,e;return this.newPlan()?this.oldPlanNotFound():(e=this.oldPlan()?"Could not find "+this.options.humanizedTarget+" in response":"Could not match "+this.options.humanizedTarget+" in current page and response",this.options.inspectResponse&&(t={label:"Open response",callback:this.options.inspectResponse}),up.fail([e+" (tried %o)",this.candidates],{action:t}))},n.prototype.oldPlanNotFound=function(){var t;return t=this.options.layer,"auto"===t&&(t="page, modal or popup"),up.fail("Could not find "+this.options.humanizedTarget+" in current "+t+" (tried %o)",this.candidates)},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.ExtractPlan=function(){function n(t,n){this.addHungrySteps=e(this.addHungrySteps,this),this.parseSteps=e(this.parseSteps,this),this.selector=e(this.selector,this),this.resolveNesting=e(this.resolveNesting,this),this.addSteps=e(this.addSteps,this),this.matchExists=e(this.matchExists,this),this.newExists=e(this.newExists,this),this.oldExists=e(this.oldExists,this),this.findNew=e(this.findNew,this),this.findOld=e(this.findOld,this);var r;this.reveal=n.reveal,this.origin=n.origin,this.hungry=n.hungry,this.transition=n.transition,this.response=n.response,this.oldLayer=n.layer,r=up.dom.resolveSelector(t,this.origin),this.parseSteps(r)}return n.prototype.findOld=function(){return t.each(this.steps,function(t){return function(e){return e.$old=up.dom.first(e.selector,{layer:t.oldLayer})}}(this))},n.prototype.findNew=function(){return t.each(this.steps,function(t){return function(e){return e.$new=t.response.first(e.selector)}}(this))},n.prototype.oldExists=function(){return this.findOld(),t.all(this.steps,function(t){return t.$old})},n.prototype.newExists=function(){return this.findNew(),t.all(this.steps,function(t){return t.$new})},n.prototype.matchExists=function(){return this.oldExists()&&this.newExists()},n.prototype.addSteps=function(t){return this.steps=this.steps.concat(t)},n.prototype.resolveNesting=function(){var e;if(!(this.steps.length<2))return e=t.copy(this.steps),e=t.uniqBy(e,function(t){return t.$old[0]}),e=t.select(e,function(){return function(n,r){return t.all(e,function(t,e){var o,i;return e===r||(o=n.$old[0],i=t.$old[0],t.pseudoClass||!$.contains(i,o))})}}(this)),e[0].reveal=this.steps[0].reveal,this.steps=e},n.prototype.selector=function(){return t.map(this.steps,"expression").join(", ")},n.prototype.parseSteps=function(e){var n,r;return n=/\ *,\ */,this.steps=[],r=e.split(n),t.each(r,function(t){return function(e,n){var r,o,i,u;return o=e.match(/^(.+?)(?:\:(before|after))?$/),o||up.fail('Could not parse selector literal "%s"',e),u=o[1],"html"===u&&(u="body"),i=o[2],r=0===n&&t.reveal,t.steps.push({expression:e,selector:u,pseudoClass:i,transition:t.transition,origin:t.origin,reveal:r})}}(this))},n.prototype.addHungrySteps=function(){var e,n,r,o,i,u,s,a,l;if(i=[],this.hungry)for(e=$(up.radio.hungrySelector()),l=t.option(up.radio.config.hungryTransition,this.transition),u=0,s=e.length;u<s;u++)o=e[u],n=$(o),a=t.selectorForElement(n),(r=this.response.first(a))&&i.push({selector:a,$old:n,$new:r,transition:l,reveal:!1,origin:null});return this.addSteps(i)},n}()}.call(this),function(){var t;t=up.util,up.ExtractStep=function(){function t(){}return t}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.FieldObserver=function(){function n(t,n){this.$field=t,this.check=e(this.check,this),this.readFieldValue=e(this.readFieldValue,this),this.requestCallback=e(this.requestCallback,this),this.isNewValue=e(this.isNewValue,this),this.scheduleTimer=e(this.scheduleTimer,this),this.cancelTimer=e(this.cancelTimer,this),this.stop=e(this.stop,this),this.start=e(this.start,this),this.delay=n.delay,this.callback=n.callback}var r;return r="input change",n.prototype.start=function(){return this.scheduledValue=null,this.processedValue=this.readFieldValue(),this.currentTimer=void 0,this.currentCallback=void 0,this.$field.on(r,this.check)},n.prototype.stop=function(){return this.$field.off(r,this.check),this.cancelTimer()},n.prototype.cancelTimer=function(){return clearTimeout(this.currentTimer),this.currentTimer=void 0},n.prototype.scheduleTimer=function(){return this.currentTimer=t.setTimer(this.delay,function(t){return function(){return t.currentTimer=void 0,t.requestCallback()}}(this))},n.prototype.isNewValue=function(t){return t!==this.processedValue&&(null===this.scheduledValue||this.scheduledValue!==t)},n.prototype.requestCallback=function(){var e;if(null!==this.scheduledValue&&!this.currentTimer&&!this.currentCallback)return this.processedValue=this.scheduledValue,this.scheduledValue=null,this.currentCallback=function(t){return function(){return t.callback.call(t.$field.get(0),t.processedValue,t.$field)}}(this),e=Promise.resolve(this.currentCallback()),t.always(e,function(t){return function(){return t.currentCallback=void 0,t.requestCallback()}}(this))},n.prototype.readFieldValue=function(){return t.submittedValue(this.$field)},n.prototype.check=function(){var t;if(t=this.readFieldValue(),this.isNewValue(t))return this.scheduledValue=t,
|
2
|
-
this.cancelTimer(),this.scheduleTimer()},n}()}.call(this),function(){}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.FollowVariant=function(){function r(t,n){this.matchesLink=e(this.matchesLink,this),this.preloadLink=e(this.preloadLink,this),this.followLink=e(this.followLink,this),this.fullSelector=e(this.fullSelector,this),this.onMousedown=e(this.onMousedown,this),this.onClick=e(this.onClick,this),this.followNow=n.follow,this.preloadNow=n.preload,this.selectors=t.split(/\s*,\s*/)}return r.prototype.onClick=function(t,e){return up.link.shouldProcessEvent(t,e)?e.is("[up-instant]")?up.bus.haltEvent(t):(up.bus.consumeAction(t),this.followLink(e)):up.link.allowDefault(t)},r.prototype.onMousedown=function(t,e){if(up.link.shouldProcessEvent(t,e))return up.bus.consumeAction(t),this.followLink(e)},r.prototype.fullSelector=function(t){var e;return null==t&&(t=""),e=[],this.selectors.forEach(function(n){var r,o,i,u,s;for(i=["a","[up-href]"],u=[],r=0,o=i.length;r<o;r++)s=i[r],u.push(e.push(""+s+n+t));return u}),e.join(", ")},r.prototype.registerEvents=function(){return up.on("click",this.fullSelector(),function(e){return function(){var r;return r=1<=arguments.length?n.call(arguments,0):[],t.muteRejection(e.onClick.apply(e,r))}}(this)),up.on("mousedown",this.fullSelector("[up-instant]"),function(e){return function(){var r;return r=1<=arguments.length?n.call(arguments,0):[],t.muteRejection(e.onMousedown.apply(e,r))}}(this))},r.prototype.followLink=function(e,n){var r;return n=t.options(n),r={message:"Following link",$link:e,$element:e},up.bus.whenEmitted("up:link:follow",r).then(function(t){return function(){return up.feedback.start(e,n,function(){return t.followNow(e,n)})}}(this))},r.prototype.preloadLink=function(e,n){return n=t.options(n),this.preloadNow(e,n)},r.prototype.matchesLink=function(t){return t.is(this.fullSelector())},r}()}.call(this),function(){var t;t=up.util,up.HtmlParser=function(){function e(e){this.html=e,this.wrapNoscriptInHtml(),this.parsedDoc=t.createElementFromHtml(this.html)}return e.prototype.title=function(){var t;return null!=(t=this.parsedDoc.querySelector("head title"))?t.textContent:void 0},e.prototype.first=function(t){var e;if(e=$.find(t,this.parsedDoc)[0])return $(e)},e.prototype.prepareForInsertion=function(t){var e;return e=t[0],this.unwrapNoscriptInElement(e),$(e)},e.prototype.wrapNoscriptInHtml=function(){var e;return e=/<noscript[^>]*>((.|\s)*?)<\/noscript>/gi,this.html=this.html.replace(e,function(e){return function(n,r){return e.didWrapNoscript=!0,'<div class="up-noscript" data-html="'+t.escapeHtml(r)+'"></div>'}}(this))},e.prototype.unwrapNoscriptInElement=function(t){var e,n,r,o,i,u,s;if(this.didWrapNoscript){for(s=t.querySelectorAll(".up-noscript"),o=[],e=0,n=s.length;e<n;e++)u=s[e],i=u.getAttribute("data-html"),r=document.createElement("noscript"),r.textContent=i,o.push(u.parentNode.replaceChild(r,u));return o}},e}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.MotionTracker=function(){function n(t){this.reset=e(this.reset,this),this.whileForwardingFinishEvent=e(this.whileForwardingFinishEvent,this),this.forwardFinishEvent=e(this.forwardFinishEvent,this),this.unmarkCluster=e(this.unmarkCluster,this),this.markCluster=e(this.markCluster,this),this.whenElementFinished=e(this.whenElementFinished,this),this.emitFinishEvent=e(this.emitFinishEvent,this),this.finishOneElement=e(this.finishOneElement,this),this.isActive=e(this.isActive,this),this.expandFinishRequest=e(this.expandFinishRequest,this),this.finish=e(this.finish,this),this.claim=e(this.claim,this),this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return n.prototype.claim=function(e,n,r){var o;return null==r&&(r={}),o=$(e),r.trackMotion=t.option(r.trackMotion,up.motion.isEnabled()),r.trackMotion===!1?t.microtask(n):(r.trackMotion=!1,this.finish(o).then(function(t){return function(){var e;return e=t.whileForwardingFinishEvent(o,n),e=e.then(function(){return t.unmarkCluster(o)}),t.markCluster(o,e),e}}(this)))},n.prototype.finish=function(e){var n,r;return this.finishCount++,0!==this.clusterCount&&up.motion.isEnabled()?(n=this.expandFinishRequest(e),r=t.map(n,this.finishOneElement),Promise.all(r)):Promise.resolve()},n.prototype.expandFinishRequest=function(e){return e?t.selectInDynasty($(e),this.selector):$(this.selector)},n.prototype.isActive=function(e){return t.hasClass(e,this.activeClass)},n.prototype.finishOneElement=function(t){var e;return e=$(t),this.emitFinishEvent(e),this.whenElementFinished(e)},n.prototype.emitFinishEvent=function(e,n){return null==n&&(n={}),n=t.merge({$element:e,message:!1},n),up.emit(this.finishEvent,n)},n.prototype.whenElementFinished=function(t){return t.data(this.dataKey)||Promise.resolve()},n.prototype.markCluster=function(t,e){return this.clusterCount++,t.addClass(this.activeClass),t.data(this.dataKey,e)},n.prototype.unmarkCluster=function(t){return this.clusterCount--,t.removeClass(this.activeClass),t.removeData(this.dataKey)},n.prototype.forwardFinishEvent=function(t,e,n){return this.start(t,function(r){return function(){var o;return o=function(){return e.trigger(r.finishEvent)},t.on(r.finishEvent,o),n.then(function(){return t.off(r.finishEvent,o)})}}(this))},n.prototype.whileForwardingFinishEvent=function(e,n){var r;return e.length<2?n():(r=function(n){return function(r){if(!r.forwarded)return t.each(e,function(t){var e;if(e=$(t),t!==r.target&&n.isActive(e))return n.emitFinishEvent(e,{forwarded:!0})})}}(this),e.on(this.finishEvent,r),n().then(function(t){return function(){return e.off(t.finishEvent,r)}}(this)))},n.prototype.reset=function(){return this.finish().then(function(t){return function(){return t.finishCount=0,t.clusterCount=0}}(this))},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.Request=function(r){function o(t){this.cacheKey=e(this.cacheKey,this),this.isCachable=e(this.isCachable,this),this.buildResponse=e(this.buildResponse,this),this.isCrossDomain=e(this.isCrossDomain,this),this.csrfToken=e(this.csrfToken,this),this.navigate=e(this.navigate,this),this.send=e(this.send,this),this.isSafe=e(this.isSafe,this),this.transferSearchToParams=e(this.transferSearchToParams,this),this.transferParamsToUrl=e(this.transferParamsToUrl,this),this.extractHashFromUrl=e(this.extractHashFromUrl,this),this.normalize=e(this.normalize,this),o.__super__.constructor.call(this,t),this.normalize()}return n(o,r),o.prototype.fields=function(){return["method","url","params","data","target","failTarget","headers","timeout","preload","cache"]},o.prototype.normalize=function(){return t.deprecateRenamedKey(this,"data","params"),this.method=t.normalizeMethod(this.method),this.headers||(this.headers={}),this.extractHashFromUrl(),t.methodAllowsPayload(this.method)?this.transferSearchToParams():this.transferParamsToUrl()},o.prototype.extractHashFromUrl=function(){var e;return e=t.parseUrl(this.url),this.hash=t.presence(e.hash),this.url=t.normalizeUrl(e,{hash:!1})},o.prototype.transferParamsToUrl=function(){if(this.params&&!t.isFormData(this.params))return this.url=up.params.buildURL(this.url,this.params),this.params=void 0},o.prototype.transferSearchToParams=function(){var e;if(e=up.params.fromURL(this.url))return this.params=up.params.merge(this.params,e),this.url=t.normalizeUrl(this.url,{search:!1})},o.prototype.isSafe=function(){return up.proxy.isSafeMethod(this.method)},o.prototype.send=function(){return new Promise(function(e){return function(n,r){var o,i,u,s,a,l,p,c,f,h,d;p=new XMLHttpRequest,c=t.copy(e.headers),h=e.params,f=e.method,d=e.url,s=up.proxy.wrapMethod(f,h),f=s[0],h=s[1],h?(delete c["Content-Type"],h=up.params.toFormData(h)):h=null,u=up.protocol.config,e.target&&(c[u.targetHeader]=e.target),e.failTarget&&(c[u.failTargetHeader]=e.failTarget),e.isCrossDomain()||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),(o=e.csrfToken())&&(c[u.csrfHeader]=o),p.open(f,d);for(i in c)l=c[i],p.setRequestHeader(i,l);return a=function(){var t;return t=e.buildResponse(p),t.isSuccess()?n(t):r(t)},p.onload=a,p.onerror=a,p.ontimeout=a,e.timeout&&(p.timeout=e.timeout),p.send(h)}}(this))},o.prototype.navigate=function(){var e,n,r,o,i;return this.transferSearchToParams(),e=$('<form class="up-page-loader"></form>'),n=function(t){return $('<input type="hidden">').attr(t).appendTo(e)},"GET"===this.method?i="GET":(n({name:up.protocol.config.methodParam,value:this.method}),i="POST"),e.attr({method:i,action:this.url}),(r=up.protocol.csrfParam())&&(o=this.csrfToken())&&n({name:r,value:o}),t.each(up.params.toArray(this.params),n),e.hide().appendTo("body"),up.browser.submitForm(e)},o.prototype.csrfToken=function(){if(!this.isSafe()&&!this.isCrossDomain())return up.protocol.csrfToken()},o.prototype.isCrossDomain=function(){return t.isCrossDomain(this.url)},o.prototype.buildResponse=function(t){var e,n,r;return n={method:this.method,url:this.url,text:t.responseText,status:t.status,request:this,xhr:t},(r=up.protocol.locationFromXhr(t))&&(n.url=r,n.method=null!=(e=up.protocol.methodFromXhr(t))?e:"GET"),n.title=up.protocol.titleFromXhr(t),new up.Response(n)},o.prototype.isCachable=function(){return this.isSafe()&&!t.isFormData(this.params)},o.prototype.cacheKey=function(){var t;return t=up.params.toQuery(this.params),[this.url,this.method,t,this.target].join("|")},o.wrap=function(t){return t instanceof this?t:new this(t)},o}(up.Record)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.Response=function(r){function o(t){this.getHeader=e(this.getHeader,this),this.isFatalError=e(this.isFatalError,this),this.isError=e(this.isError,this),this.isSuccess=e(this.isSuccess,this),o.__super__.constructor.call(this,t)}return n(o,r),o.prototype.fields=function(){return["method","url","text","status","request","xhr","title"]},o.prototype.isSuccess=function(){return this.status&&this.status>=200&&this.status<=299},o.prototype.isError=function(){return!this.isSuccess()},o.prototype.isFatalError=function(){return this.isError()&&t.isBlank(this.text)},o.prototype.getHeader=function(t){return this.xhr.getResponseHeader(t)},o}(up.Record)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};up.store||(up.store={}),t=up.util,up.store.Memory=function(){function n(){this.values=e(this.values,this),this.keys=e(this.keys,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.get=e(this.get,this),this.clear=e(this.clear,this),this.clear()}return n.prototype.clear=function(){return this.data={}},n.prototype.get=function(t){return this.data[t]},n.prototype.set=function(t,e){return this.data[t]=e},n.prototype.remove=function(t){return delete this.data[t]},n.prototype.keys=function(){return Object.keys(this.data)},n.prototype.values=function(){return t.values(this.data)},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.store.Session=function(t){function r(t){this.saveToSessionStorage=e(this.saveToSessionStorage,this),this.loadFromSessionStorage=e(this.loadFromSessionStorage,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.clear=e(this.clear,this),this.rootKey=t,this.loadFromSessionStorage()}return n(r,t),r.prototype.clear=function(){return r.__super__.clear.call(this),this.saveToSessionStorage()},r.prototype.set=function(t,e){return r.__super__.set.call(this,t,e),this.saveToSessionStorage()},r.prototype.remove=function(t){return r.__super__.remove.call(this,t),this.saveToSessionStorage()},r.prototype.loadFromSessionStorage=function(){var t;try{(t="undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.getItem(this.rootKey):void 0)&&(this.data=JSON.parse(t))}catch(t){}return this.data||(this.data={})},r.prototype.saveToSessionStorage=function(){var t;t=JSON.stringify(this.data);try{return"undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.setItem(this.rootKey,t):void 0}catch(t){}},r}(up.store.Memory)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.UrlSet=function(){function n(n,r){this.urls=n,null==r&&(r={}),this.isEqual=e(this.isEqual,this),this.matchesAny=e(this.matchesAny,this),this.doesMatchPrefix=e(this.doesMatchPrefix,this),this.doesMatchFully=e(this.doesMatchFully,this),this.matches=e(this.matches,this),this.normalizeUrl=r.normalizeUrl||t.normalizeUrl,this.urls=t.map(this.urls,this.normalizeUrl),this.urls=t.compact(this.urls)}return n.prototype.matches=function(t){return"*"===t.substr(-1)?this.doesMatchPrefix(t.slice(0,-1)):this.doesMatchFully(t)},n.prototype.doesMatchFully=function(e){return t.contains(this.urls,e)},n.prototype.doesMatchPrefix=function(e){return t.detect(this.urls,function(t){return 0===t.indexOf(e)})},n.prototype.matchesAny=function(e){return t.detect(e,this.matches)},n.prototype.isEqual=function(e){return t.isEqual(this.urls,null!=e?e.urls:void 0)},n}()}.call(this),function(){var t=[].slice;up.browser=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P;return S=up.util,v=function(t,e){var n;return null==e&&(e={}),n=new up.Request(S.merge(e,{url:t})),n.navigate()},T=function(t){return t.submit()},y=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],console[n].apply(console,e)},n=/\%[odisf]/g,k=function(t){var n,r,o,i,u,s,a,l,p;if(s=200,o="",S.isString(t))l=t.replace(/[\n\r\t ]+/g," "),l=l.replace(/^[\n\r\t ]+/,""),l=l.replace(/[\n\r\t ]$/,""),l='"'+l+'"',o='"';else if(S.isUndefined(t))l="undefined";else if(S.isNumber(t)||S.isFunction(t))l=t.toString();else if(S.isArray(t))l="["+S.map(t,k).join(", ")+"]",o="]";else if(S.isJQuery(t))l="$("+S.map(t,k).join(", ")+")",o=")";else if(S.isElement(t)){for(n=e(t),l="<"+t.tagName.toLowerCase(),a=["id","name","class"],i=0,u=a.length;i<u;i++)r=a[i],(p=n.attr(r))&&(l+=" "+r+'="'+p+'"');l+=">",o=">"}else l=JSON.stringify(t);return l.length>s&&(l=l.substr(0,s)+" \u2026",l+=o),l},b=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],w.apply(null,[S.identity,n].concat(t.call(e)))},w=function(){var e,r,o,i;return r=arguments[0],i=arguments[1],e=3<=arguments.length?t.call(arguments,2):[],S.isBlank(i)?"":(o=0,i.replace(n,function(){var t;return t=e[o],t=r(k(t)),o+=1,t}))},E=function(){return location.href},h=S.memoize(function(){return!window.atob}),c=function(){return S.isDefined(history.pushState)&&"get"===up.protocol.initialRequestMethod()},o=S.memoize(function(){return"transition"in document.documentElement.style}),a=S.memoize(function(){return"oninput"in document.createElement("input")}),p=S.memoize(function(){return!!window.Promise}),s=S.memoize(function(){return!!window.FormData}),l=S.memoize(function(){return s()&&!!FormData.prototype.entries}),u=S.memoize(function(){return!!window.DOMParser}),r=S.memoize(function(){return window.console&&console.debug&&console.info&&console.warn&&console.error&&console.group&&console.groupCollapsed&&console.groupEnd}),i=S.memoize(function(){return!!window.customElements}),d=S.memoize(function(){var t,n,r,o;return o=e.fn.jquery,r=o.split("."),t=parseInt(r[0]),n=parseInt(r[1]),t>=2||1===t&&n>=9}),g=function(t){var e,n;return n=null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1]:void 0,S.isPresent(n)&&(document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},P=function(t){return t.preload||S.isBlank(t.confirm)||window.confirm(t.confirm)?Promise.resolve():Promise.reject(new Error("User canceled action"))},m=function(){return!h()&&d()&&r()&&u()&&s()&&o()&&a()&&p()},f=function(){var t;return(t=document.scrollingElement)?t.tagName:"html"},{url:E,navigate:v,submitForm:T,canPushState:c,canFormData:s,canInspectFormData:l,canCustomElements:i,documentViewportSelector:f,whenConfirmed:P,isSupported:m,puts:y,sprintf:b,sprintfWithFormattedArgs:w,popCookie:g}}(jQuery)}.call(this),function(){var t=[].slice;up.bus=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P;return w=up.util,c={},h=0,g={},E=function(t){return function(n){var r,o,i;return r=n.$element||e(this),o=[n,r],i=t.length,1!==i&&2!==i&&o.push(up.syntax.data(r)),t.apply(r.get(0),o)}},S=function(t,e){var n,r,o;return n=w.copy(t),s(n),o=n.pop(),r=void 0,e?(r=E(o),o._asJqueryListener=r,o._descriptionNumber&&up.fail("up.on(): The callback %o cannot be registered more than once"),o._descriptionNumber=++h):(r=o._asJqueryListener,r||up.fail("up.off(): The callback %o was never registered through up.on()",o)),n.push(r),n},s=function(t){var e;return e=w.splitValues(t[0]),e=w.map(e,function(t){var e;return(e=g[t])?(up.warn("Deprecated: "+t+" has been renamed to "+e),e):t}),t[0]=e.join(" ")},p=function(){var n,r,o;return o=1<=arguments.length?t.call(arguments,0):[],up.browser.isSupported()?(n=S(o,!0),v(o),(r=e(document)).on.apply(r,n),function(){return k.apply(null,o)}):function(){}},k=function(){var n,r,o;return o=1<=arguments.length?t.call(arguments,0):[],n=S(o,!1),a(o),(r=e(document)).off.apply(r,n)},v=function(t){var e;return e=T(t),c[e]=t},a=function(t){var e,n;return e=T(t),n=w.last(t),delete n._descriptionNumber,delete n._asJqueryListener,delete c[e]},T=function(t){return w.last(t)._descriptionNumber},i=function(t,n){var r,o;return null==n&&(n={}),o=e.Event(t,n),r=n.$target||n.$element||e(document),f(t,n),r.trigger(o),o},f=function(e,n){var r,o,i;return n.hasOwnProperty("message")?(r=n.message,delete n.message,r!==!1&&(w.isArray(r)?(i=r,r=i[0],o=2<=i.length?t.call(i,1):[]):o=[],r)?w.isPresent(n)?up.puts.apply(up,[r+" (%s (%o))"].concat(t.call(o),[e],[n])):up.puts.apply(up,[r+" (%s)"].concat(t.call(o),[e])):void 0):w.isPresent(n)?up.puts("Emitted event %s (%o)",e,n):up.puts("Emitted event %s",e)},d=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=i.apply(null,e),!n.isDefaultPrevented()},P=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],new Promise(function(t,n){return d.apply(null,e)?t():n(new Error("Event "+e[0]+" was prevented"))})},m=function(t){return p("keydown","body",function(e){if(w.escapePressed(e))return t(e)})},l=function(t){return t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()},r=function(t){if(l(t),"up:action:consumed"!==t.type)return i("up:action:consumed",{$element:e(t.target),message:!1})},b=function(){var t,e,n;n=[];for(e in c)t=c[e],n.push(t.isDefault=!0);return n},y=function(){var t,e,n,r,o,i;e=[];for(o in c)t=c[o],t.isDefault||e.push(t);for(i=[],n=0,r=e.length;n<r;n++)t=e[n],i.push(k.apply(null,t));return i},u=function(){return i("up:framework:reset",{message:"Resetting framework"}),up.protocol.reset()},o=function(t,e){return g[t]=e},n=function(){return up.browser.isSupported()?(i("up:framework:boot",{message:"Booting framework"}),i("up:framework:booted",{message:"Framework booted"}),w.nextFrame(function(){return w.whenReady().then(function(){return i("up:app:boot",{message:"Booting user application"}),i("up:app:booted",{message:"User application booted"})})})):"function"==typeof console.log?console.log("Unpoly doesn't support this browser. Framework was not booted."):void 0},p("up:framework:booted",b),p("up:framework:reset",y),{on:p,off:k,emit:i,nobodyPrevents:d,whenEmitted:P,onEscape:m,emitReset:u,haltEvent:l,consumeAction:r,deprecateRenamedEvent:o,boot:n}}(jQuery),up.on=up.bus.on,up.off=up.bus.off,up.emit=up.bus.emit,up.reset=up.bus.emitReset,up.boot=up.bus.boot}.call(this),function(){up.params=function(t){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C,F,$,A;return A=up.util,r=0,e=1,i=2,n=3,o=4,T=function(t){return A.isMissing(t)?r:A.isArray(t)?e:A.isString(t)?i:A.isFormData(t)?n:A.isObject(t)?o:up.fail("Unsupport params type: %o",t)},x=function(t){switch(T(t)){case r:return[];case e:return t;case i:return c(t);case n:return l(t);case o:return p(t)}},F=function(t){switch(T(t)){case r:return{};case e:case i:case n:return h(x(t));case o:return t}},C=function(t){switch(T(t)){case r:return new FormData;case e:case i:case o:return f(x(t));case n:return t}},$=function(t){switch(T(t)){case r:return"";case i:return t;case e:case n:case o:return d(x(t))}},s=function(t){var e,n;if(n=t.value,w(n))return e=encodeURIComponent(t.name),A.isGiven(n)&&(e+="=",e+=encodeURIComponent(n)),e},w=function(t){return A.isMissing(t)||A.isString(t)||A.isNumber(t)||A.isBoolean(t)},E=function(t,e,n){if(!A.isBasicObjectProperty(e))return t[e]=n},S=function(t,e){if(!A.isBasicObjectProperty(e))return t[e]},d=function(t){var e;return e=A.map(t,s),e=A.compact(e),e.join("&")},c=function(t){var e,n,r,o,i,u,s,a;for(e=[],u=t.split("&"),n=0,r=u.length;n<r;n++)i=u[n],i&&(s=i.split("="),o=s[0],a=s[1],o=decodeURIComponent(o),a=A.isGiven(a)?decodeURIComponent(a):null,e.push({name:o,value:a}));return e},p=function(t){var e,n,r;e=[];for(n in t)r=t[n],e.push({name:n,value:r});return e},h=function(t){var e,n,r,o;for(o={},n=0,r=t.length;n<r;n++)e=t[n],E(o,e.name,e.value);return o},l=function(t){var e;return e=[],A.eachIterator(t.entries(),function(t){var n,r;return r=t,n=r[0],t=r[1],e.push({name:n,value:t})}),e},f=function(t){var e,n,r,o;for(n=new FormData,r=0,o=t.length;r<o;r++)e=t[r],n.append(e.name,e.value);return n},m=function(t,e){var n,r;return n=[t,$(e)],n=A.select(n,A.isPresent),r=A.contains(t,"?")?"&":"?",n.join(r)},u=function(t,e,n){var r;return r=[{name:e,value:n}],a(t,r)},k=function(t,u){var s,l,p,c;switch(T(t)){case r:return k({},u);case e:return l=x(u),t.concat(l);case n:return s=new FormData,a(s,t),a(s,u),s;case i:return p=$(u),c=A.select([t,p],A.isPresent),c.join("&");case o:return A.merge(t,F(u))}},b=function(t,u){var s,a;switch(T(t)){case r:return;case e:return s=A.detect(t,function(t){return t.name===u}),null!=s?s.value:void 0;case n:return a=t.get(u),A.isNull(a)&&(a=void 0),a;case i:return S(F(t),u);case o:return S(t,u)}},a=function(t,u){var s,a,l,p;switch(T(t)){case e:return p=x(u),t.push.apply(t,p),t;case n:for(p=x(u),a=0,l=p.length;a<l;a++)s=p[a],t.append(s.name,s.value);return t;case o:return A.assign(t,F(u));case i:case r:return k(t,u)}},P=function(e){var n,r,o;return r=t(e),o=up.form.submitButtonSelector(),n=t(document.activeElement),n.is(o)&&r.has(n)?n[0]:r.find(o)[0]},g=function(t){var e,n;if(t=A.element(t))return n=t.querySelectorAll(up.form.fieldSelector()),(e=P(t))&&(n=A.toArray(n),n.push(e)),A.flatMap(n,v)},v=function(t){var e,n,r,o,i,u,s,a,l,p,c,f;if(a=[],(t=A.element(t))&&(u=t.name)&&!t.disabled)if(c=t.tagName,f=t.type,"SELECT"===c)for(l=t.querySelectorAll("option"),n=0,o=l.length;n<o;n++)s=l[n],s.selected&&a.push({name:u,value:s.value});else if("checkbox"===f||"radio"===f)t.checked&&a.push({name:u,value:t.value});else if("file"===f)for(p=t.files,r=0,i=p.length;r<i;r++)e=p[r],a.push({name:u,value:e});else a.push({name:u,value:t.value});return a},y=function(t){var e,n;if(n=A.parseUrl(t),e=n.search)return e=e.replace(/^\?/,"")},{toArray:x,toObject:F,toQuery:$,toFormData:C,buildURL:m,get:b,add:u,assign:a,merge:k,fromForm:g,fromURL:y}}(jQuery)}.call(this),function(){}.call(this),function(){up.protocol=function(t){var e,n,r,o,i,u,s,a,l;return l=up.util,i=function(t){return t.getResponseHeader(e.locationHeader)||t.responseURL},a=function(t){return t.getResponseHeader(e.titleHeader)},u=function(t){var n;if(n=t.getResponseHeader(e.methodHeader))return l.normalizeMethod(n)},o=l.memoize(function(){var t;return t=up.browser.popCookie(e.methodCookie),(t||"get").toLowerCase()}),up.bus.on("up:framework:booted",o),e=l.config({targetHeader:"X-Up-Target",failTargetHeader:"X-Up-Fail-Target",locationHeader:"X-Up-Location",validateHeader:"X-Up-Validate",titleHeader:"X-Up-Title",methodHeader:"X-Up-Method",methodCookie:"_up_method",methodParam:"_method",csrfParam:function(){return t('meta[name="csrf-param"]').attr("content")},csrfToken:function(){return t('meta[name="csrf-token"]').attr("content")},csrfHeader:"X-CSRF-Token"}),n=function(){return l.evalOption(e.csrfParam)},r=function(){return l.evalOption(e.csrfToken)},s=function(){return e.reset()},{config:e,reset:s,locationFromXhr:i,titleFromXhr:a,methodFromXhr:u,csrfParam:n,csrfToken:r,initialRequestMethod:o}}(jQuery)}.call(this),function(){var t=[].slice;up.log=function(){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m;return d=up.util,e=up.browser,f=new up.store.Session("up.log"),n=d.config({prefix:"[UP] ",enabled:f.get("enabled"),collapse:!1}),c=function(){return n.reset()},a=function(t){return""+n.prefix+t},r=function(){var r,o;if(o=arguments[0],r=2<=arguments.length?t.call(arguments,1):[],n.enabled&&o)return e.puts.apply(e,["debug",a(o)].concat(t.call(r)))},p=function(){var r,o;if(o=arguments[0],r=2<=arguments.length?t.call(arguments,1):[],n.enabled&&o)return e.puts.apply(e,["log",a(o)].concat(t.call(r)))},m=function(){var n,r;if(r=arguments[0],n=2<=arguments.length?t.call(arguments,1):[],r)return e.puts.apply(e,["warn",a(r)].concat(t.call(n)))},s=function(){var r,o,i,u;if(i=arguments[0],r=2<=arguments.length?t.call(arguments,1):[],o=r.pop(),!n.enabled||!i)return o();u=n.collapse?"groupCollapsed":"group",e.puts.apply(e,[u,a(i)].concat(t.call(r)));try{return o()}finally{i&&e.puts("groupEnd")}},u=function(){var n,r;if(r=arguments[0],n=2<=arguments.length?t.call(arguments,1):[],r)return e.puts.apply(e,["error",a(r)].concat(t.call(n)))},l=function(){var t;return t=" __ _____ ___ ___ / /_ __\n"+("/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n")+"\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",t+=n.enabled?"Call `up.log.disable()` to disable logging for this session.":"Call `up.log.enable()` to enable logging for this session.",e.puts("log",t)},up.on("up:framework:boot",l),up.on("up:framework:reset",c),h=function(t){return f.set("enabled",t),n.enabled=t},i=function(){return h(!0)},o=function(){return h(!1)},{puts:p,debug:r,error:u,warn:m,group:s,config:n,enable:i,disable:o}}(jQuery),up.puts=up.log.puts,up.warn=up.log.warn}.call(this),function(){var t=[].slice;up.toast=function(e){var n,r,o,i,u,s,a,l,p,c;return c=up.util,o=up.browser,n=function(t){return"<span class='up-toast-variable'>"+c.escapeHtml(t)+"</span>"},p=c.config({$toast:null}),l=function(){return i(),p.reset()},s=function(e){return c.isArray(e)?(e[0]=c.escapeHtml(e[0]),e=o.sprintfWithFormattedArgs.apply(o,[n].concat(t.call(e)))):e=c.escapeHtml(e),e},u=function(){return!!p.$toast},r=function(t,n,r){var o;return o=e('<span class="up-toast-action"></span>').text(n),o.on("click",r),o.appendTo(t)},a=function(t,n){var o,u,a,l;return null==n&&(n={}),i(),a=e('<div class="up-toast"></div>').prependTo("body"),u=e('<div class="up-toast-message"></div>').appendTo(a),o=e('<div class="up-toast-actions"></div>').appendTo(a),t=s(t),u.html(t),(l=n.action||n.inspect)&&r(o,l.label,l.callback),r(o,"Close",i),p.$toast=a},i=function(){if(u())return p.$toast.remove(),p.$toast=null},up.on("up:framework:reset",l),{open:a,close:i,reset:l,isOpen:u}}(jQuery)}.call(this),function(){var t=[].slice;up.syntax=function(){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m;return m=up.util,e={"[up-back]":-100,"[up-drawer]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},a=!0,i=[],l=[],c=function(){var e,r;return e=1<=arguments.length?t.call(arguments,0):[],r=n.apply(null,e),s(i,r)},h=function(){var e,r;return e=1<=arguments.length?t.call(arguments,0):[],r=n.apply(null,e),a&&(r.priority=u(r.selector)||up.fail("Unregistered priority for system macro %o",r.selector)),s(l,r)},u=function(t){var n,r;for(r in e)if(n=e[r],t.indexOf(r)>=0)return n},n=function(){var e,n,r,o;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n=e.pop(),r=m.extractOptions(e),r=m.options(r,{selector:o,isSystem:a,priority:0,batch:!1,keep:!1}),m.assign(n,r)},s=function(t,e){var n,r;for(r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e)},o=function(t,e){var n,r;return r=l.concat(i),n=new up.CompilePass(t,r,e),n.compile()},f=function(t,e){var n;return t=m.element(t),(n=t.upDestructors)||(n=[],t.upDestructors=n,t.classList.add("up-can-clean")),n.push(e)},r=function(t){var e;return e=m.selectInSubtree(t,".up-can-clean"),m.each(e,function(t){var e,n,r,o,i;if(n=t.upDestructors){for(i=[],r=0,o=n.length;r<o;r++)e=n[r],i.push(e());return i}})},p=function(t){var e;if(e=m.element(t))return m.jsonAttr(e,"up-data")||{}},d=function(){return i=m.select(i,"isSystem"),l=m.select(l,"isSystem")},up.on("up:framework:booted",function(){return a=!1}),up.on("up:framework:reset",d),{compiler:c,macro:h,destructor:f,compile:o,clean:r,data:p}}(jQuery),up.compiler=up.syntax.compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro}.call(this),function(){up.history=function(t){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m,v;return v=up.util,n=v.config({enabled:!0,popTargets:["body"],restoreScroll:!0}),p=void 0,u=void 0,d=function(){return n.reset(),p=void 0,u=void 0},s=function(t,e){return e||(e={}),e.hash=!0,v.normalizeUrl(t,e)},r=function(t){return s(up.browser.url(),t)},o=function(t){var e;return e={stripTrailingSlash:!0},s(t,e)===r(e)},a=function(t){return u&&(p=u,u=void 0),u=t},h=function(t){if(i("replaceState",t))return up.emit("up:history:replaced",{url:t})},c=function(t,e){if(e=v.options(e,{force:!1}),t=s(t),(e.force||!o(t))&&up.bus.nobodyPrevents("up:history:push",{url:t,message:"Adding history entry for "+t}))return i("pushState",t)?up.emit("up:history:pushed",{url:t,message:"Advanced to location "+t}):up.emit("up:history:muted",{url:t,message:"Did not advance to "+t+" (history is unavailable)"})},i=function(t,o){var i;return!(!up.browser.canPushState()||!n.enabled)&&(i=e(),window.history[t](i,"",o),a(r()),!0)},e=function(){return{fromUp:!0}},m=function(t){var e,o,i;return(null!=t?t.fromUp:void 0)?(i=r(),up.emit("up:history:restore",{url:i,message:"Restoring location "+i}),e=n.popTargets.join(", "),o=up.replace(e,i,{history:!1,title:!0,reveal:!1,transition:"none",saveScroll:!1,restoreScroll:n.restoreScroll,layer:"page"}),o.then(function(){return i=r(),up.emit("up:history:restored",{url:i,message:"Restored location "+i})})):up.puts("Ignoring a state not pushed by Unpoly (%o)",t)},l=function(t){var e;return a(r()),up.layout.saveScroll({url:p}),e=t.originalEvent.state,m(e)},up.browser.canPushState()&&(f=function(){return t(window).on("popstate",l),h(r(),{force:!0})},"undefined"!=typeof jasmine&&null!==jasmine?f():setTimeout(f,100)),up.macro("a[up-back], [up-href][up-back]",function(t){if(v.isPresent(p))return v.setMissingAttrs(t,{"up-href":p,"up-restore-scroll":""}),t.removeAttr("up-back"),up.link.makeFollowable(t)}),up.on("up:framework:reset",d),{config:n,push:c,replace:h,url:r,isUrl:o,previousUrl:function(){return p},normalizeUrl:s}}(jQuery)}.call(this),function(){var t=[].slice;up.layout=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C;return S=up.util,o=S.config({duration:0,viewports:[".up-modal-viewport","[up-viewport]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],snap:50,substance:150,easing:"swing"}),a=new up.Cache({size:30,key:up.history.normalizeUrl}),T=new up.MotionTracker("scrolling"),c=function(){return o.reset(),a.clear(),T.reset()},v=function(t,n,r){var u;return u=e(t),r=S.options(r),r.duration=S.option(r.duration,o.duration),r.easing=S.option(r.easing,o.easing),i(u).then(function(){return up.motion.isEnabled()&&r.duration>0?k(u,n,r):g(u,n)})},k=function(t,e,n){var r;return r=function(){var r,o;return r=function(){return t.finish()},t.on(T.eventName,r),o=t.animate({scrollTop:e},n).promise(),o.then(function(){return t.off(T.eventName)}),o},T.claim(t,r)},g=function(t,e){return t.scrollTop(e),Promise.resolve()},i=function(t){var e;return up.motion.isEnabled()?(e=E(t),T.finish(e)):Promise.resolve()},r=function(){var t;return t=o.anchoredRight.join(","),e(t)},l=function(){var n,r,i,u,s,a,l;return u=function(t,e){var n;return n=S.sum(e,function(e){return S.readComputedStyleNumber(t,e)})||0,n+t.offsetHeight},a=function(t){return u(t,["top","margin-top"])},s=function(t){return u(t,["bottom","margin-bottom"])},r=e(o.fixedTop.join(", ")),
|
3
|
-
n=e(o.fixedBottom.join(", ")),l=S.map(r,a),i=S.map(n,s),{top:Math.max.apply(Math,[0].concat(t.call(l))),bottom:Math.max.apply(Math,[0].concat(t.call(i)))}},h=function(t,n){var r;return r=e(t).first(),up.puts("Revealing fragment %o",r.get(0)),n=S.options(n),S.rejectOnError(function(){var t,i,u,s,a,p,c,f,h,d,m,g,y;return t=n.viewport?e(n.viewport):E(r),m=S.option(n.snap,o.snap),y=t.is(up.browser.documentViewportSelector()),g=y?S.clientSize().height:t.outerHeight(),f=t.scrollTop(),a=f,c=void 0,p=void 0,y?(p=l(g),c=0):(p={top:0,bottom:0},c=f),h=function(){return a+p.top},d=function(){return a+g-p.bottom},i=S.measure(r,{relative:t,includeMargin:!0}),u=i.top+c,s=u+Math.min(i.height,o.substance),s>d()&&(a+=s-d()),(u<h()||n.top)&&(a=u-p.top),a<m&&i.top<.5*g&&(a=0),a!==f?v(t,a,n):Promise.resolve()})},y=function(t,n){var r,o,i,u,s,a,l;return n=S.options(n),r=e(t),u=n.hash,a=n.reveal,s=n.restoreScroll,o=S.only(n,"duration"),s?(i=S.presence(s,S.isObject),f({around:r,scrollTops:i})):u&&a===!0?d(u,o):a?(S.isElement(a)||S.isJQuery(a)?r=e(a):S.isString(a)&&(l=up.dom.resolveSelector(a,n.origin),r=up.first(l)),r.length?h(r,o):void 0):Promise.resolve()},d=function(t){var e;return t&&(e=u(t))?h(e,{top:!0}):Promise.resolve()},P=function(){return[up.browser.documentViewportSelector()].concat(t.call(o.viewports)).join(",")},E=function(t,n){var r;return null==n&&(n={}),r=e(t),r.closest(P())},C=function(t){var n;return n=e(t),S.selectInSubtree(n,P())},x=function(){return e(P())},b=function(t){return S.selectorForElement(t)},w=function(){var t,n,r,i,u;for(u={},i=o.viewports,n=0,r=i.length;n<r;n++)t=i[n],e(t).each(function(){var t,n,r;return t=e(this),n=b(t),r=t.scrollTop(),u[n]=r});return u},s=function(t){var n,r;return null==t&&(t=void 0),t||(t=document.body),r=e(t),n=r.find("[up-fixed]"),S.isPresent(o.fixedTop)&&(n=n.add(r.find(o.fixedTop.join(", ")))),S.isPresent(o.fixedBottom)&&(n=n.add(r.find(o.fixedBottom.join(", ")))),n},m=function(t){var e,n;return null==t&&(t={}),n=S.option(t.url,up.history.url()),e=S.option(t.tops,w()),a.set(n,e)},f=function(t){var e,n,r,o,i;return null==t&&(t={}),i=up.history.url(),r=void 0,t.around?(n=C(t.around),e=E(t.around),r=e.add(n)):r=x(),o=t.scrollTops||a.get(i)||{},up.log.group("Restoring scroll positions for URL %s to %o",i,o,function(){var t;return t=S.map(r,function(t){var e,n;return e=b(t),n=o[e]||0,v(t,n,{duration:0})}),Promise.all(t)})},n=function(t,n){var r,o,i,u,s,a,l,p,c,f,h;for(n=S.options(n,{afterMeasure:S.noop}),i=up.layout.viewportOf(t),c=S.measure(t,{relative:!0,inner:!0}),f=t.offset(),n.afterMeasure(),S.writeInlineStyle(t,{position:"static"===S.readComputedStyle(t,"position")?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"}),r=e('<div class="up-bounds"></div>'),u=S.merge(c,{position:"absolute"}),S.writeInlineStyle(r,u),r.insertBefore(t),t.appendTo(r),h=c.top,p=function(t){if(0!==t)return h+=t,S.writeInlineStyle(r,{top:h})},p(f.top-t.offset().top),o=up.layout.fixedChildren(t),a=0,l=o.length;a<l;a++)s=o[a],S.fixedToAbsolute(s,i);return{$element:t,$bounds:r,moveTop:p}},u=function(t){var e,n;if(t=p(t))return e=S.attributeSelector("id",t),n="a"+S.attributeSelector("name",t),up.first(e+","+n)},p=function(t){return t&&"#"===t[0]&&(t=t.substr(1)),S.presence(t)},up.on("up:app:booted",function(){return d(location.hash)}),up.on("up:framework:reset",c),{reveal:h,revealHash:d,firstHashTarget:u,scroll:v,config:o,viewportOf:E,viewportsWithin:C,viewports:x,scrollTops:w,saveScroll:m,restoreScroll:f,scrollAfterInsertFragment:y,anchoredRight:r,fixedChildren:s,absolutize:n}}(jQuery),up.scroll=up.layout.scroll,up.reveal=up.layout.reveal,up.revealHash=up.layout.revealHash}.call(this),function(){up.dom=function(t){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C,F,$,A,O,R;return O=up.util,o=O.config({fallbacks:["body"],fallbackTransition:null}),S=function(){return o.reset()},P=function(e,n){var r;if(n!==!1)return r=t(e),O.isPresent(n)&&(n=O.normalizeUrl(n)),r.attr("up-source",n)},F=function(e){var n;return n=t(e).closest("[up-source]"),O.presence(n.attr("up-source"))||up.browser.url()},E=function(t,e){var n,r;return O.isString(t)?(r=t,O.contains(r,"&")&&(O.isPresent(e)?(n=O.selectorForElement(e),r=r.replace(/\&/,n)):up.fail("Found origin reference (%s) in selector %s, but no origin was given","&",r))):r=O.selectorForElement(t),r},T=function(t,e,n){var o,i,u,s,a,l,p,c,f,h;if(n=O.options(n),n.inspectResponse=u=function(){return up.browser.navigate(e,O.only(n,"method","params"))},!up.browser.canPushState()&&n.history!==!1)return n.preload||u(),O.unresolvablePromise();h=O.merge(n,{humanizedTarget:"target"}),i=O.merge(n,{humanizedTarget:"failure target",provideTarget:void 0,restoreScroll:!1}),O.renameKey(i,"failTransition","transition"),O.renameKey(i,"failLayer","layer"),O.renameKey(i,"failReveal","reveal");try{a=r(t,h),s=r(n.failTarget,i)}catch(t){return o=t,Promise.reject(o)}return f=new up.Request({url:e,method:n.method,data:n.data,params:n.params,target:a,failTarget:s,cache:n.cache,preload:n.preload,headers:n.headers,timeout:n.timeout}),p=function(t){return w(!0,a,f,t,h)},l=function(t){var e,n;return n=function(){return Promise.reject(t)},t.isFatalError()?n():(e=w(!1,s,f,t,i),O.always(e,n))},c=up.request(f),n.preload||(c=c.then(p,l)),c},w=function(t,e,n,r,o){var i,u,s,a;return a=r.url,u=a,(i=n.hash)&&(o.hash=i,u+=i),s="GET"===r.method,t?s?(o.history===!1||O.isString(o.history)||(o.history=u),o.source===!1||O.isString(o.source)||(o.source=a)):(O.isString(o.history)||(o.history=!1),O.isString(o.source)||(o.source="keep")):s?(o.history!==!1&&(o.history=u),o.source!==!1&&(o.source=a)):(o.history=!1,o.source="keep"),x(o)&&r.title&&(o.title=r.title),p(e,r.text,o)},x=function(t){return!(t.title===!1||O.isString(t.title)||t.history===!1&&t.title!==!0)},p=function(t,e,r){return up.log.group("Extracting %s from %d bytes of HTML",t,null!=e?e.length:void 0,function(){return r=O.options(r,{historyMethod:"push",keep:!0,layer:"auto"}),r.saveScroll!==!1&&up.layout.saveScroll(),O.rejectOnError(function(){var o,i,u,s,a,l,p;for("function"==typeof r.provideTarget&&r.provideTarget(),s=new up.HtmlParser(e),o=n(t,s,r),x(r)&&(a=s.title())&&(r.title=a),R(r),p=[],i=0,u=o.length;i<u;i++)l=o[i],up.log.group("Swapping fragment %s",l.selector,function(){var t,e;return t=O.merge(r,O.only(l,"origin","reveal")),s.prepareForInsertion(l.$new),e=$(l.$old,l.$new,l.pseudoClass,l.transition,t),p.push(e)});return Promise.all(p)})})},r=function(t,e){var n;return n=new up.ExtractCascade(t,e),n.bestPreflightSelector()},n=function(t,e,n){var r;return n=O.merge(n,{response:e}),r=new up.ExtractCascade(t,n),r.bestMatchingSteps()},R=function(t){if(t=O.options(t,{historyMethod:"push"}),t.history&&up.history[t.historyMethod](t.history),O.isString(t.title))return document.title=t.title},$=function(t,e,n,r,o){var i,a,p,f,h;return r||(r="none"),"keep"===o.source&&(o=O.merge(o,{source:F(t)})),P(e,o.source),n?(a=e.contents().wrapAll('<div class="up-insertion"></div>').parent(),"before"===n?t.prepend(a):t.append(a),m(a.children(),o),h=up.layout.scrollAfterInsertFragment(a,o),h=h.then(function(){return up.animate(a,r,o)}),h=h.then(function(){return O.unwrapElement(a)})):(p=c(t,e,o))?(l(p),Promise.resolve()):(o.keepPlans=A(t,e,o),i=t.parent(),f=O.merge(o,{beforeStart:function(){return y(t),u(t,{log:!1})},afterInsert:function(){return up.hello(e,o)},beforeDetach:function(){return up.syntax.clean(t)},afterDetach:function(){return t.remove(),s(t,{$parent:i,log:!1})}}),up.morph(t,e,r,f))},A=function(e,n,r){var o,i,u,s,a,l,p,f;if(s=[],r.keep)for(f=e.find("[up-keep]"),u=0,l=f.length;u<l;u++)a=f[u],o=t(a),(p=c(o,n,O.merge(r,{descendantsOnly:!0})))&&(i=o.clone(),O.detachWith(o,i),p.$newElement.replaceWith(o),s.push(p));return s},c=function(t,e,n){var r,o,i,u,s;if(n.keep&&(r=t,(u=O.castedAttr(r,"up-keep"))&&(O.isString(u)||(u="&"),u=E(u,r),o=n.descendantsOnly?e.find(u):O.selectInSubtree(e,u),o=o.first(),o.length&&o.is("[up-keep]")&&(s={$element:r,$newElement:o,newData:up.syntax.data(o)},i=O.merge(s,{message:["Keeping element %o",r.get(0)]}),up.bus.nobodyPrevents("up:fragment:keep",i)))))return s},m=function(e,n){var r,o,i,u,s,p;for(r=t(e),n=O.options(n,{keepPlans:[]}),i=[],p=n.keepPlans,o=0,u=p.length;o<u;o++)s=p[o],l(s),i.push(s.$element[0]);return up.syntax.compile(r,{skip:i}),a(r,n),r},a=function(t,e){return up.emit("up:fragment:inserted",{$element:t,message:["Inserted fragment %o",t.get(0)],origin:e.origin})},l=function(t){var e;return e=O.merge(t,{message:["Kept fragment %o",t.$element.get(0)]}),up.emit("up:fragment:kept",e)},u=function(t,e){var n;return C(t,e)&&(n=["Destroying fragment %o",t.get(0)]),up.emit("up:fragment:destroy",{$element:t,message:n})},s=function(t,e){var n,r;return C(t,e)&&(r=["Destroyed fragment %o",t.get(0)]),n=e.$parent||up.fail("Missing { $parent } option"),up.emit("up:fragment:destroyed",{$target:n,$parent:n,$element:t,message:r})},v=function(t){var e;return e=".up-destroying",0===t.closest(e).length},f=function(t,e){var n;return e=O.options(e,{layer:"auto"}),n=E(t,e.origin),"auto"===e.layer?d(n,e.origin):h(n,e.layer)},d=function(t,e){var n,r,o,i,u,s;for(i=["popup","modal","page"],n=void 0,O.isPresent(e)&&(s=g(e),O.remove(i,s),i.unshift(s)),r=0,u=i.length;r<u&&(o=i[r],!(n=h(t,o)));r++);return n},h=function(e,n){var r,o,i,u,s,a;for(o=t(e),i=void 0,s=0,a=o.length;s<a;s++)if(u=o[s],r=t(u),v(r)&&b(r,n)){i=r;break}return i},g=function(e){var n;if(n=t(e),n.length)return up.popup.contains(n)?"popup":up.modal.contains(n)?"modal":"page"},b=function(t,e){return!e||g(t)===e},e=function(e,n){var r,o;return n=O.options(n),o=E(e,n.origin),r=t(O.option(n.root,document)),r.find(o).filter(function(e,r){var o;return o=t(r),v(o)&&b(o,n.layer)})},i=function(e,n){var r,o,i;return r=t(e),n=O.options(n,{animation:!1}),0===r.length?Promise.resolve():(y(r),u(r,n),R(n),o=function(){var t;return t=up.motion.animateOptions(n),up.motion.animate(r,n.animation,t)},i=function(){var t;return t=r.parent(),up.syntax.clean(r),r.remove(),s(r,{$parent:t})},o().then(i))},C=function(t,e){return e.log!==!1&&!t.is(".up-placeholder, .up-tooltip, .up-modal, .up-popup")},y=function(t){return t.addClass("up-destroying")},k=function(t,e){var n;return e=O.options(e,{cache:!1}),n=e.url||F(t),T(t,n,e)},up.on("up:app:boot",function(){var e;return e=t(document.body),P(e,up.browser.url()),m(e)}),up.on("up:framework:reset",S),{replace:T,reload:k,destroy:i,extract:p,first:f,all:e,source:F,resolveSelector:E,hello:m,config:o,layerOf:g}}(jQuery),up.replace=up.dom.replace,up.extract=up.dom.extract,up.reload=up.dom.reload,up.destroy=up.dom.destroy,up.first=up.dom.first,up.all=up.dom.all,up.hello=up.dom.hello,up.deprecateRenamedModule("flow","dom")}.call(this),function(){var t=[].slice;up.motion=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C,F;return C=up.util,y={},a={},b={},l={},g=new up.MotionTracker("motion"),s=C.config({duration:300,delay:0,easing:"ease",enabled:!0}),T=function(){return g.reset(),y=C.copy(a),b=C.copy(l),s.reset()},d=function(){return s.enabled},r=function(t,n,r){var o,u,s,a;return o=e(t),r=i(r),u=p(n),a=F(o,n,r),a?(s=function(){return u(o,r)},g.claim(o,s,r)):S(o,n)},F=function(t,e,n){return n=i(n),d()&&!m(e)&&n.duration>0&&!C.isSingletonElement(t)},S=function(t,e){return C.isOptions(e)&&C.writeInlineStyle(t,e),Promise.resolve()},n=0,o=function(t,e,n){var r;return n=C.merge(n,{finishEvent:g.finishEvent}),r=new up.CssTransition(t,e,n),r.start()},i=function(){var e,n,r,o,i;return n=1<=arguments.length?t.call(arguments,0):[],i=n.shift()||{},e=C.isJQuery(n[0])?n.shift():C.nullJQuery(),o=C.isObject(n[0])?n.shift():{},r={},r.easing=C.option(i.easing,C.presentAttr(e,"up-easing"),o.easing,s.easing),r.duration=Number(C.option(i.duration,C.presentAttr(e,"up-duration"),o.duration,s.duration)),r.delay=Number(C.option(i.delay,C.presentAttr(e,"up-delay"),o.delay,s.delay)),r.trackMotion=i.trackMotion,r},c=function(t){return y[t]||up.fail("Unknown animation %o",t)},h=function(t){return g.finish(t)},v=function(t,n,r,o){var u,s,a,l,p,c,h,d,m,v,y,b,w,k,T;return o=C.options(o),o=C.assign(o,i(o)),a=e(t),s=e(n),u=a.add(s),k=f(r),T=F(a,k,o),d=C.pluckKey(o,"beforeStart")||C.noop,c=C.pluckKey(o,"afterInsert")||C.noop,h=C.pluckKey(o,"beforeDetach")||C.noop,p=C.pluckKey(o,"afterDetach")||C.noop,d(),y=function(){var t;return t=C.merge(o,{duration:0}),up.layout.scrollAfterInsertFragment(s,t)},T?g.isActive(a)&&o.trackMotion===!1?k(a,s,o):(up.puts("Morphing %o to %o with transition %o",a.get(0),s.get(0),r),l=up.layout.viewportOf(a),b=l.scrollTop(),m=up.layout.absolutize(a,{afterMeasure:function(){return s.insertBefore(a),c()}}),w=function(){var t;return t=y(),t=t.then(function(){var t;return t=l.scrollTop(),m.moveTop(t-b),k(a,s,o)}),t=t.then(function(){return h(),a.detach(),m.$bounds.remove(),p()})},g.claim(u,w,o)):(h(),P(a,s),c(),p(),v=y())},f=function(t){var e;if(!m(t))return C.isFunction(t)?t:C.isArray(t)?u.apply(null,t):C.isString(t)?t.indexOf("/")>=0?u.apply(null,t.split("/")):(e=b[t])?f(e):void 0:up.fail("Unknown transition %o",t)},u=function(t,e){var n,r;return m(t)&&m(t)?void 0:(r=p(t)||C.asyncNoop,n=p(e)||C.asyncNoop,function(t,e,o){return Promise.all([r(t,o),n(e,o)])})},p=function(t){return m(t)?void 0:C.isFunction(t)?t:C.isString(t)?c(t):C.isOptions(t)?function(e,n){return o(e,t,n)}:up.fail("Unknown animation %o",t)},P=function(t,e){return t.replaceWith(e)},k=function(t,e){return b[t]=f(e)},w=function(t,e){return y[t]=p(e)},E=function(){return a=C.copy(y),l=C.copy(b)},m=function(t){return!t||"none"===t||C.isBlank(t)},w("fade-in",function(t,e){return C.writeInlineStyle(t,{opacity:0}),o(t,{opacity:1},e)}),w("fade-out",function(t,e){return C.writeInlineStyle(t,{opacity:1}),o(t,{opacity:0},e)}),x=function(t,e){return{transform:"translate("+t+"px, "+e+"px)"}},w("move-to-top",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=n.top+n.height,o(t,x(0,-r),e)}),w("move-from-top",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=n.top+n.height,C.writeInlineStyle(t,x(0,-r)),o(t,x(0,0),e)}),w("move-to-bottom",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=C.clientSize().height-n.top,o(t,x(0,r),e)}),w("move-from-bottom",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=C.clientSize().height-n.top,C.writeInlineStyle(t,x(0,r)),o(t,x(0,0),e)}),w("move-to-left",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=n.left+n.width,o(t,x(-r,0),e)}),w("move-from-left",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=n.left+n.width,C.writeInlineStyle(t,x(-r,0)),o(t,x(0,0),e)}),w("move-to-right",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=C.clientSize().width-n.left,o(t,x(r,0),e)}),w("move-from-right",function(t,e){var n,r;return C.writeInlineStyle(t,x(0,0)),n=C.measure(t),r=C.clientSize().width-n.left,C.writeInlineStyle(t,x(r,0)),o(t,x(0,0),e)}),w("roll-down",function(t,e){var n,o,i;return o=t.height(),i=C.writeTemporaryStyle(t,{height:"0px",overflow:"hidden"}),n=r(t,{height:o+"px"},e),n.then(i),n}),k("move-left",["move-to-left","move-from-right"]),k("move-right",["move-to-right","move-from-left"]),k("move-up",["move-to-top","move-from-bottom"]),k("move-down",["move-to-bottom","move-from-top"]),k("cross-fade",["fade-out","fade-in"]),up.on("up:framework:booted",E),up.on("up:framework:reset",T),{morph:v,animate:r,animateOptions:i,willAnimate:F,finish:h,finishCount:function(){return g.finishCount},transition:k,animation:w,config:s,isEnabled:d,isNone:m}}(jQuery),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var t=[].slice;up.proxy=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C,F,$,A,O,R,j,D,M,U;return M=up.util,n=void 0,S=void 0,O=void 0,b=void 0,R=void 0,P=[],l=M.config({slowDelay:300,preloadDelay:75,cacheSize:70,cacheExpiry:3e5,maxRequests:4,wrapMethods:["PATCH","PUT","DELETE"],safeMethods:["GET","OPTIONS","HEAD"]}),i=new up.Cache({size:function(){return l.cacheSize},expiry:function(){return l.cacheExpiry},key:function(t){return up.Request.wrap(t).cacheKey()},cachable:function(t){return up.Request.wrap(t).isCachable()}}),p=function(t){var e,n,r,o,u,s,a;for(t=up.Request.wrap(t),n=[t],"html"!==t.target&&(s=t.copy({target:"html"}),n.push(s),"body"!==t.target&&(u=t.copy({target:"body"}),n.push(u))),r=0,o=n.length;r<o;r++)if(e=n[r],a=i.get(e))return a},u=function(){return clearTimeout(S),S=null},s=function(){return clearTimeout(O),O=null},F=function(){return n=null,u(),s(),b=0,l.reset(),i.clear(),R=!1,P=[]},F(),y=function(){var e,n,r,o,i,u;return e=1<=arguments.length?t.call(arguments,0):[],M.isString(e[0])&&(u=e.shift()),i=e.shift()||{},u&&(i.url=u),o=up.Request.wrap(i),o.isSafe()||a(),n=o.cache===!1,!n&&(r=p(o))?up.puts("Re-using cached response for %s %s",o.method,o.url):(r=v(o),A(o,r),r["catch"](function(){return C(o)})),o.preload||(g(),M.always(r,m)),r},r=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],up.warn("up.ajax() has been deprecated. Use up.request() instead."),new Promise(function(t,n){var r;return r=function(e){return t(e.text)},y.apply(null,e).then(r,n)})},f=function(){return 0===b},c=function(){return b>0},g=function(){var t;if(b+=1,!O)return t=function(){if(c())return up.emit("up:proxy:slow",{message:"Proxy is slow to respond"}),R=!0},O=M.setTimer(l.slowDelay,t)},m=function(){if(b-=1,f()&&(s(),R))return up.emit("up:proxy:recover",{message:"Proxy has recovered from slow response"}),R=!1},v=function(t){return b<l.maxRequests?d(t):E(t)},E=function(t){var e;return up.puts("Queuing request for %s %s",t.method,t.url),e=function(){return d(t)},e=M.previewable(e),P.push(e),e.promise},d=function(t){var e,n;return e={request:t,message:["Loading %s %s",t.method,t.url]},up.bus.nobodyPrevents("up:proxy:load",e)?(n=t.send(),M.always(n,$),M.always(n,w),n):(M.microtask(w),Promise.reject(new Error("Event up:proxy:load was prevented")))},x=function(t){var e,n;if(n=t.request,t.url&&n.url!==t.url)return e=n.copy({method:t.method,url:t.url}),up.proxy.alias(n,e)},$=function(t){return t.isFatalError()?up.emit("up:proxy:fatal",{message:"Fatal error during request",request:t.request,response:t}):(t.isError()||x(t),up.emit("up:proxy:loaded",{message:["Server responded with HTTP %d (%d bytes)",t.status,t.text.length],request:t.request,response:t}))},w=function(){var t;"function"==typeof(t=P.shift())&&t()},o=i.alias,A=i.set,C=i.remove,a=i.clear,up.bus.deprecateRenamedEvent("up:proxy:received","up:proxy:loaded"),T=function(t){var e,r;if(r=parseInt(M.presentAttr(t,"up-delay"))||l.preloadDelay,!t.is(n))return n=t,u(),e=function(){return M.muteRejection(k(t)),n=null},j(e,r)},j=function(t,e){return S=setTimeout(t,e)},D=function(t){if(t.is(n))return n=void 0,u()},k=function(t,n){var r,o;return r=e(t),up.link.isSafe(r)?(o={message:["Preloading link %o",r.get(0)],$element:r,$link:r},up.bus.whenEmitted("up:link:preload",o).then(function(){var t;return t=up.link.followVariantForLink(r),t.preloadLink(r,n)})):Promise.reject(new Error("Won't preload unsafe link"))},h=function(t){return M.contains(l.safeMethods,t)},U=function(t,e){return M.contains(l.wrapMethods,t)&&(e=up.params.add(e,up.protocol.config.methodParam,t),t="POST"),[t,e]},up.compiler("a[up-preload], [up-href][up-preload]",function(t){if(up.link.isSafe(t))return t.on("mouseenter touchstart",function(e){if(up.link.shouldProcessEvent(e,t))return T(t)}),t.on("mouseleave",function(){return D(t)})}),up.on("up:framework:reset",F),{preload:k,ajax:r,request:y,get:p,alias:o,clear:a,remove:C,isIdle:f,isBusy:c,isSafeMethod:h,wrapMethod:U,config:l}}(jQuery),up.ajax=up.proxy.ajax,up.request=up.proxy.request}.call(this),function(){up.link=function(t){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m;return d=up.util,m=function(t,e){var n;return e=d.options(e),n=d.option(e.target,"body"),up.replace(n,t,e)},u=function(e,n){var r,o;return r=t(e),o=a(r),o.followLink(r,n)},o=function(e,n){var r,o,i;return r=t(e),n=d.options(n),i=d.option(n.url,r.attr("up-href"),r.attr("href")),o=d.option(n.target,r.attr("up-target")),n.failTarget=d.option(n.failTarget,r.attr("up-fail-target")),n.fallback=d.option(n.fallback,r.attr("up-fallback")),n.transition=d.option(n.transition,d.castedAttr(r,"up-transition"),"none"),n.failTransition=d.option(n.failTransition,d.castedAttr(r,"up-fail-transition"),"none"),n.history=d.option(n.history,d.castedAttr(r,"up-history")),n.reveal=d.option(n.reveal,d.castedAttr(r,"up-reveal"),!0),n.failReveal=d.option(n.failReveal,d.castedAttr(r,"up-fail-reveal"),!0),n.cache=d.option(n.cache,d.castedAttr(r,"up-cache")),n.restoreScroll=d.option(n.restoreScroll,d.castedAttr(r,"up-restore-scroll")),n.method=s(r,n),n.origin=d.option(n.origin,r),n.layer=d.option(n.layer,r.attr("up-layer"),"auto"),n.failLayer=d.option(n.failLayer,r.attr("up-fail-layer"),"auto"),n.confirm=d.option(n.confirm,r.attr("up-confirm")),n=d.merge(n,up.motion.animateOptions(n,r)),up.browser.whenConfirmed(n).then(function(){return up.replace(o,i,n)})},i=function(t,e){return e=d.options(e),e.preload=!0,o(t,e)},s=function(e,n){var r;return r=t(e),n=d.options(n),d.option(n.method,r.attr("up-method"),r.attr("data-method"),"get").toUpperCase()},r=function(){},l=[],n=function(t,e){var n;return n=new up.FollowVariant(t,e),l.push(n),n.registerEvents(),n},p=function(t){return!!a(t,{"default":!1})},a=function(n,r){var o,i;return r=d.options(r),o=t(n),i=d.detect(l,function(t){return t.matchesLink(o)}),r["default"]!==!1&&(i||(i=e)),i},f=function(e){var n;if(n=t(e),!p(n))return n.attr("up-follow","")},h=function(e,n){var r,o;return o=e.target,!!d.isUnmodifiedMouseEvent(e)&&(o===n.get(0)||(r=t(o).closest("a, [up-href], "+up.form.fieldSelector()).not(n),!r.length))},c=function(e,n){var r,o;return r=t(e),o=s(r,n),up.proxy.isSafeMethod(o)},e=n("[up-target], [up-follow]",{follow:function(t,e){return o(t,e)},preload:function(t,e){return i(t,e)}}),up.macro("[up-dash]",function(t){var e,n;return n=d.castedAttr(t,"up-dash"),t.removeAttr("up-dash"),e={"up-preload":"","up-instant":""},n===!0?f(t):e["up-target"]=n,d.setMissingAttrs(t,e)}),up.macro("[up-expand]",function(e){var n,r,o,i,u,s,a,l,p,c;if(n=e.find("a, [up-href]"),(p=e.attr("up-expand"))&&(n=n.filter(p)),u=n.get(0)){for(c=/^up-/,a={},a["up-href"]=t(u).attr("href"),l=u.attributes,o=0,i=l.length;o<i;o++)r=l[o],s=r.name,s.match(c)&&(a[s]=r.value);return d.setMissingAttrs(e,a),e.removeAttr("up-expand"),f(e)}}),{visit:m,follow:u,makeFollowable:f,isSafe:c,isFollowable:p,shouldProcessEvent:h,followMethod:s,addFollowVariant:n,followVariantForLink:a,allowDefault:r}}(jQuery),up.visit=up.link.visit,up.follow=up.link.follow}.call(this),function(){var t=[].slice;up.form=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v;return m=up.util,r=m.config({validateTargets:["[up-fieldset]:has(&)","fieldset:has(&)","label:has(&)","form:has(&)"],fields:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitButtons:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}),a=function(){return r.reset()},o=function(){return r.fields.join(",")},c=function(){return r.submitButtons.join(",")},p=function(t,n){var r,o,i;return r=e(t).closest("form"),n=m.options(n),o=m.option(n.target,r.attr("up-target"),"body"),i=m.option(n.url,r.attr("action"),up.browser.url()),n.failTarget=m.option(n.failTarget,r.attr("up-fail-target"))||m.selectorForElement(r),n.reveal=m.option(n.reveal,m.castedAttr(r,"up-reveal"),!0),n.failReveal=m.option(n.failReveal,m.castedAttr(r,"up-fail-reveal"),!0),n.fallback=m.option(n.fallback,r.attr("up-fallback")),n.history=m.option(n.history,m.castedAttr(r,"up-history"),!0),n.transition=m.option(n.transition,m.castedAttr(r,"up-transition"),"none"),n.failTransition=m.option(n.failTransition,m.castedAttr(r,"up-fail-transition"),"none"),n.method=m.option(n.method,r.attr("up-method"),r.attr("data-method"),r.attr("method"),"post").toUpperCase(),n.headers=m.option(n.headers,{}),n.cache=m.option(n.cache,m.castedAttr(r,"up-cache")),n.restoreScroll=m.option(n.restoreScroll,m.castedAttr(r,"up-restore-scroll")),n.origin=m.option(n.origin,r),n.layer=m.option(n.layer,r.attr("up-layer"),"auto"),n.failLayer=m.option(n.failLayer,r.attr("up-fail-layer"),"auto"),n.params=up.params.fromForm(r),n=m.merge(n,up.motion.animateOptions(n,r)),n.validate&&(n.headers||(n.headers={}),n.transition=!1,n.failTransition=!1,n.headers[up.protocol.config.validateHeader]=n.validate),up.bus.whenEmitted("up:form:submit",{message:"Submitting form",$form:r,$element:r}).then(function(){var t;return up.feedback.start(r),up.browser.canPushState()||n.history===!1?(t=up.replace(o,i,n),m.always(t,function(){return up.feedback.stop(r)}),t):(r.get(0).submit(),m.unresolvablePromise())})},u=function(){var n,i,u,a,l,p,c,f,h,d;return d=arguments[0],c=2<=arguments.length?t.call(arguments,1):[],f={},a=void 0,1===c.length?a=c[0]:c.length>1&&(f=m.options(c[0]),a=c[1]),n=e(d),u=null,h=m.option(a,m.presentAttr(n,"up-observe")),u=m.isString(h)?new Function("value","$field",h):h||up.fail("up.observe: No change callback given"),l=m.option(m.presentAttr(n,"up-delay"),f.delay,r.observeDelay),l=parseInt(l),i=m.selectInSubtree(n,o()),p=m.map(i,function(t){return s(e(t),l,u)}),m.sequence.apply(m,p)},s=function(t,e,n){var r;return r=new up.FieldObserver(t,{delay:e,callback:n}),r.start(),r.stop},n=function(t,e){return u(t,e,function(t,e){var n;return n=e.closest("form"),up.feedback.start(e,function(){return p(n)})})},l=function(t,e){var n;return n=m.option(e.target,t.attr("up-validate")),m.isBlank(n)&&(n||(n=m.detect(r.validateTargets,function(n){var r;return r=up.dom.resolveSelector(n,e.origin),t.closest(r).length}))),m.isBlank(n)&&up.fail("Could not find default validation target for %o (tried ancestors %o)",t.get(0),r.validateTargets),m.isString(n)||(n=m.selectorForElement(n)),n},v=function(t,n){var r,o,i;return r=e(t),n=m.options(n),n.origin=r,n.target=l(r,n),n.failTarget=n.target,n.reveal=m.option(n.reveal,m.castedAttr(r,"up-reveal"),!1),n.history=!1,n.headers=m.option(n.headers,{}),n.validate=r.attr("name")||"__none__",n=m.merge(n,up.motion.animateOptions(n,r)),o=r.closest("form"),i=up.submit(o,n)},d=function(t){var e,n,r,o;return t.is("input[type=checkbox]")?t.is(":checked")?(r=t.val(),n=":checked"):n=":unchecked":t.is("input[type=radio]")?(e=t.closest("form, body").find("input[type='radio'][name='"+t.attr("name")+"']:checked"),e.length?(n=":checked",r=e.val()):n=":unchecked"):r=t.val(),o=[],m.isPresent(r)?(o.push(r),o.push(":present")):o.push(":blank"),m.isPresent(n)&&o.push(n),o},h=function(t,n){var r,o,i;return r=e(t),n=m.options(n),i=m.option(n.target,r.attr("up-switch")),m.isPresent(i)||up.fail("No switch target given for %o",r.get(0)),o=d(r),e(i).each(function(){return f(e(this),o)})},f=function(t,n){var r,o,u,s;return r=e(t),n||(n=d(i(r))),(o=r.attr("up-hide-for"))?(o=m.splitValues(o),u=0===m.intersect(n,o).length):(s=(s=r.attr("up-show-for"))?m.splitValues(s):[":present",":checked"],u=m.intersect(n,s).length>0),r.toggle(u),r.addClass("up-switched")},i=function(t){var n,r;return n=e("[up-switch]"),r=m.detect(n,function(n){var r;return r=e(n).attr("up-switch"),t.is(r)}),r?e(r):m.fail("Could not find [up-switch] field for %o",t.get(0))},up.on("submit","form[up-target]",function(t,e){return up.bus.consumeAction(t),m.muteRejection(p(e))}),up.on("change","[up-validate]",function(t,e){return m.muteRejection(v(e))}),up.compiler("[up-switch]",function(t){return h(t)}),up.on("change","[up-switch]",function(t,e){return h(e)}),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",function(t){return f(t)}),up.compiler("[up-observe]",function(t){return u(t)}),up.compiler("[up-autosubmit]",function(t){return n(t)}),up.compiler("[autofocus]",{batch:!0},function(t){return t.last().focus()}),up.on("up:framework:reset",a),{config:r,submit:p,observe:u,validate:v,switchTargets:h,autosubmit:n,fieldSelector:o,submitButtonSelector:c}}(jQuery),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){up.popup=function(t){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y;return g=up.util,a=g.config({openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:150,closeDuration:100,openEasing:null,closeEasing:null,position:"bottom-right",history:!1}),m=g.config({phase:"closed",$anchor:null,$popup:null,position:null,sticky:null,url:null,coveredUrl:null,coveredTitle:null}),i=new g.DivertibleChain,d=function(){var t;return null!=(t=m.$popup)&&t.remove(),m.reset(),i.reset(),a.reset()},e=function(){var t,e,n;switch(n={},e=g.measure(m.$popup),g.isFixed(m.$anchor)?(t=m.$anchor.get(0).getBoundingClientRect(),n.position="fixed"):t=g.measure(m.$anchor),m.position){case"bottom-right":n.top=t.top+t.height,n.left=t.left+t.width-e.width;break;case"bottom-left":n.top=t.top+t.height,n.left=t.left;break;case"top-right":n.top=t.top-e.height,n.left=t.left+t.width-e.width;break;case"top-left":n.top=t.top-e.height,n.left=t.left;break;default:up.fail("Unknown position option '%s'",m.position)}return m.$popup.attr("up-position",m.position),g.writeInlineStyle(m.$popup,n)},c=function(){return m.coveredTitle=null,m.coveredUrl=null},p=function(t){var e;return e=g.$createElementFromSelector(".up-popup"),g.$createPlaceholder(t,e),e.hide(),e.appendTo(document.body),m.$popup=e},y=function(){return m.$popup.show()},f=function(){return"opened"===m.phase||"opening"===m.phase},n=function(t,e){return i.asap(s,function(){return r(t,e)})},r=function(n,r){var o,i,u,s,l,c,f;return o=t(n),o.length||up.fail("Cannot attach popup to non-existing element %o",n),r=g.options(r),f=g.option(g.pluckKey(r,"url"),o.attr("up-href"),o.attr("href")),s=g.option(g.pluckKey(r,"html")),f||s||up.fail("up.popup.attach() requires either an { url } or { html } option"),c=g.option(g.pluckKey(r,"target"),o.attr("up-popup"))||up.fail("No target selector given for [up-popup]"),l=g.option(r.position,o.attr("up-position"),a.position),r.animation=g.option(r.animation,o.attr("up-animation"),a.openAnimation),r.sticky=g.option(r.sticky,g.castedAttr(o,"up-sticky"),a.sticky),r.history=!!up.browser.canPushState()&&g.option(r.history,g.castedAttr(o,"up-history"),a.history),r.confirm=g.option(r.confirm,o.attr("up-confirm")),r.method=up.link.followMethod(o,r),r.layer="popup",r.failTarget=g.option(r.failTarget,o.attr("up-fail-target")),r.failLayer=g.option(r.failLayer,o.attr("up-fail-layer"),"auto"),r.provideTarget=function(){return p(c)},i=up.motion.animateOptions(r,o,{duration:a.openDuration,easing:a.openEasing}),u=g.merge(r,{animation:!1}),r.preload&&f?up.replace(c,f,r):up.browser.whenConfirmed(r).then(function(){return up.bus.whenEmitted("up:popup:open",{url:f,message:"Opening popup"}).then(function(){var t;return m.phase="opening",m.$anchor=o,m.position=l,r.history&&(m.coveredUrl=up.browser.url(),m.coveredTitle=document.title),m.sticky=r.sticky,t=s?up.extract(c,s,u):up.replace(c,f,u),t=t.then(function(){return e(),y(),up.animate(m.$popup,r.animation,i)}),t=t.then(function(){return m.phase="opened",up.emit("up:popup:opened",{message:"Popup opened"})})})})},u=function(t){return i.asap(function(){return s(t)})},s=function(t){var e;return f()?(t=g.options(t,{animation:a.closeAnimation,history:m.coveredUrl,title:m.coveredTitle}),e=up.motion.animateOptions(t,{duration:a.closeDuration,easing:a.closeEasing}),g.assign(t,e),up.bus.whenEmitted("up:popup:close",{message:"Closing popup",$element:m.$popup}).then(function(){return m.phase="closing",m.url=null,m.coveredUrl=null,m.coveredTitle=null,up.destroy(m.$popup,t).then(function(){return m.phase="closed",m.$popup=null,m.$anchor=null,m.sticky=null,up.emit("up:popup:closed",{message:"Popup closed"})})})):Promise.resolve()},h=function(t,e){return e=g.options(e),e.preload=!0,r(t,e)},v=function(t,e){return g.hasClass(t,"up-current")?u():n(t,e)},o=function(){if(!m.sticky)return c(),u()},l=function(e){var n;return n=t(e),n.closest(".up-popup").length>0},up.link.addFollowVariant("[up-popup]",{follow:function(t,e){return v(t,e)},preload:function(t,e){return h(t,e)}}),up.on("click up:action:consumed",function(e){var n;if(n=t(e.target),!n.closest(".up-popup, [up-popup]").length)return g.muteRejection(u())}),up.on("up:fragment:inserted",function(t,e){var n;if(l(e)){if(n=e.attr("up-source"))return m.url=n}else if(t.origin&&l(t.origin))return g.muteRejection(o())}),up.bus.onEscape(function(){return g.muteRejection(u())}),up.on("click",".up-popup [up-close]",function(t){return g.muteRejection(u()),up.bus.consumeAction(t)}),up.on("up:history:restore",function(){return g.muteRejection(u())}),up.on("up:framework:reset",d),
|
4
|
-
{attach:n,close:u,url:function(){return m.url},coveredUrl:function(){return m.coveredUrl},config:a,contains:l,isOpen:f}}(jQuery)}.call(this),function(){up.modal=function(t){var e,n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,E,P,x,C,F,$;return P=up.util,u=P.config({maxWidth:null,width:null,height:null,history:!0,openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,backdropOpenAnimation:"fade-in",backdropCloseAnimation:"fade-out",closeLabel:"\xd7",closable:!0,sticky:!1,flavor:"default",position:null,template:function(t){return'<div class="up-modal">\n <div class="up-modal-backdrop"></div>\n <div class="up-modal-viewport">\n <div class="up-modal-dialog">\n <div class="up-modal-content"></div>\n <div class="up-modal-close" up-close>'+t.closeLabel+"</div>\n </div>\n </div>\n</div>"}}),d=P.openConfig({"default":{}}),S=P.config(function(){return{phase:"closed",$anchor:null,$modal:null,sticky:null,closable:null,flavor:null,url:null,coveredUrl:null,coveredTitle:null,position:null,unshifters:[]}}),r=new P.DivertibleChain,k=function(){var t;return null!=(t=S.$modal)&&t.remove(),x(),S.reset(),r.reset(),u.reset(),d.reset()},E=function(){var t;return t=f("template"),P.evalOption(t,{closeLabel:f("closeLabel")})},l=function(){return S.coveredTitle=null,S.coveredUrl=null},a=function(e,n){var r,o,i,u;return i=t(E()),i.attr("up-flavor",S.flavor),P.isPresent(S.position)&&i.attr("up-position",S.position),o=i.find(".up-modal-dialog"),u=P.only(n,"width","maxWidth","height"),P.writeInlineStyle(o,u),S.closable||i.find(".up-modal-close").remove(),r=i.find(".up-modal-content"),P.$createPlaceholder(e,r),i.hide(),i.appendTo(document.body),S.$modal=i},C=function(){return S.$modal.show()},T=function(){var e,n,r,o,i;if(P.documentHasVerticalScrollbar())return e=t("body"),o=P.scrollbarWidth(),n=P.readComputedStyleNumber(e,"paddingRight"),r=o+n,i=P.writeTemporaryStyle(e,{paddingRight:r,overflowY:"hidden"}),S.unshifters.push(i),up.layout.anchoredRight().each(function(){var e,n,r,i;return e=t(this),n=P.readComputedStyleNumber(e,"right"),r=o+n,i=P.writeTemporaryStyle(e,{right:r}),S.unshifters.push(i)})},x=function(){var t,e;for(t=[];e=S.unshifters.pop();)t.push(e());return t},v=function(){return"opened"===S.phase||"opening"===S.phase},m=function(e,n){return n=P.options(n),n.$link=t(e),y(n)},w=function(t,e){return e=P.options(e),e.$link=t,e.preload=!0,b(e)},$=function(t,e){return e=P.options(e),e.url=t,y(e)},p=function(t,e,n){return n=P.options(n),n.html=e,n.history=P.option(n.history,!1),n.target=t,y(n)},y=function(t){return r.asap(i,function(){return b(t)})},b=function(t){var n,r,o,i,s;return t=P.options(t),n=P.option(P.pluckKey(t,"$link"),P.nullJQuery()),s=P.option(P.pluckKey(t,"url"),n.attr("up-href"),n.attr("href")),o=P.option(P.pluckKey(t,"html")),i=P.option(P.pluckKey(t,"target"),n.attr("up-modal")),F(i),t.flavor=P.option(t.flavor,n.attr("up-flavor"),u.flavor),t.position=P.option(t.position,n.attr("up-position"),f("position",t.flavor)),t.position=P.evalOption(t.position,{$link:n}),t.width=P.option(t.width,n.attr("up-width"),f("width",t.flavor)),t.maxWidth=P.option(t.maxWidth,n.attr("up-max-width"),f("maxWidth",t.flavor)),t.height=P.option(t.height,n.attr("up-height"),f("height")),t.animation=P.option(t.animation,n.attr("up-animation"),f("openAnimation",t.flavor)),t.animation=P.evalOption(t.animation,{position:t.position}),t.backdropAnimation=P.option(t.backdropAnimation,n.attr("up-backdrop-animation"),f("backdropOpenAnimation",t.flavor)),t.backdropAnimation=P.evalOption(t.backdropAnimation,{position:t.position}),t.sticky=P.option(t.sticky,P.castedAttr(n,"up-sticky"),f("sticky",t.flavor)),t.closable=P.option(t.closable,P.castedAttr(n,"up-closable"),f("closable",t.flavor)),t.confirm=P.option(t.confirm,n.attr("up-confirm")),t.method=up.link.followMethod(n,t),t.layer="modal",t.failTarget=P.option(t.failTarget,n.attr("up-fail-target")),t.failLayer=P.option(t.failLayer,n.attr("up-fail-layer"),"auto"),r=up.motion.animateOptions(t,n,{duration:f("openDuration",t.flavor),easing:f("openEasing",t.flavor)}),t.history=P.option(t.history,P.castedAttr(n,"up-history"),f("history",t.flavor)),up.browser.canPushState()||(t.history=!1),t.provideTarget=function(){return a(i,t)},t.preload?up.replace(i,s,t):up.browser.whenConfirmed(t).then(function(){return up.bus.whenEmitted("up:modal:open",{url:s,message:"Opening modal"}).then(function(){var n,u;return S.phase="opening",S.flavor=t.flavor,S.sticky=t.sticky,S.closable=t.closable,S.position=t.position,t.history&&(S.coveredUrl=up.browser.url(),S.coveredTitle=document.title),n=P.merge(t,{animation:!1}),u=o?up.extract(i,o,n):up.replace(i,s,n),u=u.then(function(){return T(),C(),e(t.animation,t.backdropAnimation,r)}),u=u.then(function(){return S.phase="opened",up.emit("up:modal:opened",{message:"Modal opened"})})})})},F=function(t){return P.isBlank(t)?up.fail("Cannot open a modal without a target selector"):"body"===t?up.fail("Cannot open the <body> in a modal"):void 0},o=function(t){return r.asap(function(){return i(t)})},i=function(t){var n,r,o,i;return t=P.options(t),v()?(i=P.option(t.animation,f("closeAnimation")),i=P.evalOption(i,{position:S.position}),r=P.option(t.backdropAnimation,f("backdropCloseAnimation")),r=P.evalOption(r,{position:S.position}),n=up.motion.animateOptions(t,{duration:f("closeDuration"),easing:f("closeEasing")}),o=P.options(P.except(t,"animation","duration","easing","delay"),{history:S.coveredUrl,title:S.coveredTitle}),up.bus.whenEmitted("up:modal:close",{$element:S.$modal,message:"Closing modal"}).then(function(){var t;return S.phase="closing",S.url=null,S.coveredUrl=null,S.coveredTitle=null,t=e(i,r,n),t=t.then(function(){return up.destroy(S.$modal,o)}),t=t.then(function(){return x(),S.phase="closed",S.$modal=null,S.flavor=null,S.sticky=null,S.closable=null,S.position=null,up.emit("up:modal:closed",{message:"Modal closed"})})})):Promise.resolve()},g=function(t){return null==t&&(t=!0),S.$modal.toggleClass("up-modal-animating",t)},e=function(t,e,n){var r;return up.motion.isNone(t)?Promise.resolve():(g(),r=Promise.all([up.animate(S.$modal.find(".up-modal-viewport"),t,n),up.animate(S.$modal.find(".up-modal-backdrop"),e,n)]),r=r.then(function(){return g(!1)}))},n=function(){if(!S.sticky)return l(),o()},s=function(e){var n;return n=t(e),n.closest(".up-modal").length>0},c=function(t,e){return null==e&&(e={}),up.warn("up.modal.flavor() is deprecated. Use the up.modal.flavors property instead."),P.assign(h(t),e)},h=function(t){return d[t]||(d[t]={})},f=function(t,e){var n;return null==e&&(e=S.flavor),e&&(n=h(e)[t]),P.isMissing(n)&&(n=u[t]),n},up.link.addFollowVariant("[up-modal]",{follow:function(t,e){return m(t,e)},preload:function(t,e){return w(t,e)}}),up.on("click",".up-modal",function(e){var n;if(S.closable)return n=t(e.target),n.closest(".up-modal-dialog").length||n.closest("[up-modal]").length?void 0:(up.bus.consumeAction(e),P.muteRejection(o()))}),up.on("up:fragment:inserted",function(t,e){var r;if(s(e)){if(r=e.attr("up-source"))return S.url=r}else if(t.origin&&s(t.origin)&&!up.popup.contains(e))return P.muteRejection(n())}),up.bus.onEscape(function(){if(S.closable)return P.muteRejection(o())}),up.on("click",".up-modal [up-close]",function(t){return P.muteRejection(o()),up.bus.consumeAction(t)}),up.macro("a[up-drawer], [up-href][up-drawer]",function(t){var e;return e=t.attr("up-drawer"),t.attr({"up-modal":e,"up-flavor":"drawer"})}),d.drawer={openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}},position:function(t){return P.isPresent(t.$link)?P.horizontalScreenHalf(t.$link):"left"}},up.on("up:history:restore",function(){return P.muteRejection(o())}),up.on("up:framework:reset",k),{visit:$,follow:m,extract:p,close:o,url:function(){return S.url},coveredUrl:function(){return S.coveredUrl},config:u,flavors:d,contains:s,isOpen:v,flavor:c}}(jQuery)}.call(this),function(){up.tooltip=function(t){var e,n,r,o,i,u,s,a,l,p,c,f;return f=up.util,s=f.config({position:"top",openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:100,closeDuration:50,openEasing:null,closeEasing:null}),c=f.config({phase:"closed",$anchor:null,$tooltip:null,position:null}),o=new f.DivertibleChain,p=function(){var t;return null!=(t=c.$tooltip)&&t.remove(),c.reset(),o.reset(),s.reset()},e=function(){var t,e,n;switch(e={},n=f.measure(c.$tooltip),f.isFixed(c.$anchor)?(t=c.$anchor.get(0).getBoundingClientRect(),e.position="fixed"):t=f.measure(c.$anchor),c.position){case"top":e.top=t.top-n.height,e.left=t.left+.5*(t.width-n.width);break;case"left":e.top=t.top+.5*(t.height-n.height),e.left=t.left-n.width;break;case"right":e.top=t.top+.5*(t.height-n.height),e.left=t.left+t.width;break;case"bottom":e.top=t.top+t.height,e.left=t.left+.5*(t.width-n.width);break;default:up.fail("Unknown position option '%s'",c.position)}return c.$tooltip.attr("up-position",c.position),f.writeInlineStyle(c.$tooltip,e)},a=function(t){var e;return e=f.$createElementFromSelector(".up-tooltip"),f.isGiven(t.text)?e.text(t.text):e.html(t.html),e.appendTo(document.body),c.$tooltip=e},n=function(t,e){return null==e&&(e={}),o.asap(u,function(){return r(t,e)})},r=function(n,r){var o,i,u,l,p,h;return o=t(n),r=f.options(r),l=f.option(r.html,o.attr("up-tooltip-html")),h=f.option(r.text,o.attr("up-tooltip")),p=f.option(r.position,o.attr("up-position"),s.position),u=f.option(r.animation,f.castedAttr(o,"up-animation"),s.openAnimation),i=up.motion.animateOptions(r,o,{duration:s.openDuration,easing:s.openEasing}),c.phase="opening",c.$anchor=o,a({text:h,html:l}),c.position=p,e(),up.animate(c.$tooltip,u,i).then(function(){return c.phase="opened"})},i=function(t){return o.asap(function(){return u(t)})},u=function(t){var e;return l()?(t=f.options(t,{animation:s.closeAnimation}),e=up.motion.animateOptions(t,{duration:s.closeDuration,easing:s.closeEasing}),f.assign(t,e),c.phase="closing",up.destroy(c.$tooltip,t).then(function(){return c.phase="closed",c.$tooltip=null,c.$anchor=null})):Promise.resolve()},l=function(){return"opening"===c.phase||"opened"===c.phase},up.compiler("[up-tooltip], [up-tooltip-html]",function(t){return t.on("mouseenter",function(){return n(t)}),t.on("mouseleave",function(){return i()})}),up.on("click up:action:consumed",function(){return i()}),up.on("up:framework:reset",p),up.bus.onEscape(function(){return i()}),{config:s,attach:n,isOpen:l,close:i}}(jQuery)}.call(this),function(){var t=[].slice;up.feedback=function(e){var n,r,o,i,u,s,a,l,p,c,f,h,d,m,v,g,y,b,w,k;return g=up.util,s=g.config({currentClasses:["up-current"],navs:["[up-nav]"]}),f=void 0,a=void 0,h=function(){return s.reset(),f=void 0,a=void 0},n="up-active",o="a, [up-href]",p=function(){return s.navs.join(",")},c=function(t){if(g.isPresent(t))return g.normalizeUrl(t,{stripTrailingSlash:!0})},r="up-normalized-urls",d=function(t){var e;return(e=t.data(r))||(e=u(t),t.data(r,e)),e},u=function(t){var e,n,r,o,i,u,s,a,l,p;if(l=[],up.link.isSafe(t))for(u=["href","up-href","up-alias"],n=0,o=u.length;n<o;n++)if(e=u[n],p=g.presentAttr(t,e))for(s=g.splitValues(p),r=0,i=s.length;r<i;r++)a=s[r],"#"!==a&&(a=c(a),l.push(a));return l},i=function(){var t;return t=[up.browser.url(),up.modal.url(),up.modal.coveredUrl(),up.popup.url(),up.popup.coveredUrl()],new up.UrlSet(t,{normalizeUrl:c})},b=function(){if(f=a,a=i(),!a.isEqual(f))return y(e("body"))},y=function(t){var e,n;return e=g.selectInSubtree(t,p()),n=g.selectInSubtree(e,o),w(n)},k=function(t){var e;return t.closest(p()).length?(e=g.selectInSubtree(t,o),w(e)):y(t)},w=function(t){return a||(a=i()),g.each(t,function(t){var n,r,o,i,u,l,p,c,f,h,m,v;if(n=e(t),v=d(n),r=t.classList,a.matchesAny(v)){for(c=s.currentClasses,h=[],o=0,l=c.length;o<l;o++)u=c[o],h.push(r.add(u));return h}for(f=s.currentClasses,m=[],i=0,p=f.length;i<p;i++)u=f[i],m.push(r.remove(u));return m})},l=function(t){var n;return n=e(t),n.is(o)&&(n=g.presence(n.parent(o))||n),n},m=function(){var e,r,o,i,u,s;if(o=1<=arguments.length?t.call(arguments,0):[],i=o.shift(),r=o.pop(),u=g.options(o[0]),e=l(i),u.preload||e.addClass(n),r)return s=r(),g.isPromise(s)?g.always(s,function(){return v(e)}):up.warn("Expected block to return a promise, but got %o",s),s},v=function(t){var e;return e=l(t),e.removeClass(n)},up.on("up:history:pushed up:history:replaced up:history:restored up:modal:opened up:modal:closed up:popup:opened up:popup:closed",function(){return b()}),up.on("up:fragment:inserted",function(t,e){return k(e)}),up.on("up:framework:reset",h),{config:s,start:m,stop:v}}(jQuery),up.deprecateRenamedModule("navigation","feedback")}.call(this),function(){up.radio=function(){var t,e,n,r;return r=up.util,t=r.config({hungry:["[up-hungry]"],hungryTransition:null}),n=function(){return t.reset()},e=function(){return t.hungry.join(",")},up.on("up:framework:reset",n),{config:t,hungrySelector:e}}(jQuery)}.call(this),function(){up.rails=function(t){var e,n;return n=up.util,e=function(){return!!t.rails},n.each(["method","confirm"],function(t){var r,o;return r="data-"+t,o="up-"+t,up.macro("["+r+"]",function(t){var i;if(e()&&up.link.isFollowable(t))return i={},i[o]=t.attr(r),n.setMissingAttrs(t,i),t.removeAttr(r)})})}(jQuery)}.call(this),function(){up.boot()}.call(this);
|
1
|
+
(function(){window.up={version:"0.60.0"}}).call(this),function(){var t=[].slice,e={}.hasOwnProperty;up.util=function(){var n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P,x,O,R,M,j,D,L,U,q,N,K,_,H,B,z,V,I,Q,W,$,X,G,J,Y,Z,tt,et,nt,rt,it,ot,ut,st,at,lt,ct,pt,ht,ft,dt,mt,vt,gt,yt,bt,wt,kt,St,Et,Tt,At,Ft,Ct,Pt,xt,Ot,Rt,Mt,jt,Dt,Lt,Ut,qt,Nt,Kt,_t,Ht,Bt,zt,Vt,It,Qt,Wt,$t,Xt,Gt,Jt;return wt=function(){},s=function(){return Promise.resolve()},ft=function(e){var n,r;return r=void 0,n=!1,function(){var i;return i=1<=arguments.length?t.call(arguments,0):[],n?r:(n=!0,r=e.apply(null,i))}},rt=function(t,e){return e=e.toString(),(""===e||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},St=function(t,e){var n,r,i;return r=At(t),n=r.protocol+"//"+r.hostname,rt(r.protocol,r.port)||(n+=":"+r.port),i=r.pathname,(null!=e?e.stripTrailingSlash:void 0)===!0&&(i=i.replace(/\/$/,"")),n+=i,(null!=e?e.search:void 0)!==!1&&(n+=r.search),(null!=e?e.hash:void 0)===!0&&(n+=r.hash),n},N=function(t){var e;return e=At(location.href),t=At(t),e.protocol!==t.protocol||e.hostname!==t.hostname},At=function(t){var e;return W(t)?e=up.element.get(t):t.pathname?e=t:(e=document.createElement("a"),e.href=t),e.hostname||(e.href=e.href),"/"!==e.pathname[0]&&(e=Tt(e,"protocol","hostname","port","pathname","search","hash"),e.pathname="/"+e.pathname),e},kt=function(t){return t?t.toUpperCase():"GET"},mt=function(t){return"GET"!==t&&"HEAD"!==t},u=function(){var n,r,i,o,u,s,a;for(s=arguments[0],u=2<=arguments.length?t.call(arguments,1):[],n=0,i=u.length;n<i;n++){o=u[n];for(r in o)e.call(o,r)&&(a=o[r],s[r]=a)}return s},o=Object.assign||u,Xt=function(t){var e,n,r;n=[];for(e in t)r=t[e],n.push(r);return n},Et=Object.values||Xt,lt=function(t){return it(t)?function(e){return e[t]}:t},pt=function(t,e){var n,r,i,o,u;if(0===t.length)return[];for(e=lt(e),u=[],r=n=0,o=t.length;n<o;r=++n)i=t[r],u.push(e(i,r));return u},ht=function(t,e){var n;return n=function(t,e){return t[e[0]]=e[1],t},pt(t,e).reduce(n,{})},h=pt,f=function(t,e){var n,r;for(r=[];(n=t.next())&&!n.done;)r.push(e(n.value));return r},zt=function(t,e){var n,r,i,o;for(o=[],r=n=0,i=t-1;0<=i?n<=i:n>=i;r=0<=i?++n:--n)o.push(e(r));return o},J=function(t){return null===t},ut=function(t){return void 0===t},K=function(t){return!ut(t)},X=function(t){return ut(t)||J(t)},I=function(t){return!X(t)},U=function(t){return!!X(t)||(Z(t)&&t[U.key]?t[U.key]():it(t)||$(t)?0===t.length:!!tt(t)&&0===Object.keys(t).length)},U.key="up.util.isBlank",Pt=function(t,e){return null==e&&(e=et),e(t)?t:void 0},et=function(t){return!U(t)},V=function(t){return"function"==typeof t},it=function(t){return"string"==typeof t||t instanceof String},q=function(t){return"boolean"==typeof t||t instanceof Boolean},Y=function(t){return"number"==typeof t||t instanceof Number},tt=function(t){return"object"==typeof t&&!J(t)&&(ut(t.constructor)||t.constructor===Object)},Z=function(t){var e;return e=typeof t,"object"===e&&!J(t)||"function"===e},_=function(t){return t instanceof Element},W=function(t){return up.browser.canJQuery()&&t instanceof jQuery},nt=function(t){return Z(t)&&V(t.then)},D=Array.isArray,z=function(t){return t instanceof FormData},Vt=function(t){return D(t)?t:Array.prototype.slice.call(t)},$=function(t){return D(t)||G(t)||j(t)||W(t)||Q(t)},G=function(t){return t instanceof NodeList},Q=function(t){return t instanceof HTMLCollection},j=function(t){return"[object Arguments]"===Object.prototype.toString.call(t)},Gt=function(t){return $(t)?t:X(t)?[]:[t]},c=function(t,e){var n,r,i;if(Z(t)&&t[c.key]?t=t[c.key]():$(t)?(t=Array.prototype.slice.call(t),n=!0):tt(t)&&(t=o({},t),n=!0),n&&e)for(r in t)i=t[r],t[r]=c(i,!0);return t},c.key="up.util.copy",Date.prototype[c.key]=function(){return new Date(+this)},p=function(t){return c(t,!0)},dt=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],o.apply(null,[{}].concat(t.call(e)))},yt=function(t,e){return e?dt(e,t):t?c(t):{}},F=function(t,e){var n,r,i,o;for(o=void 0,r=0,i=t.length;r<i;r++)if(n=t[r],e(n)){o=n;break}return o},_t=function(t,e){return!!C(t,e)},C=function(t,e){var n,r,i,o,u;for(e=lt(e),i=r=0,o=t.length;r<o;i=++r)if(n=t[i],u=e(n,i))return u},b=function(t,e){var n,r,i,o,u;for(e=lt(e),u=!0,i=r=0,o=t.length;r<o;i=++r)if(n=t[i],!e(n,i)){u=!1;break}return u},a=function(t){return A(t,I)},Qt=function(t){return t.length<2?t:Nt(i(t))},Wt=function(t,e){var n;return t.length<2?t:(e=lt(e),n=new Set,A(t,function(t,r){var i;return i=e(t,r),!n.has(i)&&(n.add(i),!0)}))},Nt=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},i=function(t){var e;return e=new Set,t.forEach(function(t){return e.add(t)}),e},A=function(t,e){var n;return e=lt(e),n=[],h(t,function(t,r){if(e(t,r))return n.push(t)}),n},Mt=function(t,e){return e=lt(e),A(t,function(t,n){return!e(t,n)})},M=function(t,e){return A(t,function(t){return l(e,t)})},Ut=function(t,e){return setTimeout(e,t)},Rt=function(t){return setTimeout(t,0)},Ot=function(t){return Promise.resolve().then(t)},ct=function(t){return t[t.length-1]},v=function(t){var e;return e=t.key,"Escape"===e||"Esc"===e},l=function(t,e){return t.indexOf(e)>=0},Tt=function(){var e,n,r,i,o,u;for(i=arguments[0],o=2<=arguments.length?t.call(arguments,1):[],e={},n=0,r=o.length;n<r;n++)u=o[n],u in i&&(e[u]=i[u]);return e},w=function(){var e,n,r,i,o,u;for(i=arguments[0],o=2<=arguments.length?t.call(arguments,1):[],e=c(i),n=0,r=o.length;n<r;n++)u=o[n],delete e[u];return e},st=function(t){return!(t.metaKey||t.shiftKey||t.ctrlKey)},at=function(t){var e;return e=ut(t.button)||0===t.button,e&&st(t)},$t=function(){return new Promise(wt)},Dt=function(t,e){var n;if(n=t.indexOf(e),n>=0)return t.splice(n,1),e},y=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],V(n)?n.apply(null,e):n},T=function(){var e,n,r,i,o,u;throw e=1<=arguments.length?t.call(arguments,0):[],D(e[0])?(r=e[0],u=e[1]||{}):(r=e,u={}),(i=up.log).error.apply(i,r),up.event.onReady(function(){return up.toast.open(r,u)}),n=(o=up.log).sprintf.apply(o,r),new Error(n)},n={"&":"&","<":"<",">":">",'"':"""},m=function(t){return t.replace(/[&<>"]/g,function(t){return n[t]})},g=function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},Ct=function(t,e){var n;return n=t[e],delete t[e],n},Lt=function(t,e,n){return t[n]=Ct(t,e)},S=function(t,e){var n;if(n=ct(t),e(n))return t.pop()},k=function(t){return S(t,V)},E=function(t){return S(t,tt)||{}},Ft=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],function(){var r;return r=1<=arguments.length?t.call(arguments,0):[],n.apply(this,e.concat(r))}},R=function(t){return t},xt=function(e){var n,r;return n=gt(),r=function(){var r,i;return r=1<=arguments.length?t.call(arguments,0):[],i=e.apply(null,r),n.resolve(i),i},r.promise=n.promise(),r},qt=function(t){return 1===t.length?t[0]:function(){return pt(t,function(t){return t()})}},O=function(t){var e,n,r;return e=t.getBoundingClientRect(),n=e.left+.5*e.width,r=.5*up.viewport.rootWidth(),n<r?"left":"right"},x=function(t){var e,n,r,i;for(e=[],n=0,r=t.length;n<r;n++)i=t[n],$(i)?e.push.apply(e,i):e.push(i);return e},P=function(t,e){return x(pt(t,e))},ot=function(t){return!!t},r=function(t,e){return t.then(e,e)},vt=function(t){return null!=t?t["catch"](wt):void 0},gt=function(){var t,e,n;return n=void 0,e=void 0,t=new Promise(function(t,r){return n=t,e=r}),t.resolve=n,t.reject=e,t.promise=function(){return t},t},jt=function(t){var e;try{return t()}catch(t){return e=t,Promise.reject(e)}},Bt=function(t,e){var n,r,i,o,u;for(e=lt(e),u=0,i=0,o=t.length;i<o;i++)n=t[i],r=e(n),I(r)&&(u+=r);return u},L=function(t){return Object.prototype.hasOwnProperty(t)},H=function(t,e){var n,r;return(null!=t?t.valueOf:void 0)&&(t=t.valueOf()),(null!=e?e.valueOf:void 0)&&(e=e.valueOf()),typeof t==typeof e&&($(t)&&$(e)?B(t,e):Z(t)&&t[H.key]?t[H.key](e):tt(t)&&tt(e)?(n=Object.keys(t),r=Object.keys(e),!!B(n,r)&&b(n,function(n){return H(t[n],e[n])})):t===e)},H.key="up.util.isEqual",B=function(t,e){return t.length===e.length&&b(t,function(t,n){return H(t,e[n])})},Ht=function(t,e){var n;return null==e&&(e=" "),n=t.split(e),n=pt(n,function(t){return t.trim()}),n=A(n,et)},d=function(t,e){return!(e.length>t.length)&&t.substring(t.length-e.length)===e},Kt=function(t){return t<.5?2*t*t:t*(4-2*t)-1},Jt=function(t,e){return t instanceof e?t:new e(t)},bt=0,It=function(){return bt++},{parseUrl:At,normalizeUrl:St,normalizeMethod:kt,methodAllowsPayload:mt,assign:o,assignPolyfill:u,copy:c,deepCopy:p,merge:dt,options:yt,fail:T,each:h,eachIterator:f,map:pt,flatMap:P,mapObject:ht,times:zt,findResult:C,some:_t,any:function(){return up.legacy.warn("up.util.any() has been renamed to up.util.some()"),_t.apply(null,arguments)},every:b,all:function(){return up.legacy.warn("up.util.all() has been renamed to up.util.every()"),b.apply(null,arguments)},detect:function(){return up.legacy.warn("up.util.find() has been renamed to up.util.find()"),F.apply(null,arguments)},find:F,select:function(){return up.legacy.warn("up.util.select() has been renamed to up.util.filter()"),A.apply(null,arguments)},filter:A,reject:Mt,intersect:M,compact:a,uniq:Qt,uniqBy:Wt,last:ct,isNull:J,isDefined:K,isUndefined:ut,isGiven:I,isMissing:X,isPresent:et,isBlank:U,presence:Pt,isObject:Z,isFunction:V,isString:it,isBoolean:q,isNumber:Y,isElement:_,isJQuery:W,isPromise:nt,isOptions:tt,isArray:D,isFormData:z,isNodeList:G,isArguments:j,isList:$,isUnmodifiedKeyEvent:st,isUnmodifiedMouseEvent:at,timer:Ut,setTimer:function(){return up.legacy.warn("up.util.setTimer() has been renamed to up.util.timer()"),Ut.apply(null,arguments)},escapePressed:v,contains:l,toArray:Vt,only:Tt,except:w,unresolvablePromise:$t,remove:Dt,memoize:ft,error:T,pluckKey:Ct,renameKey:Lt,extractOptions:E,extractCallback:k,noop:wt,asyncNoop:s,identity:R,escapeHtml:m,escapeRegexp:g,sequence:qt,previewable:xt,evalOption:y,horizontalScreenHalf:O,flatten:x,isTruthy:ot,newDeferred:gt,always:r,muteRejection:vt,rejectOnError:jt,isBasicObjectProperty:L,isCrossDomain:N,selectorForElement:function(){return up.legacy.warn("up.util.selectorForElement() has been renamed to up.element.toSelector()"),up.element.toSelector.apply(null,arguments)},nextFrame:function(){return up.legacy.warn("up.util.nextFrame() has been renamed to up.util.task()"),Rt.apply(null,arguments)},task:Rt,microtask:Ot,isEqual:H,splitValues:Ht,endsWith:d,sum:Bt,wrapList:Gt,wrapValue:Jt,simpleEase:Kt,values:Et,partial:Ft,arrayToSet:i,setToArray:Nt,uid:It}}(),up.fail=up.util.fail}.call(this),function(){var t,e=[].slice;t=up.util,up.legacy=function(){var n,r,i,o;return n=function(e,n,r){if(n in e)return i("Property { %s } has been renamed to { %s } (found in %o)",n,r,e),t.renameKey(e,n,r)},r=function(t,e){return Object.defineProperty(up,t,{get:function(){return i("up."+t+" has been renamed to up."+e),up[e]}})},o={},i=function(){var t,n,r;if(n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],n="[DEPRECATION] "+n,n=(r=up.log).sprintf.apply(r,[n].concat(e.call(t))),!o[n])return o[n]=!0,up.warn(n)},{renamedModule:r,fixKey:n,warn:i}}()}.call(this),function(){up.browser=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w;return y=up.util,m=function(t,e){var n,r;return r=y.merge(e,{url:t}),n=new up.Request(r),n.navigate()},g=function(t){return t.submit()},b=function(){return location.href},h=y.memoize(function(){return!window.atob}),f=y.memoize(function(){return"ActiveXObject"in window}),p=function(){return y.isDefined(history.pushState)&&"get"===up.protocol.initialRequestMethod()},r=y.memoize(function(){return"transition"in document.documentElement.style}),s=y.memoize(function(){return"oninput"in document.createElement("input")}),c=y.memoize(function(){return!!window.Promise}),u=y.memoize(function(){return!!window.FormData}),a=y.memoize(function(){return u()&&!!FormData.prototype.entries}),o=y.memoize(function(){return!!window.DOMParser}),e=y.memoize(function(){return window.console&&console.debug&&console.info&&console.warn&&console.error&&console.group&&console.groupCollapsed&&console.groupEnd}),i=y.memoize(function(){return!!window.customElements}),l=y.memoize(function(){return!!window.jQuery}),t=y.memoize(function(){return"requestAnimationFrame"in window}),n=y.memoize(function(){return"scrollRestoration"in history}),v=function(t){var e,n;return n=null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1]:void 0,y.isPresent(n)&&(document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},w=function(t){return t.preload||y.isBlank(t.confirm)||window.confirm(t.confirm)?Promise.resolve():Promise.reject(new Error("User canceled action"))},d=function(){return!h()&&e()&&o()&&u()&&r()&&s()&&c()&&t()},{url:b,navigate:m,submitForm:g,canPushState:p,canFormData:u,canInspectFormData:a,canCustomElements:i,canJQuery:l,canControlScrollRestoration:n,whenConfirmed:w,isSupported:d,popCookie:v,isIE11:f}}()}.call(this),function(){var t;t=up.util,up.Selector=function(){function e(t,e){this.selector=t,this.filterFn=e}var n,r;return n=new RegExp("\\:has\\(([^\\)]+)\\)$"),r=up.browser.isIE11()?"msMatchesSelector":"matches",e.prototype.matches=function(t){var e;return e=t[r](this.selector),this.filterFn&&e&&(e=this.filterFn(t)),e},e.prototype.descendants=function(e){var n;return n=e.querySelectorAll(this.selector),this.filterFn&&(n=t.filter(n,this.filterFn)),n},e.prototype.descendant=function(e){var n;return this.filterFn?(n=e.querySelectorAll(this.selector),t.find(n,this.filterFn)):e.querySelector(this.selector)},e.prototype.subtree=function(t){var e;return e=[],this.matches(t)&&e.push(t),e.push.apply(e,this.descendants(t)),e},e.prototype.closest=function(t){return t.closest&&!this.filterFn?t.closest(this.selector):this.closestPolyfill(t)},e.prototype.closestPolyfill=function(t){return this.matches(t,this.selector)?t:this.ancestor(t)},e.prototype.ancestor=function(t){var e;if(e=t.parentElement)return this.matches(e)?e:this.ancestor(e)},e.parse=function(t){var e;return e=null,t=t.replace(n,function(t,n){return e=function(t){return t.querySelector(n)},""}),new this(t,e)},e}()}.call(this),function(){var t=[].slice;up.element=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P,x,O,R,M,j,D,L,U,q,N,K,_,H,B,z,V,I,Q,W,$,X,G,J,Y;return G=up.util,n={getAttribute:function(){}},q=function(t){return up.Selector.parse(t)},b=function(){var e,n,r,i;return e=1<=arguments.length?t.call(arguments,0):[],i=e.pop(),n=null!=(r=e[0])?r:document,q(i).descendant(n)},i=function(){var e,n,r,i;return e=1<=arguments.length?t.call(arguments,0):[],i=e.pop(),n=null!=(r=e[0])?r:document,q(i).descendants(n)},Q=function(t,e){return q(e).subtree(t)},l=function(t,e){return q(e).closest(t)},R=function(t,e){return q(e).matches(t)},o=function(t,e){return q(e).ancestor(t)},S=function(t){return G.isElement(t)?t:G.isString(t)?b(t):G.isJQuery(t)?(t.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",t),t[0]):t},k=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],G.flatMap(e,Y)},Y=function(t){return G.isString(t)?i(t):G.wrapList(t)},N=function(t){var e;return t.remove?t.remove():(e=t.parentNode)?e.removeChild(t):void 0},A=function(t){return t.style.display="none"},I=function(t){return t.style.display=""},$=function(t,e){return null==e&&(e=!x(t)),e?I(t):A(t)},X=function(t,e,n){var r;return r=t.classList,null==n&&(n=!r.contains(e)),n?r.add(e):r.remove(e)},H=function(t,e){var n,r,i;r=[];for(n in e)i=e[n],r.push(t.setAttribute(n,i));return r},M=function(t){var e,n;return n="meta"+u("name",t),null!=(e=b(n))?e.getAttribute("content"):void 0},C=function(t,e){return t.insertAdjacentElement("beforebegin",e)},K=function(t,e){return t.parentElement.replaceChild(e,t)},m=function(t,e){var n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y;for(n=[],m=t.replace(/\[([\w-]+)(?:=(["'])?([^"'\]]*?)\2)?\]/g,function(t,e,r,i){return n.push(i||""),"["+e+"]"}),u=m.split(/[ >]+/),d=void 0,i=void 0,h=void 0,s=0,c=u.length;s<c;s++){if(o=u[s],g=void 0,o=o.replace(/^[\w-]+/,function(t){return g=t,""}),i=document.createElement(g||"div"),d||(d=i),o=o.replace(/\#([\w-]+)/,function(t,e){return i.id=e,""}),o=o.replace(/\.([\w-]+)/g,function(t,e){return i.classList.add(e),""}),n.length&&(o=o.replace(/\[([\w-]+)\]/g,function(t,e){return i.setAttribute(e,n.shift()),""})),""!==o)throw new Error("Cannot parse selector: "+t);null!=h&&h.appendChild(i),h=i}if(e){if(r=G.pluckKey(e,"class"))for(f=G.wrapList(r),a=0,p=f.length;a<p;a++)l=f[a],d.classList.add(l);(v=G.pluckKey(e,"style"))&&B(d,v),(y=G.pluckKey(e,"text"))&&(d.innerText=y),H(d,e)}return d},r=function(t,e,n){var r;return r=m(e,n),t.appendChild(r),r},W=function(t){var e,n,r,i,o,s,a,l,c;if(G.isString(t))return t;if(t=S(t),l=void 0,P(t))l=g(t);else if(c=t.getAttribute("up-id"))l=u("up-id",c);else if(i=t.getAttribute("id"))l=i.match(/^[a-z0-9\-_]+$/i)?"#"+i:u("id",i);else if(a=t.getAttribute("name"))l=g(t)+u("name",a);else if(n=G.presence(j(t)))for(l="",r=0,s=n.length;r<s;r++)o=n[r],l+="."+o;else l=(e=t.getAttribute("aria-label"))?u("aria-label",e):g(t);return l},P=function(t){return R(t,"html, body, head, title")},g=function(t){return t.tagName.toLowerCase()},u=function(t,e){return e=e.replace(/"/g,'\\"'),"["+t+'="'+e+'"]'},j=function(t){var e,n;return e=t.className,n=G.splitValues(e),G.reject(n,function(t){return t.match(/^up-/)})},f=function(t){var e;return e=new DOMParser,e.parseFromString(t,"text/html")},d=function(t){var e;return e=f(t),e.body.children[0]},E=function(){return document.documentElement},U=function(t){return t.offsetHeight},h=function(t){var e;return e=V(t,{transition:"none"}),U(t),e},T=function(t){var e,n,r,i;return i=G.isOptions(t)?t:c(t),r=i.transitionProperty,e=i.transitionDuration,n="none"===r||"all"===r&&0===e,!n},w=function(t){var e,n;return e=t.getBoundingClientRect(),t.style.position="absolute",n=t.offsetParent.getBoundingClientRect(),B(t,{left:e.left-p(t,"margin-left")-n.left,top:e.top-p(t,"margin-top")-n.top,right:"",bottom:""})},z=function(t,e){var n,r,i;r=[];for(n in e)i=e[n],G.isMissing(t.getAttribute(n))?r.push(t.setAttribute(n,i)):r.push(void 0);return r},J=function(t){var e,n;return e=t.parentNode,n=G.toArray(t.childNodes),G.each(n,function(n){return e.insertBefore(n,t)}),e.removeChild(t)},s=function(t,e,n){var r;switch(r=t.getAttribute(e)){case"false":return!1;case"true":case"":case e:return!0;default:if(n)return r}},a=function(t,e){return s(t,e,!0)},L=function(t,e){var n;if(n=t.getAttribute(e),null!=n?n.match(/^[\d\.]+$/):void 0)return parseFloat(n)},O=function(t,e){var n,r;if(n="function"==typeof t.getAttribute&&null!=(r=t.getAttribute(e))?r.trim():void 0)return JSON.parse(n)},V=function(t,e){var n;return n=F(t,Object.keys(e)),B(t,e),function(){return B(t,n)}},c=function(t,e){var n;return n=window.getComputedStyle(t),y(n,e)},p=function(t,e){var n;return n=c(t,e),G.isGiven(n)?parseFloat(n):void 0},F=function(t,e){var n;return n=t.style,y(n,e)},y=function(e,n){return G.isString(n)?e[n]:G.only.apply(G,[e].concat(t.call(n)))},B=function(t,e){var n,r,i,o;i=t.style,r=[];for(n in e)o=e[n],o=D(n,o),r.push(i[n]=o);return r},D=function(t,n){return G.isMissing(n)?n="":e.has(t.toLowerCase().replace(/-/,""))&&(n=v(n)),n},e=G.arrayToSet(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]),v=function(t){return G.isNumber(t)||G.isString(t)&&/^\d+$/.test(t)?t.toString()+"px":t},_=function(t,e){var n,r;return G.isString(t)?(r=t,G.contains(r,"&")&&(G.isPresent(e)?(n=W(e),r=r.replace(/\&/,n)):up.fail("Found origin reference (%s) in selector %s, but no origin was given","&",r))):r=W(t),r},x=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},{first:b,all:i,subtree:Q,closest:l,matches:R,ancestor:o,get:S,list:k,remove:N,toggle:$,toggleClass:X,hide:A,show:I,metaContent:M,replace:K,insertBefore:C,createFromSelector:m,setAttrs:H,affix:r,toSelector:W,isSingleton:P,attributeSelector:u,createDocumentFromHtml:f,createFromHtml:d,root:E,paint:U,concludeCssTransition:h,hasCssTransition:T,fixedToAbsolute:w,setMissingAttrs:z,unwrap:J,booleanAttr:s,numberAttr:L,jsonAttr:O,booleanOrStringAttr:a,setTemporaryStyle:V,style:c,styleNumber:p,inlineStyle:F,setStyle:B,resolveSelector:_,none:function(){return n},isVisible:x}}()}.call(this),function(){var t;t=up.element,up.BodyShifter=function(){function e(){this.unshiftFns=[]}return e.prototype.shift=function(){var e,n,r,i,o,u,s,a,l,c,p,h;if(up.viewport.rootHasVerticalScrollbar()){for(n=document.body,l=up.viewport.rootOverflowElement(),h=up.viewport.scrollbarWidth(),r=t.styleNumber(n,"paddingRight"),i=h+r,this.unshiftFns.push(t.setTemporaryStyle(n,{paddingRight:i})),this.unshiftFns.push(t.setTemporaryStyle(l,{overflowY:"hidden"})),c=up.viewport.anchoredRight(),p=[],s=0,a=c.length;s<a;s++)e=c[s],o=t.styleNumber(e,"right"),u=h+o,p.push(this.unshiftFns.push(t.setTemporaryStyle(e,{right:u})));return p}},e.prototype.unshift=function(){var t,e;for(t=[];e=this.unshiftFns.pop();)t.push(e());return t},e}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.Cache=function(){function r(t){this.config=null!=t?t:{},this.get=e(this.get,this),this.isFresh=e(this.isFresh,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.timestamp=e(this.timestamp,this),this.alias=e(this.alias,this),this.makeRoomForAnotherKey=e(this.makeRoomForAnotherKey,this),this.keys=e(this.keys,this),this.log=e(this.log,this),this.clear=e(this.clear,this),this.isCachable=e(this.isCachable,this),this.isEnabled=e(this.isEnabled,this),this.normalizeStoreKey=e(this.normalizeStoreKey,this),this.expiryMillis=e(this.expiryMillis,this),this.maxKeys=e(this.maxKeys,this),this.store=this.config.store||new up.store.Memory}return r.prototype.maxKeys=function(){return t.evalOption(this.config.size)},r.prototype.expiryMillis=function(){return t.evalOption(this.config.expiry)},r.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},r.prototype.isEnabled=function(){return 0!==this.maxKeys()&&0!==this.expiryMillis()},r.prototype.isCachable=function(t){return!this.config.cachable||this.config.cachable(t)},r.prototype.clear=function(){return this.store.clear()},r.prototype.log=function(){var t;if(t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix)return t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,t)},r.prototype.keys=function(){return this.store.keys()},r.prototype.makeRoomForAnotherKey=function(){var e,n,r,i;if(i=t.copy(this.keys()),e=this.maxKeys(),e&&i.length>=e&&(n=void 0,r=void 0,t.each(i,function(t){return function(e){var i,o;if(i=t.store.get(e),o=i.timestamp,!r||r>o)return n=e,r=o}}(this)),n))return this.store.remove(n)},r.prototype.alias=function(e,n){var r;if(r=this.get(e,{silent:!0}),t.isDefined(r))return this.set(n,r)},r.prototype.timestamp=function(){return(new Date).valueOf()},r.prototype.set=function(t,e){var n,r;if(this.isEnabled()&&this.isCachable(t))return this.makeRoomForAnotherKey(),n=this.normalizeStoreKey(t),this.log("Setting entry %o to %o",n,e),r={timestamp:this.timestamp(),value:e},this.store.set(n,r)},r.prototype.remove=function(t){var e;if(this.isCachable(t))return e=this.normalizeStoreKey(t),this.store.remove(e)},r.prototype.isFresh=function(t){var e,n;return e=this.expiryMillis(),!e||(n=this.timestamp()-t.timestamp,n<e)},r.prototype.get=function(t,e){var n;return null==e&&(e={}),this.isCachable(t)&&(n=this.store.get(this.normalizeStoreKey(t)))?this.isFresh(n)?(e.silent||this.log("Cache hit for '%s'",t),n.value):(e.silent||this.log("Discarding stale cache entry for '%s'",t),void this.remove(t)):void(e.silent||this.log("Cache miss for '%s'",t))},r}()}.call(this),function(){var t,e=[].slice;t=up.util,up.Record=function(){function n(e){t.assign(this,this.attributes(e))}return n.prototype.fields=function(){throw"Return an array of property names"},n.prototype.attributes=function(n){return null==n&&(n=this),t.only.apply(t,[n].concat(e.call(this.fields())))},n.prototype[""+t.copy.key]=function(){return this.variant()},n.prototype.variant=function(e){var n;return null==e&&(e={}),n=t.merge(this.attributes(),e),new this.constructor(n)},n.prototype[""+t.isEqual.key]=function(e){return e&&this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())},n}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.CompilePass=function(){function r(t,e,r){this.root=t,this.compilers=e,null==r&&(r={}),this.isInSkippedSubtree=n(this.isInSkippedSubtree,this),this.skipSubtrees=r.skip,this.skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.skipSubtrees=void 0)}return r.prototype.compile=function(){return up.log.group("Compiling fragment %o",this.root,function(t){return function(){var e,n,r,i,o;for(i=t.compilers,o=[],n=0,r=i.length;n<r;n++)e=i[n],o.push(t.runCompiler(e));return o}}(this))},r.prototype.runCompiler=function(t){var n;if(n=this.select(t.selector),n.length)return up.log.group(t.isDefault?void 0:"Compiling '%s' on %d element(s)",t.selector,n.length,function(r){return function(){var i,o,u,s,a,l,c,p;if(t.batch)r.compileBatch(t,n);else for(i=0,s=n.length;i<s;i++)l=n[i],r.compileOneElement(t,l);if(u=t.keep){for(p=e.isString(u)?u:"",c=[],o=0,a=n.length;o<a;o++)l=n[o],c.push(l.setAttribute("up-keep",p));return c}}}(this))},r.prototype.compileOneElement=function(t,e){var n,r,i,o,u;if(o=t.jQuery?jQuery(e):e,n=[o],1!==t.length&&(r=up.syntax.data(e),n.push(r)),u=t.apply(e,n),i=this.destructorPresence(u))return up.destructor(e,i)},r.prototype.compileBatch=function(t,n){var r,i,o,u;if(o=t.jQuery?jQuery(n):n,r=[o],1!==t.length&&(i=e.map(n,up.syntax.data),r.push(i)),u=t.apply(n,r),this.destructorPresence(u))return up.fail("Compilers with { batch: true } cannot return destructors")},r.prototype.destructorPresence=function(t){if(e.isFunction(t)||e.isArray(t)&&e.every(t,e.isFunction))return t},r.prototype.select=function(n){var r;return e.isFunction(n)&&(n=n()),r=t.subtree(this.root,n),this.skipSubtrees&&(r=e.reject(r,this.isInSkippedSubtree)),r},r.prototype.isInSkippedSubtree=function(t){var n;return!!e.contains(this.skipSubtrees,t)||!!(n=t.parentElement)&&this.isInSkippedSubtree(n)},r}()}.call(this),function(){var t;t=up.util,up.Config=function(){function e(t){this.blueprint=t,this.reset()}return e.prototype.reset=function(){return t.assign(this,t.deepCopy(this.blueprint))},e}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.CssTransition=function(){function r(t,r,i){this.element=t,this.lastFrameKebab=r,this.startMotion=n(this.startMotion,this),this.resumeOldTransition=n(this.resumeOldTransition,this),this.pauseOldTransition=n(this.pauseOldTransition,this),this.finish=n(this.finish,this),this.onTransitionEnd=n(this.onTransitionEnd,this),this.listenToTransitionEnd=n(this.listenToTransitionEnd,this),this.stopFallbackTimer=n(this.stopFallbackTimer,this),this.startFallbackTimer=n(this.startFallbackTimer,this),this.onFinishEvent=n(this.onFinishEvent,this),this.listenToFinishEvent=n(this.listenToFinishEvent,this),this.start=n(this.start,this),this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),e.some(this.lastFrameKeysKebab,function(t){return t.match(/A-Z/)})&&up.fail("Animation keys must be kebab-case"),this.finishEvent=i.finishEvent,this.duration=i.duration,this.delay=i.delay,this.totalDuration=this.delay+this.duration,this.easing=i.easing,this.finished=!1}return r.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=e.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},r.prototype.listenToFinishEvent=function(){if(this.finishEvent)return this.stopListenToFinishEvent=this.element.addEventListener(this.finishEvent,this.onFinishEvent)},r.prototype.onFinishEvent=function(t){return t.stopPropagation(),this.finish()},r.prototype.startFallbackTimer=function(){var t;return t=100,this.fallbackTimer=e.timer(this.totalDuration+t,function(t){return function(){return t.finish()}}(this))},r.prototype.stopFallbackTimer=function(){return clearTimeout(this.fallbackTimer)},r.prototype.listenToTransitionEnd=function(){return this.stopListenToTransitionEnd=up.on(this.element,"transitionend",this.onTransitionEnd)},r.prototype.onTransitionEnd=function(t){var n,r;if(t.target===this.element&&(r=new Date-this.startTime,r>.25*this.totalDuration&&(n=t.propertyName,e.contains(this.lastFrameKeysKebab,n))))return this.finish()},r.prototype.finish=function(){if(!this.finished)return this.finished=!0,this.stopFallbackTimer(),"function"==typeof this.stopListenToFinishEvent&&this.stopListenToFinishEvent(),"function"==typeof this.stopListenToTransitionEnd&&this.stopListenToTransitionEnd(),t.concludeCssTransition(this.element),this.resumeOldTransition(),this.deferred.resolve()},r.prototype.pauseOldTransition=function(){var e,n,r;if(e=t.style(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]),t.hasCssTransition(e))return"all"!==e.transitionProperty&&(r=e.transitionProperty.split(/\s*,\s*/),n=t.style(this.element,r),this.setOldTransitionTargetFrame=t.setTemporaryStyle(this.element,n)),this.setOldTransition=t.concludeCssTransition(this.element)},r.prototype.resumeOldTransition=function(){return"function"==typeof this.setOldTransitionTargetFrame&&this.setOldTransitionTargetFrame(),"function"==typeof this.setOldTransition?this.setOldTransition():void 0},r.prototype.startMotion=function(){return t.setStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionDelay:this.delay+"ms",transitionTimingFunction:this.easing}),t.setStyle(this.element,this.lastFrameKebab)},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;t=up.util,up.DivertibleChain=function(){function r(){this.asap=e(this.asap,this),this.poke=e(this.poke,this),this.allTasks=e(this.allTasks,this),this.promise=e(this.promise,this),this.reset=e(this.reset,this),this.reset()}return r.prototype.reset=function(){return this.queue=[],this.currentTask=void 0},r.prototype.promise=function(){var e;return e=t.last(this.allTasks()),(null!=e?e.promise:void 0)||Promise.resolve()},r.prototype.allTasks=function(){var t;return t=[],this.currentTask&&t.push(this.currentTask),t=t.concat(this.queue)},r.prototype.poke=function(){var e;if(!this.currentTask&&(this.currentTask=this.queue.shift()))return e=this.currentTask(),t.always(e,function(t){return function(){return t.currentTask=void 0,t.poke()}}(this))},r.prototype.asap=function(){var e;return e=1<=arguments.length?n.call(arguments,0):[],this.queue=t.map(e,t.previewable),this.poke(),this.promise()},r}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.EventListener=function(){function r(t,e,r,i,o){this.element=t,this.eventName=e,this.selector=r,this.callback=i,null==o&&(o={}),this.nativeCallback=n(this.nativeCallback,this),this.unbind=n(this.unbind,this),this.jQuery=o.jQuery,this.key=this.constructor.key(this.eventName,this.selector,this.callback),this.isDefault=up.framework.isBooting()}return r.prototype.bind=function(){var t,e;return e=(t=this.element).upEventListeners||(t.upEventListeners={}),e[this.key]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventName,this.callback),e[this.key]=this,this.element.addEventListener(this.eventName,this.nativeCallback)},r.prototype.unbind=function(){var t;return(t=this.element.upEventListeners)&&delete t[this.key],this.element.removeEventListener(this.eventName,this.nativeCallback)},r.prototype.nativeCallback=function(e){var n,r,i,o,u;if(i=e.target,this.selector&&(i=t.closest(i,this.selector)),i)return o=this.jQuery?jQuery(i):i,n=[e,o],u=this.callback.length,1!==u&&2!==u&&(r=up.syntax.data(i),n.push(r)),this.callback.apply(i,n)},r.parseArgs=function(t){var n,r,i,o;return t=e.copy(t),n=t.pop(),n.upUid||(n.upUid=e.uid()),r=t[0].addEventListener?[t.shift()]:e.isJQuery(t[0])||e.isList(t[0])&&t[0][0].addEventListener?t.shift():[document],i=e.splitValues(t.shift()),o=t[0],{elements:r,eventNames:i,selector:o,callback:n}},r.bind=function(t,n){var r,i,o,u,s,a,l,c,p,h,f;for(c=this.parseArgs(t),f=[],p=c.elements,o=0,s=p.length;o<s;o++)for(r=p[o],h=c.eventNames,u=0,
|
2
|
+
a=h.length;u<a;u++)i=h[u],l=new this(r,i,c.selector,c.callback,n),l.bind(),f.push(l.unbind);return e.sequence(f)},r.key=function(t,e,n){return[t,e,n.upUid].join("|")},r.unbind=function(t){var e,n,r,i,o,u,s,a,l,c;for(a=this.parseArgs(t),l=a.elements,c=[],r=0,o=l.length;r<o;r++)e=l[r],s=e.upEventListeners,c.push(function(){var t,e,r,o;for(r=a.eventNames,o=[],t=0,e=r.length;t<e;t++)n=r[t],i=this.key(n,a.selector,a.callback),s&&(u=s[i])?o.push(u.unbind()):o.push(void 0);return o}.call(this));return c},r.unbindNonDefault=function(t){var n,r,i,o,u,s;if(u=t.upEventListeners){for(o=e.values(u),s=[],n=0,r=o.length;n<r;n++)i=o[n],i.isDefault?s.push(void 0):s.push(i.unbind());return s}},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.ExtractCascade=function(){function n(n,r){this.oldPlanNotFound=e(this.oldPlanNotFound,this),this.matchingPlanNotFound=e(this.matchingPlanNotFound,this),this.bestMatchingSteps=e(this.bestMatchingSteps,this),this.bestPreflightSelector=e(this.bestPreflightSelector,this),this.detectPlan=e(this.detectPlan,this),this.matchingPlan=e(this.matchingPlan,this),this.newPlan=e(this.newPlan,this),this.oldPlan=e(this.oldPlan,this);var i,o;this.options=t.options(r,{humanizedTarget:"selector",layer:"auto"}),null==(i=this.options).transition&&(i.transition=this.options.animation),null==(o=this.options).hungry&&(o.hungry=!0),this.candidates=this.buildCandidates(n),this.plans=t.map(this.candidates,function(e){return function(n,r){var i,o;return i=t.copy(e.options),r>0&&(i.transition=null!=(o=up.fragment.config.fallbackTransition)?o:e.options.transition),new up.ExtractPlan(n,i)}}(this))}return n.prototype.buildCandidates=function(e){var n;return n=[e,this.options.fallback,up.fragment.config.fallbacks],n=t.flatten(n),n=t.filter(n,t.isTruthy),n=t.uniq(n),(this.options.fallback===!1||this.options.provideTarget)&&(n=[n[0]]),n},n.prototype.oldPlan=function(){return this.detectPlan("oldExists")},n.prototype.newPlan=function(){return this.detectPlan("newExists")},n.prototype.matchingPlan=function(){return this.detectPlan("matchExists")},n.prototype.detectPlan=function(e){return t.find(this.plans,function(t){return t[e]()})},n.prototype.bestPreflightSelector=function(){var t;return t=this.options.provideTarget?this.plans[0]:this.oldPlan(),t?(t.resolveNesting(),t.selector()):this.oldPlanNotFound()},n.prototype.bestMatchingSteps=function(){var t;return(t=this.matchingPlan())?(t.addHungrySteps(),t.resolveNesting(),t.steps):this.matchingPlanNotFound()},n.prototype.matchingPlanNotFound=function(){var t,e;return this.newPlan()?this.oldPlanNotFound():(e=this.oldPlan()?"Could not find "+this.options.humanizedTarget+" in response":"Could not match "+this.options.humanizedTarget+" in current page and response",this.options.inspectResponse&&(t={label:"Open response",callback:this.options.inspectResponse}),up.fail([e+" (tried %o)",this.candidates],{action:t}))},n.prototype.oldPlanNotFound=function(){var t;return t=this.options.layer,"auto"===t&&(t="page, modal or popup"),up.fail("Could not find "+this.options.humanizedTarget+" in current "+t+" (tried %o)",this.candidates)},n}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.ExtractPlan=function(){function r(e,r){this.addHungrySteps=n(this.addHungrySteps,this),this.parseSteps=n(this.parseSteps,this),this.selector=n(this.selector,this),this.resolveNesting=n(this.resolveNesting,this),this.addSteps=n(this.addSteps,this),this.matchExists=n(this.matchExists,this),this.newExists=n(this.newExists,this),this.oldExists=n(this.oldExists,this),this.findNew=n(this.findNew,this),this.findOld=n(this.findOld,this);var i;this.reveal=r.reveal,this.origin=r.origin,this.hungry=r.hungry,this.transition=r.transition,this.response=r.response,this.oldLayer=r.layer,i=t.resolveSelector(e,this.origin),this.parseSteps(i)}return r.prototype.findOld=function(){return e.each(this.steps,function(t){return function(e){return e.oldElement=up.fragment.first(e.selector,{layer:t.oldLayer})}}(this))},r.prototype.findNew=function(){return e.each(this.steps,function(t){return function(e){return e.newElement=t.response.first(e.selector)}}(this))},r.prototype.oldExists=function(){return this.findOld(),e.every(this.steps,function(t){return t.oldElement})},r.prototype.newExists=function(){return this.findNew(),e.every(this.steps,function(t){return t.newElement})},r.prototype.matchExists=function(){return this.oldExists()&&this.newExists()},r.prototype.addSteps=function(t){return this.steps=this.steps.concat(t)},r.prototype.resolveNesting=function(){var t;if(!(this.steps.length<2))return t=e.copy(this.steps),t=e.uniqBy(t,function(t){return t.oldElement}),t=e.filter(t,function(){return function(n,r){return e.every(t,function(t,e){var i,o;return e===r||(i=n.oldElement,o=t.oldElement,t.pseudoClass||!o.contains(i))})}}(this)),t[0].reveal=this.steps[0].reveal,this.steps=t},r.prototype.selector=function(){return e.map(this.steps,"expression").join(", ")},r.prototype.parseSteps=function(t){var n,r;return n=/\ *,\ */,this.steps=[],r=t.split(n),e.each(r,function(t){return function(e,n){var r,i,o,u;return i=e.match(/^(.+?)(?:\:(before|after))?$/),i||up.fail('Could not parse selector literal "%s"',e),u=i[1],"html"===u&&(u="body"),o=i[2],r=0===n&&t.reveal,t.steps.push({expression:e,selector:u,pseudoClass:o,transition:t.transition,origin:t.origin,reveal:r})}}(this))},r.prototype.addHungrySteps=function(){var e,n,r,i,o,u,s,a,l;if(r=[],this.hungry)for(e=t.all(up.radio.hungrySelector()),l=null!=(s=up.radio.config.hungryTransition)?s:this.transition,i=0,o=e.length;i<o;i++)n=e[i],a=t.toSelector(n),(u=this.response.first(a))&&r.push({selector:a,oldElement:n,newElement:u,transition:l,reveal:!1,origin:null});return this.addSteps(r)},r}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.FieldObserver=function(){function r(e,r,i){this.callback=i,this.check=n(this.check,this),this.readFieldValues=n(this.readFieldValues,this),this.requestCallback=n(this.requestCallback,this),this.isNewValues=n(this.isNewValues,this),this.scheduleValues=n(this.scheduleValues,this),this.scheduleTimer=n(this.scheduleTimer,this),this.cancelTimer=n(this.cancelTimer,this),this.stop=n(this.stop,this),this.start=n(this.start,this),this.fields=t.list(e),this.delay=r.delay,this.batch=r.batch}return r.prototype.start=function(){return this.scheduledValues=null,this.processedValues=this.readFieldValues(),this.currentTimer=void 0,this.callbackRunning=!1,this.unbind=up.on(this.fields,"input change",this.check)},r.prototype.stop=function(){return this.unbind(),this.cancelTimer()},r.prototype.cancelTimer=function(){return clearTimeout(this.currentTimer),this.currentTimer=void 0},r.prototype.scheduleTimer=function(){return this.cancelTimer(),this.currentTimer=e.timer(this.delay,function(t){return function(){return t.currentTimer=void 0,t.requestCallback()}}(this))},r.prototype.scheduleValues=function(t){return this.scheduledValues=t,this.scheduleTimer()},r.prototype.isNewValues=function(t){return!e.isEqual(t,this.processedValues)&&!e.isEqual(this.scheduledValues,t)},r.prototype.requestCallback=function(){var t,n,r,i,o;if(null!==this.scheduledValues&&!this.currentTimer&&!this.callbackRunning){if(r=this.changedValues(this.processedValues,this.scheduledValues),this.processedValues=this.scheduledValues,this.scheduledValues=null,this.callbackRunning=!0,t=[],this.batch)t.push(this.callback(r));else for(i in r)o=r[i],t.push(this.callback(o,i));return n=Promise.all(t),e.always(n,function(t){return function(){return t.callbackRunning=!1,t.requestCallback()}}(this))}},r.prototype.changedValues=function(t,n){var r,i,o,u,s,a,l;for(r={},u=Object.keys(t),u=u.concat(Object.keys(n)),u=e.uniq(u),i=0,s=u.length;i<s;i++)o=u[i],l=t[o],a=n[o],e.isEqual(l,a)||(r[o]=a);return r},r.prototype.readFieldValues=function(){return up.Params.fromFields(this.fields).toObject()},r.prototype.check=function(){var t;if(t=this.readFieldValues(),this.isNewValues(t))return this.scheduleValues(t)},r}()}.call(this),function(){}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}},r=[].slice;e=up.util,t=up.element,up.FollowVariant=function(){function i(t,r){this.matchesLink=n(this.matchesLink,this),this.followLink=n(this.followLink,this),this.fullSelector=n(this.fullSelector,this),this.onMousedown=n(this.onMousedown,this),this.onClick=n(this.onClick,this),this.followNow=r.follow,this.preloadLink=r.preload,this.selectors=e.splitValues(t,",")}return i.prototype.onClick=function(e,n){return up.link.shouldProcessEvent(e,n)?t.matches(n,"[up-instant]")?up.event.halt(e):(up.event.consumeAction(e),this.followLink(n)):up.link.allowDefault(e)},i.prototype.onMousedown=function(t,e){if(up.link.shouldProcessEvent(t,e))return up.event.consumeAction(t),this.followLink(e)},i.prototype.fullSelector=function(t){var e;return null==t&&(t=""),e=[],this.selectors.forEach(function(n){var r,i,o,u,s;for(o=["a","[up-href]"],u=[],r=0,i=o.length;r<i;r++)s=o[r],u.push(e.push(""+s+n+t));return u}),e.join(", ")},i.prototype.registerEvents=function(){return up.on("click",this.fullSelector(),function(t){return function(){var n;return n=1<=arguments.length?r.call(arguments,0):[],e.muteRejection(t.onClick.apply(t,n))}}(this)),up.on("mousedown",this.fullSelector("[up-instant]"),function(t){return function(){var n;return n=1<=arguments.length?r.call(arguments,0):[],e.muteRejection(t.onMousedown.apply(t,n))}}(this))},i.prototype.followLink=function(t,e){var n;return null==e&&(e={}),n=up.event.whenEmitted("up:link:follow",{log:"Following link",target:t}),n=n.then(function(n){return function(){return e.preload||up.feedback.start(t),n.followNow(t,e)}}(this)),e.preload||(n=n.then(function(){return up.feedback.stop(t)})),n},i.prototype.matchesLink=function(e){return t.matches(e,this.fullSelector())},i}()}.call(this),function(){var t,e;e=up.util,t=up.element,up.HtmlParser=function(){function n(e){this.html=e,this.wrapNoscriptInHtml(),this.parsedDoc=t.createDocumentFromHtml(this.html)}return n.prototype.title=function(){var t;return null!=(t=this.parsedDoc.querySelector("head title"))?t.textContent:void 0},n.prototype.first=function(e){return t.first(this.parsedDoc,e)},n.prototype.prepareForInsertion=function(t){return this.unwrapNoscriptInElement(t)},n.prototype.wrapNoscriptInHtml=function(){var t;return t=/<noscript[^>]*>((.|\s)*?)<\/noscript>/gi,this.html=this.html.replace(t,function(t){return function(n,r){return t.didWrapNoscript=!0,'<div class="up-noscript" data-html="'+e.escapeHtml(r)+'"></div>'}}(this))},n.prototype.unwrapNoscriptInElement=function(t){var e,n,r,i,o,u,s;if(this.didWrapNoscript){for(s=t.querySelectorAll(".up-noscript"),i=[],e=0,n=s.length;e<n;e++)u=s[e],o=u.getAttribute("data-html"),r=document.createElement("noscript"),r.textContent=o,i.push(u.parentNode.replaceChild(r,u));return i}},n}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.MotionController=function(){function r(t){this.reset=n(this.reset,this),this.whileForwardingFinishEvent=n(this.whileForwardingFinishEvent,this),this.unmarkCluster=n(this.unmarkCluster,this),this.markCluster=n(this.markCluster,this),this.whenElementFinished=n(this.whenElementFinished,this),this.emitFinishEvent=n(this.emitFinishEvent,this),this.finishOneElement=n(this.finishOneElement,this),this.isActive=n(this.isActive,this),this.expandFinishRequest=n(this.expandFinishRequest,this),this.finish=n(this.finish,this),this.startFunction=n(this.startFunction,this),this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return r.prototype.startFunction=function(n,r,i){var o,u;return null==i&&(i={}),n=t.list(n),o=function(){return e.muteRejection(r())},i.trackMotion=null!=(u=i.trackMotion)?u:up.motion.isEnabled(),i.trackMotion===!1?e.microtask(o):(i.trackMotion=!1,this.finish(n).then(function(t){return function(){var e;return e=t.whileForwardingFinishEvent(n,o),e=e.then(function(){return t.unmarkCluster(n)}),t.markCluster(n,e),e}}(this)))},r.prototype.startMotion=function(t,e,n){var r,i,o,u;return null==n&&(n={}),o=function(){return e.start()},r=function(){return e.finish()},u=up.on(t,this.finishEvent,r),i=this.startFunction(t,o,n),i=i.then(u)},r.prototype.finish=function(t){var n;return this.finishCount++,0!==this.clusterCount&&up.motion.isEnabled()?(t=this.expandFinishRequest(t),n=e.map(t,this.finishOneElement),Promise.all(n)):Promise.resolve()},r.prototype.expandFinishRequest=function(n){return n?e.flatMap(n,function(e){return function(n){return t.list(t.closest(n,e.selector),t.all(n,e.selector))}}(this)):t.all(this.selector)},r.prototype.isActive=function(t){return t.classList.contains(this.activeClass)},r.prototype.finishOneElement=function(t){return this.emitFinishEvent(t),this.whenElementFinished(t)},r.prototype.emitFinishEvent=function(t,n){return null==n&&(n={}),n=e.merge({target:t,log:!1},n),up.emit(this.finishEvent,n)},r.prototype.whenElementFinished=function(t){return t[this.dataKey]||Promise.resolve()},r.prototype.markCluster=function(t,e){var n,r,i,o;for(this.clusterCount++,o=[],r=0,i=t.length;r<i;r++)n=t[r],n.classList.add(this.activeClass),o.push(n[this.dataKey]=e);return o},r.prototype.unmarkCluster=function(t){var e,n,r,i;for(this.clusterCount--,i=[],n=0,r=t.length;n<r;n++)e=t[n],e.classList.remove(this.activeClass),i.push(delete e[this.dataKey]);return i},r.prototype.whileForwardingFinishEvent=function(t,n){var r,i;return t.length<2?n():(r=function(n){return function(r){if(!r.forwarded)return e.each(t,function(t){if(t!==r.target&&n.isActive(t))return n.emitFinishEvent(t,{forwarded:!0})})}}(this),i=up.on(t,this.finishEvent,r),n().then(i))},r.prototype.reset=function(){return this.finish().then(function(t){return function(){return t.finishCount=0,t.clusterCount=0}}(this))},r}()}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.Params=function(){function r(t){this.arrayEntryToQuery=n(this.arrayEntryToQuery,this),this.clear(),this.addAll(t)}return r.prototype.clear=function(){return this.entries=[]},r.prototype[""+e.copy.key]=function(){return new up.Params(this)},r.prototype.toObject=function(){var t,n,r,i,o,u,s;for(o={},u=this.entries,n=0,r=u.length;n<r;n++)t=u[n],i=t.name,s=t.value,e.isBasicObjectProperty(i)||(this.isArrayKey(i)?(o[i]||(o[i]=[]),o[i].push(s)):o[i]=s);return o},r.prototype.toArray=function(){return this.entries},r.prototype.toFormData=function(){var t,e,n,r,i;for(e=new FormData,i=this.entries,n=0,r=i.length;n<r;n++)t=i[n],e.append(t.name,t.value);return e},r.prototype.toQuery=function(){var t;return t=e.map(this.entries,this.arrayEntryToQuery),t=e.compact(t),t.join("&")},r.prototype.arrayEntryToQuery=function(t){var n,r;if(r=t.value,this.isPrimitiveValue(r))return n=encodeURIComponent(t.name),e.isGiven(r)&&(n+="=",n+=encodeURIComponent(r)),n},r.prototype.isPrimitiveValue=function(t){return e.isMissing(t)||e.isString(t)||e.isNumber(t)||e.isBoolean(t)},r.prototype.toURL=function(t){var n,r;return n=[t,this.toQuery()],n=e.filter(n,e.isPresent),r=e.contains(t,"?")?"&":"?",n.join(r)},r.prototype.add=function(t,e){return this.entries.push({name:t,value:e})},r.prototype.addAll=function(t){var n,r;if(!e.isMissing(t))return t instanceof this.constructor?(n=this.entries).push.apply(n,t.entries):e.isArray(t)?(r=this.entries).push.apply(r,t):e.isString(t)?this.addAllFromQuery(t):e.isFormData(t)?this.addAllFromFormData(t):e.isObject(t)?this.addAllFromObject(t):up.fail("Unsupport params type: %o",t)},r.prototype.addAllFromObject=function(t){var n,r,i,o,u;r=[];for(n in t)i=t[n],u=e.isArray(i)?i:[i],r.push(function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)o=u[t],r.push(this.add(n,o));return r}.call(this));return r},r.prototype.addAllFromQuery=function(t){var n,r,i,o,u,s,a,l;for(u=t.split("&"),a=[],n=0,r=u.length;n<r;n++)o=u[n],o?(s=o.split("="),i=s[0],l=s[1],i=decodeURIComponent(i),l=e.isGiven(l)?decodeURIComponent(l):null,a.push(this.add(i,l))):a.push(void 0);return a},r.prototype.addAllFromFormData=function(t){return e.eachIterator(t.entries(),function(t){return function(e){return t.add.apply(t,e)}}(this))},r.prototype.set=function(t,e){return this["delete"](t),this.add(t,e)},r.prototype["delete"]=function(t){return this.entries=e.reject(this.entries,this.matchEntryFn(t))},r.prototype.matchEntryFn=function(t){return function(e){return e.name===t}},r.prototype.get=function(t){return this.isArrayKey(t)?this.getAll(t):this.getFirst(t)},r.prototype.getFirst=function(t){var n;return n=e.find(this.entries,this.matchEntryFn(t)),null!=n?n.value:void 0},r.prototype.getAll=function(t){var n;return this.isArrayKey(t)?this.getAll(t):(n=e.map(this.entries,this.matchEntryFn(t)),e.map(n,"value"))},r.prototype.isArrayKey=function(t){return e.endsWith(t,"[]")},r.prototype[""+e.isBlank.key]=function(){return 0===this.entries.length},r.fromForm=function(e){var n;if(e=t.get(e))return n=up.form.submissionFields(e),this.fromFields(n)},r.fromFields=function(t){var n,r,i,o,u;for(o=new this,u=e.wrapList(t),r=0,i=u.length;r<i;r++)n=u[r],o.addField(n);return o},r.prototype.addField=function(e){var n,r,i,o,u,s,a,l,c,p,h,f,d,m;if(l=new this.constructor,(e=t.get(e))&&(s=e.name)&&!e.disabled){if(d=e.tagName,m=e.type,"SELECT"===d){for(c=e.querySelectorAll("option"),h=[],r=0,o=c.length;r<o;r++)a=c[r],a.selected?h.push(this.add(s,a.value)):h.push(void 0);return h}if("checkbox"!==m&&"radio"!==m){if("file"===m){for(p=e.files,f=[],i=0,u=p.length;i<u;i++)n=p[i],f.push(this.add(s,n));return f}return this.add(s,e.value)}if(e.checked)return this.add(s,e.value)}},r.prototype[""+e.isEqual.key]=function(t){return t&&this.constructor===t.constructor&&e.isEqual(this.entries,t.entries)},r.fromURL=function(t){var n,r,i;return n=new this,i=e.parseUrl(t),(r=i.search)&&(r=r.replace(/^\?/,""),n.addAll(r)),n},r.wrap=function(t){return e.wrapValue(t,this)},r}()}.call(this),function(){var t=up.util;up.Rect=function(e){t.assign(this,t.only(e,"left","top","width","height"))},up.Rect.prototype={get bottom(){return this.top+this.height},get right(){return this.left+this.width}},up.Rect.fromElement=function(t){return new up.Rect(t.getBoundingClientRect())}}(),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e=up.util,t=up.element,up.Request=function(i){function o(t){this.cacheKey=n(this.cacheKey,this),this.isCachable=n(this.isCachable,this),this.buildResponse=n(this.buildResponse,this),this.isCrossDomain=n(this.isCrossDomain,this),this.csrfToken=n(this.csrfToken,this),this.navigate=n(this.navigate,this),this.send=n(this.send,this),this.isSafe=n(this.isSafe,this),this.transferSearchToParams=n(this.transferSearchToParams,this),this.transferParamsToUrl=n(this.transferParamsToUrl,this),this.extractHashFromUrl=n(this.extractHashFromUrl,this),this.normalize=n(this.normalize,this),up.legacy.fixKey(t,"data","params"),o.__super__.constructor.call(this,t),this.normalize()}return r(o,i),o.prototype.fields=function(){return["method","url","params","target","failTarget","headers","timeout","preload","cache"]},o.prototype.normalize=function(){return this.params=new up.Params(this.params),this.method=e.normalizeMethod(this.method),this.headers||(this.headers={}),this.extractHashFromUrl(),e.methodAllowsPayload(this.method)?this.transferSearchToParams():this.transferParamsToUrl()},o.prototype.extractHashFromUrl=function(){var t;return t=e.parseUrl(this.url),this.hash=e.presence(t.hash),this.url=e.normalizeUrl(t,{hash:!1})},o.prototype.transferParamsToUrl=function(){if(!e.isBlank(this.params))return this.url=this.params.toURL(this.url),this.params.clear()},o.prototype.transferSearchToParams=function(){var t;if(t=up.Params.fromURL(this.url),!e.isBlank(t))return this.params.addAll(t),this.url=e.normalizeUrl(this.url,{search:!1})},o.prototype.isSafe=function(){return up.proxy.isSafeMethod(this.method)},o.prototype.send=function(){return new Promise(function(t){return function(n,r){var i,o,u,s,a,l,c,p,h,f,d;l=new XMLHttpRequest,c=e.copy(t.headers),d=t.url,h=e.copy(t.params),p=up.proxy.wrapMethod(t.method,h),f=null,e.isBlank(h)||(delete c["Content-Type"],f=h.toFormData()),u=up.protocol.config,t.target&&(c[u.targetHeader]=t.target),t.failTarget&&(c[u.failTargetHeader]=t.failTarget),t.isCrossDomain()||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),(i=t.csrfToken())&&(c[u.csrfHeader]=i),l.open(p,d);for(o in c)a=c[o],l.setRequestHeader(o,a);return s=function(){var e;return e=t.buildResponse(l),e.isSuccess()?n(e):r(e)},l.onload=s,l.onerror=s,l.ontimeout=s,t.timeout&&(l.timeout=t.timeout),l.send(f)}}(this))},o.prototype.navigate=function(){var n,r,i,o,u;return this.transferSearchToParams(),o=t.affix(document.body,"form.up-page-loader"),n=function(e){return t.affix(o,"input[type=hidden]",e)},"GET"===this.method?u="GET":(n({name:up.protocol.config.methodParam,value:this.method}),u="POST"),t.setAttrs(o,{method:u,action:this.url}),(r=up.protocol.csrfParam())&&(i=this.csrfToken())&&n({name:r,value:i}),e.each(this.params.toArray(),n),t.hide(o),up.browser.submitForm(o)},o.prototype.csrfToken=function(){if(!this.isSafe()&&!this.isCrossDomain())return up.protocol.csrfToken()},o.prototype.isCrossDomain=function(){return e.isCrossDomain(this.url)},o.prototype.buildResponse=function(t){var e,n,r;return n={method:this.method,url:this.url,text:t.responseText,status:t.status,request:this,xhr:t},(r=up.protocol.locationFromXhr(t))&&(n.url=r,n.method=null!=(e=up.protocol.methodFromXhr(t))?e:"GET"),n.title=up.protocol.titleFromXhr(t),new up.Response(n)},o.prototype.isCachable=function(){return this.isSafe()&&!e.isFormData(this.params)},o.prototype.cacheKey=function(){return[this.url,this.method,this.params.toQuery(),this.target].join("|")},o.wrap=function(t){return e.wrapValue(t,this)},o}(up.Record)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.Response=function(r){function i(t){this.getHeader=e(this.getHeader,this),this.isFatalError=e(this.isFatalError,this),this.isError=e(this.isError,this),this.isSuccess=e(this.isSuccess,this),i.__super__.constructor.call(this,t)}return n(i,r),i.prototype.fields=function(){return["method","url","text","status","request","xhr","title"]},i.prototype.isSuccess=function(){return this.status&&this.status>=200&&this.status<=299},i.prototype.isError=function(){return!this.isSuccess()},i.prototype.isFatalError=function(){return this.isError()&&t.isBlank(this.text)},i.prototype.getHeader=function(t){return this.xhr.getResponseHeader(t)},i}(up.Record)}.call(this),function(){var t;t=up.element,up.RevealMotion=function(){function e(t,e){var n,r,i,o,u,s,a,l,c,p,h,f;this.element=t,null==e&&(e={}),n=up.viewport.config,this.viewport=null!=(r=e.viewport)?r:up.viewport.closest(this.element),up.legacy.fixKey(n,"snap","revealSnap"),f=n.revealSnap,this.snap=null!=(i=null!=(o=e.snap)?o:e.revealSnap)?i:f,this.snap===!1?this.snap=0:this.snap===!0&&(this.snap=f),this.padding=null!=(u=null!=(s=e.padding)?s:e.revealPadding)?u:n.revealPadding,this.top=e.top,this.fixedTop=null!=(a=e.fixedTop)?a:n.fixedTop,this.fixedBottom=null!=(l=e.fixedBottom)?l:n.fixedBottom,this.speed=null!=(c=null!=(p=e.speed)?p:e.scrollSpeed)?c:n.scrollSpeed,this.behavior=null!=(h=e.behavior)?h:e.scrollBehavior}return e.prototype.start=function(){var t,e,n,r,i;return e=up.Rect.fromElement(this.element),i=this.getViewportRect(this.viewport),this.addPadding(e),this.substractObstructions(i),i.height<=0?Promise.reject(new Error("Viewport has no visible area")):(r=this.viewport.scrollTop,n=r,this.top||e.height>i.height?(t=e.top-i.top,n+=t):e.top<i.top?n-=i.top-e.top:e.bottom>i.bottom&&(n+=e.bottom-i.bottom),n<this.snap&&e.top<.5*i.height&&(n=0),n!==r?this.scrollTo(n):Promise.resolve())},e.prototype.scrollTo=function(t){var e;return e={speed:this.speed,behavior:this.behavior},this.scrollMotion=new up.ScrollMotion(this.viewport,t,e),this.scrollMotion.start()},e.prototype.getViewportRect=function(){return up.viewport.isRoot(this.viewport)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.viewport)},e.prototype.addPadding=function(t){return t.top-=this.padding,t.height+=2*this.padding},e.prototype.substractObstructions=function(e){var n,r,i,o,u,s,a,l,c,p;for(l=t.list.apply(t,this.fixedTop),r=0,o=l.length;r<o;r++)s=l[r],a=up.Rect.fromElement(s),n=a.bottom-e.top,n>0&&(e.top+=n,e.height-=n);for(c=t.list.apply(t,this.fixedBottom),p=[],i=0,u=c.length;i<u;i++)s=c[i],a=up.Rect.fromElement(s),n=e.bottom-a.top,n>0?p.push(e.height-=n):p.push(void 0);return p},e.prototype.finish=function(){var t;return null!=(t=this.scrollMotion)?t.finish():void 0},e}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.ScrollMotion=function(){function n(t,n,i){var o,u,s,a;this.scrollable=t,this.targetTop=n,null==i&&(i={}),this.finish=e(this.finish,this),this.cancel=e(this.cancel,this),this.animationFrame=e(this.animationFrame,this),this.start=e(this.start,this),this.behavior=null!=(o=null!=(u=i.behavior)?u:i.scrollBehavior)?o:"instant",this.speed=(null!=(s=null!=(a=i.speed)?a:i.scrollSpeed)?s:up.viewport.config.scrollSpeed)*r}var r;return r=.065,n.prototype.start=function(){return new Promise(function(t){return function(e,n){return t.resolve=e,t.reject=n,"smooth"===t.behavior&&up.motion.isEnabled()?t.startAnimation():t.finish()}}(this))},n.prototype.startAnimation=function(){return this.startTime=Date.now(),this.startTop=this.scrollable.scrollTop,this.topDiff=this.targetTop-this.startTop,this.duration=Math.sqrt(Math.abs(this.topDiff))/this.speed,requestAnimationFrame(this.animationFrame)},n.prototype.animationFrame=function(){var e,n,r;if(!this.settled)return this.frameTop&&Math.abs(this.frameTop-this.scrollable.scrollTop)>1.5&&this.cancel("Animation aborted due to user intervention"),e=Date.now(),n=e-this.startTime,r=Math.min(n/this.duration,1),this.frameTop=this.startTop+t.simpleEase(r)*this.topDiff,Math.abs(this.targetTop-this.frameTop)<.3?this.finish():(this.scrollable.scrollTop=this.frameTop,requestAnimationFrame(this.animationFrame))},n.prototype.cancel=function(t){return this.settled=!0,this.reject(new Error(t))},n.prototype.finish=function(){return this.settled=!0,this.scrollable.scrollTop=this.targetTop,this.resolve()},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};up.store||(up.store={}),t=up.util,up.store.Memory=function(){function n(){this.values=e(this.values,this),this.keys=e(this.keys,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.get=e(this.get,this),this.clear=e(this.clear,this),this.clear()}return n.prototype.clear=function(){return this.data={}},n.prototype.get=function(t){return this.data[t]},n.prototype.set=function(t,e){return this.data[t]=e},n.prototype.remove=function(t){return delete this.data[t]},n.prototype.keys=function(){return Object.keys(this.data)},n.prototype.values=function(){return t.values(this.data)},n}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t=up.util,up.store.Session=function(t){function r(t){this.saveToSessionStorage=e(this.saveToSessionStorage,this),this.loadFromSessionStorage=e(this.loadFromSessionStorage,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.clear=e(this.clear,this),this.rootKey=t,this.loadFromSessionStorage()}return n(r,t),r.prototype.clear=function(){return r.__super__.clear.call(this),this.saveToSessionStorage()},r.prototype.set=function(t,e){return r.__super__.set.call(this,t,e),this.saveToSessionStorage()},r.prototype.remove=function(t){return r.__super__.remove.call(this,t),this.saveToSessionStorage()},r.prototype.loadFromSessionStorage=function(){var t;try{(t="undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.getItem(this.rootKey):void 0)&&(this.data=JSON.parse(t))}catch(t){}return this.data||(this.data={})},r.prototype.saveToSessionStorage=function(){var t;t=JSON.stringify(this.data);try{return"undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.setItem(this.rootKey,t):void 0}catch(t){}},r}(up.store.Memory)}.call(this),function(){var t,e,n=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,t=up.element,up.Tether=function(){function r(e){this.sync=n(this.sync,this),this.scheduleSync=n(this.scheduleSync,this);var r;this.anchor=e.anchor,r=e.position.split("-"),this.position=r[0],this.align=r[1],this.align?up.legacy.warn("The position value %o is deprecated. Use %o instead.",e.position,this.describeConstraints()):this.align=e.align,this.alignAxis="top"===this.position||"bottom"===this.position?"horizontal":"vertical",this.viewport=up.viewport.closest(this.anchor),this.parent=this.viewport===t.root()?document.body:this.viewport,this.syncOnScroll=!this.viewport.contains(this.anchor.offsetParent),this.root=t.affix(this.parent,".up-bounds"),this.setBoundsOffset(0,0),this.changeEventSubscription("on")}return r.prototype.destroy=function(){return t.remove(this.root),this.changeEventSubscription("off")},r.prototype.changeEventSubscription=function(t){if(up[t](window,"resize",this.scheduleSync),this.syncOnScroll)return up[t](this.viewport,"scroll",this.scheduleSync)},r.prototype.scheduleSync=function(){return clearTimeout(this.syncTimer),this.syncTimer=e.task(this.sync)},r.prototype.sync=function(){var t,n,r,i;switch(r=this.root.getBoundingClientRect(),t=this.anchor.getBoundingClientRect(),n=void 0,i=void 0,this.alignAxis){case"horizontal":i=function(){switch(this.position){case"top":return t.top-r.height;case"bottom":return t.top+t.height}}.call(this),n=function(){switch(this.align){case"left":return t.left;case"center":return t.left+.5*(t.width-r.width);case"right":return t.left+t.width-r.width}}.call(this);break;case"vertical":i=function(){switch(this.align){case"top":return t.top;case"center":return t.top+.5*(t.height-r.height);case"bottom":return t.top+t.height-r.height}}.call(this),n=function(){switch(this.position){case"left":return t.left-r.width;case"right":return t.left+t.width}}.call(this)}return e.isDefined(n)||e.isDefined(i)?this.moveTo(n,i):up.fail("Invalid tether constraints: %o",this.describeConstraints())},r.prototype.describeConstraints=function(){return{position:this.position,align:this.align}},r.prototype.moveTo=function(t,e){var n;return n=this.root.getBoundingClientRect(),this.setBoundsOffset(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)},r.prototype.setBoundsOffset=function(e,n){return this.offsetLeft=e,this.offsetTop=n,t.setStyle(this.root,{left:e,top:n})},r}()}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=up.util,up.UrlSet=function(){function n(n,r){this.urls=n,null==r&&(r={}),this[""+t.isEqual.key]=e(this[""+t.isEqual.key],this),this.matchesAny=e(this.matchesAny,this),this.doesMatchPattern=e(this.doesMatchPattern,this),this.doesMatchFully=e(this.doesMatchFully,this),this.matches=e(this.matches,this),this.normalizeUrl=r.normalizeUrl||t.normalizeUrl,this.urls=t.map(this.urls,this.normalizeUrl),this.urls=t.compact(this.urls)}return n.prototype.matches=function(t){return t.indexOf("*")>=0?this.doesMatchPattern(t):this.doesMatchFully(t)},n.prototype.doesMatchFully=function(e){return t.contains(this.urls,e)},n.prototype.doesMatchPattern=function(e){var n;return n="__ASTERISK__",e=e.replace(/\*/g,n),e=t.escapeRegexp(e),e=e.replace(new RegExp(n,"g"),".*?"),e=new RegExp("^"+e+"$"),t.find(this.urls,function(t){return e.test(t)})},n.prototype.matchesAny=function(e){return t.find(e,this.matches)},n.prototype[""+t.isEqual.key]=function(e){return t.isEqual(this.urls,null!=e?e.urls:void 0)},n}()}.call(this),function(){up.framework=function(){var t,e,n,r;return r=up.util,n=!0,e=function(){return up.emit("up:framework:reset",{log:"Resetting framework"})},t=function(){return up.browser.isSupported()?(up.emit("up:framework:booted",{
|
3
|
+
log:"Framework booted"}),n=!1,up.event.onReady(function(){return r.task(function(){return up.emit("up:app:boot",{log:"Booting user application"}),up.emit("up:app:booted",{log:"User application booted"})})})):"function"==typeof console.log?console.log("Unpoly doesn't support this browser. Framework was not booted."):void 0},{reset:e,boot:t,isBooting:function(){return n}}}()}.call(this),function(){var t=[].slice;up.event=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v;return d=up.util,u=up.element,f=function(){var t,e,n,r,i;for(r=[window,document,document.documentElement,document.body],i=[],e=0,n=r.length;e<n;e++)t=r[e],i.push(up.EventListener.unbindNonDefault(t));return i},n=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],r(e)},e=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],r(e,{jQuery:!0})},r=function(t,e){return up.browser.isSupported()?up.EventListener.bind(t,e):function(){}},m=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],up.EventListener.unbind(e)},s=function(){var e,n,r,o,s,a;return e=1<=arguments.length?t.call(arguments,0):[],e[0].addEventListener?s=e.shift():d.isJQuery(e[0])&&(s=u.get(e.shift())),r=e[0],o=e[1]||{},(a=d.pluckKey(o,"target"))&&(s=a),null==s&&(s=document),l(r,o),n=i(r,o),s.dispatchEvent(n),n},i=function(t,e){var n;return n=document.createEvent("Event"),n.initEvent(t,!0,!0),d.assign(n,e),up.browser.isIE11()&&(n.preventDefault=function(){return Object.defineProperty(n,"defaultPrevented",{get:function(){return!0}})}),n},l=function(e,n){var r,i,o;if(up.log.isEnabled())return r=d.pluckKey(n,"log"),d.isArray(r)?(o=r,r=o[0],i=2<=o.length?t.call(o,1):[]):i=[],d.isString(r)?d.isPresent(n)?up.puts.apply(up,[r+" (%s (%o))"].concat(t.call(i),[e],[n])):up.puts.apply(up,[r+" (%s)"].concat(t.call(i),[e])):r===!0?d.isPresent(n)?up.puts("Event %s (%o)",e,n):up.puts("Event %s",e):void 0},c=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=s.apply(null,e),!n.defaultPrevented},v=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],new Promise(function(t,n){return c.apply(null,e)?t():n(new Error("Event "+e[0]+" was prevented"))})},p=function(t){return n("keydown","body",function(e){if(d.escapePressed(e))return t(e)})},a=function(t){return t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()},o=function(t){if(a(t),"up:action:consumed"!==t.type)return s(t.target,"up:action:consumed",{log:!1})},h=function(t){return"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)},n("up:framework:reset",f),{on:n,$on:e,off:m,emit:s,nobodyPrevents:c,whenEmitted:v,onEscape:p,halt:a,consumeAction:o,onReady:h}}(),up.on=up.event.on,up.$on=up.event.$on,up.off=up.event.off,up.$off=up.event.off,up.emit=up.event.emit,up.legacy.renamedModule("bus","event")}.call(this),function(){}.call(this),function(){up.protocol=function(){var t,e,n,r,i,o,u,s,a,l;return l=up.util,r=up.element,o=function(e){return e.getResponseHeader(t.locationHeader)||e.responseURL},a=function(e){return e.getResponseHeader(t.titleHeader)},u=function(e){var n;if(n=e.getResponseHeader(t.methodHeader))return l.normalizeMethod(n)},i=l.memoize(function(){var e;return e=up.browser.popCookie(t.methodCookie),(e||"get").toLowerCase()}),up.on("up:framework:booted",i),t=new up.Config({targetHeader:"X-Up-Target",failTargetHeader:"X-Up-Fail-Target",locationHeader:"X-Up-Location",validateHeader:"X-Up-Validate",titleHeader:"X-Up-Title",methodHeader:"X-Up-Method",methodCookie:"_up_method",methodParam:"_method",csrfParam:function(){return r.metaContent("csrf-param")},csrfToken:function(){return r.metaContent("csrf-token")},csrfHeader:"X-CSRF-Token"}),e=function(){return l.evalOption(t.csrfParam)},n=function(){return l.evalOption(t.csrfToken)},s=function(){return t.reset()},up.on("up:framework:reset",s),{config:t,reset:s,locationFromXhr:o,titleFromXhr:a,methodFromXhr:u,csrfParam:e,csrfToken:n,initialRequestMethod:i}}()}.call(this),function(){var t=[].slice;up.log=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w;return b=up.util,n=up.browser,d=new up.store.Session("up.log"),i=new up.Config({prefix:"[UP] ",enabled:d.get("enabled"),collapse:!1}),f=function(){return i.reset()},c=function(t){return""+i.prefix+t},r=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],console[n].apply(console,e)},e=/\%[odisf]/g,y=function(t){var e,n,r,i,o,u,s,a;if(o=200,n="",b.isString(t))s=t.replace(/[\n\r\t ]+/g," "),s=s.replace(/^[\n\r\t ]+/,""),s=s.replace(/[\n\r\t ]$/,""),s='"'+s+'"',n='"';else if(b.isUndefined(t))s="undefined";else if(b.isNumber(t)||b.isFunction(t))s=t.toString();else if(b.isArray(t))s="["+b.map(t,y).join(", ")+"]",n="]";else if(b.isJQuery(t))s="$("+b.map(t,y).join(", ")+")",n=")";else if(b.isElement(t)){for(s="<"+t.tagName.toLowerCase(),u=["id","name","class"],r=0,i=u.length;r<i;r++)e=u[r],(a=t.getAttribute(e))&&(s+=" "+e+'="'+a+'"');s+=">",n=">"}else s=JSON.stringify(t);return s.length>o&&(s=s.substr(0,o)+" \u2026",s+=n),s},v=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],g.apply(null,[b.identity,n].concat(t.call(e)))},g=function(){var n,r,i,o;return r=arguments[0],o=arguments[1],n=3<=arguments.length?t.call(arguments,2):[],b.isBlank(o)?"":(i=0,o.replace(e,function(){var t;return t=n[i],t=r(y(t)),i+=1,t}))},o=function(){var e,n;if(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],i.enabled&&n)return console.debug.apply(console,[c(n)].concat(t.call(e)))},h=function(){var e,n;if(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],i.enabled&&n)return console.log.apply(console,[c(n)].concat(t.call(e)))},w=function(){var e,n;if(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n)return console.warn.apply(console,[c(n)].concat(t.call(e)))},l=function(){var e,n,r,o;if(o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n=e.pop(),!i.enabled||!o)return n();r=i.collapse?"groupCollapsed":"group",console[r].apply(console,[c(o)].concat(t.call(e)));try{return n()}finally{o&&console.groupEnd()}},a=function(){var e,n;if(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],n)return console.error.apply(console,[c(n)].concat(t.call(e)))},p=function(){var t;return t=" __ _____ ___ ___ / /_ __\n"+("/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n")+"\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",t+=i.enabled?"Call `up.log.disable()` to disable logging for this session.":"Call `up.log.enable()` to enable logging for this session.",console.log(t)},up.on("up:framework:booted",p),up.on("up:framework:reset",f),m=function(t){return d.set("enabled",t),i.enabled=t},s=function(){return m(!0)},u=function(){return m(!1)},{puts:h,sprintf:v,sprintfWithFormattedArgs:g,puts:h,debug:o,error:a,warn:w,group:l,config:i,enable:s,disable:u,isEnabled:function(){return i.enabled}}}(),up.puts=up.log.puts,up.warn=up.log.warn}.call(this),function(){var t=[].slice;up.toast=function(){var e,n,r,i,o,u,s,a,l,c;return c=up.util,i=up.element,e=function(t){return"<span class='up-toast-variable'>"+c.escapeHtml(t)+"</span>"},l=new up.Config({element:null}),a=function(){return r(),l.reset()},u=function(n){var r;return c.isArray(n)?(n[0]=c.escapeHtml(n[0]),n=(r=up.log).sprintfWithFormattedArgs.apply(r,[e].concat(t.call(n)))):n=c.escapeHtml(n),n},o=function(){return!!l.element},n=function(t,e){var n,r;return r=l.element.querySelector(".up-toast-actions"),n=i.affix(r,".up-toast-action"),n.innerText=t,n.addEventListener("click",e)},s=function(t,e){var o;return null==e&&(e={}),r(),t=u(t),l.element=i.createFromHtml('<div class="up-toast">\n <div class="up-toast-message">'+t+'</div>\n <div class="up-toast-actions"></div>\n</div>'),(o=e.action||e.inspect)&&n(o.label,o.callback),n("Close",r),document.body.appendChild(l.element)},r=function(){if(o())return i.remove(l.element),l.element=null},up.on("up:framework:reset",a),{open:s,close:r,reset:a,isOpen:o}}()}.call(this),function(){var t=[].slice;up.syntax=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y;return y=up.util,s=up.element,e={"[up-back]":-100,"[up-drawer]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},o=[],l=[],h=function(){var e,r;return e=1<=arguments.length?t.call(arguments,0):[],r=n(e),a(o,r)},d=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=h.apply(null,e),n.jQuery=!0,n},v=function(){var e,r;return e=1<=arguments.length?t.call(arguments,0):[],r=n(e),up.framework.isBooting()&&(r.priority=u(r.selector)||up.fail("Unregistered priority for system macro %o",r.selector)),a(l,r)},m=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=v.apply(null,e),n.jQuery=!0,n},u=function(t){var n,r;for(r in e)if(n=e[r],t.indexOf(r)>=0)return n},c=function(t){var e,n,r;return r=t.shift(),e=t.pop(),n=y.extractOptions(t),[r,n,e]},n=function(t){var e,n,r,i;return r=c(t),i=r[0],n=r[1],e=r[2],n=y.options(n,{selector:i,isDefault:up.framework.isBooting(),priority:0,batch:!1,keep:!1,jQuery:!1}),y.assign(e,n)},a=function(t,e){var n,r;for(r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e),e},i=function(t,e){var n,r;return r=l.concat(o),n=new up.CompilePass(t,r,e),n.compile()},f=function(t,e){var n;return(n=t.upDestructors)||(n=[],t.upDestructors=n,t.classList.add("up-can-clean")),y.isArray(e)?n.push.apply(n,e):n.push(e)},r=function(t){var e;return e=s.subtree(t,".up-can-clean"),y.each(e,function(t){var e,n,r,i,o;if(n=t.upDestructors){for(o=[],r=0,i=n.length;r<i;r++)e=n[r],o.push(e());return o}})},p=function(t){var e;return e=s.get(t),s.jsonAttr(e,"up-data")||{}},g=function(){return o=y.filter(o,"isDefault"),l=y.filter(l,"isDefault")},up.on("up:framework:reset",g),{compiler:h,macro:v,$compiler:d,$macro:m,destructor:f,compile:i,clean:r,data:p}}(),up.compiler=up.syntax.compiler,up.$compiler=up.syntax.$compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro,up.$macro=up.syntax.$macro}.call(this),function(){up.history=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m;return m=up.util,r=up.element,e=new up.Config({enabled:!0,popTargets:["body"],restoreScroll:!0}),c=void 0,u=void 0,f=function(){return e.reset(),c=void 0,u=void 0},s=function(t,e){return e||(e={}),e.hash=!0,m.normalizeUrl(t,e)},n=function(t){return s(up.browser.url(),t)},i=function(t){var e;return e={stripTrailingSlash:!0},s(t,e)===n(e)},a=function(t){return u&&(c=u,u=void 0),u=t},h=function(t){if(o("replaceState",t))return up.emit("up:history:replaced",{url:t})},p=function(t,e){if(e=m.options(e,{force:!1}),t=s(t),(e.force||!i(t))&&up.event.nobodyPrevents("up:history:push",{url:t,log:"Adding history entry for "+t}))return o("pushState",t)?up.emit("up:history:pushed",{url:t,log:"Advanced to location "+t}):up.emit("up:history:muted",{url:t,log:"Did not advance to "+t+" (history is unavailable)"})},o=function(r,i){var o;return!(!up.browser.canPushState()||!e.enabled)&&(o=t(),window.history[r](o,"",i),a(n()),!0)},t=function(){return{fromUp:!0}},d=function(t){var r,i,o;return(null!=t?t.fromUp:void 0)?(o=n(),up.emit("up:history:restore",{url:o,log:"Restoring location "+o}),r=e.popTargets.join(", "),i=up.replace(r,o,{history:!1,title:!0,reveal:!1,saveScroll:!1,restoreScroll:e.restoreScroll,layer:"page"}),i.then(function(){return o=n(),up.emit("up:history:restored",{url:o,log:"Restored location "+o})})):up.puts("Ignoring a state not pushed by Unpoly (%o)",t)},l=function(t){var e;return a(n()),up.viewport.saveScroll({url:c}),e=t.state,d(e)},up.on("up:app:boot",function(){var t;if(up.browser.canPushState())return t=function(){return up.browser.canControlScrollRestoration()&&(window.history.scrollRestoration="manual"),window.addEventListener("popstate",l),h(n(),{force:!0})},"undefined"!=typeof jasmine&&null!==jasmine?t():setTimeout(t,100)}),up.macro("a[up-back], [up-href][up-back]",function(t){if(m.isPresent(c))return r.setMissingAttrs(t,{"up-href":c,"up-restore-scroll":""}),t.removeAttribute("up-back"),up.link.makeFollowable(t)}),up.on("up:framework:reset",f),{config:e,push:p,replace:h,url:n,isUrl:i,previousUrl:function(){return c},normalizeUrl:s}}()}.call(this),function(){var t=[].slice;up.viewport=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P,x,O,R,M,j,D,L;return D=up.util,u=up.element,o=new up.Config({duration:0,viewports:[".up-modal-viewport","[up-viewport]","[up-fixed]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:50,revealPadding:0,scrollSpeed:1}),m=new up.Cache({size:30,key:up.history.normalizeUrl}),j=new up.MotionController("scrolling"),y=function(){return o.reset(),m.clear(),j.reset()},P=function(t,e,n){var r;return r=new up.ScrollMotion(t,e,n),j.startMotion(t,r,n)},s=function(t){var e;return up.motion.isEnabled()?(e=i(t),j.finish(e)):Promise.resolve()},r=function(){var t;return t=o.anchoredRight.join(","),u.all(t)},v=function(){var e,n,r,i,s,a,l;return r=function(t,e){var n;return n=D.sum(e,function(e){return u.styleNumber(t,e)})||0,n+t.offsetHeight},s=function(t){return r(t,["top","margin-top"])},i=function(t){return r(t,["bottom","margin-bottom"])},l=u.all(o.fixedTop.join(", ")),n=u.all(o.fixedBottom.join(", ")),a=D.map(l,s),e=D.map(n,i),{top:Math.max.apply(Math,[0].concat(t.call(a))),bottom:Math.max.apply(Math,[0].concat(t.call(e)))}},w=function(t,e){var n,r;return n=u.get(t),r=new up.RevealMotion(n,e),j.startMotion(n,r,e)},x=function(t,e){var n,r,i,o,s,a;return null==e&&(e={}),r=e.hash,o=e.reveal,i=e.restoreScroll,s=D.only(e,"scrollBehavior","scrollSpeed"),i?(n=D.presence(i,D.isObject),b({around:t,scrollTops:n})):r&&o===!0?k(r,s):o?(D.isElement(o)||D.isJQuery(o)?t=u.get(o):D.isString(o)&&(a=u.resolveSelector(o,e.origin),t=up.fragment.first(a)),t?w(t,s):void 0):Promise.resolve()},k=function(t){var e;return t&&(e=a(t))?w(e,{top:!0}):Promise.resolve()},n=function(){return[A()].concat(t.call(o.viewports)).join(",")},i=function(t){var e;return e=u.get(t),u.closest(e,n())},f=function(t){var e;return e=u.get(t),u.subtree(e,n())},p=function(t){var e;return e=u.get(t),u.list(i(e),f(e))},c=function(){return u.all(n())},A=function(){var t;return(t=document.scrollingElement)?t.tagName:"html"},h=function(){return document.querySelector(A())},F=function(){return u.root().clientWidth},E=function(){return u.root().clientHeight},d=function(t){return u.matches(t,A())},S=function(){return window.innerWidth>document.documentElement.offsetWidth},T=function(){var t,e,n;return t=document.body,n=document.documentElement,e=D.find([n,t],L),e||h()},L=function(t){var e;return e=u.style(t,"overflow-y"),"auto"===e||"scroll"===e},M=D.memoize(function(){var t,e,n;return e={position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"},t=up.element.affix(document.body,"[up-viewport]",{style:e}),n=t.offsetWidth-t.clientWidth,up.element.remove(t),n}),O=function(t){return u.toSelector(t)},R=function(){return D.mapObject(c(),function(t){return[O(t),t.scrollTop]})},l=function(t){var e;return null==t&&(t=document),e=["[up-fixed]"].concat(o.fixedTop).concat(o.fixedBottom),t.querySelectorAll(e.join(","))},C=function(t){var e,n,r,i;return null==t&&(t={}),i=null!=(e=t.url)?e:up.history.url(),r=null!=(n=t.tops)?n:R(),m.set(i,r)},b=function(t){var e,n,r;return null==t&&(t={}),n=up.history.url(),r=t.around?p(t.around):c(),e=t.scrollTops||m.get(n)||{},up.log.group("Restoring scroll positions for URL %s to %o",n,e,function(){var t;return t=D.map(r,function(t){var n,r;return n=O(t),r=e[n]||0,P(t,r,{duration:0})}),Promise.all(t)})},e=function(t,e){var n,r,i,o,s,a,c,p;return null==e&&(e={}),i=u.get(t),c=up.viewport.closest(i),p=c.getBoundingClientRect(),a=i.getBoundingClientRect(),r=new up.Rect({left:a.left-p.left,top:a.top-p.top,width:a.width,height:a.height}),"function"==typeof e.afterMeasure&&e.afterMeasure(),u.setStyle(i,{position:"static"===i.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"}),n=u.createFromSelector(".up-bounds"),u.insertBefore(i,n),n.appendChild(i),o=function(t,e){return r.left+=t,r.top+=e,u.setStyle(n,r)},o(0,0),s=i.getBoundingClientRect(),o(a.left-s.left,a.top-s.top),D.each(l(i),u.fixedToAbsolute),{bounds:n,moveBounds:o}},a=function(t){var e;if(t=g(t))return e=[u.attributeSelector("up-id",t),u.attributeSelector("id",t),"a"+u.attributeSelector("name",t)].join(","),up.fragment.first(e)},g=function(t){return t&&"#"===t[0]&&(t=t.substr(1)),D.presence(t)},up.on("up:app:booted",function(){return k(location.hash)}),up.on("up:framework:reset",y),{reveal:w,revealHash:k,firstHashTarget:a,scroll:P,config:o,closest:i,subtree:f,around:p,all:c,rootSelector:A,root:h,rootWidth:F,rootHeight:E,rootHasVerticalScrollbar:S,rootOverflowElement:T,isRoot:d,scrollbarWidth:M,scrollTops:R,saveScroll:C,restoreScroll:b,scrollAfterInsertFragment:x,anchoredRight:r,fixedElements:l,absolutize:e}}(),up.scroll=up.viewport.scroll,up.reveal=up.viewport.reveal,up.revealHash=up.viewport.revealHash,up.legacy.renamedModule("layout","viewport")}.call(this),function(){var t=[].slice;up.fragment=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P,x,O,R;return O=up.util,u=up.element,r=new up.Config({fallbacks:["body"],fallbackTransition:null}),E=function(){return r.reset()},T=function(t,e){if(e!==!1)return O.isPresent(e)&&(e=O.normalizeUrl(e)),t.setAttribute("up-source",e)},C=function(t){var e;return e=u.get(t),(e=u.closest(e,"[up-source]"))?e.getAttribute("up-source"):up.browser.url()},S=function(t,e,r){var i,o,u,s,a,l,c,p,h,f,d;if(r=O.options(r),r.inspectResponse=u=function(){return up.browser.navigate(e,O.only(r,"method","params"))},!up.browser.canPushState()&&r.history!==!1)return r.preload||u(),O.unresolvablePromise();d=O.merge(r,{humanizedTarget:"target"}),o=O.merge(r,{humanizedTarget:"failure target",provideTarget:void 0,restoreScroll:!1}),O.renameKey(o,"failTransition","transition"),O.renameKey(o,"failLayer","layer"),O.renameKey(o,"failReveal","reveal");try{a=n(t,d),s=n(r.failTarget,o)}catch(t){return i=t,Promise.reject(i)}return f=O.only(r,"method","data","params","cache","preload","headers","timeout"),O.assign(f,{url:e,target:a,failTarget:s}),h=new up.Request(f),c=function(t){return w(!0,a,h,t,d)},l=function(t){var e,n;return n=function(){return Promise.reject(t)},t.isFatalError()?n():(e=w(!1,s,h,t,o),O.always(e,n))},p=up.request(h),r.preload||(p=p.then(c,l)),p},w=function(t,e,n,r,i){var o,u,s,a;return a=r.url,u=a,(o=n.hash)&&(i.hash=o,u+=o),s="GET"===r.method,t?s?(i.history===!1||O.isString(i.history)||(i.history=u),i.source===!1||O.isString(i.source)||(i.source=a)):(O.isString(i.history)||(i.history=!1),O.isString(i.source)||(i.source="keep")):s?(i.history!==!1&&(i.history=u),i.source!==!1&&(i.source=a)):(i.history=!1,i.source="keep"),A(i)&&r.title&&(i.title=r.title),c(e,r.text,i)},A=function(t){return!(t.title===!1||O.isString(t.title)||t.history===!1&&t.title!==!0)},c=function(t,n,r){return up.log.group("Extracting %s from %d bytes of HTML",t,null!=n?n.length:void 0,function(){return r=O.options(r,{historyMethod:"push",keep:!0,layer:"auto"}),r.saveScroll!==!1&&up.viewport.saveScroll(),O.rejectOnError(function(){var i,o,u,s,a,l,c;for("function"==typeof r.provideTarget&&r.provideTarget(),s=new up.HtmlParser(n),i=e(t,s,r),A(r)&&(a=s.title())&&(r.title=a),R(r),c=[],o=0,u=i.length;o<u;o++)l=i[o],up.log.group("Swapping fragment %s",l.selector,function(){var t,e;return t=O.merge(r,O.only(l,"origin","reveal")),s.prepareForInsertion(l.newElement),e=P(l.oldElement,l.newElement,l.pseudoClass,l.transition,t),c.push(e)});return Promise.all(c)})})},n=function(t,e){var n;return n=new up.ExtractCascade(t,e),n.bestPreflightSelector()},e=function(t,e,n){var r;return n=O.merge(n,{response:e}),r=new up.ExtractCascade(t,n),r.bestMatchingSteps()},R=function(t){if(t=O.options(t,{historyMethod:"push"}),t.history&&up.history[t.historyMethod](t.history),O.isString(t.title))return document.title=t.title},P=function(t,e,n,r,i){var o,a,c,h,f,d,v,g,b,w;if(r||(r="none"),"keep"===i.source&&(i=O.merge(i,{source:C(t)})),T(e,i.source),n){for(w=u.createFromSelector(".up-insertion");a=e.firstChild;)w.appendChild(a);for("before"===n?t.insertAdjacentElement("afterbegin",w):t.insertAdjacentElement("beforeend",w),b=w.children,c=0,f=b.length;c<f;c++)o=b[c],m(o,i);return g=up.viewport.scrollAfterInsertFragment(w,i),g=O.always(g,up.animate(w,r,i)),g=g.then(function(){return u.unwrap(w)})}return(h=p(t,e,i))?(l(h),Promise.resolve()):(i.keepPlans=x(t,e,i),v=t.parentNode,d=O.merge(i,{beforeStart:function(){return y(t)},afterInsert:function(){return up.hello(e,i)},beforeDetach:function(){return up.syntax.clean(t)},afterDetach:function(){return u.remove(t),s(t,{parent:v,log:!1})}}),up.morph(t,e,r,d))},x=function(t,e,n){var r,i,o,s,a,l,c;if(i=[],n.keep)for(c=t.querySelectorAll("[up-keep]"),r=0,a=c.length;r<a;r++)o=c[r],(l=p(o,e,O.merge(n,{descendantsOnly:!0})))&&(s=o.cloneNode(!0),u.replace(o,s),u.replace(l.newElement,o),i.push(l));return i},p=function(t,e,n){var r,i,o,s,a;if(n.keep&&(i=t,(s=u.booleanOrStringAttr(i,"up-keep"))&&(O.isString(s)||(s="&"),s=u.resolveSelector(s,i),o=n.descendantsOnly?u.first(e,s):u.subtree(e,s)[0],o&&u.matches(o,"[up-keep]")&&(a={oldElement:i,newElement:o,newData:up.syntax.data(o)},r={target:i,newFragment:o,newData:a.newData,log:["Keeping element %o",i]},up.event.nobodyPrevents("up:fragment:keep",r)))))return a},m=function(t,e){var n,r,i,o,s,c;for(n=u.get(t),e=O.options(e,{keepPlans:[]}),i=[],c=e.keepPlans,r=0,o=c.length;r<o;r++)s=c[r],l(s),i.push(s.oldElement);return up.syntax.compile(n,{skip:i}),a(n,e),n},a=function(t,e){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t],origin:e.origin})},l=function(t){var e,n;return n=t.oldElement,e={target:n,newFragment:t.newElement,newData:t.newData,log:["Kept fragment %o",n]},up.emit("up:fragment:kept",e)},s=function(t,e){var n,r;return F(t,e)&&(n=["Destroyed fragment %o",t]),r=e.parent||up.fail("Missing { parent } option"),up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:n})},v=function(t){return!u.closest(t,".up-destroying")},h=function(){var e,n,r,i,o,s,a;return e=1<=arguments.length?t.call(arguments,0):[],r=O.extractOptions(e),a=e.pop(),s=e[0]||document,n=null!=(o=r.layer)?o:"auto",i=r.origin,a=u.resolveSelector(a,i),"auto"===n?d(s,a,i):f(s,a,n)},d=function(t,e,n){var r,i;return r=["popup","modal","page"],n&&(i=g(n),O.remove(r,i),r.unshift(i)),O.findResult(r,function(n){return f(t,e,n)})},f=function(t,e,n){var r;return r=u.all(t,e),O.findResult(r,function(t){if(v(t)&&b(t,n))return t})},g=function(t){return up.popup.contains(t)?"popup":up.modal.contains(t)?"modal":"page"},b=function(t,e){return!e||g(t)===e},i=function(t,e){return null==e&&(e=document.body),u.affix(e,t,{"class":"up-placeholder"})},o=function(t,e){var n,r,i;return r=u.get(t),e=O.options(e,{animation:!1}),r?(y(r),R(e),n=function(){var t;return t=up.motion.animateOptions(e),up.motion.animate(r,e.animation,t)},i=function(){var t;return t=r.parentNode,up.syntax.clean(r),u.remove(r),s(r,{parent:t,log:e.log})},n().then(i)):Promise.resolve()},F=function(t,e){return e.log!==!1&&!u.matches(t,".up-placeholder, .up-tooltip, .up-modal, .up-popup")},y=function(t){return t.classList.add("up-destroying")},k=function(t,e){var n;return e=O.options(e,{cache:!1}),n=e.url||C(t),S(t,n,e)},up.on("up:app:boot",function(){var t;return t=document.body,T(t,up.browser.url()),m(t)}),up.on("up:framework:reset",E),{createPlaceholder:i,replace:S,reload:k,destroy:o,extract:c,first:h,source:C,hello:m,config:r,layerOf:g}}(),up.replace=up.fragment.replace,up.extract=up.fragment.extract,up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.hello=up.fragment.hello,up.first=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],up.legacy.warn("up.first() has been renamed to up.fragment.first()"),(n=up.fragment).first.apply(n,e)},up.legacy.renamedModule("flow","fragment"),up.legacy.renamedModule("dom","fragment")}.call(this),function(){var t=[].slice;up.motion=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P;return C=up.util,l=up.element,y={},s={},b={},a={},g=new up.MotionController("motion"),u=new up.Config({duration:300,delay:0,easing:"ease",enabled:!0}),S=function(){return g.reset(),y=C.copy(s),b=C.copy(a),u.reset()},d=function(){return u.enabled},n=function(t,e,n){var r,o,u,s;return o=l.get(t),n=i(n),r=c(e),s=P(o,e,n),s?(u=function(){return r(o,n)},g.startFunction(o,u,n)):E(o,e)},P=function(t,e,n){return n=i(n),d()&&!m(e)&&n.duration>0&&!l.isSingleton(t)},E=function(t,e){return C.isOptions(e)&&l.setStyle(t,e),Promise.resolve()},e=0,r=function(t,e,n){var r;return n=C.merge(n,{finishEvent:g.finishEvent}),r=new up.CssTransition(t,e,n),r.start()},i=function(){var e,n,r,i,o,s,a,c,p,h,f,d,m,v,g;return e=1<=arguments.length?t.call(arguments,0):[],g=null!=(o=e.shift())?o:{},i=C.extractOptions(e),r=e.pop()||l.none(),n={},n.easing=null!=(s=null!=(a=null!=(c=g.easing)?c:r.getAttribute("up-easing"))?a:i.easing)?s:u.easing,n.duration=null!=(p=null!=(h=null!=(f=g.duration)?f:l.numberAttr(r,"up-duration"))?h:i.duration)?p:u.duration,n.delay=null!=(d=null!=(m=null!=(v=g.delay)?v:l.numberAttr(r,"up-delay"))?m:i.delay)?d:u.delay,n.trackMotion=g.trackMotion,n},p=function(t){return y[t]||up.fail("Unknown animation %o",t)},f=function(t){return g.finish(t)},v=function(t,e,n,r){var o,u,s,a,c,p,f,d,m,v,y,b;return r=C.options(r),C.assign(r,i(r)),t=l.get(t),e=l.get(e),v=h(n),b=P(t,v,r),a=C.pluckKey(r,"beforeStart")||C.noop,u=C.pluckKey(r,"afterInsert")||C.noop,s=C.pluckKey(r,"beforeDetach")||C.noop,o=C.pluckKey(r,"afterDetach")||C.noop,a(),f=function(){var t;return t=C.merge(r,{behavior:"instant"}),up.viewport.scrollAfterInsertFragment(e,t)},b?g.isActive(t)&&r.trackMotion===!1?v(t,e,r):(up.puts("Morphing %o to %o with transition %o",t,e,n),y=up.viewport.closest(t),d=y.scrollTop,c=up.viewport.absolutize(t,{afterMeasure:function(){return l.insertBefore(t,e),u()}}),m=function(){var n;return n=f(),n=n.then(function(){var n;return n=y.scrollTop,c.moveBounds(0,n-d),v(t,e,r)}),n=n.then(function(){return s(),l.remove(c.bounds),o()})},g.startFunction([t,e],m,r)):(s(),A(t,e),u(),o(),p=f())},h=function(t){var e;if(!m(t))return C.isFunction(t)?t:C.isArray(t)?o.apply(null,t):C.isString(t)?t.indexOf("/")>=0?o.apply(null,t.split("/")):(e=b[t])?h(e):void 0:up.fail("Unknown transition %o",t)},o=function(t,e){var n,r;return m(t)&&m(t)?void 0:(r=c(t)||C.asyncNoop,n=c(e)||C.asyncNoop,function(t,e,i){return Promise.all([r(t,i),n(e,i)])})},c=function(t){return m(t)?void 0:C.isFunction(t)?t:C.isString(t)?p(t):C.isOptions(t)?function(e,n){return r(e,t,n)}:up.fail("Unknown animation %o",t)},A=function(t,e){return l.replace(t,e)},k=function(t,e){return b[t]=h(e)},w=function(t,e){return y[t]=c(e)},T=function(){return s=C.copy(y),a=C.copy(b)},m=function(t){return!t||"none"===t||C.isBlank(t)},w("fade-in",function(t,e){return l.setStyle(t,{opacity:0}),r(t,{opacity:1},e)}),w("fade-out",function(t,e){return l.setStyle(t,{opacity:1}),r(t,{opacity:0},e)}),F=function(t,e){return{transform:"translate("+t+"px, "+e+"px)"}},w("move-to-top",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.top+n.height,r(t,F(0,-i),e)}),w("move-from-top",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.top+n.height,l.setStyle(t,F(0,-i)),r(t,F(0,0),e)}),w("move-to-bottom",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=l.root().clientHeight-n.top,r(t,F(0,i),e)}),w("move-from-bottom",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=up.viewport.rootHeight()-n.top,l.setStyle(t,F(0,i)),r(t,F(0,0),e)}),w("move-to-left",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.left+n.width,r(t,F(-i,0),e)}),w("move-from-left",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=n.left+n.width,l.setStyle(t,F(-i,0)),r(t,F(0,0),e)}),w("move-to-right",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=up.viewport.rootWidth()-n.left,r(t,F(i,0),e)}),w("move-from-right",function(t,e){var n,i;return l.setStyle(t,F(0,0)),n=t.getBoundingClientRect(),i=up.viewport.rootWidth()-n.left,l.setStyle(t,F(i,0)),r(t,F(0,0),e)}),w("roll-down",function(t,e){var r,i,o;return i=l.style(t,"height"),o=l.setTemporaryStyle(t,{height:"0px",overflow:"hidden"}),r=n(t,{height:i},e),r.then(o),r}),k("move-left",["move-to-left","move-from-right"]),k("move-right",["move-to-right","move-from-left"]),k("move-up",["move-to-top","move-from-bottom"]),k("move-down",["move-to-bottom","move-from-top"]),k("cross-fade",["fade-out","fade-in"]),up.on("up:framework:booted",T),up.on("up:framework:reset",S),{morph:v,animate:n,animateOptions:i,finish:f,finishCount:function(){return g.finishCount},transition:k,animation:w,config:u,isEnabled:d,isNone:m}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var t=[].slice;up.proxy=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P,x,O,R,M,j,D,L,U;return D=up.util,a=up.element,L=void 0,S=void 0,O=void 0,y=void 0,R=void 0,T=[],s=new up.Config({slowDelay:300,preloadDelay:75,cacheSize:70,cacheExpiry:3e5,maxRequests:4,wrapMethods:["PATCH","PUT","DELETE"],safeMethods:["GET","OPTIONS","HEAD"]}),r=new up.Cache({size:function(){return s.cacheSize},expiry:function(){return s.cacheExpiry},key:function(t){return up.Request.wrap(t).cacheKey()},cachable:function(t){return up.Request.wrap(t).isCachable()}}),l=function(t){var e,n,i,o,u,s,a;for(t=up.Request.wrap(t),n=[t],"html"!==t.target&&(s=t.variant({target:"html"}),n.push(s),"body"!==t.target&&(u=t.variant({target:"body"}),n.push(u))),i=0,o=n.length;i<o;i++)if(e=n[i],a=r.get(e))return a},i=function(){return clearTimeout(S),S=null},o=function(){return clearTimeout(O),O=null},C=function(){return L=null,i(),o(),y=0,s.reset(),r.clear(),R=!1,T=[]},C(),g=function(){var e,n,r,i,o,s;return e=1<=arguments.length?t.call(arguments,0):[],D.isString(e[0])&&(s=e.shift()),o=e.shift()||{},s&&(o.url=s),i=up.Request.wrap(o),i.isSafe()||u(),n=i.cache===!1,!n&&(r=l(i))?up.puts("Re-using cached response for %s %s",i.method,i.url):(r=m(i),x(i,r),r["catch"](function(){return F(i)})),i.preload||(v(),D.always(r,d)),r},e=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],up.legacy.warn("up.ajax() has been deprecated. Use up.request() instead."),new Promise(function(t,n){var r;return r=function(e){return t(e.text)},g.apply(null,e).then(r,n)})},p=function(){return 0===y},c=function(){return y>0},v=function(){var t;if(y+=1,!O)return t=function(){if(c())return up.emit("up:proxy:slow",{log:"Proxy is slow to respond"}),R=!0},O=D.timer(s.slowDelay,t)},d=function(){if(y-=1,p()&&(o(),R))return up.emit("up:proxy:recover",{log:"Proxy has recovered from slow response"}),R=!1},m=function(t){return y<s.maxRequests?f(t):E(t)},E=function(t){var e;return up.puts("Queuing request for %s %s",t.method,t.url),e=function(){return f(t)},e=D.previewable(e),T.push(e),e.promise},f=function(t){var e,n;return e={request:t,log:["Loading %s %s",t.method,t.url]},up.event.nobodyPrevents("up:proxy:load",e)?(n=t.send(),D.always(n,P),D.always(n,b),n):(D.microtask(b),Promise.reject(new Error("Event up:proxy:load was prevented")))},A=function(t){var e,n;if(n=t.request,t.url&&n.url!==t.url)return e=n.variant({method:t.method,url:t.url}),up.proxy.alias(n,e)},P=function(t){return t.isFatalError()?up.emit("up:proxy:fatal",{log:"Fatal error during request",request:t.request,response:t}):(t.isError()||A(t),up.emit("up:proxy:loaded",{log:["Server responded with HTTP %d (%d bytes)",t.status,t.text.length],request:t.request,response:t}))},b=function(){var t;"function"==typeof(t=T.shift())&&t()},n=r.alias,x=r.set,F=r.remove,u=r.clear,k=function(t){var e,n;if(n=a.numberAttr(t,"up-delay")||s.preloadDelay,t!==L)return L=t,i(),e=function(){return D.muteRejection(w(t)),L=null},M(e,n)},M=function(t,e){return S=setTimeout(t,e)},j=function(t){if(t===L)return L=void 0,i()},w=function(t,e){var n,r;return n=a.get(t),up.link.isSafe(n)?(r={log:["Preloading link %o",n],target:n},up.event.whenEmitted("up:link:preload",r).then(function(){var t;return t=up.link.followVariantForLink(n),t.preloadLink(n,e)})):Promise.reject(new Error("Won't preload unsafe link"))},h=function(t){return D.contains(s.safeMethods,t)},U=function(t,e){return D.contains(s.wrapMethods,t)&&(e.add(up.protocol.config.methodParam,t),t="POST"),t},up.compiler("a[up-preload], [up-href][up-preload]",function(t){if(up.link.isSafe(t))return t.addEventListener("mouseenter",function(e){if(up.link.shouldProcessEvent(e,t))return k(t);
|
4
|
+
}),t.addEventListener("mouseleave",function(){return j(t)})}),up.on("up:framework:reset",C),{preload:w,ajax:e,request:g,get:l,alias:n,clear:u,remove:F,isIdle:p,isBusy:c,isSafeMethod:h,wrapMethod:U,config:s}}(),up.ajax=up.proxy.ajax,up.request=up.proxy.request}.call(this),function(){up.link=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m;return d=up.util,o=up.element,m=function(t,e){var n,r;return null==e&&(e={}),r=null!=(n=e.target)?n:"body",up.replace(r,t,e)},u=function(t,e){var n,r;return n=o.get(t),r=a(n),r.followLink(n,e)},r=function(t,e){var n,r,i,u,a,l,c;return e=d.options(e),c=null!=(n=null!=(r=e.url)?r:t.getAttribute("up-href"))?n:t.getAttribute("href"),l=null!=(i=e.target)?i:t.getAttribute("up-target"),null==e.failTarget&&(e.failTarget=t.getAttribute("up-fail-target")),null==e.fallback&&(e.fallback=t.getAttribute("up-fallback")),null==e.transition&&(e.transition=o.booleanOrStringAttr(t,"up-transition")),null==e.failTransition&&(e.failTransition=o.booleanOrStringAttr(t,"up-fail-transition")),null==e.history&&(e.history=o.booleanOrStringAttr(t,"up-history")),null==e.reveal&&(e.reveal=null==(u=o.booleanOrStringAttr(t,"up-reveal"))||u),null==e.failReveal&&(e.failReveal=null==(a=o.booleanOrStringAttr(t,"up-fail-reveal"))||a),null==e.cache&&(e.cache=o.booleanAttr(t,"up-cache")),null==e.restoreScroll&&(e.restoreScroll=o.booleanAttr(t,"up-restore-scroll")),e.method=s(t,e),null==e.origin&&(e.origin=t),null==e.layer&&(e.layer=t.getAttribute("up-layer")),null==e.failLayer&&(e.failLayer=t.getAttribute("up-fail-layer")),null==e.confirm&&(e.confirm=t.getAttribute("up-confirm")),e=d.merge(e,up.motion.animateOptions(e,t)),up.browser.whenConfirmed(e).then(function(){return up.replace(l,c,e)})},i=function(t,e){return e=d.options(e),e.preload=!0,r(t,e)},s=function(t,e){var n,r,i,o;return null==e&&(e={}),n=null!=(r=null!=(i=null!=(o=e.method)?o:t.getAttribute("up-method"))?i:t.getAttribute("data-method"))?r:"GET",n.toUpperCase()},n=function(){},l=[],e=function(t,e){var n;return n=new up.FollowVariant(t,e),l.push(n),n.registerEvents(),n},c=function(t){return t=o.get(t),!!a(t,{"default":!1})},a=function(e,n){var r;return null==n&&(n={}),r=d.find(l,function(t){return t.matchesLink(e)}),n["default"]!==!1&&(r||(r=t)),r},h=function(t){if(!c(t))return t.setAttribute("up-follow","")},f=function(t,e){var n,r,i;return i=t.target,!!d.isUnmodifiedMouseEvent(t)&&(i===e||(r="a, [up-href], "+up.form.fieldSelector(),n=o.closest(i,r),!n||n===e))},p=function(t,e){var n;return n=s(t,e),up.proxy.isSafeMethod(n)},t=e("[up-target], [up-follow]",{follow:function(t,e){return r(t,e)},preload:function(t,e){return i(t,e)}}),up.macro("[up-dash]",function(t){var e,n;return n=o.booleanOrStringAttr(t,"up-dash"),t.removeAttribute("up-dash"),e={"up-preload":"","up-instant":""},n===!0?h(t):e["up-target"]=n,o.setMissingAttrs(t,e)}),up.macro("[up-expand]",function(t){var e,n,r,i,u,s,a,l,c,p;if(c=t.getAttribute("up-expand")||"a, [up-href]",r=o.all(t,c),n=r[0]){for(p=/^up-/,a={},a["up-href"]=n.getAttribute("href"),l=n.attributes,i=0,u=l.length;i<u;i++)e=l[i],s=e.name,s.match(p)&&(a[s]=e.value);return o.setMissingAttrs(t,a),t.removeAttribute("up-expand"),h(t)}}),{visit:m,follow:u,makeFollowable:h,isSafe:p,isFollowable:c,shouldProcessEvent:f,followMethod:s,addFollowVariant:e,followVariantForLink:a,allowDefault:n}}(),up.visit=up.link.visit,up.follow=up.link.follow}.call(this),function(){var t=[].slice;up.form=function(){var e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w;return b=up.util,i=up.element,r=new up.Config({validateTargets:["fieldset:has(&)","label:has(&)","form:has(&)"],fields:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitButtons:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}),h=function(){return r.reset()},o=function(){return r.fields.join(",")},u=function(t){return i.subtree(t,o())},s=function(t){var e,n;return n=u(t),(e=m(t))&&(n=b.toArray(n),n.push(e)),n},m=function(t){var e,n;return n=d(),e=document.activeElement,e&&i.matches(e,n)&&t.contains(e)?e:i.first(t,n)},d=function(){return r.submitButtons.join(",")},f=function(t,e){var n,r,o,u,s,a,l,c,p,h,f,d,m,v;return e=b.options(e),n=i.get(t),n=i.closest(n,"form"),m=null!=(r=null!=(o=e.target)?o:n.getAttribute("up-target"))?r:"body",v=null!=(s=null!=(a=e.url)?a:n.getAttribute("action"))?s:up.browser.url(),null==e.failTarget&&(e.failTarget=null!=(l=n.getAttribute("up-fail-target"))?l:i.toSelector(n)),null==e.reveal&&(e.reveal=null==(c=i.booleanOrStringAttr(n,"up-reveal"))||c),null==e.failReveal&&(e.failReveal=null==(p=i.booleanOrStringAttr(n,"up-fail-reveal"))||p),null==e.fallback&&(e.fallback=n.getAttribute("up-fallback")),null==e.history&&(e.history=null==(h=i.booleanOrStringAttr(n,"up-history"))||h),null==e.transition&&(e.transition=i.booleanOrStringAttr(n,"up-transition")),null==e.failTransition&&(e.failTransition=i.booleanOrStringAttr(n,"up-fail-transition")),null==e.method&&(e.method=null!=(f=null!=(d=null!=(u=n.getAttribute("up-method"))?u:n.getAttribute("data-method"))?d:n.getAttribute("method"))?f:"post"),null==e.cache&&(e.cache=i.booleanAttr(n,"up-cache")),null==e.restoreScroll&&(e.restoreScroll=i.booleanAttr(n,"up-restore-scroll")),null==e.origin&&(e.origin=n),null==e.layer&&(e.layer=n.getAttribute("up-layer")),null==e.failLayer&&(e.failLayer=n.getAttribute("up-fail-layer")),e.params=up.Params.fromForm(n),e=b.merge(e,up.motion.animateOptions(e,n)),e.validate&&(e.headers||(e.headers={}),e.transition=!1,e.failTransition=!1,e.headers[up.protocol.config.validateHeader]=e.validate),up.event.whenEmitted("up:form:submit",{log:"Submitting form",target:n}).then(function(){var t;return up.feedback.start(n),up.browser.canPushState()||e.history===!1?(t=up.replace(m,v,e),b.always(t,function(){return up.feedback.stop(n)}),t):(n.submit(),b.unresolvablePromise())})},c=function(){var e,n,o,s,a,l,c,h,f,d;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],o=i.list(o),s=b.flatMap(o,u),n=null!=(c=null!=(h=b.extractCallback(e))?h:p(o[0]))?c:up.fail("up.observe: No change callback given"),l=b.extractOptions(e),l.delay=null!=(f=null!=(d=l.delay)?d:i.numberAttr(o[0],"up-delay"))?f:r.observeDelay,a=new up.FieldObserver(s,l,n),a.start(),a.stop},p=function(t){var e;if(e=t.getAttribute("up-observe"))return new Function("value","name",e)},e=function(t,e){return c(t,e,function(){return f(t)})},l=function(t,e){var n,o;return n=null!=(o=e.target)?o:t.getAttribute("up-validate"),n||(n=b.findResult(r.validateTargets,function(t){var n;if(n=i.resolveSelector(t,e.origin),i.first(n))return n})),n||up.fail("Could not find validation target for %o (tried defaults %o)",t,r.validateTargets),i.resolveSelector(n,e.origin)},w=function(t,e){var n,r,o;return n=i.get(t),e=b.options(e),e.origin=n,e.target=l(n,e),e.failTarget=e.target,null==e.reveal&&(e.reveal=null!=(o=i.booleanOrStringAttr(n,"up-reveal"))&&o),e.history=!1,e.validate=n.getAttribute("name")||":none",e=b.merge(e,up.motion.animateOptions(e,n)),r=up.submit(n,e)},y=function(t){var e,r,o,u,s,a;return s=void 0,u=void 0,i.matches(t,"input[type=checkbox]")?t.checked?(s=t.value,u=":checked"):u=":unchecked":i.matches(t,"input[type=radio]")?(r=n(t),o=t.getAttribute("name"),e=r.querySelector("input[type=radio]"+i.attributeSelector("name",o)+":checked"),e?(u=":checked",s=e.value):u=":unchecked"):s=t.value,a=[],b.isPresent(s)?(a.push(s),a.push(":present")):a.push(":blank"),b.isPresent(u)&&a.push(u),a},g=function(t,e){var r,o,u,s;return null==e&&(e={}),s=null!=(u=e.target)?u:t.getAttribute("up-switch"),o=n(t),b.isPresent(s)||up.fail("No switch target given for %o",t),r=y(t),b.each(i.all(o,s),function(t){return v(t,r)})},v=function(t,e){var n,r,o;return e||(e=y(a(t))),(n=t.getAttribute("up-hide-for"))?(n=b.splitValues(n),r=0===b.intersect(e,n).length):(o=(o=t.getAttribute("up-show-for"))?b.splitValues(o):[":present",":checked"],r=b.intersect(e,o).length>0),i.toggle(t,r),t.classList.add("up-switched")},a=function(t){var e,r,o;return e=n(t),o=i.all(e,"[up-switch]"),r=b.find(o,function(e){var n;return n=e.getAttribute("up-switch"),i.matches(t,n)}),r||b.fail("Could not find [up-switch] field for %o",t)},n=function(t){return i.closest(t,"form, body")},up.on("submit","form[up-target]",function(t,e){return up.event.consumeAction(t),b.muteRejection(f(e))}),up.on("change","[up-validate]",function(t,e){return b.muteRejection(w(e))}),up.compiler("[up-switch]",function(t){return g(t)}),up.on("change","[up-switch]",function(t,e){return g(e)}),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",function(t){return v(t)}),up.compiler("[up-observe]",function(t){return c(t)}),up.compiler("[up-autosubmit]",function(t){return e(t)}),up.compiler("[autofocus]",{batch:!0},function(t){return b.last(t).focus()}),up.on("up:framework:reset",h),{config:r,submit:f,observe:c,validate:w,autosubmit:e,fieldSelector:o,fields:u,submissionFields:s}}(),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){up.popup=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y;return g=up.util,c=up.element,u=new up.Config({openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:150,closeDuration:100,openEasing:null,closeEasing:null,position:"bottom",align:"left",history:!1}),d=new up.Config({phase:"closed",anchor:null,popup:null,content:null,tether:null,position:null,align:null,sticky:null,url:null,coveredUrl:null,coveredTitle:null}),r=new up.DivertibleChain,f=function(){var t;return null!=(t=d.tether)&&t.destroy(),d.reset(),r.reset(),u.reset()},l=function(){return d.coveredTitle=null,d.coveredUrl=null},a=function(t){return d.tether=new up.Tether(g.only(d,"anchor","position","align")),d.popup=c.affix(d.tether.root,".up-popup",{"up-position":d.position,"up-align":d.align}),d.content=c.affix(d.popup,".up-popup-content"),up.fragment.createPlaceholder(t,d.content),c.hide(d.popup)},y=function(){return c.show(d.popup)},m=function(){var t;return null!=(t=d.tether)?t.sync():void 0},p=function(){return"opened"===d.phase||"opening"===d.phase},t=function(t,n){return r.asap(o,function(){return e(t,n)})},e=function(t,e){var n,r,i,o,s,l,p,h,f,v,b,w,k,S,E,T,A,F,C;return r=c.get(t),null==e&&(e={}),C=null!=(p=null!=(h=g.pluckKey(e,"url"))?h:r.getAttribute("up-href"))?p:r.getAttribute("href"),s=g.pluckKey(e,"html"),C||s||up.fail("up.popup.attach() requires either an { url } or { html } option"),F=null!=(v=g.pluckKey(e,"target"))?v:r.getAttribute("up-popup")||up.fail("No target selector given for [up-popup]"),l=null!=(b=null!=(w=e.position)?w:r.getAttribute("up-position"))?b:u.position,n=null!=(k=null!=(S=e.align)?S:r.getAttribute("up-align"))?k:u.align,null==e.animation&&(e.animation=null!=(E=r.getAttribute("up-animation"))?E:u.openAnimation),null==e.sticky&&(e.sticky=null!=(T=c.booleanAttr(r,"up-sticky"))?T:u.sticky),e.history=!!up.browser.canPushState()&&(null!=(A=null!=(f=e.history)?f:c.booleanOrStringAttr(r,"up-history"))?A:u.history),null==e.confirm&&(e.confirm=r.getAttribute("up-confirm")),e.method=up.link.followMethod(r,e),e.layer="popup",null==e.failTarget&&(e.failTarget=r.getAttribute("up-fail-target")),null==e.failLayer&&(e.failLayer=r.getAttribute("up-fail-layer")),e.provideTarget=function(){return a(F)},i=up.motion.animateOptions(e,r,{duration:u.openDuration,easing:u.openEasing}),o=g.merge(e,{animation:!1}),e.preload&&C?up.replace(F,C,e):up.browser.whenConfirmed(e).then(function(){return up.event.whenEmitted("up:popup:open",{url:C,anchor:r,log:"Opening popup"}).then(function(){var t;return d.phase="opening",d.anchor=r,d.position=l,d.align=n,e.history&&(d.coveredUrl=up.browser.url(),d.coveredTitle=document.title),d.sticky=e.sticky,t=s?up.extract(F,s,o):up.replace(F,C,o),t=t.then(function(){return y(),m(),up.animate(d.popup,e.animation,i)}),t=t.then(function(){return d.phase="opened",up.emit(d.popup,"up:popup:opened",{anchor:d.anchor,log:"Popup opened"})})})})},i=function(t){return r.asap(function(){return o(t)})},o=function(t){var e;return p()?(t=g.options(t,{animation:u.closeAnimation,history:d.coveredUrl,title:d.coveredTitle}),e=up.motion.animateOptions(t,{duration:u.closeDuration,easing:u.closeEasing}),g.assign(t,e),up.event.whenEmitted("up:popup:close",{anchor:d.anchor,log:"Closing popup"}).then(function(){return d.phase="closing",d.url=null,d.coveredUrl=null,d.coveredTitle=null,up.destroy(d.popup,t).then(function(){return d.phase="closed",d.tether.destroy(),d.tether=null,d.popup=null,d.content=null,d.anchor=null,d.sticky=null,up.emit("up:popup:closed",{anchor:d.anchor,log:"Popup closed"})})})):Promise.resolve()},h=function(t,n){return n=g.options(n),n.preload=!0,e(t,n)},v=function(e,n){return e.classList.contains("up-current")?i():t(e,n)},n=function(){if(!d.sticky)return l(),i()},s=function(t){var e;return e=c.get(t),!!c.closest(e,".up-popup")},up.link.addFollowVariant("[up-popup]",{follow:function(t,e){return v(t,e)},preload:function(t,e){return h(t,e)}}),up.on("click up:action:consumed",function(t){var e;if(e=t.target,!c.closest(e,".up-popup, [up-popup]"))return g.muteRejection(i())}),up.on("up:fragment:inserted",function(t,e){var r;if(s(e)){if(r=e.getAttribute("up-source"))return d.url=r}else if(t.origin&&s(t.origin))return g.muteRejection(n())}),up.event.onEscape(function(){return g.muteRejection(i())}),up.on("click",".up-popup [up-close]",function(t){return g.muteRejection(i()),up.event.consumeAction(t)}),up.on("up:history:restore",function(){return g.muteRejection(i())}),up.on("up:framework:reset",f),{attach:t,close:i,url:function(){return d.url},coveredUrl:function(){return d.coveredUrl},config:u,contains:s,isOpen:p,sync:m}}()}.call(this),function(){up.modal=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b,w,k,S,E,T,A,F,C,P,x;return F=up.util,c=up.element,u=new up.Config({maxWidth:null,width:null,height:null,history:!0,openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,backdropOpenAnimation:"fade-in",backdropCloseAnimation:"fade-out",closeLabel:"\xd7",closable:!0,sticky:!1,flavor:"default",position:null,template:function(t){return'<div class="up-modal">\n <div class="up-modal-backdrop"></div>\n <div class="up-modal-viewport">\n <div class="up-modal-dialog">\n <div class="up-modal-content"></div>\n <div class="up-modal-close" up-close>'+t.closeLabel+"</div>\n </div>\n </div>\n</div>"}}),m=new up.Config({"default":{}}),T=new up.Config({phase:"closed",anchorElement:null,modalElement:null,sticky:null,closable:null,flavor:null,url:null,coveredUrl:null,coveredTitle:null,position:null}),n=new up.BodyShifter,r=new up.DivertibleChain,E=function(){return T.modalElement&&c.remove(T.modalElement),n.unshift(),T.reset(),r.reset(),u.reset(),m.reset()},A=function(){var t;return t=f("template"),F.evalOption(t,{closeLabel:f("closeLabel")})},l=function(){return T.coveredTitle=null,T.coveredUrl=null},k=function(t){var e;return e=".up-modal-"+t,T.modalElement.querySelector(e)},a=function(t,e){var n,r,i,o,u;return o=A(),T.modalElement=u=c.createFromHtml(o),u.setAttribute("up-flavor",T.flavor),F.isPresent(T.position)&&u.setAttribute("up-position",T.position),i=F.only(e,"width","maxWidth","height"),c.setStyle(k("dialog"),i),T.closable||(n=k("close"),c.remove(n)),r=k("content"),up.fragment.createPlaceholder(t,r),c.hide(u),document.body.appendChild(u)},C=function(){return c.show(T.modalElement)},g=function(){return"opened"===T.phase||"opening"===T.phase},v=function(t,e){return e=F.options(e),e.link=c.get(t),b(e)},S=function(t,e){return e=F.options(e),e.link=t,e.preload=!0,w(e)},x=function(t,e){return e=F.options(e),e.url=t,b(e)},p=function(t,e,n){return n=F.options(n),n.html=e,null==n.history&&(n.history=!1),n.target=t,b(n)},b=function(t){return r.asap(o,function(){return w(t)})},w=function(e){var r,i,o,s,l,p,h,d,m,v,g,y,b,w,k,S,E,A,x;return e=F.options(e),o=F.pluckKey(e,"link")||c.none(),x=null!=(s=null!=(l=F.pluckKey(e,"url"))?l:o.getAttribute("up-href"))?s:o.getAttribute("href"),i=F.pluckKey(e,"html"),A=null!=(v=F.pluckKey(e,"target"))?v:o.getAttribute("up-modal"),P(A),null==e.flavor&&(e.flavor=null!=(g=o.getAttribute("up-flavor"))?g:u.flavor),null==e.position&&(e.position=null!=(y=o.getAttribute("up-position"))?y:f("position",e.flavor)),e.position=F.evalOption(e.position,{link:o}),null==e.width&&(e.width=null!=(b=o.getAttribute("up-width"))?b:f("width",e.flavor)),null==e.maxWidth&&(e.maxWidth=null!=(w=o.getAttribute("up-max-width"))?w:f("maxWidth",e.flavor)),null==e.height&&(e.height=null!=(k=o.getAttribute("up-height"))?k:f("height")),null==e.animation&&(e.animation=null!=(S=o.getAttribute("up-animation"))?S:f("openAnimation",e.flavor)),e.animation=F.evalOption(e.animation,{position:e.position}),null==e.backdropAnimation&&(e.backdropAnimation=null!=(E=o.getAttribute("up-backdrop-animation"))?E:f("backdropOpenAnimation",e.flavor)),e.backdropAnimation=F.evalOption(e.backdropAnimation,{position:e.position}),null==e.sticky&&(e.sticky=null!=(p=c.booleanAttr(o,"up-sticky"))?p:f("sticky",e.flavor)),null==e.closable&&(e.closable=null!=(h=c.booleanAttr(o,"up-closable"))?h:f("closable",e.flavor)),null==e.confirm&&(e.confirm=o.getAttribute("up-confirm")),e.method=up.link.followMethod(o,e),e.layer="modal",null==e.failTarget&&(e.failTarget=o.getAttribute("up-fail-target")),null==e.failLayer&&(e.failLayer=null!=(d=o.getAttribute("up-fail-layer"))?d:"auto"),r=up.motion.animateOptions(e,o,{duration:f("openDuration",e.flavor),easing:f("openEasing",e.flavor)}),null==e.history&&(e.history=null!=(m=c.booleanOrStringAttr(o,"up-history"))?m:f("history",e.flavor)),up.browser.canPushState()||(e.history=!1),e.provideTarget=function(){return a(A,e)},e.preload?up.replace(A,x,e):up.browser.whenConfirmed(e).then(function(){return up.event.whenEmitted("up:modal:open",{url:x,log:"Opening modal"}).then(function(){var o,u;return T.phase="opening",T.flavor=e.flavor,T.sticky=e.sticky,T.closable=e.closable,T.position=e.position,e.history&&(T.coveredUrl=up.browser.url(),T.coveredTitle=document.title),o=F.merge(e,{animation:!1}),u=i?up.extract(A,i,o):up.replace(A,x,o),u=u.then(function(){return n.shift(),C(),t(e.animation,e.backdropAnimation,r)}),u=u.then(function(){return T.phase="opened",up.emit("up:modal:opened",{log:"Modal opened"})})})})},P=function(t){return F.isBlank(t)?up.fail("Cannot open a modal without a target selector"):"body"===t?up.fail("Cannot open the <body> in a modal"):void 0},i=function(t){return r.asap(function(){return o(t)})},o=function(e){var r,i,o,u,s,a;return e=F.options(e),g()?(a=null!=(u=e.animation)?u:f("closeAnimation"),a=F.evalOption(a,{position:T.position}),i=null!=(s=e.backdropAnimation)?s:f("backdropCloseAnimation"),i=F.evalOption(i,{position:T.position}),r=up.motion.animateOptions(e,{duration:f("closeDuration"),easing:f("closeEasing")}),o=F.options(F.except(e,"animation","duration","easing","delay"),{history:T.coveredUrl,title:T.coveredTitle}),up.event.whenEmitted(T.modalElement,"up:modal:close",{log:"Closing modal"}).then(function(){var e;return T.phase="closing",T.url=null,T.coveredUrl=null,T.coveredTitle=null,e=t(a,i,r),e=e.then(function(){return up.destroy(T.modalElement,o)}),e=e.then(function(){return n.unshift(),T.phase="closed",T.modalElement=null,T.flavor=null,T.sticky=null,T.closable=null,T.position=null,up.emit("up:modal:closed",{log:"Modal closed"})})})):Promise.resolve()},y=function(t){return null==t&&(t=!0),c.toggleClass(T.modalElement,"up-modal-animating",t)},t=function(t,e,n){var r;return up.motion.isNone(t)?Promise.resolve():(y(),r=Promise.all([up.animate(k("viewport"),t,n),up.animate(k("backdrop"),e,n)]),r=r.then(function(){return y(!1)}))},e=function(){if(!T.sticky)return l(),i()},s=function(t){var e;return e=c.get(t),!!c.closest(e,".up-modal")},h=function(t,e){return null==e&&(e={}),up.legacy.warn("up.modal.flavor() is deprecated. Use the up.modal.flavors property instead."),F.assign(d(t),e)},d=function(t){return m[t]||(m[t]={})},f=function(t,e){var n;return null==e&&(e=T.flavor),e&&(n=d(e)[t]),F.isMissing(n)&&(n=u[t]),n},up.link.addFollowVariant("[up-modal]",{follow:function(t,e){return v(t,e)},preload:function(t,e){return S(t,e)}}),up.on("click",".up-modal",function(t){var e;if(T.closable)return e=t.target,c.closest(e,".up-modal-dialog")||c.closest(e,"[up-modal]")?void 0:(up.event.consumeAction(t),F.muteRejection(i()))}),up.on("up:fragment:inserted",function(t,n){var r;if(s(n)){if(r=n.getAttribute("up-source"))return T.url=r}else if(t.origin&&s(t.origin)&&!up.popup.contains(n))return F.muteRejection(e())}),up.event.onEscape(function(){if(T.closable)return F.muteRejection(i())}),up.on("click",".up-modal [up-close]",function(t){return F.muteRejection(i()),up.event.consumeAction(t)}),up.macro("a[up-drawer], [up-href][up-drawer]",function(t){var e;return e=t.getAttribute("up-drawer"),c.setAttrs(t,{"up-modal":e,"up-flavor":"drawer"})}),m.drawer={openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}},position:function(t){return F.isPresent(t.link)?F.horizontalScreenHalf(t.link):"left"}},up.on("up:history:restore",function(){return F.muteRejection(i())}),up.on("up:framework:reset",E),{visit:x,follow:v,extract:p,close:i,url:function(){return T.url},coveredUrl:function(){return T.coveredUrl},config:u,flavors:m,contains:s,isOpen:g,flavor:h}}()}.call(this),function(){up.tooltip=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h;return h=up.util,s=up.element,o=new up.Config({position:"top",align:"center",openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:100,closeDuration:50,openEasing:null,closeEasing:null}),c=new up.Config({phase:"closed",anchor:null,tooltip:null,content:null,tether:null,position:null,align:null}),n=new up.DivertibleChain,l=function(){var t;return null!=(t=c.tether)&&t.destroy(),c.reset(),n.reset(),o.reset()},u=function(t){return c.tether=new up.Tether(h.only(c,"anchor","position","align")),c.tooltip=s.affix(c.tether.root,".up-tooltip",{"up-position":c.position,"up-align":c.align}),c.content=s.affix(c.tooltip,".up-tooltip-content"),t.text?c.content.innerText=t.text:c.content.innerHTML=t.html},p=function(){var t;return null!=(t=c.tether)?t.sync():void 0},t=function(t,r){return n.asap(i,function(){return e(t,r)})},e=function(t,e){var n,r,i,a,l,h,f,d,m,v,g,y,b,w,k;return null==e&&(e={}),r=s.get(t),l=null!=(f=e.html)?f:r.getAttribute("up-tooltip-html"),k=null!=(d=e.text)?d:r.getAttribute("up-tooltip"),h=null!=(m=null!=(v=e.position)?v:r.getAttribute("up-position"))?m:o.position,n=null!=(g=null!=(y=e.align)?y:r.getAttribute("up-align"))?g:o.align,a=null!=(b=null!=(w=e.animation)?w:s.booleanOrStringAttr(r,"up-animation"))?b:o.openAnimation,i=up.motion.animateOptions(e,r,{duration:o.openDuration,easing:o.openEasing}),c.phase="opening",c.anchor=r,c.position=h,c.align=n,u({text:k,html:l}),p(),up.animate(c.tooltip,a,i).then(function(){return c.phase="opened"})},r=function(t){return n.asap(function(){return i(t)})},i=function(t){var e;return a()?(t=h.options(t,{animation:o.closeAnimation}),e=up.motion.animateOptions(t,{duration:o.closeDuration,easing:o.closeEasing}),h.assign(t,e),c.phase="closing",up.destroy(c.tooltip,t).then(function(){return c.phase="closed",c.tether.destroy(),c.tether=null,c.tooltip=null,c.content=null,c.anchor=null})):Promise.resolve()},a=function(){return"opening"===c.phase||"opened"===c.phase},up.compiler("[up-tooltip], [up-tooltip-html]",function(e){return e.addEventListener("mouseenter",function(){return t(e)}),e.addEventListener("mouseleave",function(){return r()})}),up.on("click up:action:consumed",function(){return r()}),up.on("up:framework:reset",l),up.event.onEscape(function(){return r()}),{config:o,attach:t,isOpen:a,close:r,sync:p}}()}.call(this),function(){up.feedback=function(){var t,e,n,r,i,o,u,s,a,l,c,p,h,f,d,m,v,g,y,b;return m=up.util,u=up.element,i=new up.Config({currentClasses:["up-current"],navs:["[up-nav]"]}),c=void 0,o=void 0,p=function(){return i.reset(),c=void 0,o=void 0},t="up-active",e="a, [up-href]",a=function(){return i.navs.join(",")},l=function(t){if(m.isPresent(t))return m.normalizeUrl(t,{stripTrailingSlash:!0})},h=function(t){var e;return(e=t.upNormalizedUrls)||(e=r(t),t.upNormalizedUrls=e),e},r=function(t){var e,n,r,i,o,u,s,a,c,p;if(c=[],up.link.isSafe(t))for(u=["href","up-href","up-alias"],n=0,i=u.length;n<i;n++)if(e=u[n],p=t.getAttribute(e))for(s=m.splitValues(p),r=0,o=s.length;r<o;r++)a=s[r],"#"!==a&&(a=l(a),c.push(a));return c},n=function(){var t;return t=[up.browser.url(),up.modal.url(),up.modal.coveredUrl(),up.popup.url(),up.popup.coveredUrl()],new up.UrlSet(t,{normalizeUrl:l})},g=function(){if(c=o,o=n(),!m.isEqual(o,c))return v(document.body)},v=function(t){var n,r;return n=u.subtree(t,a()),r=m.flatMap(n,function(t){return u.subtree(t,e)}),y(r)},b=function(t){var n;return u.closest(t,a())?(n=u.subtree(t,e),y(n)):v(t)},y=function(t){return o||(o=n()),m.each(t,function(t){var e,n,r,u,s,a,l,c,p,f,d;if(d=h(t),e=t.classList,o.matchesAny(d)){for(l=i.currentClasses,p=[],n=0,s=l.length;n<s;n++)u=l[n],p.push(e.add(u));return p}for(c=i.currentClasses,f=[],r=0,a=c.length;r<a;r++)u=c[r],f.push(e.remove(u));return f})},s=function(t){return t=u.get(t),u.ancestor(t,e)||t},f=function(e){return s(e).classList.add(t)},d=function(e){return s(e).classList.remove(t)},up.on("up:history:pushed up:history:replaced up:history:restored up:modal:opened up:modal:closed up:popup:opened up:popup:closed",function(){return g()}),up.on("up:fragment:inserted",function(t,e){return b(e)}),up.on("up:framework:reset",p),{config:i,start:f,stop:d}}(),up.legacy.renamedModule("navigation","feedback")}.call(this),function(){up.radio=function(){var t,e,n,r;return r=up.util,t=new up.Config({hungry:["[up-hungry]"],hungryTransition:null}),n=function(){return t.reset()},e=function(){return t.hungry.join(",")},up.on("up:framework:reset",n),{config:t,hungrySelector:e}}()}.call(this),function(){up.rails=function(){var t,e,n;return n=up.util,t=up.element,e=function(){var t;return!!(window.Rails||(null!=(t=window.jQuery)?t.rails:void 0))},n.each(["method","confirm"],function(n){var r,i;return r="data-"+n,i="up-"+n,up.macro("["+r+"]",function(n){var o;if(e()&&up.link.isFollowable(n))return o={},o[i]=n.getAttribute(r),t.setMissingAttrs(n,o),n.removeAttribute(r)})})}()}.call(this),function(){up.framework.boot()}.call(this);
|
@@ -0,0 +1,5 @@
|
|
1
|
+
up.viewport.config.fixedTop.push('.navbar-fixed-top')
|
2
|
+
up.viewport.config.fixedBottom.push('.navbar-fixed-bottom')
|
3
|
+
up.viewport.config.anchoredRight.push('.navbar-fixed-top')
|
4
|
+
up.viewport.config.anchoredRight.push('.navbar-fixed-bottom')
|
5
|
+
up.viewport.config.anchoredRight.push('.footer')
|
@@ -1,17 +1,19 @@
|
|
1
1
|
#= require ./unpoly/namespace
|
2
2
|
#= require ./unpoly/util
|
3
|
-
#=
|
3
|
+
#= require ./unpoly/legacy
|
4
4
|
#= require ./unpoly/browser
|
5
|
-
#= require ./unpoly/
|
6
|
-
#=
|
5
|
+
#= require ./unpoly/element
|
6
|
+
#= require_tree ./unpoly/classes
|
7
|
+
#= require ./unpoly/framework
|
8
|
+
#= require ./unpoly/event
|
7
9
|
#= require ./unpoly/cookie
|
8
10
|
#= require ./unpoly/protocol
|
9
11
|
#= require ./unpoly/log
|
10
12
|
#= require ./unpoly/toast
|
11
13
|
#= require ./unpoly/syntax
|
12
14
|
#= require ./unpoly/history
|
13
|
-
#= require ./unpoly/
|
14
|
-
#= require ./unpoly/
|
15
|
+
#= require ./unpoly/viewport
|
16
|
+
#= require ./unpoly/fragment
|
15
17
|
#= require ./unpoly/motion
|
16
18
|
#= require ./unpoly/proxy
|
17
19
|
#= require ./unpoly/link
|
@@ -23,4 +25,4 @@
|
|
23
25
|
#= require ./unpoly/radio
|
24
26
|
#= require ./unpoly/rails
|
25
27
|
|
26
|
-
up.boot()
|
28
|
+
up.framework.boot()
|
@@ -13,9 +13,9 @@ Internet Explorer 11
|
|
13
13
|
Internet Explorer 10 or lower
|
14
14
|
: Unpoly prevents itself from booting itself, leaving you with a classic server-side application.
|
15
15
|
|
16
|
-
@
|
16
|
+
@module up.browser
|
17
17
|
###
|
18
|
-
up.browser =
|
18
|
+
up.browser = do ->
|
19
19
|
|
20
20
|
u = up.util
|
21
21
|
|
@@ -26,8 +26,9 @@ up.browser = (($) ->
|
|
26
26
|
@param {object|Array|FormData|string} [options.params]
|
27
27
|
@internal
|
28
28
|
###
|
29
|
-
navigate = (url, options
|
30
|
-
|
29
|
+
navigate = (url, options) ->
|
30
|
+
requestOpts = u.merge(options, { url })
|
31
|
+
request = new up.Request(requestOpts)
|
31
32
|
request.navigate()
|
32
33
|
|
33
34
|
###**
|
@@ -35,87 +36,8 @@ up.browser = (($) ->
|
|
35
36
|
|
36
37
|
@method submitForm
|
37
38
|
###
|
38
|
-
submitForm = (
|
39
|
-
|
40
|
-
|
41
|
-
###**
|
42
|
-
A cross-browser way to interact with `console.log`, `console.error`, etc.
|
43
|
-
|
44
|
-
This function falls back to `console.log` if the output stream is not implemented.
|
45
|
-
It also prints substitution strings (e.g. `console.log("From %o to %o", "a", "b")`)
|
46
|
-
as a single string if the browser console does not support substitution strings.
|
47
|
-
|
48
|
-
\#\#\# Example
|
49
|
-
|
50
|
-
up.browser.puts('log', 'Hi world');
|
51
|
-
up.browser.puts('error', 'There was an error in %o', obj);
|
52
|
-
|
53
|
-
@function up.browser.puts
|
54
|
-
@internal
|
55
|
-
###
|
56
|
-
puts = (stream, args...) ->
|
57
|
-
console[stream](args...)
|
58
|
-
|
59
|
-
CONSOLE_PLACEHOLDERS = /\%[odisf]/g
|
60
|
-
|
61
|
-
stringifyArg = (arg) ->
|
62
|
-
maxLength = 200
|
63
|
-
closer = ''
|
64
|
-
|
65
|
-
if u.isString(arg)
|
66
|
-
string = arg.replace(/[\n\r\t ]+/g, ' ')
|
67
|
-
string = string.replace(/^[\n\r\t ]+/, '')
|
68
|
-
string = string.replace(/[\n\r\t ]$/, '')
|
69
|
-
string = "\"#{string}\""
|
70
|
-
closer = '"'
|
71
|
-
else if u.isUndefined(arg)
|
72
|
-
# JSON.stringify(undefined) is actually undefined
|
73
|
-
string = 'undefined'
|
74
|
-
else if u.isNumber(arg) || u.isFunction(arg)
|
75
|
-
string = arg.toString()
|
76
|
-
else if u.isArray(arg)
|
77
|
-
string = "[#{u.map(arg, stringifyArg).join(', ')}]"
|
78
|
-
closer = ']'
|
79
|
-
else if u.isJQuery(arg)
|
80
|
-
string = "$(#{u.map(arg, stringifyArg).join(', ')})"
|
81
|
-
closer = ')'
|
82
|
-
else if u.isElement(arg)
|
83
|
-
$arg = $(arg)
|
84
|
-
string = "<#{arg.tagName.toLowerCase()}"
|
85
|
-
for attr in ['id', 'name', 'class']
|
86
|
-
if value = $arg.attr(attr)
|
87
|
-
string += " #{attr}=\"#{value}\""
|
88
|
-
string += ">"
|
89
|
-
closer = '>'
|
90
|
-
else # object
|
91
|
-
string = JSON.stringify(arg)
|
92
|
-
if string.length > maxLength
|
93
|
-
string = "#{string.substr(0, maxLength)} …"
|
94
|
-
string += closer
|
95
|
-
string
|
96
|
-
|
97
|
-
###**
|
98
|
-
See https://developer.mozilla.org/en-US/docs/Web/API/Console#Using_string_substitutions
|
99
|
-
|
100
|
-
@function up.browser.sprintf
|
101
|
-
@internal
|
102
|
-
###
|
103
|
-
sprintf = (message, args...) ->
|
104
|
-
sprintfWithFormattedArgs(u.identity, message, args...)
|
105
|
-
|
106
|
-
###**
|
107
|
-
@function up.browser.sprintfWithBounds
|
108
|
-
@internal
|
109
|
-
###
|
110
|
-
sprintfWithFormattedArgs = (formatter, message, args...) ->
|
111
|
-
return '' if u.isBlank(message)
|
112
|
-
|
113
|
-
i = 0
|
114
|
-
message.replace CONSOLE_PLACEHOLDERS, ->
|
115
|
-
arg = args[i]
|
116
|
-
arg = formatter(stringifyArg(arg))
|
117
|
-
i += 1
|
118
|
-
arg
|
39
|
+
submitForm = (form) ->
|
40
|
+
form.submit()
|
119
41
|
|
120
42
|
url = ->
|
121
43
|
location.href
|
@@ -123,6 +45,9 @@ up.browser = (($) ->
|
|
123
45
|
isIE10OrWorse = u.memoize ->
|
124
46
|
!window.atob
|
125
47
|
|
48
|
+
isIE11 = u.memoize ->
|
49
|
+
'ActiveXObject' of window # this is undefined, but the key is set
|
50
|
+
|
126
51
|
###**
|
127
52
|
Returns whether this browser supports manipulation of the current URL
|
128
53
|
via [`history.pushState`](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState).
|
@@ -241,13 +166,14 @@ up.browser = (($) ->
|
|
241
166
|
canCustomElements = u.memoize ->
|
242
167
|
!!window.customElements
|
243
168
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
169
|
+
canJQuery = u.memoize ->
|
170
|
+
!!window.jQuery
|
171
|
+
|
172
|
+
canAnimationFrame = u.memoize ->
|
173
|
+
'requestAnimationFrame' of window
|
174
|
+
|
175
|
+
canControlScrollRestoration = u.memoize ->
|
176
|
+
'scrollRestoration' of history
|
251
177
|
|
252
178
|
popCookie = (name) ->
|
253
179
|
value = document.cookie.match(new RegExp(name+"=(\\w+)"))?[1]
|
@@ -282,7 +208,6 @@ up.browser = (($) ->
|
|
282
208
|
###
|
283
209
|
isSupported = ->
|
284
210
|
!isIE10OrWorse() &&
|
285
|
-
isRecentJQuery() &&
|
286
211
|
canConsole() &&
|
287
212
|
# We don't require pushState in order to cater for Safari booting Unpoly with a non-GET method.
|
288
213
|
# canPushState() &&
|
@@ -290,25 +215,8 @@ up.browser = (($) ->
|
|
290
215
|
canFormData() &&
|
291
216
|
canCssTransition() &&
|
292
217
|
canInputEvent() &&
|
293
|
-
canPromise()
|
294
|
-
|
295
|
-
###**
|
296
|
-
Return the [scrolling element](https://developer.mozilla.org/en-US/docs/Web/API/document/scrollingElement)
|
297
|
-
for the browser's main content area.
|
298
|
-
|
299
|
-
@function up.browser.documentViewportSelector
|
300
|
-
@internal
|
301
|
-
###
|
302
|
-
documentViewportSelector = ->
|
303
|
-
# The spec says this should be <html> in standards mode
|
304
|
-
# and <body> in quirks mode. However, it is currently (2018-07)
|
305
|
-
# always <body> in Webkit browsers (not Blink). Luckily Webkit
|
306
|
-
# also supports document.scrollingElement.
|
307
|
-
if element = document.scrollingElement
|
308
|
-
element.tagName
|
309
|
-
else
|
310
|
-
# IE11
|
311
|
-
'html'
|
218
|
+
canPromise() &&
|
219
|
+
canAnimationFrame()
|
312
220
|
|
313
221
|
<% if ENV['JS_KNIFE'] %>knife: eval(Knife.point)<% end %>
|
314
222
|
url: url
|
@@ -318,13 +226,10 @@ up.browser = (($) ->
|
|
318
226
|
canFormData: canFormData
|
319
227
|
canInspectFormData: canInspectFormData
|
320
228
|
canCustomElements: canCustomElements
|
321
|
-
|
229
|
+
canJQuery: canJQuery
|
230
|
+
canControlScrollRestoration: canControlScrollRestoration
|
322
231
|
whenConfirmed: whenConfirmed
|
323
232
|
isSupported: isSupported
|
324
|
-
puts: puts
|
325
|
-
sprintf: sprintf
|
326
|
-
sprintfWithFormattedArgs: sprintfWithFormattedArgs
|
327
233
|
popCookie: popCookie
|
328
|
-
|
329
|
-
)(jQuery)
|
234
|
+
isIE11: isIE11
|
330
235
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
e = up.element
|
2
|
+
|
3
|
+
# Gives `<body>` a right padding in the width of a scrollbar.
|
4
|
+
# Also gives elements anchored to the right side of the screen
|
5
|
+
# an increased `right`.
|
6
|
+
#
|
7
|
+
# This is to prevent the body and elements from jumping when we add the
|
8
|
+
# modal overlay, which has its own scroll bar.
|
9
|
+
# This is screwed up, but Bootstrap does the same.
|
10
|
+
class up.BodyShifter
|
11
|
+
|
12
|
+
constructor: ->
|
13
|
+
@unshiftFns = []
|
14
|
+
|
15
|
+
shift: ->
|
16
|
+
return unless up.viewport.rootHasVerticalScrollbar()
|
17
|
+
|
18
|
+
body = document.body
|
19
|
+
overflowElement = up.viewport.rootOverflowElement()
|
20
|
+
|
21
|
+
scrollbarWidth = up.viewport.scrollbarWidth()
|
22
|
+
|
23
|
+
bodyRightPadding = e.styleNumber(body, 'paddingRight')
|
24
|
+
bodyRightShift = scrollbarWidth + bodyRightPadding
|
25
|
+
|
26
|
+
@unshiftFns.push e.setTemporaryStyle(body, paddingRight: bodyRightShift)
|
27
|
+
@unshiftFns.push e.setTemporaryStyle(overflowElement, overflowY: 'hidden')
|
28
|
+
|
29
|
+
for anchor in up.viewport.anchoredRight()
|
30
|
+
elementRight = e.styleNumber(anchor, 'right')
|
31
|
+
elementRightShift = scrollbarWidth + elementRight
|
32
|
+
@unshiftFns.push e.setTemporaryStyle(anchor, right: elementRightShift)
|
33
|
+
|
34
|
+
unshift: ->
|
35
|
+
while unshiftFn = @unshiftFns.pop()
|
36
|
+
unshiftFn()
|
@@ -8,7 +8,7 @@ class up.Cache
|
|
8
8
|
|
9
9
|
###**
|
10
10
|
@constructor
|
11
|
-
@param {number|Function()
|
11
|
+
@param {number|Function(): number} [config.size]
|
12
12
|
Maximum number of cache entries.
|
13
13
|
Set to `undefined` to not limit the cache size.
|
14
14
|
@param {number|Function(): number} [config.expiry]
|
@@ -16,10 +16,10 @@ class up.Cache
|
|
16
16
|
will be discarded.
|
17
17
|
@param {string} [config.logPrefix]
|
18
18
|
A prefix for log entries printed by this cache object.
|
19
|
-
@param {Function(
|
19
|
+
@param {Function(entry): string} [config.key]
|
20
20
|
A function that takes an argument and returns a string key
|
21
21
|
for storage. If omitted, `toString()` is called on the argument.
|
22
|
-
@param {Function(
|
22
|
+
@param {Function(entry): boolean} [config.cachable]
|
23
23
|
A function that takes a potential cache entry and returns whether
|
24
24
|
this entry can be stored in the hash. If omitted, all entries are considered
|
25
25
|
cachable.
|
@@ -124,4 +124,4 @@ class up.Cache
|
|
124
124
|
# keys = u.wrapArray(keys)
|
125
125
|
# matches = u.map keys, (key) =>
|
126
126
|
# @get(key)
|
127
|
-
# u.
|
127
|
+
# u.filter(matches, u.isPresent)
|
@@ -1,19 +1,18 @@
|
|
1
1
|
#= require ./record
|
2
2
|
|
3
3
|
u = up.util
|
4
|
+
e = up.element
|
4
5
|
|
5
6
|
class up.CompilePass
|
6
7
|
|
7
|
-
constructor: (
|
8
|
-
@root = @$root[0]
|
9
|
-
|
8
|
+
constructor: (@root, @compilers, options = {}) ->
|
10
9
|
# Exclude all elements that are descendants of the subtrees we want to keep.
|
11
10
|
# The exclusion process is very expensive (in one case compiling 100 slements
|
12
|
-
# took 1.5s because of this). That's why we only do it if (1)
|
13
|
-
# was given and (2) there is an [up-keep] element in
|
14
|
-
|
15
|
-
unless
|
16
|
-
|
11
|
+
# took 1.5s because of this). That's why we only do it if (1) options.skipSubtrees
|
12
|
+
# was given and (2) there is an [up-keep] element in root.
|
13
|
+
@skipSubtrees = options.skip
|
14
|
+
unless @skipSubtrees.length && @root.querySelector('[up-keep]')
|
15
|
+
@skipSubtrees = undefined
|
17
16
|
|
18
17
|
compile: ->
|
19
18
|
up.log.group "Compiling fragment %o", @root, =>
|
@@ -21,67 +20,74 @@ class up.CompilePass
|
|
21
20
|
@runCompiler(compiler)
|
22
21
|
|
23
22
|
runCompiler: (compiler) ->
|
24
|
-
|
25
|
-
return unless
|
23
|
+
matches = @select(compiler.selector)
|
24
|
+
return unless matches.length
|
26
25
|
|
27
|
-
up.log.group ("Compiling '%s' on %d element(s)" unless compiler.
|
26
|
+
up.log.group ("Compiling '%s' on %d element(s)" unless compiler.isDefault), compiler.selector, matches.length, =>
|
28
27
|
if compiler.batch
|
29
|
-
@compileBatch(compiler,
|
28
|
+
@compileBatch(compiler, matches)
|
30
29
|
else
|
31
|
-
for match in
|
32
|
-
@compileOneElement(compiler,
|
30
|
+
for match in matches
|
31
|
+
@compileOneElement(compiler, match)
|
33
32
|
|
34
33
|
# up.compiler() has a legacy { keep } option that will automatically
|
35
34
|
# set [up-keep] on the elements it compiles
|
36
35
|
if keepValue = compiler.keep
|
37
36
|
value = if u.isString(keepValue) then keepValue else ''
|
38
|
-
|
37
|
+
for match in matches
|
38
|
+
match.setAttribute('up-keep', value)
|
39
39
|
|
40
|
-
compileOneElement: (compiler,
|
41
|
-
|
40
|
+
compileOneElement: (compiler, element) ->
|
41
|
+
elementArg = if compiler.jQuery then jQuery(element) else element
|
42
|
+
compileArgs = [elementArg]
|
42
43
|
# Do not retrieve and parse [up-data] unless the compiler function
|
43
44
|
# expects a second argument. Note that we must pass data for an argument
|
44
45
|
# count of 0, since then the function might take varargs.
|
45
46
|
unless compiler.length == 1
|
46
|
-
data = up.syntax.data(
|
47
|
+
data = up.syntax.data(element)
|
47
48
|
compileArgs.push(data)
|
48
49
|
|
49
|
-
result = compiler.apply(
|
50
|
+
result = compiler.apply(element, compileArgs)
|
50
51
|
|
51
|
-
if
|
52
|
-
up.
|
52
|
+
if destructorOrDestructors = @destructorPresence(result)
|
53
|
+
up.destructor(element, destructorOrDestructors)
|
53
54
|
|
54
|
-
compileBatch: (compiler,
|
55
|
-
|
55
|
+
compileBatch: (compiler, elements) ->
|
56
|
+
elementsArgs = if compiler.jQuery then jQuery(elements) else elements
|
57
|
+
compileArgs = [elementsArgs]
|
56
58
|
# Do not retrieve and parse [up-data] unless the compiler function
|
57
59
|
# expects a second argument. Note that we must pass data for an argument
|
58
60
|
# count of 0, since then the function might take varargs.
|
59
61
|
unless compiler.length == 1
|
60
|
-
dataList = u.map(
|
62
|
+
dataList = u.map(elements, up.syntax.data)
|
61
63
|
compileArgs.push(dataList)
|
62
64
|
|
63
|
-
result = compiler.apply(
|
65
|
+
result = compiler.apply(elements, compileArgs)
|
64
66
|
|
65
|
-
if @
|
67
|
+
if @destructorPresence(result)
|
66
68
|
up.fail('Compilers with { batch: true } cannot return destructors')
|
67
69
|
|
68
|
-
|
69
|
-
if
|
70
|
+
destructorPresence: (result) ->
|
71
|
+
# Check if the result value looks like a destructor to filter out
|
72
|
+
# unwanted implicit returns in CoffeeScript.
|
73
|
+
if u.isFunction(result) || u.isArray(result) && (u.every(result, u.isFunction))
|
70
74
|
result
|
71
|
-
else if u.isArray(result) && u.all(result, u.isFunction)
|
72
|
-
up.warn('up.compiler(): Returning an array of destructor functions is deprecated. Return a single function instead.')
|
73
|
-
u.sequence(result...)
|
74
75
|
|
75
|
-
|
76
|
+
select: (selector) ->
|
76
77
|
if u.isFunction(selector)
|
77
78
|
selector = selector()
|
78
79
|
|
79
|
-
|
80
|
+
matches = e.subtree(@root, selector)
|
81
|
+
if @skipSubtrees
|
82
|
+
matches = u.reject(matches, @isInSkippedSubtree)
|
83
|
+
|
84
|
+
matches
|
80
85
|
|
81
|
-
|
82
|
-
if
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
+
isInSkippedSubtree: (element) =>
|
87
|
+
if u.contains(@skipSubtrees, element)
|
88
|
+
true
|
89
|
+
else if parent = element.parentElement
|
90
|
+
@isInSkippedSubtree(parent)
|
91
|
+
else
|
92
|
+
false
|
86
93
|
|
87
|
-
$matches
|