unpoly-rails 0.55.0 → 0.55.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fdee33cdc0082856a8323e4b98743dc38231346dd10a166c8abadaa03b70663
4
- data.tar.gz: ebd311b2afaedf289c35de0ed0b56d5e4ad6da81ba927ca174ecc44f2d192c7d
3
+ metadata.gz: 5333675955e302d0041bee0a8ccc38cb3ba9ec70b670ff0def5ddacf5181f58d
4
+ data.tar.gz: b54d0dd0038b3825a2f05309b14d9eaf773ccbd58b8214069e7a7fd6ad774586
5
5
  SHA512:
6
- metadata.gz: a2b40fc88ec64615aec1360710d669e9757c88673af1a0c319c37df744caf7838fd707638fd56634129564851c95881dca35e4890d449a5f77af9ad5e524c81d
7
- data.tar.gz: d5d04c17594f151a4104dfbac2e3280d9776b39b4fe653f36fce3ea8587dcbc877c3cab683ca20f22a586df87400e9ac839bde2233ac588ff388765599990cdd
6
+ metadata.gz: b757f799f635860a2f7da1082363f8ac19cd3f3a72588d7acb7360261d24668ebfcb1d0f71ecc17b5db2d34e5273cec7a7751303c8f1e5f4504d567bf26f3718
7
+ data.tar.gz: 0b261470f9e83712e69a3fbcf2f28a069c57a16299f7fd2a96cd7004bbd74fb6fbef559799e75e56fa136f8ba9dbc52dc70e347a13069404b5c7ed3e5def7979
@@ -6,8 +6,14 @@ Changes to this project will be documented in this file.
6
6
  This project mostly adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
8
 
9
- Unreleased
10
- ----------
9
+ 0.55.1
10
+ ------
11
+
12
+ This release restores support for Internet Explorer 11, which we accidentally broke in 0.55.0.
13
+
14
+
15
+ 0.55.0
16
+ ------
11
17
 
12
18
  ### Fragment updates
