-
Notifications
You must be signed in to change notification settings - Fork 10
/
checkout.min.js
8 lines (8 loc) · 239 KB
/
checkout.min.js
1
2
3
4
5
6
7
8
(function(e){function t(e,r){if("function"==typeof r)return t.load(e,r);if({}.hasOwnProperty.call(t.cache,e))return t.cache[e];var o=t.resolve(e);if(!o)throw new Error("Failed to resolve module "+e);var i={id:e,require:t,filename:e,exports:{},loaded:!1,parent:null,children:[]},a=e.slice(0,e.lastIndexOf("/")+1);return t.cache[e]=i.exports,o.call(i.exports,i,i.exports,a,e,n),i.loaded=!0,t.cache[e]=i.exports}var n={title:"browser",browser:!0,env:{},argv:[],nextTick:function(e){setTimeout(e,0)},cwd:function(){return"/"},chdir:function(){}};t.modules={},t.cache={},t.resolve=function(e){return{}.hasOwnProperty.call(t.modules,e)?t.modules[e]:void 0},t.define=function(e,n){t.modules[e]=n},e.require=t,t.define("crowdstart.js/lib/browser",function(n,r,o,i,a){var s,c;null==e.Crowdstart&&(e.Crowdstart={}),s=t("crowdstart.js/lib/api"),c=t("crowdstart.js/lib/client/xhr"),s.CLIENT=c,s.BLUEPRINTS=t("crowdstart.js/lib/blueprints/browser"),Crowdstart.Api=s,Crowdstart.Client=c,n.exports=Crowdstart}),t.define("crowdstart.js/lib/api",function(e,n,r,o,i){var a,s,c,l,u,d;u=t("crowdstart.js/lib/utils"),s=u.isFunction,c=u.isString,l=u.newError,d=u.statusOk,e.exports=a=function(){function e(t){var n,r,o,i,a,s,c;if(null==t&&(t={}),!(this instanceof e))return new e(t);i=t.endpoint,o=t.debug,s=t.key,r=t.client,n=t.blueprints,this.debug=o,null==n&&(n=this.constructor.BLUEPRINTS),r?this.client=r:this.client=new this.constructor.CLIENT({debug:o,endpoint:i,key:s});for(a in n)c=n[a],this.addBlueprints(a,c)}return e.BLUEPRINTS={},e.CLIENT=null,e.prototype.addBlueprints=function(e,t){var n,r,o;null==this[e]&&(this[e]={}),r=function(t){return function(n,r){var o;return s(r)?t[e][n]=function(){return r.apply(t,arguments)}:(null==r.expects&&(r.expects=d),null==r.method&&(r.method="POST"),o=function(e,n){return t.client.request(r,e).then(function(n){var o,i;if(null!=(null!=(o=n.data)?o.error:void 0))throw l(e,n);if(!r.expects(n))throw l(e,n);return null!=r.process&&r.process.call(t,n),null!=(i=n.data)?i:n.body}).callback(n)},t[e][n]=o)}}(this);for(o in t)n=t[o],r(o,n)},e.prototype.setKey=function(e){return this.client.setKey(e)},e.prototype.setUserKey=function(e){return this.client.setUserKey(e)},e.prototype.deleteUserKey=function(){return this.client.deleteUserKey()},e.prototype.setStore=function(e){return this.storeId=e,this.client.setStore(e)},e}()}),t.define("crowdstart.js/lib/utils",function(e,t,n,r,o){t.isFunction=function(e){return"function"==typeof e},t.isString=function(e){return"string"==typeof e},t.statusOk=function(e){return 200===e.status},t.statusCreated=function(e){return 201===e.status},t.statusNoContent=function(e){return 204===e.status},t.newError=function(e,t){var n,r,o,i,a,s,c;return null==t&&(t={}),r=null!=(o=null!=t&&null!=(i=t.data)&&null!=(a=i.error)?a.message:void 0)?o:"Request failed",n=new Error(r),n.message=r,n.req=e,n.data=t.data,n.responseText=t.data,n.status=t.status,n.type=null!=(s=t.data)&&null!=(c=s.error)?c.type:void 0,n},t.updateQuery=function(e,t,n){var r,o,i;return o=new RegExp("([?&])"+t+"=.*?(&|#|$)(.*)","gi"),o.test(e)?null!=n?e.replace(o,"$1"+t+"="+n+"$2$3"):(r=e.split("#"),e=r[0].replace(o,"$1$3").replace(/(&|\?)$/,""),null!=r[1]&&(e+="#"+r[1]),e):null!=n?(i=-1!==e.indexOf("?")?"&":"?",r=e.split("#"),e=r[0]+i+t+"="+n,null!=r[1]&&(e+="#"+r[1]),e):e}}),t.define("crowdstart.js/lib/client/xhr",function(e,n,r,o,i){var a,s,c,l,u,d,p;a=t("xhr-promise-es6/lib"),a.Promise=t("broken/lib"),c=t("js-cookie/src/js.cookie"),d=t("crowdstart.js/lib/utils"),l=d.isFunction,u=d.newError,p=d.updateQuery,e.exports=s=function(){function e(t){return null==t&&(t={}),this instanceof e?(this.key=t.key,this.debug=t.debug,t.endpoint&&this.setEndpoint(t.endpoint),void this.getUserKey()):new e(t)}return e.prototype.debug=!1,e.prototype.endpoint="https://api.crowdstart.com",e.prototype.sessionName="crwdst",e.prototype.setEndpoint=function(e){return this.endpoint=e.replace(/\/$/,"")},e.prototype.setStore=function(e){return this.storeId=e},e.prototype.setKey=function(e){return this.key=e},e.prototype.getKey=function(){return this.userKey||this.key||this.constructor.KEY},e.prototype.getUserKey=function(){var e;return null!=(e=c.getJSON(this.sessionName))&&null!=e.userKey&&(this.userKey=e.userKey),this.userKey},e.prototype.setUserKey=function(e){return c.set(this.sessionName,{userKey:e},{expires:6048e5}),this.userKey=e},e.prototype.deleteUserKey=function(){return c.set(this.sessionName,{userKey:null},{expires:6048e5}),this.userKey},e.prototype.getUrl=function(e,t,n){return l(e)&&(e=e.call(this,t)),p(this.endpoint+e,"token",n)},e.prototype.request=function(e,t,n){var r;return null==n&&(n=this.getKey()),r={url:this.getUrl(e.url,t,n),method:e.method,data:JSON.stringify(t)},this.debug&&(console.log("--REQUEST--"),console.log(r)),(new a).send(r).then(function(e){return this.debug&&(console.log("--RESPONSE--"),console.log(e)),e.data=e.responseText,e})["catch"](function(e){var n,r,o;try{e.data=null!=(o=e.responseText)?o:JSON.parse(e.xhr.responseText)}catch(r){n=r}throw n=u(t,e),this.debug&&(console.log("--RESPONSE--"),console.log(e),console.log("ERROR:",n)),n})},e}()}),t.define("xhr-promise-es6/lib",function(n,r,o,i,a){var s,c,l;s=t("parse-headers/parse-headers"),l=t("object-assign"),n.exports=c=function(){function t(){}return t.DEFAULT_CONTENT_TYPE="application/x-www-form-urlencoded; charset=UTF-8",t.Promise=e.Promise,t.prototype.send=function(e){var t;return null==e&&(e={}),t={method:"GET",data:null,headers:{},async:!0,username:null,password:null},e=l({},t,e),new this.constructor.Promise(function(t){return function(n,r){var o,i,a,s,c;if(!XMLHttpRequest)return void t._handleError("browser",r,null,"browser doesn't support XMLHttpRequest");if("string"!=typeof e.url||0===e.url.length)return void t._handleError("url",r,null,"URL is a required parameter");t._xhr=c=new XMLHttpRequest,c.onload=function(){var e;t._detachWindowUnload();try{e=t._getResponseText()}catch(o){return void t._handleError("parse",r,null,"invalid JSON response")}return n({url:t._getResponseUrl(),status:c.status,statusText:c.statusText,responseText:e,headers:t._getHeaders(),xhr:c})},c.onerror=function(){return t._handleError("error",r)},c.ontimeout=function(){return t._handleError("timeout",r)},c.onabort=function(){return t._handleError("abort",r)},t._attachWindowUnload(),c.open(e.method,e.url,e.async,e.username,e.password),null==e.data||e.headers["Content-Type"]||(e.headers["Content-Type"]=t.constructor.DEFAULT_CONTENT_TYPE),a=e.headers;for(i in a)s=a[i],c.setRequestHeader(i,s);try{return c.send(e.data)}catch(l){return o=l,t._handleError("send",r,null,o.toString())}}}(this))},t.prototype.getXHR=function(){return this._xhr},t.prototype._attachWindowUnload=function(){return this._unloadHandler=this._handleWindowUnload.bind(this),window.attachEvent?window.attachEvent("onunload",this._unloadHandler):void 0},t.prototype._detachWindowUnload=function(){return window.detachEvent?window.detachEvent("onunload",this._unloadHandler):void 0},t.prototype._getHeaders=function(){return s(this._xhr.getAllResponseHeaders())},t.prototype._getResponseText=function(){var e;switch(e="string"==typeof this._xhr.responseText?this._xhr.responseText:"",this._xhr.getResponseHeader("Content-Type")){case"application/json":case"text/javascript":e=JSON.parse(e+"")}return e},t.prototype._getResponseUrl=function(){return null!=this._xhr.responseURL?this._xhr.responseURL:/^X-Request-URL:/m.test(this._xhr.getAllResponseHeaders())?this._xhr.getResponseHeader("X-Request-URL"):""},t.prototype._handleError=function(e,t,n,r){return this._detachWindowUnload(),t({reason:e,status:n||this._xhr.status,statusText:r||this._xhr.statusText,xhr:this._xhr})},t.prototype._handleWindowUnload=function(){return this._xhr.abort()},t}()}),t.define("parse-headers/parse-headers",function(e,n,r,o,i){var a=t("trim"),s=t("for-each"),c=function(e){return"[object Array]"===Object.prototype.toString.call(e)};e.exports=function(e){if(!e)return{};var t={};return s(a(e).split("\n"),function(e){var n=e.indexOf(":"),r=a(e.slice(0,n)).toLowerCase(),o=a(e.slice(n+1));"undefined"==typeof t[r]?t[r]=o:c(t[r])?t[r].push(o):t[r]=[t[r],o]}),t}}),t.define("trim",function(e,t,n,r,o){function i(e){return e.replace(/^\s*|\s*$/g,"")}t=e.exports=i,t.left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}}),t.define("for-each",function(e,n,r,o,i){function a(e,t,n){if(!u(t))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===d.call(e)?s(e,t,n):"string"==typeof e?c(e,t,n):l(e,t,n)}function s(e,t,n){for(var r=0,o=e.length;o>r;r++)p.call(e,r)&&t.call(n,e[r],r,e)}function c(e,t,n){for(var r=0,o=e.length;o>r;r++)t.call(n,e.charAt(r),r,e)}function l(e,t,n){for(var r in e)p.call(e,r)&&t.call(n,e[r],r,e)}var u=t("is-function");e.exports=a;var d=Object.prototype.toString,p=Object.prototype.hasOwnProperty}),t.define("is-function",function(e,t,n,r,o){function i(e){var t=a.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}e.exports=i;var a=Object.prototype.toString}),t.define("object-assign",function(e,t,n,r,o){"use strict";function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=Object.assign||function(e,t){for(var n,r,o=i(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)a.call(n,l)&&(o[l]=n[l]);if(Object.getOwnPropertySymbols){r=Object.getOwnPropertySymbols(n);for(var u=0;u<r.length;u++)s.call(n,r[u])&&(o[r[u]]=n[r[u]])}}return o}}),t.define("broken/lib",function(e,n,r,o,i){var a,s;a=t("zousan/zousan-min"),a.suppressUncaughtRejectionError=!0,s=function(){function e(e){this.state=e.state,this.value=e.value,this.reason=e.reason}return e.prototype.isFulfilled=function(){return"fulfilled"===this.state},e.prototype.isRejected=function(){return"rejected"===this.state},e}(),a.reflect=function(e){return new a(function(t,n){return e.then(function(e){return t(new s({state:"fulfilled",value:e}))})["catch"](function(e){return t(new s({state:"rejected",reason:e}))})})},a.settle=function(e){return a.all(e.map(a.reflect))},a.prototype.callback=function(e){return"function"==typeof e&&(this.then(function(t){return e(null,t)}),this["catch"](function(t){return e(t,null)})),this},e.exports=a}),t.define("zousan/zousan-min",function(t,n,r,o,i){!function(e){"use strict";function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(a,t);e.p.resolve(n)}catch(r){e.p.reject(r)}else e.p.resolve(t)}function o(e,t){if("function"==typeof e.n)try{var n=e.n.call(a,t);e.p.resolve(n)}catch(r){e.p.reject(r)}else e.p.reject(t)}var i,a,s="fulfilled",c="rejected",l="undefined",u=function(){function e(){for(;t.length-n;)t[n](),n++,n>1024&&(t.splice(0,n),n=0)}var t=[],n=0,r=function(){if(typeof MutationObserver!==l){var t=document.createElement("div"),n=new MutationObserver(e);return n.observe(t,{attributes:!0}),function(){t.setAttribute("a",0)}}return typeof setImmediate!==l?function(){setImmediate(e)}:function(){setTimeout(e,0)}}();return function(e){t.push(e),t.length-n==1&&r()}}();n.prototype={resolve:function(e){if(this.state===i){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=!0,o=e.then;if("function"==typeof o)return void o.call(e,function(e){n&&(n=!1,t.resolve(e))},function(e){n&&(n=!1,t.reject(e))})}catch(a){return void(n&&this.reject(a))}this.state=s,this.v=e,t.c&&u(function(){for(var n=0,o=t.c.length;o>n;n++)r(t.c[n],e)})}},reject:function(e){if(this.state===i){this.state=c,this.v=e;var t=this.c;t?u(function(){for(var n=0,r=t.length;r>n;n++)o(t[n],e)}):n.suppressUncaughtRejectionError||console.log("You upset Zousan. Please catch rejections: ",e,e.stack)}},then:function(e,t){var a=new n,c={y:e,n:t,p:a};if(this.state===i)this.c?this.c.push(c):this.c=[c];else{var l=this.state,d=this.v;u(function(){l===s?r(c,d):o(c,d)})}return a},"catch":function(e){return this.then(null,e)},"finally":function(e){return this.then(e,e)},timeout:function(e,t){t=t||"Timeout";var r=this;return new n(function(n,o){setTimeout(function(){o(Error(t))},e),r.then(function(e){n(e)},function(e){o(e)})})}},n.resolve=function(e){var t=new n;return t.resolve(e),t},n.reject=function(e){var t=new n;return t.reject(e),t},n.all=function(e){function t(t,a){"function"!=typeof t.then&&(t=n.resolve(t)),t.then(function(t){r[a]=t,o++,o==e.length&&i.resolve(r)},function(e){i.reject(e)})}for(var r=[],o=0,i=new n,a=0;a<e.length;a++)t(e[a],a);return e.length||i.resolve(r),i},typeof t!=l&&t.exports&&(t.exports=n),e.Zousan=n,n.soon=u}("undefined"!=typeof e?e:this)}),t.define("js-cookie/src/js.cookie",function(e,t,n,r,o){!function(n){if("function"==typeof define&&define.amd)define(n);else if("object"==typeof t)e.exports=n();else{var r=window.Cookies,o=window.Cookies=n();o.noConflict=function(){return window.Cookies=r,o}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(n){function r(t,o,i){var a;if(arguments.length>1){if(i=e({path:"/"},r.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}try{a=JSON.stringify(o),/^[\{\[]/.test(a)&&(o=a)}catch(c){}return o=encodeURIComponent(String(o)),o=o.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),document.cookie=[t,"=",o,i.expires&&"; expires="+i.expires.toUTCString(),i.path&&"; path="+i.path,i.domain&&"; domain="+i.domain,i.secure?"; secure":""].join("")}t||(a={});for(var l=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,d=0;d<l.length;d++){var p=l[d].split("="),f=p[0].replace(u,decodeURIComponent),h=p.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{if(h=n&&n(h,f)||h.replace(u,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(c){}if(t===f){a=h;break}t||(a[f]=h)}catch(c){}}return a}return r.get=r.set=r,r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}return t()})}),t.define("crowdstart.js/lib/blueprints/browser",function(e,n,r,o,i){var a,s,c,l,u,d,p,f,h,m,g,v,y,b,w,x;for(m=t("crowdstart.js/lib/utils"),d=m.isFunction,v=m.statusCreated,y=m.statusNoContent,b=m.statusOk,g=t("crowdstart.js/lib/blueprints/url"),s=g.byId,w=g.storePrefixed,c=function(e){var t;return t="/"+e,{list:{url:t,method:"GET",expects:b},get:{url:s(e),method:"GET",expects:b}}},a={account:{get:{url:"/account",method:"GET",expects:b},update:{url:"/account",method:"PATCH",expects:b},exists:{url:function(e){var t,n,r;return"/account/exists/"+(null!=(t=null!=(n=null!=(r=e.email)?r:e.username)?n:e.id)?t:e)},method:"GET",expects:b,process:function(e){return e.data.exists}},create:{url:"/account/create",method:"POST",expects:v},enable:{url:function(e){var t;return"/account/enable/"+(null!=(t=e.tokenId)?t:e)},method:"POST",expects:b},login:{url:"/account/login",method:"POST",expects:b,process:function(e){return this.setUserKey(e.data.token),e}},logout:function(){return this.deleteUserKey()},reset:{url:"/account/reset",method:"POST",expects:b},confirm:{url:function(e){var t;return"/account/confirm/"+(null!=(t=e.tokenId)?t:e)},method:"POST",expects:b}},checkout:{authorize:{url:w("/checkout/authorize"),method:"POST",expects:b},capture:{url:w(function(e){var t;return"/checkout/capture/"+(null!=(t=e.orderId)?t:e)}),method:"POST",expects:b},charge:{url:w("/checkout/charge"),method:"POST",expects:b},paypal:{url:w("/checkout/paypal"),method:"POST",expects:b}},referrer:{create:{url:"/referrer",method:"POST",expects:v}}},h=["collection","coupon","product","variant"],x=["order","subscription"],l=function(e){return a[e]=c(e)},u=0,p=h.length;p>u;u++)f=h[u],l(f);e.exports=a}),t.define("crowdstart.js/lib/blueprints/url",function(e,n,r,o,i){var a,s;a=t("crowdstart.js/lib/utils").isFunction,n.storePrefixed=s=function(e){return function(t){var n;return n=a(e)?e(t):e,null!=this.storeId?"/store/"+this.storeId+n:n}},n.byId=function(e){switch(e){case"coupon":return s(function(e){var t;return"/coupon/"+(null!=(t=e.code)?t:e)});case"collection":return s(function(e){var t;return"/collection/"+(null!=(t=e.slug)?t:e)});case"product":return s(function(e){var t,n;return"/product/"+(null!=(t=null!=(n=e.id)?n:e.slug)?t:e)});case"variant":return s(function(e){var t,n;return"/variant/"+(null!=(t=null!=(n=e.id)?n:e.sku)?t:e)});default:return function(t){var n;return"/"+e+"/"+(null!=(n=t.id)?n:t)}}}}),t.define("crowdcontrol/lib",function(e,n,r,o,i){e.exports={config:t("crowdcontrol/lib/config"),utils:t("crowdcontrol/lib/utils"),view:t("crowdcontrol/lib/view"),start:function(e){return t("riot/riot").mount("*")},Events:t("crowdcontrol/lib/events")},"undefined"!=typeof window&&null!==window&&(window.crowdcontrol=e.exports)}),t.define("crowdcontrol/lib/config",function(e,t,n,r,o){e.exports={}}),t.define("crowdcontrol/lib/utils",function(e,n,r,o,i){e.exports={log:t("crowdcontrol/lib/utils/log"),mediator:t("crowdcontrol/lib/utils/mediator")}}),t.define("crowdcontrol/lib/utils/log",function(e,t,n,r,o){var i;i=function(){return i.DEBUG?console.log.apply(console,arguments):void 0},i.DEBUG=!1,i.debug=i,i.info=function(){return console.log.apply(console,arguments)},i.warn=function(){return console.log("WARN:"),console.log.apply(console,arguments)},i.error=function(){throw console.log("ERROR:"),console.log.apply(console,arguments),new arguments[0]},e.exports=i}),t.define("crowdcontrol/lib/utils/mediator",function(e,n,r,o,i){var a;a=t("riot/riot"),e.exports=a.observable({})}),t.define("riot/riot",function(e,t,n,r,o){!function(n,r){"use strict";function o(e){var t=K(0),n=e.trim().slice(t.length).match(/^\s*(\S+?)\s*(?:,\s*(\S+))?\s+in\s+(.+)$/);return n?{key:n[1],pos:n[2],val:t+n[3]}:{val:e}}function i(e,t,n){var r={};return r[e.key]=t,e.pos&&(r[e.pos]=n),r}function a(e,t,n){m(e,"each");var r,a=b(e),s=e.outerHTML,c=!!Z[a],u=Z[a]||{tmpl:s},d=e.parentNode,p=document.createComment("riot placeholder"),f=[],h=g(e);d.insertBefore(p,e),n=o(n),t.one("premount",function(){d.stub&&(d=t.root),e.parentNode.removeChild(e)}).on("update",function(){var o=G(n.val,t);V(o)||(r=o?JSON.stringify(o):"",o=o?Object.keys(o).map(function(e){return i(n,e,o[e])}):[]);for(var s=document.createDocumentFragment(),m=f.length,g=o.length;m>g;)f[--m].unmount(),f.splice(m,1);for(m=0;g>m;++m){var v=!r&&n.key?i(n,o[m],m):o[m];f[m]?f[m].update(v):((f[m]=new l(u,{parent:t,isLoop:!0,hasImpl:c,root:U.test(a)?d:e.cloneNode(),item:v},e.innerHTML)).mount(),s.appendChild(f[m].root)),f[m]._item=v}d.insertBefore(s,p),h&&(t.tags[a]=f)}).one("updated",function(){var e=Object.keys(t);j(d,function(n){1!=n.nodeType||n.isLoop||n._looped||(n._visited=!1,n._looped=!0,T(n,t,e))})})}function s(e,t,n){j(e,function(e){if(1==e.nodeType){e.isLoop=e.isLoop||e.parentNode&&e.parentNode.isLoop||e.getAttribute("each")?1:0;var r=g(e);r&&!e.isLoop&&n.push(v(r,e,t)),e.isLoop||T(e,t,[])}})}function c(e,t,n){function r(e,t,r){if(t.indexOf(K(0))>=0){var o={dom:e,expr:t};n.push(w(o,r))}}j(e,function(e){var n=e.nodeType;if(3==n&&"STYLE"!=e.parentNode.tagName&&r(e,e.nodeValue),1==n){var o=e.getAttribute("each");return o?(a(e,t,o),!1):(f(e.attributes,function(t){var n=t.name,o=n.split("__")[1];return r(e,t.value,{attr:o||n,bool:o}),o?(m(e,n),!1):void 0}),g(e)?!1:void 0)}})}function l(e,t,n){function o(){var e=b&&v?u:g||u;f(S.attributes,function(t){d[t.name]=G(t.value,e)}),f(Object.keys(q),function(t){d[t]=G(q[t],e)})}function i(e){for(var t in j)typeof u[t]!==M&&(u[t]=e[t])}function a(){u.parent&&v&&f(Object.keys(u.parent),function(e){var t=!~H.indexOf(e)&&~I.indexOf(e);(typeof u[e]===M||t)&&(t||I.push(e),u[e]=u.parent[e])})}function l(e){if(f($,function(t){t[e?"mount":"unmount"]()}),g){var t=e?"on":"off";v?g[t]("unmount",u.unmount):g[t]("update",u.update)[t]("unmount",u.unmount)}}var u=L.observable(this),d=A(t.opts)||{},m=W(e.tmpl),g=t.parent,v=t.isLoop,b=t.hasImpl,j=x(t.item),C=[],$=[],S=t.root,T=e.fn,O=S.tagName.toLowerCase(),q={},I=[];T&&S._tag&&S._tag.unmount(!0),this.isMounted=!1,S.isLoop=v,S._tag=this,this._id=P++,w(this,{parent:g,root:S,opts:d,tags:{}},j),f(S.attributes,function(e){var t=e.value;K(/{.*}/).test(t)&&(q[e.name]=t)}),m.innerHTML&&!/^(select|optgroup|table|tbody|tr|col(?:group)?)$/.test(O)&&(m.innerHTML=E(m.innerHTML,n)),this.update=function(e){e=x(e),a(),e&&typeof j===N&&(i(e),j=e),w(u,e),o(),u.trigger("update",e),p(C,u),u.trigger("updated")},this.mixin=function(){f(arguments,function(e){e=typeof e===R?L.mixin(e):e,f(Object.keys(e),function(t){"init"!=t&&(u[t]=h(e[t])?e[t].bind(u):e[t])}),e.init&&e.init.bind(u)()})},this.mount=function(){if(o(),T&&T.call(u,d),c(m,u,C),l(!0),(e.attrs||b)&&(_(e.attrs,function(e,t){S.setAttribute(e,t)}),c(u.root,u,C)),(!u.parent||v)&&u.update(j),u.trigger("premount"),v&&!b)u.root=S=m.firstChild;else{for(;m.firstChild;)S.appendChild(m.firstChild);S.stub&&(u.root=S=g.root)}!u.parent||u.parent.isMounted?(u.isMounted=!0,u.trigger("mount")):u.parent.one("mount",function(){k(u.root)||(u.parent.isMounted=u.isMounted=!0,u.trigger("mount"))})},this.unmount=function(e){var t,n=S,o=n.parentNode;if(o){if(g)t=y(g),V(t.tags[O])?f(t.tags[O],function(e,n){e._id==u._id&&t.tags[O].splice(n,1)}):t.tags[O]=r;else for(;n.firstChild;)n.removeChild(n.firstChild);e?o.removeAttribute("riot-tag"):o.removeChild(n)}u.trigger("unmount"),l(),u.off("*"),S._tag=null},s(m,this,$)}function u(e,t,r,o){r[e]=function(e){var i,a=o._item,s=o.parent;if(!a)for(;s&&!a;)a=s._item,s=s.parent;e=e||n.event;try{e.currentTarget=r,e.target||(e.target=e.srcElement),e.which||(e.which=e.charCode||e.keyCode)}catch(c){}e.item=a,t.call(o,e)===!0||/radio|check/.test(r.type)||(e.preventDefault&&e.preventDefault(),e.returnValue=!1),e.preventUpdate||(i=a?y(s):o,i.update())}}function d(e,t,n){e&&(e.insertBefore(n,t),e.removeChild(t))}function p(e,t){f(e,function(e,n){var r=e.dom,o=e.attr,i=G(e.expr,t),a=e.dom.parentNode;if(e.bool?i=i?o:!1:null==i&&(i=""),a&&"TEXTAREA"==a.tagName&&(i=(""+i).replace(/riot-/g,"")),e.value!==i){if(e.value=i,!o)return void(r.nodeValue=""+i);if(m(r,o),h(i))u(o,i,r,t);else if("if"==o){var s=e.stub,c=function(){d(s.parentNode,s,r)},l=function(){d(r.parentNode,r,s)};i?s&&(c(),r.inStub=!1,k(r)||j(r,function(e){e._tag&&!e._tag.isMounted&&(e._tag.isMounted=!!e._tag.trigger("mount"))})):(s=e.stub=s||document.createTextNode(""),r.parentNode?l():(t.parent||t).one("updated",l),r.inStub=!0)}else if(/^(show|hide)$/.test(o))"hide"==o&&(i=!i),r.style.display=i?"":"none";else if("value"==o)r.value=i;else if(O(o,D)&&o!=F)i&&r.setAttribute(o.slice(D.length),i);else{if(e.bool&&(r[o]=i,!i))return;typeof i!==N&&r.setAttribute(o,i)}}})}function f(e,t){for(var n,r=0,o=(e||[]).length;o>r;r++)n=e[r],null!=n&&t(n,r)===!1&&r--;return e}function h(e){return typeof e===z||!1}function m(e,t){e.removeAttribute(t)}function g(e){return e.tagName&&Z[e.getAttribute(F)||e.tagName.toLowerCase()]}function v(e,t,n){var r,o=new l(e,{root:t,parent:n},t.innerHTML),i=b(t),a=y(n);return o.parent=a,r=a.tags[i],r?(V(r)||(a.tags[i]=[r]),~a.tags[i].indexOf(o)||a.tags[i].push(o)):a.tags[i]=o,t.innerHTML="",o}function y(e){for(var t=e;!g(t.root)&&t.parent;)t=t.parent;return t}function b(e){var t=g(e),n=e.getAttribute("name"),r=n&&n.indexOf(K(0))<0?n:t?t.name:e.tagName.toLowerCase();return r}function w(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var o in t)e[o]=t[o];return e}function x(e){if(!(e instanceof l||e&&typeof e.trigger==z))return e;var t={};for(var n in e)~H.indexOf(n)||(t[n]=e[n]);return t}function j(e,t){if(e){if(t(e)===!1)return;for(e=e.firstChild;e;)j(e,t),e=e.nextSibling}}function _(e,t){for(var n,r=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g;n=r.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function k(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function C(e){return document.createElement(e)}function E(e,t){return e.replace(/<(yield)\/?>(<\/\1>)?/gi,t||"")}function $(e,t){return(t||document).querySelectorAll(e)}function S(e,t){return(t||document).querySelector(e)}function A(e){function t(){}return t.prototype=e,new t}function T(e,t,n){if(!e._visited){var r,o=e.getAttribute("id")||e.getAttribute("name");o&&(n.indexOf(o)<0&&(r=t[o],r?V(r)?r.push(e):t[o]=[r,e]:t[o]=e),e._visited=!0)}}function O(e,t){return e.slice(0,t.length)===t}function q(e){if(!L.render){Y||(Y=C("style"),Y.setAttribute("type","text/css"));var t=document.head||document.getElementsByTagName("head")[0];if(Y.styleSheet?Y.styleSheet.cssText+=e:Y.innerHTML+=e,!Y._rendered)if(Y.styleSheet)document.body.appendChild(Y);else{var n=S("style[type=riot]");n?(n.parentNode.insertBefore(Y,n),n.parentNode.removeChild(n)):t.appendChild(Y)}Y._rendered=!0}}function I(e,t,n){var r=Z[t],o=e._innerHTML=e._innerHTML||e.innerHTML;return e.innerHTML="",r&&e&&(r=new l(r,{root:e,opts:n},o)),r&&r.mount?(r.mount(),X.push(r),r.on("unmount",function(){X.splice(X.indexOf(r),1)})):void 0}var L={version:"v2.2.4",settings:{}},P=0,D="riot-",F=D+"tag",R="string",N="object",M="undefined",z="function",U=/^(?:opt(ion|group)|tbody|col|t[rhd])$/,H=["_item","_id","update","root","mount","unmount","mixin","isMounted","isLoop","tags","parent","opts","trigger","on","off","one"],B=0|(n&&n.document||{}).documentMode,V=Array.isArray;L.observable=function(e){e=e||{};var t={},n=0;return e.on=function(r,o){return h(o)&&(typeof o.id===M&&(o._id=n++),r.replace(/\S+/g,function(e,n){(t[e]=t[e]||[]).push(o),o.typed=n>0})),e},e.off=function(n,r){return"*"==n?t={}:n.replace(/\S+/g,function(e){if(r)for(var n,o=t[e],i=0;n=o&&o[i];++i)n._id==r._id&&o.splice(i--,1);else t[e]=[]}),e},e.one=function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},e.trigger=function(n){for(var r,o=[].slice.call(arguments,1),i=t[n]||[],a=0;r=i[a];++a)r.busy||(r.busy=1,r.apply(e,r.typed?[n].concat(o):o),i[a]!==r&&a--,r.busy=0);return t.all&&"all"!=n&&e.trigger.apply(e,["all",n].concat(o)),e},e},L.mixin=function(){var e={};return function(t,n){return n?void(e[t]=n):e[t]}}(),function(e,t,n){function r(){return s.href.split("#")[1]||""}function o(e){return e.split("/")}function i(e){e.type&&(e=r()),e!=a&&(c.trigger.apply(null,["H"].concat(o(e))),a=e)}if(n){var a,s=n.location,c=e.observable(),l=!1,u=e.route=function(e){e[0]?(s.hash=e,i(e)):c.on("H",e)};u.exec=function(e){e.apply(null,o(r()))},u.parser=function(e){o=e},u.stop=function(){l&&(n.removeEventListener?n.removeEventListener(t,i,!1):n.detachEvent("on"+t,i),c.off("*"),l=!1)},u.start=function(){l||(n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent("on"+t,i),l=!0)},u.start()}}(L,"hashchange",n);var Y,K=function(e){var t,n,r,o=/[{}]/g;return function(i){var a=L.settings.brackets||e;return t!==a&&(t=a,r=a.split(" "),n=r.map(function(e){return e.replace(/(?=.)/g,"\\")})),i instanceof RegExp?a===e?i:new RegExp(i.source.replace(o,function(e){return n[~~("}"===e)]}),i.global?"g":""):r[i]}}("{ }"),G=function(){function e(e,n){return e.indexOf(K(0))<0?(e=e.replace(/\n|\r\n?/g,"\n"),function(){return e}):(e=e.replace(K(/\\{/g),"").replace(K(/\\}/g),""),n=o(e,i(e,K(/{/),K(/}/))),e=2!==n.length||n[0]?"["+n.map(function(e,n){return n%2?t(e,!0):'"'+e.replace(/\n|\r\n?/g,"\\n").replace(/"/g,'\\"')+'"'}).join(",")+'].join("")':t(n[1]),new Function("d","return "+e.replace(/\uFFF0/g,K(0)).replace(/\uFFF1/g,K(1))+";"))}function t(e,t){return e=e.replace(/\n|\r\n?/g," ").replace(K(/^[{ ]+|[ }]+$|\/\*.+?\*\//g),""),/^\s*[\w- "']+ *:/.test(e)?"["+i(e,/["' ]*[\w- ]+["' ]*:/,/,(?=["' ]*[\w- ]+["' ]*:)|}|$/).map(function(e){return e.replace(/^[ "']*(.+?)[ "']*: *(.+?),? *$/,function(e,t,n){return n.replace(/[^&|=!><]+/g,r)+'?"'+t+'":"",'})}).join("")+'].join(" ").trim()':r(e,t)}function r(e,t){return e=e.trim(),e?"(function(v){try{v="+e.replace(c,function(e,t,n){return n?'(("'+n+s+n+")":e})+"}catch(e){}return "+(t===!0?'!v&&v!==0?"":v':"v")+"}).call(d)":""}function o(e,t){var n=[];return t.map(function(t,r){r=e.indexOf(t),n.push(e.slice(0,r),t),e=e.slice(r+t.length)}),e&&n.push(e),n}function i(e,t,n){var r,o=0,i=[],a=new RegExp("("+t.source+")|("+n.source+")","g");return e.replace(a,function(t,n,a,s){!o&&n&&(r=s),o+=n?1:-1,o||null==a||i.push(e.slice(r,s+a.length))}),i}var a={},s='"in d?d:'+(n?"window).":"global)."),c=/(['"\/])(?:[^\\]*?|\\.|.)*?\1|\.\w*|\w*:|\b(?:(?:new|typeof|in|instanceof) |(?:this|true|false|null|undefined)\b|function\s*\()|([A-Za-z_$]\w*)/g;return function(t,n){return t&&(a[t]||(a[t]=e(t)))(n)}}(),W=function(e){function t(t){var i=t&&t.match(/^\s*<([-\w]+)/),a=i&&i[1].toLowerCase(),s=r[a]||o,c=C(s);return c.stub=!0,e&&a&&(i=a.match(U))?n(c,t,a,!!i[1]):c.innerHTML=t,c}function n(e,t,n,r){var i,a=C(o),s=r?"select>":"table>";a.innerHTML="<"+s+t+"</"+s,i=a.getElementsByTagName(n)[0],i&&e.appendChild(i)}var r={tr:"tbody",th:"tr",td:"tr",tbody:"table",col:"colgroup"},o="div";return e=e&&10>e,t}(B),X=[],Z={};L.tag=function(e,t,n,r,o){return h(r)&&(o=r,/^[\w\-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(h(n)?o=n:q(n)),Z[e]={name:e,tmpl:t,attrs:r,fn:o},e},L.mount=function(e,t,n){function r(e){var t="";return f(e,function(e){t+=", *["+F+'="'+e.trim()+'"]'}),t}function o(){var e=Object.keys(Z);return e+r(e)}function i(e){var r;if(e.tagName){!t||(r=e.getAttribute(F))&&r==t||e.setAttribute(F,t);var o=I(e,t||e.getAttribute(F)||e.tagName.toLowerCase(),n);o&&c.push(o)}else e.length&&f(e,i)}var a,s,c=[];if(typeof t===N&&(n=t,t=0),typeof e===R?("*"===e?e=s=o():e+=r(e.split(",")),a=$(e)):a=e,"*"===t){if(t=s||o(),a.tagName)a=$(t,a);else{var l=[];f(a,function(e){l.push($(t,e))}),a=l}t=0}return a.tagName?i(a):f(a,i),c},L.update=function(){return f(X,function(e){e.update()})},L.mountTo=L.mount,L.util={brackets:K,tmpl:G},typeof t===N?e.exports=L:"function"==typeof define&&define.amd?define(function(){return n.riot=L}):n.riot=L}("undefined"!=typeof window?window:void 0)}),t.define("crowdcontrol/lib/view",function(e,n,r,o,i){e.exports={form:t("crowdcontrol/lib/view/form"),View:t("crowdcontrol/lib/view/view")}}),t.define("crowdcontrol/lib/view/form",function(e,n,r,o,i){var a,s,c,l,u,d,p,f,h,m,g,v,y,b,w,x,j,_,k=function(e,t){function n(){this.constructor=e}for(var r in t)C.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},C={}.hasOwnProperty;p=t("broken/lib"),g=t("is-array"),v=t("is-function"),y=t("is-number"),b=t("is-object"),x=t("riot/riot"),a=t("crowdcontrol/lib/events"),h=t("crowdcontrol/lib/view/view"),w=t("crowdcontrol/lib/utils/log"),j=function(e){var t,n,r,o,i,a,s,c;for(s=e.split(" "),t={},n=0,o=s.length;o>n;n++)a=s[n],a.indexOf(":")>=0?(i=a.split(":"),r=i[0],c=i[1],t[r]=c):t[a]=!0;return t},u=function(){function e(e,t,n,r){this.name=e,this["default"]=null!=t?t:"",this.placeholder=null!=n?n:"",null==r&&(r=""),this.hints=j(r)}return e.prototype.name="",e.prototype["default"]="",e.prototype.placeholder="",e.prototype.hints=null,e}(),c=function(){function e(e,t,n){this.tag=e,this.model=t,this.validator=n}return e.prototype.tag="",e.prototype.model={},e.prototype.validator=function(){},e.prototype.obs=null,e}(),f=function(){function e(e,t){this.predicate=e,this.validatorFn=t}return e}(),l=function(){function e(e,t){this.predicate=e,this.tagName=t}return e}(),m={tagLookup:[],validatorLookup:[],defaultTagName:"form-input",errorTag:"form-error",registerValidator:function(e,t){return v(t)?this.validatorLookup.push(new f(e,t)):void 0},registerTag:function(e,t){return this.tagLookup.push(new l(e,t))},deleteTag:function(e){var t,n,r,o,i,a;for(i=this.tagLookup,a=[],t=n=0,r=i.length;r>n;t=++n)o=i[t],o.tagName===e?a.push(this.tagLookup[t]=null):a.push(void 0);
return a},deleteValidator:function(e,t){var n,r,o,i,a,s;for(a=this.validatorLookup,s=[],n=r=0,o=a.length;o>r;n=++r)i=a[n],i.validatorFn===t?s.push(this.validatorLookup[n]=null):s.push(void 0);return s},render:function(e){var t,n,r,o,i,a,s;for(o={},t=function(e){return function(t,n){var r,i,a,s,l,u,d,f,h,m,g,v;for(f=e.validatorLookup,i=0,a=f.length;a>i;i++)l=f[i],l.predicate(n)&&(v=l.validatorFn,function(e){return t.push(function(t){var r,o,i;return r=t[0],o=t[1],i=new p(function(e,n){return e(t)}),i.then(function(t){return e.call(n,t[0],t[1])}).then(function(e){return r[o]=e,new p(function(e,n){return e(t)})})})}(v));for(t.push(function(e){var t,n;return t=e[0],n=e[1],new p(function(e,r){return e(t[n])})}),g=function(e,n){var r,o,i;for(i=new p(function(t,r){return t([e,n])}),o=0,r=t.length;r>o;o++)v=t[o],i=i.then(v);return i},r=!1,h=e.tagLookup,u=0,s=h.length;s>u;u++)if(l=h[u],null!=l&&l.predicate(n)){m=l.tagName,r=!0;break}return r||(m=e.defaultTagName),d={name:n.name,value:n["default"],placeholder:n.placeholder,cfg:n},o[n.name]=new c(m,d,g)}}(this),n=i=0,a=e.length;a>i;n=++i)r=e[n],null!=r&&(s=[],t(s,r));return o}},a.Input={Result:"input-result",Get:"input-get",Set:"input-set",Change:"input-change",Error:"input-error",ClearError:"input-clear-error"},d=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}var n;return k(t,e),t.prototype.getValue=function(e){return e.value},t.prototype.errorHtml='<div class="error-container" if="{ hasError() }">\n <div class="error-message">{ error }</div>\n</div>',t.prototype.init=function(){return this.html+=this.errorHtml},t.prototype.events=(n={},n[""+a.Input.Set]=function(){return this._set.apply(this,arguments)},n[""+a.Input.Error]=function(){return this._error.apply(this,arguments)},n[""+a.Input.ClearError]=function(){return this._clearError.apply(this,arguments)},n),t.prototype._clearError=function(e){return e===this.model.name?(this.clearError(),this.update()):void 0},t.prototype._error=function(e,t){return e===this.model.name?(this.setError(t),this.update()):void 0},t.prototype._set=function(e,t){return e===this.model.name?(this.clearError(),this.model.value=t,this.update()):void 0},t.prototype.change=function(e){var t;return t=this.getValue(e.target),(""===t||t!==this.model.value)&&this.obs.trigger(a.Input.Change,this.model.name,t),this.model.value=t},t.prototype.hasError=function(){var e;return e=this.error,null!=e&&null!=e.length&&e.length>0},t.prototype.setError=function(e){return this.error=e},t.prototype.clearError=function(){return this.setError(null)},t.prototype.js=function(e){return this.model=e.input.model},t}(h),x.tag("control","",function(e){var t;return t=e.input,null!=t?(e.obs=t.obs,x.mount(this.root,t.tag,e)):void 0}),a.Form={SubmitSuccess:"form-submit-success",SubmitFailed:"form-submit-failed"},s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}var n;return k(t,e),t.prototype.inputConfigs=null,t.prototype.events=(n={},n[""+a.Input.Get]=function(){return this._result.apply(this,arguments)},n[""+a.Input.Change]=function(){return this._change.apply(this,arguments)},n),t.prototype._change=function(e,t){var n,r,o,i;return this.fullyValidated=!1,i=this._set(this.model,e,t),o=i[0],r=i[1],n=this.inputs[e],null!=n?n.validator(o,r).then(function(t){return function(n){return t.obs.trigger(a.Input.Set,e,n)}}(this))["catch"](function(t){return function(n){return w("Validation error has occured",n.stack),t.obs.trigger(a.Input.Error,e,n.message)}}(this)):void 0},t.prototype._result=function(e){return this.obs.trigger(a.Input.Result,this._get(this.model,e))},t.prototype._submit=function(e){},t.prototype.submit=function(e){var t,n,r,o,i,s,c,l;if(null!=e&&e.preventDefault(),this.fullyValidated)return void this._submit(e);i=[],s=[],c=this.inputs;for(o in c)t=c[o],i.push(o),l=this._find(this.model,o),r=l[0],n=l[1],s.push(t.validator(r,n));return p.settle(s).then(function(t){return function(n){var r,o,s,c,l;for(c=!1,r=o=0,s=n.length;s>o;r=++o)l=n[r],l.isRejected()&&(c=!0,t.obs.trigger(a.Input.Error,i[r],l.reason.message));return c?void t.obs.trigger(a.Form.SubmitFailed,t.model):(t.fullyValidated=!0,t.obs.trigger(a.Form.SubmitSuccess,t.model),t._submit(e))}}(this))},t.prototype._get=function(e,t){var n,r,o,i,a;if(a=t.split("."),1===a.length)return e[t];for(n=e,r=0,o=a.length;o>r;r++){if(i=a[r],null==n[i])return;n=n[i]}return n[lastName]},t.prototype._set=function(e,t,n){var r,o,i;return i=this._find(e,t),r=i[0],o=i[1],r[o]=n,[r,o]},t.prototype._find=function(e,t){var n,r,o,i,a,s;if(s=t.split("."),1===s.length)return[e,t];for(o=s.pop(),n=e,r=0,i=s.length;i>r;r++)a=s[r],null==n[a]?(y(a)?n[a]=[]:n[a]={},n=n[a]):n=n[a];return[n,o]},t.prototype.js=function(){return this.initFormGroup()},t.prototype.initFormGroup=function(){var e,t,n;if(null!=this.inputConfigs){null==this.inputs?this.inputs=t=m.render(this.inputConfigs):t=this.inputs;for(n in t)e=t[n],e.obs=this.obs;return this.fullyValidated=!1,_(this.model,function(e,n){return null!=t[e]?t[e].model.value=n:void 0})}},t}(h),_=function(e,t,n){var r,o,i;if(null==n&&(n=""),g(e)||b(e)){o=[];for(r in e)i=e[r],o.push(_(i,t,""===n?r:n+"."+r));return o}return t(n,e)},e.exports={helpers:m,FormView:s,InputView:d,Input:c,InputConfig:u,tokenize:j}}),t.define("is-array",function(e,t,n,r,o){var i=Array.isArray,a=Object.prototype.toString;e.exports=i||function(e){return!!e&&"[object Array]"==a.call(e)}}),t.define("is-number",function(e,n,r,o,i){"use strict";var a=t("kind-of");e.exports=function(e){var t=a(e);if("number"!==t&&"string"!==t)return!1;var n=+e;return n-n+1>=0&&""!==e}}),t.define("kind-of",function(e,n,r,o,i){var a=t("is-buffer"),s=Object.prototype.toString;e.exports=function(e){if("undefined"==typeof e)return"undefined";if(null===e)return"null";if(e===!0||e===!1||e instanceof Boolean)return"boolean";if("string"==typeof e||e instanceof String)return"string";if("number"==typeof e||e instanceof Number)return"number";if("function"==typeof e||e instanceof Function)return"function";if("undefined"!=typeof Array.isArray&&Array.isArray(e))return"array";if(e instanceof RegExp)return"regexp";if(e instanceof Date)return"date";var t=s.call(e);return"[object RegExp]"===t?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"undefined"!=typeof Buffer&&a(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array]"===t?"float64array":"object"}}),t.define("is-buffer",function(e,t,n,r,o){e.exports=function(e){return!(null==e||!(e._isBuffer||e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)))}}),t.define("is-object",function(e,t,n,r,o){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}}),t.define("crowdcontrol/lib/events",function(e,t,n,r,o){e.exports={}}),t.define("crowdcontrol/lib/view/view",function(e,n,r,o,i){var a,s,c,l,u;c=t("is-function"),s=t("extend"),l=t("riot/riot"),u=t("crowdcontrol/lib/utils"),a=function(){function e(){var t,n,r,o;for(n=Object.getPrototypeOf(this),t=n,r={};t!==e.prototype;)t=Object.getPrototypeOf(t),n.events=s({},t.events||{},n.events),s(r,t||{},n);s(n,r),o=this,this.init(),l.tag(this.tag,this.html,this.css,this.attrs,function(e){var t,n,r,i,a,s,u,d,p;s=Object.getPrototypeOf(e);for(r in e)p=e[r],null!=s[r]&&null==p&&(e[r]=s[r]);if(null!=o){u=Object.getPrototypeOf(o);for(r in u)p=u[r],c(p)?!function(e){return function(t){var n;return null!=e[r]?(n=e[r],e[r]=function(){return n.apply(e,arguments),t.apply(e,arguments)}):e[r]=function(){return t.apply(e,arguments)}}}(this)(p):this[r]=p}if(this.model=e.model||this.model,null==this.model&&(this.model={}),a=this.obs=e.obs,null==this.obs&&(a=this.obs={},l.observable(a)),null!=o.events){d=o.events,t=function(e){return function(t,n){return a.on(t,function(){return n.apply(e,arguments)})}}(this);for(i in d)n=d[i],t(i,n)}return this.js?this.js(e):void 0})}return e.register=function(){return new this},e.prototype.tag="",e.prototype.html="",e.prototype.css="",e.prototype.attrs="",e.prototype.events=null,e.prototype.mixins=null,e.prototype.model=null,e.prototype.init=function(){},e.prototype.js=function(){},e}(),e.exports=a}),t.define("extend",function(e,t,n,r,o){"use strict";var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},c=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t=i.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return"undefined"==typeof r||i.call(e,r)};e.exports=function l(){var e,t,n,r,o,i,a=arguments[0],u=1,d=arguments.length,p=!1;for("boolean"==typeof a?(p=a,a=arguments[1]||{},u=2):("object"!=typeof a&&"function"!=typeof a||null==a)&&(a={});d>u;++u)if(e=arguments[u],null!=e)for(t in e)n=a[t],r=e[t],a!==r&&(p&&r&&(c(r)||(o=s(r)))?(o?(o=!1,i=n&&s(n)?n:[]):i=n&&c(n)?n:{},a[t]=l(p,i,r)):"undefined"!=typeof r&&(a[t]=r));return a}}),t.define("raf",function(e,n,r,o,i){for(var a=t("performance-now/lib/performance-now"),s="undefined"==typeof window?{}:window,c=["moz","webkit"],l="AnimationFrame",u=s["request"+l],d=s["cancel"+l]||s["cancelRequest"+l],p=0;p<c.length&&!u;p++)u=s[c[p]+"Request"+l],d=s[c[p]+"Cancel"+l]||s[c[p]+"CancelRequest"+l];if(!u||!d){var f=0,h=0,m=[],g=1e3/60;u=function(e){if(0===m.length){var t=a(),n=Math.max(0,g-(t-f));f=n+t,setTimeout(function(){var e=m.slice(0);m.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(f)}catch(n){setTimeout(function(){throw n},0)}},Math.round(n))}return m.push({handle:++h,callback:e,cancelled:!1}),h},d=function(e){for(var t=0;t<m.length;t++)m[t].handle===e&&(m[t].cancelled=!0)}}e.exports=function(e){return u.call(s,e)},e.exports.cancel=function(){d.apply(s,arguments)}}),t.define("performance-now/lib/performance-now",function(e,t,n,r,o){(function(){var t,n,r;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof o&&null!==o&&o.hrtime?(e.exports=function(){return(t()-r)/1e6},n=o.hrtime,t=function(){var e;return e=n(),1e9*e[0]+e[1]},r=t()):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}),t.define("./Users/dtai/work/verus/checkout/vendor/js/select2",function(e,t,n,r,o){!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,r;!function(t){function o(e,t){return w.call(e,t)}function i(e,t){var n,r,o,i,a,s,c,l,u,d,p,f=t&&t.split("/"),h=y.map,m=h&&h["*"]||{};if(e&&"."===e.charAt(0))if(t){for(f=f.slice(0,f.length-1),e=e.split("/"),a=e.length-1,y.nodeIdCompat&&j.test(e[a])&&(e[a]=e[a].replace(j,"")),e=f.concat(e),u=0;u<e.length;u+=1)if(p=e[u],"."===p)e.splice(u,1),u-=1;else if(".."===p){if(1===u&&(".."===e[2]||".."===e[0]))break;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((f||m)&&h){for(n=e.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),f)for(d=f.length;d>0;d-=1)if(o=h[f.slice(0,d).join("/")],o&&(o=o[r])){i=o,s=u;break}if(i)break;!c&&m&&m[r]&&(c=m[r],l=u)}!i&&c&&(i=c,s=l),i&&(n.splice(0,s,i),e=n.join("/"))}return e}function a(e,n){return function(){return f.apply(t,x.call(arguments,0).concat([e,n]))}}function s(e){return function(t){return i(t,e)}}function c(e){return function(t){g[e]=t}}function l(e){if(o(v,e)){var n=v[e];delete v[e],b[e]=!0,p.apply(t,n)}if(!o(g,e)&&!o(b,e))throw new Error("No "+e);return g[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return function(){return y&&y.config&&y.config[e]||{}}}var p,f,h,m,g={},v={},y={},b={},w=Object.prototype.hasOwnProperty,x=[].slice,j=/\.js$/;h=function(e,t){var n,r=u(e),o=r[0];return e=r[1],o&&(o=i(o,t),n=l(o)),o?e=n&&n.normalize?n.normalize(e,s(t)):i(e,t):(e=i(e,t),r=u(e),o=r[0],e=r[1],o&&(n=l(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},m={require:function(e){return a(e)},exports:function(e){var t=g[e];return"undefined"!=typeof t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:d(e)}}},p=function(e,n,r,i){var s,u,d,p,f,y,w=[],x=typeof r;if(i=i||e,"undefined"===x||"function"===x){for(n=!n.length&&r.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if(p=h(n[f],i),u=p.f,"require"===u)w[f]=m.require(e);else if("exports"===u)w[f]=m.exports(e),y=!0;else if("module"===u)s=w[f]=m.module(e);else if(o(g,u)||o(v,u)||o(b,u))w[f]=l(u);else{if(!p.p)throw new Error(e+" missing "+u);p.p.load(p.n,a(i,!0),c(u),{}),w[f]=g[u]}d=r?r.apply(g[e],w):void 0,e&&(s&&s.exports!==t&&s.exports!==g[e]?g[e]=s.exports:d===t&&y||(g[e]=d))}else e&&(g[e]=r)},e=n=f=function(e,n,r,o,i){if("string"==typeof e)return m[e]?m[e](n):l(h(e,n).f);if(!e.splice){if(y=e,y.deps&&f(y.deps,y.callback),!n)return;n.splice?(e=n,n=r,r=null):e=t}return n=n||function(){},"function"==typeof r&&(r=o,o=i),o?p(t,e,n,r):setTimeout(function(){p(t,e,n,r)},4),f},f.config=function(e){return f(e)},e._defined=g,r=function(e,t,n){t.splice||(n=t,t=[]),o(g,e)||o(v,e)||(v[e]=[e,t,n])},r.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=r}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var r in t){var o=t[r];"function"==typeof o&&"constructor"!==r&&n.push(r)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var r={}.hasOwnProperty;for(var o in t)r.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function r(){var t=Array.prototype.unshift,r=n.prototype.constructor.length,o=e.prototype.constructor;r>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=r}var i=t(n),a=t(e);n.displayName=e.displayName,r.prototype=new o;for(var s=0;s<a.length;s++){var c=a[s];r.prototype[c]=e.prototype[c]}for(var l=(function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var o=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t),o.apply(this,arguments)}}),u=0;u<i.length;u++){var d=i[u];r.prototype[d]=l(d)}return r};var r=function(){this.listeners={}};return r.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},r.prototype.trigger=function(e){var t=Array.prototype.slice;this.listeners=this.listeners||{},e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(e,t){for(var n=0,r=e.length;r>n;n++)e[n].apply(this,t)},n.Observable=r,n.generateChars=function(e){for(var t="",n=0;e>n;n++){var r=Math.floor(36*Math.random());t+=r.toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var o=0;o<n.length;o++){var i=n[o];i=i.substring(0,1).toLowerCase()+i.substring(1),i in r||(r[i]={}),o==n.length-1&&(r[i]=e[t]),r=r[i]}delete e[t]}}return e},n.hasScroll=function(t,n){var r=e(n),o=n.style.overflowX,i=n.style.overflowY;return o!==i||"hidden"!==i&&"visible"!==i?"scroll"===o||"scroll"===i?!0:r.innerHeight()<n.scrollHeight||r.innerWidth()<n.scrollWidth:!1},n.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var r=e();e.map(n,function(e){r=r.add(e)}),n=r}t.append(n)},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,r){this.$element=e,this.data=r,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=e('<li role="treeitem" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);r.append(n(o(t.args))),this.$results.append(r)},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],o=this.option(r);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){var n=t.find(".select2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var r=e.map(n,function(e){return e.id.toString()}),o=t.$results.find(".select2-results__option[aria-selected]");o.each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,r)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")});var i=o.filter("[aria-selected=true]");i.length>0?i.first().trigger("mouseenter"):o.first().trigger("mouseenter")})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},r=this.option(n);r.className+=" loading-results",this.$results.prepend(r)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var r={role:"treeitem","aria-selected":"false"};t.disabled&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==t.id&&delete r["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(r.role="group",r["aria-label"]=t.text,delete r["aria-selected"]);for(var o in r){var i=r[o];n.setAttribute(o,i)}if(t.children){var a=e(n),s=document.createElement("strong");s.className="select2-results__group";e(s);this.template(t,s);for(var c=[],l=0;l<t.children.length;l++){var u=t.children[l],d=this.option(u);c.push(d)}var p=e("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});p.append(c),a.append(s),a.append(p)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var r=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){r.clear(),r.append(e.data),t.isOpen()&&r.setClasses()}),t.on("results:append",function(e){r.append(e.data),t.isOpen()&&r.setClasses()}),t.on("query",function(e){r.showLoading(e)}),t.on("select",function(){t.isOpen()&&r.setClasses()}),t.on("unselect",function(){t.isOpen()&&r.setClasses()}),t.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),t.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=r.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?r.trigger("close"):r.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var i=t.eq(o);i.trigger("mouseenter");var a=r.$results.offset().top,s=i.offset().top,c=r.$results.scrollTop()+(s-a);0===o?r.$results.scrollTop(0):0>s-a&&r.$results.scrollTop(c)}}),t.on("results:next",function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e),o=n+1;if(!(o>=t.length)){var i=t.eq(o);i.trigger("mouseenter");var a=r.$results.offset().top+r.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),c=r.$results.scrollTop()+s-a;0===o?r.$results.scrollTop(0):s>a&&r.$results.scrollTop(c)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){r.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-r.$results.scrollTop()+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,i=e.deltaY<0&&n<=r.$results.height();o?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");return"true"===n.attr("aria-selected")?void(r.options.get("multiple")?r.trigger("unselect",{originalEvent:t,data:o}):r.trigger("close")):void r.trigger("select",{originalEvent:t,data:o})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),r=this.$results.offset().top,o=e.offset().top,i=this.$results.scrollTop()+(o-r),a=o-r;i-=2*e.outerHeight(!1),2>=n?this.$results.scrollTop(0):(a>this.$results.outerHeight()||0>a)&&this.$results.scrollTop(i)}},n.prototype.template=function(t,n){var r=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),i=r(t);null==i?n.style.display="none":"string"==typeof i?n.innerHTML=o(i):e(n).append(i)},n}),t.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},r.prototype.bind=function(e,t){var r=this,o=(e.id+"-container",e.id+"-results");this.container=e,this.$selection.on("focus",function(e){r.trigger("focus",e)}),this.$selection.on("blur",function(e){r.trigger("blur",e)}),this.$selection.on("keydown",function(e){r.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){r.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){r.update(e.data)}),e.on("open",function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",o),r._attachCloseHandler(e)}),e.on("close",function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.focus(),r._detachCloseHandler(e)}),e.on("enable",function(){r.$selection.attr("tabindex",r._tabindex)}),e.on("disable",function(){r.$selection.attr("tabindex","-1")})},r.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target),r=n.closest(".select2"),o=e(".select2.select2-container--open");o.each(function(){var t=e(this);if(this!=r[0]){var n=t.data("element");n.select2("close")}})})},r.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var r=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e){var t=this.options.get("templateSelection"),n=this.options.get("escapeMarkup");return n(t(e))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.display(t),r=this.$selection.find(".select2-selection__rendered");r.empty().append(n),r.prop("title",t.title||t.text)},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function r(e,t){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(t,n){var o=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){var n=e(this),r=n.parent(),i=r.data("data");o.trigger("unselect",{originalEvent:t,data:i})})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e){var t=this.options.get("templateSelection"),n=this.options.get("escapeMarkup");return n(t(e))},r.prototype.selectionContainer=function(){var t=e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return t},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],r=0;r<e.length;r++){var o=e[r],i=this.display(o),a=this.selectionContainer();a.append(i),a.prop("title",o.title||o.text),a.data("data",o),t.push(a)}var s=this.$selection.find(".select2-selection__rendered");n.appendMany(s,t)}},r}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id,r=t.length>1;if(r||n)return e.call(this,t);this.clear();var o=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(o)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var r=n.data("data"),o=0;o<r.length;o++){var i={data:r[o]};if(this.trigger("unselect",i),i.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle")}}},n.prototype._handleKeyboardClear=function(e,n,r){r.isOpen()||(n.which==t.DELETE||n.which==t.BACKSPACE)&&this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var r=e('<span class="select2-selection__clear">×</span>');r.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(r)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function r(e,t,n){e.call(this,t,n)}return r.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></li>');this.$searchContainer=n,this.$search=n.find("input");var r=t.call(this);return r},r.prototype.bind=function(e,t,r){var o=this;e.call(this,t,r),t.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus()}),t.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val(""),o.$search.focus()}),t.on("enable",function(){o.$search.prop("disabled",!1)}),t.on("disable",function(){o.$search.prop("disabled",!0)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o.trigger("blur",e)}),this.$selection.on("keydown",".select2-search--inline",function(e){e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented();var t=e.which;if(t===n.BACKSPACE&&""===o.$search.val()){var r=o.$searchContainer.prev(".select2-selection__choice");if(r.length>0){var i=r.data("data");o.searchRemoveChoice(i),e.preventDefault()}}}),this.$selection.on("input",".select2-search--inline",function(e){o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input",".select2-search--inline",function(e){o.handleSearch(e)})},r.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(e,t){this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch();
},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.trigger("open"),this.$search.val(t.text+" ")},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},r}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,r){var o=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting"],a=["opening","closing","selecting","unselecting"];t.call(this,n,r),n.on("*",function(t,n){if(-1!==e.inArray(t,i)){n=n||{};var r=e.Event("select2:"+t,{params:n});o.$element.trigger(r),-1!==e.inArray(t,a)&&(n.prevented=r.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var r=t(e);n._cache[e]=r}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){var e={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var r=t.id+"-result-";return r+=e.generateChars(4),r+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,e),r.prototype.current=function(e){var t=[],r=this;this.$element.find(":selected").each(function(){var e=n(this),o=r.item(e);t.push(o)}),e(t)},r.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(r){var o=[];e=[e],e.push.apply(e,r);for(var i=0;i<e.length;i++){var a=e[i].id;-1===n.inArray(a,o)&&o.push(a)}t.$element.val(o),t.$element.trigger("change")});else{var r=e.id;this.$element.val(r),this.$element.trigger("change")}},r.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(r){for(var o=[],i=0;i<r.length;i++){var a=r[i].id;a!==e.id&&-1===n.inArray(a,o)&&o.push(a)}t.$element.val(o),t.$element.trigger("change")})},r.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},r.prototype.query=function(e,t){var r=[],o=this,i=this.$element.children();i.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var i=o.item(t),a=o.matches(e,i);null!==a&&r.push(a)}}),t({results:r})},r.prototype.addOptions=function(e){t.appendMany(this.$element,e)},r.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),void 0!==t.textContent?t.textContent=e.text:t.innerText=e.text),e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var r=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),r},r.prototype.item=function(e){var t={};if(t=n.data(e[0],"data"),null!=t)return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var r=e.children("option"),o=[],i=0;i<r.length;i++){var a=n(r[i]),s=this.item(a);o.push(s)}t.children=o}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},r.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},r.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},r}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function r(e,t){var n=t.get("data")||[];r.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(r,e),r.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),r.__super__.select.call(this,e)},r.prototype.convertToOptions=function(e){function r(e){return function(){return n(this).val()==e.id}}for(var o=this,i=this.$element.find("option"),a=i.map(function(){return o.item(n(this)).id}).get(),s=[],c=0;c<e.length;c++){var l=this._normalizeItem(e[c]);if(n.inArray(l.id,a)>=0){var u=i.filter(r(l)),d=this.item(u),p=(n.extend(!0,{},d,l),this.option(d));u.replaceWith(p)}else{var f=this.option(l);if(l.children){var h=this.convertToOptions(l.children);t.appendMany(f,h)}s.push(f)}}return s},r}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function r(t,n){this.ajaxOptions=this._applyDefaults(n.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),e.__super__.constructor.call(this,t,n)}return t.Extend(r,e),r.prototype._applyDefaults=function(e){var t={data:function(e){return{q:e.term}},transport:function(e,t,r){var o=n.ajax(e);return o.then(t),o.fail(r),o}};return n.extend({},t,e,!0)},r.prototype.processResults=function(e){return e},r.prototype.query=function(e,t){function r(){var r=i.transport(i,function(r){var i=o.processResults(r,e);o.options.get("debug")&&window.console&&console.error&&(i&&i.results&&n.isArray(i.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(i)},function(){});o._request=r}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof i.url&&(i.url=i.url(e)),"function"==typeof i.data&&(i.data=i.data(e)),this.ajaxOptions.delay&&""!==e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},r}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,r){var o=r.get("tags"),i=r.get("createTag");if(void 0!==i&&(this.createTag=i),t.call(this,n,r),e.isArray(o))for(var a=0;a<o.length;a++){var s=o[a],c=this._normalizeItem(s),l=this.option(c);this.$element.append(l)}}return t.prototype.query=function(e,t,n){function r(e,i){for(var a=e.results,s=0;s<a.length;s++){var c=a[s],l=null!=c.children&&!r({results:c.children},!0),u=c.text===t.term;if(u||l)return i?!1:(e.data=a,void n(e))}if(i)return!0;var d=o.createTag(t);if(null!=d){var p=o.option(d);p.attr("data-select2-tag",!0),o.addOptions([p]),o.insertTag(a,d)}e.results=a,n(e)}var o=this;return this._removeOldTags(),null==t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,r)},t.prototype.createTag=function(t,n){var r=e.trim(n.term);return""===r?null:{id:r,text:r}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){var n=(this._lastTag,this.$element.find("option[data-select2-tag]"));n.each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(e,t,n){function r(e){o.select(e)}var o=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,r);i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},t.prototype.tokenizer=function(t,n,r,o){for(var i=r.get("tokenSeparators")||[],a=n.term,s=0,c=this.createTag||function(e){return{id:e.term,text:e.term}};s<a.length;){var l=a[s];if(-1!==e.inArray(l,i)){var u=a.substr(0,s),d=e.extend({},n,{term:u}),p=c(d);o(p),a=a.substr(s+1)||"",s=0}else s++}return{term:a}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var r=this;this.current(function(o){var i=null!=o?o.length:0;return r.maximumSelectionLength>0&&i>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void e.call(r,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),n.prepend(r),n},n.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=o.showSearch(e);t?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;r>=0;r--){var o=t[r];this.placeholder.id===o.id&&n.splice(r,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){var n=o.$results.offset().top+o.$results.outerHeight(!1),r=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1);n+50>=r&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="option load-more" role="treeitem"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(e,t,n){this.$dropdownParent=n.get("dropdownParent")||document.body,e.call(this,t,n)}return n.prototype.bind=function(e,t,n){var r=this,o=!1;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),r=t.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n){var r=this,o="scroll.select2."+n.id,i="resize.select2."+n.id,a="orientationchange.select2."+n.id,s=this.$container.parents().filter(t.hasScroll);s.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),s.on(o,function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(o+" "+i+" "+a,function(e){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n){var r="scroll.select2."+n.id,o="resize.select2."+n.id,i="orientationchange.select2."+n.id,a=this.$container.parents().filter(t.hasScroll);a.off(r),e(window).off(r+" "+o+" "+i)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),r=this.$dropdown.hasClass("select2-dropdown--below"),o=null,i=(this.$container.position(),this.$container.offset());i.bottom=i.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=i.top,a.bottom=i.top+a.height;var s={height:this.$dropdown.outerHeight(!1)},c={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},l=c.top<i.top-s.height,u=c.bottom>i.bottom+s.height,d={left:i.left,top:a.bottom};n||r||(o="below"),u||!l||n?!l&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=a.top-s.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){this.$dropdownContainer.width();var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,r=0;r<t.length;r++){var o=t[r];o.children?n+=e(o.children):n++}return n}function t(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return t.prototype.showSearch=function(t,n){return e(n.data.results)<this.minimumResultsForSearch?!1:t.call(this,n)},t}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(){r._handleSelectOnClose()})},e.prototype._handleSelectOnClose=function(){var e=this.getHighlightedResults();e.length<1||this.trigger("select",{data:e.data("data")})},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close")},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,r,o,i,a,s,c,l,u,d,p,f,h,m,g,v,y,b,w,x,j,_,k,C,E,$,S){function A(){this.reset()}A.prototype.apply=function(d){if(d=e.extend({},this.defaults,d),null==d.dataAdapter){if(null!=d.ajax?d.dataAdapter=h:null!=d.data?d.dataAdapter=f:d.dataAdapter=p,d.minimumInputLength>0&&(d.dataAdapter=l.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=l.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=l.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=l.Decorate(d.dataAdapter,m)),(null!=d.tokenSeparators||null!=d.tokenizer)&&(d.dataAdapter=l.Decorate(d.dataAdapter,g)),null!=d.query){var S=t(d.amdBase+"compat/query");d.dataAdapter=l.Decorate(d.dataAdapter,S)}if(null!=d.initSelection){var A=t(d.amdBase+"compat/initSelection");d.dataAdapter=l.Decorate(d.dataAdapter,A)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=l.Decorate(d.resultsAdapter,_)),null!=d.placeholder&&(d.resultsAdapter=l.Decorate(d.resultsAdapter,j)),d.selectOnClose&&(d.resultsAdapter=l.Decorate(d.resultsAdapter,E))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=w;else{var T=l.Decorate(w,x);d.dropdownAdapter=T}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=l.Decorate(d.dropdownAdapter,C)),d.closeOnSelect&&(d.dropdownAdapter=l.Decorate(d.dropdownAdapter,$)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var O=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=l.Decorate(d.dropdownAdapter,O)}d.dropdownAdapter=l.Decorate(d.dropdownAdapter,k)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=r,null!=d.placeholder&&(d.selectionAdapter=l.Decorate(d.selectionAdapter,i)),d.allowClear&&(d.selectionAdapter=l.Decorate(d.selectionAdapter,a)),d.multiple&&(d.selectionAdapter=l.Decorate(d.selectionAdapter,s)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var q=t(d.amdBase+"compat/containerCss");d.selectionAdapter=l.Decorate(d.selectionAdapter,q)}d.selectionAdapter=l.Decorate(d.selectionAdapter,c)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var I=d.language.split("-"),L=I[0];d.language=[d.language,L]}else d.language=[d.language];if(e.isArray(d.language)){var P=new u;d.language.push("en");for(var D=d.language,F=0;F<D.length;F++){var R=D[F],N={};try{N=u.loadPath(R)}catch(M){try{R=this.defaults.amdLanguageBase+R,N=u.loadPath(R)}catch(z){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(N)}d.translations=P}else{var U=u.loadPath(this.defaults.amdLanguageBase+"en"),H=new u(d.language);H.extend(U),d.translations=H}return d},A.prototype.reset=function(){function t(e){function t(e){return d[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(r,o){if(""===e.trim(r.term))return o;if(o.children&&o.children.length>0){for(var i=e.extend(!0,{},o),a=o.children.length-1;a>=0;a--){var s=o.children[a],c=n(r,s);null==c&&i.children.splice(a,1)}return i.children.length>0?i:n(r,i)}var l=t(o.text).toUpperCase(),u=t(r.term).toUpperCase();return l.indexOf(u)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:l.escapeMarkup,language:S,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},A.prototype.set=function(t,n){var r=e.camelCase(t),o={};o[r]=n;var i=l._convertData(o);e.extend(this.defaults,i)};var T=new A;return T}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,r){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var i=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,i)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var i=t.extend(!0,{},o);i=r._convertData(i);for(var a in i)t.inArray(a,n)>-1||(t.isPlainObject(this.options[a])?t.extend(this.options[a],i[a]):this.options[a]=i[a]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,r){var o=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var r=e.attr("tabindex")||0;e.data("old-tabindex",r),e.attr("tabindex","-1");
var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var l=this.options.get("resultsAdapter");this.results=new l(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==t){var i=e.attr("style");if("string"!=typeof i)return null;for(var a=i.split(";"),s=0,c=a.length;c>s;s+=1){var l=a[s].replace(/\s/g,""),u=l.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=r?(this._observer=new r(function(n){e.each(n,t._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",t._sync,!1)},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("*",function(r,o){-1===e.inArray(r,n)&&t.trigger(r,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("focus",function(){e.$container.addClass("select2-container--focus")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open"),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===r.ENTER?(e.trigger("results:select"),t.preventDefault()):n===r.SPACE&&t.ctrlKey?(e.trigger("results:toggle"),t.preventDefault()):n===r.UP?(e.trigger("results:previous"),t.preventDefault()):n===r.DOWN?(e.trigger("results:next"),t.preventDefault()):(n===r.ESC||n===r.TAB)&&(e.close(),t.preventDefault()):(n===r.ENTER||n===r.SPACE||(n===r.DOWN||n===r.UP)&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable")):this.trigger("enable")},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(e in r){var i=r[e],a={prevented:!1,name:e,args:t};if(n.call(this,i,a),a.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||(this.trigger("query",{}),this.trigger("open"))},o.prototype.close=function(){this.isOpen()&&this.trigger("close")},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(e,t,n,r){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){var r=e.extend({},t,!0);new n(e(this),r)}),this;if("string"==typeof t){var r=this.data("select2");null==r&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2.");var i=Array.prototype.slice.call(arguments,1),a=r[t](i);return e.inArray(t,o)>-1?this:a}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=r),n}),t.define("jquery.mousewheel",["jquery"],function(e){return e}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n})}),t.define("style-inject",function(e,t,n,r,o){e.exports=function(e){e=e||"";var t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}),t.define("./Users/dtai/work/verus/checkout/vendor/css/select2",function(e,t,n,r,o){e.exports='.select2-container {\n box-sizing: border-box;\n display: inline-block;\n margin: 0;\n position: relative;\n vertical-align: middle; }\n .select2-container .select2-selection--single {\n box-sizing: border-box;\n cursor: pointer;\n display: block;\n height: 28px;\n user-select: none;\n -webkit-user-select: none; }\n .select2-container .select2-selection--single .select2-selection__rendered {\n display: block;\n padding-left: 8px;\n padding-right: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {\n padding-right: 8px;\n padding-left: 20px; }\n .select2-container .select2-selection--multiple {\n box-sizing: border-box;\n cursor: pointer;\n display: block;\n min-height: 32px;\n user-select: none;\n -webkit-user-select: none; }\n .select2-container .select2-selection--multiple .select2-selection__rendered {\n display: inline-block;\n overflow: hidden;\n padding-left: 8px;\n text-overflow: ellipsis;\n white-space: nowrap; }\n .select2-container .select2-search--inline {\n float: left; }\n .select2-container .select2-search--inline .select2-search__field {\n box-sizing: border-box;\n border: none;\n font-size: 100%;\n margin-top: 5px; }\n .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {\n -webkit-appearance: none; }\n\n.select2-dropdown {\n background-color: white;\n border: 1px solid #aaa;\n border-radius: 4px;\n box-sizing: border-box;\n display: block;\n position: absolute;\n left: -100000px;\n width: 100%;\n z-index: 1051; }\n\n.select2-results {\n display: block; }\n\n.select2-results__options {\n list-style: none;\n margin: 0;\n padding: 0; }\n\n.select2-results__option {\n padding: 6px;\n user-select: none;\n -webkit-user-select: none; }\n .select2-results__option[aria-selected] {\n cursor: pointer; }\n\n.select2-container--open .select2-dropdown {\n left: 0; }\n\n.select2-container--open .select2-dropdown--above {\n border-bottom: none;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0; }\n\n.select2-container--open .select2-dropdown--below {\n border-top: none;\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n\n.select2-search--dropdown {\n display: block;\n padding: 4px; }\n .select2-search--dropdown .select2-search__field {\n padding: 4px;\n width: 100%;\n box-sizing: border-box; }\n .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {\n -webkit-appearance: none; }\n .select2-search--dropdown.select2-search--hide {\n display: none; }\n\n.select2-close-mask {\n border: 0;\n margin: 0;\n padding: 0;\n display: block;\n position: fixed;\n left: 0;\n top: 0;\n min-height: 100%;\n min-width: 100%;\n height: auto;\n width: auto;\n opacity: 0;\n z-index: 99;\n background-color: #fff;\n filter: alpha(opacity=0); }\n\n.select2-hidden-accessible {\n border: 0 !important;\n clip: rect(0 0 0 0) !important;\n height: 1px !important;\n margin: -1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important; }\n\n.select2-container--default .select2-selection--single {\n background-color: #fff;\n border: 1px solid #aaa;\n border-radius: 4px; }\n .select2-container--default .select2-selection--single .select2-selection__rendered {\n color: #444;\n line-height: 28px; }\n .select2-container--default .select2-selection--single .select2-selection__clear {\n cursor: pointer;\n float: right;\n font-weight: bold; }\n .select2-container--default .select2-selection--single .select2-selection__placeholder {\n color: #999; }\n .select2-container--default .select2-selection--single .select2-selection__arrow {\n height: 26px;\n position: absolute;\n top: 1px;\n right: 1px;\n width: 20px; }\n .select2-container--default .select2-selection--single .select2-selection__arrow b {\n border-color: #888 transparent transparent transparent;\n border-style: solid;\n border-width: 5px 4px 0 4px;\n height: 0;\n left: 50%;\n margin-left: -4px;\n margin-top: -2px;\n position: absolute;\n top: 50%;\n width: 0; }\n.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {\n float: left; }\n.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {\n left: 1px;\n right: auto; }\n.select2-container--default.select2-container--disabled .select2-selection--single {\n background-color: #eee;\n cursor: default; }\n .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {\n display: none; }\n.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {\n border-color: transparent transparent #888 transparent;\n border-width: 0 4px 5px 4px; }\n.select2-container--default .select2-selection--multiple {\n background-color: white;\n border: 1px solid #aaa;\n border-radius: 4px;\n cursor: text; }\n .select2-container--default .select2-selection--multiple .select2-selection__rendered {\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n padding: 0 5px;\n width: 100%; }\n .select2-container--default .select2-selection--multiple .select2-selection__placeholder {\n color: #999;\n margin-top: 5px;\n float: left; }\n .select2-container--default .select2-selection--multiple .select2-selection__clear {\n cursor: pointer;\n float: right;\n font-weight: bold;\n margin-top: 5px;\n margin-right: 10px; }\n .select2-container--default .select2-selection--multiple .select2-selection__choice {\n background-color: #e4e4e4;\n border: 1px solid #aaa;\n border-radius: 4px;\n cursor: default;\n float: left;\n margin-right: 5px;\n margin-top: 5px;\n padding: 0 5px; }\n .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {\n color: #999;\n cursor: pointer;\n display: inline-block;\n font-weight: bold;\n margin-right: 2px; }\n .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {\n color: #333; }\n.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder {\n float: right; }\n.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {\n margin-left: 5px;\n margin-right: auto; }\n.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {\n margin-left: 2px;\n margin-right: auto; }\n.select2-container--default.select2-container--focus .select2-selection--multiple {\n border: solid black 1px;\n outline: 0; }\n.select2-container--default.select2-container--disabled .select2-selection--multiple {\n background-color: #eee;\n cursor: default; }\n.select2-container--default.select2-container--disabled .select2-selection__choice__remove {\n display: none; }\n.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0; }\n.select2-container--default .select2-search--dropdown .select2-search__field {\n border: 1px solid #aaa; }\n.select2-container--default .select2-search--inline .select2-search__field {\n background: transparent;\n border: none;\n outline: 0; }\n.select2-container--default .select2-results > .select2-results__options {\n max-height: 200px;\n overflow-y: auto; }\n.select2-container--default .select2-results__option[role=group] {\n padding: 0; }\n.select2-container--default .select2-results__option[aria-disabled=true] {\n color: #999; }\n.select2-container--default .select2-results__option[aria-selected=true] {\n background-color: #ddd; }\n.select2-container--default .select2-results__option .select2-results__option {\n padding-left: 1em; }\n .select2-container--default .select2-results__option .select2-results__option .select2-results__group {\n padding-left: 0; }\n .select2-container--default .select2-results__option .select2-results__option .select2-results__option {\n margin-left: -1em;\n padding-left: 2em; }\n .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {\n margin-left: -2em;\n padding-left: 3em; }\n .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {\n margin-left: -3em;\n padding-left: 4em; }\n .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {\n margin-left: -4em;\n padding-left: 5em; }\n .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {\n margin-left: -5em;\n padding-left: 6em; }\n.select2-container--default .select2-results__option--highlighted[aria-selected] {\n background-color: #5897fb;\n color: white; }\n.select2-container--default .select2-results__group {\n cursor: default;\n display: block;\n padding: 6px; }\n\n.select2-container--classic .select2-selection--single {\n background-color: #f6f6f6;\n border: 1px solid #aaa;\n border-radius: 4px;\n outline: 0;\n background-image: -webkit-linear-gradient(top, #ffffff 50%, #eeeeee 100%);\n background-image: -o-linear-gradient(top, #ffffff 50%, #eeeeee 100%);\n background-image: linear-gradient(to bottom, #ffffff 50%, #eeeeee 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#FFFFFFFF\', endColorstr=\'#FFEEEEEE\', GradientType=0); }\n .select2-container--classic .select2-selection--single:focus {\n border: 1px solid #5897fb; }\n .select2-container--classic .select2-selection--single .select2-selection__rendered {\n color: #444;\n line-height: 28px; }\n .select2-container--classic .select2-selection--single .select2-selection__clear {\n cursor: pointer;\n float: right;\n font-weight: bold;\n margin-right: 10px; }\n .select2-container--classic .select2-selection--single .select2-selection__placeholder {\n color: #999; }\n .select2-container--classic .select2-selection--single .select2-selection__arrow {\n background-color: #ddd;\n border: none;\n border-left: 1px solid #aaa;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n height: 26px;\n position: absolute;\n top: 1px;\n right: 1px;\n width: 20px;\n background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);\n background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);\n background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#FFEEEEEE\', endColorstr=\'#FFCCCCCC\', GradientType=0); }\n .select2-container--classic .select2-selection--single .select2-selection__arrow b {\n border-color: #888 transparent transparent transparent;\n border-style: solid;\n border-width: 5px 4px 0 4px;\n height: 0;\n left: 50%;\n margin-left: -4px;\n margin-top: -2px;\n position: absolute;\n top: 50%;\n width: 0; }\n.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {\n float: left; }\n.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {\n border: none;\n border-right: 1px solid #aaa;\n border-radius: 0;\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n left: 1px;\n right: auto; }\n.select2-container--classic.select2-container--open .select2-selection--single {\n border: 1px solid #5897fb; }\n .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {\n background: transparent;\n border: none; }\n .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {\n border-color: transparent transparent #888 transparent;\n border-width: 0 4px 5px 4px; }\n.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {\n border-top: none;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee 50%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #eeeeee 50%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 50%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#FFFFFFFF\', endColorstr=\'#FFEEEEEE\', GradientType=0); }\n.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {\n border-bottom: none;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n background-image: -webkit-linear-gradient(top, #eeeeee 50%, #ffffff 100%);\n background-image: -o-linear-gradient(top, #eeeeee 50%, #ffffff 100%);\n background-image: linear-gradient(to bottom, #eeeeee 50%, #ffffff 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#FFEEEEEE\', endColorstr=\'#FFFFFFFF\', GradientType=0); }\n.select2-container--classic .select2-selection--multiple {\n background-color: white;\n border: 1px solid #aaa;\n border-radius: 4px;\n cursor: text;\n outline: 0; }\n .select2-container--classic .select2-selection--multiple:focus {\n border: 1px solid #5897fb; }\n .select2-container--classic .select2-selection--multiple .select2-selection__rendered {\n list-style: none;\n margin: 0;\n padding: 0 5px; }\n .select2-container--classic .select2-selection--multiple .select2-selection__clear {\n display: none; }\n .select2-container--classic .select2-selection--multiple .select2-selection__choice {\n background-color: #e4e4e4;\n border: 1px solid #aaa;\n border-radius: 4px;\n cursor: default;\n float: left;\n margin-right: 5px;\n margin-top: 5px;\n padding: 0 5px; }\n .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {\n color: #888;\n cursor: pointer;\n display: inline-block;\n font-weight: bold;\n margin-right: 2px; }\n .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {\n color: #555; }\n.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {\n float: right; }\n.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {\n margin-left: 5px;\n margin-right: auto; }\n.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {\n margin-left: 2px;\n margin-right: auto; }\n.select2-container--classic.select2-container--open .select2-selection--multiple {\n border: 1px solid #5897fb; }\n.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {\n border-top: none;\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {\n border-bottom: none;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0; }\n.select2-container--classic .select2-search--dropdown .select2-search__field {\n border: 1px solid #aaa;\n outline: 0; }\n.select2-container--classic .select2-search--inline .select2-search__field {\n outline: 0; }\n.select2-container--classic .select2-dropdown {\n background-color: white;\n border: 1px solid transparent; }\n.select2-container--classic .select2-dropdown--above {\n border-bottom: none; }\n.select2-container--classic .select2-dropdown--below {\n border-top: none; }\n.select2-container--classic .select2-results > .select2-results__options {\n max-height: 200px;\n overflow-y: auto; }\n.select2-container--classic .select2-results__option[role=group] {\n padding: 0; }\n.select2-container--classic .select2-results__option[aria-disabled=true] {\n color: grey; }\n.select2-container--classic .select2-results__option--highlighted[aria-selected] {\n background-color: #3875d7;\n color: white; }\n.select2-container--classic .select2-results__group {\n cursor: default;\n display: block;\n padding: 6px; }\n.select2-container--classic.select2-container--open .select2-dropdown {\n border-color: #5897fb; }\n'}),t.define("./utils/theme",function(e,n,r,o,i){var a,s,c;s=t("riot/riot"),a=$("<style>"),$("head").append(a),c={currentTheme:{},setTheme:function(e){return $.extend(c.currentTheme,e),a.html("/* Colors */\n.crowdstart-checkout {\n background-color: "+c.currentTheme.background+" !important;\n}\n\n.crowdstart-checkout a {\n color: "+c.currentTheme.dark+";\n}\n\n.crowdstart-checkout a:visited {\n color: "+c.currentTheme.dark+";\n}\n\n.crowdstart-promocode-button {\n background-color: "+c.currentTheme.promoCodeBackground+" !important;\n color: "+c.currentTheme.promoCodeForeground+" !important;\n}\n\n.crowdstart-button {\n background-color: "+c.currentTheme.calloutBackground+" !important;\n color: "+c.currentTheme.calloutForeground+" !important;\n}\n\n.crowdstart-checkout {\n color: "+c.currentTheme.dark+" !important;\n}\n\n.crowdstart-form-control input,\n.select2-container input {\n border: 1px solid "+c.currentTheme.medium+" !important;\n}\n\n.select2, .select2 *, .select2-selection {\n color: "+c.currentTheme.dark+" !important;\n border-color: "+c.currentTheme.medium+" !important;\n background-color: transparent !important;\n}\n\n.select2-container--default\n.select2-selection--single\n.select2-selection__arrow b {\n border-color: "+c.currentTheme.dark+" transparent transparent transparent !important;\n}\n\n.select2-container--default {\n background-color: transparent !important;\n border-color: "+c.currentTheme.medium+" !important;\n}\n\n.select2-dropdown {\n background-color: "+c.currentTheme.background+" !important;\n border-color: "+c.currentTheme.medium+" !important;\n}\n\n.crowdstart-sep {\n border-bottom: 1px solid "+c.currentTheme.medium+" !important;\n}\n\n.crowdstart-thankyou a {\n color: "+c.currentTheme.dark+" !important;\n}\n\n.crowdstart-thankyou a:visited {\n color: "+c.currentTheme.dark+" !important;\n}\n\ninput.crowdstart-error {\n border-color: "+c.currentTheme.error+" !important;\n}\n\n.crowdstart-message::before {\n background-color: "+c.currentTheme.error+" !important;\n}\n\n.crowdstart-message {\n color: "+c.currentTheme.light+" !important;\n background-color: "+c.currentTheme.error+" !important;\n}\n\n.crowdstart-show-promocode {\n color: "+c.currentTheme.showPromoCode+" !important;\n}\n\n.crowdstart-loader {\n border-top: 1.1em solid "+c.currentTheme.spinnerTrail+" !important;\n border-right: 1.1em solid "+c.currentTheme.spinnerTrail+" !important;\n border-bottom: 1.1em solid "+c.currentTheme.spinnerTrail+" !important;\n border-left: 1.1em solid "+c.currentTheme.spinner+" !important;\n}\n\n.crowdstart-progress li {\n color: "+c.currentTheme.dark+" !important;\n}\n\n.crowdstart-progress li:before {\n color: "+c.currentTheme.light+" !important;\n background-color: "+c.currentTheme.dark+" !important;\n}\n\n.crowdstart-progress li:after {\n background: "+c.currentTheme.dark+" !important;\n}\n\n.crowdstart-progress li.active {\n color: "+c.currentTheme.progress+" !important;\n}\n\n.crowdstart-progress li.active:before, .crowdstart-progress li.active:after{\n background: "+c.currentTheme.progress+" !important;\n color: "+c.currentTheme.light+' !important;\n}\n\n.crowdstart-checkbox-control input[type="checkbox"] + label .crowdstart-checkbox {\n border: 1px solid '+c.currentTheme.medium+" !important;\n}\n\n.crowdstart-checkbox-short-part {\n background-color: "+c.currentTheme.dark+" !important;\n}\n\n.crowdstart-checkbox-long-part {\n background-color: "+c.currentTheme.dark+" !important;\n}\n\n.select2-results__option--highlighted {\n color: "+c.currentTheme.light+" !important !important;\n}\n/* End Colors */\n\n/* Border Radius */\n.crowdstart-checkout {\n border-radius: "+c.currentTheme.borderRadius+"px !important;\n}\n\n.crowdstart-form-control input,\n.select2-container input {\n border-radius: "+c.currentTheme.borderRadius+"px !important;\n}\n\n.select2-dropdown {\n border-radius: "+c.currentTheme.borderRadius+"px !important;\n}\n\n.select2-selection {\n border-radius: "+c.currentTheme.borderRadius+"px !important;\n}\n\n.crowdstart-promocode-button {\n border-radius: "+c.currentTheme.borderRadius+"px !important;\n}\n\n.crowdstart-checkout-button, .crowdstart-error-button {\n border-radius: "+c.currentTheme.borderRadius+"px !important;\n}\n\n.crowdstart-progress li:before {\n border-radius: "+(c.currentTheme.borderRadius>0?3:0)+"px !important;\n}\n/* End Border Radius */\n\n/* Font Family */\n.crowdstart-checkout {\n font-family: "+c.currentTheme.fontFamily+";\n}\n\n.select2 *, .select2-results *, .select2-container * {\n font-family: "+c.currentTheme.fontFamily+';\n}\n\n.social__icon, [class^="social__icon"] {\n border-radius: '+(c.currentTheme.borderRadius>0?"100%":"0px")+" !important;\n}\n\n/* End Font Family */\n\n/* Lock Icon */\n\n.icon-lock .lock-top-1, .icon-lock .lock-body {\n background-color: "+c.currentTheme.dark+" !important;\n}\n\n.icon-lock .lock-top-2, .icon-lock .lock-hole {\n background-color: "+c.currentTheme.background+" !important;\n}\n\n/* End Lock Icon */\n\n/* Tabs */\n\ntabs:before,\ntabs:after {\n border-bottom: 1px solid "+c.currentTheme.medium+" !important;\n}\n\ntabs > * {\n border-bottom: 1px solid "+c.currentTheme.medium+" !important;\n}\n\n.crowdstart-tab.crowdstart-tab-selected {\n border: 1px solid "+c.currentTheme.medium+" !important;\n border-bottom: 0 !important;\n}\n\n/* End Tabs */")}},c.setTheme({background:"white",light:"white",dark:"lightslategray",medium:"#DDDDDD",error:"red",promoCodeForeground:"white",promoCodeBackground:"lightslategray",calloutForeground:"white",calloutBackground:"#27AE60",showPromoCode:"steelblue",progress:"#27AE60",spinner:"rgb(255,255,255)",
spinnerTrail:"rgba(255,255,255,0.2)",fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",borderRadius:5}),e.exports=c}),t.define("./utils/analytics",function(e,t,n,r,o){e.exports={track:function(e,t){return null!=window.analytics?window.analytics.track(e,t):void 0}}}),t.define("./events",function(e,n,r,o,i){var a,s;s=t("crowdcontrol/lib"),a=s.Events,a.Screen={TryNext:"screen-try-next",Next:"screen-next",Back:"screen-back",UpdateScript:"screen-update-script",DisableBack:"screen-disable-back",EnableBack:"screen-enable-back",SyncScript:"screen-sync-script",Payment:{ChooseStripe:"screen-payment-choose-stripe",ChoosePaypal:"screen-payment-choose-paypal"}},a.Checkout={Update:"checkout-update",Done:"checkout-done"},a.Modal={Open:"modal-open",Close:"modal-close",DisableClose:"modal-disable-close",EnableClose:"modal-enable-close"},a.Confirm={Error:"confirm-error",Hide:"confirm-hide",Show:"confirm-show",Lock:"confirm-lock",Unlock:"confirm-unlock"},a.Invoice={Hide:"invoice-hide",Show:"invoice-show"},a.Country={Set:"country-set"}}),t.define("./views",function(e,n,r,o,i){e.exports={Confirm:t("./views/confirm"),Header:t("./views/header"),Invoice:t("./views/invoice"),LineItem:t("./views/lineitem"),Modal:t("./views/modal"),Promo:t("./views/promo"),Tabs:t("./views/tabs"),Widget:t("./views/widget"),ScreenManager:t("./views/screenmanager"),Controls:t("./views/controls"),Screens:t("./views/screens")}}),t.define("./views/confirm",function(e,n,r,o,i){var a,s,c,l,u,d=function(e,t){function n(){this.constructor=e}for(var r in t)p.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},p={}.hasOwnProperty;l=t("crowdcontrol/lib"),s=l.Events,c=l.view.form.FormView,u=t("./utils/input"),a=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return d(n,e),n.prototype.tag="confirm",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/confirm"),n.prototype.locked=!1,n.prototype.hide=!1,n.prototype.error="",n.prototype.index=0,n.prototype.model={agreed:!1},n.prototype.inputConfigs=[u("agreed","","checkbox terms")],n.prototype.events=(r={},r[""+s.Screen.SyncScript]=function(e,t){return this.index=t,this.update()},r[""+s.Confirm.Error]=function(e){return this.error=e},r[""+s.Confirm.Hide]=function(){return this.setHide(!0)},r[""+s.Confirm.Show]=function(){return this.setHide(!1)},r[""+s.Confirm.Lock]=function(){return this.setLock(!0)},r[""+s.Confirm.Unlock]=function(){return this.setLock(!1)},r),n.prototype.setHide=function(e){return this.hide=e,this.update()},n.prototype.setLock=function(e){return this.locked=e,this.update()},n.prototype.hasError=function(){return null!=this.error&&""!==this.error},n.prototype.js=function(e){return n.__super__.js.apply(this,arguments),this.config=e.config},n.prototype._submit=function(e){return this.locked?!1:this.obs.trigger(s.Screen.TryNext,e)},n}(c),a.register(),e.exports=a}),t.define("./utils/input",function(e,n,r,o,i){var a,s;s=t("crowdcontrol/lib"),a=s.view.form.InputConfig,e.exports=function(e,t,n,r){return null==r&&(r=""),new a(e,r,t,n)}}),t.define("./Users/dtai/work/verus/checkout/templates/confirm",function(e,t,n,r,o){e.exports='<div if="{ !hide }" class="crowdstart-terms"><control input="{ inputs.agreed }"></control>I have read and agree to <a target="_blank" href="{ config.termsUrl }">these terms and conditions.</a></div><div onclick="{ submit }" if="{ !hide }" class="crowdstart-button"><div if="{ locked }" class="crowdstart-loader"></div><div if="{ locked }">Processing</div><div if="{ !locked }">{ config.callToActions[index] || config.callToActions[0] || \'confirm\' }</div></div><div if="{ hasError() }" class="crowdstart-message">{ error }</div>'}),t.define("./views/header",function(e,n,r,o,i){var a,s,c,l,u=function(e,t){function n(){this.constructor=e}for(var r in t)d.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,c=l.view.View,s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return u(n,e),n.prototype.tag="header",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/header"),n.prototype.showBack=!0,n.prototype.index=0,n.prototype.scriptRefs=null,n.prototype.events=(r={},r[""+a.Screen.SyncScript]=function(e,t){return this.syncScript(e,t)},r),n.prototype.syncScript=function(e,t){return this.scriptRefs=e,this.index=t,null!=this.scriptRefs&&null!=this.scriptRefs[this.index]&&(this.showBack=this.scriptRefs[this.index].showBack),this.update()},n.prototype.back=function(){return this.obs.trigger(""+a.Screen.Back)},n.prototype.close=function(){return this.obs.trigger(""+a.Modal.Close)},n}(c),s.register(),e.exports=s}),t.define("./Users/dtai/work/verus/checkout/templates/header",function(e,t,n,r,o){e.exports='<div if="{ index > 0 && showBack }" onclick="{ back }" class="crowdstart-back"><span>➜</span></div><ul class="crowdstart-progress"><li each="{ ref, i in scriptRefs }" class="{ active: this.parent.index >= i }">{ ref.title }</li></ul><div onclick="{ close }" class="crowdstart-close"></div>'}),t.define("./views/invoice",function(e,n,r,o,i){var a,s,c,l,u=function(e,t){function n(){this.constructor=e}for(var r in t)d.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,c=l.view.View,s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return u(n,e),n.prototype.tag="invoice",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/invoice"),n.prototype.client=null,n.prototype.config=null,n.prototype.hide=!1,n.prototype.renderCurrency=t("./utils/currency").renderUICurrencyFromJSON,n.prototype.events=(r={},r[""+a.Invoice.Hide]=function(){return this.setHide(!0)},r[""+a.Invoice.Show]=function(){return this.setHide(!1)},r),n.prototype.setHide=function(e){return this.hide=e,this.update()},n.prototype.js=function(e){return this.client=e.client,this.config=e.config},n.prototype.subtotal=function(){var e,t,n,r,o;for(n=this.model.items,o=-this.model.discount||0,e=0,r=n.length;r>e;e++)t=n[e],o+=t.price*t.quantity;return this.model.subtotal=o,o},n.prototype.shipping=function(){var e,t;return e=this.model.items,t=this.model.shippingRate||0,this.model.shipping=t},n.prototype.taxRate=function(){return 100*(this.model.taxRate||0)},n.prototype.tax=function(){return this.model.tax=Math.ceil((this.model.taxRate||0)*this.subtotal())},n.prototype.total=function(){var e;return e=this.subtotal()+this.shipping()+this.tax(),this.model.total=e,e},n}(c),s.register(),e.exports=s}),t.define("./Users/dtai/work/verus/checkout/templates/invoice",function(e,t,n,r,o){e.exports='<div if="{ !hide }"><div class="crowdstart-items crowdstart-form-control"><label>Cart</label><div class="crowdstart-sep"></div><lineitem each="{ item, i in model.items }" currency="{ this.parent.model.currency }" model="{ item }" invoiceobs="{ this.parent.obs }"></lineitem></div><promo order="{ model }" client="{ client }" if="{ config.showPromoCode }"></promo><div class="crowdstart-totals"><div class="crowdstart-sep"></div><div class="crowdstart-subotal"><div class="column crowdstart-receipt-label">Subtotal</div><div class="column crowdstart-money">{ renderCurrency(model.currency, subtotal()) }</div></div><div class="crowdstart-shipping-and-handling"><div class="column crowdstart-receipt-label">Shipping & Handling</div><div class="column crowdstart-money">{ renderCurrency(model.currency, shipping()) }</div></div><div class="crowdstart-tax"><div class="column crowdstart-receipt-label">Taxes ({ taxRate() }%)</div><div class="column crowdstart-money">{ renderCurrency(model.currency, tax()) }</div></div><div class="crowdstart-sep"></div><div class="crowdstart-total"><div class="column crowdstart-receipt-label">Total</div><div class="column crowdstart-money">{ renderCurrency(model.currency, total()) } ({model.currency.toUpperCase()})</div></div></div></div><div if="{ !hide && config.shippingDetails != "" }" class="crowdstart-shipping-details">{ config.shippingDetails }</div>'}),t.define("./utils/currency",function(e,n,r,o,i){var a,s,c,l;s=t("./data/currencies").data,a=".",c=new RegExp("[^\\d.-]","g"),l=function(e){return"bif"===e||"clp"===e||"djf"===e||"gnf"===e||"jpy"===e||"kmf"===e||"krw"===e||"mga"===e||"pyg"===e||"rwf"===e||"vnd"===e||"vuv"===e||"xaf"===e||"xof"===e||"xpf"===e?!0:!1},e.exports={renderUpdatedUICurrency:function(e,t){var n;return n=s[e],Util.renderUICurrencyFromJSON(Util.renderJSONCurrencyFromUI(t))},renderUICurrencyFromJSON:function(e,t){var n;if(n=s[e],t=""+t,l(e))return n+t;for(;t.length<3;)t="0"+t;return n+t.substr(0,t.length-2)+"."+t.substr(-2)},renderJSONCurrencyFromUI:function(e,t){var n,r;if(n=s[e],l(e))return parseInt((""+t).replace(c,"").replace(a,""),10);if(r=t.split(a),r.length>1)for(r[1]=r[1].substr(0,2);r[1].length<2;)r[1]+="0";else r[1]="00";return parseInt(100*parseFloat(r[0].replace(c,""))+parseFloat(r[1].replace(c,"")),10)}}}),t.define("./data/currencies",function(e,t,n,r,o){e.exports={data:{aud:"$",cad:"$",eur:"€",gbp:"£",hkd:"$",jpy:"¥",nzd:"$",sgd:"$",usd:"$",ghc:"¢",ars:"$",bsd:"$",bbd:"$",bmd:"$",bnd:"$",kyd:"$",clp:"$",cop:"$",xcd:"$",svc:"$",fjd:"$",gyd:"$",lrd:"$",mxn:"$",nad:"$",sbd:"$",srd:"$",tvd:"$",bob:"$b",uyu:"$u",egp:"£",fkp:"£",gip:"£",ggp:"£",imp:"£",jep:"£",lbp:"£",shp:"£",syp:"£",cny:"¥",afn:"؋",thb:"฿",khr:"៛",crc:"₡",trl:"₤",ngn:"₦",kpw:"₩",krw:"₩",ils:"₪",vnd:"₫",lak:"₭",mnt:"₮",cup:"₱",php:"₱",uah:"₴",mur:"₨",npr:"₨",pkr:"₨",scr:"₨",lkr:"₨",irr:"﷼",omr:"﷼",qar:"﷼",sar:"﷼",yer:"﷼",pab:"b/.",vef:"bs",bzd:"bz$",nio:"c$",chf:"chf",huf:"ft",awg:"ƒ",ang:"ƒ",pyg:"gs",jmd:"j$",czk:"kč",bam:"km",hrk:"kn",dkk:"kr",eek:"kr",isk:"kr",nok:"kr",sek:"kr",hnl:"l",ron:"lei",all:"lek",lvl:"ls",ltl:"lt",mzn:"mt",twd:"nt$",bwp:"p",byr:"p.",gtq:"q",zar:"r",brl:"r$",dop:"rd$",myr:"rm",idr:"rp",sos:"s",pen:"s/.",ttd:"tt$",zwd:"z$",pln:"zł",mkd:"ден",rsd:"Дин.",bgn:"лв",kzt:"лв",kgs:"лв",uzs:"лв",azn:"ман",rub:"руб",inr:"","try":"","":""}}}),t.define("./views/lineitem",function(e,n,r,o,i){var a,s,c,l,u,d=function(e,t){function n(){this.constructor=e}for(var r in t)p.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},p={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,s=l.view.form.FormView,u=t("./utils/input"),c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,e),n.prototype.tag="lineitem",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/lineitem"),n.prototype.renderCurrency=t("./utils/currency").renderUICurrencyFromJSON,n.prototype.inputConfigs=[u("quantity","","quantity-select parsenumber")],n.prototype.invoiceObs=null,n.prototype.js=function(e){return n.__super__.js.apply(this,arguments),this.currency=e.currency},n}(s),c.register(),e.exports=c}),t.define("./Users/dtai/work/verus/checkout/templates/lineitem",function(e,t,n,r,o){e.exports='<div class="{ crowdstart-line-item: true, crowdstart-collapsed: model.quantity == 0, crowdstart-hidden: model.quantity == 0 }"><div class="crowdstart-quantity-select crowdstart-form-control"><control input="{ inputs.quantity }" style="{ "width:50px" }"></control></div><div class="crowdstart-item-description">{ model.productName }</div><div class="crowdstart-item-price crowdstart-money">x { renderCurrency(currency, model.price) }<div if="{ model.price < model.listPrice }" class="crowdstart-item-list-price crowdstart-money">{ renderCurrency(currency, model.listPrice) }</div></div><div class="crowdstart-item-total-price crowdstart-money">= { renderCurrency(currency, model.quantity * model.price) }</div></div>'}),t.define("./views/modal",function(e,n,r,o,i){var a,s,c,l,u=function(e,t){function n(){this.constructor=e}for(var r in t)d.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,c=l.view.View,s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return u(n,e),n.prototype.tag="modal",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/modal"),n.prototype.isOpen=!1,n.prototype.canClose=!0,n.prototype.events=(r={},r[""+a.Modal.Open]=function(){return this.open()},r[""+a.Modal.Close]=function(){return this.close()},r[""+a.Modal.DisableClose]=function(){return this.canClose=!1},r[""+a.Modal.EnableClose]=function(){return this.canClose=!0},r),n.prototype.js=function(e){return this.client=e.client,$(document).on("keydown",this.closeOnEscape)},n.prototype.open=function(){return this.isOpen=!0,this.update()},n.prototype.close=function(){return this.canClose?(this.isOpen=!1,this.update()):!0},n.prototype.closeOnEscape=function(e){return 27===e.which?this.close():void 0},n}(c),s.register(),e.exports=s}),t.define("./Users/dtai/work/verus/checkout/templates/modal",function(e,t,n,r,o){e.exports='<div class="{ crowdstart-active: isOpen }"><div class="crowdstart-modal-target"><yield></yield></div><div onclick="{ close }" class="crowdstart-modal"></div></div>'}),t.define("./views/promo",function(e,n,r,o,i){var a,s,c,l,u,d,p,f=function(e,t){function n(){this.constructor=e}for(var r in t)h.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},h={}.hasOwnProperty;p=t("riot/riot"),l=t("crowdcontrol/lib"),a=l.Events,s=l.view.form.FormView,d=t("raf"),u=t("./utils/input"),c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return f(n,e),n.prototype.tag="promo",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/promo"),n.prototype.renderCurrency=t("./utils/currency").renderUICurrencyFromJSON,n.prototype.order=null,n.prototype.client=null,n.prototype.freeProduct=null,n.prototype.model={promoCode:""},n.prototype.codeApplied=!1,n.prototype.clickedApplyPromoCode=!0,n.prototype.locked=!1,n.prototype.invalidCode="",n.prototype.inputConfigs=[u("promoCode","Promo/Coupon Code","input uppercase trim")],n.prototype.js=function(e){return n.__super__.js.apply(this,arguments),this.order=e.order,this.coupon=e.coupon,this.client=e.client},n.prototype.isApplicable=function(){var e,t,n,r;if(null==this.order.coupon.productId||""===this.order.coupon.productId)return!0;for(r=this.order.items,e=0,n=r.length;n>e;e++)return t=r[e],t.productId===this.order.coupon.productId?!0:!1},n.prototype.discount=function(){var e,t,n,r,o,i,a,s,c,l,u;switch(this.order.coupon.type){case"flat":if(null==this.order.coupon.productId||""===this.order.coupon.productId)return this.order.discount=this.order.coupon.amount||0,p.update(),this.order.discount;for(e=0,c=this.order.items,t=0,i=c.length;i>t;t++)n=c[t],n.productId===this.order.coupon.productId&&(e+=(this.order.coupon.amount||0)*n.quantity);return this.order.discount=e,p.update(),e;case"percent":if(e=0,null==this.order.coupon.productId||""===this.order.coupon.productId)for(l=this.order.items,r=0,a=l.length;a>r;r++)n=l[r],e+=(this.order.coupon.amount||0)*n.price*n.quantity*.01;else for(u=this.order.items,o=0,s=u.length;s>o;o++)n=u[o],n.productId===this.order.coupon.productId&&(e+=(this.order.coupon.amount||0)*n.price*n.quantity*.01);return e=Math.floor(e),this.order.discount=e,p.update(),e}return this.order.discount=0,p.update(),0},n.prototype._change=function(){return n.__super__._change.apply(this,arguments),d(function(e){return function(){return e.clickedApplyPromoCode=!1,setTimeout(function(){return e.update()},200)}}(this))},n.prototype.resetState=function(){return this.invalidCode=""},n.prototype._submit=function(){return""!==this.model.promoCode?(this.locked=!0,this.codeApplied=!1,this.clickedApplyPromoCode=!0,this.invalidCode="",this.freeProduct=null,this.update(),this.client.coupon.get(this.model.promoCode).then(function(e){return function(t){return t.enabled?(e.order.coupon=t,e.order.couponCodes=[e.model.promoCode],""!==t.freeProductId&&t.freeQuantity>0?e.client.util.product(t.freeProductId).then(function(n){return e.freeProduct=n.responseText,e.freeProduct.quantity=t.freeQuantity,e.codeApplied=!0,e.locked=!1,e.update()})["catch"](function(t){return e.codeApplied=!0,e.locked=!1,e.update(),console.log("couponFreeProduct Error: "+t)}):(e.codeApplied=!0,e.locked=!1)):(e.invalidCode="expired",e.clickedApplyPromoCode=!1,e.locked=!1),e.update()}}(this))["catch"](function(e){return function(t){return e.locked=!1,e.invalidCode="invalid",e.clickedApplyPromoCode=!1,e.update()}}(this))):void 0},n}(s),c.register(),e.exports=c}),t.define("./Users/dtai/work/verus/checkout/templates/promo",function(e,t,n,r,o){e.exports='<div class="crowdstart-form-control"><control input="{ inputs.promoCode }" onclick="{ resetState }"></control><div onclick="{ submit }" if="{ !hide }" class="crowdstart-button"><div if="{ locked }" class="crowdstart-loader"></div><div if="{ locked }">...</div><div if="{ !locked && !codeApplied }">Apply</div><div if="{ !locked && codeApplied }">Apply</div></div><div if="{ !locked && codeApplied && !freeProduct && isApplicable() }" class="crowdstart-promo-discount"><div class="crowdstart-promo-label">You Saved</div><div class="crowdstart-money">{ renderCurrency(order.currency, discount()) }</div></div><div if="{ !locked && codeApplied && !freeProduct && !isApplicable() }">Code Not Applicable</div><div if="{ !locked && codeApplied && freeProduct }" class="crowdstart-promo-item"><div if="{ freeProduct.quantity === 1 }" class="crowdstart-promo-label">Free</div><div if="{ freeProduct.quantity > 1 }" class="crowdstart-promo-label">{ freeProduct.quantity } Free</div><div class="crowdstart-promo-item-name">{ freeProduct.name }</div></div><div if="{ !locked && invalidCode === \'\' && model.promoCode !== \'\' && !clickedApplyPromoCode}">Don\'t forget to apply your code!</div><div if="{ !locked && invalidCode === \'expired\'}">Expired</div><div if="{ !locked && invalidCode === \'invalid\'}">Invalid Code</div></div>'}),t.define("./views/tabs",function(e,n,r,o,i){var a,s,c,l,u,d=function(e,t){function n(){this.constructor=e}for(var r in t)p.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},p={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,c=l.view.View,u=t("./utils/input"),s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,e),n.prototype.tag="tabs",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/tabs"),n.prototype.selected="stripe",n.prototype.chooseStripe=function(){return this.selected="stripe",this.obs.trigger(a.Screen.Payment.ChooseStripe)},n.prototype.choosePaypal=function(){return this.selected="paypal",this.obs.trigger(a.Screen.Payment.ChoosePaypal)},n}(c),s.register(),e.exports=s}),t.define("./Users/dtai/work/verus/checkout/templates/tabs",function(e,t,n,r,o){e.exports='<div onclick="{ chooseStripe }" class="crowdstart-tab { crowdstart-tab-selected: selected == "stripe" }">Credit Card</div><div onclick="{ choosePaypal }" class="crowdstart-tab { crowdstart-tab-selected: selected == "paypal" }"><img src="https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg"/></div><div class="crowdstart-tab-padding"></div>'}),t.define("./views/widget",function(e,n,r,o,i){var a,s,c,l,u=function(e,t){function n(){this.constructor=e}for(var r in t)d.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,s=l.view.View,c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return u(n,e),n.prototype.tag="widget",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/widget"),n.prototype.js=function(e){return this.client=e.client},n}(s),c.register(),e.exports=c}),t.define("./Users/dtai/work/verus/checkout/templates/widget",function(e,t,n,r,o){e.exports='<div class="crowdstart-checkout crowdstart-widget { crowdstart-narrow: model.config.narrow }"><div class="crowdstart-row"><header obs="{ obs }"></header></div><div class="crowdstart-row"><div class="crowdstart-column crowdstart-full-width"><screen-manager model="{ model }" obs="{ obs }" client="{ client }"></screen-manager></div><div class="crowdstart-column"><invoice model="{ model.order }" config="{ model.config }" client="{ client }" obs="{ obs }"></invoice></div></div><div class="crowdstart-row"><confirm obs="{ obs }" config="{ model.config }"></confirm></div></div>'}),t.define("./views/screenmanager",function(e,n,r,o,i){var a,s,c,l,u,d,p=function(e,t){function n(){this.constructor=e}for(var r in t)f.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},f={}.hasOwnProperty;d=t("riot/riot"),l=t("crowdcontrol/lib"),a=l.Events,c=l.view.View,u=t("raf"),s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return p(n,e),n.prototype.tag="screen-manager",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/screenmanager"),n.prototype.index=0,n.prototype.script=null,n.prototype.scriptRefs=null,n.prototype.style="",n.prototype.events=(r={},r[""+a.Screen.UpdateScript]=function(e,t){return this.updateScript(e,t)},r[""+a.Screen.TryNext]=function(){return this.tryNext()},r[""+a.Screen.Next]=function(){return this.next()},r[""+a.Screen.Back]=function(){return this.back()},r),n.prototype.tryNext=function(){var e;return this.index<this.script.length&&null!=(e=this.scriptRefs[this.index])?e.submit():void 0},n.prototype.next=function(){var e;return this.index<this.script.length-1?(this.index++,this.updateConfirmAndBackAndInvoice(),null!=(e=this.scriptRefs[this.index])&&e.show(),this.update()):void 0},n.prototype.back=function(){var e;return this.index>0?(this.index--,this.updateConfirmAndBackAndInvoice(),null!=(e=this.scriptRefs[this.index])&&e.show(),this.update()):void 0},n.prototype.updateConfirmAndBackAndInvoice=function(){var e,t;return t=!0,e=!1,null!=this.scriptRefs&&this.scriptRefs[this.index]&&(this.scriptRefs[this.index].showInvoice||(e=!0,this.obs.trigger(a.Invoice.Hide)),this.scriptRefs[this.index].showConfirm||(t=!1,this.obs.trigger(a.Confirm.Hide))),t&&this.obs.trigger(a.Confirm.Show),e?void 0:this.obs.trigger(a.Invoice.Show)},n.prototype.updateScript=function(e,t){null==t&&(t=0);{if(this.script!==e)return this.script=e,this.index=t,u(function(t){return function(){var n,r,o,i,a,s,c,l,u,p,f;if(null!=t.scriptRefs)for(l=t.scriptRefs,o=0,a=l.length;a>o;o++)c=l[o],null!=c&&c.unmount();for(t.scriptRefs=[],n=$(".crowdstart-screen-strip"),n.html(""),f=t.script.length,u=t.script,i=0,s=u.length;s>i;i++)e=u[i],n.append($("<"+e+">")),r=d.mount(e,{model:t.model,total:f,screenManagerObs:t.obs,client:t.client}),t.scriptRefs.push(r[0]);return t.updateConfirmAndBackAndInvoice(),null!=(p=t.scriptRefs[t.index])&&p.show(),t.update(),d.update()}}(this));if(this.index!==t)return this.index=t,this.updateConfirmAndBackAndInvoice(),void this.update()}},n.prototype.js=function(e){var t;return this.client=e.client,this.updateScript(e.script||[]),t=function(e){return function(){var t;return t=$(e.root),t.width(t.parent().outerWidth()),t.height($(t.find(".crowdstart-screen-strip").children()[e.index]).outerHeight()),t}}(this),$(window).on("resize",t),this.on("update",function(e){return function(){var t,n;return n=e.script.length,t=$(e.root),t.find(".crowdstart-screen-strip").css({transform:"translateX(-"+100*e.index/n+"%)",width:100*n+"%"})}}(this)),this.on("updated",function(e){return function(){var n,r,o,i,s,c,l;for(o=t(),r=o.find(".crowdstart-screen-strip").children(),s=c=0,l=r.length;l>c;s=++c)i=r[s],n=$(i).children(),s===e.index?(n.css("display",""),function(e){return u(function(){return e.css("opacity",1),o.height(e.outerHeight())})}(n)):(n.css("opacity",0),function(e){return setTimeout(function(){return e.css("display","none")},500)}(n));return e.obs.trigger(a.Screen.SyncScript,e.scriptRefs,e.index),u(function(){return t()})}}(this)),this.on("unmount",function(){return $(window).off("resize",t)})},n}(c),s.register(),e.exports=s}),t.define("./Users/dtai/work/verus/checkout/templates/screenmanager",function(e,t,n,r,o){e.exports='<div class="crowdstart-screens crowdstart-form-control"><div class="crowdstart-screen-strip"></div></div>'}),t.define("./views/controls",function(e,n,r,o,i){var a,s,c,l,u,d,p,f,h,m,g,v,y,b,w,x,j,_,k,C,E=function(e,t){function n(){this.constructor=e}for(var r in t)S.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},S={}.hasOwnProperty;b=t("crowdcontrol/lib"),l=b.Events,d=b.view.form.InputView,C=t("raf"),p=t("broken/lib"),v=t("./utils/analytics"),x=b.view.form.helpers,x.defaultTagName="crowdstart-input",k=t("is-object"),_=t("is-number"),u=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return E(n,e),n.prototype.tag="crowdstart-input",n.prototype.errorHtml=t("./Users/dtai/work/verus/checkout/templates/control/error"),n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/control/input"),n.prototype.js=function(e){return this.model=e.input?e.input.model:this.model},n}(d),u.register(),a=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return E(n,e),n.prototype.tag="crowdstart-card-number",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/control/cardnumber"),n}(u),a.register(),g=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return E(t,e),t.prototype.tag="crowdstart-static",t.prototype.html="<span>{ model.value }</span>",t}(u),g.register(),s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return E(n,e),n.prototype.tag="crowdstart-checkbox",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/control/checkbox"),n.prototype.change=function(e){var t;return t=e.target.checked,t!==this.model.value?(this.obs.trigger(l.Input.Change,this.model.name,t),this.model.value=t,this.update()):void 0},n}(u),s.register(),j=window.navigator.userAgent.indexOf("MSIE")>0||window.navigator.userAgent.indexOf("Trident")>0,h=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return E(n,e),n.prototype.tag="crowdstart-select",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/control/select"),n.prototype.tags=!1,n.prototype.min=10,n.prototype.lastValueSet=null,n.prototype.events=(r={},r[""+l.Input.Set]=function(e,t){return e===this.model.name&&null!=t?(this.clearError(),this.model.value=t,riot.update()):void 0},r),n.prototype.options=function(){return this.selectOptions},n.prototype.changed=!1,n.prototype.change=function(e){var t;return t=$(e.target).val(),t!==this.model.value&&parseFloat(t)!==this.model.value?(this.obs.trigger(l.Input.Change,this.model.name,t),this.model.value=t,this.changed=!0,this.update()):void 0},n.prototype.isCustom=function(e){var t,n,r;n=e,null==n&&(n=this.options());for(t in n)if(r=n[t],k(r)){if(!this.isCustom(r))return!1}else if(t===this.model.value)return!1;return!0},n.prototype.initSelect=function(e){return e.select2({tags:this.tags,placeholder:this.model.placeholder,minimumResultsForSearch:this.min,width:j?"100%":void 0}).change(function(e){return function(t){return e.change(t)}}(this))},n.prototype.js=function(e){return n.__super__.js.apply(this,arguments),e.style=e.style||"width:100%",this.selectOptions=e.options,this.on("updated",function(e){return function(){var t;return t=$(e.root).find("select"),null==t[0]?C(function(){return e.update()}):(j&&$(e.root).children(".select2").css({width:"100%"}),e.initialized?e.changed?C(function(){return e.isCustom()&&(t.select("destroy"),e.initSelect(t)),e.changed=!1,t.select2("val",e.model.value)}):void 0:C(function(){return e.initSelect(t),e.initialized=!0,e.changed=!0}))}}(this)),this.on("unmount",function(e){return function(){var t;return t=$(e.root).find("select")}}(this))},n}(u),h.register(),f=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return E(t,e),t.prototype.tag="crowdstart-quantity-select",t.prototype.options=function(){return{1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9}},t.prototype.change=function(e){var n,r,o;return o=this.model.value,t.__super__.change.apply(this,arguments),r=this.model.value,n=r-o,n>0?v.track("Added Product",{id:this.model.productId,sku:this.model.productSlug,name:this.model.productName,quantity:n,price:parseFloat(this.model.price/100)}):0>n?v.track("Removed Product",{id:this.model.productId,sku:this.model.productSlug,name:this.model.productName,quantity:n,price:parseFloat(this.model.price/100)}):void 0},t}(h),f.register(),m=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return E(n,e),n.prototype.tag="crowdstart-state-select",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/control/stateselect"),n.prototype.country="",n.prototype.events=(r={},r[""+l.Country.Set]=function(e){return this.country=e,"us"===this.country?(this.obs.trigger,$(this.root).find(".select2").show()):($(this.root).find(".select2").hide(),null!=this.model.value?this.model.value=this.model.value.toUpperCase():void 0)},r),n.prototype.options=function(){return t("./data/states")},n.prototype.js=function(){return n.__super__.js.apply(this,arguments),null!=this.model.value?this.model.value=this.model.value.toLowerCase():void 0},n}(h),m.register(),c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return E(n,e),n.prototype.tag="crowdstart-country-select",n.prototype.min=1,n.prototype.events=(r={},r[""+l.Input.Set]=function(e,t){return e===this.model.name&&null!=t?(this.clearError(),this.model.value=t,this.obs.trigger(l.Country.Set,t),riot.update()):void 0},r),n.prototype.options=function(){return t("./data/countries").data},n.prototype.js=function(){return n.__super__.js.apply(this,arguments),null!=this.model.value&&(this.model.value=this.model.value.toLowerCase()),this.obs.trigger(l.Country.Set,this.model.value)},n}(h),c.register(),x.registerTag(function(e){return e.hints.input},"crowdstart-input"),x.registerTag(function(e){return e.hints.cardnumber},"crowdstart-card-number"),x.registerTag(function(e){return e.hints["static"]},"crowdstart-static"),x.registerTag(function(e){return e.hints.checkbox},"crowdstart-checkbox"),x.registerTag(function(e){return e.hints.select},"crowdstart-select"),x.registerTag(function(e){return e.hints["state-select"]},"crowdstart-state-select"),x.registerTag(function(e){return e.hints["country-select"]},"crowdstart-country-select"),x.registerTag(function(e){return e.hints["quantity-select"]},"crowdstart-quantity-select"),y=t("./utils/country"),x.registerValidator(function(e){return e.hints.input||e.hints.password},function(e,t){var n;return n=e[t],_(n)||(n=null!=n&&"function"==typeof n.trim?n.trim():void 0),n}),x.registerValidator(function(e){return e.hints.postalRequired},function(e,t){var n;if(n=e[t],y.requiresPostalCode(e.country||"")&&(null==n||""===n))throw new Error("Required for Selected Country");return n}),x.registerValidator(function(e){return e.hints.required},function(e,t){var n;if(n=e[t],_(n))return parseFloat(n);if(n=null!=n&&"function"==typeof n.trim?n.trim():void 0,null==n||""===n)throw new Error("Required");return n}),x.registerValidator(function(e){return e.hints.requiredstripe},function(e,t){var n;if(n=e[t],_(n))return n;if(n=null!=n&&"function"==typeof n.trim?n.trim():void 0,"stripe"===e._type&&(null==n||""===n))throw new Error("Required");return n}),x.registerValidator(function(e){return e.hints.uppercase},function(e,t){var n;return n=e[t].toUpperCase()}),x.registerValidator(function(e){return e.hints.terms},function(e,t){var n;if(n=e[t],!n)throw new Error("Please read and agree to the terms and conditions.");return n}),x.registerValidator(function(e){return e.hints.name},function(e,t){var n,r;return r=e[t],n=r.indexOf(" "),e.firstName=r.slice(0,n),e.lastName=r.slice(n+1),r}),x.registerValidator(function(e){return e.hints.cardnumber;
},function(e,t){var n;return n=e[t],n=null!=n&&"function"==typeof n.trim?n.trim():void 0,"stripe"!==e._type?n:new p(function(e,t){return C(function(){return $("input[name=number]").hasClass("jp-card-invalid")&&t(new Error("Enter a valid card number")),e(n)})})}),x.registerValidator(function(e){return e.hints.expiration},function(e,t){var n,r,o,i;if(i=e[t],i=null!=i&&"function"==typeof i.trim?i.trim():void 0,"stripe"!==e._type)return i;if(o=i.split("/"),o.length<2)throw new Error("Enter a valid expiration date");return e.month="function"==typeof(n=o[0]).trim?n.trim():void 0,e.year=(""+(new Date).getFullYear()).substr(0,2)+("function"==typeof(r=o[1]).trim?r.trim():void 0),new p(function(e,t){return C(function(){return $("input[name=expiry]").hasClass("jp-card-invalid")&&t(new Error("Enter a valid expiration date")),e(i)})})}),x.registerValidator(function(e){return e.hints.cvc},function(e,t){var n;return n=e[t],n=null!=n&&"function"==typeof n.trim?n.trim():void 0,"stripe"!==e._type?n:new p(function(e,t){return C(function(){return $("input[name=cvc]").hasClass("jp-card-invalid")&&t(new Error("Enter a valid CVC number")),e(n)})})}),w=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,x.registerValidator(function(e){return e.hints.email},function(e,t){var n;if(n=e[t],n=null!=n&&"function"==typeof n.trim?n.trim():void 0,!w.test(n))throw new Error("Enter a valid email");return n}),x.registerValidator(function(e){return e.hints.parsenumber},function(e,t){var n;return n=e[t],n=null!=n&&"function"==typeof n.trim?n.trim():void 0,parseFloat(n)})}),t.define("./Users/dtai/work/verus/checkout/templates/control/error",function(e,t,n,r,o){e.exports='<div if="{ hasError() }" class="crowdstart-message">{ error }</div>'}),t.define("./Users/dtai/work/verus/checkout/templates/control/input",function(e,t,n,r,o){e.exports='<label for="{ model.name }" if="{ opts.label }">{ opts.label }</label><input id="{ model.name }" name="{ opts.name || model.name }" onchange="{ change }" onblur="{ change }" value="{ model.value }" placeholder="{ model.placeholder }" class="{ crowdstart-error: hasError() }"/>'}),t.define("./Users/dtai/work/verus/checkout/templates/control/cardnumber",function(e,t,n,r,o){e.exports='<label for="{ model.name }" if="{ opts.label }">{ opts.label }<br/><div class="crowdstart-fine-print">(Visa, Mastercard, AMEX, Discover, Diners Club, JCB)</div><div class="icon-lock"><div class="lock-top-1"></div><div class="lock-top-2"></div><div class="lock-body"></div><div class="lock-hole"></div></div><div class="stripe-branding">Powered by<strong><a href="http://www.stripe.com" target="_blank"> Stripe</a></strong></div></label><input id="{ model.name }" name="{ opts.name || model.name }" onchange="{ change }" onblur="{ change }" value="{ model.value }" placeholder="{ model.placeholder }" class="{ crowdstart-error: hasError() }"/>'}),t.define("./Users/dtai/work/verus/checkout/templates/control/checkbox",function(e,t,n,r,o){e.exports='<div class="crowdstart-checkbox-control"><input id="{ model.name }" name="{ model.name }" type="checkbox" __checked="{ model.value }" onchange="{ change }" onblur="{ change }"/><label for="{ model.name }"><span class="crowdstart-checkbox"><div class="crowdstart-checkbox-parts"><div class="crowdstart-checkbox-short-part"></div><div class="crowdstart-checkbox-long-part"></div></div></span></label></div>'}),t.define("./Users/dtai/work/verus/checkout/templates/control/select",function(e,t,n,r,o){e.exports='<label for="{ model.name }" if="{ opts.label }">{ opts.label }</label><select id="{ model.name }" style="{ opts.style }" name="{ model.name }" onchange="{ change }" onblur="{ change }" value="{ model.value }" data-placeholder="{ model.placeholder }"><option if="{ model.placeholder }"><option each="{ value, name in options() }" value="{value}" __selected="{ this.parent.model.value == value }">{name}</option></option><optgroup if="{ tags && isCustom() }" label="Custom Events"><option value="{ model.value }" selected="true">{ model.value }</option></optgroup></select>'}),t.define("./Users/dtai/work/verus/checkout/templates/control/stateselect",function(e,t,n,r,o){e.exports='<label for="{ model.name }" if="{ opts.label }">{ opts.label }</label><input if="{ country !== "us" }" id="{ model.name }" name="{ opts.name || model.name }" onchange="{ change }" onblur="{ change }" value="{ model.value }" placeholder="{ model.placeholder }" class="{ crowdstart-error: hasError() }"/><select if="{ country == "us" }" id="{ model.name }" style="{ opts.style }" name="{ model.name }" onchange="{ change }" onblur="{ change }" value="{ model.value }" data-placeholder="{ model.placeholder }"><option if="{ model.placeholder }"><option each="{ value, name in options() }" value="{value}" __selected="{ this.parent.model.value == value }">{name}</option></option><optgroup if="{ tags && isCustom() }" label="Custom Events"><option value="{ model.value }" selected="true">{ model.value }</option></optgroup></select>'}),t.define("./data/states",function(e,t,n,r,o){e.exports={al:"Alabama",ak:"Alaska",az:"Arizona",ar:"Arkansas",ca:"California",co:"Colorado",ct:"Connecticut",de:"Delaware",dc:"District of Columbia",fl:"Florida",ga:"Georgia",hi:"Hawaii",id:"Idaho",il:"Illinois","in":"Indiana",ia:"Iowa",ks:"Kansas",ky:"Kentucky",la:"Louisiana",me:"Maine",mt:"Montana",ne:"Nebraska",nv:"Nevada",nh:"New Hampshire",nj:"New Jersey",nm:"New Mexico",ny:"New York",nc:"North Carolina",nd:"North Dakota",oh:"Ohio",ok:"Oklahoma",or:"Oregon",md:"Maryland",ma:"Massachusetts",mi:"Michigan",mn:"Minnesota",ms:"Mississippi",mo:"Missouri",pa:"Pennsylvania",ri:"Rhode Island",sc:"South Carolina",sd:"South Dakota",tn:"Tennessee",tx:"Texas",ut:"Utah",vt:"Vermont",va:"Virginia",wa:"Washington",wv:"West Virginia",wi:"Wisconsin",wy:"Wyoming",aa:"U.S. Armed Forces – Americas",ae:"U.S. Armed Forces – Europe",ap:"U.S. Armed Forces – Pacific"}}),t.define("./data/countries",function(e,t,n,r,o){e.exports={data:{af:"Afghanistan",ax:"Åland Islands",al:"Albania",dz:"Algeria",as:"American Samoa",ad:"Andorra",ao:"Angola",ai:"Anguilla",aq:"Antarctica",ag:"Antigua and Barbuda",ar:"Argentina",am:"Armenia",aw:"Aruba",au:"Australia",at:"Austria",az:"Azerbaijan",bs:"Bahamas",bh:"Bahrain",bd:"Bangladesh",bb:"Barbados",by:"Belarus",be:"Belgium",bz:"Belize",bj:"Benin",bm:"Bermuda",bt:"Bhutan",bo:"Bolivia",bq:"Bonaire, Sint Eustatius and Saba",ba:"Bosnia and Herzegovina",bw:"Botswana",bv:"Bouvet Island",br:"Brazil",io:"British Indian Ocean Territory",bn:"Brunei Darussalam",bg:"Bulgaria",bf:"Burkina Faso",bi:"Burundi",kh:"Cambodia",cm:"Cameroon",ca:"Canada",cv:"Cabo Verde",ky:"Cayman Islands",cf:"Central African Republic",td:"Chad",cl:"Chile",cn:"China",cx:"Christmas Island",cc:"Cocos (Keeling) Islands",co:"Colombia",km:"Comoros",cg:"Congo",cd:"Congo (Democratic Republic)",ck:"Cook Islands",cr:"Costa Rica",ci:"Côte d'Ivoire",hr:"Croatia",cu:"Cuba",cw:"Curaçao",cy:"Cyprus",cz:"Czech Republic",dk:"Denmark",dj:"Djibouti",dm:"Dominica","do":"Dominican Republic",ec:"Ecuador",eg:"Egypt",sv:"El Salvador",gq:"Equatorial Guinea",er:"Eritrea",ee:"Estonia",et:"Ethiopia",fk:"Falkland Islands",fo:"Faroe Islands",fj:"Fiji",fi:"Finland",fr:"France",gf:"French Guiana",pf:"French Polynesia",tf:"French Southern Territories",ga:"Gabon",gm:"Gambia",ge:"Georgia",de:"Germany",gh:"Ghana",gi:"Gibraltar",gr:"Greece",gl:"Greenland",gd:"Grenada",gp:"Guadeloupe",gu:"Guam",gt:"Guatemala",gg:"Guernsey",gn:"Guinea",gw:"Guinea-Bissau",gy:"Guyana",ht:"Haiti",hm:"Heard Island and McDonald Islands",va:"Holy See",hn:"Honduras",hk:"Hong Kong",hu:"Hungary",is:"Iceland","in":"India",id:"Indonesia",ir:"Iran",iq:"Iraq",ie:"Ireland",im:"Isle of Man",il:"Israel",it:"Italy",jm:"Jamaica",jp:"Japan",je:"Jersey",jo:"Jordan",kz:"Kazakhstan",ke:"Kenya",ki:"Kiribati",kp:"Korea (Democratic People's Republic of)",kr:"Korea (Republic of)",kw:"Kuwait",kg:"Kyrgyzstan",la:"Lao People's Democratic Republic",lv:"Latvia",lb:"Lebanon",ls:"Lesotho",lr:"Liberia",ly:"Libya",li:"Liechtenstein",lt:"Lithuania",lu:"Luxembourg",mo:"Macao",mk:"Macedonia",mg:"Madagascar",mw:"Malawi",my:"Malaysia",mv:"Maldives",ml:"Mali",mt:"Malta",mh:"Marshall Islands",mq:"Martinique",mr:"Mauritania",mu:"Mauritius",yt:"Mayotte",mx:"Mexico",fm:"Micronesia",md:"Moldova",mc:"Monaco",mn:"Mongolia",me:"Montenegro",ms:"Montserrat",ma:"Morocco",mz:"Mozambique",mm:"Myanmar",na:"Namibia",nr:"Nauru",np:"Nepal",nl:"Netherlands",nc:"New Caledonia",nz:"New Zealand",ni:"Nicaragua",ne:"Niger",ng:"Nigeria",nu:"Niue",nf:"Norfolk Island",mp:"Northern Mariana Islands",no:"Norway",om:"Oman",pk:"Pakistan",pw:"Palau",ps:"Palestine",pa:"Panama",pg:"Papua New Guinea",py:"Paraguay",pe:"Peru",ph:"Philippines",pn:"Pitcairn",pl:"Poland",pt:"Portugal",pr:"Puerto Rico",qa:"Qatar",re:"Réunion",ro:"Romania",ru:"Russian Federation",rw:"Rwanda",bl:"Saint Barthélemy",sh:"Saint Helena, Ascension and Tristan da Cunha",kn:"Saint Kitts and Nevis",lc:"Saint Lucia",mf:"Saint Martin (French)",pm:"Saint Pierre and Miquelon",vc:"Saint Vincent and the Grenadines",ws:"Samoa",sm:"San Marino",st:"Sao Tome and Principe",sa:"Saudi Arabia",sn:"Senegal",rs:"Serbia",sc:"Seychelles",sl:"Sierra Leone",sg:"Singapore",sx:"Sint Maarten (Dutch)",sk:"Slovakia",si:"Slovenia",sb:"Solomon Islands",so:"Somalia",za:"South Africa",gs:"South Georgia and the South Sandwich Islands",ss:"South Sudan",es:"Spain",lk:"Sri Lanka",sd:"Sudan",sr:"Suriname",sj:"Svalbard and Jan Mayen",sz:"Swaziland",se:"Sweden",ch:"Switzerland",sy:"Syrian Arab Republic",tw:"Taiwan",tj:"Tajikistan",tz:"Tanzania",th:"Thailand",tl:"Timor-Leste",tg:"Togo",tk:"Tokelau",to:"Tonga",tt:"Trinidad and Tobago",tn:"Tunisia",tr:"Turkey",tm:"Turkmenistan",tc:"Turks and Caicos Islands",tv:"Tuvalu",ug:"Uganda",ua:"Ukraine",ae:"United Arab Emirates",gb:"United Kingdom of Great Britain and Northern Ireland",us:"United States of America",um:"United States Minor Outlying Islands",uy:"Uruguay",uz:"Uzbekistan",vu:"Vanuatu",ve:"Venezuela",vn:"Viet Nam",vg:"Virgin Islands (British)",vi:"Virgin Islands (U.S.)",wf:"Wallis and Futuna",eh:"Western Sahara",ye:"Yemen",zm:"Zambia",zw:"Zimbabwe"}}}),t.define("./utils/country",function(e,t,n,r,o){e.exports={requiresPostalCode:function(e){return e=e.toLowerCase(),"dz"===e||"ar"===e||"am"===e||"au"===e||"at"===e||"az"===e||"a2"===e||"bd"===e||"by"===e||"be"===e||"ba"===e||"br"===e||"bn"===e||"bg"===e||"ca"===e||"ic"===e||"cn"===e||"hr"===e||"cy"===e||"cz"===e||"dk"===e||"en"===e||"ee"===e||"fo"===e||"fi"===e||"fr"===e||"ge"===e||"de"===e||"gr"===e||"gl"===e||"gu"===e||"gg"===e||"ho"===e||"hu"===e||"in"===e||"id"===e||"il"===e||"it"===e||"jp"===e||"je"===e||"kz"===e||"kr"===e||"ko"===e||"kg"===e||"lv"===e||"li"===e||"lt"===e||"lu"===e||"mk"===e||"mg"===e||"m3"===e||"my"===e||"mh"===e||"mq"===e||"yt"===e||"mx"===e||"mn"===e||"me"===e||"nl"===e||"nz"===e||"nb"===e||"no"===e||"pk"===e||"ph"===e||"pl"===e||"po"===e||"pt"===e||"pr"===e||"re"===e||"ru"===e||"sa"===e||"sf"===e||"cs"===e||"sg"===e||"sk"===e||"si"===e||"za"===e||"es"===e||"lk"===e||"nt"===e||"sx"===e||"uv"===e||"vl"===e||"se"===e||"ch"===e||"tw"===e||"tj"===e||"th"===e||"tu"===e||"tn"===e||"tr"===e||"tm"===e||"vi"===e||"ua"===e||"gb"===e||"us"===e||"uy"===e||"uz"===e||"va"===e||"vn"===e||"wl"===e||"ya"===e}}}),t.define("./views/screens",function(e,n,r,o,i){e.exports={Payment:t("./views/screens/payment"),Shipping:t("./views/screens/shipping"),ThankYou:t("./views/screens/thankyou")}}),t.define("./views/screens/payment",function(e,n,r,o,i){var a,s,c,l,u,d,p=function(e,t){function n(){this.constructor=e}for(var r in t)f.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},f={}.hasOwnProperty;u=t("crowdcontrol/lib"),a=u.Events,c=t("./views/screens/screen"),l=t("./utils/analytics"),d=t("./utils/input"),t("card/src/coffee/card"),t("style-inject")(t("card/src/scss/card")),s=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return p(n,e),n.prototype.tag="payment",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/screens/payment"),n.prototype.title="Payment Info",n.prototype.card=null,n.prototype.inputConfigs=[d("user.email","youremail@somewhere.com","email input required"),d("user.password","Password","password"),d("user.name","Full Name","input name required"),d("payment.account.number","XXXX XXXX XXXX XXXX","cardnumber requiredstripe"),d("payment.account.expiry","MM / YY","input requiredstripe expiration"),d("payment.account.cvc","CVC","input requiredstripe cvc")],n.prototype.events=(r={},r[""+a.Screen.Payment.ChooseStripe]=function(){return this.setSelected("stripe")},r[""+a.Screen.Payment.ChoosePaypal]=function(){return this.setSelected("paypal")},r),n.prototype.hasProcessors=function(){return this.hasPaypal()&&this.hasStripe()},n.prototype.hasPaypal=function(){return this.model.config.processors.paypal},n.prototype.hasStripe=function(){return this.model.config.processors.stripe},n.prototype.setSelected=function(e){return this.model.order.type=e,this.model.payment.account._type=e,this.fullyValidated=!1,riot.update()},n.prototype.show=function(){return l.track("Viewed Checkout Step",{step:1})},n.prototype._submit=function(){return n.__super__._submit.call(this),l.track("Completed Checkout Step",{step:1})},n.prototype.js=function(){return n.__super__.js.apply(this,arguments),this.model.payment.account._type=this.model.order.type,this.on("updated",function(e){return function(){var t;return null==e.card&&(t=$(e.root).find(".crowdstart-card"),null!=t[0])?e.card=new window.Card({form:"form#payment",container:".crowdstart-card",width:180}):void 0}}(this))},n}(c),s.register(),e.exports=s}),t.define("./views/screens/screen",function(e,n,r,o,i){var a,s,c,l,u=function(e,t){function n(){this.constructor=e}for(var r in t)d.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=t("crowdcontrol/lib"),a=l.Events,s=l.view.form.FormView,c=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.tag="screen",t.prototype.title="Untitled",t.prototype.showConfirm=!0,t.prototype.showBack=!0,t.prototype.showInvoice=!0,t.prototype.index=0,t.prototype.total=1,t.prototype.style="",t.prototype.screenManagerObs=null,t.prototype.js=function(e){var n,r;return this.total=null!=(n=e.total)?n:1,r=100/this.total,this.on("updated",function(e){return function(){return $(e.root).css("width",r+"%")}}(this)),this.screenManagerObs=e.screenManagerObs,this.client=e.client,t.__super__.js.apply(this,arguments)},t.prototype.show=function(){},t.prototype._submit=function(){return this.screenManagerObs.trigger(a.Screen.Next)},t}(s),e.exports=c}),t.define("card/src/coffee/card",function(n,r,o,i,a){var s,c,l,u;t("card/src/scss/card"),c=t("qj/lib/qj"),u=t("payment/lib/payment"),l=t("node.extend"),s=function(){function e(e){return this.options=l(!0,this.defaults,e),this.options.form?(this.$el=c(this.options.form),this.options.container?(this.$container=c(this.options.container),this.render(),this.attachHandlers(),void this.handleInitialPlaceholders()):void console.log("Please provide a container")):void console.log("Please provide a form")}var t;return e.prototype.cardTemplate='<div class="jp-card-container"><div class="jp-card"><div class="jp-card-front"><div class="jp-card-logo jp-card-elo"><div class="e">e</div><div class="l">l</div><div class="o">o</div></div><div class="jp-card-logo jp-card-visa">visa</div><div class="jp-card-logo jp-card-mastercard">MasterCard</div><div class="jp-card-logo jp-card-maestro">Maestro</div><div class="jp-card-logo jp-card-amex"></div><div class="jp-card-logo jp-card-discover">discover</div><div class="jp-card-logo jp-card-dankort"><div class="dk"><div class="d"></div><div class="k"></div></div></div><div class="jp-card-lower"><div class="jp-card-shiny"></div><div class="jp-card-cvc jp-card-display">{{cvc}}</div><div class="jp-card-number jp-card-display">{{number}}</div><div class="jp-card-name jp-card-display">{{name}}</div><div class="jp-card-expiry jp-card-display" data-before="{{monthYear}}" data-after="{{validDate}}">{{expiry}}</div></div></div><div class="jp-card-back"><div class="jp-card-bar"></div><div class="jp-card-cvc jp-card-display">{{cvc}}</div><div class="jp-card-shiny"></div></div></div></div>',e.prototype.template=function(e,t){return e.replace(/\{\{(.*?)\}\}/g,function(e,n,r){return t[n]})},e.prototype.cardTypes=["jp-card-amex","jp-card-dankort","jp-card-dinersclub","jp-card-discover","jp-card-jcb","jp-card-laser","jp-card-maestro","jp-card-mastercard","jp-card-unionpay","jp-card-visa","jp-card-visaelectron","jp-card-elo"],e.prototype.defaults={formatting:!0,formSelectors:{numberInput:'input[name="number"]',expiryInput:'input[name="expiry"]',cvcInput:'input[name="cvc"]',nameInput:'input[name="name"]'},cardSelectors:{cardContainer:".jp-card-container",card:".jp-card",numberDisplay:".jp-card-number",expiryDisplay:".jp-card-expiry",cvcDisplay:".jp-card-cvc",nameDisplay:".jp-card-name"},messages:{validDate:"valid\nthru",monthYear:"month/year"},placeholders:{number:"•••• •••• •••• ••••",cvc:"•••",expiry:"••/••",name:"Full Name"},classes:{valid:"jp-card-valid",invalid:"jp-card-invalid"},debug:!1},e.prototype.render=function(){var e,t,n,r,o,i,a,s;c.append(this.$container,this.template(this.cardTemplate,l({},this.options.messages,this.options.placeholders))),o=this.options.cardSelectors;for(n in o)a=o[n],this["$"+n]=c.find(this.$container,a);i=this.options.formSelectors;for(n in i)a=i[n],a=this.options[n]?this.options[n]:a,r=c.find(this.$el,a),!r.length&&this.options.debug&&console.error("Card can't find a "+n+" in your form."),this["$"+n]=r;return this.options.formatting&&(Payment.formatCardNumber(this.$numberInput),Payment.formatCardCVC(this.$cvcInput),Payment.formatCardExpiry(this.$expiryInput)),this.options.width&&(e=c(this.options.cardSelectors.cardContainer)[0],t=parseInt(e.clientWidth),e.style.transform="scale("+this.options.width/t+")"),("undefined"!=typeof navigator&&null!==navigator?navigator.userAgent:void 0)&&(s=navigator.userAgent.toLowerCase(),-1!==s.indexOf("safari")&&-1===s.indexOf("chrome")&&c.addClass(this.$card,"jp-card-safari")),/MSIE 10\./i.test(navigator.userAgent)&&c.addClass(this.$card,"jp-card-ie-10"),/rv:11.0/i.test(navigator.userAgent)?c.addClass(this.$card,"jp-card-ie-11"):void 0},e.prototype.attachHandlers=function(){var e;return t(this.$numberInput,this.$numberDisplay,{fill:!1,filters:this.validToggler("cardNumber")}),c.on(this.$numberInput,"payment.cardType",this.handle("setCardType")),e=[function(e){return e.replace(/(\s+)/g,"")}],e.push(this.validToggler("cardExpiry")),t(this.$expiryInput,this.$expiryDisplay,{join:function(e){return 2===e[0].length||e[1]?"/":""},filters:e}),t(this.$cvcInput,this.$cvcDisplay,{filters:this.validToggler("cardCVC")}),c.on(this.$cvcInput,"focus",this.handle("flipCard")),c.on(this.$cvcInput,"blur",this.handle("unflipCard")),t(this.$nameInput,this.$nameDisplay,{fill:!1,filters:this.validToggler("cardHolderName"),join:" "})},e.prototype.handleInitialPlaceholders=function(){var e,t,n,r,o;n=this.options.formSelectors,r=[];for(t in n)o=n[t],e=this["$"+t],c.val(e)?(c.trigger(e,"paste"),r.push(setTimeout(function(){return c.trigger(e,"keyup")}))):r.push(void 0);return r},e.prototype.handle=function(e){return function(t){return function(n){var r;return r=Array.prototype.slice.call(arguments),r.unshift(n.target),t.handlers[e].apply(t,r)}}(this)},e.prototype.validToggler=function(e){var t;return"cardExpiry"===e?t=function(e){var t;return t=Payment.fns.cardExpiryVal(e),Payment.fns.validateCardExpiry(t.month,t.year)}:"cardCVC"===e?t=function(e){return function(t){return Payment.fns.validateCardCVC(t,e.cardType)}}(this):"cardNumber"===e?t=function(e){return Payment.fns.validateCardNumber(e)}:"cardHolderName"===e&&(t=function(e){return""!==e}),function(e){return function(n,r,o){var i;return i=t(n),e.toggleValidClass(r,i),e.toggleValidClass(o,i),n}}(this)},e.prototype.toggleValidClass=function(e,t){return c.toggleClass(e,this.options.classes.valid,t),c.toggleClass(e,this.options.classes.invalid,!t)},e.prototype.handlers={setCardType:function(e,t){var n;return n=t.data,c.hasClass(this.$card,n)?void 0:(c.removeClass(this.$card,"jp-card-unknown"),c.removeClass(this.$card,this.cardTypes.join(" ")),c.addClass(this.$card,"jp-card-"+n),c.toggleClass(this.$card,"jp-card-identified","unknown"!==n),this.cardType=n)},flipCard:function(){return c.addClass(this.$card,"jp-card-flipped")},unflipCard:function(){return c.removeClass(this.$card,"jp-card-flipped")}},t=function(e,t,n){var r,o,i;return null==n&&(n={}),n.fill=n.fill||!1,n.filters=n.filters||[],n.filters instanceof Array||(n.filters=[n.filters]),n.join=n.join||"","function"!=typeof n.join&&(r=n.join,n.join=function(){return r}),i=function(){var e,n,r;for(r=[],e=0,n=t.length;n>e;e++)o=t[e],r.push(o.textContent);return r}(),c.on(e,"focus",function(){return c.addClass(t,"jp-card-focused")}),c.on(e,"blur",function(){return c.removeClass(t,"jp-card-focused")}),c.on(e,"keyup change paste",function(r){var o,a,s,l,u,d,p,f,h,m,g,v,y;for(y=function(){var t,n,r;for(r=[],t=0,n=e.length;n>t;t++)o=e[t],r.push(c.val(o));return r}(),u=n.join(y),y=y.join(u),y===u&&(y=""),g=n.filters,l=0,p=g.length;p>l;l++)a=g[l],y=a(y,e,t);for(v=[],s=d=0,f=t.length;f>d;s=++d)h=t[s],m=n.fill?y+i[s].substring(y.length):y||i[s],v.push(h.textContent=m);return v}),e},e}(),n.exports=s,e.Card=s}),t.define("card/src/scss/card",function(e,t,n,r,o){e.exports='.jp-card.jp-card-safari.jp-card-identified .jp-card-front:before, .jp-card.jp-card-safari.jp-card-identified .jp-card-back:before {\n background-image: -webkit-linear-gradient(-25deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 90%);\n background-image: linear-gradient(-25deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 90%); }\n\n.jp-card.jp-card-ie-10.jp-card-flipped, .jp-card.jp-card-ie-11.jp-card-flipped {\n -webkit-transform: 0deg;\n -moz-transform: 0deg;\n -ms-transform: 0deg;\n -o-transform: 0deg;\n transform: 0deg; }\n .jp-card.jp-card-ie-10.jp-card-flipped .jp-card-front, .jp-card.jp-card-ie-11.jp-card-flipped .jp-card-front {\n -webkit-transform: rotateY(0deg);\n -moz-transform: rotateY(0deg);\n -ms-transform: rotateY(0deg);\n -o-transform: rotateY(0deg);\n transform: rotateY(0deg); }\n .jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back, .jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back {\n -webkit-transform: rotateY(0deg);\n -moz-transform: rotateY(0deg);\n -ms-transform: rotateY(0deg);\n -o-transform: rotateY(0deg);\n transform: rotateY(0deg); }\n .jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back:after, .jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back:after {\n left: 18%; }\n .jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back .jp-card-cvc, .jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back .jp-card-cvc {\n -webkit-transform: rotateY(180deg);\n -moz-transform: rotateY(180deg);\n -ms-transform: rotateY(180deg);\n -o-transform: rotateY(180deg);\n transform: rotateY(180deg);\n left: 5%; }\n .jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back .jp-card-shiny, .jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back .jp-card-shiny {\n left: 84%; }\n .jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back .jp-card-shiny:after, .jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back .jp-card-shiny:after {\n left: -480%;\n -webkit-transform: rotateY(180deg);\n -moz-transform: rotateY(180deg);\n -ms-transform: rotateY(180deg);\n -o-transform: rotateY(180deg);\n transform: rotateY(180deg); }\n\n.jp-card.jp-card-ie-10.jp-card-amex .jp-card-back, .jp-card.jp-card-ie-11.jp-card-amex .jp-card-back {\n display: none; }\n\n.jp-card-logo {\n height: 36px;\n width: 60px;\n font-style: italic; }\n .jp-card-logo, .jp-card-logo:before, .jp-card-logo:after {\n box-sizing: border-box; }\n\n.jp-card-logo.jp-card-amex {\n text-transform: uppercase;\n font-size: 4px;\n font-weight: bold;\n color: white;\n border: 1px solid #EEE; }\n .jp-card-logo.jp-card-amex:before, .jp-card-logo.jp-card-amex:after {\n width: 28px;\n display: block;\n position: absolute;\n left: 16px; }\n .jp-card-logo.jp-card-amex:before {\n height: 28px;\n content: "american";\n top: 3px;\n text-align: left;\n padding-left: 2px;\n padding-top: 11px;\n background: #267AC3; }\n .jp-card-logo.jp-card-amex:after {\n content: "express";\n bottom: 11px;\n text-align: right;\n padding-right: 2px; }\n\n.jp-card.jp-card-amex.jp-card-flipped {\n -webkit-transform: none;\n -moz-transform: none;\n -ms-transform: none;\n -o-transform: none;\n transform: none; }\n\n.jp-card.jp-card-amex.jp-card-identified .jp-card-front:before, .jp-card.jp-card-amex.jp-card-identified .jp-card-back:before {\n background-color: #108168; }\n\n.jp-card.jp-card-amex.jp-card-identified .jp-card-front .jp-card-logo.jp-card-amex {\n opacity: 1; }\n\n.jp-card.jp-card-amex.jp-card-identified .jp-card-front .jp-card-cvc {\n visibility: visible; }\n\n.jp-card.jp-card-amex.jp-card-identified .jp-card-front:after {\n opacity: 1; }\n\n.jp-card-logo.jp-card-discover {\n background: #FF6600;\n color: #111;\n text-transform: uppercase;\n font-style: normal;\n font-weight: bold;\n font-size: 10px;\n text-align: center;\n overflow: hidden;\n z-index: 1;\n padding-top: 9px;\n letter-spacing: .03em;\n border: 1px solid #EEE; }\n .jp-card-logo.jp-card-discover:before, .jp-card-logo.jp-card-discover:after {\n content: " ";\n display: block;\n position: absolute; }\n .jp-card-logo.jp-card-discover:before {\n background: white;\n width: 200px;\n height: 200px;\n border-radius: 200px;\n bottom: -5%;\n right: -80%;\n z-index: -1; }\n .jp-card-logo.jp-card-discover:after {\n width: 8px;\n height: 8px;\n border-radius: 4px;\n top: 10px;\n left: 27px;\n background-color: #FF6600;\n background-image: -webkit-radial-gradient(#FF6600, #fff);\n background-image: radial-gradient( #FF6600, #fff);\n content: "network";\n font-size: 4px;\n line-height: 24px;\n text-indent: -7px; }\n\n.jp-card .jp-card-front .jp-card-logo.jp-card-discover {\n right: 12%;\n top: 18%; }\n\n.jp-card.jp-card-discover.jp-card-identified .jp-card-front:before, .jp-card.jp-card-discover.jp-card-identified .jp-card-back:before {\n background-color: #86B8CF; }\n\n.jp-card.jp-card-discover.jp-card-identified .jp-card-logo.jp-card-discover {\n opacity: 1; }\n\n.jp-card.jp-card-discover.jp-card-identified .jp-card-front:after {\n -webkit-transition: 400ms;\n -moz-transition: 400ms;\n transition: 400ms;\n content: " ";\n display: block;\n background-color: #FF6600;\n background-image: -webkit-linear-gradient(#FF6600, #ffa366, #FF6600);\n background-image: linear-gradient(#FF6600, #ffa366, #FF6600);\n height: 50px;\n width: 50px;\n border-radius: 25px;\n position: absolute;\n left: 100%;\n top: 15%;\n margin-left: -25px;\n box-shadow: inset 1px 1px 3px 1px rgba(0, 0, 0, 0.5); }\n\n.jp-card-logo.jp-card-visa {\n background: white;\n text-transform: uppercase;\n color: #1A1876;\n text-align: center;\n font-weight: bold;\n font-size: 15px;\n line-height: 18px; }\n .jp-card-logo.jp-card-visa:before, .jp-card-logo.jp-card-visa:after {\n content: " ";\n display: block;\n width: 100%;\n height: 25%; }\n .jp-card-logo.jp-card-visa:before {\n background: #1A1876; }\n .jp-card-logo.jp-card-visa:after {\n background: #E79800; }\n\n.jp-card.jp-card-visa.jp-card-identified .jp-card-front:before, .jp-card.jp-card-visa.jp-card-identified .jp-card-back:before {\n background-color: #191278; }\n\n.jp-card.jp-card-visa.jp-card-identified .jp-card-logo.jp-card-visa {\n opacity: 1; }\n\n.jp-card-logo.jp-card-mastercard {\n color: white;\n font-weight: bold;\n text-align: center;\n font-size: 9px;\n line-height: 36px;\n z-index: 1;\n text-shadow: 1px 1px rgba(0, 0, 0, 0.6); }\n .jp-card-logo.jp-card-mastercard:before, .jp-card-logo.jp-card-mastercard:after {\n content: " ";\n display: block;\n width: 36px;\n top: 0;\n position: absolute;\n height: 36px;\n border-radius: 18px; }\n .jp-card-logo.jp-card-mastercard:before {\n left: 0;\n background: #FF0000;\n z-index: -1; }\n .jp-card-logo.jp-card-mastercard:after {\n right: 0;\n background: #FFAB00;\n z-index: -2; }\n\n.jp-card.jp-card-mastercard.jp-card-identified .jp-card-front .jp-card-logo.jp-card-mastercard, .jp-card.jp-card-mastercard.jp-card-identified .jp-card-back .jp-card-logo.jp-card-mastercard {\n box-shadow: none; }\n\n.jp-card.jp-card-mastercard.jp-card-identified .jp-card-front:before, .jp-card.jp-card-mastercard.jp-card-identified .jp-card-back:before {\n background-color: #0061A8; }\n\n.jp-card.jp-card-mastercard.jp-card-identified .jp-card-logo.jp-card-mastercard {\n opacity: 1; }\n\n.jp-card-logo.jp-card-maestro {\n color: white;\n font-weight: bold;\n text-align: center;\n font-size: 14px;\n line-height: 36px;\n z-index: 1;\n text-shadow: 1px 1px rgba(0, 0, 0, 0.6); }\n .jp-card-logo.jp-card-maestro:before, .jp-card-logo.jp-card-maestro:after {\n content: " ";\n display: block;\n width: 36px;\n top: 0;\n position: absolute;\n height: 36px;\n border-radius: 18px; }\n .jp-card-logo.jp-card-maestro:before {\n left: 0;\n background: #0064CB;\n z-index: -1; }\n .jp-card-logo.jp-card-maestro:after {\n right: 0;\n background: #CC0000;\n z-index: -2; }\n\n.jp-card.jp-card-maestro.jp-card-identified .jp-card-front .jp-card-logo.jp-card-maestro, .jp-card.jp-card-maestro.jp-card-identified .jp-card-back .jp-card-logo.jp-card-maestro {\n box-shadow: none; }\n\n.jp-card.jp-card-maestro.jp-card-identified .jp-card-front:before, .jp-card.jp-card-maestro.jp-card-identified .jp-card-back:before {\n background-color: #0B2C5F; }\n\n.jp-card.jp-card-maestro.jp-card-identified .jp-card-logo.jp-card-maestro {\n opacity: 1; }\n\n.jp-card-logo.jp-card-dankort {\n width: 60px;\n height: 36px;\n padding: 3px;\n border-radius: 8px;\n border: #000000 1px solid;\n background-color: #FFFFFF; }\n .jp-card-logo.jp-card-dankort .dk {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden; }\n .jp-card-logo.jp-card-dankort .dk:before {\n background-color: #ED1C24;\n content: \'\';\n position: absolute;\n width: 100%;\n height: 100%;\n display: block;\n border-radius: 6px; }\n .jp-card-logo.jp-card-dankort .dk:after {\n content: \'\';\n position: absolute;\n top: 50%;\n margin-top: -7.7px;\n right: 0;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 7px 7px 10px 0;\n border-color: transparent #ED1C24 transparent transparent;\n z-index: 1; }\n .jp-card-logo.jp-card-dankort .d, .jp-card-logo.jp-card-dankort .k {\n position: absolute;\n top: 50%;\n width: 50%;\n display: block;\n height: 15.4px;\n margin-top: -7.7px;\n background: white; }\n .jp-card-logo.jp-card-dankort .d {\n left: 0;\n border-radius: 0 8px 10px 0; }\n .jp-card-logo.jp-card-dankort .d:before {\n content: \'\';\n position: absolute;\n top: 50%;\n left: 50%;\n display: block;\n background: #ED1C24;\n border-radius: 2px 4px 6px 0px;\n height: 5px;\n width: 7px;\n margin: -3px 0 0 -4px; }\n .jp-card-logo.jp-card-dankort .k {\n right: 0; }\n .jp-card-logo.jp-card-dankort .k:before, .jp-card-logo.jp-card-dankort .k:after {\n content: \'\';\n position: absolute;\n right: 50%;\n width: 0;\n height: 0;\n border-style: solid;\n margin-right: -1px; }\n .jp-card-logo.jp-card-dankort .k:before {\n top: 0;\n border-width: 8px 5px 0 0;\n border-color: #ED1C24 transparent transparent transparent; }\n .jp-card-logo.jp-card-dankort .k:after {\n bottom: 0;\n border-width: 0 5px 8px 0;\n border-color: transparent transparent #ED1C24 transparent; }\n\n.jp-card.jp-card-dankort.jp-card-identified .jp-card-front:before, .jp-card.jp-card-dankort.jp-card-identified .jp-card-back:before {\n background-color: #0055C7; }\n\n.jp-card.jp-card-dankort.jp-card-identified .jp-card-logo.jp-card-dankort {\n opacity: 1; }\n\n.jp-card-logo.jp-card-elo {\n height: 50px;\n width: 50px;\n border-radius: 100%;\n background: black;\n color: white;\n text-align: center;\n text-transform: lowercase;\n font-size: 21px;\n font-style: normal;\n letter-spacing: 1px;\n font-weight: bold;\n padding-top: 13px; }\n .jp-card-logo.jp-card-elo .e, .jp-card-logo.jp-card-elo .l, .jp-card-logo.jp-card-elo .o {\n display: inline-block;\n position: relative; }\n .jp-card-logo.jp-card-elo .e {\n -webkit-transform: rotate(-15deg);\n -moz-transform: rotate(-15deg);\n -ms-transform: rotate(-15deg);\n -o-transform: rotate(-15deg);\n transform: rotate(-15deg); }\n .jp-card-logo.jp-card-elo .o {\n position: relative;\n display: inline-block;\n width: 12px;\n height: 12px;\n right: 0;\n top: 7px;\n border-radius: 100%;\n background-image: -webkit-linear-gradient(yellow 50%, red 50%);\n background-image: linear-gradient(to , red 50%);\n -webkit-transform: rotate(40deg);\n -moz-transform: rotate(40deg);\n -ms-transform: rotate(40deg);\n -o-transform: rotate(40deg);\n transform: rotate(40deg);\n text-indent: -9999px; }\n .jp-card-logo.jp-card-elo .o:before {\n content: "";\n position: absolute;\n width: 49%;\n height: 49%;\n background: black;\n border-radius: 100%;\n text-indent: -99999px;\n top: 25%;\n left: 25%; }\n\n.jp-card.jp-card-elo.jp-card-identified .jp-card-front:before, .jp-card.jp-card-elo.jp-card-identified .jp-card-back:before {\n background-color: #6F6969; }\n\n.jp-card.jp-card-elo.jp-card-identified .jp-card-logo.jp-card-elo {\n opacity: 1; }\n\n.jp-card-container {\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n width: 350px;\n max-width: 100%;\n height: 200px;\n margin: auto;\n z-index: 1;\n position: relative; }\n\n.jp-card {\n font-family: "Helvetica Neue";\n line-height: 1;\n position: relative;\n width: 100%;\n height: 100%;\n min-width: 315px;\n border-radius: 10px;\n -webkit-transform-style: preserve-3d;\n -moz-transform-style: preserve-3d;\n -ms-transform-style: preserve-3d;\n -o-transform-style: preserve-3d;\n transform-style: preserve-3d;\n -webkit-transition: all 400ms linear;\n -moz-transition: all 400ms linear;\n transition: all 400ms linear; }\n .jp-card > *, .jp-card > *:before, .jp-card > *:after {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-family: inherit; }\n .jp-card.jp-card-flipped {\n -webkit-transform: rotateY(180deg);\n -moz-transform: rotateY(180deg);\n -ms-transform: rotateY(180deg);\n -o-transform: rotateY(180deg);\n transform: rotateY(180deg); }\n .jp-card .jp-card-front, .jp-card .jp-card-back {\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-transform-style: preserve-3d;\n -moz-transform-style: preserve-3d;\n -ms-transform-style: preserve-3d;\n -o-transform-style: preserve-3d;\n transform-style: preserve-3d;\n -webkit-transition: all 400ms linear;\n -moz-transition: all 400ms linear;\n transition: all 400ms linear;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n border-radius: 10px;\n background: #DDD; }\n .jp-card .jp-card-front:before, .jp-card .jp-card-back:before {\n content: " ";\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n opacity: 0;\n border-radius: 10px;\n -webkit-transition: all 400ms ease;\n -moz-transition: all 400ms ease;\n transition: all 400ms ease; }\n .jp-card .jp-card-front:after, .jp-card .jp-card-back:after {\n content: " ";\n display: block; }\n .jp-card .jp-card-front .jp-card-display, .jp-card .jp-card-back .jp-card-display {\n color: white;\n font-weight: normal;\n opacity: 0.5;\n -webkit-transition: opacity 400ms linear;\n -moz-transition: opacity 400ms linear;\n transition: opacity 400ms linear; }\n .jp-card .jp-card-front .jp-card-display.jp-card-focused, .jp-card .jp-card-back .jp-card-display.jp-card-focused {\n opacity: 1;\n font-weight: 700; }\n .jp-card .jp-card-front .jp-card-cvc, .jp-card .jp-card-back .jp-card-cvc {\n font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;\n font-size: 14px; }\n .jp-card .jp-card-front .jp-card-shiny, .jp-card .jp-card-back .jp-card-shiny {\n width: 50px;\n height: 35px;\n border-radius: 5px;\n background: #CCC;\n position: relative; }\n .jp-card .jp-card-front .jp-card-shiny:before, .jp-card .jp-card-back .jp-card-shiny:before {\n content: " ";\n display: block;\n width: 70%;\n height: 60%;\n border-top-right-radius: 5px;\n border-bottom-right-radius: 5px;\n background: #d9d9d9;\n position: absolute;\n top: 20%; }\n .jp-card .jp-card-front .jp-card-logo {\n position: absolute;\n opacity: 0;\n right: 5%;\n top: 8%;\n -webkit-transition: 400ms;\n -moz-transition: 400ms;\n transition: 400ms; }\n .jp-card .jp-card-front .jp-card-lower {\n width: 80%;\n position: absolute;\n left: 10%;\n bottom: 30px; }\n @media only screen and (max-width: 480px) {\n .jp-card .jp-card-front .jp-card-lower {\n width: 90%;\n left: 5%; } }\n .jp-card .jp-card-front .jp-card-lower .jp-card-cvc {\n visibility: hidden;\n float: right;\n position: relative;\n bottom: 5px; }\n .jp-card .jp-card-front .jp-card-lower .jp-card-number {\n font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;\n font-size: 24px;\n clear: both;\n margin-bottom: 30px; }\n .jp-card .jp-card-front .jp-card-lower .jp-card-expiry {\n font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;\n letter-spacing: 0em;\n position: relative;\n float: right;\n width: 25%; }\n .jp-card .jp-card-front .jp-card-lower .jp-card-expiry:before, .jp-card .jp-card-front .jp-card-lower .jp-card-expiry:after {\n font-family: "Helvetica Neue";\n font-weight: bold;\n font-size: 7px;\n white-space: pre;\n display: block;\n opacity: .5; }\n .jp-card .jp-card-front .jp-card-lower .jp-card-expiry:before {\n content: attr(data-before);\n margin-bottom: 2px;\n font-size: 7px;\n text-transform: uppercase; }\n .jp-card .jp-card-front .jp-card-lower .jp-card-expiry:after {\n position: absolute;\n content: attr(data-after);\n text-align: right;\n right: 100%;\n margin-right: 5px;\n margin-top: 2px;\n bottom: 0; }\n .jp-card .jp-card-front .jp-card-lower .jp-card-name {\n text-transform: uppercase;\n font-family: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;\n font-size: 20px;\n max-height: 45px;\n position: absolute;\n bottom: 0;\n width: 190px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: horizontal;\n overflow: hidden;\n text-overflow: ellipsis; }\n .jp-card .jp-card-back {\n -webkit-transform: rotateY(180deg);\n -moz-transform: rotateY(180deg);\n -ms-transform: rotateY(180deg);\n -o-transform: rotateY(180deg);\n transform: rotateY(180deg); }\n .jp-card .jp-card-back .jp-card-bar {\n background-color: #444;\n background-image: -webkit-linear-gradient(#444, #333);\n background-image: linear-gradient(#444, #333);\n width: 100%;\n height: 20%;\n position: absolute;\n top: 10%; }\n .jp-card .jp-card-back:after {\n content: " ";\n display: block;\n background-color: #FFF;\n background-image: -webkit-linear-gradient(#FFF, #FFF);\n background-image: linear-gradient(#FFF, #FFF);\n width: 80%;\n height: 16%;\n position: absolute;\n top: 40%;\n left: 2%; }\n .jp-card .jp-card-back .jp-card-cvc {\n position: absolute;\n top: 40%;\n left: 85%;\n -webkit-transition-delay: 600ms;\n -moz-transition-delay: 600ms;\n transition-delay: 600ms; }\n .jp-card .jp-card-back .jp-card-shiny {\n position: absolute;\n top: 66%;\n left: 2%; }\n .jp-card .jp-card-back .jp-card-shiny:after {\n content: "This card has been issued by Jesse Pollak and is licensed for anyone to use anywhere for free.\\AIt comes with no warranty.\\A For support issues, please visit: github.com/jessepollak/card.";\n position: absolute;\n left: 120%;\n top: 5%;\n color: white;\n font-size: 7px;\n width: 230px;\n opacity: .5; }\n .jp-card.jp-card-identified {\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); }\n .jp-card.jp-card-identified .jp-card-front, .jp-card.jp-card-identified .jp-card-back {\n background-color: #000;\n background-color: rgba(0, 0, 0, 0.5); }\n .jp-card.jp-card-identified .jp-card-front:before, .jp-card.jp-card-identified .jp-card-back:before {\n -webkit-transition: all 400ms ease;\n -moz-transition: all 400ms ease;\n transition: all 400ms ease;\n background-image: -webkit-linear-gradient(-25deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 90%);\n background-image: linear-gradient(-25deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 90%);\n opacity: 1; }\n .jp-card.jp-card-identified .jp-card-front .jp-card-logo, .jp-card.jp-card-identified .jp-card-back .jp-card-logo {\n box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); }\n .jp-card.jp-card-identified.no-radial-gradient .jp-card-front:before, .jp-card.jp-card-identified.no-radial-gradient .jp-card-back:before {\n background-image: -webkit-linear-gradient(-25deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 90%);\n background-image: linear-gradient(-25deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 90%); }\n';
}),t.define("qj/lib/qj",function(n,r,o,i,a){!function(t){if("object"==typeof r&&"undefined"!=typeof n)n.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof e?o=e:"undefined"!=typeof self&&(o=self),(o.qj||(o.qj={})).js=t()}}(function(){return function e(n,r,o){function i(s,c){if(!r[s]){if(!n[s]){var l="function"==typeof t&&t;if(!c&&l)return l(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=r[s]={exports:{}};n[s][0].call(u.exports,function(e){var t=n[s][1][e];return i(t?t:e)},u,u.exports,e,n,r,o)}return r[s].exports}for(var a="function"==typeof t&&t,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,n){var r,o,i;r=function(e){return r.isDOMElement(e)?e:document.querySelectorAll(e)},r.isDOMElement=function(e){return e&&null!=e.nodeName},i=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,r.trim=function(e){return null===e?"":(e+"").replace(i,"")},o=/\r/g,r.val=function(e,t){var n;return arguments.length>1?e.value=t:(n=e.value,"string"==typeof n?n.replace(o,""):null===n?"":n)},r.preventDefault=function(e){return"function"==typeof e.preventDefault?void e.preventDefault():(e.returnValue=!1,!1)},r.normalizeEvent=function(e){var t;return t=e,e={which:null!=t.which?t.which:void 0,target:t.target||t.srcElement,preventDefault:function(){return r.preventDefault(t)},originalEvent:t,data:t.data||t.detail},null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e},r.on=function(e,t,n){var o,i,a,s,c,l,u,d;if(e.length)for(s=0,l=e.length;l>s;s++)o=e[s],r.on(o,t,n);else{if(!t.match(" "))return a=n,n=function(e){return e=r.normalizeEvent(e),a(e)},e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?(t="on"+t,e.attachEvent(t,n)):void(e["on"+t]=n);for(d=t.split(" "),c=0,u=d.length;u>c;c++)i=d[c],r.on(e,i,n)}},r.addClass=function(e,t){var n;return e.length?function(){var o,i,a;for(a=[],o=0,i=e.length;i>o;o++)n=e[o],a.push(r.addClass(n,t));return a}():e.classList?e.classList.add(t):e.className+=" "+t},r.hasClass=function(e,t){var n,o,i,a;if(e.length){for(o=!0,i=0,a=e.length;a>i;i++)n=e[i],o=o&&r.hasClass(n,t);return o}return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},r.removeClass=function(e,t){var n,o,i,a,s,c;if(e.length)return function(){var n,i,a;for(a=[],n=0,i=e.length;i>n;n++)o=e[n],a.push(r.removeClass(o,t));return a}();if(e.classList){for(s=t.split(" "),c=[],i=0,a=s.length;a>i;i++)n=s[i],c.push(e.classList.remove(n));return c}return e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},r.toggleClass=function(e,t,n){var o;return e.length?function(){var i,a,s;for(s=[],i=0,a=e.length;a>i;i++)o=e[i],s.push(r.toggleClass(o,t,n));return s}():n?r.hasClass(e,t)?void 0:r.addClass(e,t):r.removeClass(e,t)},r.append=function(e,t){var n;return e.length?function(){var o,i,a;for(a=[],o=0,i=e.length;i>o;o++)n=e[o],a.push(r.append(n,t));return a}():e.insertAdjacentHTML("beforeend",t)},r.find=function(e,t){return(e instanceof NodeList||e instanceof Array)&&(e=e[0]),e.querySelectorAll(t)},r.trigger=function(e,t,n){var r,o;try{o=new CustomEvent(t,{detail:n})}catch(i){r=i,o=document.createEvent("CustomEvent"),o.initCustomEvent?o.initCustomEvent(t,!0,!0,n):o.initEvent(t,!0,!0,n)}return e.dispatchEvent(o)},t.exports=r},{}]},{},[1])(1)})}),t.define("payment/lib/payment",function(n,r,o,i,a){!function(t){if("object"==typeof r&&"undefined"!=typeof n)n.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o;o="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:this,(o.payment||(o.payment={})).js=t()}}(function(){return function n(e,r,o){function i(s,c){if(!r[s]){if(!e[s]){var l="function"==typeof t&&t;if(!c&&l)return l(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var d=r[s]={exports:{}};e[s][0].call(d.exports,function(t){var n=e[s][1][t];return i(n?n:t)},d,d.exports,n,e,r,o)}return r[s].exports}for(var a="function"==typeof t&&t,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,n){var r,o,i;r=function(e){return r.isDOMElement(e)?e:document.querySelectorAll(e)},r.isDOMElement=function(e){return e&&null!=e.nodeName},i=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,r.trim=function(e){return null===e?"":(e+"").replace(i,"")},o=/\r/g,r.val=function(e,t){var n;return arguments.length>1?e.value=t:(n=e.value,"string"==typeof n?n.replace(o,""):null===n?"":n)},r.preventDefault=function(e){return"function"==typeof e.preventDefault?void e.preventDefault():(e.returnValue=!1,!1)},r.normalizeEvent=function(e){var t;return t=e,e={which:null!=t.which?t.which:void 0,target:t.target||t.srcElement,preventDefault:function(){return r.preventDefault(t)},originalEvent:t,data:t.data||t.detail},null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e},r.on=function(e,t,n){var o,i,a,s,c,l,u,d;if(e.length)for(i=0,s=e.length;s>i;i++)o=e[i],r.on(o,t,n);else{if(!t.match(" "))return u=n,n=function(e){return e=r.normalizeEvent(e),u(e)},e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?(t="on"+t,e.attachEvent(t,n)):void(e["on"+t]=n);for(d=t.split(" "),a=0,c=d.length;c>a;a++)l=d[a],r.on(e,l,n)}},r.addClass=function(e,t){var n;return e.length?function(){var o,i,a;for(a=[],o=0,i=e.length;i>o;o++)n=e[o],a.push(r.addClass(n,t));return a}():e.classList?e.classList.add(t):e.className+=" "+t},r.hasClass=function(e,t){var n,o,i,a;if(e.length){for(o=!0,i=0,a=e.length;a>i;i++)n=e[i],o=o&&r.hasClass(n,t);return o}return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},r.removeClass=function(e,t){var n,o,i,a,s,c;if(e.length)return function(){var n,i,a;for(a=[],n=0,i=e.length;i>n;n++)o=e[n],a.push(r.removeClass(o,t));return a}();if(e.classList){for(s=t.split(" "),c=[],i=0,a=s.length;a>i;i++)n=s[i],c.push(e.classList.remove(n));return c}return e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},r.toggleClass=function(e,t,n){var o;return e.length?function(){var i,a,s;for(s=[],i=0,a=e.length;a>i;i++)o=e[i],s.push(r.toggleClass(o,t,n));return s}():n?r.hasClass(e,t)?void 0:r.addClass(e,t):r.removeClass(e,t)},r.append=function(e,t){var n;return e.length?function(){var o,i,a;for(a=[],o=0,i=e.length;i>o;o++)n=e[o],a.push(r.append(n,t));return a}():e.insertAdjacentHTML("beforeend",t)},r.find=function(e,t){return(e instanceof NodeList||e instanceof Array)&&(e=e[0]),e.querySelectorAll(t)},r.trigger=function(e,t,n){var r,o,i;try{i=new CustomEvent(t,{detail:n})}catch(o){r=o,i=document.createEvent("CustomEvent"),i.initCustomEvent?i.initCustomEvent(t,!0,!0,n):i.initEvent(t,!0,!0,n)}return e.dispatchEvent(i)},t.exports=r},{}],2:[function(t,n,r){(function(e){var r,o,i,a,s,c,l,u,d,p,f,h,m,g,v,y,b,w,x,j,_,k,C,E,$=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};o=t("qj/src/qj"),c=/(\d{1,4})/g,s=[{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[4],luhn:!0},{type:"dankort",pattern:/^5019/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:"dinersclub",pattern:/^(36|38|30[0-5])/,format:c,length:[14],cvcLength:[3],luhn:!0},{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:"jcb",pattern:/^35/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:"laser",pattern:/^(6706|6771|6709)/,format:c,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:"maestro",pattern:/^(5018|5020|5038|6304|6703|6759|676[1-3])/,format:c,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^5[1-5]/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^62/,format:c,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:"visaelectron",pattern:/^4(026|17500|405|508|844|91[37])/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:"elo",pattern:/^4011|438935|45(1416|76)|50(4175|6699|67|90[4-7])|63(6297|6368)/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:"visa",pattern:/^4/,format:c,length:[13,16],cvcLength:[3],luhn:!0}],i=function(e){var t,n,r;for(e=(e+"").replace(/\D/g,""),n=0,r=s.length;r>n;n++)if(t=s[n],t.pattern.test(e))return t},a=function(e){var t,n,r;for(n=0,r=s.length;r>n;n++)if(t=s[n],t.type===e)return t},v=function(e){var t,n,r,o,i,a;for(i=!0,a=0,n=(e+"").split("").reverse(),r=0,o=n.length;o>r;r++)t=n[r],t=parseInt(t,10),(i=!i)&&(t*=2),t>9&&(t-=9),a+=t;return a%10===0},g=function(e){var t;return null!=e.selectionStart&&e.selectionStart!==e.selectionEnd?!0:null!=("undefined"!=typeof document&&null!==document&&null!=(t=document.selection)?t.createRange:void 0)&&document.selection.createRange().text?!0:!1},y=function(e){return setTimeout(function(t){return function(){var t,n;return t=e.target,n=o.val(t),n=r.fns.formatCardNumber(n),o.val(t,n)}}(this))},d=function(e){var t,n,r,a,s,c,l;return n=String.fromCharCode(e.which),!/^\d+$/.test(n)||(s=e.target,l=o.val(s),t=i(l+n),r=(l.replace(/\D/g,"")+n).length,c=16,t&&(c=t.length[t.length.length-1]),r>=c||null!=s.selectionStart&&s.selectionStart!==l.length)?void 0:(a=t&&"amex"===t.type?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/,a.test(l)?(e.preventDefault(),o.val(s,l+" "+n)):a.test(l+n)?(e.preventDefault(),o.val(s,l+n+" ")):void 0)},l=function(e){var t,n;return t=e.target,n=o.val(t),e.meta||8!==e.which||null!=t.selectionStart&&t.selectionStart!==n.length?void 0:/\d\s$/.test(n)?(e.preventDefault(),o.val(t,n.replace(/\d\s$/,""))):/\s\d?$/.test(n)?(e.preventDefault(),o.val(t,n.replace(/\s\d?$/,""))):void 0},p=function(e){var t,n,r;return t=String.fromCharCode(e.which),/^\d+$/.test(t)?(n=e.target,r=o.val(n)+t,/^\d$/.test(r)&&"0"!==r&&"1"!==r?(e.preventDefault(),o.val(n,"0"+r+" / ")):/^\d\d$/.test(r)?(e.preventDefault(),o.val(n,r+" / ")):void 0):void 0},m=function(e){var t,n,r;return t=String.fromCharCode(e.which),/^\d+$/.test(t)?(n=e.target,r=o.val(n)+t,/^\d$/.test(r)&&"0"!==r&&"1"!==r?(e.preventDefault(),o.val(n,"0"+r)):/^\d\d$/.test(r)?(e.preventDefault(),o.val(n,""+r)):void 0):void 0},f=function(e){var t,n,r;return t=String.fromCharCode(e.which),/^\d+$/.test(t)?(n=e.target,r=o.val(n),/^\d\d$/.test(r)?o.val(n,r+" / "):void 0):void 0},h=function(e){var t,n,r;return t=String.fromCharCode(e.which),"/"===t?(n=e.target,r=o.val(n),/^\d$/.test(r)&&"0"!==r?o.val(n,"0"+r+" / "):void 0):void 0},u=function(e){var t,n;if(!e.metaKey&&(t=e.target,n=o.val(t),8===e.which&&(null==t.selectionStart||t.selectionStart===n.length)))return/\d(\s|\/)+$/.test(n)?(e.preventDefault(),o.val(t,n.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(n)?(e.preventDefault(),o.val(t,n.replace(/\s\/\s?\d?$/,""))):void 0},k=function(e){var t;return e.metaKey||e.ctrlKey?!0:32===e.which?e.preventDefault():0===e.which?!0:e.which<33?!0:(t=String.fromCharCode(e.which),/[\d\s]/.test(t)?void 0:e.preventDefault())},w=function(e){var t,n,r,a;if(r=e.target,n=String.fromCharCode(e.which),/^\d+$/.test(n)&&!g(r))if(a=(o.val(r)+n).replace(/\D/g,""),t=i(a)){if(!(a.length<=t.length[t.length.length-1]))return e.preventDefault()}else if(!(a.length<=16))return e.preventDefault()},j=function(e,t){var n,r,i;return r=e.target,n=String.fromCharCode(e.which),/^\d+$/.test(n)&&!g(r)?(i=o.val(r)+n,i=i.replace(/\D/g,""),i.length>t?e.preventDefault():void 0):void 0},x=function(e){return j(e,6)},_=function(e){return j(e,2)},C=function(e){return j(e,4)},b=function(e){var t,n,r;return n=e.target,t=String.fromCharCode(e.which),/^\d+$/.test(t)&&!g(n)?(r=o.val(n)+t,r.length<=4?void 0:e.preventDefault()):void 0},E=function(e){var t,n,i,a,c;return a=e.target,c=o.val(a),i=r.fns.cardType(c)||"unknown",o.hasClass(a,i)?void 0:(t=function(){var e,t,r;for(r=[],e=0,t=s.length;t>e;e++)n=s[e],r.push(n.type);return r}(),o.removeClass(a,"unknown"),o.removeClass(a,t.join(" ")),o.addClass(a,i),o.toggleClass(a,"identified","unknown"!==i),o.trigger(a,"payment.cardType",i))},r=function(){function e(){}return e.fns={cardExpiryVal:function(e){var t,n,r,o;return e=e.replace(/\s/g,""),r=e.split("/",2),t=r[0],o=r[1],2===(null!=o?o.length:void 0)&&/^\d+$/.test(o)&&(n=(new Date).getFullYear(),n=n.toString().slice(0,2),o=n+o),t=parseInt(t,10),o=parseInt(o,10),{month:t,year:o}},validateCardNumber:function(e){var t,n;return e=(e+"").replace(/\s+|-/g,""),/^\d+$/.test(e)?(t=i(e),t?(n=e.length,$.call(t.length,n)>=0&&(t.luhn===!1||v(e))):!1):!1},validateCardExpiry:function(e,t){var n,r,i,a;return"object"==typeof e&&"month"in e&&(a=e,e=a.month,t=a.year),e&&t?(e=o.trim(e),t=o.trim(t),/^\d+$/.test(e)&&/^\d+$/.test(t)&&parseInt(e,10)<=12?(2===t.length&&(i=(new Date).getFullYear(),i=i.toString().slice(0,2),t=i+t),r=new Date(t,e),n=new Date,r.setMonth(r.getMonth()-1),r.setMonth(r.getMonth()+1,1),r>n):!1):!1},validateCardCVC:function(e,t){var n,r;return e=o.trim(e),/^\d+$/.test(e)?t&&a(t)?(n=e.length,$.call(null!=(r=a(t))?r.cvcLength:void 0,n)>=0):e.length>=3&&e.length<=4:!1},cardType:function(e){var t;return e?(null!=(t=i(e))?t.type:void 0)||null:null},formatCardNumber:function(e){var t,n,r,o;return(t=i(e))?(o=t.length[t.length.length-1],e=e.replace(/\D/g,""),e=e.slice(0,+o+1||9e9),t.format.global?null!=(r=e.match(t.format))?r.join(" "):void 0:(n=t.format.exec(e),null!=n&&n.shift(),null!=n?n.join(" "):void 0)):e}},e.restrictNumeric=function(e){return o.on(e,"keypress",k)},e.cardExpiryVal=function(t){return e.fns.cardExpiryVal(o.val(t))},e.formatCardCVC=function(t){return e.restrictNumeric(t),o.on(t,"keypress",b),t},e.formatCardExpiry=function(t){var n,r;return e.restrictNumeric(t),t.length&&2===t.length?(n=t[0],r=t[1],this.formatCardExpiryMultiple(n,r)):(o.on(t,"keypress",x),o.on(t,"keypress",p),o.on(t,"keypress",h),o.on(t,"keypress",f),o.on(t,"keydown",u)),t},e.formatCardExpiryMultiple=function(e,t){return o.on(e,"keypress",_),o.on(e,"keypress",m),o.on(t,"keypress",C)},e.formatCardNumber=function(t){return e.restrictNumeric(t),o.on(t,"keypress",w),o.on(t,"keypress",d),o.on(t,"keydown",l),o.on(t,"keyup",E),o.on(t,"paste",y),t},e.getCardArray=function(){return s},e.setCardArray=function(e){return s=e,!0},e.addToCardArray=function(e){return s.push(e)},e.removeFromCardArray=function(e){var t,n;for(t in s)n=s[t],n.type===e&&s.splice(t,1);return!0},e}(),n.exports=r,e.Payment=r}).call(this,"undefined"!=typeof e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"qj/src/qj.coffee":1}]},{},[2])(2)})}),t.define("qj/src/qj",function(e,t,n,r,o){var i,a,s;i=function(e){return i.isDOMElement(e)?e:document.querySelectorAll(e)},i.isDOMElement=function(e){return e&&null!=e.nodeName},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,i.trim=function(e){return null===e?"":(e+"").replace(s,"")},a=/\r/g,i.val=function(e,t){var n;return arguments.length>1?e.value=t:(n=e.value,"string"==typeof n?n.replace(a,""):null===n?"":n)},i.preventDefault=function(e){return"function"==typeof e.preventDefault?void e.preventDefault():(e.returnValue=!1,!1)},i.normalizeEvent=function(e){var t;return t=e,e={which:null!=t.which?t.which:void 0,target:t.target||t.srcElement,preventDefault:function(){return i.preventDefault(t)},originalEvent:t,data:t.data||t.detail},null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e},i.on=function(e,t,n){var r,o,a,s,c,l,u,d;if(e.length)for(o=0,s=e.length;s>o;o++)r=e[o],i.on(r,t,n);else{if(!t.match(" "))return u=n,n=function(e){return e=i.normalizeEvent(e),u(e)},e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?(t="on"+t,e.attachEvent(t,n)):void(e["on"+t]=n);for(d=t.split(" "),a=0,c=d.length;c>a;a++)l=d[a],i.on(e,l,n)}},i.addClass=function(e,t){var n;return e.length?function(){var r,o,a;for(a=[],r=0,o=e.length;o>r;r++)n=e[r],a.push(i.addClass(n,t));return a}():e.classList?e.classList.add(t):e.className+=" "+t},i.hasClass=function(e,t){var n,r,o,a;if(e.length){for(r=!0,o=0,a=e.length;a>o;o++)n=e[o],r=r&&i.hasClass(n,t);return r}return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},i.removeClass=function(e,t){var n,r,o,a,s,c;if(e.length)return function(){var n,o,a;for(a=[],n=0,o=e.length;o>n;n++)r=e[n],a.push(i.removeClass(r,t));return a}();if(e.classList){for(s=t.split(" "),c=[],o=0,a=s.length;a>o;o++)n=s[o],c.push(e.classList.remove(n));return c}return e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},i.toggleClass=function(e,t,n){var r;return e.length?function(){var o,a,s;for(s=[],o=0,a=e.length;a>o;o++)r=e[o],s.push(i.toggleClass(r,t,n));return s}():n?i.hasClass(e,t)?void 0:i.addClass(e,t):i.removeClass(e,t)},i.append=function(e,t){var n;return e.length?function(){var r,o,a;for(a=[],r=0,o=e.length;o>r;r++)n=e[r],a.push(i.append(n,t));return a}():e.insertAdjacentHTML("beforeend",t)},i.find=function(e,t){return(e instanceof NodeList||e instanceof Array)&&(e=e[0]),e.querySelectorAll(t)},i.trigger=function(e,t,n){var r,o,i;try{i=new CustomEvent(t,{detail:n})}catch(o){r=o,i=document.createEvent("CustomEvent"),i.initCustomEvent?i.initCustomEvent(t,!0,!0,n):i.initEvent(t,!0,!0,n)}return e.dispatchEvent(i)},e.exports=i}),t.define("node.extend",function(e,n,r,o,i){e.exports=t("node.extend/lib/extend")}),t.define("node.extend/lib/extend",function(e,n,r,o,i){function a(){var e,t,n,r,o,i,c=arguments[0]||{},l=1,u=arguments.length,d=!1;for("boolean"==typeof c&&(d=c,c=arguments[1]||{},l=2),"object"==typeof c||s.fn(c)||(c={});u>l;l++)if(e=arguments[l],null!=e){"string"==typeof e&&(e=e.split(""));for(t in e)n=c[t],r=e[t],c!==r&&(d&&r&&(s.hash(r)||(o=s.array(r)))?(o?(o=!1,i=n&&s.array(n)?n:[]):i=n&&s.hash(n)?n:{},c[t]=a(d,i,r)):"undefined"!=typeof r&&(c[t]=r))}return c}var s=t("is");a.version="1.1.3",e.exports=a}),t.define("is",function(e,t,n,r,o){var i,a=Object.prototype,s=a.hasOwnProperty,c=a.toString;"function"==typeof Symbol&&(i=Symbol.prototype.valueOf);var l=function(e){return e!==e},u={"boolean":1,number:1,string:1,undefined:1},d=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/,p=/^[A-Fa-f0-9]+$/,f=e.exports={};f.a=f.type=function(e,t){return typeof e===t},f.defined=function(e){return"undefined"!=typeof e},f.empty=function(e){var t,n=c.call(e);if("[object Array]"===n||"[object Arguments]"===n||"[object String]"===n)return 0===e.length;if("[object Object]"===n){for(t in e)if(s.call(e,t))return!1;return!0}return!e},f.equal=function(e,t){if(e===t)return!0;var n,r=c.call(e);if(r!==c.call(t))return!1;if("[object Object]"===r){for(n in e)if(!(f.equal(e[n],t[n])&&n in t))return!1;for(n in t)if(!(f.equal(e[n],t[n])&&n in e))return!1;return!0}if("[object Array]"===r){if(n=e.length,n!==t.length)return!1;for(;--n;)if(!f.equal(e[n],t[n]))return!1;return!0}return"[object Function]"===r?e.prototype===t.prototype:"[object Date]"===r?e.getTime()===t.getTime():!1},f.hosted=function(e,t){var n=typeof t[e];return"object"===n?!!t[e]:!u[n]},f.instance=f["instanceof"]=function(e,t){return e instanceof t},f.nil=f["null"]=function(e){return null===e},f.undef=f.undefined=function(e){return"undefined"==typeof e},f.args=f.arguments=function(e){var t="[object Arguments]"===c.call(e),n=!f.array(e)&&f.arraylike(e)&&f.object(e)&&f.fn(e.callee);return t||n},f.array=Array.isArray||function(e){return"[object Array]"===c.call(e)},f.args.empty=function(e){return f.args(e)&&0===e.length},f.array.empty=function(e){return f.array(e)&&0===e.length},f.arraylike=function(e){return!!e&&!f.bool(e)&&s.call(e,"length")&&isFinite(e.length)&&f.number(e.length)&&e.length>=0},f.bool=f["boolean"]=function(e){return"[object Boolean]"===c.call(e)},f["false"]=function(e){return f.bool(e)&&Boolean(Number(e))===!1},f["true"]=function(e){return f.bool(e)&&Boolean(Number(e))===!0},f.date=function(e){return"[object Date]"===c.call(e)},f.element=function(e){return void 0!==e&&"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&1===e.nodeType},f.error=function(e){return"[object Error]"===c.call(e)},f.fn=f["function"]=function(e){var t="undefined"!=typeof window&&e===window.alert;return t||"[object Function]"===c.call(e)},f.number=function(e){return"[object Number]"===c.call(e)},f.infinite=function(e){return e===1/0||e===-(1/0)},f.decimal=function(e){return f.number(e)&&!l(e)&&!f.infinite(e)&&e%1!==0},f.divisibleBy=function(e,t){var n=f.infinite(e),r=f.infinite(t),o=f.number(e)&&!l(e)&&f.number(t)&&!l(t)&&0!==t;return n||r||o&&e%t===0},f.integer=f["int"]=function(e){return f.number(e)&&!l(e)&&e%1===0},f.maximum=function(e,t){if(l(e))throw new TypeError("NaN is not a valid value");if(!f.arraylike(t))throw new TypeError("second argument must be array-like");for(var n=t.length;--n>=0;)if(e<t[n])return!1;return!0},f.minimum=function(e,t){if(l(e))throw new TypeError("NaN is not a valid value");if(!f.arraylike(t))throw new TypeError("second argument must be array-like");for(var n=t.length;--n>=0;)if(e>t[n])return!1;return!0},f.nan=function(e){return!f.number(e)||e!==e},f.even=function(e){return f.infinite(e)||f.number(e)&&e===e&&e%2===0},f.odd=function(e){return f.infinite(e)||f.number(e)&&e===e&&e%2!==0},f.ge=function(e,t){if(l(e)||l(t))throw new TypeError("NaN is not a valid value");return!f.infinite(e)&&!f.infinite(t)&&e>=t},f.gt=function(e,t){if(l(e)||l(t))throw new TypeError("NaN is not a valid value");return!f.infinite(e)&&!f.infinite(t)&&e>t},f.le=function(e,t){if(l(e)||l(t))throw new TypeError("NaN is not a valid value");return!f.infinite(e)&&!f.infinite(t)&&t>=e},f.lt=function(e,t){if(l(e)||l(t))throw new TypeError("NaN is not a valid value");return!f.infinite(e)&&!f.infinite(t)&&t>e},f.within=function(e,t,n){if(l(e)||l(t)||l(n))throw new TypeError("NaN is not a valid value");if(!f.number(e)||!f.number(t)||!f.number(n))throw new TypeError("all arguments must be numbers");var r=f.infinite(e)||f.infinite(t)||f.infinite(n);return r||e>=t&&n>=e},f.object=function(e){return"[object Object]"===c.call(e)},f.hash=function(e){return f.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},f.regexp=function(e){return"[object RegExp]"===c.call(e)},f.string=function(e){return"[object String]"===c.call(e)},f.base64=function(e){return f.string(e)&&(!e.length||d.test(e))},f.hex=function(e){return f.string(e)&&(!e.length||p.test(e))},f.symbol=function(e){return"function"==typeof Symbol&&"[object Symbol]"===c.call(e)&&"symbol"==typeof i.call(e)}}),t.define("./Users/dtai/work/verus/checkout/templates/screens/payment",function(e,t,n,r,o){e.exports='<form id="payment"><control label="{ "Email" }" input="{ inputs["user.email"] }"></control><control label="{ "Password" }" input="{ inputs["user.password"] }" if="{ config.login }"></control><control name="{ "name"}" label="{ "Name" }" input="{ inputs["user.name"] }"></control><tabs model="{ model }" obs="{ obs }" if="{ hasProcessors() }"></tabs><div if="{ model.order.type === "stripe" }" class="crowdstart-card-widget"><div class="crowdstart-card-details"><control name="{ "number" }" label="{ "Card Number" }" input="{ inputs["payment.account.number"] }"></control><div class="crowdstart-card-expiry-cvc"><control name="{ "expiry" }" label="{ "Expiration" }" input="{ inputs["payment.account.expiry"] }"></control><control name="{ "cvc" }" label="{ "CVC Code" }" input="{ inputs["payment.account.cvc"] }"></control></div></div><div class="crowdstart-card"></div></div><div if="{ model.order.type === "paypal" }" class="crowdstart-paypal-widget"><svg><path d="M16.9,24.5c-1.3,0-2.4,1.1-2.4,2.4v46.2c0,1.3,1.1,2.4,2.4,2.4h66.2c1.3,0,2.4-1.1,2.4-2.4V26.9c0-1.3-1.1-2.4-2.4-2.4 H16.9z M16.9,26.1h8.2h12.2c0.6,0,1.4,0.6,1.7,1.1l2.5,6.7H16.1v-7C16.1,26.4,16.4,26.1,16.9,26.1L16.9,26.1z M40.2,26.1h43 c0.5,0,0.8,0.3,0.8,0.8v7H43.2l-2.7-7.3C40.4,26.5,40.3,26.3,40.2,26.1L40.2,26.1z M20.6,27.6c-1.3,0-2.3,1.1-2.3,2.4 s1.1,2.4,2.3,2.4c1.3,0,2.3-1.1,2.3-2.4C23,28.7,22,27.6,20.6,27.6L20.6,27.6z M27.1,27.6c-1.3,0-2.3,1.1-2.3,2.4s1.1,2.4,2.3,2.4 s2.3-1.1,2.3-2.4C29.5,28.7,28.4,27.6,27.1,27.6L27.1,27.6z M33.6,27.6c-1.3,0-2.4,1.1-2.4,2.4s1.1,2.4,2.4,2.4s2.3-1.1,2.3-2.4 C35.9,28.7,34.8,27.6,33.6,27.6L33.6,27.6z M20.6,29.2c0.4,0,0.8,0.3,0.8,0.8s-0.4,0.8-0.8,0.8s-0.8-0.3-0.8-0.8 S20.2,29.2,20.6,29.2L20.6,29.2z M27.1,29.2c0.4,0,0.8,0.3,0.8,0.8s-0.3,0.8-0.8,0.8s-0.8-0.3-0.8-0.8S26.7,29.2,27.1,29.2 L27.1,29.2z M33.6,29.2c0.4,0,0.8,0.3,0.8,0.8s-0.3,0.8-0.8,0.8s-0.8-0.3-0.8-0.8S33.1,29.2,33.6,29.2L33.6,29.2z M16.1,35.5H84V73 c0,0.5-0.3,0.8-0.8,0.8H16.9c-0.5,0-0.8-0.4-0.8-0.8V35.5z M58.9,54.9c0,0.2-0.1,0.3-0.2,0.4l-4,4.2c-0.3,0.3-0.8,0.3-1.1,0 s-0.3-0.8,0-1.1l2.7-2.9h-15c-0.4,0-0.8-0.4-0.8-0.8c0-0.4,0.4-0.8,0.8-0.8h15L53.6,51c-0.3-0.3-0.3-0.9,0-1.1 c0.3-0.3,0.9-0.3,1.2,0.1l4,4.2C58.9,54.4,59,54.6,58.9,54.9L58.9,54.9z"></path></svg><p>You will be redirected to Paypal to complete your purchase securely.</p></div></form>'}),t.define("./views/screens/shipping",function(e,n,r,o,i){var a,s,c,l,u,d,p=function(e,t){function n(){this.constructor=e}for(var r in t)f.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},f={}.hasOwnProperty;u=t("crowdcontrol/lib"),a=u.Events,s=t("./views/screens/screen"),l=t("./utils/analytics"),d=t("./utils/input"),c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return p(n,e),n.prototype.tag="shipping",n.prototype.title="Shipping Address",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/screens/shipping"),n.prototype.taxRates=null,n.prototype.inputConfigs=[d("order.shippingAddress.line1","123 Street","input required"),d("order.shippingAddress.line2","123 Apt","input"),d("order.shippingAddress.city","City","input required"),d("order.shippingAddress.state","State","state-select required"),d("order.shippingAddress.postalCode","Zip/Postal Code","input postalRequired"),d("order.shippingAddress.country","","country-select required")],n.prototype.updateTaxRate=function(){var e,t,n,r;for(this.model.order.taxRate=0,n=this.taxRates,e=0,t=n.length;t>e;e++)if(r=n[e],(null==r.city||null==this.model.order.shippingAddress.city||r.city.toLowerCase()===this.model.order.shippingAddress.city.toLowerCase())&&!(null!=r.state&&null!=this.model.order.shippingAddress.state&&r.state.toLowerCase()!==this.model.order.shippingAddress.state.toLowerCase()||null!=r.country&&null!=this.model.order.shippingAddress.country&&r.country.toLowerCase()!==this.model.order.shippingAddress.country.toLowerCase())){this.model.order.taxRate=r.taxRate;break}return riot.update()},n.prototype.updateShippingRate=function(){var e,t,n,r;for(this.model.order.shippingRate=0,n=this.shippingRates,e=0,t=n.length;t>e;e++)if(r=n[e],(null==r.city||null==this.model.order.shippingAddress.city||r.city.toLowerCase()===this.model.order.shippingAddress.city.toLowerCase())&&!(null!=r.state&&null!=this.model.order.shippingAddress.state&&r.state.toLowerCase()!==this.model.order.shippingAddress.state.toLowerCase()||null!=r.country&&null!=this.model.order.shippingAddress.country&&r.country.toLowerCase()!==this.model.order.shippingAddress.country.toLowerCase())){this.model.order.shippingRate=r.shippingRate;break}return riot.update()},n.prototype.events=(r={},r[""+a.Input.Set]=function(){return this.updateTaxRate(),this.updateShippingRate()},r),n.prototype.js=function(e){var t,r;return n.__super__.js.apply(this,arguments),this.taxRates=null!=(t=this.model.taxRates)?t:[],this.shippingRates=null!=(r=this.model.shippingRates)?r:[]},n.prototype.show=function(){return l.track("Viewed Checkout Step",{step:2}),$("body").animate({scrollTop:$("screen-manager").first().offset().top-50},500)},n.prototype._submit=function(){return this.screenManagerObs.trigger(a.Confirm.Lock),this.screenManagerObs.trigger(a.Confirm.Error,""),"paypal"===this.model.order.type?this.submitPaypal():this.submitStripe()},n.prototype.submitPaypal=function(){var e;return e={user:this.model.user,order:this.model.order,payment:this.model.payment},this.client.checkout.paypal(e).then(function(e){return function(t){return e.payKey=t.payKey,l.track("Completed Checkout Step",{step:2}),e.model.test.paypal?window.location.href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey="+e.payKey:window.location.href="https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey="+e.payKey}}(this))["catch"](function(e){return function(t){return console.log("shipping submit Error: "+t),e.screenManagerObs.trigger(a.Confirm.Error,"Sorry, Paypal is unavailable. Please try again later."),e.screenManagerObs.trigger(a.Confirm.Unlock),e.screenManagerObs.trigger(a.Checkout.Done)}}(this))},n.prototype.submitStripe=function(){var e;return e={user:this.model.user,order:this.model.order,payment:this.model.payment},this.client.checkout.charge(e).then(function(e){return function(t){var n,r,o,i,s,c,u,d,p,f;for(n=e.model.order.coupon||{},e.model.order=t,l.track("Completed Checkout Step",{step:2}),c={orderId:e.model.order.id,total:parseFloat(e.model.order.total/100),shipping:parseFloat(e.model.order.shipping/100),tax:parseFloat(e.model.order.tax/100),discount:parseFloat(e.model.order.discount/100),coupon:n.code||"",currency:e.model.order.currency,products:[]},u=e.model.order.items,r=i=0,s=u.length;s>i;r=++i)o=u[r],c.products[r]={id:o.productId,sku:o.productSlug,name:o.productName,quantity:o.quantity,price:parseFloat(o.price/100)};return l.track("Completed Order",c),null!=(null!=(d=e.model.analytics)&&null!=(p=d.pixels)?p.checkout:void 0)&&l.track(null!=(f=e.model.analytics.pixels)?f.checkout:void 0),null!=e.model.referralProgram&&e.client.referrer.create({userId:e.model.order.userId,orderId:e.model.order.orderId,program:e.model.referralProgram}).then(function(t){return e.model.referrerId=t.id})["catch"](function(e){return console.log("new referralProgram Error: "+e)}),e.model.payment.account.number="",e.model.payment.account.expiry="",e.model.payment.account.cvc="",e.screenManagerObs.trigger(a.Screen.Next),e.screenManagerObs.trigger(a.Confirm.Unlock),e.screenManagerObs.trigger(a.Checkout.Done),$(".crowdstart-card-widget input").val(""),riot.update()}}(this))["catch"](function(e){return function(t){var n;return console.log("shipping submit Error: "+t),n=t.data,"card-declined"===n.error.code?e.screenManagerObs.trigger(a.Confirm.Error,"Sorry, your card was declined. Please check your payment information."):e.screenManagerObs.trigger(a.Confirm.Error,"Sorry, unable to complete your transaction. Please try again later."),e.screenManagerObs.trigger(a.Confirm.Unlock),e.screenManagerObs.trigger(a.Checkout.Done)}}(this))},n}(s),c.register(),e.exports=c}),t.define("./Users/dtai/work/verus/checkout/templates/screens/shipping",function(e,t,n,r,o){e.exports='<form id="shipping"><div class="crowdstart-shipping-address-line"><control label="{ "Shipping Address" }" input="{ inputs["order.shippingAddress.line1"] }"></control><control label="{ "Suite" }" input="{ inputs["order.shippingAddress.line2"] }"></control></div><control label="{ "City" }" input="{ inputs["order.shippingAddress.city"] }"></control><div class="crowdstart-shipping-state-postal"><control label="{ "State" }" input="{ inputs["order.shippingAddress.state"] }"></control><control label="{ "Postal Code" }" input="{ inputs["order.shippingAddress.postalCode"] }"></control></div><control label="{ "Country" }" input="{ inputs["order.shippingAddress.country"] }"></control></form>'}),t.define("./views/screens/thankyou",function(e,n,r,o,i){var a,s,c,l,u,d=function(e,t){function n(){this.constructor=e}for(var r in t)p.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},p={}.hasOwnProperty;u=t("crowdcontrol/lib"),a=u.Events,s=t("./views/screens/screen"),l=t("./utils/analytics"),c=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,e),n.prototype.tag="thankyou",
n.prototype.title="Done!",n.prototype.html=t("./Users/dtai/work/verus/checkout/templates/screens/thankyou"),n.prototype.showConfirm=!1,n.prototype.showBack=!1,n.prototype.showInvoice=!1,n.prototype._submit=function(){},n.prototype.show=function(){return l.track("Viewed Checkout Step",{step:3}),$("body").animate({scrollTop:$("screen-manager").first().offset().top-50},500)},n}(s),c.register(),e.exports=c}),t.define("./Users/dtai/work/verus/checkout/templates/screens/thankyou",function(e,t,n,r,o){e.exports='<div><h1>{ model.thankyou.header }</h1><p>{ model.thankyou.body }</p><p if="{ model.order.number != null }">Your Order Confirmation:<strong> { model.order.number }</strong></p><div class="social__container"><div if="{ model.thankyou.facebook }" class="social__item"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={ model.thankyou.facebook }" class="social__icon--facebook"><i class="icon--facebook"></i></a></div><div if="{ model.thankyou.twitter }" class="social__item"><a target="_blank" href="https://twitter.com/intent/tweet?url={ model.thankyou.twitter }&text={ model.thankyou.twitterMsg}" class="social__icon--twitter"><i class="icon--twitter"></i></a></div><div if="{ model.thankyou.googlePlus }" class="social__item"><a target="_blank" href="https://plus.google.com/u/0/{ model.thankyou.googlePlus }" class="social__icon--googleplus"><i class="icon--googleplus"></i></a></div><div if="{ model.thankyou.pinterest }" class="social__item"><a href="javascript:void((function()%7Bvar%20e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'https://assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)%7D)());" class="social__icon--pintrest"><i class="icon--pintrest"></i></a></div><div if="{ model.thankyou.emailSubject }" class="social__item"><a href="mailto:%20?subject={ model.thankyou.emailSubject }&body={ model.thankyou.emailBody }" class="social__icon--email"><i class="icon--email"></i></a></div></div></div>'}),t.define("./index",function(e,n,r,o,i){var a,s,c,l,u,d,p,f,h,m;s=t("crowdstart.js/lib/browser"),p=t("crowdcontrol/lib"),f=t("raf"),h=window.riot=t("riot/riot"),t("./Users/dtai/work/verus/checkout/vendor/js/select2"),t("style-inject")(t("./Users/dtai/work/verus/checkout/vendor/css/select2")),m=t("./utils/theme"),d=t("./utils/analytics"),c=p.Events,t("./events"),l=t("./views"),u=l.Widget,a=function(){function e(e,t){var n,r,o,i,a,l,d,p,f,g,v,y;if(this.key=e,null==t&&(t={}),this.client=new s.Api({key:this.key,endpoint:null!=t&&null!=(l=t.test)?l.endpoint:void 0}),g=/([^&=]+)=?([^&]*)/g,i=window.location.href.split("?")[1],a={},null!=i)for(;r=g.exec(i);)a[decodeURIComponent(r[1])]=decodeURIComponent(r[2]);this.config={showPromoCode:!0,termsUrl:"",callToActions:[],processors:{stripe:!0,paypal:!0}},null!=t.config&&(this.config=$.extend(this.config,t.config)),this.user=t.user||{},this.order={},null!=t.order&&(this.order=$.extend(this.order,t.order)),this.order.items=[],this.order.currency=(null!=(d=t.config)?d.currency:void 0)||this.order.currency||"usd",this.order.taxRate=(null!=(p=t.config)?p.taxRate:void 0)||this.order.taxRate||0,this.order.shippingRate=(null!=(f=t.config)?f.shippingRate:void 0)||this.order.shippingRate||0,this.order.shippingAddress={country:"us"},this.order.discount=0,this.config.processors.stripe?this.order.type="stripe":this.config.processors.paypal&&(this.order.type="paypal"),null!=a.referrer&&(this.order.referrerId=a.referrer||this.order.referrerId),this.payment={account:{_type:"stripe"}},this.itemUpdateQueue=[],this.thankyou={header:"Thank You!",body:"Check Your Email For The Order Confirmation."},null!=t.thankyou&&(this.thankyou=$.extend(this.thankyou,t.thankyou)),this.theme={},null!=t.theme&&(this.theme=$.extend(this.theme,t.theme)),this.test={},null!=t.test&&(this.test=$.extend(this.test,t.test)),this.analytics={},null!=t.analytics&&(this.analytics=$.extend(this.analytics,t.analytics)),this.referralProgram=t.referralProgram,this.taxRates=t.taxRates||[],this.shippingRates=t.shippingRates||[],this.model={user:this.user,order:this.order,payment:this.payment,config:this.config,thankyou:this.thankyou,test:this.test,analytics:this.analytics,referralProgram:this.referralProgram,taxRates:this.taxRates,shippingRates:this.shippingRates,scripts:{basic:this.script}},this.obs={},h.observable(this.obs),o=document.createElement("MODAL"),y=u.prototype.tag,v=document.createElement(y.toUpperCase()),v.setAttribute("model","{ model }"),v.setAttribute("obs","{ obs }"),v.setAttribute("client","{ client }"),o.appendChild(v),document.body.appendChild(o),m.setTheme(this.theme),h.mount("modal",{obs:this.obs,model:this.model,client:this.client}),this.obs.on(c.Checkout.Done,function(e){return function(){return e.reset=!0}}(this)),"#checkoutsuccess"===window.location.hash?(this.obs.trigger(c.Screen.UpdateScript,this.script,2),this.reset=!1,this.open(),n=setInterval(function(){return $(window).resize()},50),setTimeout(function(e){return function(){return clearInterval(n),h.update(),e.reset=!0}}(this),1e3)):this.obs.trigger(c.Screen.UpdateScript,this.script)}return e.prototype.key="",e.prototype.order=null,e.prototype.payment=null,e.prototype.user=null,e.prototype.itemUpdateQueue=null,e.prototype.obs=null,e.prototype.model=null,e.prototype.config=null,e.prototype.thankyou=null,e.prototype.theme=null,e.prototype.analytics=null,e.prototype.referralProgram=null,e.prototype.taxRates=null,e.prototype.shippingRates=null,e.prototype.reset=!0,e.prototype.waits=0,e.prototype.currentScript=null,e.prototype.script=["payment","shipping","thankyou"],e.prototype.open=function(){var e,t,n,r;for(this.reset&&(this.obs.trigger(c.Screen.UpdateScript,this.script),this.reset=!1),this.obs.trigger(c.Modal.Open),this.obs.trigger(c.Modal.DisableClose),setTimeout(function(e){return function(){return e.obs.trigger(c.Modal.EnableClose)}}(this),600),r=this.order.items,t=0,n=r.length;n>t;t++)e=r[t],d.track("Added Product",{id:e.productId,sku:e.productSlug,name:e.productName,quantity:e.quantity,price:parseFloat(e.price/100)});return d.track("Viewed Checkout Step",{step:1}),$(".crowdstart-modal-target").css("top",$(window).scrollTop()+"px"),!1},e.prototype.one=function(){return this.obs.one.apply(this.obs,arguments)},e.prototype.on=function(){return this.obs.on.apply(this.obs,arguments)},e.prototype.off=function(){return this.obs.off.apply(this.obs,arguments)},e.prototype.update=function(){var e;return 0===this.waits?(e=this.order.items,this.order.items=[],h.update(),this.order.items=e,h.update(),this.obs.trigger(c.Checkout.Update,{user:this.user,order:this.order,config:this.config}),h.update()):void 0},e.prototype.setConfig=function(e){return this.config=e,this.update()},e.prototype.setUser=function(e){return null==e&&(e={}),null!=e?(this.user=$.extend(this.user,e),this.model.user=this.user,this.update()):void 0},e.prototype.setItem=function(e,t){return this.itemUpdateQueue.push([e,t]),1===this.itemUpdateQueue.length?this._setItem():void 0},e.prototype._setItem=function(){var e,t,n,r,o,i,a,s,c,l,u;if(0===this.itemUpdateQueue.length)return void this.update();if(c=this.itemUpdateQueue.shift(),t=c[0],s=c[1],0===s){for(l=this.order.items,e=r=0,i=l.length;i>r&&(n=l[e],n.productId!==t&&n.productSlug!==t);e=++r);return e<this.order.items.length&&this.order.items.splice(e,1),void this._setItem()}for(u=this.order.items,e=o=0,a=u.length;a>o;e=++o)if(n=u[e],n.productId===t||n.productSlug===t)return n.quantity=s,void this._setItem();return this.order.items.push({id:t,quantity:s}),this.waits++,this.client.product.get(t).then(function(t){return function(r){var o,i,a;for(t.waits--,a=t.order.items,e=o=0,i=a.length;i>o;e=++o)if(n=a[e],r.id===n.id||r.slug===n.id){t._updateItem(r,n);break}return t._setItem()}}(this))["catch"](function(e){return function(t){return e.waits--,console.log("setItem Error: "+t),e._setItem()}}(this))},e.prototype._updateItem=function(e,t){return t.id=void 0,t.productId=e.id,t.productSlug=e.slug,t.productName=e.name,t.price=e.price,t.listPrice=e.listPrice},e}(),a.countries=t("./data/countries"),a.currencies=t("./data/currencies"),null!=window.Crowdstart?window.Crowdstart.Checkout=a:window.Crowdstart={Checkout:a},"undefined"!=typeof e&&null!==e&&(e.exports=a)}),t("./index")}).call(this,this);