13
19
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  (function() {
7
7
  window.up = {
8
- version: "0.55.0",
8
+ version: "0.55.1",
9
9
  renamedModule: function(oldName, newName) {
10
10
  return typeof Object.defineProperty === "function" ? Object.defineProperty(up, oldName, {
11
11
  get: function() {
@@ -861,7 +861,10 @@ that might save you from loading something like [Lodash](https://lodash.com/).
861
861
  if (array.length < 2) {
862
862
  return array;
863
863
  }
864
- set = new Set(array);
864
+ set = new Set();
865
+ each(array, function(element) {
866
+ return set.add(element);
867
+ });
865
868
  return setToArray(set);
866
869
  };
867
870
 
@@ -1,3 +1,3 @@
1
- (function(){window.up={version:"0.55.0",renamedModule:function(t,e){return"function"==typeof Object.defineProperty?Object.defineProperty(up,t,{get:function(){return up.log.warn("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,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C,F,A,$,D,O,R,j,M,U,q,_,N,H,z,L,K,Q,V,I,W,B,X,J,G,Z,Y,te,ee,ne,re,oe,ie,ue,ae,se,le,pe,ce,fe,he,de,me,ve,ge,ye,be,we,ke,Te,Se,xe,Ee,Pe,Ce,Fe,Ae,$e,De,Oe,Re,je,Me,Ue,qe,_e,Ne,He,ze,Le,Ke,Qe,Ve,Ie,We,Be,Xe,Je,Ge,Ze,Ye,tn,en,nn,rn,on,un,an,sn,ln,pn,cn,fn,hn,dn,mn,vn,gn,yn,bn;return Fe=r.noop,ye=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))}},ae=function(t,e){return e=e.toString(),(""===e||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},$e=function(t,e){var n,r,o;return r=Ne(t),n=r.protocol+"//"+r.hostname,ae(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.hash:void 0)===!0&&(n+=r.hash),(null!=e?e.search:void 0)!==!1&&(n+=r.search),n},V=function(t){var e;return e=Ne(location.href),t=Ne(t),e.protocol!==t.protocol||e.host!==t.host},Ne=function(t){var e;return t=dn(t),t.pathname?t:(e=r("<a>").attr({href:t}).get(0),K(e.hostname)&&(e.href=e.href),e)},Ae=function(t){return t?t.toUpperCase():"GET"},ke=function(t){return"GET"!==t&&"HEAD"!==t},o=function(t){var e,n,o,i,u,a,s,l,p,c,f,h,d,m,v,g;for(v=t.split(/[ >]/),o=null,f=p=0,d=v.length;d>p;f=++p){for(a=v[f],u=a.match(/(^|\.|\#)[A-Za-z0-9\-_]+/g),g="div",i=[],c=null,h=0,m=u.length;m>h;h++)switch(s=u[h],s[0]){case".":i.push(s.substr(1));break;case"#":c=s.substr(1);break;default:g=s}l="<"+g,i.length&&(l+=' class="'+i.join(" ")+'"'),c&&(l+=' id="'+c+'"'),l+=">",e=r(l),n&&e.appendTo(n),0===f&&(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},rn=function(t){var e,n,o,i,u,a,s,l,p,c,f;if(e=r(t),p=void 0,c=e.prop("tagName").toLowerCase(),f=Le(e.attr("up-id")))p=m("up-id",f);else if(u=Le(e.attr("id")))p=u.match(/^[a-z0-9\-_]+$/i)?"#"+u:m("id",u);else if(l=Le(e.attr("name")))p=c+m("name",l);else if(o=Le(Ce(e)))for(p="",i=0,s=o.length;s>i;i++)a=o[i],p+="."+a;else p=(n=Le(e.attr("aria-label")))?m("aria-label",n):c;return p},m=function(t,e){return e=e.replace(/"/g,'\\"'),"["+t+'="'+e+'"]'},Ce=function(t){var e,n;return e=t.attr("class")||"",n=e.split(" "),tn(n,function(t){return ie(t)&&!t.match(/^up-/)})},S=function(t){var e;return e=new DOMParser,e.parseFromString(t,"text/html")},d=function(){var n,r,o,i,u,a,s;for(a=arguments[0],u=2<=arguments.length?t.call(arguments,1):[],n=0,o=u.length;o>n;n++){i=u[n];for(r in i)e.call(i,r)&&(s=i[r],a[r]=s)}return a},h=Object.assign||d,hn=r.trim,de=function(t){return se(t)?function(e){return e[t]}:t},me=function(t,e){var n,r,o,i,u;for(e=de(e),u=[],r=n=0,i=t.length;i>n;r=++n)o=t[r],u.push(e(o,r));return u},F=me,cn=function(t,e){var n,r,o,i;for(i=[],r=n=0,o=t-1;o>=0?o>=n:n>=o;r=o>=0?++n:--n)i.push(e(r));return i},ee=function(t){return null===t},pe=function(t){return void 0===t},I=function(t){return!pe(t)},te=function(t){return pe(t)||ee(t)},Z=function(t){return!te(t)},K=function(t){return te(t)||re(t)&&0===Object.keys(t).length||0===t.length},Le=function(t,e){return null==e&&(e=ie),e(t)?t:void 0},ie=function(t){return!K(t)},G=function(t){return"function"==typeof t},se=function(t){return"string"==typeof t||t instanceof String},ne=function(t){return"number"==typeof t||t instanceof Number},oe=function(t){return!("object"!=typeof t||ee(t)||Y(t)||ue(t)||J(t)||L(t))},re=function(t){var e;return e=typeof t,"object"===e&&!ee(t)||"function"===e},B=function(t){return!(!t||1!==t.nodeType)},Y=function(t){return t instanceof jQuery},ue=function(t){return re(t)&&G(t.then)},L=Array.isArray,J=function(t){return t instanceof FormData},fn=function(t){return Array.prototype.slice.call(t)},k=function(t){return L(t)?t=t.slice():re(t)&&!G(t)?t=h({},t):up.fail("Cannot copy %o",t),t},dn=function(t){return Y(t)?t.get(0):t},be=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],h.apply(null,[{}].concat(t.call(e)))},_e=function(t,e){var n,r,o,i;if(o=t?k(t):{},e)for(r in e)n=e[r],i=o[r],Z(i)?re(n)&&re(i)&&(o[r]=_e(i,n)):o[r]=n;return o},qe=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],P(e,Z)},P=function(t,e){var n,r,o,i;for(i=void 0,r=0,o=t.length;o>r;r++)if(n=t[r],e(n)){i=n;break}return i},c=function(t,e){var n,r,o,i,u;for(e=de(e),u=!1,o=r=0,i=t.length;i>r;o=++r)if(n=t[o],e(n,o)){u=!0;break}return u},l=function(t,e){var n,r,o,i,u;for(e=de(e),u=!0,o=r=0,i=t.length;i>r;o=++r)if(n=t[o],!e(n,o)){u=!1;break}return u},y=function(t){return tn(t,Z)},mn=function(t){var e;return t.length<2?t:(e=new Set(t),sn(e))},vn=function(t,e){var n;return t.length<2?t:(e=de(e),n=new Set,tn(t,function(t,r){var o;return o=e(t,r),n.has(o)?!1:(n.add(o),!0)}))},sn=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},tn=function(t,e){var n;return e=de(e),n=[],F(t,function(t,r){return e(t,r)?n.push(t):void 0}),n},Ie=function(t,e){return e=de(e),tn(t,function(t,n){return!e(t,n)})},z=function(t,e){return tn(t,function(t){return w(e,t)})},Ke=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;o>t;t++)n=r[t],i.push(e.attr(n));return i}(),P(o,ie)},an=function(t,e){return setTimeout(e,t)},Pe=function(t){return setTimeout(t,0)},Te=function(t){return Promise.resolve().then(t)},he=function(t){return t[t.length-1]},g=function(){var t;return t=document.documentElement,{width:t.clientWidth,height:t.clientHeight}},Ye=ye(function(){var t,e,n;return t=r("<div>"),t.attr("up-viewport",""),t.css({position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"}),t.appendTo(document.body),e=t.get(0),n=e.offsetWidth-e.clientWidth,t.remove(),n}),C=function(){var t,e,n,o,i,u;return e=document.body,t=r(e),u=document.documentElement,n=t.css("overflow-y"),i="scroll"===n,o="hidden"===n,i||!o&&u.scrollHeight>u.clientHeight},Re=function(e){var n;return n=void 0,function(){var r;return r=1<=arguments.length?t.call(arguments,0):[],null!=e&&(n=e.apply(null,r)),e=void 0,n}},pn=function(t,e,n){var o,i,u;return o=r(t),u=o.css(Object.keys(e)),o.css(e),i=function(){return o.css(u)},n?(n(),i()):Re(i)},q=function(t){var e,n;return n=t.css(["transform","-webkit-transform"]),K(n)||"none"===n.transform?(e=function(){return t.css(n)},t.css({transform:"translateZ(0)","-webkit-transform":"translateZ(0)"})):e=function(){},e},_=function(t){return t=dn(t),t.offsetHeight},x=function(){},ve=function(t){var e,n;return e=r(t),n=e.css(["margin-top","margin-right","margin-bottom","margin-left"]),{top:parseFloat(n["margin-top"]),right:parseFloat(n["margin-right"]),bottom:parseFloat(n["margin-bottom"]),left:parseFloat(n["margin-left"])}},ge=function(t,e){var n,o,i,u,a,s;return e=_e(e,{relative:!1,inner:!1,includeMargin:!1}),e.relative?e.relative===!0?u=t.position():(n=r(e.relative),a=t.offset(),n.is(document)?u=a:(i=n.offset(),u={left:a.left-i.left,top:a.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&&(s=ve(t),o.left-=s.left,o.top-=s.top,o.height+=s.top+s.bottom,o.width+=s.left+s.right),o},T=function(t,e){var n,r,o,i,u;for(i=t.get(0).attributes,u=[],r=0,o=i.length;o>r;r++)n=i[r],u.push(n.specified?e.attr(n.name,n.value):void 0);return u},nn=function(t,e){return t.find(e).addBack(e)},en=function(t,e){var n,r;return r=nn(t,e),n=t.parents(e),r.add(n)},$=function(t){return 27===t.keyCode},w=function(t,e){return t.indexOf(e)>=0},v=function(t,e){var n;switch(n=t.attr(e)){case"false":return!1;case"true":case"":case e:return!0;default:return n}},je=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;r>n;n++)u=i[n],o.hasOwnProperty(u)&&(e[u]=o[u]);return e},O=function(){var e,n,r,o,i,u;for(o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],e=k(o),n=0,r=i.length;r>n;n++)u=i[n],delete e[u];return e},ce=function(t){return!(t.metaKey||t.shiftKey||t.ctrlKey)},fe=function(t){var e;return e=pe(t.button)||0===t.button,e&&ce(t)},gn=function(){return new Promise(Fe)},De=function(){return r()},un=function(t,e){var n,r,o;r=[];for(n in e)o=e[n],r.push(te(t.attr(n))?t.attr(n,o):void 0);return r},Be=function(t,e){var n;return n=t.indexOf(e),n>=0?(t.splice(n,1),e):void 0},Se=function(t){var e,n,o,i,u,a,s;for(u={},s=[],n=[],o=0,i=t.length;i>o;o++)a=t[o],se(a)?s.push(a):n.push(a);return u.parsed=n,s.length&&(e=s.join(", "),u.parsed.push(e)),u.select=function(){return u.find(void 0)},u.find=function(t){var e,n,o,i,a,s;for(n=De(),a=u.parsed,o=0,i=a.length;i>o;o++)s=a[o],e=t?t.find(s):r(s),n=n.add(e);return n},u.selectInSubtree=function(t){var e;return e=u.find(t),u.doesMatch(t)&&(e=e.add(t)),e},u.doesMatch=function(t){var e;return e=r(t),c(u.parsed,function(t){return e.is(t)})},u.seekUp=function(t){var e,n,o;for(o=r(t),e=o,n=void 0;e.length;){if(u.doesMatch(e)){n=e;break}e=e.parent()}return n||De()},u},D=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],G(n)?n.apply(null,e):n},b=function(t){var e;return e=Ue(t),Object.preventExtensions(e),e},Ue=function(t){var e;return null==t&&(t={}),e={},e.reset=function(){var n;return n=t,G(n)&&(n=n()),h(e,n)},e.reset(),e},yn=function(t){var e,n;return t=dn(t),e=t.parentNode,n=fn(t.childNodes),F(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=t.css("position"),"absolute"===n||"relative"===n||t.is("body")){e=t;break}return e},X=function(t){var e,n;for(e=r(t);;){if(n=e.css("position"),"fixed"===n)return!0;if(e=e.parent(),0===e.length||e.is(document))return!1}},M=function(t,e){var n,o,i,u;return n=r(t),o=Oe(n),i=n.position(),u=o.offset(),n.css({position:"absolute",left:i.left-u.left,top:i.top-u.top+e.scrollTop(),right:"",bottom:""})},Je=function(t){var e,n,r,o,i,u,a;if(L(t),J(t))return up.fail("Cannot convert FormData into an array");for(u=Ge(t),e=[],a=u.split("&"),n=0,r=a.length;r>n;n++)i=a[n],ie(i)&&(o=i.split("="),e.push({name:decodeURIComponent(o[0]),value:decodeURIComponent(o[1])}));return e},Ge=function(t,e){var n;if(e=_e(e,{purpose:"url"}),se(t))return t.replace(/^\?/,"");if(J(t))return up.fail("Cannot convert FormData into a query string");if(ie(t)){switch(n=r.param(t),e.purpose){case"url":n=n.replace(/\+/g,"%20");break;case"form":n=n.replace(/\%20/g,"+");break;default:up.fail("Unknown purpose %o",e.purpose)}return n}return""},u=function(t){var e,n;return n="input[type=submit], button[type=submit], button:not([type])",e=r(document.activeElement),e.is(n)&&t.has(e)?e:t.find(n).first()},Ze=function(t){var e,n,o,i,a,s;return n=r(t),s=n.find("input[type=file]").length,e=u(n),o=e.attr("name"),i=e.val(),a=s?new FormData(n.get(0)):n.serializeArray(),ie(o)&&f(a,o,i),a},f=function(t,e,n,r){var o;return t||(t=[]),L(t)?t.push({name:e,value:n}):J(t)?t.append(e,n):re(t)?t[e]=n:se(t)&&(o=Ge([{name:e,value:n}],r),t=[t,o].join("&")),t},we=function(t,e){return F(Je(e),function(e){return t=f(t,e.name,e.value)}),t},j=function(){var e,n,r,o,i,u;throw e=1<=arguments.length?t.call(arguments,0):[],L(e[0])?(r=e[0],u=e[1]||{}):(r=e,u={}),(o=up.log).error.apply(o,r),bn().then(function(){return up.toast.open(r,u)}),n=(i=up.browser).sprintf.apply(i,r),new Error(n)},s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},A=function(t){return t.replace(/[&<>"]/g,function(t){return s[t]})},ze=function(t,e){var n;return n=t[e],delete t[e],n},Xe=function(t,e,n){return t[n]=ze(t,e)},He=function(t,e){var n,o;return n=r(t),o=n.data(e),n.removeData(e),o},R=function(t){var e;return e=he(t),oe(e)?t.pop():{}},Me=function(t){var e;return e=r(t).css("opacity"),Z(e)?parseFloat(e):void 0},bn=ye(function(){return r.isReady?Promise.resolve():new Promise(function(t){return r(t)})}),H=function(t){return t},W=function(t){return t=dn(t),!r.contains(document.documentElement,t)},Qe=function(e){var n,r;return n=Ee(),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=he(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;return!this.currentTask&&(this.currentTask=this.queue.shift())?(t=this.currentTask(),p(t,function(t){return function(){return t.currentTask=void 0,t.poke()}}(this))):void 0},e.prototype.asap=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],this.queue=me(e,Qe),this.poke(),this.promise()},e}(),ln=function(t){var e;return e=r(t),e.is("[type=checkbox], [type=radio]")&&!e.is(":checked")?void 0:e.val()},on=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],function(){return me(e,function(t){return t()})}},Ve=function(t){var e,n;return n=void 0,e=new Promise(function(e){return n=an(t,e)}),e.cancel=function(){return clearTimeout(n)},e},N=function(t){var e,n,r,o;return e=ge(t),r=g(),n=e.left+.5*e.width,o=.5*r.width,o>n?"left":"right"},E=function(t,e){var n;return n=r("<div></div>"),n.insertAfter(t),t.detach(),n.replaceWith(e),t},U=function(t){var e,n,r,o;for(e=[],n=0,r=t.length;r>n;n++)o=t[n],L(o)?e=e.concat(o):e.push(o);return e},le=function(t){return!!t},p=function(t,e){return t.then(e,e)},xe=function(t){return null!=t?t["catch"](Fe):void 0},Ee=function(){var t,e;return e=void 0,Ie=void 0,t=new Promise(function(t,n){return e=t,Ie=n}),t.resolve=e,t.reject=Ie,t.promise=function(){return t},t},We=function(t){var e;try{return t()}catch(n){return e=n,Promise.reject(e)}},Q=function(t){return r(t).parents("body").length>0},{requestDataAsArray:Je,requestDataAsQuery:Ge,appendRequestData:f,mergeRequestData:we,requestDataFromForm:Ze,offsetParent:Oe,fixedToAbsolute:M,isFixed:X,presentAttr:Ke,parseUrl:Ne,normalizeUrl:$e,normalizeMethod:Ae,methodAllowsPayload:ke,createElementFromHtml:S,$createElementFromSelector:o,$createPlaceholder:i,selectorForElement:rn,assign:h,assignPolyfill:d,copy:k,merge:be,options:_e,option:qe,fail:j,each:F,map:me,times:cn,any:c,all:l,detect:P,select:tn,reject:Ie,intersect:z,compact:y,uniq:mn,uniqBy:vn,last:he,isNull:ee,isDefined:I,isUndefined:pe,isGiven:Z,isMissing:te,isPresent:ie,isBlank:K,presence:Le,isObject:re,isFunction:G,isString:se,isNumber:ne,isElement:B,isJQuery:Y,isPromise:ue,isOptions:oe,isArray:L,isFormData:J,isUnmodifiedKeyEvent:ce,isUnmodifiedMouseEvent:fe,nullJQuery:De,unJQuery:dn,setTimer:an,nextFrame:Pe,measure:ge,temporaryCss:pn,cssAnimate:x,forceCompositing:q,forceRepaint:_,escapePressed:$,copyAttributes:T,selectInSubtree:nn,selectInDynasty:en,contains:w,toArray:fn,castedAttr:v,clientSize:g,only:je,except:O,trim:hn,unresolvablePromise:gn,setMissingAttrs:un,remove:Be,memoize:ye,scrollbarWidth:Ye,documentHasVerticalScrollbar:C,config:b,openConfig:Ue,unwrapElement:yn,multiSelector:Se,error:j,pluckData:He,pluckKey:ze,renameKey:Xe,extractOptions:R,isDetached:W,noop:Fe,opacity:Me,whenReady:bn,identity:H,escapeHtml:A,DivertibleChain:a,submittedValue:ln,sequence:on,promiseTimer:Ve,previewable:Qe,evalOption:D,horizontalScreenHalf:N,detachWith:E,flatten:U,isTruthy:le,newDeferred:Ee,always:p,muteRejection:xe,rejectOnError:We,isBodyDescendant:Q,isCrossDomain:V,microtask:Te}}(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={}}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):this.key.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):!0},r.prototype.clear=function(){return this.store={}},r.prototype.log=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix?(t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,t)):void 0},r.prototype.keys=function(){return Object.keys(this.store)},r.prototype.makeRoomForAnotherKey=function(){var e,n,r,o;return o=t.copy(this.keys()),e=this.maxKeys(),e&&o.length>=e&&(n=null,r=null,t.each(o,function(t){return function(e){var o,i;return o=t.store[e],i=o.timestamp,!r||r>i?(n=e,r=i):void 0}}(this)),n)?delete this.store[n]:void 0},r.prototype.alias=function(e,n){var r;return r=this.get(e,{silent:!0}),t.isDefined(r)?this.set(n,r):void 0},r.prototype.timestamp=function(){return(new Date).valueOf()},r.prototype.set=function(t,e){var n;return this.isEnabled()&&this.isCachable(t)?(this.makeRoomForAnotherKey(),n=this.normalizeStoreKey(t),this.log("Setting entry %o to %o",n,e),this.store[n]={timestamp:this.timestamp(),value:e}):void 0},r.prototype.remove=function(t){var e;return this.isCachable(t)?(e=this.normalizeStoreKey(t),delete this.store[e]):void 0},r.prototype.isFresh=function(t){var e,n;return e=this.expiryMillis(),e?(n=this.timestamp()-t.timestamp,e>n):!0},r.prototype.get=function(t,e){var n;return null==e&&(e={}),this.isCachable(t)&&(n=this.store[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)}};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?!0:(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:!1,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,a,s,l;if(i=[],this.hungry)for(e=up.radio.hungrySelector().select(),l=t.option(up.radio.config.hungryTransition,this.transition),u=0,a=e.length;a>u;u++)o=e[u],n=$(o),s=t.selectorForElement(n),(r=this.response.first(s))&&i.push({selector:s,$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;return null===this.scheduledValue||this.currentTimer||this.currentCallback?void 0:(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;return t=this.readFieldValue(),this.isNewValue(t)?(this.scheduledValue=t,this.cancelTimer(),this.scheduleTimer()):void 0},n}()}.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){return up.link.shouldProcessEvent(t,e)?(up.bus.consumeAction(t),this.followLink(e)):void 0},r.prototype.fullSelector=function(t){var e;return null==t&&(t=""),e=[],this.selectors.forEach(function(n){return["a","[up-href]"].forEach(function(r){return e.push(""+r+n+t)})}),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(t,e){return null==e&&(e={}),up.bus.whenEmitted("up:link:follow",{$element:t}).then(function(n){return function(){return up.feedback.start(t,e,function(){return n.followNow(t,e)})}}(this))},r.prototype.preloadLink=function(t,e){return null==e&&(e={}),this.preloadNow(t,e)},r.prototype.matchesLink=function(t){return t.is(this.fullSelector())},r}()}.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.forwardFinishEvent=e(this.forwardFinishEvent,this),this.unmarkElement=e(this.unmarkElement,this),this.markElement=e(this.markElement,this),this.whenElementFinished=e(this.whenElementFinished,this),this.finishOneElement=e(this.finishOneElement,this),this.finish=e(this.finish,this),this.claim=e(this.claim,this),this.className="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.className,this.finishEvent="up:"+t+":finish"}return n.prototype.claim=function(t,e){return this.finish(t).then(function(n){return function(){return n.start(t,e)}}(this))},n.prototype.start=function(t,e){var n;return n=e(t),this.markElement(t,n),n.then(function(e){return function(){return e.unmarkElement(t)}}(this)),n},n.prototype.finish=function(e){var n,r;return n=this.expandFinishRequest(e),r=t.map(n,this.finishOneElement),Promise.all(r)},n.prototype.expandFinishRequest=function(e){return e?t.selectInDynasty($(e),this.selector):$(this.selector)},n.prototype.finishOneElement=function(t){var e;return e=$(t),e.trigger(this.finishEvent),this.whenElementFinished(e)},n.prototype.whenElementFinished=function(t){return t.data(this.dataKey)||Promise.resolve()},n.prototype.markElement=function(t,e){return t.addClass(this.className),t.data(this.dataKey,e)},n.prototype.unmarkElement=function(t){return t.removeClass(this.className),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}()}.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,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.transferSearchToData=e(this.transferSearchToData,this),this.transferDataToUrl=e(this.transferDataToUrl,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","data","target","failTarget","headers","timeout"]},o.prototype.normalize=function(){return this.method=t.normalizeMethod(this.method),this.headers||(this.headers={}),this.extractHashFromUrl(),t.methodAllowsPayload(this.method)?this.transferSearchToData():this.transferDataToUrl()},o.prototype.extractHashFromUrl=function(){var e;return e=t.parseUrl(this.url),this.hash=e.hash,this.url=t.normalizeUrl(e,{hash:!1})},o.prototype.transferDataToUrl=function(){var e,n;return this.data&&!t.isFormData(this.data)?(e=t.requestDataAsQuery(this.data),n=t.contains(this.url,"?")?"&":"?",this.url+=n+e,this.data=void 0):void 0},o.prototype.transferSearchToData=function(){var e,n;return n=t.parseUrl(this.url),e=n.search,e?(this.data=t.mergeRequestData(this.data,e),this.url=t.normalizeUrl(n,{search:!1})):void 0},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,a,s,l,p,c,f,h;l=new XMLHttpRequest,c=t.copy(e.headers),p=e.data,f=e.method,h=e.url,u=up.proxy.wrapMethod(f,p),f=u[0],p=u[1],t.isFormData(p)?delete c["Content-Type"]:t.isPresent(p)?(p=t.requestDataAsQuery(p,{purpose:"form"}),c["Content-Type"]="application/x-www-form-urlencoded"):p=null,e.target&&(c[up.protocol.config.targetHeader]=e.target),e.failTarget&&(c[up.protocol.config.failTargetHeader]=e.failTarget),e.isCrossDomain()||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),(o=e.csrfToken())&&(c[up.protocol.config.csrfHeader]=o),l.open(f,h);for(i in c)s=c[i],l.setRequestHeader(i,s);return a=function(){var t;return t=e.buildResponse(l),t.isSuccess()?n(t):r(t)},l.onload=a,l.onerror=a,l.ontimeout=a,e.timeout&&(l.timeout=e.timeout),l.send(p)}}(this))},o.prototype.navigate=function(){var e,n,r,o,i;return this.transferSearchToData(),e=$('<form class="up-page-loader"></form>'),n=function(t){return $('<input type="hidden">').attr(t).appendTo(e)
1
+ (function(){window.up={version:"0.55.1",renamedModule:function(t,e){return"function"==typeof Object.defineProperty?Object.defineProperty(up,t,{get:function(){return up.log.warn("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,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C,F,A,$,D,O,R,j,M,U,q,_,N,H,z,L,K,Q,V,I,W,B,X,J,G,Z,Y,te,ee,ne,re,oe,ie,ue,ae,se,le,pe,ce,fe,he,de,me,ve,ge,ye,be,we,ke,Te,Se,xe,Ee,Pe,Ce,Fe,Ae,$e,De,Oe,Re,je,Me,Ue,qe,_e,Ne,He,ze,Le,Ke,Qe,Ve,Ie,We,Be,Xe,Je,Ge,Ze,Ye,tn,en,nn,rn,on,un,an,sn,ln,pn,cn,fn,hn,dn,mn,vn,gn,yn,bn;return Fe=r.noop,ye=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))}},ae=function(t,e){return e=e.toString(),(""===e||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},$e=function(t,e){var n,r,o;return r=Ne(t),n=r.protocol+"//"+r.hostname,ae(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.hash:void 0)===!0&&(n+=r.hash),(null!=e?e.search:void 0)!==!1&&(n+=r.search),n},V=function(t){var e;return e=Ne(location.href),t=Ne(t),e.protocol!==t.protocol||e.host!==t.host},Ne=function(t){var e;return t=dn(t),t.pathname?t:(e=r("<a>").attr({href:t}).get(0),K(e.hostname)&&(e.href=e.href),e)},Ae=function(t){return t?t.toUpperCase():"GET"},ke=function(t){return"GET"!==t&&"HEAD"!==t},o=function(t){var e,n,o,i,u,a,s,l,p,c,f,h,d,m,v,g;for(v=t.split(/[ >]/),o=null,f=p=0,d=v.length;d>p;f=++p){for(a=v[f],u=a.match(/(^|\.|\#)[A-Za-z0-9\-_]+/g),g="div",i=[],c=null,h=0,m=u.length;m>h;h++)switch(s=u[h],s[0]){case".":i.push(s.substr(1));break;case"#":c=s.substr(1);break;default:g=s}l="<"+g,i.length&&(l+=' class="'+i.join(" ")+'"'),c&&(l+=' id="'+c+'"'),l+=">",e=r(l),n&&e.appendTo(n),0===f&&(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},rn=function(t){var e,n,o,i,u,a,s,l,p,c,f;if(e=r(t),p=void 0,c=e.prop("tagName").toLowerCase(),f=Le(e.attr("up-id")))p=m("up-id",f);else if(u=Le(e.attr("id")))p=u.match(/^[a-z0-9\-_]+$/i)?"#"+u:m("id",u);else if(l=Le(e.attr("name")))p=c+m("name",l);else if(o=Le(Ce(e)))for(p="",i=0,s=o.length;s>i;i++)a=o[i],p+="."+a;else p=(n=Le(e.attr("aria-label")))?m("aria-label",n):c;return p},m=function(t,e){return e=e.replace(/"/g,'\\"'),"["+t+'="'+e+'"]'},Ce=function(t){var e,n;return e=t.attr("class")||"",n=e.split(" "),tn(n,function(t){return ie(t)&&!t.match(/^up-/)})},S=function(t){var e;return e=new DOMParser,e.parseFromString(t,"text/html")},d=function(){var n,r,o,i,u,a,s;for(a=arguments[0],u=2<=arguments.length?t.call(arguments,1):[],n=0,o=u.length;o>n;n++){i=u[n];for(r in i)e.call(i,r)&&(s=i[r],a[r]=s)}return a},h=Object.assign||d,hn=r.trim,de=function(t){return se(t)?function(e){return e[t]}:t},me=function(t,e){var n,r,o,i,u;for(e=de(e),u=[],r=n=0,i=t.length;i>n;r=++n)o=t[r],u.push(e(o,r));return u},F=me,cn=function(t,e){var n,r,o,i;for(i=[],r=n=0,o=t-1;o>=0?o>=n:n>=o;r=o>=0?++n:--n)i.push(e(r));return i},ee=function(t){return null===t},pe=function(t){return void 0===t},I=function(t){return!pe(t)},te=function(t){return pe(t)||ee(t)},Z=function(t){return!te(t)},K=function(t){return te(t)||re(t)&&0===Object.keys(t).length||0===t.length},Le=function(t,e){return null==e&&(e=ie),e(t)?t:void 0},ie=function(t){return!K(t)},G=function(t){return"function"==typeof t},se=function(t){return"string"==typeof t||t instanceof String},ne=function(t){return"number"==typeof t||t instanceof Number},oe=function(t){return!("object"!=typeof t||ee(t)||Y(t)||ue(t)||J(t)||L(t))},re=function(t){var e;return e=typeof t,"object"===e&&!ee(t)||"function"===e},B=function(t){return!(!t||1!==t.nodeType)},Y=function(t){return t instanceof jQuery},ue=function(t){return re(t)&&G(t.then)},L=Array.isArray,J=function(t){return t instanceof FormData},fn=function(t){return Array.prototype.slice.call(t)},k=function(t){return L(t)?t=t.slice():re(t)&&!G(t)?t=h({},t):up.fail("Cannot copy %o",t),t},dn=function(t){return Y(t)?t.get(0):t},be=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],h.apply(null,[{}].concat(t.call(e)))},_e=function(t,e){var n,r,o,i;if(o=t?k(t):{},e)for(r in e)n=e[r],i=o[r],Z(i)?re(n)&&re(i)&&(o[r]=_e(i,n)):o[r]=n;return o},qe=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],P(e,Z)},P=function(t,e){var n,r,o,i;for(i=void 0,r=0,o=t.length;o>r;r++)if(n=t[r],e(n)){i=n;break}return i},c=function(t,e){var n,r,o,i,u;for(e=de(e),u=!1,o=r=0,i=t.length;i>r;o=++r)if(n=t[o],e(n,o)){u=!0;break}return u},l=function(t,e){var n,r,o,i,u;for(e=de(e),u=!0,o=r=0,i=t.length;i>r;o=++r)if(n=t[o],!e(n,o)){u=!1;break}return u},y=function(t){return tn(t,Z)},mn=function(t){var e;return t.length<2?t:(e=new Set,F(t,function(t){return e.add(t)}),sn(e))},vn=function(t,e){var n;return t.length<2?t:(e=de(e),n=new Set,tn(t,function(t,r){var o;return o=e(t,r),n.has(o)?!1:(n.add(o),!0)}))},sn=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},tn=function(t,e){var n;return e=de(e),n=[],F(t,function(t,r){return e(t,r)?n.push(t):void 0}),n},Ie=function(t,e){return e=de(e),tn(t,function(t,n){return!e(t,n)})},z=function(t,e){return tn(t,function(t){return w(e,t)})},Ke=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;o>t;t++)n=r[t],i.push(e.attr(n));return i}(),P(o,ie)},an=function(t,e){return setTimeout(e,t)},Pe=function(t){return setTimeout(t,0)},Te=function(t){return Promise.resolve().then(t)},he=function(t){return t[t.length-1]},g=function(){var t;return t=document.documentElement,{width:t.clientWidth,height:t.clientHeight}},Ye=ye(function(){var t,e,n;return t=r("<div>"),t.attr("up-viewport",""),t.css({position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"}),t.appendTo(document.body),e=t.get(0),n=e.offsetWidth-e.clientWidth,t.remove(),n}),C=function(){var t,e,n,o,i,u;return e=document.body,t=r(e),u=document.documentElement,n=t.css("overflow-y"),i="scroll"===n,o="hidden"===n,i||!o&&u.scrollHeight>u.clientHeight},Re=function(e){var n;return n=void 0,function(){var r;return r=1<=arguments.length?t.call(arguments,0):[],null!=e&&(n=e.apply(null,r)),e=void 0,n}},pn=function(t,e,n){var o,i,u;return o=r(t),u=o.css(Object.keys(e)),o.css(e),i=function(){return o.css(u)},n?(n(),i()):Re(i)},q=function(t){var e,n;return n=t.css(["transform","-webkit-transform"]),K(n)||"none"===n.transform?(e=function(){return t.css(n)},t.css({transform:"translateZ(0)","-webkit-transform":"translateZ(0)"})):e=function(){},e},_=function(t){return t=dn(t),t.offsetHeight},x=function(){},ve=function(t){var e,n;return e=r(t),n=e.css(["margin-top","margin-right","margin-bottom","margin-left"]),{top:parseFloat(n["margin-top"]),right:parseFloat(n["margin-right"]),bottom:parseFloat(n["margin-bottom"]),left:parseFloat(n["margin-left"])}},ge=function(t,e){var n,o,i,u,a,s;return e=_e(e,{relative:!1,inner:!1,includeMargin:!1}),e.relative?e.relative===!0?u=t.position():(n=r(e.relative),a=t.offset(),n.is(document)?u=a:(i=n.offset(),u={left:a.left-i.left,top:a.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&&(s=ve(t),o.left-=s.left,o.top-=s.top,o.height+=s.top+s.bottom,o.width+=s.left+s.right),o},T=function(t,e){var n,r,o,i,u;for(i=t.get(0).attributes,u=[],r=0,o=i.length;o>r;r++)n=i[r],u.push(n.specified?e.attr(n.name,n.value):void 0);return u},nn=function(t,e){return t.find(e).addBack(e)},en=function(t,e){var n,r;return r=nn(t,e),n=t.parents(e),r.add(n)},$=function(t){return 27===t.keyCode},w=function(t,e){return t.indexOf(e)>=0},v=function(t,e){var n;switch(n=t.attr(e)){case"false":return!1;case"true":case"":case e:return!0;default:return n}},je=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;r>n;n++)u=i[n],o.hasOwnProperty(u)&&(e[u]=o[u]);return e},O=function(){var e,n,r,o,i,u;for(o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],e=k(o),n=0,r=i.length;r>n;n++)u=i[n],delete e[u];return e},ce=function(t){return!(t.metaKey||t.shiftKey||t.ctrlKey)},fe=function(t){var e;return e=pe(t.button)||0===t.button,e&&ce(t)},gn=function(){return new Promise(Fe)},De=function(){return r()},un=function(t,e){var n,r,o;r=[];for(n in e)o=e[n],r.push(te(t.attr(n))?t.attr(n,o):void 0);return r},Be=function(t,e){var n;return n=t.indexOf(e),n>=0?(t.splice(n,1),e):void 0},Se=function(t){var e,n,o,i,u,a,s;for(u={},s=[],n=[],o=0,i=t.length;i>o;o++)a=t[o],se(a)?s.push(a):n.push(a);return u.parsed=n,s.length&&(e=s.join(", "),u.parsed.push(e)),u.select=function(){return u.find(void 0)},u.find=function(t){var e,n,o,i,a,s;for(n=De(),a=u.parsed,o=0,i=a.length;i>o;o++)s=a[o],e=t?t.find(s):r(s),n=n.add(e);return n},u.selectInSubtree=function(t){var e;return e=u.find(t),u.doesMatch(t)&&(e=e.add(t)),e},u.doesMatch=function(t){var e;return e=r(t),c(u.parsed,function(t){return e.is(t)})},u.seekUp=function(t){var e,n,o;for(o=r(t),e=o,n=void 0;e.length;){if(u.doesMatch(e)){n=e;break}e=e.parent()}return n||De()},u},D=function(){var e,n;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],G(n)?n.apply(null,e):n},b=function(t){var e;return e=Ue(t),Object.preventExtensions(e),e},Ue=function(t){var e;return null==t&&(t={}),e={},e.reset=function(){var n;return n=t,G(n)&&(n=n()),h(e,n)},e.reset(),e},yn=function(t){var e,n;return t=dn(t),e=t.parentNode,n=fn(t.childNodes),F(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=t.css("position"),"absolute"===n||"relative"===n||t.is("body")){e=t;break}return e},X=function(t){var e,n;for(e=r(t);;){if(n=e.css("position"),"fixed"===n)return!0;if(e=e.parent(),0===e.length||e.is(document))return!1}},M=function(t,e){var n,o,i,u;return n=r(t),o=Oe(n),i=n.position(),u=o.offset(),n.css({position:"absolute",left:i.left-u.left,top:i.top-u.top+e.scrollTop(),right:"",bottom:""})},Je=function(t){var e,n,r,o,i,u,a;if(L(t),J(t))return up.fail("Cannot convert FormData into an array");for(u=Ge(t),e=[],a=u.split("&"),n=0,r=a.length;r>n;n++)i=a[n],ie(i)&&(o=i.split("="),e.push({name:decodeURIComponent(o[0]),value:decodeURIComponent(o[1])}));return e},Ge=function(t,e){var n;if(e=_e(e,{purpose:"url"}),se(t))return t.replace(/^\?/,"");if(J(t))return up.fail("Cannot convert FormData into a query string");if(ie(t)){switch(n=r.param(t),e.purpose){case"url":n=n.replace(/\+/g,"%20");break;case"form":n=n.replace(/\%20/g,"+");break;default:up.fail("Unknown purpose %o",e.purpose)}return n}return""},u=function(t){var e,n;return n="input[type=submit], button[type=submit], button:not([type])",e=r(document.activeElement),e.is(n)&&t.has(e)?e:t.find(n).first()},Ze=function(t){var e,n,o,i,a,s;return n=r(t),s=n.find("input[type=file]").length,e=u(n),o=e.attr("name"),i=e.val(),a=s?new FormData(n.get(0)):n.serializeArray(),ie(o)&&f(a,o,i),a},f=function(t,e,n,r){var o;return t||(t=[]),L(t)?t.push({name:e,value:n}):J(t)?t.append(e,n):re(t)?t[e]=n:se(t)&&(o=Ge([{name:e,value:n}],r),t=[t,o].join("&")),t},we=function(t,e){return F(Je(e),function(e){return t=f(t,e.name,e.value)}),t},j=function(){var e,n,r,o,i,u;throw e=1<=arguments.length?t.call(arguments,0):[],L(e[0])?(r=e[0],u=e[1]||{}):(r=e,u={}),(o=up.log).error.apply(o,r),bn().then(function(){return up.toast.open(r,u)}),n=(i=up.browser).sprintf.apply(i,r),new Error(n)},s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},A=function(t){return t.replace(/[&<>"]/g,function(t){return s[t]})},ze=function(t,e){var n;return n=t[e],delete t[e],n},Xe=function(t,e,n){return t[n]=ze(t,e)},He=function(t,e){var n,o;return n=r(t),o=n.data(e),n.removeData(e),o},R=function(t){var e;return e=he(t),oe(e)?t.pop():{}},Me=function(t){var e;return e=r(t).css("opacity"),Z(e)?parseFloat(e):void 0},bn=ye(function(){return r.isReady?Promise.resolve():new Promise(function(t){return r(t)})}),H=function(t){return t},W=function(t){return t=dn(t),!r.contains(document.documentElement,t)},Qe=function(e){var n,r;return n=Ee(),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=he(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;return!this.currentTask&&(this.currentTask=this.queue.shift())?(t=this.currentTask(),p(t,function(t){return function(){return t.currentTask=void 0,t.poke()}}(this))):void 0},e.prototype.asap=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],this.queue=me(e,Qe),this.poke(),this.promise()},e}(),ln=function(t){var e;return e=r(t),e.is("[type=checkbox], [type=radio]")&&!e.is(":checked")?void 0:e.val()},on=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],function(){return me(e,function(t){return t()})}},Ve=function(t){var e,n;return n=void 0,e=new Promise(function(e){return n=an(t,e)}),e.cancel=function(){return clearTimeout(n)},e},N=function(t){var e,n,r,o;return e=ge(t),r=g(),n=e.left+.5*e.width,o=.5*r.width,o>n?"left":"right"},E=function(t,e){var n;return n=r("<div></div>"),n.insertAfter(t),t.detach(),n.replaceWith(e),t},U=function(t){var e,n,r,o;for(e=[],n=0,r=t.length;r>n;n++)o=t[n],L(o)?e=e.concat(o):e.push(o);return e},le=function(t){return!!t},p=function(t,e){return t.then(e,e)},xe=function(t){return null!=t?t["catch"](Fe):void 0},Ee=function(){var t,e;return e=void 0,Ie=void 0,t=new Promise(function(t,n){return e=t,Ie=n}),t.resolve=e,t.reject=Ie,t.promise=function(){return t},t},We=function(t){var e;try{return t()}catch(n){return e=n,Promise.reject(e)}},Q=function(t){return r(t).parents("body").length>0},{requestDataAsArray:Je,requestDataAsQuery:Ge,appendRequestData:f,mergeRequestData:we,requestDataFromForm:Ze,offsetParent:Oe,fixedToAbsolute:M,isFixed:X,presentAttr:Ke,parseUrl:Ne,normalizeUrl:$e,normalizeMethod:Ae,methodAllowsPayload:ke,createElementFromHtml:S,$createElementFromSelector:o,$createPlaceholder:i,selectorForElement:rn,assign:h,assignPolyfill:d,copy:k,merge:be,options:_e,option:qe,fail:j,each:F,map:me,times:cn,any:c,all:l,detect:P,select:tn,reject:Ie,intersect:z,compact:y,uniq:mn,uniqBy:vn,last:he,isNull:ee,isDefined:I,isUndefined:pe,isGiven:Z,isMissing:te,isPresent:ie,isBlank:K,presence:Le,isObject:re,isFunction:G,isString:se,isNumber:ne,isElement:B,isJQuery:Y,isPromise:ue,isOptions:oe,isArray:L,isFormData:J,isUnmodifiedKeyEvent:ce,isUnmodifiedMouseEvent:fe,nullJQuery:De,unJQuery:dn,setTimer:an,nextFrame:Pe,measure:ge,temporaryCss:pn,cssAnimate:x,forceCompositing:q,forceRepaint:_,escapePressed:$,copyAttributes:T,selectInSubtree:nn,selectInDynasty:en,contains:w,toArray:fn,castedAttr:v,clientSize:g,only:je,except:O,trim:hn,unresolvablePromise:gn,setMissingAttrs:un,remove:Be,memoize:ye,scrollbarWidth:Ye,documentHasVerticalScrollbar:C,config:b,openConfig:Ue,unwrapElement:yn,multiSelector:Se,error:j,pluckData:He,pluckKey:ze,renameKey:Xe,extractOptions:R,isDetached:W,noop:Fe,opacity:Me,whenReady:bn,identity:H,escapeHtml:A,DivertibleChain:a,submittedValue:ln,sequence:on,promiseTimer:Ve,previewable:Qe,evalOption:D,horizontalScreenHalf:N,detachWith:E,flatten:U,isTruthy:le,newDeferred:Ee,always:p,muteRejection:xe,rejectOnError:We,isBodyDescendant:Q,isCrossDomain:V,microtask:Te}}(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={}}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):this.key.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):!0},r.prototype.clear=function(){return this.store={}},r.prototype.log=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix?(t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,t)):void 0},r.prototype.keys=function(){return Object.keys(this.store)},r.prototype.makeRoomForAnotherKey=function(){var e,n,r,o;return o=t.copy(this.keys()),e=this.maxKeys(),e&&o.length>=e&&(n=null,r=null,t.each(o,function(t){return function(e){var o,i;return o=t.store[e],i=o.timestamp,!r||r>i?(n=e,r=i):void 0}}(this)),n)?delete this.store[n]:void 0},r.prototype.alias=function(e,n){var r;return r=this.get(e,{silent:!0}),t.isDefined(r)?this.set(n,r):void 0},r.prototype.timestamp=function(){return(new Date).valueOf()},r.prototype.set=function(t,e){var n;return this.isEnabled()&&this.isCachable(t)?(this.makeRoomForAnotherKey(),n=this.normalizeStoreKey(t),this.log("Setting entry %o to %o",n,e),this.store[n]={timestamp:this.timestamp(),value:e}):void 0},r.prototype.remove=function(t){var e;return this.isCachable(t)?(e=this.normalizeStoreKey(t),delete this.store[e]):void 0},r.prototype.isFresh=function(t){var e,n;return e=this.expiryMillis(),e?(n=this.timestamp()-t.timestamp,e>n):!0},r.prototype.get=function(t,e){var n;return null==e&&(e={}),this.isCachable(t)&&(n=this.store[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)}};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?!0:(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:!1,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,a,s,l;if(i=[],this.hungry)for(e=up.radio.hungrySelector().select(),l=t.option(up.radio.config.hungryTransition,this.transition),u=0,a=e.length;a>u;u++)o=e[u],n=$(o),s=t.selectorForElement(n),(r=this.response.first(s))&&i.push({selector:s,$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;return null===this.scheduledValue||this.currentTimer||this.currentCallback?void 0:(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;return t=this.readFieldValue(),this.isNewValue(t)?(this.scheduledValue=t,this.cancelTimer(),this.scheduleTimer()):void 0},n}()}.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){return up.link.shouldProcessEvent(t,e)?(up.bus.consumeAction(t),this.followLink(e)):void 0},r.prototype.fullSelector=function(t){var e;return null==t&&(t=""),e=[],this.selectors.forEach(function(n){return["a","[up-href]"].forEach(function(r){return e.push(""+r+n+t)})}),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(t,e){return null==e&&(e={}),up.bus.whenEmitted("up:link:follow",{$element:t}).then(function(n){return function(){return up.feedback.start(t,e,function(){return n.followNow(t,e)})}}(this))},r.prototype.preloadLink=function(t,e){return null==e&&(e={}),this.preloadNow(t,e)},r.prototype.matchesLink=function(t){return t.is(this.fullSelector())},r}()}.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.forwardFinishEvent=e(this.forwardFinishEvent,this),this.unmarkElement=e(this.unmarkElement,this),this.markElement=e(this.markElement,this),this.whenElementFinished=e(this.whenElementFinished,this),this.finishOneElement=e(this.finishOneElement,this),this.finish=e(this.finish,this),this.claim=e(this.claim,this),this.className="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.className,this.finishEvent="up:"+t+":finish"}return n.prototype.claim=function(t,e){return this.finish(t).then(function(n){return function(){return n.start(t,e)}}(this))},n.prototype.start=function(t,e){var n;return n=e(t),this.markElement(t,n),n.then(function(e){return function(){return e.unmarkElement(t)}}(this)),n},n.prototype.finish=function(e){var n,r;return n=this.expandFinishRequest(e),r=t.map(n,this.finishOneElement),Promise.all(r)},n.prototype.expandFinishRequest=function(e){return e?t.selectInDynasty($(e),this.selector):$(this.selector)},n.prototype.finishOneElement=function(t){var e;return e=$(t),e.trigger(this.finishEvent),this.whenElementFinished(e)},n.prototype.whenElementFinished=function(t){return t.data(this.dataKey)||Promise.resolve()},n.prototype.markElement=function(t,e){return t.addClass(this.className),t.data(this.dataKey,e)},n.prototype.unmarkElement=function(t){return t.removeClass(this.className),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}()}.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,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.transferSearchToData=e(this.transferSearchToData,this),this.transferDataToUrl=e(this.transferDataToUrl,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","data","target","failTarget","headers","timeout"]},o.prototype.normalize=function(){return this.method=t.normalizeMethod(this.method),this.headers||(this.headers={}),this.extractHashFromUrl(),t.methodAllowsPayload(this.method)?this.transferSearchToData():this.transferDataToUrl()},o.prototype.extractHashFromUrl=function(){var e;return e=t.parseUrl(this.url),this.hash=e.hash,this.url=t.normalizeUrl(e,{hash:!1})},o.prototype.transferDataToUrl=function(){var e,n;return this.data&&!t.isFormData(this.data)?(e=t.requestDataAsQuery(this.data),n=t.contains(this.url,"?")?"&":"?",this.url+=n+e,this.data=void 0):void 0},o.prototype.transferSearchToData=function(){var e,n;return n=t.parseUrl(this.url),e=n.search,e?(this.data=t.mergeRequestData(this.data,e),this.url=t.normalizeUrl(n,{search:!1})):void 0},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,a,s,l,p,c,f,h;l=new XMLHttpRequest,c=t.copy(e.headers),p=e.data,f=e.method,h=e.url,u=up.proxy.wrapMethod(f,p),f=u[0],p=u[1],t.isFormData(p)?delete c["Content-Type"]:t.isPresent(p)?(p=t.requestDataAsQuery(p,{purpose:"form"}),c["Content-Type"]="application/x-www-form-urlencoded"):p=null,e.target&&(c[up.protocol.config.targetHeader]=e.target),e.failTarget&&(c[up.protocol.config.failTargetHeader]=e.failTarget),e.isCrossDomain()||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),(o=e.csrfToken())&&(c[up.protocol.config.csrfHeader]=o),l.open(f,h);for(i in c)s=c[i],l.setRequestHeader(i,s);return a=function(){var t;return t=e.buildResponse(l),t.isSuccess()?n(t):r(t)},l.onload=a,l.onerror=a,l.ontimeout=a,e.timeout&&(l.timeout=e.timeout),l.send(p)}}(this))},o.prototype.navigate=function(){var e,n,r,o,i;return this.transferSearchToData(),e=$('<form class="up-page-loader"></form>'),n=function(t){return $('<input type="hidden">').attr(t).appendTo(e)
2
2
  },"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(t.requestDataAsArray(this.data),n),e.hide().appendTo("body"),up.browser.submitForm(e)},o.prototype.csrfToken=function(){return this.isSafe()||this.isCrossDomain()?void 0: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.data)},o.prototype.cacheKey=function(){return[this.url,this.method,t.requestDataAsQuery(this.data),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.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}(up.Record)}.call(this),function(){var t=[].slice;up.browser=function(e){var n,r,o,i,u,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E;return S=up.util,d=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()},g=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,a,s,l,p;if(a=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(),s=["id","name","class"],i=0,u=s.length;u>i;i++)r=s[i],(p=n.attr(r))&&(l+=" "+r+'="'+p+'"');l+=">",o=">"}else l=JSON.stringify(t);return l.length>a&&(l=l.substr(0,a)+" \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}))},x=function(){return location.href},c=S.memoize(function(){return!window.atob}),l=function(){return S.isDefined(history.pushState)&&"get"===up.protocol.initialRequestMethod()},o=function(){return"transition"in document.documentElement.style},a=function(){return"oninput"in document.createElement("input")},s=function(){return!!window.Promise},u=function(){return!!window.FormData},i=function(){return!!window.DOMParser},r=function(){return window.console&&console.debug&&console.info&&console.warn&&console.error&&console.group&&console.groupCollapsed&&console.groupEnd},f=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},v=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},E=function(t){return t.preload||S.isBlank(t.confirm)||window.confirm(t.confirm)?Promise.resolve():Promise.reject(new Error("User canceled action"))},h=function(){return!c()&&f()&&r()&&i()&&u()&&o()&&a()&&s()},y=S.memoize(function(){try{return window.sessionStorage}catch(t){return m()}}),m=function(){var t;return t={},{getItem:function(e){return t[e]},setItem:function(e,n){return t[e]=n}}},p=function(t){return t||(t=location.hash),t||(t=""),"#"===t[0]&&(t=t.substr(1)),S.presence(t)},{url:x,navigate:d,submitForm:T,canPushState:l,whenConfirmed:E,isSupported:h,puts:g,sprintf:b,sprintfWithFormattedArgs:w,sessionStorage:y,popCookie:v,hash:p}}(jQuery)}.call(this),function(){var t=[].slice;up.bus=function(e){var n,r,o,i,u,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E;return w=up.util,p={},f=0,g={},x=function(t){return function(n){var r;return r=n.$element||e(this),t.apply(r.get(0),[n,r,up.syntax.data(r)])}},S=function(t,e){var n,r,o;return n=w.copy(t),u(n),o=n.pop(),r=void 0,e?(r=x(o),o._asJqueryListener=r,o._descriptionNumber=++f):(r=o._asJqueryListener,r||up.fail("up.off(): The callback %o was never registered through up.on()",o)),n.push(r),n},u=function(t){var e;return e=t[0].split(/\s+/),e=w.map(e,function(t){var e;return(e=g[t])?(up.log.warn(t+" has been renamed to "+e),e):t}),t[0]=e.join(" ")},l=function(){var n,r,o;return o=1<=arguments.length?t.call(arguments,0):[],up.browser.isSupported()?(n=S(o,!0),m(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)},m=function(t){var e;return e=T(t),p[e]=t},a=function(t){var e;return e=T(t),delete p[e]},T=function(t){return w.last(t)._descriptionNumber},o=function(t,n){var r,o;return null==n&&(n={}),o=e.Event(t,n),(r=n.$element)?delete n.$element:r=e(document),c(t,n),r.trigger(o),o},c=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)},h=function(){var e,n;return e=1<=arguments.length?t.call(arguments,0):[],n=o.apply(null,e),!n.isDefaultPrevented()},E=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],new Promise(function(t,n){return h.apply(null,e)?t():n(new Error("Event "+e[0]+" was prevented"))})},d=function(t){return l("keydown","body",function(e){return w.escapePressed(e)?t(e):void 0})},s=function(t){return t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()},r=function(t){return s(t),"up:action:consumed"!==t.type?o("up:action:consumed",{$element:e(t.target),message:!1}):void 0},b=function(){var t,e,n;n=[];for(e in p)t=p[e],n.push(t.isDefault=!0);return n},y=function(){var t,e,n,r,o,i;e=[];for(o in p)t=p[o],t.isDefault||e.push(t);for(i=[],n=0,r=e.length;r>n;n++)t=e[n],i.push(k.apply(null,t));return i},i=function(){return o("up:framework:reset",{message:"Resetting framework"}),up.protocol.reset()},v=function(t,e){return g[t]=e},n=function(){return up.browser.isSupported()?(o("up:framework:boot",{message:"Booting framework"}),o("up:framework:booted",{message:"Framework booted"}),w.nextFrame(function(){return w.whenReady().then(function(){return o("up:app:boot",{message:"Booting user application"}),o("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},l("up:framework:booted",b),l("up:framework:reset",y),{on:l,off:k,emit:o,nobodyPrevents:h,whenEmitted:E,onEscape:d,emitReset:i,haltEvent:s,consumeAction:r,renamedEvent:v,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.protocol=function(t){var e,n,r,o,i,u,a,s,l;return l=up.util,i=function(t){return t.getResponseHeader(e.locationHeader)||t.responseURL},s=function(t){return t.getResponseHeader(e.titleHeader)},u=function(t){var n;return(n=t.getResponseHeader(e.methodHeader))?l.normalizeMethod(n):void 0},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)},a=function(){return e.reset()},{config:e,reset:a,locationFromXhr:i,titleFromXhr:s,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,a,s,l,p,c,f,h,d,m;return d=up.util,n=up.browser,e="up.log.enabled",r=d.config({prefix:"[UP] ",enabled:"true"===n.sessionStorage().getItem(e),collapse:!1}),f=function(){return r.reset()},l=function(t){return""+r.prefix+t},o=function(){var e,o;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],r.enabled&&o?n.puts.apply(n,["debug",l(o)].concat(t.call(e))):void 0},c=function(){var e,o;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],r.enabled&&o?n.puts.apply(n,["log",l(o)].concat(t.call(e))):void 0},m=function(){var e,r;return r=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],r?n.puts.apply(n,["warn",l(r)].concat(t.call(e))):void 0},s=function(){var e,o,i,u;if(i=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],o=e.pop(),!r.enabled||!i)return o();u=r.collapse?"groupCollapsed":"group",n.puts.apply(n,[u,l(i)].concat(t.call(e)));try{return o()}finally{i&&n.puts("groupEnd")}},a=function(){var e,r;return r=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],r?n.puts.apply(n,["error",l(r)].concat(t.call(e))):void 0},p=function(){var t;return t=" __ _____ ___ ___ / /_ __\n"+("/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n")+"\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",t+=r.enabled?"Call `up.log.disable()` to disable logging for this session.":"Call `up.log.enable()` to enable logging for this session.",n.puts("log",t)},up.on("up:framework:boot",p),up.on("up:framework:reset",f),h=function(t){return n.sessionStorage().setItem(e,t.toString()),r.enabled=t},u=function(){return h(!0)},i=function(){return h(!1)},{puts:c,debug:o,error:a,warn:m,group:s,config:r,enable:u,disable:i}}(jQuery),up.puts=up.log.puts}.call(this),function(){var t=[].slice;up.toast=function(e){var n,r,o,i,u,a,s,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()},a=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)},s=function(t,n){var o,u,s,l;return null==n&&(n={}),i(),s=e('<div class="up-toast"></div>').prependTo("body"),u=e('<div class="up-toast-message"></div>').appendTo(s),o=e('<div class="up-toast-actions"></div>').appendTo(s),t=a(t),u.html(t),(l=n.action||n.inspect)&&r(o,l.label,l.callback),r(o,"Close",i),p.$toast=s},i=function(){return u()?(p.$toast.remove(),p.$toast=null):void 0},up.on("up:framework:reset",l),{open:s,close:i,reset:l,isOpen:u}}(jQuery)}.call(this),function(){var t=[].slice;up.syntax=function(e){var n,r,o,i,u,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T;return T=up.util,n="up-destructible",r="up-destructors",o={"[up-back]":-100,"[up-drawer]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},m=!0,c=[],g=[],p=function(){var e,n,r,o;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],up.browser.isSupported()?(n=e.pop(),r=T.options(e[0]),d(c,o,r,n)):void 0},v=function(){var e,n,r,o;return o=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],up.browser.isSupported()?(n=e.pop(),r=T.options(e[0]),m&&(r.priority=h(o)||up.fail("Unregistered priority for system macro %o",o)),d(g,o,r,n)):void 0},h=function(t){var e,n;for(n in o)if(e=o[n],t.indexOf(n)>=0)return e},a=function(t,e,n){return{selector:t,callback:n,isSystem:m,priority:e.priority||0,batch:e.batch,keep:e.keep}},d=function(t,e,n,r){var o,i,u;if(up.browser.isSupported()){for(i=a(e,n,r),o=0;(u=t[o])&&u.priority>=i.priority;)o+=1;return t.splice(o,0,i)}},u=function(t,e,n){var r,o;return up.puts(t.isSystem?void 0:"Compiling '%s' on %o",t.selector,n),t.keep&&(o=T.isString(t.keep)?t.keep:"",e.attr("up-keep",o)),r=t.callback.apply(n,[e,f(e)]),i(e,r)},y=function(t){return T.isFunction(t)?t:T.isArray(t)&&T.all(t,T.isFunction)?T.sequence.apply(T,t):void 0},i=function(t,e){var o;return(e=y(e))?(t.addClass(n),o=t.data(r)||function(){return w(t)},o=T.sequence(o,e),t.data(r,o)):void 0},w=function(t){return t.removeData(r),t.removeClass(n)},l=function(t,n){var r;return n=T.options(n),r=e(n.skip),up.log.group("Compiling fragment %o",t.get(0),function(){var n,o,i,a,s,l;for(s=[g,c],l=[],o=0,i=s.length;i>o;o++)a=s[o],l.push(function(){var o,i,s;for(s=[],o=0,i=a.length;i>o;o++)p=a[o],n=T.selectInSubtree(t,p.selector),r.length&&(n=n.filter(function(){var t;return t=e(this),T.all(r,function(e){return 0===t.closest(e).length})})),s.push(n.length?up.log.group(p.isSystem?void 0:"Compiling '%s' on %d element(s)",p.selector,n.length,function(){return p.batch?u(p,n,n.get()):n.each(function(){return u(p,e(this),this)})}):void 0);return s}());return l})},s=function(t){return b(t)()},b=function(t){var o,i;return o=T.selectInSubtree(t,"."+n),i=T.map(o,function(t){return e(t).data(r)}),i=T.compact(i),T.sequence.apply(T,i)},f=function(t){var n,r;return n=e(t),r=n.attr("up-data"),T.isString(r)&&""!==T.trim(r)?JSON.parse(r):{}},k=function(){var t;return t=function(t){return t.isSystem},c=T.select(c,t),g=T.select(g,t)},up.on("up:framework:booted",function(){return m=!1}),up.on("up:framework:reset",k),{compiler:p,macro:v,compile:l,clean:s,prepareClean:b,data:f}}(jQuery),up.compiler=up.syntax.compiler,up.macro=up.syntax.macro}.call(this),function(){up.history=function(t){var e,n,r,o,i,u,a,s,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},a=function(t,e){return e||(e={}),e.hash=!0,v.normalizeUrl(t,e)},r=function(t){return a(up.browser.url(),t)},o=function(t){var e;return e={stripTrailingSlash:!0},a(t,e)===r(e)},s=function(t){return u&&(p=u,u=void 0),u=t},h=function(t){return i("replaceState",t)},c=function(t,e){return e=v.options(e,{force:!1}),t=a(t),!e.force&&o(t)||!up.bus.nobodyPrevents("up:history:push",{url:t,message:"Adding history entry for "+t})?void 0: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),s(r()),!0):!1},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 s(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){return v.isPresent(p)?(v.setMissingAttrs(t,{"up-href":p,"up-restore-scroll":""}),t.removeAttr("up-back"),up.link.makeFollowable(t)):void 0}),up.on("up:framework:reset",d),{config:n,push:c,replace:h,url:r,isUrl:o,previousUrl:function(){return p},normalizeUrl:a}}(jQuery)}.call(this),function(){var t=[].slice;up.layout=function(e){var n,r,o,i,u,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C;return S=up.util,r=S.config({duration:0,viewports:[document,".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"),l=function(){return r.reset(),a.clear(),T.finish()},v=function(t,e,n){var i;return i=k(t),n=S.options(n),n.duration=S.option(n.duration,r.duration),n.easing=S.option(n.easing,r.easing),o(i).then(function(){return up.motion.isEnabled()&&n.duration>0?w(i,e,n):g(i,e)})},k=function(t){var n;return n=e(t),n.get(0)===document?e("html, body"):n},w=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()},o=function(t){var e;return e=k(t),T.finish(e)},n=function(){return S.multiSelector(r.anchoredRight).select()},s=function(){var n,o,i,u;return i=function(t,n){var r,o;return r=e(t),o=r.css(n),S.isPresent(o)||up.fail("Fixed element %o must have a CSS attribute %s",r.get(0),n),parseFloat(o)+r.height()},o=function(){var t,n,o,a;for(o=e(r.fixedTop.join(", ")),a=[],t=0,n=o.length;n>t;t++)u=o[t],a.push(i(u,"top"));return a}(),n=function(){var t,n,o,a;for(o=e(r.fixedBottom.join(", ")),a=[],t=0,n=o.length;n>t;t++)u=o[t],a.push(i(u,"bottom"));return a}(),{top:Math.max.apply(Math,[0].concat(t.call(o))),bottom:Math.max.apply(Math,[0].concat(t.call(n)))}},c=function(t,n){var o;return o=e(t).first(),up.puts("Revealing fragment %o",o.get(0)),n=S.options(n),S.rejectOnError(function(){var t,i,u,a,l,p,c,f,h,d,m,g,y;return t=n.viewport?e(n.viewport):x(o),m=S.option(n.snap,r.snap),y=t.is(document),g=y?S.clientSize().height:t.outerHeight(),f=t.scrollTop(),l=f,c=void 0,p=void 0,y?(p=s(),c=0):(p={top:0,bottom:0},c=f),h=function(){return l+p.top},d=function(){return l+g-p.bottom-1},i=S.measure(o,{relative:t,includeMargin:!0}),u=i.top+c,a=u+Math.min(i.height,r.substance)-1,a>d()&&(l+=a-d()),(u<h()||n.top)&&(l=u-p.top),m>l&&i.top<.5*g&&(l=0),l!==f?v(t,l,n):Promise.resolve()})},f=function(){var t,e;return(e=up.browser.hash())&&(t=i(e))?c(t):Promise.resolve()},E=function(){return S.multiSelector(r.viewports)},x=function(t,n){var r,o;return null==n&&(n={}),r=e(t),o=E().seekUp(r),0===o.length&&n.strict!==!1&&up.fail("Could not find viewport for %o",r),o},C=function(t){var n;return n=e(t),E().selectInSubtree(n)},P=function(){return E().select()},y=function(t){var n;return n=e(t),n.is(document)?"document":S.selectorForElement(n)},b=function(){var t,n,o,i,u;for(u={},i=r.viewports,n=0,o=i.length;o>n;n++)t=i[n],e(t).each(function(){var t,n,r;return t=e(this),n=y(t),r=t.scrollTop(),u[n]=r});return u},u=function(t){var n,o;return null==t&&(t=void 0),t||(t=document.body),o=e(t),n=o.find("[up-fixed]"),S.isPresent(r.fixedTop)&&(n=n.add(o.find(r.fixedTop.join(", ")))),S.isPresent(r.fixedBottom)&&(n=n.add(o.find(r.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,b()),a.set(n,e)},p=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=x(t.around),r=e.add(n)):r=P(),o=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=y(t),n=o[e]||0,v(t,n,{duration:0})}),Promise.all(t)})},h=function(t,n){var r,o,i;return n=S.options(n),r=e(t),n.restoreScroll?p({around:r}):n.reveal&&(o={duration:n.duration},S.isString(n.reveal)&&(i=d(n.reveal,n),r=up.first(i)||r,o.top=!0),r.length)?c(r,o):Promise.resolve()},d=function(t,e){return t=up.dom.resolveSelector(t,e.origin),"#"===t[0]&&(t+=", a[name='"+t+"']"),t},i=function(t){return(t=up.browser.hash(t))?up.first("[id='"+t+"'], a[name='"+t+"']"):void 0},up.on("up:app:booted",f),up.on("up:framework:reset",l),{reveal:c,revealHash:f,firstHashTarget:i,scroll:v,config:r,viewportOf:x,viewportsWithin:C,viewports:P,scrollTops:b,saveScroll:m,restoreScroll:p,revealOrRestoreScroll:h,anchoredRight:n,fixedChildren:u}}(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,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C,F,A,$,D,O,R,j;return R=up.util,o=R.config({fallbacks:["body"],fallbackTransition:null}),S=function(){return o.reset()},E=function(e,n){var r;return r=t(e),R.isPresent(n)&&(n=R.normalizeUrl(n)),r.attr("up-source",n)},A=function(e){var n;return n=t(e).closest("[up-source]"),R.presence(n.attr("up-source"))||up.browser.url()},x=function(t,e){var n,r;return R.isString(t)?(r=t,R.contains(r,"&")&&(R.isPresent(e)?(n=R.selectorForElement(e),r=r.replace(/\&/,n)):up.fail("Found origin reference (%s) in selector %s, but no origin was given","&",r))):r=R.selectorForElement(t),r},T=function(t,e,n){var o,i,u,a,s,l,p,c,f,h;if(n=R.options(n),n.inspectResponse=u=function(){return up.browser.navigate(e,R.only(n,"method","data"))},!up.browser.canPushState()&&n.history!==!1)return n.preload||u(),R.unresolvablePromise();h=R.merge(n,{humanizedTarget:"target"}),i=R.merge(n,{humanizedTarget:"failure target",provideTarget:void 0,restoreScroll:!1}),R.renameKey(i,"failTransition","transition"),R.renameKey(i,"failLayer","layer"),R.renameKey(i,"failReveal","reveal");try{s=r(t,h),a=r(n.failTarget,i)}catch(d){return o=d,Promise.reject(o)}return f={url:e,method:n.method,data:n.data,target:s,failTarget:a,cache:n.cache,preload:n.preload,headers:n.headers,timeout:n.timeout},p=function(t){return w(!0,s,t,h)},l=function(t){var e,n;return n=function(){return Promise.reject(t)},t.isFatalError()?n():(e=w(!1,a,t,i),R.always(e,n))},c=up.request(f),n.preload||(c=c.then(p,l)),c},w=function(t,e,n,r){var o,i,u,a,s;return a=n.request,s=n.url,i=s,o=a.hash,r.reveal===!0&&o&&(r.reveal=o,i+=o),u="GET"===n.method,t?u?(r.history===!1||R.isString(r.history)||(r.history=i),r.source===!1||R.isString(r.source)||(r.source=s)):(R.isString(r.history)||(r.history=!1),R.isString(r.source)||(r.source="keep")):u?(r.history!==!1&&(r.history=i),r.source!==!1&&(r.source=s)):(r.history=!1,r.source="keep"),P(r)&&n.title&&(r.title=n.title),l(e,n.text,r)},P=function(t){return!(t.title===!1||R.isString(t.title)||t.history===!1&&t.title!==!0)},l=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=R.options(r,{historyMethod:"push",requireMatch:!0,keep:!0,layer:"auto"}),r.saveScroll!==!1&&up.layout.saveScroll(),R.rejectOnError(function(){var o,i,u,a,s,l,p;for("function"==typeof r.provideTarget&&r.provideTarget(),a=b(e),o=n(t,a,r),P(r)&&(s=a.title())&&(r.title=s),j(r),p=[],i=0,u=o.length;u>i;i++)l=o[i],up.log.group("Updating %s",l.selector,function(){var t,e;return t=R.merge(r,R.only(l,"origin","reveal")),d(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=R.merge(n,{response:e}),r=new up.ExtractCascade(t,n),r.bestMatchingSteps()},d=function(t){var e,n,r,o,i;for(n=[],u(t.get(0),n),i=[],r=0,o=n.length;o>r;r++)e=n[r],i.push(e());return i},u=function(t,e){var n,r,o,i,a,s;if("NOSCRIPT"===t.tagName)return r=document.createElement("noscript"),r.textContent=t.innerHTML,e.push(function(){return t.parentNode.replaceChild(r,t)});if("SCRIPT"===t.tagName)return e.push(function(){return t.parentNode.removeChild(t)});for(a=t.children,s=[],o=0,i=a.length;i>o;o++)n=a[o],s.push(u(n,e));return s},b=function(e){var n;return n=R.createElementFromHtml(e),{title:function(){var t;return null!=(t=n.querySelector("head title"))?t.textContent:void 0},first:function(e){var r;return(r=t.find(e,n)[0])?t(r):void 0}}},j=function(t){return t=R.options(t,{historyMethod:"push"}),t.history&&up.history[t.historyMethod](t.history),R.isString(t.title)?document.title=t.title:void 0},$=function(t,n,r,o,u){var a,l,c,f,h;return o||(o="none"),"keep"===u.source&&(u=R.merge(u,{source:A(t)})),up.motion.finish(t),r?(a=n.contents().wrapAll('<div class="up-insertion"></div>').parent(),"before"===r?t.prepend(a):t.append(a),m(a.children(),u),f=up.layout.revealOrRestoreScroll(a,u),f=f.then(function(){return up.animate(a,o,u)}),f=f.then(function(){return R.unwrapElement(a)})):(c=p(t,n,u))?(s(c),f=Promise.resolve()):(u.keepPlans=O(t,n,u),l=up.syntax.prepareClean(t),h=function(){return F(t,n,o,u)?(D(t,n),o=!1):n.insertBefore(t),u.source!==!1&&E(n,u.source),e(n),m(n,u),up.morph(t,n,o,u)},f=i(t,{clean:l,beforeWipe:h,log:!1})),f},F=function(t,e,n,r){var o;return o=t.add(e),t.is("body")||!up.motion.willAnimate(o,n,r)},D=function(t,e){return t.replaceWith(e)},O=function(e,n,r){var o,i,u,a,s,l,c,f;if(a=[],r.keep)for(f=e.find("[up-keep]"),u=0,l=f.length;l>u;u++)s=f[u],o=t(s),(c=p(o,n,R.merge(r,{descendantsOnly:!0})))&&(i=o.clone(),up.util.detachWith(o,i),c.$newElement.replaceWith(o),a.push(c));return a},p=function(t,e,n){var r,o,i,u,a;return n.keep&&(r=t,(u=R.castedAttr(r,"up-keep"))&&(R.isString(u)||(u="&"),u=x(u,r),o=n.descendantsOnly?e.find(u):R.selectInSubtree(e,u),o=o.first(),o.length&&o.is("[up-keep]")&&(a={$element:r,$newElement:o,newData:up.syntax.data(o)},i=R.merge(a,{message:["Keeping element %o",r.get(0)]}),up.bus.nobodyPrevents("up:fragment:keep",i))))?a:void 0},m=function(e,n){var r,o,i,u,l,p;for(r=t(e),n=R.options(n,{keepPlans:[]}),i=[],p=n.keepPlans,o=0,u=p.length;u>o;o++)l=p[o],s(l),i.push(l.$element);return up.syntax.compile(r,{skip:i}),a(r,n),r},a=function(e,n){var r;return r=t(e),up.emit("up:fragment:inserted",{$element:r,message:["Inserted fragment %o",r.get(0)],origin:n.origin})},s=function(t){var e;return e=R.merge(t,{message:["Kept fragment %o",t.$element.get(0)]}),up.emit("up:fragment:kept",e)},e=function(t){var e,n;return n="[autofocus]:last",e=R.selectInSubtree(t,n),e.length&&e.get(0)!==document.activeElement?e.focus():void 0},v=function(t){var e;return e=".up-ghost, .up-destroying",0===t.closest(e).length},c=function(t,e){var n;return e=R.options(e,{layer:"auto"}),n=x(t,e.origin),"auto"===e.layer?h(n,e.origin):f(n,e.layer)},h=function(t,e){var n,r,o,i,u,a;for(i=["popup","modal","page"],n=void 0,R.isPresent(e)&&(a=g(e),R.remove(i,a),i.unshift(a)),r=0,u=i.length;u>r&&(o=i[r],!(n=f(t,o)));r++);return n},f=function(e,n){var r,o,i,u,a,s;for(o=t(e),i=void 0,a=0,s=o.length;s>a;a++)if(u=o[a],r=t(u),v(r)&&y(r,n)){i=r;break}return i},g=function(e){var n;return n=t(e),up.popup.contains(n)?"popup":up.modal.contains(n)?"modal":"page"},y=function(t,e){return g(t)===e},i=function(e,n){var r,o,i,u,a,s;return r=t(e),n=R.options(n,{animation:!1}),C(r,n)&&(u=["Destroying fragment %o",r.get(0)],a=["Destroyed fragment %o",r.get(0)]),0===r.length?Promise.resolve():(up.emit("up:fragment:destroy",{$element:r,message:u}),r.addClass("up-destroying"),j(n),o=function(){var t;return t=up.motion.animateOptions(n),up.motion.animate(r,n.animation,t)},i=n.beforeWipe||Promise.resolve(),s=function(){return n.clean||(n.clean=function(){return up.syntax.clean(r)}),n.clean(),up.syntax.clean(r),up.emit("up:fragment:destroyed",{$element:r,message:a}),r.remove()},o().then(i).then(s))},C=function(t,e){return e.log!==!1&&!t.is(".up-placeholder, .up-tooltip, .up-modal, .up-popup")},k=function(t,e){var n;return e=R.options(e,{cache:!1}),n=e.url||A(t),T(t,n,e)},up.on("up:app:boot",function(){var e;return e=t(document.body),E(e,up.browser.url()),m(e)}),up.on("up:framework:reset",S),{replace:T,reload:k,destroy:i,extract:l,first:c,source:A,resolveSelector:x,hello:m,config:o}}(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.hello=up.dom.hello,up.renamedModule("flow","dom")}.call(this),function(){var t=[].slice;up.motion=function(e){var n,r,o,i,u,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C,F;return P=up.util,v={},u={},g={},a={},m=new up.MotionTracker("motion"),i=P.config({duration:300,delay:0,easing:"ease",enabled:!0}),k=function(){return p(),v=P.copy(u),g=P.copy(a),i.reset()},f=function(){return i.enabled},n=function(t,i,u){var a;return a=e(t),u=r(u),c(a,u).then(function(){return C(a,i,u)?P.isFunction(i)?i(a,u):P.isString(i)?n(a,s(i),u):P.isOptions(i)?o(a,i,u):up.fail("Animation must be a function, animation name or object of CSS properties, but it was %o",i):T(a,i)})},C=function(t,e,n){return n=r(n),f()&&!h(e)&&n.duration>0&&P.all(t,P.isBodyDescendant)},T=function(t,e){return P.isOptions(e)&&t.css(e),Promise.resolve()},o=function(t,e,n){var r;return r=function(){var r,o,i,u,a,s,l,p,c,f;return p=Object.keys(e),l={"transition-property":p.join(", "),"transition-duration":n.duration+"ms","transition-delay":n.delay+"ms","transition-timing-function":n.easing},u=t.css(Object.keys(l)),o=P.newDeferred(),i=function(){return o.resolve()},s=function(t){var e;return e=t.originalEvent.propertyName,P.contains(p,e)?i():void 0},a=i,t.on(m.finishEvent,a),t.on("transitionend",s),c=5,r=P.setTimer(n.duration+c,i),o.then(function(){var e;return t.off(m.finishEvent,a),t.off("transitionend",s),clearTimeout(r),f(),t.css({transition:"none"}),e=!("none"===u["transition-property"]||"all"===u["transition-property"]&&"0"===u["transition-duration"][0]),e?(P.forceRepaint(t),t.css(u)):void 0}),f=P.forceCompositing(t),t.css(l),t.css(e),o.promise()},m.start(t,r)},r=function(){var e,n,r,o,u;return n=1<=arguments.length?t.call(arguments,0):[],u=n.shift()||{},e=P.isJQuery(n[0])?n.shift():P.nullJQuery(),o=P.isObject(n[0])?n.shift():{},r={},r.easing=P.option(u.easing,P.presentAttr(e,"up-easing"),o.easing,i.easing),r.duration=Number(P.option(u.duration,P.presentAttr(e,"up-duration"),o.duration,i.duration)),r.delay=Number(P.option(u.delay,P.presentAttr(e,"up-delay"),o.delay,i.delay)),r.finishedMotion=u.finishedMotion,r},s=function(t){return v[t]||up.fail("Unknown animation %o",t)},F=function(t,e,n,r){var o,i,u,a,s,l;return n.copy===!1||t.is(".up-ghost")||e.is(".up-ghost")?r(t,e,n):(a=void 0,i=void 0,s=void 0,u=void 0,o=up.layout.viewportOf(t),P.temporaryCss(e,{display:"none"},function(){return a=y(t,o),s=o.scrollTop()}),t.hide(),l=P.merge(n,{duration:0}),up.layout.revealOrRestoreScroll(e,l).then(function(){var l,p,c,f;return i=y(e,o),u=o.scrollTop(),a.moveTop(u-s),c=P.temporaryCss(e,{opacity:"0"}),f=r(a.$ghost,i.$ghost,n),l=a.$ghost.add(i.$ghost),p=t.add(e),m.forwardFinishEvent(p,l,f),f.then(function(){return c(),a.$bounds.remove(),i.$bounds.remove()})}))},p=function(t){return m.finish(t)},d=function(t,n,o,i){var u,a,s,p,f;return i=P.options(i),i=P.assign(i,r(i)),s=e(t),a=e(n),u=s.add(a),p=l(o),f=C(u,p,i),up.log.group(f?"Morphing %o to %o with transition %o":void 0,s.get(0),a.get(0),o,function(){return c(u,i).then(function(){return f?p?F(s,a,i,p):up.fail("Unknown transition %o",o):S(s,a,i)})})},c=function(t,e){return e.finishedMotion?Promise.resolve():(e.finishedMotion=!0,p(t))},l=function(t){var e;if(h(t))return void 0;if(P.isFunction(t))return t;if(P.isArray(t))return h(t[0])&&h(t[1])?void 0:function(e,r,o){return Promise.all([n(e,t[0],o),n(r,t[1],o)])};if(P.isString(t)){if(t.indexOf("/")>=0)return l(t.split("/"));if(e=g[t])return l(e)}},S=function(t,e,n){var r;return t.hide(),r=P.merge(n,{duration:0}),up.layout.revealOrRestoreScroll(e,r)},y=function(t,n){var r,o,i,u,a,s,l,p,c;for(u=P.measure(t,{relative:!0,inner:!0}),i=t.clone(),i.find("script").remove(),i.css({position:"static"===t.css("position")?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"}),i.addClass("up-ghost"),r=e('<div class="up-bounds"></div>'),r.css({position:"absolute"}),r.css(u),c=u.top,p=function(t){return 0!==t?(c+=t,r.css({top:c})):void 0},i.appendTo(r),r.insertBefore(t),p(t.offset().top-i.offset().top),o=up.layout.fixedChildren(i),s=0,l=o.length;l>s;s++)a=o[s],P.fixedToAbsolute(a,n);return{$ghost:i,$bounds:r,moveTop:p}
3
3
  },w=function(t,e){return g[t]=e},b=function(t,e){return v[t]=e},x=function(){return u=P.copy(v),a=P.copy(g)},h=function(t){return!t||"none"===t||P.isOptions(t)&&P.isBlank(t)},b("fade-in",function(t,e){return t.css({opacity:0}),n(t,{opacity:1},e)}),b("fade-out",function(t,e){return t.css({opacity:1}),n(t,{opacity:0},e)}),E=function(t,e){return{transform:"translate("+t+"px, "+e+"px)"}},b("move-to-top",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=r.top+r.height,n(t,E(0,-o),e)}),b("move-from-top",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=r.top+r.height,t.css(E(0,-o)),n(t,E(0,0),e)}),b("move-to-bottom",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=P.clientSize().height-r.top,n(t,E(0,o),e)}),b("move-from-bottom",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=P.clientSize().height-r.top,t.css(E(0,o)),n(t,E(0,0),e)}),b("move-to-left",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=r.left+r.width,n(t,E(-o,0),e)}),b("move-from-left",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=r.left+r.width,t.css(E(-o,0)),n(t,E(0,0),e)}),b("move-to-right",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=P.clientSize().width-r.left,n(t,E(o,0),e)}),b("move-from-right",function(t,e){var r,o;return t.css(E(0,0)),r=P.measure(t),o=P.clientSize().width-r.left,t.css(E(o,0)),n(t,E(0,0),e)}),b("roll-down",function(t,e){var r,o,i;return o=t.height(),i=P.temporaryCss(t,{height:"0px",overflow:"hidden"}),r=n(t,{height:o+"px"},e),r.then(i),r}),w("move-left","move-to-left/move-from-right"),w("move-right","move-to-right/move-from-left"),w("move-up","move-to-top/move-from-bottom"),w("move-down","move-to-bottom/move-from-top"),w("cross-fade","fade-out/fade-in"),up.on("up:framework:booted",x),up.on("up:framework:reset",k),{morph:d,animate:n,animateOptions:r,willAnimate:C,finish:p,transition:w,animation:b,config:i,isEnabled:f,prependCopy:y,isNone:h}}(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,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C,F,A,$,D,O,R,j,M,U;return M=up.util,n=void 0,S=void 0,D=void 0,b=void 0,O=void 0,E=[],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,a,s;for(t=up.Request.wrap(t),n=[t],"html"!==t.target&&(a=t.copy({target:"html"}),n.push(a),"body"!==t.target&&(u=t.copy({target:"body"}),n.push(u))),r=0,o=n.length;o>r;r++)if(e=n[r],s=i.get(e))return s},u=function(){return clearTimeout(S),S=null},a=function(){return clearTimeout(D),D=null},F=function(){return n=null,u(),a(),b=0,l.reset(),i.clear(),O=!1,E=[]},F(),y=function(){var e,n,r,o,i;return e=1<=arguments.length?t.call(arguments,0):[],r=M.extractOptions(e),M.isGiven(e[0])&&(r.url=e[0]),n=r.cache===!1,i=up.Request.wrap(r),i.isSafe()||s(),!n&&(o=p(i))?up.puts("Re-using cached response for %s %s",i.method,i.url):(o=v(i),$(i,o),o["catch"](function(){return C(i)})),r.preload||(g(),M.always(o,m)),o},r=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],up.log.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;return b+=1,D?void 0:(t=function(){return c()?(up.emit("up:proxy:slow",{message:"Proxy is slow to respond"}),O=!0):void 0},D=M.setTimer(l.slowDelay,t))},m=function(){return b-=1,f()&&(a(),O)?(up.emit("up:proxy:recover",{message:"Proxy has recovered from slow response"}),O=!1):void 0},v=function(t){return b<l.maxRequests?d(t):x(t)},x=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),E.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,A),M.always(n,w),n):(M.microtask(w),Promise.reject(new Error("Event up:proxy:load was prevented")))},P=function(t){var e,n;return n=t.request,t.url&&n.url!==t.url?(e=n.copy({method:t.method,url:t.url}),up.proxy.alias(n,e)):void 0},A=function(t){return t.isFatalError()?up.emit("up:proxy:fatal",{message:"Fatal error during request",request:t.request,response:t}):(t.isError()||P(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;return void("function"==typeof(t=E.shift())&&t())},o=i.alias,$=i.set,C=i.remove,s=i.clear,up.bus.renamedEvent("up:proxy:received","up:proxy:loaded"),T=function(t){var e,r;return r=parseInt(M.presentAttr(t,"up-delay"))||l.preloadDelay,t.is(n)?void 0:(n=t,u(),e=function(){return M.muteRejection(k(t)),n=null},R(e,r))},R=function(t,e){return S=setTimeout(t,e)},j=function(t){return t.is(n)?(n=void 0,u()):void 0},k=function(t){var n;return n=e(t),up.link.isSafe(n)?up.log.group("Preloading link %o",n.get(0),function(){var t;return t=up.link.followVariantForLink(n),t.preloadLink(n)}):Promise.reject(new Error("Won't preload unsafe link"))},h=function(t){return M.contains(l.safeMethods,t)},U=function(t,e,n){return M.contains(l.wrapMethods,t)&&(e=M.appendRequestData(e,up.protocol.config.methodParam,t,n),t="POST"),[t,e]},up.compiler("a[up-preload], [up-href][up-preload]",function(t){return up.link.isSafe(t)?(t.on("mouseenter touchstart",function(e){return up.link.shouldProcessEvent(e,t)?T(t):void 0}),t.on("mouseleave",function(){return j(t)})):void 0}),up.on("up:framework:reset",F),{preload:k,ajax:r,request:y,get:p,alias:o,clear:s,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,a,s,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=s(r),o.followLink(r,n)},o=function(e,n){var r,o,i;return r=t(e),n=d.options(n),i=d.option(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=a(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)},a=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!!s(t,{"default":!1})},s=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;return n=t(e),p(n)?void 0:n.attr("up-follow","")},h=function(e,n){var r,o,i;return r=t(e.target),o=r.closest("a, [up-href]").not(n),i=up.form.fieldSelector().seekUp(r),0===o.length&&0===i.length&&d.isUnmodifiedMouseEvent(e)},c=function(e,n){var r,o;return r=t(e),o=a(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,a,s,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-/,s={},s["up-href"]=t(u).attr("href"),l=u.attributes,o=0,i=l.length;i>o;o++)r=l[o],a=r.name,a.match(c)&&(s[a]=r.value);return d.setMissingAttrs(e,s),e.removeAttr("up-expand"),f(e)}}),{visit:m,follow:u,makeFollowable:f,isSafe:c,isFollowable:p,shouldProcessEvent:h,followMethod:a,addFollowVariant:n,followVariantForLink:s,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,a,s,l,p,c,f,h,d,m;return d=up.util,r=d.config({validateTargets:["[up-fieldset]:has(&)","fieldset:has(&)","label:has(&)","form:has(&)"],fields:[":input"],observeDelay:0}),s=function(){return r.reset()},o=function(){return d.multiSelector(r.fields)},p=function(t,n){var r,o,i;return r=e(t).closest("form"),n=d.options(n),o=d.option(n.target,r.attr("up-target"),"body"),i=d.option(n.url,r.attr("action"),up.browser.url()),n.failTarget=d.option(n.failTarget,r.attr("up-fail-target"))||d.selectorForElement(r),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.fallback=d.option(n.fallback,r.attr("up-fallback")),n.history=d.option(n.history,d.castedAttr(r,"up-history"),!0),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.method=d.option(n.method,r.attr("up-method"),r.attr("data-method"),r.attr("method"),"post").toUpperCase(),n.headers=d.option(n.headers,{}),n.cache=d.option(n.cache,d.castedAttr(r,"up-cache")),n.restoreScroll=d.option(n.restoreScroll,d.castedAttr(r,"up-restore-scroll")),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.data=d.requestDataFromForm(r),n=d.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",{$element:r}).then(function(){var t;return up.feedback.start(r),up.browser.canPushState()||n.history===!1?(t=up.replace(o,i,n),d.always(t,function(){return up.feedback.stop(r)}),t):(r.get(0).submit(),d.unresolvablePromise())})},u=function(){var n,i,u,s,l,p,c,f,h,m;return m=arguments[0],c=2<=arguments.length?t.call(arguments,1):[],f={},s=void 0,1===c.length?s=c[0]:c.length>1&&(f=d.options(c[0]),s=c[1]),n=e(m),u=null,h=d.option(s,d.presentAttr(n,"up-observe")),u=d.isString(h)?new Function("value","$field",h):h||up.fail("up.observe: No change callback given"),l=d.option(d.presentAttr(n,"up-delay"),f.delay,r.observeDelay),l=parseInt(l),i=o().selectInSubtree(n),p=d.map(i,function(t){return a(e(t),l,u)}),d.sequence.apply(d,p)},a=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=d.option(e.target,t.attr("up-validate")),d.isBlank(n)&&(n||(n=d.detect(r.validateTargets,function(n){var r;return r=up.dom.resolveSelector(n,e.origin),t.closest(r).length}))),d.isBlank(n)&&up.fail("Could not find default validation target for %o (tried ancestors %o)",t.get(0),r.validateTargets),d.isString(n)||(n=d.selectorForElement(n)),n},m=function(t,n){var r,o,i;return r=e(t),n=d.options(n),n.origin=r,n.target=l(r,n),n.failTarget=n.target,n.reveal=d.option(n.reveal,d.castedAttr(r,"up-reveal"),!1),n.history=!1,n.headers=d.option(n.headers,{}),n.validate=r.attr("name")||"__none__",n=d.merge(n,up.motion.animateOptions(n,r)),o=r.closest("form"),i=up.submit(o,n)},h=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=[],d.isPresent(r)?(o.push(r),o.push(":present")):o.push(":blank"),d.isPresent(n)&&o.push(n),o},f=function(t,n){var r,o,i;return r=e(t),n=d.options(n),i=d.option(n.target,r.attr("up-switch")),d.isPresent(i)||up.fail("No switch target given for %o",r.get(0)),o=h(r),e(i).each(function(){return c(e(this),o)})},c=function(t,n){var r,o,u,a;return r=e(t),n||(n=h(i(r))),(o=r.attr("up-hide-for"))?(o=o.split(" "),u=0===d.intersect(n,o).length):(a=(a=r.attr("up-show-for"))?a.split(" "):[":present",":checked"],u=d.intersect(n,a).length>0),r.toggle(u),r.addClass("up-switched")},i=function(t){var n,r;return n=e("[up-switch]"),r=d.detect(n,function(n){var r;return r=e(n).attr("up-switch"),t.is(r)}),r?e(r):d.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),d.muteRejection(p(e))}),up.on("change","[up-validate]",function(t,e){return d.muteRejection(m(e))}),up.compiler("[up-switch]",function(t){return f(t)}),up.on("change","[up-switch]",function(t,e){return f(e)}),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",function(t){return c(t)}),up.compiler("[up-observe]",function(t){return u(t)}),up.compiler("[up-autosubmit]",function(t){return n(t)}),up.on("up:framework:reset",s),{config:r,submit:p,observe:u,validate:m,switchTargets:f,autosubmit:n,fieldSelector:o}}(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,a,s,l,p,c,f,h,d,m,v,g,y;return g=up.util,s=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(),s.reset()},e=function(){var t,e,n;switch(t={},n=g.measure(m.$popup),g.isFixed(m.$anchor)?(e=m.$anchor.get(0).getBoundingClientRect(),t.position="fixed"):e=g.measure(m.$anchor),m.position){case"bottom-right":t.top=e.top+e.height,t.left=e.left+e.width-n.width;break;case"bottom-left":t.top=e.top+e.height,t.left=e.left;break;case"top-right":t.top=e.top-n.height,t.left=e.left+e.width-n.width;break;case"top-left":t.top=e.top-n.height,t.left=e.left;break;default:up.fail("Unknown position option '%s'",m.position)}return m.$popup.attr("up-position",m.position),m.$popup.css(t)},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(a,function(){return r(t,e)})},r=function(n,r){var o,i,u,a,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")),a=g.option(g.pluckKey(r,"html")),f||a||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"),s.position),r.animation=g.option(r.animation,o.attr("up-animation"),s.openAnimation),r.sticky=g.option(r.sticky,g.castedAttr(o,"up-sticky"),s.sticky),r.history=up.browser.canPushState()?g.option(r.history,g.castedAttr(o,"up-history"),s.history):!1,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:s.openDuration,easing:s.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=a?up.extract(c,a,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 a(t)})},a=function(t){var e;return f()?(t=g.options(t,{animation:s.closeAnimation,history:m.coveredUrl,title:m.coveredTitle}),e=up.motion.animateOptions(t,{duration:s.closeDuration,easing:s.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 t.is(".up-current")?u():n(t,e)},o=function(){return m.sticky?void 0:(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;return n=t(e.target),n.closest(".up-popup, [up-popup]").length?void 0: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 o()}),up.bus.onEscape(u),up.on("click",".up-popup [up-close]",function(t){return u(),up.bus.consumeAction(t)}),up.on("up:history:restore",u),up.on("up:framework:reset",d),{attach:n,close:u,url:function(){return m.url},coveredUrl:function(){return m.coveredUrl},config:s,contains:l,isOpen:f}}(jQuery)}.call(this),function(){up.modal=function(t){var e,n,r,o,i,u,a,s,l,p,c,f,h,d,m,v,g,y,b,w,k,T,S,x,E,P,C,F;return E=up.util,u=E.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=E.openConfig({"default":{}}),S=E.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 E.DivertibleChain,k=function(){var t;return null!=(t=S.$modal)&&t.remove(),P(),S.reset(),r.reset(),u.reset(),d.reset()},x=function(){var t;return t=f("template"),E.evalOption(t,{closeLabel:f("closeLabel")})},l=function(){return S.coveredTitle=null,S.coveredUrl=null},s=function(e,n){var r,o,i;return i=t(x()),i.attr("up-flavor",S.flavor),E.isPresent(S.position)&&i.attr("up-position",S.position),o=i.find(".up-modal-dialog"),E.isPresent(n.width)&&o.css("width",n.width),E.isPresent(n.maxWidth)&&o.css("max-width",n.maxWidth),E.isPresent(n.height)&&o.css("height",n.height),S.closable||i.find(".up-modal-close").remove(),r=i.find(".up-modal-content"),E.$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;return E.documentHasVerticalScrollbar()?(e=t("body"),o=E.scrollbarWidth(),n=parseFloat(e.css("padding-right")),r=o+n,i=E.temporaryCss(e,{"padding-right":r+"px","overflow-y":"hidden"}),S.unshifters.push(i),up.layout.anchoredRight().each(function(){var e,n,r,i;return e=t(this),n=parseFloat(e.css("right")),r=o+n,i=E.temporaryCss(e,{right:r}),S.unshifters.push(i)})):void 0},P=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=E.options(n),n.$link=t(e),y(n)},w=function(t,e){return e=E.options(e),e.$link=t,e.preload=!0,b(e)},F=function(t,e){return e=E.options(e),e.url=t,y(e)},p=function(t,e,n){return n=E.options(n),n.html=e,n.history=E.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,a;return t=E.options(t),n=E.option(E.pluckKey(t,"$link"),E.nullJQuery()),a=E.option(E.pluckKey(t,"url"),n.attr("up-href"),n.attr("href")),o=E.option(E.pluckKey(t,"html")),i=E.option(E.pluckKey(t,"target"),n.attr("up-modal"),"body"),t.flavor=E.option(t.flavor,n.attr("up-flavor"),u.flavor),t.position=E.option(t.position,n.attr("up-position"),f("position",t.flavor)),t.position=E.evalOption(t.position,{$link:n}),t.width=E.option(t.width,n.attr("up-width"),f("width",t.flavor)),t.maxWidth=E.option(t.maxWidth,n.attr("up-max-width"),f("maxWidth",t.flavor)),t.height=E.option(t.height,n.attr("up-height"),f("height")),t.animation=E.option(t.animation,n.attr("up-animation"),f("openAnimation",t.flavor)),t.animation=E.evalOption(t.animation,{position:t.position}),t.backdropAnimation=E.option(t.backdropAnimation,n.attr("up-backdrop-animation"),f("backdropOpenAnimation",t.flavor)),t.backdropAnimation=E.evalOption(t.backdropAnimation,{position:t.position}),t.sticky=E.option(t.sticky,E.castedAttr(n,"up-sticky"),f("sticky",t.flavor)),t.closable=E.option(t.closable,E.castedAttr(n,"up-closable"),f("closable",t.flavor)),t.confirm=E.option(t.confirm,n.attr("up-confirm")),t.method=up.link.followMethod(n,t),t.layer="modal",t.failTarget=E.option(t.failTarget,n.attr("up-fail-target")),t.failLayer=E.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=E.option(t.history,E.castedAttr(n,"up-history"),f("history",t.flavor)),up.browser.canPushState()||(t.history=!1),t.provideTarget=function(){return s(i,t)},t.preload?up.replace(i,a,t):up.browser.whenConfirmed(t).then(function(){return up.bus.whenEmitted("up:modal:open",{url:a,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=E.merge(t,{animation:!1}),u=o?up.extract(i,o,n):up.replace(i,a,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"})})})})},o=function(t){return r.asap(function(){return i(t)})},i=function(t){var n,r,o,i;return t=E.options(t),v()?(i=E.option(t.animation,f("closeAnimation")),i=E.evalOption(i,{position:S.position}),r=E.option(t.backdropAnimation,f("backdropCloseAnimation")),r=E.evalOption(r,{position:S.position}),n=up.motion.animateOptions(t,{duration:f("closeDuration"),easing:f("closeEasing")}),o=E.options(E.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 P(),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(){return S.sticky?void 0:(l(),o())},a=function(e){var n;return n=t(e),n.closest(".up-modal").length>0},c=function(t,e){return null==e&&(e={}),up.log.warn("up.modal.flavor() is deprecated. Use the up.modal.flavors property instead."),E.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]),E.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),o())}),up.on("up:fragment:inserted",function(t,e){var r;if(a(e)){if(r=e.attr("up-source"))return S.url=r}else if(t.origin&&a(t.origin)&&!up.popup.contains(e))return n()}),up.bus.onEscape(function(){return S.closable?o():void 0}),up.on("click",".up-modal [up-close]",function(t){return 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 E.isPresent(t.$link)?E.horizontalScreenHalf(t.$link):"left"}},up.on("up:history:restore",o),up.on("up:framework:reset",k),{visit:F,follow:m,extract:p,close:o,url:function(){return S.url},coveredUrl:function(){return S.coveredUrl},config:u,flavors:d,contains:a,isOpen:v,flavor:c}}(jQuery)}.call(this),function(){up.tooltip=function(t){var e,n,r,o,i,u,a,s,l,p,c,f;return f=up.util,a=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(),a.reset()},e=function(){var t,e,n;switch(t={},n=f.measure(c.$tooltip),f.isFixed(c.$anchor)?(e=c.$anchor.get(0).getBoundingClientRect(),t.position="fixed"):e=f.measure(c.$anchor),c.position){case"top":t.top=e.top-n.height,t.left=e.left+.5*(e.width-n.width);break;case"left":t.top=e.top+.5*(e.height-n.height),t.left=e.left-n.width;break;case"right":t.top=e.top+.5*(e.height-n.height),t.left=e.left+e.width;break;case"bottom":t.top=e.top+e.height,t.left=e.left+.5*(e.width-n.width);break;default:up.fail("Unknown position option '%s'",c.position)}return c.$tooltip.attr("up-position",c.position),c.$tooltip.css(t)},s=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"),a.position),u=f.option(r.animation,f.castedAttr(o,"up-animation"),a.openAnimation),i=up.motion.animateOptions(r,o,{duration:a.openDuration,easing:a.openEasing}),c.phase="opening",c.$anchor=o,s({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:a.closeAnimation}),e=up.motion.animateOptions(t,{duration:a.closeDuration,easing:a.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:a,attach:n,isOpen:l,close:i}}(jQuery)}.call(this),function(){var t=[].slice;up.feedback=function(e){var n,r,o,i,u,a,s,l,p,c,f,h,d;return h=up.util,o=h.config({currentClasses:["up-current"]}),l=function(){return o.reset()},i=function(){var t;return t=o.currentClasses,t=t.concat(["up-current"]),t=h.uniq(t),t.join(" ")},n="up-active",r="a, [up-href]",s=function(t){return h.isPresent(t)?h.normalizeUrl(t,{stripTrailingSlash:!0}):void 0},p=function(t){var e,n,r,o,i,u,a,l,p,c;for(l=[],u=["href","up-href","up-alias"],n=0,o=u.length;o>n;n++)if(e=u[n],p=h.presentAttr(t,e))for(c="up-alias"===e?p.split(" "):[p],r=0,i=c.length;i>r;r++)a=c[r],"#"!==a&&(a=s(a),l.push(a));return l},d=function(t){var e,n,r,o;return t=h.map(t,s),t=h.compact(t),r=function(t){return"*"===t.substr(-1)?n(t.slice(0,-1)):e(t)},e=function(e){return h.contains(t,e)},n=function(e){return h.detect(t,function(t){return 0===t.indexOf(e)})},o=function(t){return h.detect(t,r)},{matchesAny:o}},a=function(){var t,n;return t=d([up.browser.url(),up.modal.url(),up.modal.coveredUrl(),up.popup.url(),up.popup.coveredUrl()]),n=i(),h.each(e(r),function(r){var o,i;return o=e(r),i=p(o),up.link.isSafe(o)&&t.matchesAny(i)?o.addClass(n):o.hasClass(n)&&0===o.closest(".up-destroying").length?o.removeClass(n):void 0})},u=function(t){var n;return n=e(t),n.is(r)&&(n=h.presence(n.parent(r))||n),n},c=function(){var e,r,o,i,a,s;return o=1<=arguments.length?t.call(arguments,0):[],i=o.shift(),r=o.pop(),a=h.options(o[0]),e=u(i),a.preload||e.addClass(n),r?(s=r(),h.isPromise(s)?h.always(s,function(){return f(e)}):up.warn("Expected block to return a promise, but got %o",s),s):void 0},f=function(t){var e;return e=u(t),e.removeClass(n)},up.on("up:fragment:inserted",function(){return a()}),up.on("up:fragment:destroyed",function(t,e){return e.is(".up-modal, .up-popup")?a():void 0}),up.on("up:framework:reset",l),{config:o,start:c,stop:f}}(jQuery),up.renamedModule("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 r.multiSelector(t.hungry)},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;return e()&&up.link.isFollowable(t)?(i={},i[o]=t.attr(r),n.setMissingAttrs(t,i),t.removeAttr(r)):void 0})})}(jQuery)}.call(this),function(){up.boot()}.call(this);
@@ -711,7 +711,8 @@ up.util = (($) ->
711
711
  ###
712
712
  uniq = (array) ->
713
713
  return array if array.length < 2
714
- set = new Set(array)
714
+ set = new Set()
715
+ each array, (element) -> set.add(element)
715
716
  setToArray(set)
716
717
 
717
718
  ###*
@@ -4,6 +4,6 @@ module Unpoly
4
4
  # The current version of the unpoly-rails gem.
5
5
  # This version number is also used for releases of the Unpoly
6
6
  # frontend code.
7
- VERSION = '0.55.0'
7
+ VERSION = '0.55.1'
8
8
  end
9
9
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unpoly",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "description": "Unobtrusive JavaScript framework",
5
5
  "main": "dist/unpoly.js",
6
6
  "files": [
@@ -427,7 +427,8 @@ describe 'up.motion', ->
427
427
  $child = $('<div class="child"></div>').css(margin: '40px').appendTo($element)
428
428
  up.motion.prependCopy($element)
429
429
  $clonedChild = $('.up-ghost .child')
430
- expect($clonedChild.offset()).toEqual($child.offset())
430
+ expect($clonedChild.offset().top).toBeAround($child.offset().top, 0.5)
431
+ expect($clonedChild.offset().left).toBeAround($child.offset().left, 0.5)
431
432
 
432
433
  it 'correctly positions the ghost over an element within a scrolled body', ->
433
434
  $body = $('body')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unpoly-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.0
4
+ version: 0.55.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-05 00:00:00.000000000 Z
11
+ date: 2018-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails