vendor: 4,507 bytes, lines 1-71
1webpackJsonp([0],[ 2/* 0 */, 3/* 1 */ 4/***/ (function(module, exports) { 5 6module.exports = function(module) { 7 if(!module.webpackPolyfill) { 8 module.deprecate = function() {}; 9 module.paths = []; 10 // module.parent = undefined by default 11 if(!module.children) module.children = []; 12 Object.defineProperty(module, "loaded", { 13 enumerable: true, 14 get: function() { 15 return module.l; 16 } 17 }); 18 Object.defineProperty(module, "id", { 19 enumerable: true, 20 get: function() { 21 return module.i; 22 } 23 }); 24 module.webpackPolyfill = 1; 25 } 26 return module; 27}; 28 29 30/***/ }), 31/* 2 */ 32/***/ (function(module, exports) { 33 34var g; 35 36// This works in non-strict mode 37g = (function() { 38 return this; 39})(); 40 41try { 42 // This works if eval is allowed (see CSP) 43 g = g || Function("return this")() || (1,eval)("this"); 44} catch(e) { 45 // This works if the window reference is available 46 if(typeof window === "object") 47 g = window; 48} 49 50// g can still be undefined, but nothing to do about it... 51// We return undefined, instead of nothing here, so it's 52// easier to handle this case. if(!global) { ...} 53 54module.exports = g; 55 56 57/***/ }), 58/* 3 */ 59/***/ (function(module, exports, __webpack_require__) { 60 61/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! 62 * Vue.js v2.7.16 63 * (c) 2014-2023 Evan You 64 * Released under the MIT License. 65 */ 66/*! 67 * Vue.js v2.7.16 68 * (c) 2014-2023 Evan You 69 * Released under the MIT License. 70 */ 71!function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vue=e()}(this,(function(){"use strict";var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function i(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return"function"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,p,2):String(t)}function p(t,e){return e&&e.__v_isRef?e.value:e}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var m=h("slot,component",!0),g=h("key,ref,slot,slot-scope,is");function y(t,e){var n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function $(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,x=$((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),C=$((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),k=/\B([A-Z])/g,S=$((function(t){return t.replace(k,"-$1").toLowerCase()}));var O=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function T(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function j(t){for(var e={},n=0;n<t.length;n++)t[n]&&A(e,t[n]);return e}function E(t,e,n){}var N=function(t,e,n){return!1},P=function(t){return t};function D(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return D(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),c=Object.keys(e);return a.length===c.length&&a.every((function(n){return D(t[n],e[n])}))}catch(t){return!1}}function M(t,e){for(var n=0;n<t.length;n++)if(D(t[n],e))return n;return-1}function I(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function L(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}var R="data-server-rendered",F=["component","directive","filter"],H=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","
71serverPrefetch","renderTracked","renderTriggered"],B={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:N,isReservedAttr:N,isUnknownElement:N,getTagNamespace:E,parsePlatformTagName:P,mustUseProp:N,async:!0,_lifecycleHooks:H},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function V(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var K=new RegExp("[^".concat(U.source,".$_\\d]"));var J="__proto__"in{},q="undefined"!=typeof window,W=q&&window.navigator.userAgent.toLowerCase(),Z=W&&/msie|trident/.test(W),G=W&&W.indexOf("msie 9.0")>0,X=W&&W.indexOf("edge/")>0;W&&W.indexOf("android");var Y=W&&/iphone|ipad|ipod|ios/.test(W);W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W);var Q,tt=W&&W.match(/firefox\/(\d+)/),et={}.watch,nt=!1;if(q)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(t){}var ot=function(){return void 0===Q&&(Q=!q&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Q},it=q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var st,ct="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);st="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ut=null;function lt(t){void 0===t&&(t=null),t||ut&&ut._scope.off(),ut=t,t&&t._scope.on()}var ft=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),dt=function(t){void 0===t&&(t="");var e=new ft;return e.text=t,e.isComment=!0,e};function pt(t){return new ft(void 0,void 0,void 0,String(t))}function vt(t){var e=new ft(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}"function"==typeof SuppressedError&&SuppressedError;var ht=0,mt=[],gt=function(){for(var t=0;t<mt.length;t++){var e=mt[t];e.subs=e.subs.filter((function(t){return t})),e._pending=!1}mt.length=0},yt=function(){function t(){this._pending=!1,this.id=ht++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,mt.push(this))}
vendor: 10,914 bytes, line 71
71,t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.filter((function(t){return t})),n=0,r=e.length;n<r;n++){e[n].update()}},t}();yt.target=null;var _t=[];function bt(t){_t.push(t),yt.target=t}function $t(){_t.pop(),yt.target=_t[_t.length-1]}var wt=Array.prototype,xt=Object.create(wt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=wt[t];V(xt,t,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i}))}));var Ct=Object.getOwnPropertyNames(xt),kt={},St=!0;function Ot(t){St=t}var Tt={notify:E,depend:E,addSub:E,removeSub:E},At=function(){function t(t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.value=t,this.shallow=n,this.mock=r,this.dep=r?Tt:new yt,this.vmCount=0,V(t,"__ob__",this),e(t)){if(!r)if(J)t.__proto__=xt;else for(var o=0,i=Ct.length;o<i;o++){V(t,s=Ct[o],xt[s])}n||this.observeArray(t)}else{var a=Object.keys(t);for(o=0;o<a.length;o++){var s;Et(t,s=a[o],kt,void 0,n,r)}}}return t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)jt(t[e],!1,this.mock)},t}();function jt(t,n,r){return t&&b(t,"__ob__")&&t.__ob__ instanceof At?t.__ob__:!St||!r&&ot()||!e(t)&&!u(t)||!Object.isExtensible(t)||t.__v_skip||Bt(t)||t instanceof ft?void 0:new At(t,n,r)}function Et(t,n,r,o,i,a,s){void 0===s&&(s=!1);var c=new yt,u=Object.getOwnPropertyDescriptor(t,n);if(!u||!1!==u.configurable){var l=u&&u.get,f=u&&u.set;l&&!f||r!==kt&&2!==arguments.length||(r=t[n]);var d=i?r&&r.__ob__:jt(r,!1,a);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var n=l?l.call(t):r;return yt.target&&(c.depend(),d&&(d.dep.depend(),e(n)&&Dt(n))),Bt(n)&&!i?n.value:n},set:function(e){var n=l?l.call(t):r;if(L(n,e)){if(f)f.call(t,e);else{if(l)return;if(!i&&Bt(n)&&!Bt(e))return void(n.value=e);r=e}d=i?e&&e.__ob__:jt(e,!1,a),c.notify()}}}),c}}function Nt(t,n,r){if(!Ft(t)){var o=t.__ob__;return e(t)&&l(n)?(t.length=Math.max(t.length,n),t.splice(n,1,r),o&&!o.shallow&&o.mock&&jt(r,!1,!0),r):n in t&&!(n in Object.prototype)?(t[n]=r,r):t._isVue||o&&o.vmCount?r:o?(Et(o.value,n,r,void 0,o.shallow,o.mock),o.dep.notify(),r):(t[n]=r,r)}}function Pt(t,n){if(e(t)&&l(n))t.splice(n,1);else{var r=t.__ob__;t._isVue||r&&r.vmCount||Ft(t)||b(t,n)&&(delete t[n],r&&r.dep.notify())}}function Dt(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Dt(n)}function Mt(t){return It(t,!0),V(t,"__v_isShallow",!0),t}function It(t,e){Ft(t)||jt(t,e,ot())}function Lt(t){return Ft(t)?Lt(t.__v_raw):!(!t||!t.__ob__)}function Rt(t){return!(!t||!t.__v_isShallow)}function Ft(t){return!(!t||!t.__v_isReadonly)}var Ht="__v_isRef";function Bt(t){return!(!t||!0!==t.__v_isRef)}function Ut(t,e){if(Bt(t))return t;var n={};return V(n,Ht,!0),V(n,"__v_isShallow",e),V(n,"dep",Et(n,"value",t,null,e,ot())),n}function zt(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];if(Bt(t))return t.value;var r=t&&t.__ob__;return r&&r.dep.depend(),t},set:function(t){var r=e[n];Bt(r)&&!Bt(t)?r.value=t:e[n]=t}})}function Vt(t,e,n){var r=t[e];if(Bt(r))return r;var o={get value(){var r=t[e];return void 0===r?n:r},set value(n){t[e]=n}};return V(o,Ht,!0),o}var Kt="__v_rawToReadonly",Jt="__v_rawToShallowReadonly";function qt(t){return Wt(t,!1)}function Wt(t,e){if(!u(t))return t;if(Ft(t))return t;var n=e?Jt:Kt,r=t[n];if(r)return r;var o=Object.create(Object.getPrototypeOf(t));V(t,n,o),V(o,"__v_isReadonly",!0),V(o,"__v_raw",t),Bt(t)&&V(o,Ht,!0),(e||Rt(t))&&V(o,"__v_isShallow",!0);for(var i=Object.keys(t),a=0;a<i.length;a++)Zt(o,t,i[a],e);return o}function Zt(t,e,n,r){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];return r||!u(t)?t:qt(t)},set:function(){}})}var Gt=$((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function Xt(t,n){function r(){var t=r.fns;if(!e(t))return _n(t,null,arguments,n,"v-on handler");for(var o=t.slice(),i=0;i<o.length;i++)_n(o[i],null,arguments,n,"v-on handler")}return r.fns=t,r}function Yt(t,e,r,i,a,s){var c,u,l,f;for(c in t)u=t[c],l=e[c],f=Gt(c),n(u)||(n(l)?(n(u.fns)&&(u=t[c]=Xt(u,s)),o(f.once)&&(u=t[c]=a(f.name,u,f.capture)),r(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)n(t[c])&&i((f=Gt(c)).name,e[c],f.capture)}function Qt(t,e,i){var a;t instanceof ft&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){i.apply(this,arguments),y(a.fns,c)}n(s)?a=Xt([c]):r(s.fns)&&o(s.merged)?(a=s).fns.push(c):a=Xt([s,c]),a.merged=!0,t[e]=a}function te(t,e,n,o,i){if(r(e)){if(b(e,n))return t[n]=e[n],i||delete e[n],!0;if(b(e,o))return t[n]=e[o],i||delete e[o],!0}return!1}function ee(t){return i(t)?[pt(t)]:e(t)?re(t):void 0}function ne(t){return r(t)&&r(t.text)&&!1===t.isComment}function re(t,a){var s,c,u,l,f=[];for(s=0;s<t.length;s++)n(c=t[s])||"boolean"==typeof c||(l=f[u=f.length-1],e(c)?c.length>0&&(ne((c=re(c,"".concat(a||"","_").concat(s)))[0])&&ne(l)&&(f[u]=pt(l.text+c[0].text),c.shift()),f.push.apply(f,c)):i(c)?ne(l)?f[u]=pt(l.text+c):""!==c&&f.push(pt(c)):ne(c)&&ne(l)?f[u]=pt(l.text+c.text):(o(t._isVList)&&r(c.tag)&&n(c.key)&&r(a)&&(c.key="__vlist".concat(a,"_").concat(s,"__")),f.push(c)));return f}var oe=1,ie=2;function ae(t,n,c,u,l,f){return(e(c)||i(c))&&(l=u,u=c,c=void 0),o(f)&&(l=ie),function(t,n,o,i,c){if(r(o)&&r(o.__ob__))return dt();r(o)&&r(o.is)&&(n=o.is);if(!n)return dt();e(i)&&a(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);c===ie?i=ee(i):c===oe&&(i=function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(i));var u,l;if("string"==typeof n){var f=void 0;l=t.$vnode&&t.$vnode.ns||B.getTagNamespace(n),u=B.isReservedTag(n)?new ft(B.parsePlatformTagName(n),o,i,void 0,void 0,t):o&&o.pre||!r(f=kr(t.$options,"components",n))?new ft(n,o,i,void 0,void 0,t):hr(f,o,t,i,n)}else u=hr(n,o,t,i);return e(u)?u:r(u)?(r(l)&&se(u,l),r(o)&&function(t){s(t.style)&&Wn(t.style);s(t.class)&&Wn(t.class)}(o),u):dt()}(t,n,c,u,l)}function se(t,e,i){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,i=!0),r(t.children))for(var a=0,s=t.children.length;a<s;a++){var c=t.children[a];r(c.tag)&&(n(c.ns)||o(i)&&"svg"!==c.tag)&&se(c,e,i)}}function ce(t,n){var o,i,a,c,u=null;if(e(t)||"string"==typeof t)for(u=new Array(t.length),o=0,i=t.length;o<i;o++)u[o]=n(t[o],o);else if("number"==typeof t)for(u=new Array(t),o=0;o<t;o++)u[o]=n(o+1,o);else if(s(t))if(ct&&t[Symbol.iterator]){u=[];for(var l=t[Symbol.iterator](),f=l.next();!f.done;)u.push(n(f.value,u.length)),f=l.next()}else for(a=Object.keys(t),u=new Array(a.length),o=0,i=a.length;o<i;o++)c=a[o],u[o]=n(t[c],c,o);return r(u)||(u=[]),u._isVList=!0,u}function ue(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=A(A({},r),n)),o=i(n)||(a(e)?e():e)):o=this.$slots[t]||(a(e)?e():e);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function le(t){return kr(this.$options,"filters",t)||P}function fe(t,n){return e(t)?-1===t.indexOf(n):t!==n}function de(t,e,n,r,o){var i=B.keyCodes[e]||n;return o&&r&&!B.keyCodes[e]?fe(o,r):i?fe(i,t):r?S(r)!==e:void 0===t}function pe(t,n,r,o,i){if(r)if(s(r)){e(r)&&(r=j(r));var a=void 0,c=function(e){if("class"===e||"style"===e||g(e))a=t;else{var s=t.attrs&&t.attrs.type;a=o||B.mustUseProp(n,s,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=x(e),u=S(e);c in a||u in a||(a[e]=r[e],i&&((t.on||(t.on={}))["update:".concat(e)]=function(t){r[e]=t}))};for(var u in r)c(u)}else;return t}function ve(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||me(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),"__static__".concat(t),!1),r}function he(t,e,n){return me(t,"__once__".concat(e).concat(n?"_".concat(n):""),!0),t}function me(t,n,r){if(e(t))for(var o=0;o<t.length;o++)t[o]&&"string"!=typeof t[o]&&ge(t[o],"".concat(n,"_").concat(o),r);else ge(t,n,r)}function ge(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function ye(t,e){if(e)if(u(e)){var n=t.on=t.on?A({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function _e(t,n,r,o){n=n||{$stable:!r};for(var i=0;i<t.length;i++){var a=t[i];e(a)?_e(a,n,r):a&&(a.proxy&&(a.fn.proxy=!0),n[a.key]=a.fn)}return o&&(n.$key=o),n}function be(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function $e(t,e){return"string"==typeof t?e+t:t}function we(t){t._o=he,t._n=v,t._s=d,t._l=ce,t._t=ue,t._q=D,t._i=M,t._m=ve,t._f=le,t._k=de,t._b=pe,t._v=pt,t._e=dt,t._u=_e,t._g=ye,t._d=be,t._p=$e}function xe(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==e&&i.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(Ce)&&delete n[u];return n}function Ce(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ke(t){return t.isComment&&t.asyncFactory}function Se(e,n,r,o){var i,a=Object.keys(r).length>0,s=n?!!n.$stable:!a,c=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(s&&o&&o!==t&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},n)n[u]&&"$"!==u[0]&&(i[u]=Oe(e,r,u,n[u]))}else i={};for(var l in r)l in i||(i[l]=Te(r,l));return n&&Object.isExtensible(n)&&(n._normalized=i),V(i,"$stable",s),V(i,"$key",c),V(i,"$hasNormal",a),i}function Oe(t,n,r,o){var i=function(){var n=ut;lt(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:ee(r))&&r[0];return lt(n),r&&(!i||1===r.length&&i.isComment&&!ke(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function Te(t,e){return function(){return t[e]}}function Ae(e){return{get attrs(){if(!e._attrsProxy){var n=e._attrsProxy={};V(n,"_v_attr_proxy",!0),je(n,e.$attrs,t,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||je(e._listenersProxy={},e.$listeners,t,e,"$listeners");return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Ne(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:O(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return zt(e,t,n)}))}}}function je(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,Ee(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function Ee(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function Ne(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function Pe(){var t=ut;return t._setupContext||(t._setupContext=Ae(t))}var De,Me,Ie=null;
vendor: 2,383 bytes, line 71
71function Le(t,e){return(t.__esModule||ct&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function Re(t){if(e(t))for(var n=0;n<t.length;n++){var o=t[n];if(r(o)&&(r(o.componentOptions)||ke(o)))return o}}function Fe(t,e){De.$on(t,e)}function He(t,e){De.$off(t,e)}function Be(t,e){var n=De;return function r(){null!==e.apply(null,arguments)&&n.$off(t,r)}}function Ue(t,e,n){De=t,Yt(e,n||{},Fe,He,Be,t),De=void 0}var ze=function(){function t(t){void 0===t&&(t=!1),this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Me,!t&&Me&&(this.index=(Me.scopes||(Me.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=Me;try{return Me=this,t()}finally{Me=e}}},t.prototype.on=function(){Me=this},t.prototype.off=function(){Me=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},t}();function Ve(){return Me}var Ke=null;function Je(t){var e=Ke;return Ke=t,function(){Ke=e}}function qe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function We(t,e){if(e){if(t._directInactive=!1,qe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)We(t.$children[n]);Ge(t,"activated")}}function Ze(t,e){if(!(e&&(t._directInactive=!0,qe(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)Ze(t.$children[n]);Ge(t,"deactivated")}}function Ge(t,e,n,r){void 0===r&&(r=!0),bt();var o=ut,i=Ve();r&<(t);var a=t.$options[e],s="".concat(e," hook");if(a)for(var c=0,u=a.length;c<u;c++)_n(a[c],t,n||null,t,s);t._hasHookEvent&&t.$emit("hook:"+e),r&&(lt(o),i&&i.on()),$t()}var Xe=[],Ye=[],Qe={},tn=!1,en=!1,nn=0;var rn=0,on=Date.now;if(q&&!Z){var an=window.performance;an&&"function"==typeof an.now&&on()>document.createEvent("Event").timeStamp&&(on=function(){return an.now()})}var sn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function cn(){var t,e;for(rn=on(),en=!0,Xe.sort(sn),nn=0;nn<Xe.length;
vendor: 24,826 bytes, line 71
71nn++)(t=Xe[nn]).before&&t.before(),e=t.id,Qe[e]=null,t.run();var n=Ye.slice(),r=Xe.slice();nn=Xe.length=Ye.length=0,Qe={},tn=en=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,We(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ge(r,"updated")}}(r),gt(),it&&B.devtools&&it.emit("flush")}function un(t){var e=t.id;if(null==Qe[e]&&(t!==yt.target||!t.noRecurse)){if(Qe[e]=!0,en){for(var n=Xe.length-1;n>nn&&Xe[n].id>t.id;)n--;Xe.splice(n+1,0,t)}else Xe.push(t);tn||(tn=!0,En(cn))}}var ln="watcher",fn="".concat(ln," callback"),dn="".concat(ln," getter"),pn="".concat(ln," cleanup");function vn(t,e){return mn(t,null,{flush:"post"})}var hn={};function mn(n,r,o){var i=void 0===o?t:o,s=i.immediate,c=i.deep,u=i.flush,l=void 0===u?"pre":u;i.onTrack,i.onTrigger;var f,d,p=ut,v=function(t,e,n){void 0===n&&(n=null);var r=_n(t,null,n,p,e);return c&&r&&r.__ob__&&r.__ob__.dep.depend(),r},h=!1,m=!1;if(Bt(n)?(f=function(){return n.value},h=Rt(n)):Lt(n)?(f=function(){return n.__ob__.dep.depend(),n},c=!0):e(n)?(m=!0,h=n.some((function(t){return Lt(t)||Rt(t)})),f=function(){return n.map((function(t){return Bt(t)?t.value:Lt(t)?(t.__ob__.dep.depend(),Wn(t)):a(t)?v(t,dn):void 0}))}):f=a(n)?r?function(){return v(n,dn)}:function(){if(!p||!p._isDestroyed)return d&&d(),v(n,ln,[y])}:E,r&&c){var g=f;f=function(){return Wn(g())}}var y=function(t){d=_.onStop=function(){v(t,pn)}};if(ot())return y=E,r?s&&v(r,fn,[f(),m?[]:void 0,y]):f(),E;var _=new Xn(ut,f,E,{lazy:!0});_.noRecurse=!r;var b=m?[]:hn;return _.run=function(){if(_.active)if(r){var t=_.get();(c||h||(m?t.some((function(t,e){return L(t,b[e])})):L(t,b)))&&(d&&d(),v(r,fn,[t,b===hn?void 0:b,y]),b=t)}else _.get()},"sync"===l?_.update=_.run:"post"===l?(_.post=!0,_.update=function(){return un(_)}):_.update=function(){if(p&&p===ut&&!p._isMounted){var t=p._preWatchers||(p._preWatchers=[]);t.indexOf(_)<0&&t.push(_)}else un(_)},r?s?_.run():b=_.get():"post"===l&&p?p.$once("hook:mounted",(function(){return _.get()})):_.get(),function(){_.teardown()}}function gn(t){var e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}function yn(t,e,n){bt();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,t,e,n))return}catch(t){bn(t,r,"errorCaptured hook")}}bn(t,e,n)}finally{$t()}}function _n(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue&&f(i)&&!i._handled&&(i.catch((function(t){return yn(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(t){yn(t,r,o)}return i}function bn(t,e,n){if(B.errorHandler)try{return B.errorHandler.call(null,t,e,n)}catch(e){e!==t&&$n(e)}$n(t)}function $n(t,e,n){if(!q||"undefined"==typeof console)throw t;console.error(t)}var wn,xn=!1,Cn=[],kn=!1;function Sn(){kn=!1;var t=Cn.slice(0);Cn.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&at(Promise)){var On=Promise.resolve();wn=function(){On.then(Sn),Y&&setTimeout(E)},xn=!0}else if(Z||"undefined"==typeof MutationObserver||!at(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())wn="undefined"!=typeof setImmediate&&at(setImmediate)?function(){setImmediate(Sn)}:function(){setTimeout(Sn,0)};else{var Tn=1,An=new MutationObserver(Sn),jn=document.createTextNode(String(Tn));An.observe(jn,{characterData:!0}),wn=function(){Tn=(Tn+1)%2,jn.data=String(Tn)},xn=!0}function En(t,e){var n;if(Cn.push((function(){if(t)try{t.call(e)}catch(t){yn(t,e,"nextTick")}else n&&n(e)})),kn||(kn=!0,wn()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}function Nn(t){return function(e,n){if(void 0===n&&(n=ut),n)return function(t,e,n){var r=t.$options;r[e]=$r(r[e],n)}(n,t,e)}}var Pn=Nn("beforeMount"),Dn=Nn("mounted"),Mn=Nn("beforeUpdate"),In=Nn("updated"),Ln=Nn("beforeDestroy"),Rn=Nn("destroyed"),Fn=Nn("activated"),Hn=Nn("deactivated"),Bn=Nn("serverPrefetch"),Un=Nn("renderTracked"),zn=Nn("renderTriggered"),Vn=Nn("errorCaptured");var Kn="2.7.16";var Jn=Object.freeze({__proto__:null,version:Kn,defineComponent:function(t){return t},ref:function(t){return Ut(t,!1)},shallowRef:function(t){return Ut(t,!0)},isRef:Bt,toRef:Vt,toRefs:function(t){var n=e(t)?new Array(t.length):{};for(var r in t)n[r]=Vt(t,r);return n},unref:function(t){return Bt(t)?t.value:t},proxyRefs:function(t){if(Lt(t))return t;for(var e={},n=Object.keys(t),r=0;r<n.length;r++)zt(e,t,n[r]);return e},customRef:function(t){var e=new yt,n=t((function(){e.depend()}),(function(){e.notify()})),r=n.get,o=n.set,i={get value(){return r()},set value(t){o(t)}};return V(i,Ht,!0),i},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return It(t,!1),t},isReactive:Lt,isReadonly:Ft,isShallow:Rt,isProxy:function(t){return Lt(t)||Ft(t)},shallowReactive:Mt,markRaw:function(t){return Object.isExtensible(t)&&V(t,"__v_skip",!0),t},toRaw:function t(e){var n=e&&e.__v_raw;return n?t(n):e},readonly:qt,shallowReadonly:function(t){return Wt(t,!0)},computed:function(t,e){var n,r,o=a(t);o?(n=t,r=E):(n=t.get,r=t.set);var i=ot()?null:new Xn(ut,n,E,{lazy:!0}),s={effect:i,get value(){return i?(i.dirty&&i.evaluate(),yt.target&&i.depend(),i.value):n()},set value(t){r(t)}};return V(s,Ht,!0),V(s,"__v_isReadonly",o),s},watch:function(t,e,n){return mn(t,e,n)},watchEffect:function(t,e){return mn(t,null,e)},watchPostEffect:vn,watchSyncEffect:function(t,e){return mn(t,null,{flush:"sync"})},EffectScope:ze,effectScope:function(t){return new ze(t)},onScopeDispose:function(t){Me&&Me.cleanups.push(t)},getCurrentScope:Ve,provide:function(t,e){ut&&(gn(ut)[t]=e)},inject:function(t,e,n){void 0===n&&(n=!1);var r=ut;if(r){var o=r.$parent&&r.$parent._provided;if(o&&t in o)return o[t];if(arguments.length>1)return n&&a(e)?e.call(r):e}},h:function(t,e,n){return ae(ut,t,e,n,2,!0)},getCurrentInstance:function(){return ut&&{proxy:ut}},useSlots:function(){return Pe().slots},useAttrs:function(){return Pe().attrs},useListeners:function(){return Pe().listeners},mergeDefaults:function(t,n){var r=e(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var o in n){var i=r[o];i?e(i)||a(i)?r[o]={type:i,default:n[o]}:i.default=n[o]:null===i&&(r[o]={default:n[o]})}return r},nextTick:En,set:Nt,del:Pt,useCssModule:function(e){return t},useCssVars:function(t){if(q){var e=ut;e&&vn((function(){var n=e.$el,r=t(e,e._setupProxy);if(n&&1===n.nodeType){var o=n.style;for(var i in r)o.setProperty("--".concat(i),r[i])}}))}},defineAsyncComponent:function(t){a(t)&&(t={loader:t});var e=t.loader,n=t.loadingComponent,r=t.errorComponent,o=t.delay,i=void 0===o?200:o,s=t.timeout;t.suspensible;var c=t.onError,u=null,l=0,f=function(){var t;return u||(t=u=e().catch((function(t){if(t=t instanceof Error?t:new Error(String(t)),c)return new Promise((function(e,n){c(t,(function(){return e((l++,u=null,f()))}),(function(){return n(t)}),l+1)}));throw t})).then((function(e){return t!==u&&u?u:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e)})))};return function(){return{component:f(),delay:i,timeout:s,error:r,loading:n}}},onBeforeMount:Pn,onMounted:Dn,onBeforeUpdate:Mn,onUpdated:In,onBeforeUnmount:Ln,onUnmounted:Rn,onActivated:Fn,onDeactivated:Hn,onServerPrefetch:Bn,onRenderTracked:Un,onRenderTriggered:zn,onErrorCaptured:function(t,e){void 0===e&&(e=ut),Vn(t,e)}}),qn=new st;function Wn(t){return Zn(t,qn),qn.clear(),t}function Zn(t,n){var r,o,i=e(t);if(!(!i&&!s(t)||t.__v_skip||Object.isFrozen(t)||t instanceof ft)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)Zn(t[r],n);else if(Bt(t))Zn(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)Zn(t[o[r]],n)}}var Gn=0,Xn=function(){function t(t,e,n,r,o){!function(t,e){void 0===e&&(e=Me),e&&e.active&&e.effects.push(t)}(this,Me&&!Me._vm?Me:t?t._scope:void 0),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Gn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="",a(e)?this.getter=e:(this.getter=function(t){if(!K.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=E)),this.value=this.lazy?void 0:this.get()}return t.prototype.get=function(){var t;bt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;yn(t,e,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&Wn(t),$t(),this.cleanupDeps()}return t},t.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},t.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},t.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():un(this)},t.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'.concat(this.expression,'"');_n(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},t.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},t.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&y(this.vm._scope.effects,this),this.active){for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},t}(),Yn={enumerable:!0,configurable:!0,get:E,set:E};function Qn(t,e,n){Yn.get=function(){return this[e][n]},Yn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Yn)}function tr(t){var n=t.$options;if(n.props&&function(t,e){var n=t.$options.propsData||{},r=t._props=Mt({}),o=t.$options._propKeys=[],i=!t.$parent;i||Ot(!1);var a=function(i){o.push(i);var a=Sr(i,e,n,t);Et(r,i,a,void 0,!0),i in t||Qn(t,"_props",i)};for(var s in e)a(s);Ot(!0)}(t,n.props),function(t){var e=t.$options,n=e.setup;if(n){var r=t._setupContext=Ae(t);lt(t),bt();var o=_n(n,null,[t._props||Mt({}),r],t,"setup");if($t(),lt(),a(o))e.render=o;else if(s(o))if(t._setupState=o,o.__sfc){var i=t._setupProxy={};for(var c in o)"__sfc"!==c&&zt(i,o,c)}else for(var c in o)z(c)||zt(t,o,c)}}(t),n.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?E:O(e[n],t)}(t,n.methods),n.data)!function(t){var e=t.$options.data;e=t._data=a(e)?function(t,e){bt();try{return t.call(e,e)}catch(t){return yn(t,e,"data()"),{}}finally{$t()}}(e,t):e||{},u(e)||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&b(r,i)||z(i)||Qn(t,"_data",i)}var s=jt(e);s&&s.vmCount++}(t);else{var r=jt(t._data={});r&&r.vmCount++}n.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=ot();for(var o in e){var i=e[o],s=a(i)?i:i.get;r||(n[o]=new Xn(t,s||E,E,er)),o in t||nr(t,o,i)}}(t,n.computed),n.watch&&n.watch!==et&&function(t,n){for(var r in n){var o=n[r];if(e(o))for(var i=0;i<o.length;i++)ir(t,r,o[i]);else ir(t,r,o)}}(t,n.watch)}var er={lazy:!0};function nr(t,e,n){var r=!ot();a(n)?(Yn.get=r?rr(e):or(n),Yn.set=E):(Yn.get=n.get?r&&!1!==n.cache?rr(e):or(n.get):E,Yn.set=n.set||E),Object.defineProperty(t,e,Yn)}function rr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),yt.target&&e.depend(),e.value}}function or(t){return function(){return t.call(this,this)}}function ir(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function ar(t,e){if(t){for(var n=Object.create(null),r=ct?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=t[i].from;if(s in e._provided)n[i]=e._provided[s];else if("default"in t[i]){var c=t[i].default;n[i]=a(c)?c.call(e):c}}}return n}}var sr=0;function cr(t){var e=t.options;if(t.super){var n=cr(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}(t);r&&A(t.extendOptions,r),(e=t.options=Cr(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function ur(n,r,i,a,s){var c,u=this,l=s.options;b(a,"_uid")?(c=Object.create(a))._original=a:(c=a,a=a._original);var f=o(l._compiled),d=!f;this.data=n,this.props=r,this.children=i,this.parent=a,this.listeners=n.on||t,this.injections=ar(l.inject,a),this.slots=function(){return u.$slots||Se(a,n.scopedSlots,u.$slots=xe(i,a)),u.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Se(a,n.scopedSlots,this.slots())}}),f&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=Se(a,n.scopedSlots,this.$slots)),l._scopeId?this._c=function(t,n,r,o){var i=ae(c,t,n,r,o,d);return i&&!e(i)&&(i.fnScopeId=l._scopeId,i.fnContext=a),i}:this._c=function(t,e,n,r){return ae(c,t,e,n,r,d)}}function lr(t,e,n,r,o){var i=vt(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function fr(t,e){for(var n in e)t[x(n)]=e[n]}function dr(t){return t.name||t.__name||t._componentTag}we(ur.prototype);var pr={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;pr.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},o=t.data.inlineTemplate;r(o)&&(n.render=o.render,n.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Ke)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,o,i){var a=o.data.scopedSlots,s=e.$scopedSlots,c=!!(a&&!a.$stable||s!==t&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key||!a&&e.$scopedSlots.$key),u=!!(i||e.$options._renderChildren||c),l=e.$vnode;e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o),e.$options._renderChildren=i;var f=o.data.attrs||t;e._attrsProxy&&je(e._attrsProxy,f,l.data&&l.data.attrs||t,e,"$attrs")&&(u=!0),e.$attrs=f,r=r||t;var d=e.$options._parentListeners;if(e._listenersProxy&&je(e._listenersProxy,r,d||t,e,"$listeners"),e.$listeners=e.$options._parentListeners=r,Ue(e,r,d),n&&e.$options.props){Ot(!1);for(var p=e._props,v=e.$options._propKeys||[],h=0;h<v.length;h++){var m=v[h],g=e.$options.props;p[m]=Sr(m,g,n,e)}Ot(!0),e.$options.propsData=n}u&&(e.$slots=xe(i,o.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Ge(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,Ye.push(e)):We(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Ze(e,!0):e.$destroy())}},vr=Object.keys(pr);function hr(i,a,c,u,l){if(!n(i)){var d=c.$options._base;if(s(i)&&(i=d.extend(i)),"function"==typeof i){var p;if(n(i.cid)&&(i=function(t,e){if(o(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;var i=Ie;if(i&&r(t.owners)&&-1===t.owners.indexOf(i)&&t.owners.push(i),o(t.loading)&&r(t.loadingComp))return t.loadingComp;if(i&&!r(t.owners)){var a=t.owners=[i],c=!0,u=null,l=null;i.$on("hook:destroyed",(function(){return y(a,i)}));var d=function(t){for(var e=0,n=a.length;e<n;e++)a[e].$forceUpdate();t&&(a.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},p=I((function(n){t.resolved=Le(n,e),c?a.length=0:d(!0)})),v=I((function(e){r(t.errorComp)&&(t.error=!0,d(!0))})),h=t(p,v);return s(h)&&(f(h)?n(t.resolved)&&h.then(p,v):f(h.component)&&(h.component.then(p,v),r(h.error)&&(t.errorComp=Le(h.error,e)),r(h.loading)&&(t.loadingComp=Le(h.loading,e),0===h.delay?t.loading=!0:u=setTimeout((function(){u=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,d(!1))}),h.delay||200)),r(h.timeout)&&(l=setTimeout((function(){l=null,n(t.resolved)&&v(null)}),h.timeout)))),c=!1,t.loading?t.loadingComp:t.resolved}}(p=i,d),void 0===i))return function(t,e,n,r,o){var i=dt();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}(p,a,c,u,l);a=a||{},cr(i),r(a.model)&&function(t,n){var o=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[o]=n.model.value;var a=n.on||(n.on={}),s=a[i],c=n.model.callback;r(s)?(e(s)?-1===s.indexOf(c):s!==c)&&(a[i]=[c].concat(s)):a[i]=c}(i.options,a);var v=function(t,e,o){var i=e.options.props;if(!n(i)){var a={},s=t.attrs,c=t.props;if(r(s)||r(c))for(var u in i){var l=S(u);te(a,c,u,l,!0)||te(a,s,u,l,!1)}return a}}(a,i);if(o(i.options.functional))return function(n,o,i,a,s){var c=n.options,u={},l=c.props;if(r(l))for(var f in l)u[f]=Sr(f,l,o||t);else r(i.attrs)&&fr(u,i.attrs),r(i.props)&&fr(u,i.props);var d=new ur(i,u,s,a,n),p=c.render.call(null,d._c,d);if(p instanceof ft)return lr(p,i,d.parent,c);if(e(p)){for(var v=ee(p)||[],h=new Array(v.length),m=0;m<v.length;m++)h[m]=lr(v[m],i,d.parent,c);return h}}(i,v,a,c,u);var h=a.on;if(a.on=a.nativeOn,o(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<vr.length;n++){var r=vr[n],o=e[r],i=pr[r];o===i||o&&o._merged||(e[r]=o?mr(i,o):i)}}(a);var g=dr(i.options)||l;return new ft("vue-component-".concat(i.cid).concat(g?"-".concat(g):""),a,void 0,void 0,void 0,c,{Ctor:i,propsData:v,listeners:h,tag:l,children:u},p)}}}function mr(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var gr=E,yr=B.optionMergeStrategies;function _r(t,e,n){if(void 0===n&&(n=!0),!e)return t;for(var r,o,i,a=ct?Reflect.ownKeys(e):Object.keys(e),s=0;s<a.length;s++)"__ob__"!==(r=a[s])&&(o=t[r],i=e[r],n&&b(t,r)?o!==i&&u(o)&&u(i)&&_r(o,i):Nt(t,r,i));return t}function br(t,e,n){return n?function(){var r=a(e)?e.call(n,n):e,o=a(t)?t.call(n,n):t;return r?_r(r,o):o}:e?t?function(){return _r(a(e)?e.call(this,this):e,a(t)?t.call(this,this):t)}:e:t}function $r(t,n){var r=n?t?t.concat(n):e(n)?n:[n]:t;return r?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r):r}function wr(t,e,n,r){var o=Object.create(t||null);return e?A(o,e):o}yr.data=function(t,e,n){return n?br(t,e,n):e&&"function"!=typeof e?t:br(t,e)},H.forEach((function(t){yr[t]=$r})),F.forEach((function(t){yr[t+"s"]=wr})),yr.watch=function(t,n,r,o){if(t===et&&(t=void 0),n===et&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;var i={};for(var a in A(i,t),n){var s=i[a],c=n[a];s&&!e(s)&&(s=[s]),i[a]=s?s.concat(c):e(c)?c:[c]}return i},yr.props=yr.methods=yr.inject=yr.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return A(o,t),e&&A(o,e),o},yr.provide=function(t,e){return t?function(){var n=Object.create(null);return _r(n,a(t)?t.call(this):t),e&&_r(n,a(e)?e.call(this):e,!1),n}:e};var xr=function(t,e){return void 0===e?t:e};function Cr(t,n,r){if(a(n)&&(n=n.options),function(t,n){var r=t.props;if(r){var o,i,a={};if(e(r))for(o=r.length;o--;)"string"==typeof(i=r[o])&&(a[x(i)]={type:null});else if(u(r))for(var s in r)i=r[s],a[x(s)]=u(i)?i:{type:i};t.props=a}}(n),function(t,n){var r=t.inject;if(r){var o=t.inject={};if(e(r))for(var i=0;i<r.length;i++)o[r[i]]={from:r[i]};else if(u(r))for(var a in r){var s=r[a];o[a]=u(s)?A({from:a},s):{from:s}}}}(n),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];a(r)&&(e[n]={bind:r,update:r})}}(n),!n._base&&(n.extends&&(t=Cr(t,n.extends,r)),n.mixins))for(var o=0,i=n.mixins.length;o<i;o++)t=Cr(t,n.mixins[o],r);var s,c={};for(s in t)l(s);for(s in n)b(t,s)||l(s);function l(e){var o=yr[e]||xr;c[e]=o(t[e],n[e],r,e)}return c}function kr(t,e,n,r){if("string"==typeof n){var o=t[e];if(b(o,n))return o[n];var i=x(n);if(b(o,i))return o[i];var a=C(i);return b(o,a)?o[a]:o[n]||o[i]||o[a]}}function Sr(t,e,n,r){var o=e[t],i=!b(n,t),s=n[t],c=jr(Boolean,o.type);if(c>-1)if(i&&!b(o,"default"))s=!1;else if(""===s||s===S(t)){var u=jr(String,o.type);(u<0||c<u)&&(s=!0)}if(void 0===s){s=function(t,e,n){if(!b(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return a(r)&&"Function"!==Tr(e.type)?r.call(t):r}(r,o,t);var l=St;Ot(!0),jt(s),Ot(l)}return s}var Or=/^\s*function (\w+)/;function Tr(t){var e=t&&t.toString().match(Or);return e?e[1]:""}function Ar(t,e){return Tr(t)===Tr(e)}function jr(t,n){if(!e(n))return Ar(n,t)?0:-1;for(var r=0,o=n.length;r<o;r++)if(Ar(n[r],t))return r;return-1}function Er(t){this._init(t)}function Nr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=dr(t)||dr(n.options),a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Cr(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)Qn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)nr(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,F.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=A({},a.options),o[r]=a,a}}function Pr(t){return t&&(dr(t.Ctor.options)||t.tag)}function Dr(t,n){return e(t)?t.indexOf(n)>-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===c.call(r)&&t.test(n));var r}function Mr(t,e){var n=t.cache,r=t.keys,o=t._vnode,i=t.$vnode;for(var a in n){var s=n[a];if(s){var c=s.name;c&&!e(c)&&Ir(n,a,r,o)}}i.componentOptions.children=void 0}function Ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(e){e.prototype._init=function(e){var n=this;n._uid=sr++,n._isVue=!0,n.__v_skip=!0,n._scope=new ze(!0),n._scope.parent=void 0,n._scope._vm=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=Cr(cr(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ue(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=xe(n._renderChildren,o),e.$scopedSlots=r?Se(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,o){return ae(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return ae(e,t,n,r,o,!0)};var i=r&&r.data;Et(e,"$attrs",i&&i.attrs||t,null,!0),Et(e,"$listeners",n._parentListeners||t,null,!0)}(n),Ge(n,"beforeCreate",void 0,!1),function(t){var e=ar(t.$options.inject,t);e&&(Ot(!1),Object.keys(e).forEach((function(n){Et(t,n,e[n])})),Ot(!0))}(n),tr(n),function(t){var e=t.$options.provide;if(e){var n=a(e)?e.call(t):e;if(!s(n))return;for(var r=gn(t),o=ct?Reflect.ownKeys(n):Object.keys(n),i=0;i<o.length;i++){var c=o[i];Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(n,c))}}}(n),Ge(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(Er),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Nt,t.prototype.$delete=Pt,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return ir(r,t,e,n);(n=n||{}).user=!0;var o=new Xn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');bt(),_n(e,r,[o.value],r,i),$t()}return function(){o.teardown()}}}(Er),function(t){var n=/^hook:/;t.prototype.$on=function(t,r){var o=this;if(e(t))for(var i=0,a=t.length;i<a;i++)o.$on(t[i],r);else(o._events[t]||(o._events[t]=[])).push(r),n.test(t)&&(o._hasHookEvent=!0);return o},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,n){var r=this;if(!arguments.length)return r._events=Object.create(null),r;if(e(t)){for(var o=0,i=t.length;o<i;o++)r.$off(t[o],n);return r}var a,s=r._events[t];if(!s)return r;if(!n)return r._events[t]=null,r;for(var c=s.length;c--;)if((a=s[c])===n||a.fn===n){s.splice(c,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?T(n):n;
vendor: 18,320 bytes, line 71
71for(var r=T(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;i<a;i++)_n(n[i],e,r,e,o)}return e}}(Er),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Je(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var a=n;a&&a.$vnode&&a.$parent&&a.$vnode===a.$parent._vnode;)a.$parent.$el=a.$el,a=a.$parent},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Ge(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||y(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Ge(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Er),function(t){we(t.prototype),t.prototype.$nextTick=function(t){return En(t,this)},t.prototype._render=function(){var t=this,n=t.$options,r=n.render,o=n._parentVnode;o&&t._isMounted&&(t.$scopedSlots=Se(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Ne(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;var i,a=ut,s=Ie;try{lt(t),Ie=t,i=r.call(t._renderProxy,t.$createElement)}catch(e){yn(e,t,"render"),i=t._vnode}finally{Ie=s,lt(a)}return e(i)&&1===i.length&&(i=i[0]),i instanceof ft||(i=dt()),i.parent=o,i}}(Er);var Lr=[String,RegExp,Array],Rr={name:"keep-alive",abstract:!0,props:{include:Lr,exclude:Lr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:Pr(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&Ir(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Mr(t,(function(t){return Dr(e,t)}))})),this.$watch("exclude",(function(e){Mr(t,(function(t){return!Dr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Re(t),n=e&&e.componentOptions;if(n){var r=Pr(n),o=this.include,i=this.exclude;if(o&&(!r||!Dr(o,r))||i&&r&&Dr(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,y(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Fr={KeepAlive:Rr};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:gr,extend:A,mergeOptions:Cr,defineReactive:Et},t.set=Nt,t.delete=Pt,t.nextTick=En,t.observable=function(t){return jt(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,Fr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=T(arguments,1);return n.unshift(this),a(t.install)?t.install.apply(t,n):a(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Cr(this.options,t),this}}(t),Nr(t),function(t){F.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&a(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Er),Object.defineProperty(Er.prototype,"$isServer",{get:ot}),Object.defineProperty(Er.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Er,"FunctionalRenderContext",{value:ur}),Er.version=Kn;var Hr=h("style,class"),Br=h("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Br(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zr=h("contenteditable,draggable,spellcheck"),Vr=h("events,caret,typing,plaintext-only"),Kr=function(t,e){return Gr(e)||"false"===e?"false":"contenteditable"===t&&Vr(e)?e:"true"},Jr=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),qr="http://www.w3.org/1999/xlink",Wr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Zr=function(t){return Wr(t)?t.slice(6,t.length):""},Gr=function(t){return null==t||!1===t};function Xr(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Yr(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Yr(e,n.data));return function(t,e){if(r(t)||r(e))return Qr(t,to(e));return""}(e.staticClass,e.class)}function Yr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return t?e?t+" "+e:t:e||""}function to(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o<i;o++)r(e=to(t[o]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):s(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var eo={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},no=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ro=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),oo=function(t){return no(t)||ro(t)};function io(t){return ro(t)?"svg":"math"===t?"math":void 0}var ao=Object.create(null);var so=h("text,number,password,search,email,tel,url");function co(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var uo=Object.freeze({__proto__:null,createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(eo[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),lo={create:function(t,e){fo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(fo(t,!0),fo(e))},destroy:function(t){fo(t,!0)}};function fo(t,n){var o=t.data.ref;if(r(o)){var i=t.context,s=t.componentInstance||t.elm,c=n?null:s,u=n?void 0:s;if(a(o))_n(o,i,[c],i,"template ref function");else{var l=t.data.refInFor,f="string"==typeof o||"number"==typeof o,d=Bt(o),p=i.$refs;if(f||d)if(l){var v=f?p[o]:o.value;n?e(v)&&y(v,s):e(v)?v.includes(s)||v.push(s):f?(p[o]=[s],po(i,o,p[o])):o.value=[s]}else if(f){if(n&&p[o]!==s)return;p[o]=u,po(i,o,c)}else if(d){if(n&&o.value!==s)return;o.value=c}}}}function po(t,e,n){var r=t._setupState;r&&b(r,e)&&(Bt(r[e])?r[e].value=n:r[e]=n)}var vo=new ft("",{},[]),ho=["create","activate","update","remove","destroy"];function mo(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,o=r(n=t.data)&&r(n=n.attrs)&&n.type,i=r(n=e.data)&&r(n=n.attrs)&&n.type;return o===i||so(o)&&so(i)}(t,e)||o(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function go(t,e,n){var o,i,a={};for(o=e;o<=n;++o)r(i=t[o].key)&&(a[i]=o);return a}var yo={create:_o,update:_o,destroy:function(t){_o(t,vo)}};function _o(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,o,i=t===vo,a=e===vo,s=$o(t.data.directives,t.context),c=$o(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,xo(o,"update",e,t),o.def&&o.def.componentUpdated&&l.push(o)):(xo(o,"bind",e,t),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n<u.length;n++)xo(u[n],"inserted",e,t)};i?Qt(e,"insert",f):f()}l.length&&Qt(e,"postpatch",(function(){for(var n=0;n<l.length;n++)xo(l[n],"componentUpdated",e,t)}));if(!i)for(n in s)c[n]||xo(s[n],"unbind",t,t,a)}(t,e)}var bo=Object.create(null);function $o(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++){if((r=t[n]).modifiers||(r.modifiers=bo),o[wo(r)]=r,e._setupState&&e._setupState.__sfc){var i=r.def||kr(e,"_setupState","v-"+r.name);r.def="function"==typeof i?{bind:i,update:i}:i}r.def=r.def||kr(e.$options,"directives",r.name)}return o}function wo(t){return t.rawName||"".concat(t.name,".").concat(Object.keys(t.modifiers||{}).join("."))}function xo(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(r){yn(r,n.context,"directive ".concat(t.name," ").concat(e," hook"))}}var Co=[lo,yo];function ko(t,e){var i=e.componentOptions;if(!(r(i)&&!1===i.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var a,s,c=e.elm,u=t.data.attrs||{},l=e.data.attrs||{};for(a in(r(l.__ob__)||o(l._v_attr_proxy))&&(l=e.data.attrs=A({},l)),l)s=l[a],u[a]!==s&&So(c,a,s,e.data.pre);for(a in(Z||X)&&l.value!==u.value&&So(c,"value",l.value),u)n(l[a])&&(Wr(a)?c.removeAttributeNS(qr,Zr(a)):zr(a)||c.removeAttribute(a))}}function So(t,e,n,r){r||t.tagName.indexOf("-")>-1?Oo(t,e,n):Jr(e)?Gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zr(e)?t.setAttribute(e,Kr(e,n)):Wr(e)?Gr(n)?t.removeAttributeNS(qr,Zr(e)):t.setAttributeNS(qr,e,n):Oo(t,e,n)}function Oo(t,e,n){if(Gr(n))t.removeAttribute(e);else{if(Z&&!G&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var To={create:ko,update:ko};function Ao(t,e){var o=e.elm,i=e.data,a=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=Xr(e),c=o._transitionClasses;r(c)&&(s=Qr(s,to(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var jo,Eo,No,Po,Do,Mo,Io={create:Ao,update:Ao},Lo=/[\w).+\-_$\]]/;function Ro(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),a)39===e&&92!==n&&(a=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(u)47===e&&92!==n&&(u=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||l||f||d){switch(e){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===e){for(var v=r-1,h=void 0;v>=0&&" "===(h=t.charAt(v));v--);h&&Lo.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==p&&m(),i)for(r=0;r<i.length;r++)o=Fo(o,i[r]);return o}function Fo(t,e){var n=e.indexOf("(");if(n<0)return'_f("'.concat(e,'")(').concat(t,")");var r=e.slice(0,n),o=e.slice(n+1);return'_f("'.concat(r,'")(').concat(t).concat(")"!==o?","+o:o)}function Ho(t,e){console.error("[Vue compiler]: ".concat(t))}function Bo(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Uo(t,e,n,r,o){(t.props||(t.props=[])).push(Xo({name:e,value:n,dynamic:o},r)),t.plain=!1}function zo(t,e,n,r,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(Xo({name:e,value:n,dynamic:o},r)),t.plain=!1}function Vo(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(Xo({name:e,value:n},r))}function Ko(t,e,n,r,o,i,a,s){(t.directives||(t.directives=[])).push(Xo({name:e,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),t.plain=!1}function Jo(t,e,n){return n?"_p(".concat(e,',"').concat(t,'")'):t+e}function qo(e,n,r,o,i,a,s,c){var u;(o=o||t).right?c?n="(".concat(n,")==='click'?'contextmenu':(").concat(n,")"):"click"===n&&(n="contextmenu",delete o.right):o.middle&&(c?n="(".concat(n,")==='click'?'mouseup':(").concat(n,")"):"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=Jo("!",n,c)),o.once&&(delete o.once,n=Jo("~",n,c)),o.passive&&(delete o.passive,n=Jo("&",n,c)),o.native?(delete o.native,u=e.nativeEvents||(e.nativeEvents={})):u=e.events||(e.events={});var l=Xo({value:r.trim(),dynamic:c},s);o!==t&&(l.modifiers=o);var f=u[n];Array.isArray(f)?i?f.unshift(l):f.push(l):u[n]=f?i?[l,f]:[f,l]:l,e.plain=!1}function Wo(t,e,n){var r=Zo(t,":"+e)||Zo(t,"v-bind:"+e);if(null!=r)return Ro(r);if(!1!==n){var o=Zo(t,e);if(null!=o)return JSON.stringify(o)}}function Zo(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var o=t.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===e){o.splice(i,1);break}return n&&delete t.attrsMap[e],r}function Go(t,e){for(var n=t.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(e.test(i.name))return n.splice(r,1),i}}function Xo(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Yo(t,e,n){var r=n||{},o=r.number,i="$$v",a=i;r.trim&&(a="(typeof ".concat(i," === 'string'")+"? ".concat(i,".trim()")+": ".concat(i,")")),o&&(a="_n(".concat(a,")"));var s=Qo(e,a);t.model={value:"(".concat(e,")"),expression:JSON.stringify(e),callback:"function (".concat(i,") {").concat(s,"}")}}function Qo(t,e){var n=function(t){if(t=t.trim(),jo=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<jo-1)return(Po=t.lastIndexOf("."))>-1?{exp:t.slice(0,Po),key:'"'+t.slice(Po+1)+'"'}:{exp:t,key:null};Eo=t,Po=Do=Mo=0;for(;!ei();)ni(No=ti())?oi(No):91===No&&ri(No);return{exp:t.slice(0,Do),key:t.slice(Do+1,Mo)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function ti(){return Eo.charCodeAt(++Po)}function ei(){return Po>=jo}function ni(t){return 34===t||39===t}function ri(t){var e=1;for(Do=Po;!ei();)if(ni(t=ti()))oi(t);else if(91===t&&e++,93===t&&e--,0===e){Mo=Po;break}}function oi(t){for(var e=t;!ei()&&(t=ti())!==e;);}var ii,ai="__r",si="__c";function ci(t,e,n){var r=ii;return function o(){null!==e.apply(null,arguments)&&fi(t,o,n,r)}}var ui=xn&&!(tt&&Number(tt[1])<=53);function li(t,e,n,r){if(ui){var o=rn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}ii.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function fi(t,e,n,r){(r||ii).removeEventListener(t,e._wrapper||e,n)}function di(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};ii=e.elm||t.elm,function(t){if(r(t[ai])){var e=Z?"change":"input";t[e]=[].concat(t[ai],t[e]||[]),delete t[ai]}r(t[si])&&(t.change=[].concat(t[si],t.change||[]),delete t[si])}(o),Yt(o,i,li,fi,ci,e.context),ii=void 0}}var pi,vi={create:di,update:di,destroy:function(t){return di(t,vo)}};function hi(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,a,s=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(i in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.domProps=A({},u)),c)i in u||(s[i]="");for(i in u){if(a=u[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),a===c[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=a;var l=n(a)?"":String(a);mi(s,l)&&(s.value=l)}else if("innerHTML"===i&&ro(s.tagName)&&n(s.innerHTML)){(pi=pi||document.createElement("div")).innerHTML="<svg>".concat(a,"</svg>");for(var f=pi.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}else if(a!==c[i])try{s[i]=a}catch(t){}}}}function mi(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return v(n)!==v(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var gi={create:hi,update:hi},yi=$((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function _i(t){var e=bi(t.style);return t.staticStyle?A(t.staticStyle,e):e}function bi(t){return Array.isArray(t)?j(t):"string"==typeof t?yi(t):t}var $i,wi=/^--/,xi=/\s*!important$/,Ci=function(t,e,n){if(wi.test(e))t.style.setProperty(e,n);else if(xi.test(n))t.style.setProperty(S(e),n.replace(xi,""),"important");else{var r=Si(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},ki=["Webkit","Moz","ms"],Si=$((function(t){if($i=$i||document.createElement("div").style,"filter"!==(t=x(t))&&t in $i)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<ki.length;n++){var r=ki[n]+e;if(r in $i)return r}}));function Oi(t,e){var o=e.data,i=t.data;if(!(n(o.staticStyle)&&n(o.style)&&n(i.staticStyle)&&n(i.style))){var a,s,c=e.elm,u=i.staticStyle,l=i.normalizedStyle||i.style||{},f=u||l,d=bi(e.data.style)||{};e.data.normalizedStyle=r(d.__ob__)?A({},d):d;var p=function(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=_i(o.data))&&A(r,n);(n=_i(t.data))&&A(r,n);for(var i=t;i=i.parent;)i.data&&(n=_i(i.data))&&A(r,n);return r}(e,!0);for(s in f)n(p[s])&&Ci(c,s,"");for(s in p)a=p[s],Ci(c,s,null==a?"":a)}}var Ti={create:Oi,update:Oi},Ai=/\s+/;function ji(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>
vendor: 5,986 bytes, line 71
71-1?e.split(Ai).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ei(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ai).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Ni(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,Pi(t.name||"v")),A(e,t),e}return"string"==typeof t?Pi(t):void 0}}var Pi=$((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),Di=q&&!G,Mi="transition",Ii="animation",Li="transition",Ri="transitionend",Fi="animation",Hi="animationend";Di&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Li="WebkitTransition",Ri="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Fi="WebkitAnimation",Hi="webkitAnimationEnd"));var Bi=q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ui(t){Bi((function(){Bi(t)}))}function zi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ji(t,e))}function Vi(t,e){t._transitionClasses&&y(t._transitionClasses,e),Ei(t,e)}function Ki(t,e,n){var r=qi(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Mi?Ri:Hi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c<a&&u()}),i+1),t.addEventListener(s,l)}var Ji=/\b(transform|all)(,|$)/;function qi(t,e){var n,r=window.getComputedStyle(t),o=(r[Li+"Delay"]||"").split(", "),i=(r[Li+"Duration"]||"").split(", "),a=Wi(o,i),s=(r[Fi+"Delay"]||"").split(", "),c=(r[Fi+"Duration"]||"").split(", "),u=Wi(s,c),l=0,f=0;return e===Mi?a>0&&(n=Mi,l=a,f=i.length):e===Ii?u>0&&(n=Ii,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Mi:Ii:null)?n===Mi?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Mi&&Ji.test(r[Li+"Property"])}}function Wi(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return Zi(e)+Zi(t[n])})))}function Zi(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Gi(t,e){var o=t.elm;r(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var i=Ni(t.data.transition);if(!n(i)&&!r(o._enterCb)&&1===o.nodeType){for(var c=i.css,u=i.type,l=i.enterClass,f=i.enterToClass,d=i.enterActiveClass,p=i.appearClass,h=i.appearToClass,m=i.appearActiveClass,g=i.beforeEnter,y=i.enter,_=i.afterEnter,b=i.enterCancelled,$=i.beforeAppear,w=i.appear,x=i.afterAppear,C=i.appearCancelled,k=i.duration,S=Ke,O=Ke.$vnode;O&&O.parent;)S=O.context,O=O.parent;var T=!S._isMounted||!t.isRootInsert;if(!T||w||""===w){var A=T&&p?p:l,j=T&&m?m:d,E=T&&h?h:f,N=T&&$||g,P=T&&a(w)?w:y,D=T&&x||_,M=T&&C||b,L=v(s(k)?k.enter:k),R=!1!==c&&!G,F=Qi(P),H=o._enterCb=I((function(){R&&(Vi(o,E),Vi(o,j)),H.cancelled?(R&&Vi(o,A),M&&M(o)):D&&D(o),o._enterCb=null}));t.data.show||Qt(t,"insert",(function(){var e=o.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),P&&P(o,H)})),N&&N(o),R&&(zi(o,A),zi(o,j),Ui((function(){Vi(o,A),H.cancelled||(zi(o,E),F||(Yi(L)?setTimeout(H,L):Ki(o,u,H)))}))),t.data.show&&(e&&e(),P&&P(o,H)),R||F||H()}}}function Xi(t,e){var o=t.elm;r(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var i=Ni(t.data.transition);if(n(i)||1!==o.nodeType)return e();if(!r(o._leaveCb)){var a=i.css,c=i.type,u=i.leaveClass,l=i.leaveToClass,f=i.leaveActiveClass,d=i.beforeLeave,p=i.leave,h=i.afterLeave,m=i.leaveCancelled,g=i.delayLeave,y=i.duration,_=!1!==a&&!G,b=Qi(p),$=v(s(y)?y.leave:y),w=o._leaveCb=I((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),_&&(Vi(o,l),Vi(o,f)),w.cancelled?(_&&Vi(o,u),m&&m(o)):(e(),h&&h(o)),o._leaveCb=null}));g?g(x):x()}function x(){w.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),_&&(zi(o,u),zi(o,f),Ui((function(){Vi(o,u),w.cancelled||(zi(o,l),b||(Yi($)?setTimeout(w,$):Ki(o,c,w)))}))),p&&p(o,w),_||b||w())}}function Yi(t){return"number"==typeof t&&!isNaN(t)}function Qi(t){if(n(t))return!1;var e=t.fns;return r(e)?Qi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function ta(t,e){!0!==e.data.show&&Gi(e)}var ea=function(t){var a,s,c={},u=t.modules,l=t.nodeOps;for(a=0;a<ho.length;++a)for(c[ho[a]]=[],s=0;s<u.length;++s)r(u[s][ho[a]])&&c[ho[a]].push(u[s][ho[a]]);function f(t){var e=l.parentNode(t);r(e)&&l.removeChild(e,t)}function d(t,e,n,i,a,s,u){if(r(t.elm)&&r(s)&&(t=s[u]=vt(t)),t.isRootInsert=!a,!function(t,e,n,i){var a=t.data;if(r(a)){var s=r(t.componentInstance)&&a.keepAlive;if(r(a=a.hook)&&r(a=a.init)&&a(t,!1),r(t.componentInstance))return p(t,e),v(n,t.elm,i),o(s)&&function(t,e,n,o){var i,a=t;for(;a.componentInstance;)if(r(i=(a=a.componentInstance._vnode).data)&&r(i=i.transition)){for(i=0;i<c.activate.length;++i)c.activate[i](vo,a);e.push(a);break}v(n,t.elm,o)}(t,e,n,i),!0}}(t,e,n,i)){var f=t.data,d=t.children,h=t.tag;r(h)?(t.elm=t.ns?l.createElementNS(t.ns,h):l.createElement(h,t),_(t),m(t,d,e),r(f)&&y(t,e),v(n,t.elm,i)):o(t.isComment)?(t.elm=l.createComment(t.text),v(n,t.elm,i)):(t.elm=l.createTextNode(t.text),v(n,t.elm,i))}}function p(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,g(t)?(y(t,e),_(t)):(fo(t),e.push(t))}function v(t,e,n){r(t)&&(r(n)?l.parentNode(n)===t&&l.insertBefore(t,e,n):l.appendChild(t,e))}function m(t,n,r){if(e(n))for(var o=0;o<n.length;++o)d(n[o],r,t.elm,null,!0,n,o);
vendor: 1,371 bytes, line 71
71else i(t.text)&&l.appendChild(t.elm,l.createTextNode(String(t.text)))}function g(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function y(t,e){for(var n=0;n<c.create.length;++n)c.create[n](vo,t);r(a=t.data.hook)&&(r(a.create)&&a.create(vo,t),r(a.insert)&&e.push(t))}function _(t){var e;if(r(e=t.fnScopeId))l.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e),n=n.parent;r(e=Ke)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e)}function b(t,e,n,r,o,i){for(;r<=o;++r)d(n[r],i,t,e,!1,n,r)}function $(t){var e,n,o=t.data;if(r(o))for(r(e=o.hook)&&r(e=e.destroy)&&e(t),e=0;e<c.destroy.length;++e)c.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)$(t.children[n])}function w(t,e,n){for(;e<=n;++e){var o=t[e];r(o)&&(r(o.tag)?(x(o),$(o)):f(o.elm))}}function x(t,e){if(r(e)||r(t.data)){var n,o=c.remove.length+1;for(r(e)?e.listeners+=o:e=function(t,e){function n(){0==--n.listeners&&f(t)}return n.listeners=e,n}(t.elm,o),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&x(n,e),n=0;n<c.remove.length;++n)c.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else f(t.elm)}function C(t,e,n,o){for(var i=n;i<o;i++){var a=e[i];if(r(a)&&mo(t,a))return i}}function k(t,e,i,a,s,u){if(t!==e){r(e.elm)&&r(a)&&(e=a[s]=vt(e));var f=e.elm=t.elm;
vendor: 10,050 bytes, line 71
71if(o(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?T(t.elm,e,i):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var p,v=e.data;r(v)&&r(p=v.hook)&&r(p=p.prepatch)&&p(t,e);var h=t.children,m=e.children;if(r(v)&&g(e)){for(p=0;p<c.update.length;++p)c.update[p](t,e);r(p=v.hook)&&r(p=p.update)&&p(t,e)}n(e.text)?r(h)&&r(m)?h!==m&&function(t,e,o,i,a){for(var s,c,u,f=0,p=0,v=e.length-1,h=e[0],m=e[v],g=o.length-1,y=o[0],_=o[g],$=!a;f<=v&&p<=g;)n(h)?h=e[++f]:n(m)?m=e[--v]:mo(h,y)?(k(h,y,i,o,p),h=e[++f],y=o[++p]):mo(m,_)?(k(m,_,i,o,g),m=e[--v],_=o[--g]):mo(h,_)?(k(h,_,i,o,g),$&&l.insertBefore(t,h.elm,l.nextSibling(m.elm)),h=e[++f],_=o[--g]):mo(m,y)?(k(m,y,i,o,p),$&&l.insertBefore(t,m.elm,h.elm),m=e[--v],y=o[++p]):(n(s)&&(s=go(e,f,v)),n(c=r(y.key)?s[y.key]:C(y,e,f,v))?d(y,i,t,h.elm,!1,o,p):mo(u=e[c],y)?(k(u,y,i,o,p),e[c]=void 0,$&&l.insertBefore(t,u.elm,h.elm)):d(y,i,t,h.elm,!1,o,p),y=o[++p]);f>v?b(t,n(o[g+1])?null:o[g+1].elm,o,p,g,i):p>g&&w(e,f,v)}(f,h,m,i,u):r(m)?(r(t.text)&&l.setTextContent(f,""),b(f,null,m,0,m.length-1,i)):r(h)?w(h,0,h.length-1):r(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),r(v)&&r(p=v.hook)&&r(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var O=h("attrs,class,staticClass,staticStyle,key");function T(t,e,n,i){var a,s=e.tag,c=e.data,u=e.children;if(i=i||c&&c.pre,e.elm=t,o(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(c)&&(r(a=c.hook)&&r(a=a.init)&&a(e,!0),r(a=e.componentInstance)))return p(e,n),!0;if(r(s)){if(r(u))if(t.hasChildNodes())if(r(a=c)&&r(a=a.domProps)&&r(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var l=!0,f=t.firstChild,d=0;d<u.length;d++){if(!f||!T(f,u[d],n,i)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else m(e,u,n);if(r(c)){var v=!1;for(var h in c)if(!O(h)){v=!0,y(e,n);break}!v&&c.class&&Wn(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,i,a){if(!n(e)){var s,u=!1,f=[];if(n(t))u=!0,d(e,f);else{var p=r(t.nodeType);if(!p&&mo(t,e))k(t,e,f,null,null,a);else{if(p){if(1===t.nodeType&&t.hasAttribute(R)&&(t.removeAttribute(R),i=!0),o(i)&&T(t,e,f))return S(e,f,!0),t;s=t,t=new ft(l.tagName(s).toLowerCase(),{},[],void 0,s)}var v=t.elm,h=l.parentNode(v);if(d(e,f,v._leaveCb?null:h,l.nextSibling(v)),r(e.parent))for(var m=e.parent,y=g(e);m;){for(var _=0;_<c.destroy.length;++_)c.destroy[_](m);if(m.elm=e.elm,y){for(var b=0;b<c.create.length;++b)c.create[b](vo,m);var x=m.data.hook.insert;if(x.merged)for(var C=x.fns.slice(1),O=0;O<C.length;O++)C[O]()}else fo(m);m=m.parent}r(h)?w([t],0,0):r(t.tag)&&$(t)}}return S(e,f,u),e.elm}r(t)&&$(t)}}({nodeOps:uo,modules:[To,Io,vi,gi,Ti,q?{create:ta,activate:ta,remove:function(t,e){!0!==t.data.show?Xi(t,e):e()}}:{}].concat(Co)});G&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ua(t,"input")}));var na={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Qt(n,"postpatch",(function(){na.componentUpdated(t,e,n)})):ra(t,e,n.context),t._vOptions=[].map.call(t.options,aa)):("textarea"===n.tag||so(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",sa),t.addEventListener("compositionend",ca),t.addEventListener("change",ca),G&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){ra(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,aa);if(o.some((function(t,e){return!D(t,r[e])})))(t.multiple?e.value.some((function(t){return ia(t,o)})):e.value!==e.oldValue&&ia(e.value,o))&&ua(t,"change")}}};function ra(t,e,n){oa(t,e),(Z||X)&&setTimeout((function(){oa(t,e)}),0)}function oa(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],o)i=M(r,aa(a))>-1,a.selected!==i&&(a.selected=i);else if(D(aa(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ia(t,e){return e.every((function(e){return!D(e,t)}))}function aa(t){return"_value"in t?t._value:t.value}function sa(t){t.target.composing=!0}function ca(t){t.target.composing&&(t.target.composing=!1,ua(t.target,"input"))}function ua(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function la(t){return!t.componentInstance||t.data&&t.data.transition?t:la(t.componentInstance._vnode)}var fa={bind:function(t,e,n){var r=e.value,o=(n=la(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Gi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=la(n)).data&&n.data.transition?(n.data.show=!0,r?Gi(n,(function(){t.style.display=t.__vOriginalDisplay})):Xi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},da={model:na,show:fa},pa={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function va(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?va(Re(e.children)):t}function ha(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[x(r)]=o[r];return e}function ma(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ga=function(t){return t.tag||ke(t)},ya=function(t){return"show"===t.name},_a={name:"transition",props:pa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ga)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var a=va(o);if(!a)return o;if(this._leaving)return ma(t,o);var s="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ha(this),u=this._vnode,l=va(u);if(a.data.directives&&a.data.directives.some(ya)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!ke(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,Qt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ma(t,o);if("in-out"===r){if(ke(a))return u;var d,p=function(){d()};Qt(c,"afterEnter",p),Qt(c,"enterCancelled",p),Qt(f,"delayLeave",(function(t){d=t}))}}return o}}},ba=A({tag:String,moveClass:String},pa);delete ba.mode;var $a={props:ba,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ha(this),s=0;s<o.length;s++){(l=o[s]).tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(i.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(r){var c=[],u=[];for(s=0;s<r.length;s++){var l;(l=r[s]).data.transition=a,l.data.pos=l.elm.getBoundingClientRect(),n[l.key]?c.push(l):u.push(l)}this.kept=t(e,null,c),this.removed=u}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(wa),t.forEach(xa),t.forEach(Ca),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;zi(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ri,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ri,t),n._moveCb=null,Vi(n,e))})}})))},methods:{hasMove:function(t,e){if(!Di)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){Ei(n,t)})),ji(n,e),n.style.display="none",this.$el.appendChild(n);var r=qi(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function wa(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function xa(t){t.data.newPos=t.elm.getBoundingClientRect()}function Ca(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var ka={Transition:_a,TransitionGroup:$a};Er.config.mustUseProp=Ur,Er.config.isReservedTag=oo,Er.config.isReservedAttr=Hr,Er.config.getTagNamespace=io,Er.config.isUnknownElement=function(t){if(!q)return!0;if(oo(t))return!1;if(t=t.toLowerCase(),null!=ao[t])return ao[t];var e=document.createElement(t);return t.indexOf("-")>-1?ao[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ao[t]=/HTMLUnknownElement/.test(e.toString())},A(Er.options.directives,da),A(Er.options.components,ka),Er.prototype.__patch__=q?ea:E,Er.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=dt),Ge(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Xn(t,r,E,{before:function(){t._isMounted&&!t._isDestroyed&&Ge(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i<o.length;i++)o[i].run();return null==t.$vnode&&(t._isMounted=!0,Ge(t,"mounted")),t}(this,t=t&&q?co(t):void 0,e)},q&&setTimeout((function(){B.devtools&&it&&it.emit("init",Er)}),0);var Sa=/\{\{((?:.|\r?\n)+?)\}\}/g,Oa=/[-.*+?^${}()|[\]\/\\]/g,Ta=$((function(t){var e=t[0].replace(Oa,"\\$&"),n=t[1].replace(Oa,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var Aa={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Zo(t,"class");
vendor: 28,245 bytes, lines 71-86
71n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));var r=Wo(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:".concat(t.staticClass,",")),t.classBinding&&(e+="class:".concat(t.classBinding,",")),e}};var ja,Ea={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Zo(t,"style");n&&(t.staticStyle=JSON.stringify(yi(n)));var r=Wo(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:".concat(t.staticStyle,",")),t.styleBinding&&(e+="style:(".concat(t.styleBinding,"),")),e}},Na=function(t){return(ja=ja||document.createElement("div")).innerHTML=t,ja.textContent},Pa=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Da=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ma=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Ia=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,La=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ra="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(U.source,"]*"),Fa="((?:".concat(Ra,"\\:)?").concat(Ra,")"),Ha=new RegExp("^<".concat(Fa)),Ba=/^\s*(\/?)>/,Ua=new RegExp("^<\\/".concat(Fa,"[^>]*>")),za=/^<!DOCTYPE [^>]+>/i,Va=/^<!\--/,Ka=/^<!\[/,Ja=h("script,style,textarea",!0),qa={},Wa={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t","'":"'"},Za=/&(?:lt|gt|quot|amp|#39);/g,Ga=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Xa=h("pre,textarea",!0),Ya=function(t,e){return t&&Xa(t)&&"\n"===e[0]};function Qa(t,e){var n=e?Ga:Za;return t.replace(n,(function(t){return Wa[t]}))}function ts(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||N,s=e.canBeLeftOpenTag||N,c=0,u=function(){if(n=t,r&&Ja(r)){var u=0,d=r.toLowerCase(),p=qa[d]||(qa[d]=new RegExp("([\\s\\S]*?)(</"+d+"[^>]*>)","i"));w=t.replace(p,(function(t,n,r){return u=r.length,Ja(d)||"noscript"===d||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Ya(d,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-w.length,t=w,f(d,c-u,c)}else{var v=t.indexOf("<");if(0===v){if(Va.test(t)){var h=t.indexOf("--\x3e");if(h>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,h),c,c+h+3),l(h+3),"continue"}if(Ka.test(t)){var m=t.indexOf("]>");if(m>=0)return l(m+2),"continue"}var g=t.match(za);if(g)return l(g[0].length),"continue";var y=t.match(Ua);if(y){var _=c;return l(y[0].length),f(y[1],_,c),"continue"}var b=function(){var e=t.match(Ha);if(e){var n={tagName:e[1],attrs:[],start:c};l(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Ba))&&(o=t.match(La)||t.match(Ia));)o.start=c,l(o[0].length),o.end=c,n.attrs.push(o);if(r)return n.unarySlash=r[1],l(r[0].length),n.end=c,n}}();if(b)return function(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&Ma(n)&&f(r),s(n)&&r===n&&f(n));for(var u=a(n)||!!c,l=t.attrs.length,d=new Array(l),p=0;p<l;p++){var v=t.attrs[p],h=v[3]||v[4]||v[5]||"",m="a"===n&&"href"===v[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;d[p]={name:v[1],value:Qa(h,m)}}u||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:t.start,end:t.end}),r=n);e.start&&e.start(n,d,u,t.start,t.end)}(b),Ya(b.tagName,t)&&l(1),"continue"}var $=void 0,w=void 0,x=void 0;if(v>=0){for(w=t.slice(v);!(Ua.test(w)||Ha.test(w)||Va.test(w)||Ka.test(w)||(x=w.indexOf("<",1))<0);)v+=x,w=t.slice(v);$=t.substring(0,v)}v<0&&($=t),$&&l($.length),e.chars&&$&&e.chars($,c-$.length,c)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===u())break}function l(e){c+=e,t=t.substring(e)}function f(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}f()}var es,ns,rs,os,is,as,ss,cs,us=/^@|^v-on:/,ls=/^v-|^@|^:|^#/,fs=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ds=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ps=/^\(|\)$/g,vs=/^\[.*\]$/,hs=/:(.*)$/,ms=/^:|^\.|^v-bind:/,gs=/\.[^.\]]+(?=[^\]]*$)/g,ys=/^v-slot(:|$)|^#/,_s=/[\r\n]/,bs=/[ \f\t\r\n]+/g,$s=$(Na),ws="_empty_";function xs(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:js(e),rawAttrsMap:{},parent:n,children:[]}}function Cs(t,e){es=e.warn||Ho,as=e.isPreTag||N,ss=e.mustUseProp||N,cs=e.getTagNamespace||N,e.isReservedTag,rs=Bo(e.modules,"transformNode"),os=Bo(e.modules,"preTransformNode"),is=Bo(e.modules,"postTransformNode"),ns=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=ks(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&Os(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),u&&u.if&&Os(u,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,u;t.children=t.children.filter((function(t){return!t.slotScope})),l(t),t.pre&&(s=!1),as(t.tag)&&(c=!1);for(var f=0;f<is.length;f++)is[f](t,e)}function l(t){if(!c)for(var e=void 0;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return ts(t,{warn:es,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,l,f){var d=r&&r.ns||cs(t);Z&&"svg"===d&&(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Es.test(r.name)||(r.name=r.name.replace(Ns,""),e.push(r))}return e}(i));var p,v=xs(t,i,r);d&&(v.ns=d),"style"!==(p=v).tag&&("script"!==p.tag||p.attrsMap.type&&"text/javascript"!==p.attrsMap.type)||ot()||(v.forbidden=!0);for(var h=0;h<os.length;h++)v=os[h](v,e)||v;s||(!function(t){null!=Zo(t,"v-pre")&&(t.pre=!0)}(v),v.pre&&(s=!0)),as(v.tag)&&(c=!0),s?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),o=0;o<n;o++)r[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(r[o].start=e[o].start,r[o].end=e[o].end);else t.pre||(t.plain=!0)}(v):v.processed||(Ss(v),function(t){var e=Zo(t,"v-if");if(e)t.if=e,Os(t,{exp:e,block:t});else{null!=Zo(t,"v-else")&&(t.else=!0);var n=Zo(t,"v-else-if");n&&(t.elseif=n)}}(v),function(t){var e=Zo(t,"v-once");null!=e&&(t.once=!0)}(v)),n||(n=v),a?u(v):(r=v,o.push(v))},end:function(t,e,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],u(i)},chars:function(t,e,n){if(r&&(!Z||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var o,u=r.children;if(t=c||t.trim()?"script"===(o=r).tag||"style"===o.tag?t:$s(t):u.length?a?"condense"===a&&_s.test(t)?"":" ":i?" ":"":""){c||"condense"!==a||(t=t.replace(bs," "));var l=void 0,f=void 0;!s&&" "!==t&&(l=function(t,e){var n=e?Ta(e):Sa;if(n.test(t)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(o=r.index)>c&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=Ro(r[1].trim());a.push("_s(".concat(u,")")),s.push({"@binding":u}),c=o+r[0].length}return c<t.length&&(s.push(i=t.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}(t,ns))?f={type:2,expression:l.expression,tokens:l.tokens,text:t}:" "===t&&u.length&&" "===u[u.length-1].text||(f={type:3,text:t}),f&&u.push(f)}}},comment:function(t,e,n){if(r){var o={type:3,text:t,isComment:!0};r.children.push(o)}}}),n}function ks(t,e){var n,r;(r=Wo(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Wo(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Zo(t,"scope"),t.slotScope=e||Zo(t,"slot-scope")):(e=Zo(t,"slot-scope"))&&(t.slotScope=e);var n=Wo(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||zo(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){if(a=Go(t,ys)){var r=Ts(a),o=r.name,i=r.dynamic;t.slotTarget=o,t.slotTargetDynamic=i,t.slotScope=a.value||ws}}else{var a;if(a=Go(t,ys)){var s=t.scopedSlots||(t.scopedSlots={}),c=Ts(a),u=c.name,l=(i=c.dynamic,s[u]=xs("template",[],t));l.slotTarget=u,l.slotTargetDynamic=i,l.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=l,!0})),l.slotScope=a.value||ws,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Wo(t,"name"))}(t),function(t){var e;(e=Wo(t,"is"))&&(t.component=e);null!=Zo(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<rs.length;o++)t=rs[o](t,e)||t;return function(t){var e,n,r,o,i,a,s,c,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=o=u[e].name,i=u[e].value,ls.test(r))if(t.hasBindings=!0,(a=As(r.replace(ls,"")))&&(r=r.replace(gs,"")),ms.test(r))r=r.replace(ms,""),i=Ro(i),(c=vs.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=x(r))&&(r="innerHTML"),a.camel&&!c&&(r=x(r)),a.sync&&(s=Qo(i,"$event"),c?qo(t,'"update:"+('.concat(r,")"),s,null,!1,0,u[e],!0):(qo(t,"update:".concat(x(r)),s,null,!1,0,u[e]),S(r)!==x(r)&&qo(t,"update:".concat(S(r)),s,null,!1,0,u[e])))),a&&a.prop||!t.component&&ss(t.tag,t.attrsMap.type,r)?Uo(t,r,i,u[e],c):zo(t,r,i,u[e],c);else if(us.test(r))r=r.replace(us,""),(c=vs.test(r))&&(r=r.slice(1,-1)),qo(t,r,i,a,!1,0,u[e],c);else{var l=(r=r.replace(ls,"")).match(hs),f=l&&l[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),vs.test(f)&&(f=f.slice(1,-1),c=!0)),Ko(t,r,o,i,f,c,a,u[e])}else zo(t,r,JSON.stringify(i),u[e]),!t.component&&"muted"===r&&ss(t.tag,t.attrsMap.type,r)&&Uo(t,r,"true",u[e])}(t),t}function Ss(t){var e;if(e=Zo(t,"v-for")){var n=function(t){var e=t.match(fs);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(ps,""),o=r.match(ds);o?(n.alias=r.replace(ds,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(e);n&&A(t,n)}}function Os(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function Ts(t){var e=t.name.replace(ys,"");return e||"#"!==t.name[0]&&(e="default"),vs.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'.concat(e,'"'),dynamic:!1}}function As(t){var e=t.match(gs);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function js(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var Es=/^xmlns:NS\d+/,Ns=/^NS\d+:/;function Ps(t){return xs(t.tag,t.attrsList.slice(),t.parent)}var Ds=[Aa,Ea,{preTransformNode:function(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r=void 0;if((n[":type"]||n["v-bind:type"])&&(r=Wo(t,"type")),n.type||r||!n["v-bind"]||(r="(".concat(n["v-bind"],").type")),r){var o=Zo(t,"v-if",!0),i=o?"&&(".concat(o,")"):"",a=null!=Zo(t,"v-else",!0),s=Zo(t,"v-else-if",!0),c=Ps(t);Ss(c),Vo(c,"type","checkbox"),ks(c,e),c.processed=!0,c.if="(".concat(r,")==='checkbox'")+i,Os(c,{exp:c.if,block:c});var u=Ps(t);Zo(u,"v-for",!0),Vo(u,"type","radio"),ks(u,e),Os(c,{exp:"(".concat(r,")==='radio'")+i,block:u});var l=Ps(t);return Zo(l,"v-for",!0),Vo(l,":type",r),ks(l,e),Os(c,{exp:o,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Ms,Is,Ls={model:function(t,e,n){var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return Yo(t,r,o),!1;if("select"===i)!function(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(r?"_n(val)":"val","})"),i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = ".concat(o,";");a="".concat(a," ").concat(Qo(e,i)),qo(t,"change",a,null,!0)}(t,r,o);else if("input"===i&&"checkbox"===a)!function(t,e,n){var r=n&&n.number,o=Wo(t,"value")||"null",i=Wo(t,"true-value")||"true",a=Wo(t,"false-value")||"false";Uo(t,"checked","Array.isArray(".concat(e,")")+"?_i(".concat(e,",").concat(o,")>-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),qo(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(a,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Qo(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Qo(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Qo(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Wo(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Uo(t,"checked","_q(".concat(e,",").concat(o,")")),qo(t,"change",Qo(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?ai:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n(".concat(l,")"));var f=Qo(e,l);c&&(f="if($event.target.composing)return;".concat(f));Uo(t,"value","(".concat(e,")")),qo(t,u,f,null,!0),(s||a)&&qo(t,"blur","$forceUpdate()")}(t,r,o);else if(!B.isReservedTag(i))return Yo(t,r,o),!1;return!0},text:function(t,e){e.value&&Uo(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Uo(t,"innerHTML","_s(".concat(e.value,")"),e)}},Rs={expectHTML:!0,modules:Ds,directives:Ls,isPreTag:function(t){return"pre"===t},isUnaryTag:Pa,mustUseProp:Ur,canBeLeftOpenTag:Da,isReservedTag:oo,getTagNamespace:io,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(Ds)},Fs=$((function(t){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Hs(t,e){t&&(Ms=Fs(e.staticKeys||""),Is=e.isReservedTag||N,Bs(t),Us(t,!1))}function Bs(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!Is(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Ms)))}(t),1===t.type){if(!Is(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Bs(r),r.static||(t.static=!1)}if(t.ifConditions)for(e=1,n=t.ifConditions.length;e<n;e++){var o=t.ifConditions[e].block;Bs(o),o.static||(t.static=!1)}}}function Us(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Us(t.children[n],e||!!t.for);if(t.ifConditions)for(n=1,r=t.ifConditions.length;n<r;n++)Us(t.ifConditions[n].block,e)}}var zs=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Vs=/\([^)]*?\);*$/,Ks=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Js={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},qs={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ws=function(t){return"if(".concat(t,")return null;")},Zs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ws("$event.target !== $event.currentTarget"),ctrl:Ws("!$event.ctrlKey"),shift:Ws("!$event.shiftKey"),alt:Ws("!$event.altKey"),meta:Ws("!$event.metaKey"),left:Ws("'button' in $event && $event.button !== 0"),middle:Ws("'button' in $event && $event.button !== 1"),right:Ws("'button' in $event && $event.button !== 2")};function Gs(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=Xs(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(a,","):r+='"'.concat(i,'":').concat(a,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function Xs(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return Xs(t)})).join(","),"]");var e=Ks.test(t.value),n=zs.test(t.value),r=Ks.test(t.value.replace(Vs,""));if(t.modifiers){var o="",i="",a=[],s=function(e){if(Zs[e])i+=Zs[e],Js[e]&&a.push(e);else if("exact"===e){var n=t.modifiers;i+=Ws(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else a.push(e)};for(var c in t.modifiers)s(c);a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(Ys).join("&&"),")return null;")}(a)),i&&(o+=i);var u=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(u,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function Ys(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Js[t],r=qs[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var Qs={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:E},tc=function(t){this.options=t,this.warn=t.warn||Ho,this.transforms=Bo(t.modules,"transformCode"),this.dataGenFns=Bo(t.modules,"genData"),this.directives=A(A({},Qs),t.directives);var e=t.isReservedTag||N;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function ec(t,e){var n=new tc(e),r=t?"script"===t.tag?"null":nc(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function nc(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return rc(t,e);if(t.once&&!t.onceProcessed)return oc(t,e);if(t.for&&!t.forProcessed)return sc(t,e);if(t.if&&!t.ifProcessed)return ic(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=fc(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?vc((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:x(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=",".concat(i));a&&(o+="".concat(i?"":",null",",").concat(a));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:fc(e,n,!0);return"_c(".concat(t,",").concat(cc(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,o=e.maybeComponent(t);(!t.plain||t.pre&&o)&&(r=cc(t,e));var i=void 0,a=e.options.bindings;o&&a&&!1!==a.__isScriptSetup&&(i=function(t,e){var n=x(e),r=C(n),o=function(o){return t[e]===o?e:t[n]===o?n:t[r]===o?r:void 0},i=o("setup-const")||o("setup-reactive-const");if(i)return i;var a=o("setup-let")||o("setup-ref")||o("setup-maybe-ref");if(a)return a}(a,t.tag)),i||(i="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:fc(t,e,!0);n="_c(".concat(i).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var c=0;c<e.transforms.length;c++)n=e.transforms[c](t,n);return n}return fc(t,e)||"void 0"}function rc(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return ".concat(nc(t,e),"}")),e.pre=n,"_m(".concat(e.staticRenderFns.length-1).concat(t.staticInFor?",true":"",")")}function oc(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return ic(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o(".concat(nc(t,e),",").concat(e.onceId++,",").concat(n,")"):nc(t,e)}return rc(t,e)}function ic(t,e,n,r){return t.ifProcessed=!0,ac(t.ifConditions.slice(),e,n,r)}function ac(t,e,n,r){if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"(".concat(o.exp,")?").concat(i(o.block),":").concat(ac(t,e,n,r)):"".concat(i(o.block));function i(t){return n?n(t,e):t.once?oc(t,e):nc(t,e)}}function sc(t,e,n,r){var o=t.for,i=t.alias,a=t.iterator1?",".concat(t.iterator1):"",s=t.iterator2?",".concat(t.iterator2):"";return t.forProcessed=!0,"".concat(r||"_l","((").concat(o,"),")+"function(".concat(i).concat(a).concat(s,"){")+"return ".concat((n||nc)(t,e))+"})"}function cc(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=e.directives[i.name];u&&(a=!!u(t,i,e.warn)),a&&(c=!0,s+='{name:"'.concat(i.name,'",rawName:"').concat(i.rawName,'"').concat(i.value?",value:(".concat(i.value,"),expression:").concat(JSON.stringify(i.value)):"").concat(i.arg?",arg:".concat(i.isDynamicArg?i.arg:'"'.concat(i.arg,'"')):"").concat(i.modifiers?",modifiers:".concat(JSON.stringify(i.modifiers)):"","},"))}if(c)return s.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:".concat(t.key,",")),t.ref&&(n+="ref:".concat(t.ref,",")),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'.concat(t.tag,'",'));for(var o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+="attrs:".concat(vc(t.attrs),",")),t.props&&(n+="domProps:".concat(vc(t.props),",")),t.events&&(n+="".concat(Gs(t.events,!1),",")),t.nativeEvents&&(n+="".concat(Gs(t.nativeEvents,!0),",")),t.slotTarget&&!t.slotScope&&(n+="slot:".concat(t.slotTarget,",")),t.scopedSlots&&(n+="".concat(function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||uc(n)})),o=!!t.if;if(!r)for(var i=t.parent;i;){if(i.slotScope&&i.slotScope!==ws||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}var a=Object.keys(e).map((function(t){return lc(e[t],n)})).join(",");return"scopedSlots:_u([".concat(a,"]").concat(r?",null,true":"").concat(!r&&o?",null,false,".concat(function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(a)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=ec(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(vc(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function uc(t){return 1===t.type&&("slot"===t.tag||t.children.some(uc))}function lc(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return ic(t,e,lc,"null");if(t.for&&!t.forProcessed)return sc(t,e,lc);var r=t.slotScope===ws?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(fc(t,e)||"undefined",":undefined"):fc(t,e)||"undefined":nc(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function fc(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return"".concat((r||nc)(a,e)).concat(s)}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var o=t[r];if(1===o.type){if(dc(o)||o.ifConditions&&o.ifConditions.some((function(t){return dc(t.block)}))){n=2;break}(e(o)||o.ifConditions&&o.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(i,e.maybeComponent):0,u=o||pc;return"[".concat(i.map((function(t){return u(t,e)})).join(","),"]").concat(c?",".concat(c):"")}}function dc(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function pc(t,e){return 1===t.type?nc(t,e):3===t.type&&t.isComment?function(t){return"_e(".concat(JSON.stringify(t.text),")")}(t):function(t){return"_v(".concat(2===t.type?t.expression:hc(JSON.stringify(t.text)),")")}(t)}function vc(t){for(var e="",n="",r=0;r<t.length;r++){var o=t[r],i=hc(o.value);o.dynamic?n+="".concat(o.name,",").concat(i,","):e+='"'.concat(o.name,'":').concat(i,",")}return e="{".concat(e.slice(0,-1),"}"),n?"_d(".concat(e,",[").concat(n.slice(0,-1),"])"):e}function hc(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function mc(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),E}}function gc(t){var e=Object.create(null);return function(n,r,o){(r=A({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(e[i])return e[i];var a=t(n,r),s={},c=[];return s.render=mc(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(t){return mc(t,c)})),e[i]=s}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var yc,_c,bc=(yc=function(t,e){var n=Cs(t.trim(),e);!1!==e.optimize&&Hs(n,e);var r=ec(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),o=[],i=[];if(n)for(var a in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=A(Object.create(t.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(t,e,n){(n?i:o).push(t)};var s=yc(e.trim(),r);return s.errors=o,s.tips=i,s}return{compile:e,compileToFunctions:gc(e)}}),$c=bc(Rs).compileToFunctions;function wc(t){return(_c=_c||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',_c.innerHTML.indexOf(" ")>0}var xc=!!q&&wc(!1),Cc=!!q&&wc(!0),kc=$((function(t){var e=co(t);return e&&e.innerHTML})),Sc=Er.prototype.$mount;return Er.prototype.$mount=function(t,e){if((t=t&&co(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=kc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=$c(r,{outputSourceRange:!1,shouldDecodeNewlines:xc,shouldDecodeNewlinesForHref:Cc,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Sc.call(this,t,e)},Er.compile=$c,A(Er,Jn),Er.effect=function(t,e){var n=new Xn(ut,t,E,{sync:!0});e&&(n.update=function(){e((function(){return n.run()}))})},Er})); 72/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(33).setImmediate)) 73 74/***/ }), 75/* 4 */ 76/***/ (function(module, exports, __webpack_require__) { 77 78"use strict"; 79/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 80 81var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 82 83!function (e, t) { 84 "object" == ( false ? "undefined" : _typeof(exports)) && "object" == ( false ? "undefined" : _typeof(module)) ? module.exports = t(__webpack_require__(8)) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(8)], __WEBPACK_AMD_DEFINE_FACTORY__ = (t), 85 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 86 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
87 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? exports.VueNumeric = t(require("accounting-js")) : e.VueNumeric = t(e.accounting); 88}("undefined" != typeof self ? self : undefined, function (e) { 89 return function (e) { 90 function t(n) { 91 if (r[n]) return r[n].exports;var i = r[n] = { i: n, l: !1, exports: {} };return e[n].call(i.exports, i, i.exports, t), i.l = !0, i.exports; 92 }var r = {};return t.m = e, t.c = r, t.d = function (e, r, n) { 93 t.o(e, r) || Object.defineProperty(e, r, { configurable: !1, enumerable: !0, get: n }); 94 }, t.n = function (e) { 95 var r = e && e.__esModule ? function () { 96 return e.default; 97 } : function () { 98 return e; 99 };return t.d(r, "a", r), r; 100 }, t.o = function (e, t) { 101 return Object.prototype.hasOwnProperty.call(e, t); 102 }, t.p = "", t(t.s = 1); 103 }([function (e, t, r) { 104 "use strict"; 105 var n = r(4), 106 i = r.n(n);t.a = { name: "VueNumeric", props: { currency: { type: String, default: "", required: !1 }, max: { type: Number, default: Number.MAX_SAFE_INTEGER || 9007199254740991, required: !1 }, min: { type: Number, default: Number.MIN_SAFE_INTEGER || -9007199254740991, required: !1 }, minus: { type: Boolean, default: !1, required: !1 }, placeholder: { type: String, default: "", required: !1 }, emptyValue: { type: [Number, String], default: "", required: !1 }, precision: { type: Number, default: 0, required: !1 }, separator: { type: String, default: ",", required: !1 }, thousandSeparator: { default: void 0, required: !1, type: String }, decimalSeparator: { default: void 0, required: !1, type: String }, outputType: { required: !1, type: String, default: "Number" }, value: { type: [Number, String], default: 0, required: !0 }, readOnly: { type: Boolean, default: !1, required: !1 }, readOnlyClass: { type: String, default: "", required: !1 }, currencySymbolPosition: { type: String, default: "prefix", required: !1 } }, data: function data() { 107 return { amount: "" }; 108 }, computed: { amountNumber: function amountNumber() { 109 return this.unformat(this.amount); 110 }, valueNumber: function valueNumber() { 111 return this.unformat(this.value); 112 }, decimalSeparatorSymbol: function decimalSeparatorSymbol() { 113 return void 0 !== this.decimalSeparator ? this.decimalSeparator : "," === this.separator ? "." : ","; 114 }, thousandSeparatorSymbol: function thousandSeparatorSymbol() { 115 return void 0 !== this.thousandSeparator ? this.thousandSeparator : "." === this.separator ? "." : "space" === this.separator ? " " : ","; 116 }, symbolPosition: function symbolPosition() { 117 return this.currency ? "suffix" === this.currencySymbolPosition ? "%v%s" : "%s%v" : "%v"; 118 } }, watch: { valueNumber: function valueNumber(e) { 119 this.$refs.numeric !== document.activeElement && (this.amount = this.format(e)); 120 }, readOnly: function readOnly(e, t) { 121 var r = this;!1 === t && !0 === e && this.$nextTick(function () { 122 r.$refs.readOnly.className = r.readOnlyClass; 123 }); 124 }, separator: function separator() { 125 this.process(this.valueNumber), this.amount = this.format(this.valueNumber); 126 }, currency: function currency() { 127 this.process(this.valueNumber), this.amount = this.format(this.valueNumber); 128 }, precision: function precision() { 129 this.process(this.valueNumber), this.amount = this.format(this.valueNumber); 130 } }, mounted: function mounted() { 131 var e = this;this.placeholder || (this.process(this.valueNumber), this.amount = this.format(this.valueNumber), setTimeout(function () { 132 e.process(e.valueNumber), e.amount = e.format(e.valueNumber); 133 }, 500)), this.readOnly && (this.$refs.readOnly.className = this.readOnlyClass); 134 }, methods: { onBlurHandler: function onBlurHandler(e) { 135 this.$emit("blur", e), this.amount = this.format(this.valueNumber); 136 }, onFocusHandler: function onFocusHandler(e) { 137 this.$emit("focus", e), 0 === this.valueNumber ? this.amount = null : this.amount = i.a.formatMoney(this.valueNumber, { symbol: "", format: "%v", thousand: "", decimal
137: this.decimalSeparatorSymbol, precision: Number(this.precision) }); 138 }, onInputHandler: function onInputHandler() { 139 this.process(this.amountNumber); 140 }, process: function process(e) { 141 e >= this.max && this.update(this.max), e <= this.min && this.update(this.min), e > this.min && e < this.max && this.update(e), !this.minus && e < 0 && (this.min >= 0 ? this.update(this.min) : this.update(0)); 142 }, update: function update(e) { 143 var t = i.a.toFixed(e, this.precision), 144 r = "string" === this.outputType.toLowerCase() ? t : Number(t);this.$emit("input", r); 145 }, format: function format(e) { 146 return i.a.formatMoney(e, { symbol: this.currency, format: this.symbolPosition, precision: Number(this.precision), decimal: this.decimalSeparatorSymbol, thousand: this.thousandSeparatorSymbol }); 147 }, unformat: function unformat(e) { 148 var t = "string" == typeof e && "" === e ? this.emptyValue : e;return i.a.unformat(t, this.decimalSeparatorSymbol); 149 } } }; 150 }, function (e, t, r) { 151 "use strict"; 152 Object.defineProperty(t, "__esModule", { value: !0 });var n = r(2), 153 i = { install: function install(e) { 154 e.component(n.a.name, n.a); 155 } };n.a.install = i.install, t.default = n.a; 156 }, function (e, t, r) { 157 "use strict"; 158 var n = r(0), 159 i = r(5), 160 u = r(3), 161 o = u(n.a, i.a, !1, null, null, null);t.a = o.exports; 162 }, function (e, t) { 163 e.exports = function (e, t, r, n, i, u) { 164 var o, 165 a = e = e || {}, 166 s = _typeof(e.default);"object" !== s && "function" !== s || (o = e, a = e.default);var c = "function" == typeof a ? a.options : a;t && (c.render = t.render, c.staticRenderFns = t.staticRenderFns, c._compiled = !0), r && (c.functional = !0), i && (c._scopeId = i);var l;if (u ? (l = function l(e) { 167 e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, e || "undefined" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__), n && n.call(this, e), e && e._registeredComponents && e._registeredComponents.add(u); 168 }, c._ssrRegister = l) : n && (l = n), l) { 169 var m = c.functional, 170 d = m ? c.render : c.beforeCreate;m ? (c._injectStyles = l, c.render = function (e, t) { 171 return l.call(t), d(e, t); 172 }) : c.beforeCreate = d ? [].concat(d, l) : [l]; 173 }return { esModule: o, exports: a, options: c }; 174 }; 175 }, function (t, r) { 176 t.exports = e; 177 }, function (e, t, r) { 178 "use strict"; 179 var n = function n() { 180 var e = this, 181 t = e.$createElement, 182 r = e._self._c || t;return e.readOnly ? r("span", { ref: "readOnly" }, [e._v(e._s(e.amount))]) : r("input", { directives: [{ name: "model", rawName: "v-model", value: e.amount, expression: "amount" }], ref: "numeric", attrs: { placeholder: e.placeholder, type: "text" }, domProps: { value: e.amount }, on: { blur: e.onBlurHandler, input: [function (t) { 183 t.target.composing || (e.amount = t.target.value); 184 }, e.onInputHandler], focus: e.onFocusHandler } }); 185 }, 186 i = [], 187 u = { render: n, staticRenderFns: i };t.a = u; 188 }]); 189}); 190/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)(module))) 191 192/***/ }), 193/* 5 */ 194/***/ (function(module, exports, __webpack_require__) { 195 196var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @preserve 197 * numeral.js 198 * version : 2.0.6 199 * author : Adam Draper 200 * license : MIT 201 * http://adamwdraper.github.com/Numeral-js/ 202 */ 203 204(function (global, factory) { 205 if (true) { 206 !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 207 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 208 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : 209 __WEBPACK_AMD_DEFINE_FACTORY__), 210 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
vendor: 33,358 bytes, lines 210-1212
210); 211 } else if (typeof module === 'object' && module.exports) { 212 module.exports = factory(); 213 } else { 214 global.numeral = factory(); 215 } 216}(this, function () { 217 /************************************ 218 Variables 219 ************************************/ 220 221 var numeral, 222 _, 223 VERSION = '2.0.6', 224 formats = {}, 225 locales = {}, 226 defaults = { 227 currentLocale: 'en', 228 zeroFormat: null, 229 nullFormat: null, 230 defaultFormat: '0,0', 231 scalePercentBy100: true 232 }, 233 options = { 234 currentLocale: defaults.currentLocale, 235 zeroFormat: defaults.zeroFormat, 236 nullFormat: defaults.nullFormat, 237 defaultFormat: defaults.defaultFormat, 238 scalePercentBy100: defaults.scalePercentBy100 239 }; 240 241 242 /************************************ 243 Constructors 244 ************************************/ 245 246 // Numeral prototype object 247 function Numeral(input, number) { 248 this._input = input; 249 250 this._value = number; 251 } 252 253 numeral = function(input) { 254 var value, 255 kind, 256 unformatFunction, 257 regexp; 258 259 if (numeral.isNumeral(input)) { 260 value = input.value(); 261 } else if (input === 0 || typeof input === 'undefined') { 262 value = 0; 263 } else if (input === null || _.isNaN(input)) { 264 value = null; 265 } else if (typeof input === 'string') { 266 if (options.zeroFormat && input === options.zeroFormat) { 267 value = 0; 268 } else if (options.nullFormat && input === options.nullFormat || !input.replace(/[^0-9]+/g, '').length) { 269 value = null; 270 } else { 271 for (kind in formats) { 272 regexp = typeof formats[kind].regexps.unformat === 'function' ? formats[kind].regexps.unformat() : formats[kind].regexps.unformat; 273 274 if (regexp && input.match(regexp)) { 275 unformatFunction = formats[kind].unformat; 276 277 break; 278 } 279 } 280 281 unformatFunction = unformatFunction || numeral._.stringToNumber; 282 283 value = unformatFunction(input); 284 } 285 } else { 286 value = Number(input)|| null; 287 } 288 289 return new Numeral(input, value); 290 }; 291 292 // version number 293 numeral.version = VERSION; 294 295 // compare numeral object 296 numeral.isNumeral = function(obj) { 297 return obj instanceof Numeral; 298 }; 299 300 // helper functions 301 numeral._ = _ = { 302 // formats numbers separators, decimals places, signs, abbreviations 303 numberToFormat: function(value, format, roundingFunction) { 304 var locale = locales[numeral.options.currentLocale], 305 negP = false, 306 optDec = false, 307 leadingCount = 0, 308 abbr = '', 309 trillion = 1000000000000, 310 billion = 1000000000, 311 million = 1000000, 312 thousand = 1000, 313 decimal = '', 314 neg = false, 315 abbrForce, // force abbreviation 316 abs, 317 min, 318 max, 319 power, 320 int, 321 precision, 322 signed, 323 thousands, 324 output; 325 326 // make sure we never format a null value 327 value = value || 0; 328 329 abs = Math.abs(value); 330 331 // see if we should use parentheses for negative number or if we should prefix with a sign 332 // if both are present we default to parentheses 333 if (numeral._.includes(format, '(')) { 334 negP = true; 335 format = format.replace(/[\(|\)]/g, ''); 336 } else if (numeral._.includes(format, '+') || numeral._.includes(format, '-')) { 337 signed = numeral._.includes(format, '+') ? format.indexOf('+') : value < 0 ? format.indexOf('-') : -1; 338 format = format.replace(/[\+|\-]/g, ''); 339 } 340 341 // see if abbreviation is wanted 342 if (numeral._.includes(format, 'a')) { 343 abbrForce = format.match(/a(k|m|b|t)?/); 344 345 abbrForce = abbrForce ? abbrForce[1] : false; 346 347 // check for space before abbreviation 348 if (numeral._.includes(format, ' a')) { 349 abbr = ' '; 350 } 351 352 format = format.replace(new RegExp(abbr + 'a[kmbt]?'), ''); 353 354 if (abs >= trillion && !abbrForce || abbrForce === 't') { 355 // trillion 356 abbr += locale.abbreviations.trillion; 357 value = value / trillion; 358 } else if (abs < trillion && abs >= billion && !abbrForce || abbrForce === 'b') { 359 // billion 360 abbr += locale.abbreviations.billion; 361 value = value / billion; 362 } else if (abs < billion && abs >= million && !abbrForce || abbrForce === 'm') { 363 // million 364 abbr += locale.abbreviations.million; 365 value = value / million; 366 } else if (abs < million && abs >= thousand && !abbrForce || abbrForce === 'k') { 367 // thousand 368 abbr += locale.abbreviations.thousand; 369 value = value / thousand; 370 } 371 } 372 373 // check for optional decimals 374 if (numeral._.includes(format, '[.]')) { 375 optDec = true; 376 format = format.replace('[.]', '.'); 377 } 378 379 // break number and format 380 int = value.toString().split('.')[0]; 381 precision = format.split('.')[1]; 382 thousands = format.indexOf(','); 383 leadingCount = (format.split('.')[0].split(',')[0].match(/0/g) || []).length; 384 385 if (precision) { 386 if (numeral._.includes(precision, '[')) { 387 precision = precision.replace(']', ''); 388 precision = precision.split('['); 389 decimal = numeral._.toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length); 390 } else { 391 decimal = numeral._.toFixed(value, precision.length, roundingFunction); 392 } 393 394 int = decimal.split('.')[0]; 395 396 if (numeral._.includes(decimal, '.')) { 397 decimal = locale.delimiters.decimal + decimal.split('.')[1]; 398 } else { 399 decimal = ''; 400 } 401 402 if (optDec && Number(decimal.slice(1)) === 0) { 403 decimal = ''; 404 } 405 } else { 406 int = numeral._.toFixed(value, 0, roundingFunction); 407 } 408 409 // check abbreviation again after rounding 410 if (abbr && !abbrForce && Number(int) >= 1000 && abbr !== locale.abbreviations.trillion) { 411 int = String(Number(int) / 1000); 412 413 switch (abbr) { 414 case locale.abbreviations.thousand: 415 abbr = locale.abbreviations.million; 416 break; 417 case locale.abbreviations.million: 418 abbr = locale.abbreviations.billion; 419 break; 420 case locale.abbreviations.billion: 421 abbr = locale.abbreviations.trillion; 422 break; 423 } 424 } 425 426 427 // format number 428 if (numeral._.includes(int, '-')) { 429 int = int.slice(1); 430 neg = true; 431 } 432 433 if (int.length < leadingCount) { 434 for (var i = leadingCount - int.length; i > 0; i--) { 435 int = '0' + int; 436 } 437 } 438 439 if (thousands > -1) { 440 int = int.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + locale.delimiters.thousands); 441 } 442 443 if (format.indexOf('.') === 0) { 444 int = ''; 445 } 446 447 output = int + decimal + (abbr ? abbr : ''); 448 449 if (negP) { 450 output = (negP && neg ? '(' : '') + output + (negP && neg ? ')' : ''); 451 } else { 452 if (signed >= 0) { 453 output = signed === 0 ? (neg ? '-' : '+') + output : output + (neg ? '-' : '+'); 454 } else if (neg) { 455 output = '-' + output; 456 } 457 } 458 459 return output; 460 }, 461 // unformats numbers separators, decimals places, signs, abbreviations 462 stringToNumber: function(string) { 463 var locale = locales[options.currentLocale], 464 stringOriginal = string, 465 abbreviations = { 466 thousand: 3, 467 million: 6, 468 billion: 9, 469 trillion: 12 470 }, 471 abbreviation, 472 value, 473 i, 474 regexp; 475 476 if (options.zeroFormat && string === options.zeroFormat) { 477 value = 0; 478 } else if (options.nullFormat && string === options.nullFormat || !string.replace(/[^0-9]+/g, '').length) { 479 value = null; 480 } else { 481 value = 1; 482 483 if (locale.delimiters.decimal !== '.') { 484 string = string.replace(/\./g, '').replace(locale.delimiters.decimal, '.'); 485 } 486 487 for (abbreviation in abbreviations) { 488 regexp = new RegExp('[^a-zA-Z]' + locale.abbreviations[abbreviation] + '(?:\\)|(\\' + locale.currency.symbol + ')?(?:\\))?)?$'); 489 490 if (stringOriginal.match(regexp)) { 491 value *= Math.pow(10, abbreviations[abbreviation]); 492 break; 493 } 494 } 495 496 // check for negative number 497 value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1; 498 499 // remove non numbers 500 string = string.replace(/[^0-9\.]+/g, ''); 501 502 value *= Number(string); 503 } 504 505 return value; 506 }, 507 isNaN: function(value) { 508 return typeof value === 'number' && isNaN(value); 509 }, 510 includes: function(string, search) { 511 return string.indexOf(search) !== -1; 512 }, 513 insert: function(string, subString, start) { 514 return string.slice(0, start) + subString + string.slice(start); 515 }, 516 reduce: function(array, callback /*, initialValue*/) { 517 if (this === null) { 518 throw new TypeError('Array.prototype.reduce called on null or undefined'); 519 } 520 521 if (typeof callback !== 'function') { 522 throw new TypeError(callback + ' is not a function'); 523 } 524 525 var t = Object(array), 526 len = t.length >>> 0, 527 k = 0, 528 value; 529 530 if (arguments.length === 3) { 531 value = arguments[2]; 532 } else { 533 while (k < len && !(k in t)) { 534 k++; 535 } 536 537 if (k >= len) { 538 throw new TypeError('Reduce of empty array with no initial value'); 539 } 540 541 value = t[k++]; 542 } 543 for (; k < len; k++) { 544 if (k in t) { 545 value = callback(value, t[k], k, t); 546 } 547 } 548 return value; 549 }, 550 /** 551 * Computes the multiplier necessary to make x >= 1, 552 * effectively eliminating miscalculations caused by 553 * finite precision. 554 */ 555 multiplier: function (x) { 556 var parts = x.toString().split('.'); 557 558 return parts.length < 2 ? 1 : Math.pow(10, parts[1].length); 559 }, 560 /** 561 * Given a variable number of arguments, returns the maximum 562 * multiplier that must be used to normalize an operation involving 563 * all of them. 564 */ 565 correctionFactor: function () { 566 var args = Array.prototype.slice.call(arguments); 567 568 return args.reduce(function(accum, next) { 569 var mn = _.multiplier(next); 570 return accum > mn ? accum : mn; 571 }, 1); 572 }, 573 /** 574 * Implementation of toFixed() that treats floats more like decimals 575 * 576 * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present 577 * problems for accounting- and finance-related software. 578 */ 579 toFixed: function(value, maxDecimals, roundingFunction, optionals) { 580 var splitValue = value.toString().split('.'), 581 minDecimals = maxDecimals - (optionals || 0), 582 boundedPrecision, 583 optionalsRegExp, 584 power, 585 output; 586 587 // Use the smallest precision value possible to avoid errors from floating point representation 588 if (splitValue.length === 2) { 589 boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals); 590 } else { 591 boundedPrecision = minDecimals; 592 } 593 594 power = Math.pow(10, boundedPrecision); 595 596 // Multiply up by precision, round accurately, then divide and use native toFixed(): 597 output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision); 598 599 if (optionals > maxDecimals - boundedPrecision) { 600 optionalsRegExp = new RegExp('\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$'); 601 output = output.replace(optionalsRegExp, ''); 602 } 603 604 return output; 605 } 606 }; 607 608 // avaliable options 609 numeral.options = options; 610 611 // avaliable formats 612 numeral.formats = formats; 613 614 // avaliable formats 615 numeral.locales = locales; 616 617 // This function sets the current locale. If 618 // no arguments are passed in, it will simply return the current global 619 // locale key. 620 numeral.locale = function(key) { 621 if (key) { 622 options.currentLocale = key.toLowerCase(); 623 } 624 625 return options.currentLocale; 626 }; 627 628 // This function provides access to the loaded locale data. If 629 // no arguments are passed in, it will simply return the current 630 // global locale object. 631 numeral.localeData = function(key) { 632 if (!key) { 633 return locales[options.currentLocale]; 634 } 635 636 key = key.toLowerCase(); 637 638 if (!locales[key]) { 639 throw new Error('Unknown locale : ' + key); 640 } 641 642 return locales[key]; 643 }; 644 645 numeral.reset = function() { 646 for (var property in defaults) { 647 options[property] = defaults[property]; 648 } 649 }; 650 651 numeral.zeroFormat = function(format) { 652 options.zeroFormat = typeof(format) === 'string' ? format : null; 653 }; 654 655 numeral.nullFormat = function (format) { 656 options.nullFormat = typeof(format) === 'string' ? format : null; 657 }; 658 659 numeral.defaultFormat = function(format) { 660 options.defaultFormat = typeof(format) === 'string' ? format : '0.0'; 661 }; 662 663 numeral.register = function(type, name, format) { 664 name = name.toLowerCase(); 665 666 if (this[type + 's'][name]) { 667 throw new TypeError(name + ' ' + type + ' already registered.'); 668 } 669 670 this[type + 's'][name] = format; 671 672 return format; 673 }; 674 675 676 numeral.validate = function(val, culture) { 677 var _decimalSep, 678 _thousandSep, 679 _currSymbol, 680 _valArray, 681 _abbrObj, 682 _thousandRegEx, 683 localeData, 684 temp; 685 686 //coerce val to string 687 if (typeof val !== 'string') { 688 val += ''; 689 690 if (console.warn) { 691 console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val); 692 } 693 } 694 695 //trim whitespaces from either sides 696 val = val.trim(); 697 698 //if val is just digits return true 699 if (!!val.match(/^\d+$/)) { 700 return true; 701 } 702 703 //if val is empty return false 704 if (val === '') { 705 return false; 706 } 707 708 //get the decimal and thousands separator from numeral.localeData 709 try { 710 //check if the culture is understood by numeral. if not, default it to current locale 711 localeData = numeral.localeData(culture); 712 } catch (e) { 713 localeData = numeral.localeData(numeral.locale()); 714 } 715 716 //setup the delimiters and currency symbol based on culture/locale 717 _currSymbol = localeData.currency.symbol; 718 _abbrObj = localeData.abbreviations; 719 _decimalSep = localeData.delimiters.decimal; 720 if (localeData.delimiters.thousands === '.') { 721 _thousandSep = '\\.'; 722 } else { 723 _thousandSep = localeData.delimiters.thousands; 724 } 725 726 // validating currency symbol 727 temp = val.match(/^[^\d]+/); 728 if (temp !== null) { 729 val = val.substr(1); 730 if (temp[0] !== _currSymbol) { 731 return false; 732 } 733 } 734 735 //validating abbreviation symbol 736 temp = val.match(/[^\d]+$/); 737 if (temp !== null) { 738 val = val.slice(0, -1); 739 if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) { 740 return false; 741 } 742 } 743 744 _thousandRegEx = new RegExp(_thousandSep + '{2}'); 745 746 if (!val.match(/[^\d.,]/g)) { 747 _valArray = val.split(_decimalSep); 748 if (_valArray.length > 2) { 749 return false; 750 } else { 751 if (_valArray.length < 2) { 752 return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx)); 753 } else { 754 if (_valArray[0].length === 1) { 755 return ( !! _valArray[0].match(/^\d+$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/)); 756 } else { 757 return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/)); 758 } 759 } 760 } 761 } 762 763 return false; 764 }; 765 766 767 /************************************ 768 Numeral Prototype 769 ************************************/ 770 771 numeral.fn = Numeral.prototype = { 772 clone: function() { 773 return numeral(this); 774 }, 775 format: function(inputString, roundingFunction) { 776 var value = this._value, 777 format = inputString || options.defaultFormat, 778 kind, 779 output, 780 formatFunction; 781 782 // make sure we have a roundingFunction 783 roundingFunction = roundingFunction || Math.round; 784 785 // format based on value 786 if (value === 0 && options.zeroFormat !== null) { 787 output = options.zeroFormat; 788 } else if (value === null && options.nullFormat !== null) { 789 output = options.nullFormat; 790 } else { 791 for (kind in formats) { 792 if (format.match(formats[kind].regexps.format)) { 793 formatFunction = formats[kind].format; 794 795 break; 796 } 797 } 798 799 formatFunction = formatFunction || numeral._.numberToFormat; 800 801 output = formatFunction(value, format, roundingFunction); 802 } 803 804 return output; 805 }, 806 value: function() { 807 return this._value; 808 }, 809 input: function() { 810 return this._input; 811 }, 812 set: function(value) { 813 this._value = Number(value); 814 815 return this; 816 }, 817 add: function(value) { 818 var corrFactor = _.correctionFactor.call(null, this._value, value); 819 820 function cback(accum, curr, currI, O) { 821 return accum + Math.round(corrFactor * curr); 822 } 823 824 this._value = _.reduce([this._value, value], cback, 0) / corrFactor; 825 826 return this; 827 }, 828 subtract: function(value) { 829 var corrFactor = _.correctionFactor.call(null, this._value, value); 830 831 function cback(accum, curr, currI, O) { 832 return accum - Math.round(corrFactor * curr); 833 } 834 835 this._value = _.reduce([value], cback, Math.round(this._value * corrFactor)) / corrFactor; 836 837 return this; 838 }, 839 multiply: function(value) { 840 function cback(accum, curr, currI, O) { 841 var corrFactor = _.correctionFactor(accum, curr); 842 return Math.round(accum * corrFactor) * Math.round(curr * corrFactor) / Math.round(corrFactor * corrFactor); 843 } 844 845 this._value = _.reduce([this._value, value], cback, 1); 846 847 return this; 848 }, 849 divide: function(value) { 850 function cback(accum, curr, currI, O) { 851 var corrFactor = _.correctionFactor(accum, curr); 852 return Math.round(accum * corrFactor) / Math.round(curr * corrFactor); 853 } 854 855 this._value = _.reduce([this._value, value], cback); 856 857 return this; 858 }, 859 difference: function(value) { 860 return Math.abs(numeral(this._value).subtract(value).value()); 861 } 862 }; 863 864 /************************************ 865 Default Locale && Format 866 ************************************/ 867 868 numeral.register('locale', 'en', { 869 delimiters: { 870 thousands: ',', 871 decimal: '.' 872 }, 873 abbreviations: { 874 thousand: 'k', 875 million: 'm', 876 billion: 'b', 877 trillion: 't' 878 }, 879 ordinal: function(number) { 880 var b = number % 10; 881 return (~~(number % 100 / 10) === 1) ? 'th' : 882 (b === 1) ? 'st' : 883 (b === 2) ? 'nd' : 884 (b === 3) ? 'rd' : 'th'; 885 }, 886 currency: { 887 symbol: '$' 888 } 889 }); 890 891 892 893(function() { 894 numeral.register('format', 'bps', { 895 regexps: { 896 format: /(BPS)/, 897 unformat: /(BPS)/ 898 }, 899 format: function(value, format, roundingFunction) { 900 var space = numeral._.includes(format, ' BPS') ? ' ' : '', 901 output; 902 903 value = value * 10000; 904 905 // check for space before BPS 906 format = format.replace(/\s?BPS/, ''); 907 908 output = numeral._.numberToFormat(value, format, roundingFunction); 909 910 if (numeral._.includes(output, ')')) { 911 output = output.split(''); 912 913 output.splice(-1, 0, space + 'BPS'); 914 915 output = output.join(''); 916 } else { 917 output = output + space + 'BPS'; 918 } 919 920 return output; 921 }, 922 unformat: function(string) { 923 return +(numeral._.stringToNumber(string) * 0.0001).toFixed(15); 924 } 925 }); 926})(); 927 928 929(function() { 930 var decimal = { 931 base: 1000, 932 suffixes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] 933 }, 934 binary = { 935 base: 1024, 936 suffixes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'] 937 }; 938 939 var allSuffixes = decimal.suffixes.concat(binary.suffixes.filter(function (item) { 940 return decimal.suffixes.indexOf(item) < 0; 941 })); 942 var unformatRegex = allSuffixes.join('|'); 943 // Allow support for BPS (http://www.investopedia.com/terms/b/basispoint.asp) 944 unformatRegex = '(' + unformatRegex.replace('B', 'B(?!PS)') + ')'; 945 946 numeral.register('format', 'bytes', { 947 regexps: { 948 format: /([0\s]i?b)/, 949 unformat: new RegExp(unformatRegex) 950 }, 951 format: function(value, format, roundingFunction) { 952 var output, 953 bytes = numeral._.includes(format, 'ib') ? binary : decimal, 954 suffix = numeral._.includes(format, ' b') || numeral._.includes(format, ' ib') ? ' ' : '', 955 power, 956 min, 957 max; 958 959 // check for space before 960 format = format.replace(/\s?i?b/, ''); 961 962 for (power = 0; power <= bytes.suffixes.length; power++) { 963 min = Math.pow(bytes.base, power); 964 max = Math.pow(bytes.base, power + 1); 965 966 if (value === null || value === 0 || value >= min && value < max) { 967 suffix += bytes.suffixes[power]; 968 969 if (min > 0) { 970 value = value / min; 971 } 972 973 break; 974 } 975 } 976 977 output = numeral._.numberToFormat(value, format, roundingFunction); 978 979 return output + suffix; 980 }, 981 unformat: function(string) { 982 var value = numeral._.stringToNumber(string), 983 power, 984 bytesMultiplier; 985 986 if (value) { 987 for (power = decimal.suffixes.length - 1; power >= 0; power--) { 988 if (numeral._.includes(string, decimal.suffixes[power])) { 989 bytesMultiplier = Math.pow(decimal.base, power); 990 991 break; 992 } 993 994 if (numeral._.includes(string, binary.suffixes[power])) { 995 bytesMultiplier = Math.pow(binary.base, power); 996 997 break; 998 } 999 } 1000 1001 value *= (bytesMultiplier || 1); 1002 } 1003 1004 return value; 1005 } 1006 }); 1007})(); 1008 1009 1010(function() { 1011 numeral.register('format', 'currency', { 1012 regexps: { 1013 format: /(\$)/ 1014 }, 1015 format: function(value, format, roundingFunction) { 1016 var locale = numeral.locales[numeral.options.currentLocale], 1017 symbols = { 1018 before: format.match(/^([\+|\-|\(|\s|\$]*)/)[0], 1019 after: format.match(/([\+|\-|\)|\s|\$]*)$/)[0] 1020 }, 1021 output, 1022 symbol, 1023 i; 1024 1025 // strip format of spaces and $ 1026 format = format.replace(/\s?\$\s?/, ''); 1027 1028 // format the number 1029 output = numeral._.numberToFormat(value, format, roundingFunction); 1030 1031 // update the before and after based on value 1032 if (value >= 0) { 1033 symbols.before = symbols.before.replace(/[\-\(]/, ''); 1034 symbols.after = symbols.after.replace(/[\-\)]/, ''); 1035 } else if (value < 0 && (!numeral._.includes(symbols.before, '-') && !numeral._.includes(symbols.before, '('))) { 1036 symbols.before = '-' + symbols.before; 1037 } 1038 1039 // loop through each before symbol 1040 for (i = 0; i < symbols.before.length; i++) { 1041 symbol = symbols.before[i]; 1042 1043 switch (symbol) { 1044 case '$': 1045 output = numeral._.insert(output, locale.currency.symbol, i); 1046 break; 1047 case ' ': 1048 output = numeral._.insert(output, ' ', i + locale.currency.symbol.length - 1); 1049 break; 1050 } 1051 } 1052 1053 // loop through each after symbol 1054 for (i = symbols.after.length - 1; i >= 0; i--) { 1055 symbol = symbols.after[i]; 1056 1057 switch (symbol) { 1058 case '$': 1059 output = i === symbols.after.length - 1 ? output + locale.currency.symbol : numeral._.insert(output, locale.currency.symbol, -(symbols.after.length - (1 + i))); 1060 break; 1061 case ' ': 1062 output = i === symbols.after.length - 1 ? output + ' ' : numeral._.insert(output, ' ', -(symbols.after.length - (1 + i) + locale.currency.symbol.length - 1)); 1063 break; 1064 } 1065 } 1066 1067 1068 return output; 1069 } 1070 }); 1071})(); 1072 1073 1074(function() { 1075 numeral.register('format', 'exponential', { 1076 regexps: { 1077 format: /(e\+|e-)/, 1078 unformat: /(e\+|e-)/ 1079 }, 1080 format: function(value, format, roundingFunction) { 1081 var output, 1082 exponential = typeof value === 'number' && !numeral._.isNaN(value) ? value.toExponential() : '0e+0', 1083 parts = exponential.split('e'); 1084 1085 format = format.replace(/e[\+|\-]{1}0/, ''); 1086 1087 output = numeral._.numberToFormat(Number(parts[0]), format, roundingFunction); 1088 1089 return output + 'e' + parts[1]; 1090 }, 1091 unformat: function(string) { 1092 var parts = numeral._.includes(string, 'e+') ? string.split('e+') : string.split('e-'), 1093 value = Number(parts[0]), 1094 power = Number(parts[1]); 1095 1096 power = numeral._.includes(string, 'e-') ? power *= -1 : power; 1097 1098 function cback(accum, curr, currI, O) { 1099 var corrFactor = numeral._.correctionFactor(accum, curr), 1100 num = (accum * corrFactor) * (curr * corrFactor) / (corrFactor * corrFactor); 1101 return num; 1102 } 1103 1104 return numeral._.reduce([value, Math.pow(10, power)], cback, 1); 1105 } 1106 }); 1107})(); 1108 1109 1110(function() { 1111 numeral.register('format', 'ordinal', { 1112 regexps: { 1113 format: /(o)/ 1114 }, 1115 format: function(value, format, roundingFunction) { 1116 var locale = numeral.locales[numeral.options.currentLocale], 1117 output, 1118 ordinal = numeral._.includes(format, ' o') ? ' ' : ''; 1119 1120 // check for space before 1121 format = format.replace(/\s?o/, ''); 1122 1123 ordinal += locale.ordinal(value); 1124 1125 output = numeral._.numberToFormat(value, format, roundingFunction); 1126 1127 return output + ordinal; 1128 } 1129 }); 1130})(); 1131 1132 1133(function() { 1134 numeral.register('format', 'percentage', { 1135 regexps: { 1136 format: /(%)/, 1137 unformat: /(%)/ 1138 }, 1139 format: function(value, format, roundingFunction) { 1140 var space = numeral._.includes(format, ' %') ? ' ' : '', 1141 output; 1142 1143 if (numeral.options.scalePercentBy100) { 1144 value = value * 100; 1145 } 1146 1147 // check for space before % 1148 format = format.replace(/\s?\%/, ''); 1149 1150 output = numeral._.numberToFormat(value, format, roundingFunction); 1151 1152 if (numeral._.includes(output, ')')) { 1153 output = output.split(''); 1154 1155 output.splice(-1, 0, space + '%'); 1156 1157 output = output.join(''); 1158 } else { 1159 output = output + space + '%'; 1160 } 1161 1162 return output; 1163 }, 1164 unformat: function(string) { 1165 var number = numeral._.stringToNumber(string); 1166 if (numeral.options.scalePercentBy100) { 1167 return number * 0.01; 1168 } 1169 return number; 1170 } 1171 }); 1172})(); 1173 1174 1175(function() { 1176 numeral.register('format', 'time', { 1177 regexps: { 1178 format: /(:)/, 1179 unformat: /(:)/ 1180 }, 1181 format: function(value, format, roundingFunction) { 1182 var hours = Math.floor(value / 60 / 60), 1183 minutes = Math.floor((value - (hours * 60 * 60)) / 60), 1184 seconds = Math.round(value - (hours * 60 * 60) - (minutes * 60)); 1185 1186 return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds); 1187 }, 1188 unformat: function(string) { 1189 var timeArray = string.split(':'), 1190 seconds = 0; 1191 1192 // turn hours and minutes into seconds and add them all up 1193 if (timeArray.length === 3) { 1194 // hours 1195 seconds = seconds + (Number(timeArray[0]) * 60 * 60); 1196 // minutes 1197 seconds = seconds + (Number(timeArray[1]) * 60); 1198 // seconds 1199 seconds = seconds + Number(timeArray[2]); 1200 } else if (timeArray.length === 2) { 1201 // minutes 1202 seconds = seconds + (Number(timeArray[0]) * 60); 1203 // seconds 1204 seconds = seconds + Number(timeArray[1]); 1205 } 1206 return Number(seconds); 1207 } 1208 }); 1209})(); 1210 1211return numeral; 1212}));
1213 1214 1215/***/ }), 1216/* 6 */ 1217/***/ (function(module, exports, __webpack_require__) { 1218 1219(function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exp
vendor: 4,394 bytes, line 1219
1219orts.VMoney=t():e.VMoney=t()})(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=".",t(t.s=9)}([function(e,t,n){"use strict";t.a={prefix:"",suffix:"",thousands:",",decimal:".",precision:2}},function(e,t,n){"use strict";var r=n(2),i=n(5),u=n(0);t.a=function(e,t){if(t.value){var o=n.i(i.a)(u.a,t.value);if("INPUT"!==e.tagName.toLocaleUpperCase()){var a=e.getElementsByTagName("input");1!==a.length||(e=a[0])}e.oninput=function(){var t=e.value.length-e.selectionEnd;e.value=n.i(r.a)(e.value,o),t=Math.max(t,o.suffix.length),t=e.value.length-t,t=Math.max(t,o.prefix.length+1),n.i(r.b)(e,t),e.dispatchEvent(n.i(r.c)("change"))},e.onfocus=function(){n.i(r.b)(e,e.value.length-o.suffix.length)},e.oninput(),e.dispatchEvent(n.i(r.c)("input"))}}},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.a;"number"==typeof e&&(e=e.toFixed(o(t.precision)));var n=e.indexOf("-")>=0?"-":"",r=u(e),i=c(r,t.precision),a=d(i).split("."),p=a[0],l=a[1];return p=f(p,t.thousands),t.prefix+n+s(p,l,t.decimal)+t.suffix}function i(e,t){var n=e.indexOf("-")>=0?-1:1,r=u(e),i=c(r,t);return parseFloat(i)*n}function u(e){return d(e).replace(/\D+/g,"")||"0"}function o(e){return a(0,e,20)}function a(e,t,n){return Math.max(e,Math.min(t,n))}function c(e,t){var n=Math.pow(10,t);return(parseFloat(e)/n).toFixed(o(t))}function f(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+t)}function s(e,t,n){return t?e+n+t:e}function d(e){return e?e.toString():""}function p(e,t){var n=function(){e.setSelectionRange(t,t)};e===document.activeElement&&(n(),setTimeout(n,1))}function l(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var m=n(0);n.d(t,"a",function(){return r}),n.d(t,"d",function(){return i}),n.d(t,"b",function(){return p}),n.d(t,"c",function(){return l})},function(e,t,n){"use strict";function r(e,t){t&&Object.keys(t).map(function(e){a.a[e]=t[e]}),e.directive("money",o.a),e.component("money",u.a)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),u=n.n(i),o=n(1),a=n(0);n.d(t,"Money",function(){return u.a}),n.d(t,"VMoney",function(){return o.a}),n.d(t,"options",function(){return a.a}),n.d(t,"VERSION",function(){return c});var c="0.8.1";t.default=r,"undefined"!=typeof window&&window.Vue&&window.Vue.use(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(0),u=n(2);t.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return i.a.precision}},decimal:{type:String,default:function(){return i.a.decimal}},thousands:{type:String,default:function(){return i.a.thousands}},prefix:{type:String,default:function(){return i.a.prefix}},suffix:{type:String,default:function(){return i.a.suffix}}},directives:{money:r.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(e,t){var r=n.i(u.a)(e,this.$props);r!==this.formattedValue&&(this.formattedValue=r)}}},methods:{change:function(e){this.$emit("input",this.masked?e.target.value:n.i(u.d)(e.target.value,this.precision))}}}},function(e,t,n){"use strict";t.a=function(e,t){return e=e||{},t=t||{},Object.keys(e).concat(Object.keys(t)).reduce(function(n,r){return n[r]=void 0===t[r]?e[r]:t[r],n},{})}},function(e,t,n){var r=n(7)(n(4),n(8),null,null);e.exports=r.exports},function(e,t){e.exports=function(e,t,n,r){var i,u=e=e||{},o=typeof e.default;"object"!==o&&"function"!==o||(i=e,u=e.default);var a="function"==typeof u?u.options:u;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),n&&(a._scopeId=n),r){var c=a.computed||(a.computed={});Object.keys(r).forEach(function(e){var t=r[e];c[e]=function(){return t}})}return{esModule:i,exports:u,options:a}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:e.precision,decimal
1219:e.decimal,thousands:e.thousands,prefix:e.prefix,suffix:e.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:e.formattedValue},on:{change:e.change}})},staticRenderFns:[]}},function(e,t,n){e.exports=n(3)}])}); 1220 1221/***/ }), 1222/* 7 */ 1223/***/ (function(module, exports, __webpack_require__) { 1224 1225"use strict"; 1226var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 1227 1228var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 1229 1230/*! 1231 * headroom.js v0.9.4 - Give your page some headroom. Hide your header until you need it 1232 * Copyright (c) 2017 Nick Williams - http://wicky.nillia.ms/headroom.js 1233 * License: MIT 1234 */ 1235 1236!function (a, b) { 1237 "use strict"; 1238 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (b), 1239 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 1240 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 1241 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? module.exports = b() : a.Headroom = b(); 1242}(undefined, function () { 1243 "use strict"; 1244 function a(a) { 1245 this.callback = a, this.ticking = !1; 1246 }function b(a) { 1247 return a && "undefined" != typeof window && (a === window || a.nodeType); 1248 }function c(a) { 1249 if (arguments.length <= 0) throw new Error("Missing arguments in extend function");var d, 1250 e, 1251 f = a || {};for (e = 1; e < arguments.length; e++) { 1252 var g = arguments[e] || {};for (d in g) { 1253 "object" != _typeof(f[d]) || b(f[d]) ? f[d] = f[d] || g[d] : f[d] = c(f[d], g[d]); 1254 } 1255 }return f; 1256 }function d(a) { 1257 return a === Object(a) ? a : { down: a, up: a }; 1258 }function e(a, b) { 1259 b = c(b, e.options), this.lastKnownScrollY = 0, this.elem = a, this.tolerance = d(b.tolerance), this.classes = b.classes, this.offset = b.offset, this.scroller = b.scroller, this.initialised = !1, this.onPin = b.onPin, this.onUnpin = b.onUnpin, this.onTop = b.onTop, this.onNotTop = b.onNotTop, this.onBottom = b.onBottom, this.onNotBottom = b.onNotBottom; 1260 }var f = { bind: !!function () {}.bind, classList: "classList" in document.documentElement, rAF: !!(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame) };return window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame, a.prototype = { constructor: a, update: function update() { 1261 this.callback && this.callback(), this.ticking = !1; 1262 }, requestTick: function requestTick() { 1263 this.ticking || (requestAnimationFrame(this.rafCallback || (this.rafCallback = this.update.bind(this))), this.ticking = !0); 1264 }, handleEvent: function handleEvent() { 1265 this.requestTick(); 1266 } }, e.prototype = { constructor: e, init: function init() { 1267 if (e.cutsTheMustard) return this.debouncer = new a(this.update.bind(this)), this.elem.classList.add(this.classes.initial), setTimeout(this.attachEvent.bind(this), 100), this; 1268 }, destroy: function destroy() { 1269 var a = this.classes;this.initialised = !1;for (var b in a) { 1270 a.hasOwnProperty(b) && this.elem.classList.remove(a[b]); 1271 }this.scroller.removeEventListener("scroll", this.debouncer, !1); 1272 }, attachEvent: function attachEvent() { 1273 this.initialised || (this.lastKnownScrollY = this.getScrollY(), this.initialised = !0, this.scroller.addEventListener("scroll", this.debouncer, !1), this.debouncer.handleEvent()); 1274 }, unpin: function unpin() { 1275 var a = this.elem.classList, 1276 b = this.classes;!a.contains(b.pinned) && a.contains(b.unpinned) || (a.add(b.unpinned), a.remove(b.pinned), this.onUnpin && this.onUnpin.call(this)); 1277 }, pin: function pin() { 1278 var a = this.elem.classList, 1279 b = this.classes;a.contains(b.unpinned) && (a.remove(b.unpinned), a.add(b.pinned), this.onPin && this.onPin.call(this)); 1280 }
1280, top: function top() { 1281 var a = this.elem.classList, 1282 b = this.classes;a.contains(b.top) || (a.add(b.top), a.remove(b.notTop), this.onTop && this.onTop.call(this)); 1283 }, notTop: function notTop() { 1284 var a = this.elem.classList, 1285 b = this.classes;a.contains(b.notTop) || (a.add(b.notTop), a.remove(b.top), this.onNotTop && this.onNotTop.call(this)); 1286 }, bottom: function bottom() { 1287 var a = this.elem.classList, 1288 b = this.classes;a.contains(b.bottom) || (a.add(b.bottom), a.remove(b.notBottom), this.onBottom && this.onBottom.call(this)); 1289 }, notBottom: function notBottom() { 1290 var a = this.elem.classList, 1291 b = this.classes;a.contains(b.notBottom) || (a.add(b.notBottom), a.remove(b.bottom), this.onNotBottom && this.onNotBottom.call(this)); 1292 }, getScrollY: function getScrollY() { 1293 return void 0 !== this.scroller.pageYOffset ? this.scroller.pageYOffset : void 0 !== this.scroller.scrollTop ? this.scroller.scrollTop : (document.documentElement || document.body.parentNode || document.body).scrollTop; 1294 }, getViewportHeight: function getViewportHeight() { 1295 return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; 1296 }, getElementPhysicalHeight: function getElementPhysicalHeight(a) { 1297 return Math.max(a.offsetHeight, a.clientHeight); 1298 }, getScrollerPhysicalHeight: function getScrollerPhysicalHeight() { 1299 return this.scroller === window || this.scroller === document.body ? this.getViewportHeight() : this.getElementPhysicalHeight(this.scroller); 1300 }, getDocumentHeight: function getDocumentHeight() { 1301 var a = document.body, 1302 b = document.documentElement;return Math.max(a.scrollHeight, b.scrollHeight, a.offsetHeight, b.offsetHeight, a.clientHeight, b.clientHeight); 1303 }, getElementHeight: function getElementHeight(a) { 1304 return Math.max(a.scrollHeight, a.offsetHeight, a.clientHeight); 1305 }, getScrollerHeight: function getScrollerHeight() { 1306 return this.scroller === window || this.scroller === document.body ? this.getDocumentHeight() : this.getElementHeight(this.scroller); 1307 }, isOutOfBounds: function isOutOfBounds(a) { 1308 var b = a < 0, 1309 c = a + this.getScrollerPhysicalHeight() > this.getScrollerHeight();return b || c; 1310 }, toleranceExceeded: function toleranceExceeded(a, b) { 1311 return Math.abs(a - this.lastKnownScrollY) >= this.tolerance[b]; 1312 }, shouldUnpin: function shouldUnpin(a, b) { 1313 var c = a > this.lastKnownScrollY, 1314 d = a >= this.offset;return c && d && b; 1315 }, shouldPin: function shouldPin(a, b) { 1316 var c = a < this.lastKnownScrollY, 1317 d = a <= this.offset;return c && b || d; 1318 }, update: function update() { 1319 var a = this.getScrollY(), 1320 b = a > this.lastKnownScrollY ? "down" : "up", 1321 c = this.toleranceExceeded(a, b);this.isOutOfBounds(a) || (a <= this.offset ? this.top() : this.notTop(), a + this.getViewportHeight() >= this.getScrollerHeight() ? this.bottom() : this.notBottom(), this.shouldUnpin(a, c) ? this.unpin() : this.shouldPin(a, c) && this.pin(), this.lastKnownScrollY = a); 1322 } }, e.options = { tolerance: { up: 0, down: 0 }, offset: 0, scroller: window, classes: { pinned: "headroom--pinned", unpinned: "headroom--unpinned", top: "headroom--top", notTop: "headroom--not-top", bottom: "headroom--bottom", notBottom: "headroom--not-bottom", initial: "headroom" } }, e.cutsTheMustard = "undefined" != typeof f && f.rAF && f.bind && f.classList, e; 1323}); 1324 1325/***/ }), 1326/* 8 */ 1327/***/ (function(module, exports, __webpack_require__) { 1328 1329(function (global, factory) { 1330 true ? factory(exports) : 1331 typeof define === 'function' && define.amd ? define(['exports'], factory) : 1332 (factory((global.accounting = global.accounting || {}))); 1333}(this, function (exports) { 'use strict'; 1334 1335 function __commonjs(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } 1336 1337 /** 1338 * The library's settings configuration object. 1339 * 1340 * Contains default parameters for currency and number formatting 1341 */ 1342 var settings = { 1343 symbol: '$', // default currency symbol is '$' 1344 format: '%s%v', // controls output: %s = symbol, %v = value (can be object, see docs)
1345 decimal: '.', // decimal point separator 1346 thousand: ',', // thousands separator 1347 precision: 2, // decimal places 1348 grouping: 3, // digit grouping (not implemented yet) 1349 stripZeros: false, // strip insignificant zeros from decimal part 1350 fallback: 0 // value returned on unformat() failure 1351 }; 1352 1353 /** 1354 * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value 1355 * Alias: `accounting.parse(string)` 1356 * 1357 * Decimal must be included in the regular expression to match floats (defaults to 1358 * accounting.settings.decimal), so if the number uses a non-standard decimal 1359 * separator, provide it as the second argument. 1360 * 1361 * Also matches bracketed negatives (eg. '$ (1.99)' => -1.99) 1362 * 1363 * Doesn't throw any errors (`NaN`s become 0) but this may change in future 1364 * 1365 * ```js 1366 * accounting.unformat("£ 12,345,678.90 GBP"); // 12345678.9 1367 * ``` 1368 * 1369 * @method unformat 1370 * @for accounting 1371 * @param {String|Array<String>} value The string or array of strings containing the number/s to parse. 1372 * @param {Number} decimal Number of decimal digits of the resultant number 1373 * @return {Float} The parsed number 1374 */ 1375 function unformat(value) { 1376 var decimal = arguments.length <= 1 || arguments[1] === undefined ? settings.decimal : arguments[1]; 1377 var fallback = arguments.length <= 2 || arguments[2] === undefined ? settings.fallback : arguments[2]; 1378 1379 // Recursively unformat arrays: 1380 if (Array.isArray(value)) { 1381 return value.map(function (val) { 1382 return unformat(val, decimal, fallback); 1383 }); 1384 } 1385 1386 // Return the value as-is if it's already a number: 1387 if (typeof value === 'number') return value; 1388 1389 // Build regex to strip out everything except digits, decimal point and minus sign: 1390 var regex = new RegExp('[^0-9-(-)-' + decimal + ']', ['g']); 1391 var unformattedValueString = ('' + value).replace(regex, '') // strip out any cruft 1392 .replace(decimal, '.') // make sure decimal point is standard 1393 .replace(/\(([-]*\d*[^)]?\d+)\)/g, '-$1') // replace bracketed values with negatives 1394 .replace(/\((.*)\)/, ''); // remove any brackets that do not have numeric value 1395 1396 /** 1397 * Handling -ve number and bracket, eg. 1398 * (-100) = 100, -(100) = 100, --100 = 100 1399 */ 1400 var negative = (unformattedValueString.match(/-/g) || 2).length % 2, 1401 absUnformatted = parseFloat(unformattedValueString.replace(/-/g, '')), 1402 unformatted = absUnformatted * (negative ? -1 : 1); 1403 1404 // This will fail silently which may cause trouble, let's wait and see: 1405 return !isNaN(unformatted) ? unformatted : fallback; 1406 } 1407 1408 /** 1409 * Check and normalise the value of precision (must be positive integer) 1410 */ 1411 function _checkPrecision(val, base) { 1412 val = Math.round(Math.abs(val)); 1413 return isNaN(val) ? base : val; 1414 } 1415 1416 /** 1417 * Implementation of toFixed() that treats floats more like decimals 1418 * 1419 * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present 1420 * problems for accounting- and finance-related software. 1421 * 1422 * ```js 1423 * (0.615).toFixed(2); // "0.61" (native toFixed has rounding issues) 1424 * accounting.toFixed(0.615, 2); // "0.62" 1425 * ``` 1426 * 1427 * @method toFixed 1428 * @for accounting 1429 * @param {Float} value The float to be treated as a decimal number. 1430 * @param {Number} [precision=2] The number of decimal digits to keep. 1431 * @return {String} The given number transformed into a string with the given precission 1432 */ 1433 function toFixed(value, precision) { 1434 precision = _checkPrecision(precision, settings.precision); 1435 var power = Math.pow(10, precision); 1436 1437 // Multiply up by precision, round accurately, then divide and use native toFixed(): 1438 return (Math.round((value + 1e-8) * power) / power).toFixed(precision); 1439 } 1440 1441 var index = __commonjs(function (module) { 1442 /* eslint-disable no-unused-vars */ 1443 'use strict'; 1444 var hasOwnProperty = Object.prototype.hasOwnProperty; 1445 var propIsEnumerable = Object.prototype.propertyIsEnumerable; 1446 1447 function toObject(val) { 1448 if (val === null || val === undefined) { 1449 throw new TypeError('Object.assign cannot be called with null or undefined'); 1450 } 1451 1452 return Object(val); 1453 } 1454 1455 module.exports = Object.assign || function (target, source) { 1456 var from; 1457 var to = toObject(target); 1458 var symbols; 1459 1460 for (var s = 1; s < arguments.length; s++) { 1461 from = Object(arguments[s]); 1462 1463 for (var key in from) { 1464 if (hasOwnProperty.call(from, key)) { 1465 to[key] = from[key]; 1466 } 1467 } 1468 1469 if (Object.getOwnPropertySymbols) { 1470 symbols = Object.getOwnPropertySymbols(from); 1471 for (var i = 0; i < symbols.length; i++) { 1472 if (propIsEnumerable.call(from, symbols[i])) { 1473 to[symbols[i]] = from[symbols[i]]; 1474 } 1475 } 1476 } 1477 } 1478 1479 return to; 1480 }; 1481 }); 1482 1483 var objectAssign = (index && typeof index === 'object' && 'default' in index ? index['default'] : index); 1484 1485 function _stripInsignificantZeros(str, decimal) { 1486 var parts = str.split(decimal); 1487 var integerPart = parts[0]; 1488 var decimalPart = parts[1].replace(/0+$/, ''); 1489 1490 if (decimalPart.length > 0) { 1491 return integerPart + decimal + decimalPart; 1492 } 1493 1494 return integerPart; 1495 } 1496 1497 /**
1498 * Format a number, with comma-separated thousands and custom precision/decimal places 1499 * Alias: `accounting.format()` 1500 * 1501 * Localise by overriding the precision and thousand / decimal separators 1502 * 1503 * ```js 1504 * accounting.formatNumber(5318008); // 5,318,008 1505 * accounting.formatNumber(9876543.21, { precision: 3, thousand: " " }); // 9 876 543.210 1506 * ``` 1507 * 1508 * @method formatNumber 1509 * @for accounting 1510 * @param {Number} number The number to be formatted. 1511 * @param {Object} [opts={}] Object containing all the options of the method. 1512 * @return {String} The given number properly formatted. 1513 */ 1514 function formatNumber(number) { 1515 var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 1516 1517 // Resursively format arrays: 1518 if (Array.isArray(number)) { 1519 return number.map(function (val) { 1520 return formatNumber(val, opts); 1521 }); 1522 } 1523 1524 // Build options object from second param (if object) or all params, extending defaults: 1525 opts = objectAssign({}, settings, opts); 1526 1527 // Do some calc: 1528 var negative = number < 0 ? '-' : ''; 1529 var base = parseInt(toFixed(Math.abs(number), opts.precision), 10) + ''; 1530 var mod = base.length > 3 ? base.length % 3 : 0; 1531 1532 // Format the number: 1533 var formatted = negative + (mod ? base.substr(0, mod) + opts.thousand : '') + base.substr(mod).replace(/(\d{3})(?=\d)/g, '$1' + opts.thousand) + (opts.precision > 0 ? opts.decimal + toFixed(Math.abs(number), opts.precision).split('.')[1] : ''); 1534 1535 return opts.stripZeros ? _stripInsignificantZeros(formatted, opts.decimal) : formatted; 1536 } 1537 1538 var index$1 = __commonjs(function (module) { 1539 'use strict'; 1540 1541 var strValue = String.prototype.valueOf; 1542 var tryStringObject = function tryStringObject(value) { 1543 try { 1544 strValue.call(value); 1545 return true; 1546 } catch (e) { 1547 return false; 1548 } 1549 }; 1550 var toStr = Object.prototype.toString; 1551 var strClass = '[object String]'; 1552 var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; 1553 1554 module.exports = function isString(value) { 1555 if (typeof value === 'string') { return true; } 1556 if (typeof value !== 'object') { return false; } 1557 return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; 1558 }; 1559 }); 1560 1561 var isString = (index$1 && typeof index$1 === 'object' && 'default' in index$1 ? index$1['default'] : index$1); 1562 1563 /** 1564 * Parses a format string or object and returns format obj for use in rendering 1565 * 1566 * `format` is either a string with the default (positive) format, or object 1567 * containing `pos` (required), `neg` and `zero` values 1568 * 1569 * Either string or format.pos must contain "%v" (value) to be valid 1570 * 1571 * @method _checkCurrencyFormat 1572 * @for accounting 1573 * @param {String} [format="%s%v"] String with the format to apply, where %s is the currency symbol and %v is the value. 1574 * @return {Object} object represnting format (with pos, neg and zero attributes) 1575 */ 1576 function _checkCurrencyFormat(format) { 1577 // Format should be a string, in which case `value` ('%v') must be present: 1578 if (isString(format) && format.match('%v')) { 1579 // Create and return positive, negative and zero formats: 1580 return { 1581 pos: format, 1582 neg: format.replace('-', '').replace('%v', '-%v'), 1583 zero: format 1584 }; 1585 } 1586 1587 // Otherwise, assume format was fine: 1588 return format; 1589 } 1590 1591 /** 1592 * Format a number into currency 1593 * 1594 * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format) 1595 * defaults: (0, '$', 2, ',', '.', '%s%v') 1596 * 1597 * Localise by overriding the symbol, precision, thousand / decimal separators and format 1598 * 1599 * ```js 1600 * // Default usage: 1601 * accounting.formatMoney(12345678); // $12,345,678.00 1602 * 1603 * // European formatting (custom symbol and separators), can also use options object as second parameter: 1604 * accounting.formatMoney(4999.99, { symbol: "€", precision: 2, thousand: ".", decimal: "," }); // €4.999,99 1605 * 1606 * // Negative values can be formatted nicely: 1607 * accounting.formatMoney(-500000, { symbol: "£ ", precision: 0 });
1607 // £ -500,000 1608 * 1609 * // Simple `format` string allows control of symbol position (%v = value, %s = symbol): 1610 * accounting.formatMoney(5318008, { symbol: "GBP", format: "%v %s" }); // 5,318,008.00 GBP 1611 * ``` 1612 * 1613 * @method formatMoney 1614 * @for accounting 1615 * @param {Number} number Number to be formatted. 1616 * @param {Object} [opts={}] Object containing all the options of the method. 1617 * @return {String} The given number properly formatted as money. 1618 */ 1619 function formatMoney(number) { 1620 var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 1621 1622 // Resursively format arrays: 1623 if (Array.isArray(number)) { 1624 return number.map(function (val) { 1625 return formatMoney(val, opts); 1626 }); 1627 } 1628 1629 // Build options object from second param (if object) or all params, extending defaults: 1630 opts = objectAssign({}, settings, opts); 1631 1632 // Check format (returns object with pos, neg and zero): 1633 var formats = _checkCurrencyFormat(opts.format); 1634 1635 // Choose which format to use for this value: 1636 var useFormat = undefined; 1637 1638 if (number > 0) { 1639 useFormat = formats.pos; 1640 } else if (number < 0) { 1641 useFormat = formats.neg; 1642 } else { 1643 useFormat = formats.zero; 1644 } 1645 1646 // Return with currency symbol added: 1647 return useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), opts)); 1648 } 1649 1650 /** 1651 * Format a list of numbers into an accounting column, padding with whitespace 1652 * to line up currency symbols, thousand separators and decimals places 1653 * 1654 * List should be an array of numbers 1655 * 1656 * Returns array of accouting-formatted number strings of same length 1657 * 1658 * NB: `white-space:pre` CSS rule is required on the list container to prevent 1659 * browsers from collapsing the whitespace in the output strings. 1660 * 1661 * ```js 1662 * accounting.formatColumn([123.5, 3456.49, 777888.99, 12345678, -5432], { symbol: "$ " }); 1663 * ``` 1664 * 1665 * @method formatColumn 1666 * @for accounting 1667 * @param {Array<Number>} list An array of numbers to format 1668 * @param {Object} [opts={}] Object containing all the options of the method. 1669 * @param {Object|String} [symbol="$"] String with the currency symbol. For conveniency if can be an object containing all the options of the method. 1670 * @param {Integer} [precision=2] Number of decimal digits 1671 * @param {String} [thousand=','] String with the thousands separator. 1672 * @param {String} [decimal="."] String with the decimal separator. 1673 * @param {String} [format="%s%v"] String with the format to apply, where %s is the currency symbol and %v is the value. 1674 * @return {Array<String>} array of accouting-formatted number strings of same length 1675 */ 1676 function formatColumn(list) { 1677 var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 1678 1679 if (!list) return []; 1680 1681 // Build options object from second param (if object) or all params, extending defaults: 1682 opts = objectAssign({}, settings, opts); 1683 1684 // Check format (returns object with pos, neg and zero), only need pos for now: 1685 var formats = _checkCurrencyFormat(opts.format); 1686 1687 // Whether to pad at start of string or after currency symbol: 1688 var padAfterSymbol = formats.pos.indexOf('%s') < formats.pos.indexOf('%v'); 1689 1690 // Store value for the length of the longest string in the column: 1691 var maxLength = 0; 1692 1693 // Format the list according to options, store the length of the longest string: 1694 var formatted = list.map(function (val) { 1695 if (Array.isArray(val)) { 1696 // Recursively format columns if list is a multi-dimensional array: 1697 return formatColumn(val, opts); 1698 } 1699 // Clean up the value 1700 val = unformat(val, opts.decimal); 1701 1702 // Choose which format to use for this value (pos, neg or zero): 1703 var useFormat = undefined; 1704 1705 if (val > 0) { 1706 useFormat = formats.pos; 1707 } else if (val < 0) { 1708 useFormat = formats.neg; 1709 } else { 1710 useFormat = formats.zero; 1711 } 1712 1713 // Format this value, push into formatted list and save the length: 1714 var fVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), opts)); 1715 1716 if (fVal.length > maxLength) { 1717 maxLength = fVal.length; 1718 } 1719 1720 return fVal; 1721 }); 1722 1723 // Pad each number in the list and send back the column of numbers: 1724 return formatted.map(function (val) { 1725 // Only if this is a string (not a nested array, which would have already been padded): 1726 if (isString(val) && val.length < maxLength) { 1727 // Depending on symbol position, pad after symbol or at index 0: 1728 return padAfterSymbol ? val.replace(opts.symbol, opts.symbol + new Array(maxLength - val.length + 1).join(' ')) : new Array(maxLength - val.length + 1).join(' ') + val; 1729 } 1730 return val; 1731 }); 1732 } 1733 1734 exports.settings = settings; 1735 exports.unformat = unformat; 1736 exports.toFixed = toFixed; 1737 exports.formatMoney = formatMoney; 1738 exports.formatNumber = formatNumber; 1739 exports.formatColumn = formatColumn; 1740 exports.format = formatMoney; 1741 exports.parse = unformat; 1742 1743})); 1744//# sourceMappingURL=accounting.umd.js.map 1745 1746/***/ }), 1747/* 9 */ 1748/***/ (function(module, exports, __webpack_require__) { 1749 1750__webpack_require__(10); 1751module.exports = __webpack_require__(39); 1752 1753 1754/***/ }), 1755/* 10 */ 1756/***/ (function(module, exports, __webpack_require__) { 1757 1758"use strict"; 1759 1760 1761var _jquery = __webpack_require__(0); 1762 1763var _jquery2 = _interopRequireDefault(_jquery); 1764 1765__webpack_require__(11); 1766 1767__webpack_require__(13); 1768 1769var _nav = __webpack_require__(14); 1770 1771var _nav2 = _interopRequireDefault(_nav); 1772 1773var _header = __webpack_require__(15); 1774 1775var _header2 = _interopRequireDefault(_header); 1776 1777var _feed = __webpack_require__(16); 1778 1779var _feed2 = _interopRequireDefault(_feed); 1780 1781var _audio = __webpack_require__(22); 1782 1783var _audio2 = _interopRequireDefault(_audio); 1784 1785var _team = __webpack_require__(23); 1786 1787var _team2 = _interopRequireDefault(_team); 1788 1789var _contact = __webpack_require__(25); 1790 1791var _contact2 = _interopRequireDefault(_contact); 1792 1793var _newsletter = __webpack_require__(27); 1794 1795var _newsletter2 = _interopRequireDefault(_newsletter); 1796 1797var _insights = __webpack_require__(28); 1798 1799var _insights2 = _interopRequireDefault(_insights); 1800 1801var _categoryNavigation = __webpack_require__(30); 1802 1803var _categoryNavigation2 = _interopRequireDefault(_categoryNavigation); 1804 1805__webpack_require__(31); 1806 1807var _tax = __webpack_require__(32); 1808 1809var _tax2 = _interopRequireDefault(_tax); 1810 1811var _escrow = __webpack_require__(36); 1812 1813var _escrow2 = _interopRequireDefault(_escrow); 1814 1815var _retirement = __webpack_require__(37); 1816 1817var _retirement2 = _interopRequireDefault(_retirement); 1818 1819function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1820 1821__webpack_require__(38); 1822 1823// Tools 1824 1825 1826window.gavin = window.gavin || {}; 1827window.gavin.stateAbbrevs = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'VI', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY']; 1828window.gavin.provinceAbbrevs = ['AB', 'BC', 'MB', 'NB', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', '
1828SK', 'YT', 'NL']; 1829 1830var initialize = function initialize() { 1831 (0, _nav2.default)(); 1832 (0, _header2.default)(); 1833 // initFeed(); 1834 (0, _audio2.default)(); 1835 (0, _team2.default)(); 1836 (0, _contact2.default)(); 1837 (0, _newsletter2.default)(); 1838 (0, _insights2.default)(); 1839 (0, _tax2.default)(); 1840 (0, _escrow2.default)(); 1841 (0, _retirement2.default)(); 1842 1843 // Prevent hover states on touch devices 1844 var touchsupport = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; 1845 if (!touchsupport) { 1846 // browser doesn't support touch 1847 document.documentElement.className += " no-touch"; 1848 } 1849}; 1850 1851(0, _jquery2.default)(document).ready(initialize); 1852 1853(0, _categoryNavigation2.default)(); 1854 1855/***/ }), 1856/* 11 */ 1857/***/ (function(module, exports, __webpack_require__) { 1858 1859"use strict"; 1860 1861 1862var _venobox = __webpack_require__(12); 1863 1864var _venobox2 = _interopRequireDefault(_venobox); 1865 1866function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1867 1868var test = new _venobox2.default({
1869 selector: '.js-video-popup' 1870}); 1871 1872/***/ }), 1873/* 12 */ 1874/***/ (function(module, exports, __webpack_require__) { 1875 1876!function(e,t){ tru
vendor: 17,060 bytes, lines 1876-1882
1876e?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VenoBox=t()}(this,function(){"use strict"; 1877/** 1878 * VenoBox 2.2.0 1879 * Copyright 2013-2024 Nicola Franchini 1880 * @license: https://github.com/nicolafranchini/VenoBox/blob/master/LICENSE 1881 */let e,t,o,n,s,i,a,l,r,c,d,v,u,b,p,f,m,g,y,x,h,L,w,k,S,C,A,E,q,P,M,T,j,H,O,z,I,V;const D='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false">',B="</svg>",N=D+'<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"/><path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"/>'+B,Q=D+'<path fill-rule="evenodd" d="M3.5 6a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 1 0-1h2A1.5 1.5 0 0 1 14 6.5v8a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 14.5v-8A1.5 1.5 0 0 1 3.5 5h2a.5.5 0 0 1 0 1h-2z"/><path fill-rule="evenodd" d="M7.646.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 1.707V10.5a.5.5 0 0 1-1 0V1.707L5.354 3.854a.5.5 0 1 1-.708-.708l3-3z"/>'+B,X=D+'<path fill-rule="evenodd" d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z"/><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>'+B;let Y,R=0,K=0,F=0,U=!1,W=!1,Z=!1,_=!1;const G={bounce:["sk-bounce","sk-bounce-dot",2],chase:["sk-chase","sk-chase-dot",6],circle:["sk-circle","sk-circle-dot",12],"circle-fade":["sk-circle-fade","sk-circle-fade-dot",12],flow:["sk-flow","sk-flow-dot",3],fold:["sk-fold","sk-fold-cube",4],grid:["sk-grid","sk-grid-cube",9],plane:["sk-plane","",0],pulse:["sk-pulse","",5],swing:["sk-swing","sk-swing-dot",2],wander:["sk-wander","sk-wander-cube",3],wave:["sk-wave","sk-wave-rect",5]},J={selector:".venobox",autoplay:!1,bgcolor:"#fff",border:"0",customClass:!1,infinigall:!1,maxWidth:"100%",navigation:!0,navKeyboard:!0,navTouch:!0,navSpeed:300,numeration:!1,overlayClose:!0,overlayColor:"rgba(23,23,23,0.95)",popup:!1,ratio:"16x9",share:!1,shareStyle:"pill",spinner:"bounce",spinColor:"#d2d2d2",titleattr:"title",titlePosition:"top",titleStyle:"bar",toolsBackground:"#1C1C1C",toolsColor:"#d2d2d2",onPreOpen:function(){return!0},onPostOpen:function(){},onPreClose:function(){return!0},onNavComplete:function(){},onContentLoaded:function(){},onInit:function(){},jQuerySelectors:!1,focusItem:!0,fitView:!1,initialScale:.9,transitionSpeed:200};function $(e,t,o){if("[object Object]"===Object.prototype.toString.call(e)){let n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(o,e[n],n,e)}else{let n=0,s=e.length;for(n=0;n<s;n++)t.call(o,e[n],n,e)}}function ee(e){return e}function te({timing:e,draw:t,duration:o}){let n=performance.now();requestAnimationFrame(function s(i){let a=(i-n)/o;a>1&&(a=1);let l=e(a);t(l),a<1&&requestAnimationFrame(s)})}function oe(e){if(!e)return!1;y=!0,l=e,L=!1,w=!1,S=e.getAttribute("data-maxwidth")||e.settings.maxWidth,C=e.getAttribute("data-overlay")||e.settings.overlayColor,A=e.getAttribute("data-ratio")||e.settings.ratio,E=e.hasAttribute("data-autoplay")||e.settings.autoplay,q=e.getAttribute("data-href")||e.getAttribute("href"),P=e.getAttribute("data-customclass")||e.settings.customClass,I=e.getAttribute(e.settings.titleattr)||"",O=e.getAttribute("data-border")||e.settings.border,M=e.hasAttribute("data-fitview")||e.settings.fitView}function ne(){return!(!l||!document.body.classList.contains("vbox-open"))&&((!l.settings.onPreClose||"function"!=typeof l.settings.onPreClose||!1!==l.settings.onPreClose(l,p,j,H))&&(document.body.removeEventListener("keydown",ae),document.body.classList.remove("vbox-open"),l.settings.focusItem&&l.focus(),void te({duration:200,timing:ee,draw:function(e){k.style.opacity=1-e,1===e&&k.remove()}})))}function se(){ge(j)}function ie(){ge(H)}function ae(e){if(27===e.keyCode&&ne(),9===e.keyCode){const t=k.querySelectorAll('a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])'),o=t[0],n=t[t.length-1];e.shiftKey?document.activeElement===o&&(n.focus(),e.preventDefault()):document.activeElement===n&&(o.focus(),e.preventDefault())}V||(37==e.keyCode&&!0===w&&ge(H),39==e.keyCode&&!0===L&&ge(j),V=setTimeout(()=>{V=null},100))}function le(){y=!1,a.style.opacity=0,a.innerHTML=x,_?(a.classList.add("vbox-grab"),a.addEventListener("touchstart",ve,!1),a.addEventListener("touchend",ue,!1),a.addEventListener("touchmove",be,!1),a.addEventListener("mousedown",ve,!1),a.addEventListener("mouseup",ue,!1),a.addEventListener("mouseout",ue,!1),a.addEventListener("mousemove",be,!1)):(a.classList.remove("vbox-grab"),a.removeEventListener("touchstart",ve,!1),a.removeEventListener("touchend",ue,!1),a.removeEventListener("touchmove",be,!1),a.removeEventListener("mousedown",ve,!1),a.removeEventListener("mouseup",ue,!1),a.removeEventListener("mouseout",ue,!1),a.removeEventListener("mousemove",be,!1));let e=a.querySelector(":first-child");e.classList.add("vbox-child"),e.style.backgroundColor=l.settings.bgcolor,e.style.transform="scale("+l.settings.initialScale+")",e.style.transition="transform "+l.settings.transitionSpeed+"ms";let t=a.querySelector(".vbox-child img");t&&t.addEventListener("dragstart",function(e){e.preventDefault()}),i.scrollTo(0,0),e.style.transform="scale(1)",k.style.setProperty("--vbox-padding",O),k.style.setProperty("--vbox-max-width",S),$(k.classList,function(e){"vbox-overlay"!==e&&k.classList.remove(e)}),P&&k.classList.add(P),M?a.classList.add("vbox-fit"):a.classList.remove("vbox-fit"),te({duration:l.settings.transitionSpeed,timing:ee,draw:function(e){a.style.opacity=e,1===e&&u.classList.add("vbox-hidden")}}),l.settings.onContentLoaded&&"function"==typeof l.settings.onContentLoaded&&l.settings.onContentLoaded(x)}function re(e){a.classList.contains("vbox-"+e)||le()}function ce(e,t,o){let n;a.classList.add("vbox-loading");let s=function(e){let t,o,n;if(o=e.match(/(https?:\/\/)?((www\.)?(youtube(-nocookie)?|youtube.googleapis)\.com.*(v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)|youtu\.be\/)([_0-9a-z-]+)/i),o&&o[7])t="youtube",n=o[7];else{let s=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/;o=e.match(s),o&&o[5]&&(t="vimeo",n=o[5])}return{type:t,id:n}}(e);if("vimeo"==s.type||"youtube"==s.type){let i;n=o?"?rel=0&autoplay=1":"?rel=0";let a=n+function(e){let t="",o=decodeURIComponent(e).split("?");if(void 0!==o[1]){let e,n,s=o[1].split("&");for(n=0;n<s.length;n++)e=s[n].split("="),t=t+"&"+e[0]+"="+e[1]}return encodeURI(t)}(e);"vimeo"==s.type?i="https://player.vimeo.com/video/":"youtube"==s.type&&(i="https://www.youtube-nocookie.com/embed/"),x='<div class="venoratio venoratio-'+t+'"><iframe webkitallowfullscreen mozallowfullscreen allowfullscreen allow="autoplay" frameborder="0" src="'+i+s.id+a+'"></iframe></div>'}else n=o?" autoplay":"",x='<div class="venoratio venoratio-'+t+'"><video src="'+e+'"'+n+" controls>Your browser does not support the video tag.</video></div>";a.classList.remove("vbox-loading"),re("animated")}function de(){var e;if(e=x,W.innerHTML=e,f=W.querySelectorAll("img"),f.length){let e=0;$(f,function(t){let o=t.src;const n=new Image;n.onload=function(){e++,e==f.length&&(a.classList.remove("vbox-loading"),re("animated"))},n.onerror=function(){e++,e==f.length&&(a.classList.remove("vbox-loading"),re("animated"))},n.src=o})}else a.classList.remove("vbox-loading"),re("animated")}function ve(e){if(!y){let t=.84*l.settings.navSpeed;a.style.transition="margin "+t+"ms ease-out, opacity "+t+"ms ease-out",R=K="touchstart"===e.type?e.touches[0].pageX:e.pageX,T=v="touchstart"===e.type?e.touches[0].pageY:e.pageY,U=!0}}function ue(e){if(U){U=!1;let e=l,t=!1;F=K-R,F<0&&L&&(e=j,t=!0),F>0&&w&&(e=H,t=!0),Math.abs(F)>=50&&t?ge(e):(a.style.marginLeft=0,a.style.opacity=1)}}function be(e){if(U&&!y){K="touchmove"===e.type?e.touches[0].pageX:e.pageX,v="touchmove"===e.type?e.touches[0].pageY:e.pageY,c=K-R,d=v-T;let t=Math.abs(c);if(t>Math.abs(d)&&t<=180){let o=1.5*(1-t/180);e.preventDefault(),a.style.marginLeft=c+"px",a.style.opacity=o}}}function pe(e){if(!e)return!1;z=e.dataset.gall,h=e.settings.numeration,m=e.settings.infinigall,o.innerHTML="";let s=e.dataset.vbtype;e.settings.share&&"iframe"!==s&&"inline"!==s&&"ajax"!==s&&function(e){if(navigator.canShare){const t={url:e};o.insertAdjacentHTML("beforeend",'<button type="button" class="vbox-link-btn vbox-share-mobile" aria-label="Condividi">'+Q+"</button>"),o.querySelector(".vbox-share-mobile").addEventListener("click",function(e){e.preventDefault(),navigator.share(t)})}o.insertAdjacentHTML("beforeend",'<a target="_blank" href="'+e+'" download aria-label="Download">'+N+"</a>"),o.insertAdjacentHTML("beforeend",'<div class="vbox-tooltip"><button type="button" class="vbox-link-btn vbox-share-copy" aria-label="Copia link"><span class="vbox-tooltip-text" id="myTooltip"></span>'+X+"</button></div>"),o.querySelector(".vbox-share-copy").addEventListener("click",function(t){t.preventDefault();let o=document.getElementById("myTooltip");navigator.clipboard.writeText(e).then(function(){o.innerHTML='<div class="vbox-tooltip-inner">Copied</div>'},function(){console.log("copy failed")})})}(e.href),g=document.querySelectorAll('.vbox-item[data-gall="'+z+'"]'),r=Array.prototype.indexOf.call(g,e),g.length<2&&(h=!1),g.length<3&&(m=!1),j=g[r+1],H=g[r-1],!j&&m&&(j=g[0]),!H&&m&&(H=g[g.length-1]),g.length>=1?(p=r+1,t.innerHTML=p+" / "+g.length):p=1,h?t.classList.remove("vbox-hidden"):t.classList.add("vbox-hidden"),""!==I?n.classList.remove("vbox-hidden"):n.classList.add("vbox-hidden"),n.innerHTML=I,w=!1,L=!1,(j||m)&&(L=!0),(r>0||m)&&(w=!0),_=(w||L)&&e.settings.navTouch;let i=k.querySelector(".vbox-next"),a=k.querySelector(".vbox-prev");w?a.classList.remove("vbox-hidden"):a.classList.add("vbox-hidden"),L?i.classList.remove("vbox-hidden"):i.classList.add("vbox-hidden"),e.settings.navigation||(i.classList.add("vbox-hidden"),a.classList.add("vbox-hidden"))}function fe(t){if(!t)return!1;e.style.backgroundColor=C,b.innerHTML=function(e){if(!e)return"Loading...";let t='<div class="sk-center '+e[0]+'">',o=0;for(o=0;o<e[2];o++)t+='<div class="'+e[1]+'"></div>';return t+="</div>",t}(G[t.settings.spinner]),k.style.setProperty("--sk-color",t.settings.spinColor),u.classList.remove("vbox-hidden"),o.classList.remove("vbox-top","vbox-bottom"),n.classList.remove("vbox-top","vbox-bottom"),"top"==t.settings.titlePosition?(n.classList.add("vbox-top"),o.classList.add("vbox-bottom")):(n.classList.add("vbox-bottom"),o.classList.add("vbox-top"));let s="bar"===t.settings.titleStyle?"100%":"auto",i="pill"===t.settings.titleStyle?"5em":"0",a="bar"===t.settings.shareStyle?"100%":"auto",l="pill"===t.settings.shareStyle?"5em":"0",r="transparent"===t.settings.titleStyle?"transparent":t.settings.toolsBackground,c="transparent"===t.settings.shareStyle?"transparent":t.settings.toolsBackground;k.style.setProperty("--vbox-title-width",s),k.style.setProperty("--vbox-title-radius",i),k.style.setProperty("--vbox-share-width",a),k.style.setProperty("--vbox-share-radius",l),k.style.setProperty("--vbox-tools-color",t.settings.toolsColor),k.style.setProperty("--vbox-title-background",r),k.style.setProperty("--vbox-share-background",c)}function me(){if(!l)return!1;switch(l.dataset.vbtype){case"iframe":e=q,t=A,a.classList.add("vbox-loading"),x='<div class="venoratio venoratio-'+t+'"><iframe src="'+e+'"></iframe></div>',a.classList.remove("vbox-loading"),re("animated");break;case"inline":!function(e){let t=document.querySelector(e);t&&(a.classList.add("vbox-loading"),x='<div class="vbox-inline">'+t.innerHTML+"</div>",a.classList.remove("vbox-loading"),re("animated"))}(q);break;case"ajax":!function(e){a.classList.add("vbox-loading");let t=new XMLHttpRequest;t.open("GET",e,!0),t.onload=function(){x='<div class="vbox-inline">'+t.response+"</div>",de()},t.onerror=function(){x='<div class="vbox-inline"></div>',a.classList.remove("vbox-loading"),re("animated")},t.send()}(q);break;case"video":ce(q,A,E);break;default:!function(e){Z.onload=function(){x='<div class="vbox-child"><img src="'+e+'" alt="'+(I||"Details")+'"></div>',a.classList.remove("vbox-loading"),re("animated")},Z.src=e}(q)}var e,t}function ge(e){if(!e||y||!document.body.classList.contains("vbox-open"))return!1;oe(e),fe(e);const t=.84*l.settings.navSpeed;a.style.transition="margin "+t+"ms ease-out, opacity "+t+"ms ease-out",e===H&&a.classList.add("swipe-right"),e===j&&a.classList.add("swipe-left"),u.classList.remove("vbox-hidden");const o=a.style.opacity;a.classList.add("vbox-animated","vbox-loading"),Y=a.cloneNode(!1),Y.classList.add("cloned"),Y.classList.remove("swipe-left","swipe-right"),Y.style.opacity=0,Y.style.marginLeft="0",Y.style.marginRight="0";const n=a;i.append(Y),a=Y,a.classList.remove("cloned"),pe(e),te({duration:l.settings.navSpeed,timing:ee,draw:function(e){n.style.opacity=o-e/o,1===e&&(n.remove(),a.classList.remove("vbox-animated"),re("loading"),y=!1,l.settings.onNavComplete&&"function"==typeof l.settings.onNavComplete&&l.settings.onNavComplete(l,p,j,H))}}),me()}function ye(r){return!(document.body.classList.contains("vbox-open")||!r)&&((!r.settings.onPreOpen||"function"!=typeof r.settings.onPreOpen||!1!==r.settings.onPreOpen(r))&&(oe(r),document.body.insertAdjacentHTML("beforeend",s),document.body.classList.add("vbox-open"),k=document.querySelector(".vbox-overlay"),e=k.querySelector(".vbox-backdrop"),i=k.querySelector(".vbox-container"),a=i.querySelector(".vbox-content"),t=k.querySelector(".vbox-num"),o=k.querySelector(".vbox-share"),n=k.querySelector(".vbox-title"),u=k.querySelector(".vbox-preloader"),b=u.querySelector(".vbox-preloader-inner"),k.style.opacity=0,fe(r),pe(r),a.classList.add("vbox-animated","vbox-loading"),te({duration:200,timing:ee,draw:function(e){if(k.style.opacity=e,1===e){a.classList.remove("vbox-animated"),y=!1,re("loading");const e=k.querySelector(".vbox-close");e&&(e.setAttribute("tabindex","0"),e.focus()),l.settings.onPostOpen&&"function"==typeof l.settings.onPostOpen&&l.settings.onPostOpen(l,p,j,H)}}}),me(),r.settings.navKeyboard&&(document.body.addEventListener("keydown",ae),document.body.addEventListener("keyup",()=>{V&&(clearTimeout(V),V=null)})),document.querySelector(".vbox-prev").addEventListener("click",function(){ge(H)}),document.querySelector(".vbox-next").addEventListener("click",function(){ge(j)}),void k.addEventListener("click",function(e){let t=document.querySelector(".vbox-close");t&&(t.contains(e.target)||t===e.target||l.settings.overlayClose&&(e.target.classList.contains("vbox-overlay")||e.target.classList.contains("vbox-content")||e.target.classList.contains("vbox-backdrop")||e.target.classList.contains("vbox-close")||e.target.classList.contains("vbox-preloader")||e.target.classList.contains("vbox-container")))&&ne()})))}const xe=function(e){const t={};let o=function(e,t){let o={};return $(e,function(t,n){o[n]=e[n]}),$(t,function(e,n){o[n]=t[n]}),o}(J,e||{});return t.close=ne,t.next=se,t.prev=ie,t.open=ye,t.settings=o,function(e,t){t.onInit&&"function"==typeof t.onInit&&t.onInit(e);let o=t.jQuerySelectors||document.querySelectorAll(t.selector);if(s='<div class="vbox-overlay"><div class="vbox-backdrop"></div><div class="vbox-preloader"><div class="vbox-preloader-inner"></div></div><div class="vbox-container"><div class="vbox-content"></div></div><div class="vbox-title"></div><div class="vbox-left-corner"><div class="vbox-num" aria-live="polite">0/0</div></div><button type="button" class="vbox-close" aria-label="Close"><svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" class="vbox-close-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z"/><path fill-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z"/></svg></button><button type="button" class="vbox-next" aria-label="Next"><span>Next</span></button><button type="button" class="vbox-prev" aria-label="Prev"><span>Prev</span></button><div class="vbox-share"></div></div>',W=W||document.createElement("div"),Z=Z||new Image,$(o,function(e){if(e instanceof Element){if(e.classList.contains("vbox-item"))return!0;e.settings=t,e.classList.add("vbox-item"),e.addEventListener("click",function(t){return t.preventDefault(),e.blur(),ye(e),!1})}}),t.popup){let e=document.querySelector(t.popup);e.settings=t,ye(e)}}(t,o),t};return"function"==typeof jQuery&&jQuery.fn.extend({venobox:function(e){const t=e||{};t.jQuerySelectors=this,new xe(t)}}),xe}); 1882//# sourceMappingURL=venobox.min.js.map
1883 1884 1885/***/ }), 1886/* 13 */ 1887/***/ (function(module, exports, __webpack_require__) { 1888 1889"use strict"; 1890 1891 1892var _jquery = __webpack_require__(0); 1893 1894var _jquery2 = _interopRequireDefault(_jquery); 1895 1896function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1897 1898/** 1899 * On check handler 1900 */ 1901function onCheckHandler(event) { 1902 event.preventDefault(); 1903 1904 var $jsTeam = (0, _jquery2.default)('.js-team'); 1905 1906 (0, _jquery2.default)(this).addClass('is-active'); 1907 (0, _jquery2.default)(this).parent().siblings().find('a').removeClass('is-active'); 1908 1909 _jquery2.default.ajax({ 1910 url: '?type=' + (0, _jquery2.default)(this).data('id'), 1911 type: "GET", 1912 success: function success(response) { 1913 var newJsTeam = (0, _jquery2.default)(response).find('.js-team').html(); 1914 1915 $jsTeam.html(newJsTeam); 1916 } 1917 }); 1918} 1919 1920/** 1921 * Events 1922 */ 1923 1924(0, _jquery2.default)('.js-member-type').on('click', onCheckHandler); 1925 1926/***/ }), 1927/* 14 */ 1928/***/ (function(module, exports, __webpack_require__) { 1929 1930"use strict"; 1931 1932 1933Object.defineProperty(exports, "__esModule", { 1934 value: true 1935}); 1936 1937var _jquery = __webpack_require__(0); 1938 1939var _jquery2 = _interopRequireDefault(_jquery); 1940 1941function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1942 1943var initialize = function initialize() { 1944 // Handle subnav items 1945 (0, _jquery2.default)('header .hamburger-container').click(function (e) { 1946 e.stopPropagation(); 1947 (0, _jquery2.default)('header').toggleClass('active'); 1948 }); 1949 1950 (0, _jquery2.default)('.main-container').click(function (e) { 1951 (0, _jquery2.default)('header').removeClass('active'); 1952 }); 1953 1954 // Handle members bar 1955 (0, _jquery2.default)('.members-bar a.label').click(function (e) { 1956 e.preventDefault(); 1957 (0, _jquery2.default)('.members-bar').toggleClass('active'); 1958 (0, _jquery2.default)('body').toggleClass('members-active'); 1959 }); 1960}; 1961 1962exports.default = initialize; 1963 1964/***/ }), 1965/* 15 */ 1966/***/ (function(module, exports, __webpack_require__) { 1967 1968"use strict"; 1969 1970 1971Object.defineProperty(exports, "__esModule", { 1972 value: true 1973}); 1974 1975var _headroomMin = __webpack_require__(7); 1976 1977var _headroomMin2 = _interopRequireDefault(_headroomMin); 1978 1979function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 1980 1981var initialize = function initialize() { 1982 var headroom = new _headroomMin2.default(document.querySelector('header'), { 1983 offset: 25 1984 }); 1985 headroom.init(); 1986}; 1987 1988exports.default = initialize; 1989 1990/***/ }), 1991/* 16 */ 1992/***/ (function(module, exports, __webpack_require__) { 1993 1994"use strict"; 1995 1996 1997Object.defineProperty(exports, "__esModule", { 1998 value: true 1999}); 2000 2001var _jquery = __webpack_require__(0); 2002 2003var _jquery2 = _interopRequireDefault(_jquery); 2004 2005var _flickityPkgdMin = __webpack_require__(17); 2006 2007var _flickityPkgdMin2 = _interopRequireDefault(_flickityPkgdMin); 2008 2009function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2010 2011window.jQuery = _jquery2.default; 2012 2013 2014// var xmlhttprequest = require('xmlhttprequest'); 2015// var xhr2 = require('xhr2'); 2016var codebird = window.Codebird = __webpack_require__(18); 2017var doT = window.doT = __webpack_require__(19); 2018var moment = window.moment = __webpack_require__(20); 2019// var moment = window.moment = require('moment'); 2020var socialFeed = __webpack_require__(21); 2021 2022// var _FEED_ITEMS_ = 4; 2023var _FEED_ITEMS_ = 10; 2024 2025var initialize = function initialize() { 2026 (0, _jquery2.default)('.feed-contents').socialfeed({ 2027 instagram: { 2028 accounts: ['&3598848654'], 2029 limit: _FEED_ITEMS_, 2030 access_token: '3598848654.1677ed0.64fbe71167f441e1aa067541c3f03725' 2031 }, 2032 twitter: { 2033 accounts: ['@GavinHockeyWlth'], 2034 limit: _FEED_ITEMS_, 2035 tweet_mode: 'extended', 2036 consumer_key: 'SNe6XLsxEYRguRWrelc4wElD5', 2037 consumer_secret: 'aEyyxE8PPFWYEDEUCHVCcWNjHsyT2XXHTEnVift6DmzTxDnaco', 2038 proxy: '/wp-content/themes/gavin/codebird-cors-proxy/' 2039 }, 2040 length: 400, 2041 date_format: "DD MMM YY", 2042 show_media: true, 2043 callback: function callback() { 2044 (0, _jquery2.default)('.feed-item:gt(3)').remove(); 2045 var elem = document.querySelector('.feed-contents'); 2046 var flkty = new _flickityPkgdMin2.default(elem, { 2047 // options 2048 cellAlign: 'left', 2049 watchCSS: true,
2050 prevNextButtons: false, 2051 pageDots: false 2052 }); 2053 }, 2054 template_html: '<div class="feed-item {{=it.social_network}}{{? !it.attachment }} no-thumb{{?}}" dt-create="{{=it.dt_create}}"> \ 2055 <a href="{{=it.link}}" target="_blank" class="meta"> \ 2056 <div class="top"> \ 2057 <span class="icon"></span> \ 2058 <span class="date">{{=it.date}}</span> \ 2059 </div> \ 2060 {{? it.social_network === "instagram" }} \ 2061 <div class="image-container" style="background-image: url({{=it.attachment}});"></div> \ 2062 {{?}} \ 2063 {{? it.social_network === "twitter" }} \ 2064 <p> \ 2065 {{=it.text}} \ 2066 </p> \ 2067 {{?}} \ 2068 </a> \ 2069 </div>' 2070 }); 2071}; 2072 2073exports.default = initialize; 2074 2075/***/ }), 2076/* 17 */ 2077/***/ (function(module, exports, __webpack_require__) { 2078 2079"use strict"; 2080var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __WEBPACK_LOCAL_MODULE_1__, __WEBPACK_LOCAL_MODULE_1__factory, __WEBPACK_LOCAL_MODULE_1__module;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_2__;var __WEBPACK_LOCAL_MODULE_3__, __WEBPACK_LOCAL_MODULE_3__factory, __WEBPACK_LOCAL_MODULE_3__module;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_4__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_5__;var __WEBPACK_LOCAL_MODULE_6__, __WEBPACK_LOCAL_MODULE_6__factory, __WEBPACK_LOCAL_MODULE_6__module;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_7__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_8__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_9__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_10__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_11__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_12__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_13__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_14__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_15__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_16__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_17__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_LOCAL_MODULE_18__;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_20__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2081 2082var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 2083 2084/*! 2085 * Flickity PACKAGED v2.1.1 2086 * Touch, responsive, flickable carousels 2087 * 2088 * Licensed GPLv3 for open source use 2089 * or Flickity Commercial License for commercial use 2090 * 2091 * https://flickity.metafizzy.co 2092 * Copyright 2015-2018 Metafizzy 2093 */ 2094 2095!function (t, e) { 2096 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (i) { 2097 return e(t, i); 2098 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 2099 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("jquery")) : t.jQueryBridget = e(t, t.jQuery); 2100}(window, function (t, e) { 2101 "use strict"; 2102 function i(i, o, a) { 2103 function l(t, e, n) { 2104 var s, 2105 o = "$()." + i + '("' + e + '")';return t.each(function (t, l) { 2106 var h = a.data(l, i);if (!h) return void r(i + " not initialized. Cannot call methods, i.e. " + o);var c = h[e];if (!c || "_" == e.charAt(0)) return void r(o + " is not a valid method");var d = c.apply(h, n);s = void 0 === s ? d : s; 2107 }), void 0 !== s ? s : t; 2108 }function h(t, e) { 2109 t.each(function (t, n) { 2110 var s = a.data(n, i);s ? (s.option(e), s._init()) : (s = new o(n, e), a.data(n, i, s)); 2111 }); 2112 }a = a || e || t.jQuery, a && (o.prototype.option || (o.prototype.option = function (t) { 2113 a.isPlainObject(t) && (this.options = a.extend(!0, this.options, t)); 2114 }), a.fn[i] = function (t) { 2115 if ("string" == typeof t) { 2116 var e = s.call(arguments, 1);return l(this, t, e); 2117 }return h(this, t), this; 2118 }
2118, n(a)); 2119 }function n(t) { 2120 !t || t && t.bridget || (t.bridget = i); 2121 }var s = Array.prototype.slice, 2122 o = t.console, 2123 r = "undefined" == typeof o ? function () {} : function (t) { 2124 o.error(t); 2125 };return n(e || t.jQuery), i; 2126}), function (t, e) { 2127 true ? !(__WEBPACK_LOCAL_MODULE_1__factory = (e), (__WEBPACK_LOCAL_MODULE_1__module = { id: "ev-emitter/ev-emitter", exports: {}, loaded: false }), __WEBPACK_LOCAL_MODULE_1__ = (typeof __WEBPACK_LOCAL_MODULE_1__factory === 'function' ? (__WEBPACK_LOCAL_MODULE_1__factory.call(__WEBPACK_LOCAL_MODULE_1__module.exports, __webpack_require__, __WEBPACK_LOCAL_MODULE_1__module.exports, __WEBPACK_LOCAL_MODULE_1__module)) : __WEBPACK_LOCAL_MODULE_1__factory), (__WEBPACK_LOCAL_MODULE_1__module.loaded = true), __WEBPACK_LOCAL_MODULE_1__ === undefined && (__WEBPACK_LOCAL_MODULE_1__ = __WEBPACK_LOCAL_MODULE_1__module.exports)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e() : t.EvEmitter = e(); 2128}("undefined" != typeof window ? window : undefined, function () { 2129 function t() {}var e = t.prototype;return e.on = function (t, e) { 2130 if (t && e) { 2131 var i = this._events = this._events || {}, 2132 n = i[t] = i[t] || [];return n.indexOf(e) == -1 && n.push(e), this; 2133 } 2134 }, e.once = function (t, e) { 2135 if (t && e) { 2136 this.on(t, e);var i = this._onceEvents = this._onceEvents || {}, 2137 n = i[t] = i[t] || {};return n[e] = !0, this; 2138 } 2139 }, e.off = function (t, e) { 2140 var i = this._events && this._events[t];if (i && i.length) { 2141 var n = i.indexOf(e);return n != -1 && i.splice(n, 1), this; 2142 } 2143 }, e.emitEvent = function (t, e) { 2144 var i = this._events && this._events[t];if (i && i.length) { 2145 i = i.slice(0), e = e || [];for (var n = this._onceEvents && this._onceEvents[t], s = 0; s < i.length; s++) { 2146 var o = i[s], 2147 r = n && n[o];r && (this.off(t, o), delete n[o]), o.apply(this, e); 2148 }return this; 2149 } 2150 }, e.allOff = function () { 2151 delete this._events, delete this._onceEvents; 2152 }, t; 2153}), function (t, e) { 2154 "use strict"; 2155 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_LOCAL_MODULE_2__ = ((function () { 2156 return e(); 2157 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e() : t.getSize = e(); 2158}(window, function () { 2159 "use strict"; 2160 function t(t) { 2161 var e = parseFloat(t), 2162 i = t.indexOf("%") == -1 && !isNaN(e);return i && e; 2163 }function e() {}function i() { 2164 for (var t = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, e = 0; e < h; e++) { 2165 var i = l[e];t[i] = 0; 2166 }return t; 2167 }function n(t) { 2168 var e = getComputedStyle(t);return e || a("Style returned " + e + ". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"), e; 2169 }function s() { 2170 if (!c) { 2171 c = !0;var e = document.createElement("div");e.style.width = "200px", e.style.padding = "1px 2px 3px 4px", e.style.borderStyle = "solid", e.style.borderWidth = "1px 2px 3px 4px", e.style.boxSizing = "border-box";var i = document.body || document.documentElement;i.appendChild(e);var s = n(e);o.isBoxSizeOuter = r = 200 == t(s.width), i.removeChild(e); 2172 } 2173 }function o(e) { 2174 if (s(), "string" == typeof e && (e = document.querySelector(e)), e && "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) && e.nodeType) { 2175 var o = n(e);if ("none" == o.display) return i();var a = {};a.width = e.offsetWidth, a.height = e.offsetHeight;for (var c = a.isBorderBox = "border-box" == o.boxSizing, d = 0; d < h; d++) { 2176 var u = l[d], 2177 f = o[u], 2178 p = parseFloat(f);a[u] = isNaN(p) ? 0 : p; 2179 }var g = a.paddingLeft + a.paddingRight, 2180 v = a.paddingTop + a.paddingBottom, 2181 m = a.marginLeft + a.marginRight, 2182 y = a.marginTop + a.marginBottom, 2183 b = a.borderLeftWidth + a.borderRightWidth, 2184 E = a.borderTopWidth + a.borderBottomWidth, 2185 S = c && r, 2186 C = t(o.width);C !== !1 && (a.width = C + (S ? 0 : g + b));var x = t(o.height);return x !== !1 && (a.height = x + (S ? 0 : v + E)), a.innerWidth = a.width - (g + b), a.innerHeight = a.height - (v + E), a.outerWidth = a.width + m, a.outerHeight = a.height + y, a; 2187 } 2188 }var r, 2189 a = "undefined" == typeof console ? e : function (t) { 2190 console.error(t); 2191 }, 2192 l = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"], 2193 h = l.length, 2194 c = !1;return o; 2195}), function (t, e) { 2196 "use strict"; 2197 true ? !(__WEBPACK_LOCAL_MODULE_3__factory = (e), (__WEBPACK_LOCAL_MODULE_3__module = { id: "desandro-matches-selector/matches-selector", exports: {}, loaded: false }), __WEBPACK_LOCAL_MODULE_3__ = (typeof __WEBPACK_LOCAL_MODULE_3__factory === 'function' ? (__WEBPACK_LOCAL_MODULE_3__factory.call(__WEBPACK_LOCAL_MODULE_3__module.exports, __webpack_require__, __WEBPACK_LOCAL_MODULE_3__module.exports, __WEBPACK_LOCAL_MODULE_3__module)) : __WEBPACK_LOCAL_MODULE_3__factory), (__WEBPACK_LOCAL_MODULE_3__module.loaded = true), __WEBPACK_LOCAL_MODULE_3__ === undefined && (__WEBPACK_LOCAL_MODULE_3__ = __WEBPACK_LOCAL_MODULE_3__module.exports)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e() : t.matchesSelector = e(); 2198}(window, function () { 2199 "use strict"; 2200 var t = function () { 2201 var t = window.Element.prototype;if (t.matches) return "matches";if (t.matchesSelector) return "matchesSelector";for (var e = ["webkit", "moz", "ms", "o"], i = 0; i < e.length; i++) { 2202 var n = e[i], 2203 s = n + "MatchesSelector";if (t[s]) return s; 2204 } 2205 }();return function (e, i) { 2206 return e[t](i); 2207 }; 2208}), function (t, e) { 2209 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_3__], __WEBPACK_LOCAL_MODULE_4__ = ((function (i) { 2210 return e(t, i); 2211 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("desandro-matches-selector")) : t.fizzyUIUtils = e(t, t.matchesSelector); 2212}(window, function (t, e) { 2213 var i = {};i.extend = function (t, e) { 2214 for (var i in e) { 2215 t[i] = e[i]; 2216 }return t; 2217 }, i.modulo = function (t, e) { 2218 return (t % e + e) % e; 2219 };var n = Array.prototype.slice;i.makeArray = function (t) { 2220 if (Array.isArray(t)) return t;if (null === t || void 0 === t) return [];var e = "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && "number" == typeof t.length;return e ? n.call(t) : [t]; 2221 }, i.removeFrom = function (t, e) { 2222 var i = t.indexOf(e);i != -1 && t.splice(i, 1); 2223 }, i.getParent = function (t, i) { 2224 for (; t.parentNode && t != document.body;) { 2225 if (t = t.parentNode, e(t, i)) return t; 2226 } 2227 }, i.getQueryElement = function (t) { 2228 return "string" == typeof t ? document.querySelector(t) : t; 2229 }, i.handleEvent = function (t) { 2230 var e = "on" + t.type;this[e] && this[e](t); 2231 }, i.filterFindElements = function (t, n) { 2232 t = i.makeArray(t);var s = [];return t.forEach(function (t) { 2233 if (t instanceof HTMLElement) { 2234 if (!n) return void s.push(t);e(t, n) && s.push(t);for (var i = t.querySelectorAll(n), o = 0; o < i.length; o++) { 2235 s.push(i[o]); 2236 } 2237 } 2238 }), s; 2239 }, i.debounceMethod = function (t, e, i) { 2240 i = i || 100;var n = t.prototype[e], 2241 s = e + "Timeout";t.prototype[e] = function () { 2242 var t = this[s];clearTimeout(t);var e = arguments, 2243 o = this;this[s] = setTimeout(function () { 2244 n.apply(o, e), delete o[s]; 2245 }, i); 2246 }; 2247 }, i.docReady = function (t) { 2248 var e = document.readyState;"complete" == e || "interactive" == e ? setTimeout(t) : document.addEventListener("DOMContentLoaded", t); 2249 }, i.toDashed = function (t) { 2250 return t.replace(/(.)([A-Z])/g, function (t, e, i) { 2251 return e + "-" + i; 2252 }).toLowerCase(); 2253 };var s = t.console;return i.htmlInit = function (e, n) { 2254 i.docReady(function () { 2255 var o = i.toDashed(n), 2256 r = "data-" + o, 2257 a = document.querySelectorAll("[" + r + "]"), 2258 l = document.querySelectorAll(".js-" + o), 2259 h = i.makeArray(a).concat(i.makeArray(l)), 2260 c = r + "-options", 2261 d = t.jQuery;h.forEach(function (t) { 2262 var i, 2263 o = t.getAttribute(r) || t.getAttribute(c);try { 2264 i = o && JSON.parse(o); 2265 } catch (a) { 2266 return void (s && s.error("Error parsing " + r + " on " + t.className + ": " + a)); 2267 }var l = new e(t, i);d && d.data(t, n, l); 2268 }); 2269 }); 2270 }, i; 2271}), function (t, e) { 2272 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_2__], __WEBPACK_LOCAL_MODULE_5__ = ((function (i) { 2273 return e(t, i); 2274 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("get-size")) : (t.Flickity = t.Flickity || {}, t.Flickity.Cell = e(t, t.getSize)); 2275}(window, function (t, e) { 2276 function i(t, e) { 2277 this.element = t, this.parent = e, this.create(); 2278 }var n = i.prototype;return n.create = function () { 2279 this.element.style.position = "absolute", this.element.setAttribute("aria-selected", "false"), this.x = 0, this.shift = 0; 2280 }, n.destroy = function () { 2281 this.element.style.position = "";var t = this.parent.originSide;this.element.removeAttribute("aria-selected"), this.element.style[t] = ""; 2282 }, n.getSize = function () { 2283 this.size = e(this.element); 2284 }, n.setPosition = function (t) { 2285 this.x = t, this.updateTarget(), this.renderPosition(t); 2286 }, n.updateTarget = n.setDefaultTarget = function () { 2287 var t = "left" == this.parent.originSide ? "marginLeft" : "marginRight";this.target = this.x + this.size[t] + this.size.width * this.parent.cellAlign; 2288 }, n.renderPosition = function (t) { 2289 var e = this.parent.originSide;this.element.style[e] = this.parent.getPositionValue(t); 2290 }, n.wrapShift = function (t) { 2291 this.shift = t, this.renderPosition(this.x + this.parent.slideableWidth * t); 2292 }, n.remove = function () { 2293 this.element.parentNode.removeChild(this.element); 2294 }, i; 2295}), function (t, e) { 2296 true ? !(__WEBPACK_LOCAL_MODULE_6__factory = (e), (__WEBPACK_LOCAL_MODULE_6__module = { id: "flickity/js/slide", exports: {}, loaded: false }), __WEBPACK_LOCAL_MODULE_6__ = (typeof __WEBPACK_LOCAL_MODULE_6__factory === 'function' ? (__WEBPACK_LOCAL_MODULE_6__factory.call(__WEBPACK_LOCAL_MODULE_6__module.exports, __webpack_require__, __WEBPACK_LOCAL_MODULE_6__module.exports, __WEBPACK_LOCAL_MODULE_6__module)) : __WEBPACK_LOCAL_MODULE_6__factory), (__WEBPACK_LOCAL_MODULE_6__module.loaded = true), __WEBPACK_LOCAL_MODULE_6__ === undefined && (__WEBPACK_LOCAL_MODULE_6__ = __WEBPACK_LOCAL_MODULE_6__module.exports)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e() : (t.Flickity = t.Flickity || {}, t.Flickity.Slide = e()); 2297}(window, function () { 2298 "use strict"; 2299 function t(t) { 2300 this.parent = t, this.isOriginLeft = "left" == t.originSide, this.cells = [], this.outerWidth = 0, this.height = 0; 2301 }var e = t.prototype;return e.addCell = function (t) { 2302 if (this.cells.push(t), this.outerWidth += t.size.outerWidth, this.height = Math.max(t.size.outerHeight, this.height), 1 == this.cells.length) { 2303 this.x = t.x;var e = this.isOriginLeft ? "marginLeft" : "marginRight";this.firstMargin = t.size[e]; 2304 } 2305 }, e.updateTarget = function () { 2306 var t = this.isOriginLeft ? "marginRight" : "marginLeft", 2307 e = this.getLastCell(), 2308 i = e ? e.size[t] : 0, 2309 n = this.outerWidth - (this.firstMargin + i);this.target = this.x + this.firstMargin + n * this.parent.cellAlign; 2310 }, e.getLastCell = function () { 2311 return this.cells[this.cells.length - 1]; 2312 }, e.select = function () { 2313 this.changeSelected(!0); 2314 }, e.unselect = function () { 2315 this.changeSelected(!1); 2316 }, e.changeSelected = function (t) { 2317 var e = t ? "add" : "remove";
2317this.cells.forEach(function (i) { 2318 i.element.classList[e]("is-selected"), i.element.setAttribute("aria-selected", t.toString()); 2319 }); 2320 }, e.getCellElements = function () { 2321 return this.cells.map(function (t) { 2322 return t.element; 2323 }); 2324 }, t; 2325}), function (t, e) { 2326 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_4__], __WEBPACK_LOCAL_MODULE_7__ = ((function (i) { 2327 return e(t, i); 2328 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("fizzy-ui-utils")) : (t.Flickity = t.Flickity || {}, t.Flickity.animatePrototype = e(t, t.fizzyUIUtils)); 2329}(window, function (t, e) { 2330 var i = {};return i.startAnimation = function () { 2331 this.isAnimating || (this.isAnimating = !0, this.restingFrames = 0, this.animate()); 2332 }, i.animate = function () { 2333 this.applyDragForce(), this.applySelectedAttraction();var t = this.x;if (this.integratePhysics(), this.positionSlider(), this.settle(t), this.isAnimating) { 2334 var e = this;requestAnimationFrame(function () { 2335 e.animate(); 2336 }); 2337 } 2338 }, i.positionSlider = function () { 2339 var t = this.x;this.options.wrapAround && this.cells.length > 1 && (t = e.modulo(t, this.slideableWidth), t -= this.slideableWidth, this.shiftWrapCells(t)), t += this.cursorPosition, t = this.options.rightToLeft ? -t : t;var i = this.getPositionValue(t);this.slider.style.transform = this.isAnimating ? "translate3d(" + i + ",0,0)" : "translateX(" + i + ")";var n = this.slides[0];if (n) { 2340 var s = -this.x - n.target, 2341 o = s / this.slidesWidth;this.dispatchEvent("scroll", null, [o, s]); 2342 } 2343 }, i.positionSliderAtSelected = function () { 2344 this.cells.length && (this.x = -this.selectedSlide.target, this.velocity = 0, this.positionSlider()); 2345 }, i.getPositionValue = function (t) { 2346 return this.options.percentPosition ? .01 * Math.round(t / this.size.innerWidth * 1e4) + "%" : Math.round(t) + "px"; 2347 }, i.settle = function (t) { 2348 this.isPointerDown || Math.round(100 * this.x) != Math.round(100 * t) || this.restingFrames++, this.restingFrames > 2 && (this.isAnimating = !1, delete this.isFreeScrolling, this.positionSlider(), this.dispatchEvent("settle", null, [this.selectedIndex])); 2349 }, i.shiftWrapCells = function (t) { 2350 var e = this.cursorPosition + t;this._shiftCells(this.beforeShiftCells, e, -1);var i = this.size.innerWidth - (t + this.slideableWidth + this.cursorPosition);this._shiftCells(this.afterShiftCells, i, 1); 2351 }, i._shiftCells = function (t, e, i) { 2352 for (var n = 0; n < t.length; n++) { 2353 var s = t[n], 2354 o = e > 0 ? i : 0;s.wrapShift(o), e -= s.size.outerWidth; 2355 } 2356 }, i._unshiftCells = function (t) { 2357 if (t && t.length) for (var e = 0; e < t.length; e++) { 2358 t[e].wrapShift(0); 2359 } 2360 }, i.integratePhysics = function () { 2361 this.x += this.velocity, this.velocity *= this.getFrictionFactor(); 2362 }, i.applyForce = function (t) { 2363 this.velocity += t; 2364 }, i.getFrictionFactor = function () { 2365 return 1 - this.options[this.isFreeScrolling ? "freeScrollFriction" : "friction"]; 2366 }, i.getRestingPosition = function () { 2367 return this.x + this.velocity / (1 - this.getFrictionFactor()); 2368 }, i.applyDragForce = function () { 2369 if (this.isDraggable && this.isPointerDown) { 2370 var t = this.dragX - this.x, 2371 e = t - this.velocity;this.applyForce(e); 2372 } 2373 }, i.applySelectedAttraction = function () { 2374 var t = this.isDraggable && this.isPointerDown;if (!t && !this.isFreeScrolling && this.slides.length) { 2375 var e = this.selectedSlide.target * -1 - this.x, 2376 i = e * this.options.selectedAttraction;this.applyForce(i); 2377 } 2378 }, i; 2379}), function (t, e) { 2380 if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_1__, __WEBPACK_LOCAL_MODULE_2__, __WEBPACK_LOCAL_MODULE_4__, __WEBPACK_LOCAL_MODULE_5__, __WEBPACK_LOCAL_MODULE_6__, __WEBPACK_LOCAL_MODULE_7__], __WEBPACK_LOCAL_MODULE_8__ = ((function (i, n, s, o, r, a) { 2381 return e(t, i, n, s, o, r, a); 2382 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)));else if ("object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports) module.exports = e(t, require("ev-emitter"), require("get-size"), require("fizzy-ui-utils"), require("./cell"), require("./sli
2382de"), require("./animate"));else { 2383 var i = t.Flickity;t.Flickity = e(t, t.EvEmitter, t.getSize, t.fizzyUIUtils, i.Cell, i.Slide, i.animatePrototype); 2384 } 2385}(window, function (t, e, i, n, s, o, r) { 2386 function a(t, e) { 2387 for (t = n.makeArray(t); t.length;) { 2388 e.appendChild(t.shift()); 2389 } 2390 }function l(t, e) { 2391 var i = n.getQueryElement(t);if (!i) return void (d && d.error("Bad element for Flickity: " + (i || t)));if (this.element = i, this.element.flickityGUID) { 2392 var s = f[this.element.flickityGUID];return s.option(e), s; 2393 }h && (this.$element = h(this.element)), this.options = n.extend({}, this.constructor.defaults), this.option(e), this._create(); 2394 }var h = t.jQuery, 2395 c = t.getComputedStyle, 2396 d = t.console, 2397 u = 0, 2398 f = {};l.defaults = { accessibility: !0, cellAlign: "center", freeScrollFriction: .075, friction: .28, namespaceJQueryEvents: !0, percentPosition: !0, resize: !0, selectedAttraction: .025, setGallerySize: !0 }, l.createMethods = [];var p = l.prototype;n.extend(p, e.prototype), p._create = function () { 2399 var e = this.guid = ++u;this.element.flickityGUID = e, f[e] = this, this.selectedIndex = 0, this.restingFrames = 0, this.x = 0, this.velocity = 0, this.originSide = this.options.rightToLeft ? "right" : "left", this.viewport = document.createElement("div"), this.viewport.className = "flickity-viewport", this._createSlider(), (this.options.resize || this.options.watchCSS) && t.addEventListener("resize", this);for (var i in this.options.on) { 2400 var n = this.options.on[i];this.on(i, n); 2401 }l.createMethods.forEach(function (t) { 2402 this[t](); 2403 }, this), this.options.watchCSS ? this.watchCSS() : this.activate(); 2404 }, p.option = function (t) { 2405 n.extend(this.options, t); 2406 }, p.activate = function () { 2407 if (!this.isActive) { 2408 this.isActive = !0, this.element.classList.add("flickity-enabled"), this.options.rightToLeft && this.element.classList.add("flickity-rtl"), this.getSize();var t = this._filterFindCellElements(this.element.children);a(t, this.slider), this.viewport.appendChild(this.slider), this.element.appendChild(this.viewport), this.reloadCells(), this.options.accessibility && (this.element.tabIndex = 0, this.element.addEventListener("keydown", this)), this.emitEvent("activate");var e, 2409 i = this.options.initialIndex;e = this.isInitActivated ? this.selectedIndex : void 0 !== i && this.cells[i] ? i : 0, this.select(e, !1, !0), this.isInitActivated = !0, this.dispatchEvent("ready"); 2410 } 2411 }, p._createSlider = function () { 2412 var t = document.createElement("div");t.className = "flickity-slider", t.style[this.originSide] = 0, this.slider = t; 2413 }, p._filterFindCellElements = function (t) { 2414 return n.filterFindElements(t, this.options.cellSelector); 2415 }, p.reloadCells = function () { 2416 this.cells = this._makeCells(this.slider.children), this.positionCells(), this._getWrapShiftCells(), this.setGallerySize(); 2417 }, p._makeCells = function (t) { 2418 var e = this._filterFindCellElements(t), 2419 i = e.map(function (t) { 2420 return new s(t, this); 2421 }, this);return i; 2422 }, p.getLastCell = function () { 2423 return this.cells[this.cells.length - 1]; 2424 }, p.getLastSlide = function () { 2425 return this.slides[this.slides.length - 1]; 2426 }, p.positionCells = function () { 2427 this._sizeCells(this.cells), this._positionCells(0); 2428 }, p._positionCells = function (t) { 2429 t = t || 0, this.maxCellHeight = t ? this.maxCellHeight || 0 : 0;var e = 0;if (t > 0) { 2430 var i = this.cells[t - 1];e = i.x + i.size.outerWidth; 2431 }for (var n = this.cells.length, s = t; s < n; s++) { 2432 var o = this.cells[s];o.setPosition(e), e += o.size.outerWidth, this.maxCellHeight = Math.max(o.size.outerHeight, this.maxCellHeight); 2433 }this.slideableWidth = e, this.updateSlides(), this._containSlides(), this.slidesWidth = n ? this.getLastSlide().target - this.slides[0].target : 0; 2434 }, p._sizeCells = function (t) { 2435 t.forEach(function (t) { 2436 t.getSize(); 2437 }); 2438 }, p.updateSlides = function () { 2439 if (this.slides = [], this.cells.length) { 2440 var t = new o(this);this.slides.push(t);var e = "left" == this.originSide, 2441 i = e ? "marginRight" : "marginLeft", 2442 n = this._getCanCellFit();
2442this.cells.forEach(function (e, s) { 2443 if (!t.cells.length) return void t.addCell(e);var r = t.outerWidth - t.firstMargin + (e.size.outerWidth - e.size[i]);n.call(this, s, r) ? t.addCell(e) : (t.updateTarget(), t = new o(this), this.slides.push(t), t.addCell(e)); 2444 }, this), t.updateTarget(), this.updateSelectedSlide(); 2445 } 2446 }, p._getCanCellFit = function () { 2447 var t = this.options.groupCells;if (!t) return function () { 2448 return !1; 2449 };if ("number" == typeof t) { 2450 var e = parseInt(t, 10);return function (t) { 2451 return t % e !== 0; 2452 }; 2453 }var i = "string" == typeof t && t.match(/^(\d+)%$/), 2454 n = i ? parseInt(i[1], 10) / 100 : 1;return function (t, e) { 2455 return e <= (this.size.innerWidth + 1) * n; 2456 }; 2457 }, p._init = p.reposition = function () { 2458 this.positionCells(), this.positionSliderAtSelected(); 2459 }, p.getSize = function () { 2460 this.size = i(this.element), this.setCellAlign(), this.cursorPosition = this.size.innerWidth * this.cellAlign; 2461 };var g = { center: { left: .5, right: .5 }, left: { left: 0, right: 1 }, right: { right: 0, left: 1 } };return p.setCellAlign = function () { 2462 var t = g[this.options.cellAlign];this.cellAlign = t ? t[this.originSide] : this.options.cellAlign; 2463 }, p.setGallerySize = function () { 2464 if (this.options.setGallerySize) { 2465 var t = this.options.adaptiveHeight && this.selectedSlide ? this.selectedSlide.height : this.maxCellHeight;this.viewport.style.height = t + "px"; 2466 } 2467 }, p._getWrapShiftCells = function () { 2468 if (this.options.wrapAround) { 2469 this._unshiftCells(this.beforeShiftCells), this._unshiftCells(this.afterShiftCells);var t = this.cursorPosition, 2470 e = this.cells.length - 1;this.beforeShiftCells = this._getGapCells(t, e, -1), t = this.size.innerWidth - this.cursorPosition, this.afterShiftCells = this._getGapCells(t, 0, 1); 2471 } 2472 }, p._getGapCells = function (t, e, i) { 2473 for (var n = []; t > 0;) { 2474 var s = this.cells[e];if (!s) break;n.push(s), e += i, t -= s.size.outerWidth; 2475 }return n; 2476 }, p._containSlides = function () { 2477 if (this.options.contain && !this.options.wrapAround && this.cells.length) { 2478 var t = this.options.rightToLeft, 2479 e = t ? "marginRight" : "marginLeft", 2480 i = t ? "marginLeft" : "marginRight", 2481 n = this.slideableWidth - this.getLastCell().size[i], 2482 s = n < this.size.innerWidth, 2483 o = this.cursorPosition + this.cells[0].size[e], 2484 r = n - this.size.innerWidth * (1 - this.cellAlign);this.slides.forEach(function (t) { 2485 s ? t.target = n * this.cellAlign : (t.target = Math.max(t.target, o), t.target = Math.min(t.target, r)); 2486 }, this); 2487 } 2488 }, p.dispatchEvent = function (t, e, i) { 2489 var n = e ? [e].concat(i) : i;if (this.emitEvent(t, n), h && this.$element) { 2490 t += this.options.namespaceJQueryEvents ? ".flickity" : "";var s = t;if (e) { 2491 var o = h.Event(e);o.type = t, s = o; 2492 }this.$element.trigger(s, i); 2493 } 2494 }, p.select = function (t, e, i) { 2495 if (this.isActive && (t = parseInt(t, 10), this._wrapSelect(t), (this.options.wrapAround || e) && (t = n.modulo(t, this.slides.length)), this.slides[t])) { 2496 var s = this.selectedIndex;this.selectedIndex = t, this.updateSelectedSlide(), i ? this.positionSliderAtSelected() : this.startAnimation(), this.options.adaptiveHeight && this.setGallerySize(), this.dispatchEvent("select", null, [t]), t != s && this.dispatchEvent("change", null, [t]), this.dispatchEvent("cellSelect"); 2497 } 2498 }, p._wrapSelect = function (t) { 2499 var e = this.slides.length, 2500 i = this.options.wrapAround && e > 1;if (!i) return t;var s = n.modulo(t, e), 2501 o = Math.abs(s - this.selectedIndex), 2502 r = Math.abs(s + e - this.selectedIndex), 2503 a = Math.abs(s - e - this.selectedIndex);!this.isDragSelect && r < o ? t += e : !this.isDragSelect && a < o && (t -= e), t < 0 ? this.x -= this.slideableWidth : t >= e && (this.x += this.slideableWidth); 2504 }, p.previous = function (t, e) { 2505 this.select(this.selectedIndex - 1, t, e); 2506 }, p.next = function (t, e) { 2507 this.select(this.selectedIndex + 1, t, e); 2508 }, p.updateSelectedSlide = function () { 2509 var t = this.slides[this.selectedIndex];t && (this.unselectSelectedSlide(), this.selectedSlide = t, t.select(), this.selectedCells = t.cells, this.selectedElements = t.getCellElements(), this.selectedCell = t.cells[0], this.selectedElement = this.selectedElements[0]); 2510 }, p.unselectSelectedSlide = function () { 2511 this.selectedSlide && this.selectedSlide.unselect(); 2512 }, p.selectCell = function (t, e, i) { 2513 var n = this.queryCell(t);if (n) { 2514 var s = this.getCellSlideIndex(n);this.select(s, e, i); 2515 } 2516 }, p.getCellSlideIndex = function (t) { 2517 for (var e = 0; e < this.slides.length; e++) { 2518 var i = this.slides[e], 2519 n = i.cells.indexOf(t);if (n != -1) return e; 2520 } 2521 }, p.getCell = function (t) { 2522 for (var e = 0; e < this.cells.length; e++) { 2523 var i = this.cells[e];if (i.element == t) return i; 2524 } 2525 }, p.getCells = function (t) { 2526 t = n.makeArray(t);var e = [];return t.forEach(function (t) { 2527 var i = this.getCell(t);i && e.push(i); 2528 }, this), e; 2529 }, p.getCellElements = function () { 2530 return this.cells.map(function (t) { 2531 return t.element; 2532 }); 2533 }, p.getParentCell = function (t) { 2534 var e = this.getCell(t);return e ? e : (t = n.getParent(t, ".flickity-slider > *"), this.getCell(t)); 2535 }, p.getAdjacentCellElements = function (t, e) { 2536 if (!t) return this.selectedSlide.getCellElements();e = void 0 === e ? this.selectedIndex : e;var i = this.slides.length;if (1 + 2 * t >= i) return this.getCellElements();for (var s = [], o = e - t; o <= e + t; o++) { 2537 var r = this.options.wrapAround ? n.modulo(o, i) : o, 2538 a = this.slides[r];a && (s = s.concat(a.getCellElements())); 2539 }return s; 2540 }, p.queryCell = function (t) { 2541 return "number" == typeof t ? this.cells[t] : ("string" == typeof t && (t = this.element.querySelector(t)), this.getCell(t)); 2542 }, p.uiChange = function () { 2543 this.emitEvent("uiChange"); 2544 }, p.childUIPointerDown = function (t) { 2545 this.emitEvent("childUIPointerDown", [t]); 2546 }, p.onresize = function () { 2547 this.watchCSS(), this.resize(); 2548 }, n.debounceMethod(l, "onresize", 150), p.resize = function () { 2549 if (this.isActive) {
2550 this.getSize(), this.options.wrapAround && (this.x = n.modulo(this.x, this.slideableWidth)), this.positionCells(), this._getWrapShiftCells(), this.setGallerySize(), this.emitEvent("resize");var t = this.selectedElements && this.selectedElements[0];this.selectCell(t, !1, !0); 2551 } 2552 }, p.watchCSS = function () { 2553 var t = this.options.watchCSS;if (t) { 2554 var e = c(this.element, ":after").content;e.indexOf("flickity") != -1 ? this.activate() : this.deactivate(); 2555 } 2556 }, p.onkeydown = function (t) { 2557 var e = document.activeElement && document.activeElement != this.element;if (this.options.accessibility && !e) { 2558 var i = l.keyboardHandlers[t.keyCode];i && i.call(this); 2559 } 2560 }, l.keyboardHandlers = { 37: function _() { 2561 var t = this.options.rightToLeft ? "next" : "previous";this.uiChange(), this[t](); 2562 }, 39: function _() { 2563 var t = this.options.rightToLeft ? "previous" : "next";this.uiChange(), this[t](); 2564 } }, p.focus = function () { 2565 var e = t.pageYOffset;this.element.focus(), t.pageYOffset != e && t.scrollTo(t.pageXOffset, e); 2566 }, p.deactivate = function () { 2567 this.isActive && (this.element.classList.remove("flickity-enabled"), this.element.classList.remove("flickity-rtl"), this.unselectSelectedSlide(), this.cells.forEach(function (t) { 2568 t.destroy(); 2569 }), this.element.removeChild(this.viewport), a(this.slider.children, this.element), this.options.accessibility && (this.element.removeAttribute("tabIndex"), this.element.removeEventListener("keydown", this)), this.isActive = !1, this.emitEvent("deactivate")); 2570 }, p.destroy = function () { 2571 this.deactivate(), t.removeEventListener("resize", this), this.emitEvent("destroy"), h && this.$element && h.removeData(this.element, "flickity"), delete this.element.flickityGUID, delete f[this.guid]; 2572 }, n.extend(p, r), l.data = function (t) { 2573 t = n.getQueryElement(t);var e = t && t.flickityGUID;return e && f[e]; 2574 }, n.htmlInit(l, "flickity"), h && h.bridget && h.bridget("flickity", l), l.setJQuery = function (t) { 2575 h = t; 2576 }, l.Cell = s, l; 2577}), function (t, e) { 2578 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_1__], __WEBPACK_LOCAL_MODULE_9__ = ((function (i) { 2579 return e(t, i); 2580 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("ev-emitter")) : t.Unipointer = e(t, t.EvEmitter); 2581}(window, function (t, e) { 2582 function i() {}function n() {}var s = n.prototype = Object.create(e.prototype);s.bindStartEvent = function (t) { 2583 this._bindStartEvent(t, !0); 2584 }, s.unbindStartEvent = function (t) { 2585 this._bindStartEvent(t, !1); 2586 }, s._bindStartEvent = function (e, i) { 2587 i = void 0 === i || i;var n = i ? "addEventListener" : "removeEventListener", 2588 s = "mousedown";t.PointerEvent ? s = "pointerdown" : "ontouchstart" in t && (s = "touchstart"), e[n](s, this); 2589 }, s.handleEvent = function (t) { 2590 var e = "on" + t.type;this[e] && this[e](t); 2591 }, s.getTouch = function (t) { 2592 for (var e = 0; e < t.length; e++) { 2593 var i = t[e];if (i.identifier == this.pointerIdentifier) return i; 2594 } 2595 }, s.onmousedown = function (t) { 2596 var e = t.button;e && 0 !== e && 1 !== e || this._pointerDown(t, t); 2597 }, s.ontouchstart = function (t) { 2598 this._pointerDown(t, t.changedTouches[0]); 2599 }, s.onpointerdown = function (t) { 2600 this._pointerDown(t, t); 2601 }, s._pointerDown = function (t, e) { 2602 t.button || this.isPointerDown || (this.isPointerDown = !0, this.pointerIdentifier = void 0 !== e.pointerId ? e.pointerId : e.identifier, this.pointerDown(t, e)); 2603 }, s.pointerDown = function (t, e) { 2604 this._bindPostStartEvents(t), this.emitEvent("pointerDown", [t, e]); 2605 };var o = { mousedown: ["mousemove", "mouseup"], touchstart: ["touchmove", "touchend", "touchcancel"], pointerdown: ["pointermove", "pointerup", "pointercancel"] };return s._bindPostStartEvents = function (e) { 2606 if (e) { 2607 var i = o[e.type];i.forEach(function (e) { 2608 t.addEventListener(e, this); 2609 }, this), this._boundPointerEvents = i; 2610 } 2611 }, s._unbindPostStartEvents = function () { 2612 this._boundPointerEvents && (this._boundPointerEvents.forEac
2612h(function (e) { 2613 t.removeEventListener(e, this); 2614 }, this), delete this._boundPointerEvents); 2615 }, s.onmousemove = function (t) { 2616 this._pointerMove(t, t); 2617 }, s.onpointermove = function (t) { 2618 t.pointerId == this.pointerIdentifier && this._pointerMove(t, t); 2619 }, s.ontouchmove = function (t) { 2620 var e = this.getTouch(t.changedTouches);e && this._pointerMove(t, e); 2621 }, s._pointerMove = function (t, e) { 2622 this.pointerMove(t, e); 2623 }, s.pointerMove = function (t, e) { 2624 this.emitEvent("pointerMove", [t, e]); 2625 }, s.onmouseup = function (t) { 2626 this._pointerUp(t, t); 2627 }, s.onpointerup = function (t) { 2628 t.pointerId == this.pointerIdentifier && this._pointerUp(t, t); 2629 }, s.ontouchend = function (t) { 2630 var e = this.getTouch(t.changedTouches);e && this._pointerUp(t, e); 2631 }, s._pointerUp = function (t, e) { 2632 this._pointerDone(), this.pointerUp(t, e); 2633 }, s.pointerUp = function (t, e) { 2634 this.emitEvent("pointerUp", [t, e]); 2635 }, s._pointerDone = function () { 2636 this._pointerReset(), this._unbindPostStartEvents(), this.pointerDone(); 2637 }, s._pointerReset = function () { 2638 this.isPointerDown = !1, delete this.pointerIdentifier; 2639 }, s.pointerDone = i, s.onpointercancel = function (t) { 2640 t.pointerId == this.pointerIdentifier && this._pointerCancel(t, t); 2641 }, s.ontouchcancel = function (t) { 2642 var e = this.getTouch(t.changedTouches);e && this._pointerCancel(t, e); 2643 }, s._pointerCancel = function (t, e) { 2644 this._pointerDone(), this.pointerCancel(t, e); 2645 }, s.pointerCancel = function (t, e) { 2646 this.emitEvent("pointerCancel", [t, e]); 2647 }, n.getPointerPoint = function (t) { 2648 return { x: t.pageX, y: t.pageY }; 2649 }, n; 2650}), function (t, e) { 2651 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_9__], __WEBPACK_LOCAL_MODULE_10__ = ((function (i) { 2652 return e(t, i); 2653 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("unipointer")) : t.Unidragger = e(t, t.Unipointer); 2654}(window, function (t, e) { 2655 function i() {}var n = i.prototype = Object.create(e.prototype);n.bindHandles = function () { 2656 this._bindHandles(!0); 2657 }, n.unbindHandles = function () { 2658 this._bindHandles(!1); 2659 }, n._bindHandles = function (e) { 2660 e = void 0 === e || e;for (var i = e ? "addEventListener" : "removeEventListener", n = e ? this._touchActionValue : "", s = 0; s < this.handles.length; s++) { 2661 var o = this.handles[s];this._bindStartEvent(o, e), o[i]("click", this), t.PointerEvent && (o.style.touchAction = n); 2662 } 2663 }, n._touchActionValue = "none", n.pointerDown = function (t, e) { 2664 var i = this.okayPointerDown(t);i && (this.pointerDownPointer = e, t.preventDefault(), this.pointerDownBlur(), this._bindPostStartEvents(t), this.emitEvent("pointerDown", [t, e])); 2665 };var s = { TEXTAREA: !0, INPUT: !0, SELECT: !0, OPTION: !0 }, 2666 o = { radio: !0, checkbox: !0, button: !0, submit: !0, image: !0, file: !0 };return n.okayPointerDown = function (t) { 2667 var e = s[t.target.nodeName], 2668 i = o[t.target.type], 2669 n = !e || i;return n || this._pointerReset(), n; 2670 }, n.pointerDownBlur = function () { 2671 var t = document.activeElement, 2672 e = t && t.blur && t != document.body;e && t.blur(); 2673 }, n.pointerMove = function (t, e) { 2674 var i = this._dragPointerMove(t, e);this.emitEvent("pointerMove", [t, e, i]), this._dragMove(t, e, i); 2675 }, n._dragPointerMove = function (t, e) { 2676 var i = { x: e.pageX - this.pointerDownPointer.pageX, y: e.pageY - this.pointerDownPointer.pageY };return !this.isDragging && this.hasDragStarted(i) && this._dragStart(t, e), i; 2677 }, n.hasDragStarted = function (t) { 2678 return Math.abs(t.x) > 3 || Math.abs(t.y) > 3; 2679 }, n.pointerUp = function (t, e) { 2680 this.emitEvent("pointerUp", [t, e]), this._dragPointerUp(t, e); 2681 }, n._dragPointerUp = function (t, e) { 2682 this.isDragging ? this._dragEnd(t, e) : this._staticClick(t, e); 2683 }, n._dragStart = function (t, e) {
2684 this.isDragging = !0, this.isPreventingClicks = !0, this.dragStart(t, e); 2685 }, n.dragStart = function (t, e) { 2686 this.emitEvent("dragStart", [t, e]); 2687 }, n._dragMove = function (t, e, i) { 2688 this.isDragging && this.dragMove(t, e, i); 2689 }, n.dragMove = function (t, e, i) { 2690 t.preventDefault(), this.emitEvent("dragMove", [t, e, i]); 2691 }, n._dragEnd = function (t, e) { 2692 this.isDragging = !1, setTimeout(function () { 2693 delete this.isPreventingClicks; 2694 }.bind(this)), this.dragEnd(t, e); 2695 }, n.dragEnd = function (t, e) { 2696 this.emitEvent("dragEnd", [t, e]); 2697 }, n.onclick = function (t) { 2698 this.isPreventingClicks && t.preventDefault(); 2699 }, n._staticClick = function (t, e) { 2700 this.isIgnoringMouseUp && "mouseup" == t.type || (this.staticClick(t, e), "mouseup" != t.type && (this.isIgnoringMouseUp = !0, setTimeout(function () { 2701 delete this.isIgnoringMouseUp; 2702 }.bind(this), 400))); 2703 }, n.staticClick = function (t, e) { 2704 this.emitEvent("staticClick", [t, e]); 2705 }, i.getPointerPoint = e.getPointerPoint, i; 2706}), function (t, e) { 2707 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_8__, __WEBPACK_LOCAL_MODULE_10__, __WEBPACK_LOCAL_MODULE_4__], __WEBPACK_LOCAL_MODULE_11__ = ((function (i, n, s) { 2708 return e(t, i, n, s); 2709 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("./flickity"), require("unidragger"), require("fizzy-ui-utils")) : t.Flickity = e(t, t.Flickity, t.Unidragger, t.fizzyUIUtils); 2710}(window, function (t, e, i, n) { 2711 function s() { 2712 return { x: t.pageXOffset, y: t.pageYOffset }; 2713 }n.extend(e.defaults, { draggable: ">1", dragThreshold: 3 }), e.createMethods.push("_createDrag");var o = e.prototype;n.extend(o, i.prototype), o._touchActionValue = "pan-y";var r = "createTouch" in document, 2714 a = !1;o._createDrag = function () { 2715 this.on("activate", this.onActivateDrag), this.on("uiChange", this._uiChangeDrag), this.on("childUIPointerDown", this._childUIPointerDownDrag), this.on("deactivate", this.unbindDrag), this.on("cellChange", this.updateDraggable), r && !a && (t.addEventListener("touchmove", function () {}), a = !0); 2716 }, o.onActivateDrag = function () { 2717 this.handles = [this.viewport], this.bindHandles(), this.updateDraggable(); 2718 }, o.onDeactivateDrag = function () { 2719 this.unbindHandles(), this.element.classList.remove("is-draggable"); 2720 }, o.updateDraggable = function () { 2721 ">1" == this.options.draggable ? this.isDraggable = this.slides.length > 1 : this.isDraggable = this.options.draggable, this.isDraggable ? this.element.classList.add("is-draggable") : this.element.classList.remove("is-draggable"); 2722 }, o.bindDrag = function () { 2723 this.options.draggable = !0, this.updateDraggable(); 2724 }, o.unbindDrag = function () { 2725 this.options.draggable = !1, this.updateDraggable(); 2726 }, o._uiChangeDrag = function () { 2727 delete this.isFreeScrolling; 2728 }, o._childUIPointerDownDrag = function (t) { 2729 t.preventDefault(), this.pointerDownFocus(t); 2730 }, o.pointerDown = function (e, i) { 2731 if (!this.isDraggable) return void this._pointerDownDefault(e, i);var n = this.okayPointerDown(e);n && (this._pointerDownPreventDefault(e), this.pointerDownFocus(e), document.activeElement != this.element && this.pointerDownBlur(), this.dragX = this.x, this.viewport.classList.add("is-pointer-down"), this.pointerDownScroll = s(), t.addEventListener("scroll", this), this._pointerDownDefault(e, i)); 2732 }, o._pointerDownDefault = function (t, e) { 2733 this.pointerDownPointer = e, this._bindPostStartEvents(t), this.dispatchEvent("pointerDown", t, [e]); 2734 };var l = { INPUT: !0, TEXTAREA: !0, SELECT: !0 };return o.pointerDownFocus = function (t) { 2735 var e = l[t.target.nodeName];e || this.focus(); 2736 }, o._pointerDownPreventDefault = function (t) { 2737 var e = "touchstart" == t.type, 2738 i = "touch" == t.pointerType, 2739 n = l[t.target.nodeName];e || i || n || t.preventDefault(); 2740 }, o.hasDragStarted = function (t) { 2741 return Math.abs(t.x) > this.options.dragThreshold; 2742 }, o.pointerUp = function (t, e) { 2743 delete this.isTouchScrolling, this.viewport.classList.remove("is-pointer-down"), this.dispatchEvent("pointerUp", t, [e]), this._dragPointerUp(t, e); 2744 }, o.pointerDone = function () { 2745 t.removeEventListener("scroll", this), delete this.pointerDownScroll; 2746 }, o.dragStart = function (e, i) { 2747 this.isDraggable && (this.dragStartPosition = this.x, this.startAnimation(), t.removeEventListener("scroll", this), this.dispatchEvent("dragStart", e, [i])); 2748 }, o.pointerMove = function (t, e) { 2749 var i = this._dragPointerMove(t, e);this.dispatchEvent("pointerMove", t, [e, i]), this._dragMove(t, e, i); 2750 }, o.dragMove = function (t, e, i) { 2751 if (this.isDraggable) { 2752 t.preventDefault(), this.previousDragX = this.dragX;var n = this.options.rightToLeft ? -1 : 1;this.options.wrapAround && (i.x = i.x % this.slideableWidth);var s = this.dragStartPosition + i.x * n;if (!this.options.wrapAround && this.slides.length) { 2753 var o = Math.max(-this.slides[0].target, this.dragStartPosition);s = s > o ? .5 * (s + o) : s;var r = Math.min(-this.getLastSlide().target, this.dragStartPosition);s = s < r ? .5 * (s + r) : s; 2754 }this.dragX = s, this.dragMoveTime = new Date(), this.dispatchEvent("dragMove", t, [e, i]); 2755 } 2756 }, o.dragEnd = function (t, e) { 2757 if (this.isDraggable) { 2758 this.options.freeScroll && (this.isFreeScrolling = !0);var i = this.dragEndRestingSelect();if (this.options.freeScroll && !this.options.wrapAround) { 2759 var n = this.getRestingPosition();this.isFreeScrolling = -n > this.slides[0].target && -n < this.getLastSlide().target; 2760 } else this.options.freeScroll || i != this.selectedIndex || (i += this.dragEndBoostSelect());delete this.previousDragX, this.isDragSelect = this.options.wrapAround, this.select(i), delete this.isDragSelect, this.dispatchEvent("dragEnd", t, [e]); 2761 } 2762 }, o.dragEndRestingSelect = function () { 2763 var t = this.getRestingPosition(), 2764 e = Math.abs(this.getSlideDistance(-t, this.selectedIndex)), 2765 i = this._getClosestResting(t, e, 1), 2766 n = this._getClosestResting(t, e, -1), 2767 s = i.distance < n.distance ? i.index : n.index;return s; 2768 }, o._getClosestResting = function (t, e, i) { 2769 for (var n = this.selectedIndex, s = 1 / 0, o = this.options.contain && !this.options.wrapAround ? function (t, e) { 2770 return t <= e; 2771 } : function (t, e) { 2772 return t < e; 2773 };
2773 o(e, s) && (n += i, s = e, e = this.getSlideDistance(-t, n), null !== e);) { 2774 e = Math.abs(e); 2775 }return { distance: s, index: n - i }; 2776 }, o.getSlideDistance = function (t, e) { 2777 var i = this.slides.length, 2778 s = this.options.wrapAround && i > 1, 2779 o = s ? n.modulo(e, i) : e, 2780 r = this.slides[o];if (!r) return null;var a = s ? this.slideableWidth * Math.floor(e / i) : 0;return t - (r.target + a); 2781 }, o.dragEndBoostSelect = function () { 2782 if (void 0 === this.previousDragX || !this.dragMoveTime || new Date() - this.dragMoveTime > 100) return 0;var t = this.getSlideDistance(-this.dragX, this.selectedIndex), 2783 e = this.previousDragX - this.dragX;return t > 0 && e > 0 ? 1 : t < 0 && e < 0 ? -1 : 0; 2784 }, o.staticClick = function (t, e) { 2785 var i = this.getParentCell(t.target), 2786 n = i && i.element, 2787 s = i && this.cells.indexOf(i);this.dispatchEvent("staticClick", t, [e, n, s]); 2788 }, o.onscroll = function () { 2789 var t = s(), 2790 e = this.pointerDownScroll.x - t.x, 2791 i = this.pointerDownScroll.y - t.y;(Math.abs(e) > 3 || Math.abs(i) > 3) && this._pointerDone(); 2792 }, e; 2793}), function (t, e) { 2794 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_9__], __WEBPACK_LOCAL_MODULE_12__ = ((function (i) { 2795 return e(t, i); 2796 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("unipointer")) : t.TapListener = e(t, t.Unipointer); 2797}(window, function (t, e) { 2798 function i(t) { 2799 this.bindTap(t); 2800 }var n = i.prototype = Object.create(e.prototype);return n.bindTap = function (t) { 2801 t && (this.unbindTap(), this.tapElement = t, this._bindStartEvent(t, !0)); 2802 }, n.unbindTap = function () { 2803 this.tapElement && (this._bindStartEvent(this.tapElement, !0), delete this.tapElement); 2804 }, n.pointerUp = function (i, n) { 2805 if (!this.isIgnoringMouseUp || "mouseup" != i.type) { 2806 var s = e.getPointerPoint(n), 2807 o = this.tapElement.getBoundingClientRect(), 2808 r = t.pageXOffset, 2809 a = t.pageYOffset, 2810 l = s.x >= o.left + r && s.x <= o.right + r && s.y >= o.top + a && s.y <= o.bottom + a;if (l && this.emitEvent("tap", [i, n]), "mouseup" != i.type) { 2811 this.isIgnoringMouseUp = !0;var h = this;setTimeout(function () { 2812 delete h.isIgnoringMouseUp; 2813 }, 400); 2814 } 2815 } 2816 }, n.destroy = function () { 2817 this.pointerDone(), this.unbindTap(); 2818 }, i; 2819}), function (t, e) { 2820 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_8__, __WEBPACK_LOCAL_MODULE_12__, __WEBPACK_LOCAL_MODULE_4__], __WEBPACK_LOCAL_MODULE_13__ = ((function (i, n, s) { 2821 return e(t, i, n, s); 2822 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("./flickity"), require("tap-listener"), require("fizzy-ui-utils")) : e(t, t.Flickity, t.TapListener, t.fizzyUIUtils); 2823}(window, function (t, e, i, n) { 2824 "use strict"; 2825 function s(t, e) { 2826 this.direction = t, this.parent = e, this._create(); 2827 }function o(t) { 2828 return "string" == typeof t ? t : "M " + t.x0 + ",50 L " + t.x1 + "," + (t.y1 + 50) + " L " + t.x2 + "," + (t.y2 + 50) + " L " + t.x3 + ",50 L " + t.x2 + "," + (50 - t.y2) + " L " + t.x1 + "," + (50 - t.y1) + " Z"; 2829 }var r = "http://www.w3.org/2000/svg";s.prototype = Object.create(i.prototype), s.prototype._create = function () { 2830 this.isEnabled = !0, this.isPrevious = this.direction == -1;var t = this.parent.options.rightToLeft ? 1 : -1;this.isLeft = this.direction == t;var e = this.element = document.createElement("button");e.className = "flickity-button flickity-prev-next-button", e.className += this.isPrevious ? " previous" : " next", e.setAttribute("type", "button"), this.disable(), e.setAttribute("aria-label", this.isPrevious ? "Previous" : "Next");var i = this.createSVG();e.appendChild(i), this.on("tap", this.onTap), this.parent.on("select", this.update.bind(this)), this.on("pointerDown", this.parent.childUIPointerDown.bind(this.parent)); 2831 }, s.prototype.activate = function () { 2832 this.bindTap(this.element), this.element.addEventListener("click", this), this.parent.element.appendChild(this.element); 2833 }, s.prototype.deactivate = function () { 2834 this.parent.element.removeChild(this.element), i.prototype.destroy.call(this), this.element.removeEventListener("click", this); 2835 }, s.prototype.createSVG = function () { 2836 var t = document.createElementNS(r, "svg");t.setAttribute("class", "flickity-button-icon"), t.setAttribute("viewBox", "0 0 100 100");var e = document.createElementNS(r, "path"), 2837 i = o(this.parent.options.arrowShape);return e.setAttribute("d", i), e.setAttribute("class", "arrow"), this.isLeft || e.setAttribute("transform", "translate(100, 100) rotate(180) "), t.appendChild(e), t; 2838 }, s.prototype.onTap = function () { 2839 if (this.isEnabled) { 2840 this.parent.uiChange();var t = this.isPrevious ? "previous" : "next";this.parent[t](); 2841 } 2842 }, s.prototype.handleEvent = n.handleEvent, s.prototype.onclick = function (t) { 2843 var e = document.activeElement;e && e == this.element && this.onTap(t, t); 2844 }, s.prototype.enable = function () { 2845 this.isEnabled || (this.element.disabled = !1, this.isEnabled = !0); 2846 }, s.prototype.disable = function () { 2847 this.isEnabled && (this.element.disabled = !0, this.isEnabled = !1); 2848 }, s.prototype.update = function () { 2849 var t = this.parent.slides;if (this.parent.options.wrapAround && t.length > 1) return void this.enable();var e = t.length ? t.length - 1 : 0, 2850 i = this.isPrevious ? 0 : e, 2851 n = this.parent.selectedIndex == i ? "disable" : "enable";this[n](); 2852 }, s.prototype.destroy = function () { 2853 this.deactivate(); 2854 }, n.extend(e.defaults, { prevNextButtons: !0, arrowShape: { x0: 10, x1: 60, y1: 50, x2: 70, y2: 40, x3: 30 } }), e.createMethods.push("_createPrevNextButtons");var a = e.prototype;return a._createPrevNextButtons = function () { 2855 this.options.prevNextButtons && (this.prevButton = new s(-1, this), this.nextButton = new s(1, this), this.on("activate", this.activatePrevNextButtons)); 2856 }, a.activatePrevNextButtons = function () { 2857 this.prevButton.activate(), this.nextButton.activate(), this.on("deactivate", this.deactivatePrevNextButtons); 2858 }, a.deactivatePrevNextButtons = function () { 2859 this.prevButton.deactivate(), this.nextButton.deactivate(), this.off("deactivate", this.deactivatePrevNextButtons); 2860 }, e.PrevNextButton = s, e; 2861}), function (t, e) { 2862 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_8__, __WEBPACK_LOCAL_MODULE_12__, __WEBPACK_LOCAL_MODULE_4__], __WEBPACK_LOCAL_MODULE_14__ = ((function (i, n, s) { 2863 return e(t, i, n, s); 2864 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("./flickity"), require("tap-listener"), require("fizzy-ui-utils")) : e(t, t.Flickity, t.TapListener, t.fizzyUIUtils); 2865}(window, function (t, e, i, n) { 2866 function s(t) { 2867 this.parent = t, this._create(); 2868 }s.prototype = new i(), s.prototype._create = function () { 2869 this.holder = document.createElement("ol"), this.holder.className = "flickity-page-dots", this.dots = [], this.on("tap", this.onTap), this.on("pointerDown", this.parent.childUIPointerDown.bind(this.parent)); 2870 }, s.prototype.activate = function () { 2871 this.setDots(), this.bindTap(this.holder), this.parent.element.appendChild(this.holder); 2872 }, s.prototype.deactivate = function () { 2873 this.parent.element.removeChild(this.holder), i.prototype.destroy.call(this); 2874 }, s.prototype.setDots = function () { 2875 var t = this.parent.slides.length - this.dots.length;t > 0 ? this.addDots(t) : t < 0 && this.removeDots(-t); 2876 }, s.prototype.addDots = function (t) { 2877 for (var e = document.createDocumentFragment(), i = [], n = this.dots.length, s = n + t, o = n; o < s; o++) { 2878 var r = document.createElement("li");r.className = "dot", r.setAttribute("aria-label", "Page dot " + (o + 1)), e.appendChild(r), i.push(r); 2879 }this.holder.appendChild(e), this.dots = this.dots.concat(i); 2880 }, s.prototype.removeDots = function (t) { 2881 var e = this.dots.splice(this.dots.length - t, t);e.forEach(function (t) { 2882 this.holder.removeChild(t); 2883 }, this); 2884 }, s.prototype.updateSelected = function () { 2885 this.selectedDot && (this.selectedDot.className = "dot", this.selectedDot.removeAttribute("aria-current")), this.dots.length && (this.selectedDot = this.dots[this.parent.selectedIndex], this.selectedDot.className = "dot is-selected", this.selectedDot.setAttribute("aria-current", "step")); 2886 }, s.prototype.onTap = function (t) { 2887 var e = t.target;if ("LI" == e.nodeName) { 2888 this.parent.uiChange();var i = this.dots.indexOf(e);this.parent.select(i); 2889 } 2890 }, s.prototype.destroy = function () { 2891 this.deactivate(); 2892 }, e.PageDots = s, n.extend(e.defaults, { pageDots: !0 }), e.createMethods.push("_createPageDots");var o = e.prototype;return o._createPageDots = function () { 2893 this.options.pageDots && (this.pageDots = new s(this), this.on("activate", this.activatePageDots), this.on("select", this.updateSelectedPageDots), this.on("cellChange", this.updatePageDots), this.on("resize", this.updatePageDots), this.on("deactivate", this.deactivatePageDots)); 2894 }, o.activatePageDots = function () { 2895 this.pageDots.activate(); 2896 }, o.updateSelectedPageDots = function () { 2897 this.pageDots.updateSelected(); 2898 }, o.updatePageDots = function () { 2899 this.pageDots.setDots(); 2900 }, o.deactivatePageDots = function () { 2901 this.pageDots.deactivate(); 2902 }, e.PageDots = s, e; 2903}), function (t, e) { 2904 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_1__, __WEBPACK_LOCAL_MODULE_4__, __WEBPACK_LOCAL_MODULE_8__], __WEBPACK_LOCAL_MODULE_15__ = ((function (t, i, n) { 2905 return e(t, i, n); 2906 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(require("ev-emitter"), require("fizzy-ui-utils"), require("./flickity")) : e(t.EvEmitter, t.fizzyUIUtils, t.Flickity); 2907}(window, function (t, e, i) { 2908 function n(t) { 2909 this.parent = t, this.state = "stopped", this.onVisibilityChange = this.visibilityChange.bind(this), this.onVisibilityPlay = this.visibilityPlay.bind(this); 2910 }n.prototype = Object.create(t.prototype), n.prototype.play = function () { 2911 if ("playing" != this.state) { 2912 var t = document.hidden;if (t) return void document.addEventListener("visibilitychange", this.onVisibilityPlay);this.state = "playing", document.addEventListener("visibilitychange", this.onVisibilityChange), this.tick(); 2913 } 2914 }, n.prototype.tick = function () { 2915 if ("playing" == this.state) { 2916 var t = this.parent.options.autoPlay;t = "number" == typeof t ? t : 3e3;var e = this;this.clear(), this.timeout = setTimeout(function () { 2917 e.parent.next(!0), e.tick(); 2918 }, t); 2919 } 2920 }, n.prototype.stop = function () { 2921 this.state = "stopped", this.clear(), document.removeEventListener("visibilitychange", this.onVisibilityChange); 2922 }, n.prototype.clear = function () { 2923 clearTimeout(this.timeout); 2924 }, n.prototype.pause = function () { 2925 "playing" == this.state && (this.state = "paused", this.clear()); 2926 }, n.prototype.unpause = function () { 2927 "paused" == this.state && this.play(); 2928 }, n.prototype.visibilityChange = function () { 2929 var t = document.hidden;this[t ? "pause" : "unpause"](); 2930 }, n.prototype.visibilityPlay = function () { 2931 this.play(), document.removeEventListener("visibilitychange", this.onVisibilityPlay); 2932 }, e.extend(i.defaults, { pauseAutoPlayOnHover: !0 }), i.createMethods.push("_createPlayer");var s = i.prototype;return s._createPlayer = function () { 2933 this.player = new n(this), this.on("activate", this.activatePlayer), this.on("uiChange", this.stopPlayer), this.on("pointerDown", this.stopPlayer), this.on("deactivate", this.deactivatePlayer); 2934 }, s.activatePlayer = function () { 2935 this.options.autoPlay && (this.player.play(), this.element.addEventListener("mouseenter", this)); 2936 }, s.playPlayer = function () { 2937 this.player.play(); 2938 }, s.stopPlayer = function () { 2939 this.player.stop(); 2940 }, s.pausePlayer = function () { 2941 this.player.pause(); 2942 }, s.unpausePlayer = function () { 2943 this.player.unpause(); 2944 }, s.deactivatePlayer = function () { 2945 this.player.stop(), this.element.removeEventListener("mouseenter", this); 2946 }, s.onmouseenter = function () { 2947 this.options.pauseAutoPlayOnHover && (this.player.pause(), this.element.addEventListener("mouseleave", this)); 2948 }, s.onmouseleave = function () { 2949 this.player.unpause(), this.element.removeEventListener("mouseleave", this); 2950 }, i.Player = n, i; 2951}), function (t, e) { 2952 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_8__, __WEBPACK_LOCAL_MODULE_4__], __WEBPACK_LOCAL_MODULE_16__ = ((function (i, n) { 2953 return e(t, i, n); 2954 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("./flickity"), require("fizzy-ui-utils")) : e(t, t.Flickity, t.fizzyUIUtils); 2955}(window, function (t, e, i) { 2956 function n(t) { 2957 var e = document.createDocumentFragment();return t.forEach(function (t) { 2958 e.appendChild(t.element); 2959 }), e; 2960 }var s = e.prototype;return s.insert = function (t, e) { 2961 var i = this._makeCells(t);if (i && i.length) { 2962 var s = this.cells.length;e = void 0 === e ? s : e;var o = n(i), 2963 r = e == s;if (r) this.slider.appendChild(o);else { 2964 var a = this.cells[e].element;this.slider.insertBefore(o, a); 2965 }if (0 === e) this.cells = i.concat(this.cells);else if (r) this.cells = this.cells.concat(i);else { 2966 var l = this.cells.splice(e, s - e);
2966this.cells = this.cells.concat(i).concat(l); 2967 }this._sizeCells(i), this.cellChange(e, !0); 2968 } 2969 }, s.append = function (t) { 2970 this.insert(t, this.cells.length); 2971 }, s.prepend = function (t) { 2972 this.insert(t, 0); 2973 }, s.remove = function (t) { 2974 var e = this.getCells(t);if (e && e.length) { 2975 var n = this.cells.length - 1;e.forEach(function (t) { 2976 t.remove();var e = this.cells.indexOf(t);n = Math.min(e, n), i.removeFrom(this.cells, t); 2977 }, this), this.cellChange(n, !0); 2978 } 2979 }, s.cellSizeChange = function (t) { 2980 var e = this.getCell(t);if (e) { 2981 e.getSize();var i = this.cells.indexOf(e);this.cellChange(i); 2982 } 2983 }, s.cellChange = function (t, e) { 2984 var i = this.selectedElement;this._positionCells(t), this._getWrapShiftCells(), this.setGallerySize();var n = this.getCell(i);n && (this.selectedIndex = this.getCellSlideIndex(n)), this.selectedIndex = Math.min(this.slides.length - 1, this.selectedIndex), this.emitEvent("cellChange", [t]), this.select(this.selectedIndex), e && this.positionSliderAtSelected(); 2985 }, e; 2986}), function (t, e) { 2987 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_8__, __WEBPACK_LOCAL_MODULE_4__], __WEBPACK_LOCAL_MODULE_17__ = ((function (i, n) { 2988 return e(t, i, n); 2989 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("./flickity"), require("fizzy-ui-utils")) : e(t, t.Flickity, t.fizzyUIUtils); 2990}(window, function (t, e, i) { 2991 "use strict"; 2992 function n(t) { 2993 if ("IMG" == t.nodeName) { 2994 var e = t.getAttribute("data-flickity-lazyload"), 2995 n = t.getAttribute("data-flickity-lazyload-src"), 2996 s = t.getAttribute("data-flickity-lazyload-srcset");if (e || n || s) return [t]; 2997 }var o = "img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]", 2998 r = t.querySelectorAll(o);return i.makeArray(r); 2999 }function s(t, e) { 3000 this.img = t, this.flickity = e, this.load(); 3001 }e.createMethods.push("_createLazyload");var o = e.prototype;return o._createLazyload = function () { 3002 this.on("select", this.lazyLoad); 3003 }, o.lazyLoad = function () { 3004 var t = this.options.lazyLoad;if (t) { 3005 var e = "number" == typeof t ? t : 0, 3006 i = this.getAdjacentCellElements(e), 3007 o = [];i.forEach(function (t) { 3008 var e = n(t);o = o.concat(e); 3009 }), o.forEach(function (t) { 3010 new s(t, this); 3011 }, this); 3012 } 3013 }, s.prototype.handleEvent = i.handleEvent, s.prototype.load = function () { 3014 this.img.addEventListener("load", this), this.img.addEventListener("error", this);var t = this.img.getAttribute("data-flickity-lazyload") || this.img.getAttribute("data-flickity-lazyload-src"), 3015 e = this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src = t, e && this.img.setAttribute("srcset", e), this.img.removeAttribute("data-flickity-lazyload"), this.img.removeAttribute("data-flickity-lazyload-src"), this.img.removeAttribute("data-flickity-lazyload-srcset"); 3016 }, s.prototype.onload = function (t) { 3017 this.complete(t, "flickity-lazyloaded"); 3018 }, s.prototype.onerror = function (t) { 3019 this.complete(t, "flickity-lazyerror"); 3020 }, s.prototype.complete = function (t, e) { 3021 this.img.removeEventListener("load", this), this.img.removeEventListener("error", this);var i = this.flickity.getParentCell(this.img), 3022 n = i && i.element;this.flickity.cellSizeChange(n), this.img.classList.add(e), this.flickity.dispatchEvent("lazyLoad", t, n); 3023 }, e.LazyLoader = s, e; 3024}), function (t, e) { 3025 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_8__, __WEBPACK_LOCAL_MODULE_11__, __WEBPACK_LOCAL_MODULE_13__, __WEBPACK_LOCAL_MODULE_14__, __WEBPACK_LOCAL_MODULE_15__, __WEBPACK_LOCAL_MODULE_16__, __WEBPACK_LOCAL_MODULE_17__], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), 3026 __WEBPACK_LOCAL_MODULE_18__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 3027 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports && (module.exports = e(require("./flickity"), require("./drag"), require("./prev-next-button"), require("./page-dots"), require("./player"), require("./add-remove-cell"), require("./lazyload"))); 3028}(window, function (t) { 3029 return t; 3030}), function (t, e) { 3031 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_18__, __WEBPACK_LOCAL_MODULE_4__], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), 3032 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 3033 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
3034 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(require("flickity"), require("fizzy-ui-utils")) : t.Flickity = e(t.Flickity, t.fizzyUIUtils); 3035}(window, function (t, e) { 3036 function i(t, e, i) { 3037 return (e - t) * i + t; 3038 }t.createMethods.push("_createAsNavFor");var n = t.prototype;return n._createAsNavFor = function () { 3039 this.on("activate", this.activateAsNavFor), this.on("deactivate", this.deactivateAsNavFor), this.on("destroy", this.destroyAsNavFor);var t = this.options.asNavFor;if (t) { 3040 var e = this;setTimeout(function () { 3041 e.setNavCompanion(t); 3042 }); 3043 } 3044 }, n.setNavCompanion = function (i) { 3045 i = e.getQueryElement(i);var n = t.data(i);if (n && n != this) { 3046 this.navCompanion = n;var s = this;this.onNavCompanionSelect = function () { 3047 s.navCompanionSelect(); 3048 }, n.on("select", this.onNavCompanionSelect), this.on("staticClick", this.onNavStaticClick), this.navCompanionSelect(!0); 3049 } 3050 }, n.navCompanionSelect = function (t) { 3051 if (this.navCompanion) { 3052 var e = this.navCompanion.selectedCells[0], 3053 n = this.navCompanion.cells.indexOf(e), 3054 s = n + this.navCompanion.selectedCells.length - 1, 3055 o = Math.floor(i(n, s, this.navCompanion.cellAlign));if (this.selectCell(o, !1, t), this.removeNavSelectedElements(), !(o >= this.cells.length)) { 3056 var r = this.cells.slice(n, s + 1);this.navSelectedElements = r.map(function (t) { 3057 return t.element; 3058 }), this.changeNavSelectedClass("add"); 3059 } 3060 } 3061 }, n.changeNavSelectedClass = function (t) { 3062 this.navSelectedElements.forEach(function (e) { 3063 e.classList[t]("is-nav-selected"); 3064 }); 3065 }, n.activateAsNavFor = function () { 3066 this.navCompanionSelect(!0); 3067 }, n.removeNavSelectedElements = function () { 3068 this.navSelectedElements && (this.changeNavSelectedClass("remove"), delete this.navSelectedElements); 3069 }, n.onNavStaticClick = function (t, e, i, n) { 3070 "number" == typeof n && this.navCompanion.selectCell(n); 3071 }, n.deactivateAsNavFor = function () { 3072 this.removeNavSelectedElements(); 3073 }, n.destroyAsNavFor = function () { 3074 this.navCompanion && (this.navCompanion.off("select", this.onNavCompanionSelect), this.off("staticClick", this.onNavStaticClick), delete this.navCompanion); 3075 }, t; 3076}), function (t, e) { 3077 "use strict"; 3078 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_1__], __WEBPACK_LOCAL_MODULE_20__ = ((function (i) { 3079 return e(t, i); 3080 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__))) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("ev-emitter")) : t.imagesLoaded = e(t, t.EvEmitter); 3081}("undefined" != typeof window ? window : undefined, function (t, e) { 3082 function i(t, e) { 3083 for (var i in e) { 3084 t[i] = e[i]; 3085 }return t; 3086 }function n(t) { 3087 if (Array.isArray(t)) return t;var e = "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && "number" == typeof t.length;return e ? h.call(t) : [t]; 3088 }function s(t, e, o) { 3089 if (!(this instanceof s)) return new s(t, e, o);var r = t;return "string" == typeof t && (r = document.querySelectorAll(t)), r ? (this.elements = n(r), this.options = i({}, this.options), "function" == typeof e ? o = e : i(this.options, e), o && this.on("always", o), this.getImages(), a && (this.jqDeferred = new a.Deferred()), void setTimeout(this.check.bind(this))) : void l.error("Bad element for imagesLoaded " + (r || t)); 3090 }function o(t) { 3091 this.img = t; 3092 }function r(t, e) { 3093 this.url = t, this.element = e, this.img = new Image(); 3094 }var a = t.jQuery, 3095 l = t.console, 3096 h = Array.prototype.slice;s.prototype = Object.create(e.prototype), s.prototype.options = {}, s.prototype.getImages = function () { 3097 this.images = [], this.elements.forEach(this.addElementImages, this); 3098 }, s.prototype.addElementImages = function (t) { 3099 "IMG" == t.nodeName && this.addImage(t), this.options.background === !0 && this.addElementBackgroun
3099dImages(t);var e = t.nodeType;if (e && c[e]) { 3100 for (var i = t.querySelectorAll("img"), n = 0; n < i.length; n++) { 3101 var s = i[n];this.addImage(s); 3102 }if ("string" == typeof this.options.background) { 3103 var o = t.querySelectorAll(this.options.background);for (n = 0; n < o.length; n++) { 3104 var r = o[n];this.addElementBackgroundImages(r); 3105 } 3106 } 3107 } 3108 };var c = { 1: !0, 9: !0, 11: !0 };return s.prototype.addElementBackgroundImages = function (t) { 3109 var e = getComputedStyle(t);if (e) for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(e.backgroundImage); null !== n;) { 3110 var s = n && n[2];s && this.addBackground(s, t), n = i.exec(e.backgroundImage); 3111 } 3112 }, s.prototype.addImage = function (t) { 3113 var e = new o(t);this.images.push(e); 3114 }, s.prototype.addBackground = function (t, e) { 3115 var i = new r(t, e);this.images.push(i); 3116 }, s.prototype.check = function () { 3117 function t(t, i, n) { 3118 setTimeout(function () { 3119 e.progress(t, i, n); 3120 }); 3121 }var e = this;return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function (e) { 3122 e.once("progress", t), e.check(); 3123 }) : void this.complete(); 3124 }, s.prototype.progress = function (t, e, i) { 3125 this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded, this.emitEvent("progress", [this, t, e]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, t), this.progressedCount == this.images.length && this.complete(), this.options.debug && l && l.log("progress: " + i, t, e); 3126 }, s.prototype.complete = function () { 3127 var t = this.hasAnyBroken ? "fail" : "done";if (this.isComplete = !0, this.emitEvent(t, [this]), this.emitEvent("always", [this]), this.jqDeferred) { 3128 var e = this.hasAnyBroken ? "reject" : "resolve";this.jqDeferred[e](this); 3129 } 3130 }, o.prototype = Object.create(e.prototype), o.prototype.check = function () { 3131 var t = this.getIsImageComplete();return t ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image(), this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), void (this.proxyImage.src = this.img.src)); 3132 }, o.prototype.getIsImageComplete = function () { 3133 return this.img.complete && this.img.naturalWidth; 3134 }, o.prototype.confirm = function (t, e) { 3135 this.isLoaded = t, this.emitEvent("progress", [this, this.img, e]); 3136 }, o.prototype.handleEvent = function (t) { 3137 var e = "on" + t.type;this[e] && this[e](t); 3138 }, o.prototype.onload = function () { 3139 this.confirm(!0, "onload"), this.unbindEvents(); 3140 }, o.prototype.onerror = function () { 3141 this.confirm(!1, "onerror"), this.unbindEvents(); 3142 }, o.prototype.unbindEvents = function () { 3143 this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this); 3144 }, r.prototype = Object.create(o.prototype), r.prototype.check = function () { 3145 this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url;var t = this.getIsImageComplete();t && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()); 3146 }, r.prototype.unbindEvents = function () { 3147 this.img.removeEventListener("load", this), this.img.removeEventListener("error", this); 3148 }, r.prototype.confirm = function (t, e) { 3149 this.isLoaded = t, this.emitEvent("progress", [this, this.element, e]); 3150 }, s.makeJQueryPlugin = function (e) { 3151 e = e || t.jQuery, e && (a = e, a.fn.imagesLoaded = function (t, e) { 3152 var i = new s(this, t, e);return i.jqDeferred.promise(a(this)); 3153 }); 3154 }, s.makeJQueryPlugin(), s; 3155}), function (t, e) { 3156 true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_18__, __WEBPACK_LOCAL_MODULE_20__], __WEBPACK_AMD_DEFINE_RESULT__ = (function (i, n) { 3157 return e(t, i, n); 3158 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 3159 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && module.exports ? module.exports = e(t, require("flickity"), require("imagesloaded")) : t.Flickity = e(t, t.Flickity, t.imagesLoaded); 3160}(window, function (t, e, i) { 3161 "use strict"; 3162 e.createMethods.push("_createImagesLoaded");var n = e.prototype;return n._createImagesLoaded = function () { 3163 this.on("activate", this.imagesLoaded); 3164 }, n.imagesLoaded = function () { 3165 function t(t, i) { 3166 var n = e.getParentCell(i.img);e.cellSizeChange(n && n.element), e.options.freeScroll || e.positionSliderAtSelected(); 3167 }if (this.options.imagesLoaded) { 3168 var e = this;i(this.slider).on("progress", t); 3169 } 3170 }, e; 3171}); 3172 3173/***/ }), 3174/* 18 */ 3175/***/ (function(module, exports, __webpack_require__) { 3176 3177"use strict"; 3178/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 3179 3180var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 3181 3182/** 3183 * A Twitter library in JavaScript 3184 * 3185 * @package codebird 3186 * @version 2.6.0 3187 * @author Jublo Solutions <[email protected]> 3188 * @copyright 2010-2015 Jublo Solutions <[email protected]> 3189 * @license http://opensource.org/licenses/GPL-3.0 GNU Public License 3.0 3190 * @link https://github.com/jublonet/codebird-php 3191 */ 3192 3193/* jshint curly: true, 3194 eqeqeq: true, 3195 latedef: true, 3196 quotmark: double, 3197 undef: true, 3198 unused: true, 3199 trailing: true, 3200 laxbreak: true */ 3201/* global window, 3202 document, 3203 navigator, 3204 console, 3205 Ti, 3206 ActiveXObject, 3207 module, 3208 define, 3209 require */ 3210(function (undefined) { 3211 "use strict"; 3212 3213 /** 3214 * Array.indexOf polyfill 3215 */ 3216 3217 if (!Array.prototype.indexOf) { 3218 Array.prototype.indexOf = function (obj, start) { 3219 for (var i = start || 0; i < this.length; i++) { 3220 if (this[i] === obj) { 3221 return i; 3222 } 3223 } 3224 return -1; 3225 }; 3226 } 3227 3228 /** 3229 * A Twitter library in JavaScript 3230 * 3231 * @package codebird 3232 * @subpackage codebird-js 3233 */ 3234 /* jshint -W098 */ 3235 var Codebird = function Codebird() { 3236 /* jshint +W098 */ 3237 3238 /** 3239 * The OAuth consumer key of your registered app 3240 */ 3241 var _oauth_consumer_key = null; 3242 3243 /** 3244 * The corresponding consumer secret 3245 */ 3246 var _oauth_consumer_secret = null; 3247 3248 /** 3249 * The app-only bearer token. Used to authorize app-only requests 3250 */ 3251 var _oauth_bearer_token = null; 3252 3253 /** 3254 * The API endpoint base to use 3255 */ 3256 var _endpoint_base = "https://api.twitter.com/"; 3257 3258 /** 3259 * The media API endpoint base to use 3260 */ 3261 var _endpoint_base_media = "https://upload.twitter.com/"; 3262 3263 /** 3264 * The API endpoint to use 3265 */ 3266 var _endpoint = _endpoint_base + "1.1/"; 3267 3268 /** 3269 * The media API endpoint to use 3270 */ 3271 var _endpoint_media = _endpoint_base_media + "1.1/"; 3272 3273 /** 3274 * The API endpoint base to use 3275 */ 3276 var _endpoint_oauth = _endpoint_base; 3277 3278 /** 3279 * API proxy endpoint 3280 */ 3281 var _endpoint_proxy = "https://api.jublo.net/codebird/"; 3282 3283 /** 3284 * The API endpoint to use for old requests 3285 */ 3286 var _endpoint_old = _endpoint_base + "1/"; 3287 3288 /** 3289 * Use JSONP for GET requests in IE7-9 3290 */ 3291 var _use_jsonp = typeof navigator !== "undefined" && typeof navigator.userAgent !== "undefined" && (navigator.userAgent.indexOf("Trident/4") > -1 || navigator.userAgent.indexOf("Trident/5") > -1 || navigator.userAgent.indexOf("MSIE 7.0") > -1); 3292 3293 /** 3294 * Whether to access the API via a proxy that is allowed by CORS 3295 * Assume that CORS is only necessary in browsers 3296 */ 3297 var _use_proxy = typeof navigator !== "undefined" && typeof navigator.userAgent !== "undefined"; 3298 3299 /** 3300 * The Request or access token. Used to sign requests 3301 */ 3302 var _oauth_token = null; 3303 3304 /** 3305 * The corresponding request or access token secret 3306 */ 3307 var _oauth_token_secret = null; 3308 3309 /** 3310 * The current Codebird version 3311 */ 3312 var _version = "2.6.0"; 3313 3314 /** 3315 * Sets the OAuth consumer key and secret (App key) 3316 * 3317 * @param string key OAuth consumer key 3318 * @param string secret OAuth consumer secret 3319 * 3320 * @return void 3321 */ 3322 var setConsumerKey = function setConsumerKey(key, secret) { 3323 _oauth_consumer_key = key; 3324 _oauth_consumer_secret = secret;
3325 }; 3326 3327 /** 3328 * Sets the OAuth2 app-only auth bearer token 3329 * 3330 * @param string token OAuth2 bearer token 3331 * 3332 * @return void 3333 */ 3334 var setBearerToken = function setBearerToken(token) { 3335 _oauth_bearer_token = token; 3336 }; 3337 3338 /** 3339 * Gets the current Codebird version 3340 * 3341 * @return string The version number 3342 */ 3343 var getVersion = function getVersion() { 3344 return _version; 3345 }; 3346 3347 /** 3348 * Sets the OAuth request or access token and secret (User key) 3349 * 3350 * @param string token OAuth request or access token 3351 * @param string secret OAuth request or access token secret 3352 * 3353 * @return void 3354 */ 3355 var setToken = function setToken(token, secret) { 3356 _oauth_token = token; 3357 _oauth_token_secret = secret; 3358 }; 3359 3360 /** 3361 * Enables or disables CORS proxy 3362 * 3363 * @param bool use_proxy Whether to use CORS proxy or not 3364 * 3365 * @return void 3366 */ 3367 var setUseProxy = function setUseProxy(use_proxy) { 3368 _use_proxy = !!use_proxy; 3369 }; 3370 3371 /** 3372 * Sets custom CORS proxy server 3373 * 3374 * @param string proxy Address of proxy server to use 3375 * 3376 * @return void 3377 */ 3378 var setProxy = function setProxy(proxy) { 3379 // add trailing slash if missing 3380 if (!proxy.match(/\/$/)) { 3381 proxy += "/"; 3382 } 3383 _endpoint_proxy = proxy; 3384 }; 3385 3386 /** 3387 * Parse URL-style parameters into object 3388 * 3389 * version: 1109.2015 3390 * discuss at: http://phpjs.org/functions/parse_str 3391 * + original by: Cagri Ekin 3392 * + improved by: Michael White (http://getsprink.com) 3393 * + tweaked by: Jack 3394 * + bugfixed by: Onno Marsman 3395 * + reimplemented by: stag019 3396 * + bugfixed by: Brett Zamir (http://brett-zamir.me) 3397 * + bugfixed by: stag019 3398 * - depends on: urldecode 3399 * + input by: Dreamer 3400 * + bugfixed by: Brett Zamir (http://brett-zamir.me) 3401 * % note 1: When no argument is specified, will put variables in global scope. 3402 * 3403 * @param string str String to parse 3404 * @param array array to load data into 3405 * 3406 * @return object 3407 */ 3408 var _parse_str = function _parse_str(str, array) { 3409 var glue1 = "=", 3410 glue2 = "&", 3411 array2 = String(str).replace(/^&?([\s\S]*?)&?$/, "$1").split(glue2), 3412 i, 3413 j, 3414 chr, 3415 tmp, 3416 key, 3417 value, 3418 bracket, 3419 keys, 3420 evalStr, 3421 fixStr = function fixStr(str) { 3422 return decodeURIComponent(str).replace(/([\\"'])/g, "\\$1").replace(/\n/g, "\\n").replace(/\r/g, "\\r"); 3423 }; 3424 if (!array) { 3425 array = this.window; 3426 } 3427 3428 for (i = 0; i < array2.length; i++) { 3429 tmp = array2[i].split(glue1); 3430 if (tmp.length < 2) { 3431 tmp = [tmp, ""]; 3432 } 3433 key = fixStr(tmp[0]); 3434 value = fixStr(tmp[1]); 3435 while (key.charAt(0) === " ") { 3436 key = key.substr(1); 3437 } 3438 if (key.indexOf("\0") !== -1) { 3439 key = key.substr(0, key.indexOf("\0")); 3440 } 3441 if (key && key.charAt(0) !== "[") { 3442 keys = []; 3443 bracket = 0; 3444 for (j = 0; j < key.length; j++) { 3445 if (key.charAt(j) === "[" && !bracket) { 3446 bracket = j + 1; 3447 } else if (key.charAt(j) === "]") { 3448 if (bracket) { 3449 if (!keys.length) { 3450 keys.push(key.substr(0, bracket - 1)); 3451 } 3452 keys.push(key.substr(bracket, j - bracket)); 3453 bracket = 0; 3454 if (key.charAt(j + 1) !== "[") { 3455 break; 3456 } 3457 } 3458 } 3459 } 3460 if (!keys.length) { 3461 keys = [key]; 3462 } 3463 for (j = 0; j < keys[0].length; j++) {
3464 chr = keys[0].charAt(j); 3465 if (chr === " " || chr === "." || chr === "[") { 3466 keys[0] = keys[0].substr(0, j) + "_" + keys[0].substr(j + 1); 3467 } 3468 if (chr === "[") { 3469 break; 3470 } 3471 } 3472 /* jshint -W061 */ 3473 evalStr = "array"; 3474 for (j = 0; j < keys.length; j++) { 3475 key = keys[j]; 3476 if (key !== "" && key !== " " || j === 0) { 3477 key = "'" + key + "'"; 3478 } else { 3479 key = eval(evalStr + ".push([]);") - 1; 3480 } 3481 evalStr += "[" + key + "]"; 3482 if (j !== keys.length - 1 && eval("typeof " + evalStr) === "undefined") { 3483 eval(evalStr + " = [];"); 3484 } 3485 } 3486 evalStr += " = '" + value + "';\n"; 3487 eval(evalStr); 3488 /* jshint +W061 */ 3489 } 3490 } 3491 }; 3492 3493 /** 3494 * Get allowed API methods, sorted by GET or POST 3495 * Watch out for multiple-method "account/settings"! 3496 * 3497 * @return array $apimethods 3498 */ 3499 var getApiMethods = function getApiMethods() { 3500 var httpmethods = { 3501 GET: ["account/settings", "account/verify_credentials", "application/rate_limit_status", "blocks/ids", "blocks/list", "direct_messages", "direct_messages/sent", "direct_messages/show", "favorites/list", "followers/ids", "followers/list", "friends/ids", "friends/list", "friendships/incoming", "friendships/lookup", "friendships/lookup", "friendships/no_retweets/ids", "friendships/outgoing", "friendships/show", "geo/id/:place_id", "geo/reverse_geocode", "geo/search", "geo/similar_places", "help/configuration", "help/languages", "help/privacy", "help/tos", "lists/list", "lists/members", "lists/members/show", "lists/memberships", "lists/ownerships", "lists/show", "lists/statuses", "lists/subscribers", "lists/subscribers/show", "lists/subscriptions", "mutes/users/ids", "mutes/users/list", "oauth/authenticate", "oauth/authorize", "saved_searches/list", "saved_searches/show/:id", "search/tweets", "statuses/home_timeline", "statuses/mentions_timeline", "statuses/oembed", "statuses/retweeters/ids", "statuses/retweets/:id", "statuses/retweets_of_me", "statuses/show/:id", "statuses/user_timeline", "trends/available", "trends/closest", "trends/place", "users/contributees", "users/contributors", "users/profile_banner", "users/search", "users/show", "users/suggestions", "users/suggestions/:slug", "users/suggestions/:slug/members", 3502 3503 // Internal 3504 "users/recommendations", "account/push_destinations/device", "activity/about_me", "activity/by_friends", "statuses/media_timeline", "timeline/home", "help/experiments", "search/typeahead", "search/universal", "discover/universal", "conversation/show", "statuses/:id/activity/summary", "account/login_verification_enrollment", "account/login_verification_request", "prompts/suggest", "beta/timelines/custom/list", "beta/timelines/timeline", "beta/timelines/custom/show"], 3505 POST: ["account/remove_profile_banner", "account/settings__post", "account/update_delivery_device", "account/update_profile", "account/update_profile_background_image", "account/update_profile_banner", "account/update_profile_colors", "account/update_profile_image", "blocks/create", "blocks/destroy", "direct_messages/destroy", "direct_messages/new", "favorites/create", "favorites/destroy", "friendships/create", "friendships/destroy", "friendships/update", "lists/create", "lists/destroy", "lists/members/create", "lists/members/create_all", "lists/members/destroy", "lists/members/destroy_all", "lists/subscribers/create", "lists/subscribers/destroy", "lists/update", "media/upload", "mutes/users/create", "mutes/users/destroy", "oauth/access_token", "oauth/request_token", "oauth2/invalidate_token", "oauth2/token", "saved_searches/create", "saved_searches/destroy/:id", "statuses/destroy/:id", "statuses/lookup", "statuses/retweet/:id", "statuses/update", "statuses/update_with_media", // deprecated, use media/upload 3506 "users/lookup", "users/report_spam", 3507 3508 // Internal 3509 "direct_messages/read", "account/login_verification_enrollment__post", "push_destinations/enable_login_verification", "account/login_verification_request__post", "beta/timelines/custom/create", "beta/timelines/custom/update", "beta/timelines/custom/destroy", "beta/timelines/custom/add", "beta/timelines/custom/remove"] 3510 }; 3511 return httpmethods; 3512 }; 3513 3514 /** 3515 * Main API handler working on any requests you issue 3516 * 3517 * @param string fn The member function you called 3518 * @param array params The parameters you sent along 3519 * @param function callback The callback to call with the reply 3520 * @param bool app_only_auth Whether to use app-only auth 3521 * 3522 * @return mixed The API reply encoded in the set return_format 3523 */ 3524 3525 var __call = function __call(fn, params, callback, app_only_auth) { 3526 if (typeof params === "undefined") { 3527 params = {}; 3528 } 3529 if (typeof app_only_auth === "undefined") { 3530 app_only_auth = false;
3531 } 3532 if (typeof callback !== "function" && typeof params === "function") { 3533 callback = params; 3534 params = {}; 3535 if (typeof callback === "boolean") { 3536 app_only_auth = callback; 3537 } 3538 } else if (typeof callback === "undefined") { 3539 callback = function callback() {}; 3540 } 3541 switch (fn) { 3542 case "oauth_authenticate": 3543 case "oauth_authorize": 3544 return this[fn](params, callback); 3545 3546 case "oauth2_token": 3547 return this[fn](callback); 3548 } 3549 // reset token when requesting a new token (causes 401 for signature error on 2nd+ requests) 3550 if (fn === "oauth_requestToken") { 3551 setToken(null, null); 3552 } 3553 // parse parameters 3554 var apiparams = {}; 3555 if ((typeof params === "undefined" ? "undefined" : _typeof(params)) === "object") { 3556 apiparams = params; 3557 } else { 3558 _parse_str(params, apiparams); //TODO 3559 } 3560 3561 // map function name to API method 3562 var method = ""; 3563 var param, i, j; 3564 3565 // replace _ by / 3566 var path = fn.split("_"); 3567 for (i = 0; i < path.length; i++) { 3568 if (i > 0) { 3569 method += "/"; 3570 } 3571 method += path[i]; 3572 } 3573 3574 // undo replacement for URL parameters 3575 var url_parameters_with_underscore = ["screen_name", "place_id"]; 3576 for (i = 0; i < url_parameters_with_underscore.length; i++) { 3577 param = url_parameters_with_underscore[i].toUpperCase(); 3578 var replacement_was = param.split("_").join("/"); 3579 method = method.split(replacement_was).join(param); 3580 } 3581 3582 // replace AA by URL parameters 3583 var method_template = method; 3584 var match = method.match(/[A-Z_]{2,}/); 3585 if (match) { 3586 for (i = 0; i < match.length; i++) { 3587 param = match[i]; 3588 var param_l = param.toLowerCase(); 3589 method_template = method_template.split(param).join(":" + param_l); 3590 if (typeof apiparams[param_l] === "undefined") { 3591 for (j = 0; j < 26; j++) { 3592 method_template = method_template.split(String.fromCharCode(65 + j)).join("_" + String.fromCharCode(97 + j)); 3593 } 3594 console.warn("To call the templated method \"" + method_template + "\", specify the parameter value for \"" + param_l + "\"."); 3595 } 3596 method = method.split(param).join(apiparams[param_l]); 3597 delete apiparams[param_l]; 3598 } 3599 } 3600 3601 // replace A-Z by _a-z 3602 for (i = 0; i < 26; i++) { 3603 method = method.split(String.fromCharCode(65 + i)).join("_" + String.fromCharCode(97 + i)); 3604 method_template = method_template.split(String.fromCharCode(65 + i)).join("_" + String.fromCharCode(97 + i)); 3605 } 3606 3607 var httpmethod = _detectMethod(method_template, apiparams); 3608 var multipart = _detectMultipart(method_template); 3609 var internal = _detectInternal(method_template); 3610 3611 return _callApi(httpmethod, method, apiparams, multipart, app_only_auth, internal, callback); 3612 }; 3613 3614 /** 3615 * Gets the OAuth authenticate URL for the current request token 3616 * 3617 * @return string The OAuth authenticate URL 3618 */ 3619 var oauth_authenticate = function oauth_authenticate(params, callback) { 3620 if (typeof params.force_login === "undefined") { 3621 params.force_login = null; 3622 } 3623 if (typeof params.screen_name === "undefined") { 3624 params.screen_name = null; 3625 } 3626 if (_oauth_token === null) { 3627 console.warn("To get the authenticate URL, the OAuth token must be set."); 3628 } 3629 var url = _endpoint_oauth + "oauth/authenticate?oauth_token=" + _url(_oauth_token); 3630 if (params.force_login === true) { 3631 url += "&force_login=1"; 3632 if (params.screen_name !== null) { 3633 url += "&screen_name=" + params.screen_name; 3634 } 3635 } 3636 callback(url); 3637 return true; 3638 }; 3639 3640 /** 3641 * Gets the OAuth authorize URL for the current request token 3642 * 3643 * @return string The OAuth authorize URL 3644 */ 3645 var oauth_authorize = function oauth_authorize(params, callback) { 3646 if (typeof params.force_login === "undefined") { 3647 params.force_login = null; 3648 } 3649 if (typeof params.screen_name === "undefined") { 3650 params.screen_name = null; 3651 } 3652 if (_oauth_token === null) { 3653 console.warn("To get the authorize URL, the OAuth token must be set."); 3654 } 3655 var url = _endpoint_oauth + "oauth/authorize?oauth_token=" + _url(_oauth_token); 3656 if (params.force_login === true) { 3657 url += "&force_login=1"; 3658 if (params.screen_name !== null) { 3659 url += "&screen_name=" + params.screen_name; 3660 } 3661 } 3662 callback(url); 3663 return true; 3664 }; 3665 3666 /** 3667 * Gets the OAuth bearer token 3668 * 3669 * @return string The OAuth bearer token 3670 */ 3671 3672 var oauth2_token = function oauth2_token(callback) { 3673 if (_oauth_consumer_key === null) { 3674 console.warn("To obtain a bearer token, the consumer key must be set."); 3675 } 3676 3677 if (typeof callback === "undefined") { 3678 callback = function callback() {}; 3679 } 3680 3681 var post_fields = "grant_type=client_credentials"; 3682 var url = _endpoint_oauth + "oauth2/token"; 3683 3684 if (_use_proxy) { 3685 url = url.replace(_endpoint_base, _endpoint_proxy); 3686 } 3687 3688 var xml = _getXmlRequestObject(); 3689 if (xml === null) { 3690 return; 3691 } 3692 xml.open("POST", url, true); 3693 xml.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 3694 xml.setRequestHeader((_use_proxy ? "X-" : "") + "Authorization", "Basic " + _base64_encode(_oauth_consumer_key + ":" + _oauth_consumer_secret)); 3695 3696 xml.onreadystatechange = function () { 3697 if (xml.readyState >= 4) { 3698 var httpstatus = 12027; 3699 try { 3700 httpstatus = xml.status; 3701 } catch (e) {} 3702 var response = ""; 3703 try { 3704 response = xml.responseText; 3705 } catch (e) {} 3706 var reply = _parseApiReply(response); 3707 reply.httpstatus = httpstatus; 3708 if (httpstatus === 200) { 3709 setBearerToken(reply.access_token); 3710 } 3711 callback(reply); 3712 } 3713 }; 3714 xml.send(post_fields); 3715 }; 3716 3717 /** 3718 * Signing helpers 3719 */ 3720 3721 /** 3722 * URL-encodes the given data 3723 * 3724 * @param mixed data 3725 * 3726 * @return mixed The encoded data 3727 */ 3728 var _url = function _url(data) { 3729 if (/boolean|number|string/.test(typeof data === "undefined" ? "undefined" : _typeof(data))) { 3730 return encodeURIComponent(data).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A"); 3731 } else { 3732 return ""; 3733 } 3734 }; 3735 3736 /** 3737 * Gets the base64-encoded SHA1 hash for the given data 3738 * 3739 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined 3740 * in FIPS PUB 180-1 3741 * Based on version 2.1 Copyright Paul Johnston 2000 - 2002. 3742 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 3743 * Distributed under the BSD License 3744 * See http://pajhome.org.uk/crypt/md5 for details. 3745 * 3746 * @param string data The data to calculate the hash from 3747 * 3748 * @return string The hash 3749 */ 3750 var _sha1 = function () { 3751 function n(e, b) { 3752 e[b >> 5] |= 128 << 24 - b % 32; 3753 e[(b + 64 >> 9 << 4) + 15] = b; 3754 for (var c = new Array(80), a = 1732584193, d = -271733879, h = -1732584194, k = 271733878, g = -1009589776, p = 0; p < e.length; p += 16) { 3755 for (var o = a, q = d, r = h, s = k, t = g, f = 0; 80 > f; f++) { 3756 var m; 3757 3758 if (f < 16) { 3759 m = e[p + f]; 3760 } else { 3761 m = c[f - 3] ^ c[f - 8] ^ c[f - 14] ^ c[f - 16]; 3762 m = m << 1 | m >>> 31; 3763 } 3764 3765 c[f] = m; 3766 m = l(l(a << 5 | a >>> 27, 20 > f ? d & h | ~d & k : 40 > f ? d ^ h ^ k : 60 > f ? d & h | d & k | h & k : d ^ h ^ k), l(l(g, c[f]), 20 > f ? 1518500249 : 40 > f ? 1859775393 : 60 > f ? -1894007588 : -899497514)); 3767 g = k; 3768 k = h; 3769 h = d << 30 | d >>> 2; 3770 d = a; 3771 a = m; 3772 } 3773 a = l(a, o); 3774 d = l(d, q); 3775 h = l(h, r); 3776 k = l(k, s); 3777 g = l(g, t); 3778 } 3779 return [a, d, h, k, g]; 3780 } 3781 3782 function l(e, b) { 3783 var c = (e & 65535) + (b & 65535); 3784 return (e >> 16) + (b >> 16) + (c >> 16) << 16 | c & 65535; 3785 } 3786 3787 function q(e) { 3788 for (var b = [], c = (1 << g) - 1, a = 0; a < e.length * g; a += g) { 3789 b[a >> 5] |= (e.charCodeAt(a / g) & c) << 24 - a % 32; 3790 } 3791 return b; 3792 } 3793 var g = 8; 3794 return function (e) { 3795 var b = _oauth_consumer_secret + "&" + (null !== _oauth_token_secret ? _oauth_token_secret : ""); 3796 if (_oauth_consumer_secret === null) { 3797 console.warn("To generate a hash, the consumer secret must be set."); 3798 } 3799 var c = q(b); 3800 if (c.length > 16) { 3801 c = n(c, b.length * g); 3802 } 3803 b = new Array(16); 3804 for (var a = new Array(16), d = 0; d < 16; d++) { 3805 a[d] = c[d] ^ 909522486; 3806 b[d] = c[d] ^ 1549556828; 3807 } 3808 c = n(a.concat(q(e)), 512 + e.length * g); 3809 b = n(b.concat(c), 672); 3810 c = ""; 3811 for (a = 0; a < 4 * b.length; a += 3) { 3812 for (d = (b[a >> 2] >> 8 * (3 - a % 4) & 255) << 16 | (b[a + 1 >> 2] >> 8 * (3 - (a + 1) % 4) & 255) << 8 | b[a + 2 >> 2] >> 8 * (3 - (a + 2) % 4) & 255, e = 0; 4 > e; e++) { 3813 c = 8 * a + 6 * e > 32 * b.length ? c + "=" : c + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
3813+/".charAt(d >> 6 * (3 - e) & 63); 3814 } 3815 } 3816 return c; 3817 }; 3818 }(); 3819 3820 /* 3821 * Gets the base64 representation for the given data 3822 * 3823 * http://phpjs.org 3824 * + original by: Tyler Akins (http://rumkin.com) 3825 * + improved by: Bayron Guevara 3826 * + improved by: Thunder.m 3827 * + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 3828 * + bugfixed by: Pellentesque Malesuada 3829 * + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 3830 * + improved by: Rafał Kukawski (http://kukawski.pl) 3831 * 3832 * @param string data The data to calculate the base64 representation from 3833 * 3834 * @return string The base64 representation 3835 */ 3836 var _base64_encode = function _base64_encode(a) { 3837 var d, 3838 e, 3839 f, 3840 b, 3841 g = 0, 3842 h = 0, 3843 i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", 3844 c = []; 3845 if (!a) { 3846 return a; 3847 } 3848 do { 3849 d = a.charCodeAt(g++); 3850 e = a.charCodeAt(g++); 3851 f = a.charCodeAt(g++); 3852 b = d << 16 | e << 8 | f; 3853 d = b >> 18 & 63; 3854 e = b >> 12 & 63; 3855 f = b >> 6 & 63; 3856 b &= 63; 3857 c[h++] = i.charAt(d) + i.charAt(e) + i.charAt(f) + i.charAt(b); 3858 } while (g < a.length); 3859 c = c.join(""); 3860 a = a.length % 3; 3861 return (a ? c.slice(0, a - 3) : c) + "===".slice(a || 3); 3862 }; 3863 3864 /* 3865 * Builds a HTTP query string from the given data 3866 * 3867 * http://phpjs.org 3868 * + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 3869 * + improved by: Legaev Andrey 3870 * + improved by: Michael White (http://getsprink.com) 3871 * + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 3872 * + improved by: Brett Zamir (http://brett-zamir.me) 3873 * + revised by: stag019 3874 * + input by: Dreamer 3875 * + bugfixed by: Brett Zamir (http://brett-zamir.me) 3876 * + bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/) 3877 * 3878 * @param string data The data to concatenate 3879 * 3880 * @return string The HTTP query 3881 */ 3882 var _http_build_query = function _http_build_query(e, f, b) { 3883 function g(c, a, d) { 3884 var b, 3885 e = []; 3886 if (a === true) { 3887 a = "1"; 3888 } else if (a === false) { 3889 a = "0"; 3890 } 3891 if (null !== a) { 3892 if ((typeof a === "undefined" ? "undefined" : _typeof(a)) === "object") { 3893 for (b in a) { 3894 if (a[b] !== null) { 3895 e.push(g(c + "[" + b + "]", a[b], d)); 3896 } 3897 } 3898 return e.join(d); 3899 } 3900 if (typeof a !== "function") { 3901 return _url(c) + "=" + _url(a); 3902 } 3903 console.warn("There was an error processing for http_build_query()."); 3904 } else { 3905 return ""; 3906 } 3907 } 3908 var d, 3909 c, 3910 h = []; 3911 if (!b) { 3912 b = "&"; 3913 } 3914 for (c in e) { 3915 d = e[c]; 3916 if (f && !isNaN(c)) { 3917 c = String(f) + c; 3918 } 3919 d = g(c, d, b); 3920 if (d !== "") { 3921 h.push(d); 3922 } 3923 } 3924 return h.join(b); 3925 }; 3926 3927 /** 3928 * Generates a (hopefully) unique random string 3929 * 3930 * @param int optional length The length of the string to generate 3931 * 3932 * @return string The random string 3933 */ 3934 var _nonce = function _nonce(length) { 3935 if (typeof length === "undefined") { 3936 length = 8; 3937 } 3938 if (length < 1) { 3939 console.warn("Invalid nonce length."); 3940 } 3941 var nonce = ""; 3942 for (var i = 0; i < length; i++) { 3943 var character = Math.floor(Math.random() * 61); 3944 nonce += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".substring(character, character + 1); 3945 } 3946 return nonce; 3947 }; 3948 3949 /** 3950 * Sort array elements by key 3951 * 3952 * @param array input_arr The array to sort 3953 * 3954 * @return array The sorted keys 3955 */ 3956 var _ksort = function _ksort(input_arr) { 3957 var keys = [], 3958 sorter, 3959 k; 3960 3961 sorter = function sorter(a, b) { 3962 var a_float = parseFloat(a), 3963 b_float = parseFloat(b), 3964 a_numeric = a_float + "" === a, 3965 b_numeric = b_float + "" === b; 3966 if (a_numeric && b_numeric) { 3967 return a_float > b_float ? 1 : a_float < b_float ? -1 : 0; 3968 } else if (a_numeric && !b_numeric) { 3969 return 1; 3970 } else if (!a_numeric && b_numeric) { 3971 return -1; 3972 } 3973 return a > b ? 1 : a < b ? -1 : 0; 3974 }; 3975 3976 // Make a list of key names 3977 for (k in input_arr) { 3978 if (input_arr.hasOwnProperty(k)) { 3979 keys.push(k); 3980 } 3981 } 3982 keys.sort(sorter); 3983 return keys; 3984 }; 3985 3986 /** 3987 * Clone objects 3988 * 3989 * @param object obj The object to clone 3990 * 3991 * @return object clone The cloned object 3992 */ 3993 var _clone = function _clone(obj) { 3994 var clone = {}; 3995 for (var i in obj) { 3996 if (_typeof(obj[i]) === "object") { 3997 clone[i] = _clone(obj[i]); 3998 } else { 3999 clone[i] = obj[i]; 4000 } 4001 } 4002 return clone; 4003 }; 4004 4005 /** 4006 * Generates an OAuth signature 4007 * 4008 * @param string httpmethod Usually either 'GET' or 'POST' or 'DELETE' 4009 * @param string method The API method to call 4010 * @param array optional params The API call parameters, associative 4011 * @param bool optional append_to_get Whether to append the OAuth params to GET 4012 * 4013 * @return string Authorization HTTP header 4014 */ 4015 var _sign = function _sign(httpmethod, method, params, append_to_get) { 4016 if (typeof params === "undefined") { 4017 params = {}; 4018 } 4019 if (typeof append_to_get === "undefined") { 4020 append_to_get = false;
4021 } 4022 if (_oauth_consumer_key === null) { 4023 console.warn("To generate a signature, the consumer key must be set."); 4024 } 4025 var sign_params = { 4026 consumer_key: _oauth_consumer_key, 4027 version: "1.0", 4028 timestamp: Math.round(new Date().getTime() / 1000), 4029 nonce: _nonce(), 4030 signature_method: "HMAC-SHA1" 4031 }; 4032 var sign_base_params = {}; 4033 var value; 4034 for (var key in sign_params) { 4035 value = sign_params[key]; 4036 sign_base_params["oauth_" + key] = _url(value); 4037 } 4038 if (_oauth_token !== null) { 4039 sign_base_params.oauth_token = _url(_oauth_token); 4040 } 4041 var oauth_params = _clone(sign_base_params); 4042 for (key in params) { 4043 value = params[key]; 4044 sign_base_params[key] = value; 4045 } 4046 var keys = _ksort(sign_base_params); 4047 var sign_base_string = ""; 4048 for (var i = 0; i < keys.length; i++) { 4049 key = keys[i]; 4050 value = sign_base_params[key]; 4051 sign_base_string += key + "=" + _url(value) + "&"; 4052 } 4053 sign_base_string = sign_base_string.substring(0, sign_base_string.length - 1); 4054 var signature = _sha1(httpmethod + "&" + _url(method) + "&" + _url(sign_base_string)); 4055 4056 params = append_to_get ? sign_base_params : oauth_params; 4057 params.oauth_signature = signature; 4058 keys = _ksort(params); 4059 var authorization = ""; 4060 if (append_to_get) { 4061 for (i = 0; i < keys.length; i++) { 4062 key = keys[i]; 4063 value = params[key]; 4064 authorization += key + "=" + _url(value) + "&"; 4065 } 4066 return authorization.substring(0, authorization.length - 1); 4067 } 4068 authorization = "OAuth "; 4069 for (i = 0; i < keys.length; i++) { 4070 key = keys[i]; 4071 value = params[key]; 4072 authorization += key + "=\"" + _url(value) + "\", "; 4073 } 4074 return authorization.substring(0, authorization.length - 2); 4075 }; 4076 4077 /** 4078 * Detects HTTP method to use for API call 4079 * 4080 * @param string method The API method to call 4081 * @param array params The parameters to send along 4082 * 4083 * @return string The HTTP method that should be used 4084 */ 4085 var _detectMethod = function _detectMethod(method, params) { 4086 // multi-HTTP method endpoints 4087 switch (method) { 4088 case "account/settings": 4089 case "account/login_verification_enrollment": 4090 case "account/login_verification_request": 4091 method = params.length ? method + "__post" : method; 4092 break; 4093 } 4094 4095 var apimethods = getApiMethods(); 4096 for (var httpmethod in apimethods) { 4097 if (apimethods[httpmethod].indexOf(method) > -1) { 4098 return httpmethod; 4099 } 4100 } 4101 console.warn("Can't find HTTP method to use for \"" + method + "\"."); 4102 }; 4103 4104 /** 4105 * Detects if API call should use multipart/form-data 4106 * 4107 * @param string method The API method to call 4108 * 4109 * @return bool Whether the method should be sent as multipart 4110 */ 4111 var _detectMultipart = function _detectMultipart(method) { 4112 var multiparts = [ 4113 // Tweets 4114 "statuses/update_with_media", 4115 4116 // Users 4117 "account/update_profile_background_image", "account/update_profile_image", "account/update_profile_banner"]; 4118 return multiparts.indexOf(method) > -1; 4119 }; 4120 4121 /** 4122 * Build multipart request from upload params 4123 * 4124 * @param string method The API method to call
4125 * @param array params The parameters to send along 4126 * 4127 * @return null|string The built multipart request body 4128 */ 4129 var _buildMultipart = function _buildMultipart(method, params) { 4130 // well, files will only work in multipart methods 4131 if (!_detectMultipart(method)) { 4132 return; 4133 } 4134 4135 // only check specific parameters 4136 var possible_methods = [ 4137 // Tweets 4138 "statuses/update_with_media", 4139 // Accounts 4140 "account/update_profile_background_image", "account/update_profile_image", "account/update_profile_banner"]; 4141 var possible_files = { 4142 // Tweets 4143 "statuses/update_with_media": "media[]", 4144 // Accounts 4145 "account/update_profile_background_image": "image", 4146 "account/update_profile_image": "image", 4147 "account/update_profile_banner": "banner" 4148 }; 4149 // method might have files? 4150 if (possible_methods.indexOf(method) === -1) { 4151 return; 4152 } 4153 4154 // check for filenames 4155 possible_files = possible_files[method].split(" "); 4156 4157 var multipart_border = "--------------------" + _nonce(); 4158 var multipart_request = ""; 4159 for (var key in params) { 4160 multipart_request += "--" + multipart_border + "\r\n" + "Content-Disposition: form-data; name=\"" + key + "\""; 4161 if (possible_files.indexOf(key) > -1) { 4162 multipart_request += "\r\nContent-Transfer-Encoding: base64"; 4163 } 4164 multipart_request += "\r\n\r\n" + params[key] + "\r\n"; 4165 } 4166 multipart_request += "--" + multipart_border + "--"; 4167 return multipart_request; 4168 }; 4169 4170 /** 4171 * Detects if API call is internal 4172 * 4173 * @param string method The API method to call 4174 * 4175 * @return bool Whether the method is defined in internal API 4176 */ 4177 var _detectInternal = function _detectInternal(method) { 4178 var internals = ["users/recommendations"]; 4179 return internals.join(" ").indexOf(method) > -1; 4180 }; 4181 4182 /** 4183 * Detects if API call should use media endpoint 4184 * 4185 * @param string method The API method to call 4186 * 4187 * @return bool Whether the method is defined in media API 4188 */ 4189 var _detectMedia = function _detectMedia(method) { 4190 var medias = ["media/upload"]; 4191 return medias.join(" ").indexOf(method) > -1; 4192 }; 4193 4194 /** 4195 * Detects if API call should use old endpoint 4196 * 4197 * @param string method The API method to call 4198 * 4199 * @return bool Whether the method is defined in old API 4200 */ 4201 var _detectOld = function _detectOld(method) { 4202 var olds = ["account/push_destinations/device"]; 4203 return olds.join(" ").indexOf(method) > -1; 4204 }; 4205 4206 /** 4207 * Builds the complete API endpoint url 4208 * 4209 * @param string method The API method to call 4210 * 4211 * @return string The URL to send the request to 4212 */ 4213 var _getEndpoint = function _getEndpoint(method) { 4214 var url; 4215 if (method.substring(0, 5) === "oauth") { 4216 url = _endpoint_oauth + method; 4217 } else if (_detectMedia(method)) { 4218 url = _endpoint_media + method + ".json"; 4219 } else if (_detectOld(method)) { 4220 url = _endpoint_old + method + ".json"; 4221 } else { 4222 url = _endpoint + method + ".json"; 4223 } 4224 return url; 4225 }; 4226 4227 /** 4228 * Gets the XML HTTP Request object, trying to load it in various ways 4229 * 4230 * @return object The XMLHttpRequest object instance 4231 */ 4232 var _getXmlRequestObject = function _getXmlRequestObject() { 4233 var xml = null; 4234 // first, try the W3-standard object 4235 if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window && typeof window.XMLHttpRequest !== "undefined") { 4236 xml = new window.XMLHttpRequest(); 4237 // then, try Titanium framework object 4238 } else if ((typeof Ti === "undefined" ? "undefined" : _typeof(Ti)) === "object" && Ti && typeof Ti.Network.createHTTPClient !== "undefined") { 4239 xml = Ti.Network.createHTTPClient(); 4240 // are we in an old Internet Explorer? 4241 } else if (typeof ActiveXObject !== "undefined") { 4242 try { 4243 xml = new ActiveXObject("Microsoft.XMLHTTP"); 4244 } catch (e) { 4245 console.error("ActiveXObject object not defined."); 4246 } 4247 // now, consider RequireJS and/or Node.js objects 4248 } else if (true) { 4249 console.log('no xhr available'); 4250 // // look for xmlhttprequest module 4251 // try { 4252 // var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; 4253 // xml = new XMLHttpRequest(); 4254 // } catch (e1) { 4255 // // or maybe the user is using xhr2 4256 // try { 4257 // var XMLHttpRequest = require("xhr2"); 4258 // xml = new XMLHttpRequest(); 4259 // } catch (e2) { 4260 // console.error("xhr2 object not defined, cancelling."); 4261 // } 4262 // } 4263 } 4264 return xml; 4265 }; 4266 4267 /** 4268 * Calls the API using cURL 4269 * 4270 * @param string httpmethod The HTTP method to use for making the request 4271 * @param string method The API method to call 4272 * @param array optional params The parameters to
4272send along 4273 * @param bool optional multipart Whether to use multipart/form-data 4274 * @param bool optional app_only_auth Whether to use app-only bearer authentication 4275 * @param bool optional internal Whether to use internal call 4276 * @param function callback The function to call with the API call result 4277 * 4278 * @return mixed The API reply, encoded in the set return_format 4279 */ 4280 4281 var _callApi = function _callApi(httpmethod, method, params, multipart, app_only_auth, internal, callback) { 4282 if (typeof params === "undefined") { 4283 params = {}; 4284 } 4285 if (typeof multipart === "undefined") { 4286 multipart = false; 4287 } 4288 if (typeof app_only_auth === "undefined") { 4289 app_only_auth = false; 4290 } 4291 if (typeof callback !== "function") { 4292 callback = function callback() {}; 4293 } 4294 if (internal) { 4295 params.adc = "phone"; 4296 params.application_id = 333903271; 4297 } 4298 4299 var url = _getEndpoint(method); 4300 var authorization = null; 4301 4302 var xml = _getXmlRequestObject(); 4303 if (xml === null) { 4304 return; 4305 } 4306 var post_fields; 4307 4308 if (httpmethod === "GET") { 4309 var url_with_params = url; 4310 if (JSON.stringify(params) !== "{}") { 4311 url_with_params += "?" + _http_build_query(params); 4312 } 4313 if (!app_only_auth) { 4314 authorization = _sign(httpmethod, url, params); 4315 } 4316 4317 // append auth params to GET url for IE7-9, to send via JSONP 4318 if (_use_jsonp) { 4319 if (JSON.stringify(params) !== "{}") { 4320 url_with_params += "&"; 4321 } else { 4322 url_with_params += "?"; 4323 } 4324 var callback_name = _nonce(); 4325 window[callback_name] = function (reply) { 4326 reply.httpstatus = 200; 4327 4328 var rate = null; 4329 if (typeof xml.getResponseHeader !== "undefined" && xml.getResponseHeader("x-rate-limit-limit") !== "") { 4330 rate = { 4331 limit: xml.getResponseHeader("x-rate-limit-limit"), 4332 remaining: xml.getResponseHeader("x-rate-limit-remaining"), 4333 reset: xml.getResponseHeader("x-rate-limit-reset") 4334 }; 4335 } 4336 callback(reply, rate); 4337 }; 4338 params.callback = callback_name; 4339 url_with_params = url + "?" + _sign(httpmethod, url, params, true); 4340 var tag = document.createElement("script"); 4341 tag.type = "text/javascript"; 4342 tag.src = url_with_params; 4343 var body = document.getElementsByTagName("body")[0]; 4344 body.appendChild(tag); 4345 return; 4346 } else if (_use_proxy) { 4347 url_with_params = url_with_params.replace(_endpoint_base, _endpoint_proxy).replace(_endpoint_base_media, _endpoint_proxy); 4348 } 4349 xml.open(httpmethod, url_with_params, true); 4350 } else { 4351 if (_use_jsonp) { 4352 console.warn("Sending POST requests is not supported for IE7-9."); 4353 return; 4354 } 4355 if (multipart) { 4356 if (!app_only_auth) { 4357 authorization = _sign(httpmethod, url, {}); 4358 } 4359 params = _buildMultipart(method, params); 4360 } else { 4361 if (!app_only_auth) { 4362 authorization = _sign(httpmethod, url, params); 4363 } 4364 params = _http_build_query(params); 4365 } 4366 post_fields = params; 4367 if (_use_proxy || multipart) { 4368 // force proxy for multipart base64 4369 url = url.replace(_endpoint_base, _endpoint_proxy).replace(_endpoint_base_media, _endpoint_proxy); 4370 } 4371 xml.open(httpmethod, url, true); 4372 if (multipart) { 4373 xml.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + post_fields.split("\r\n")[0].substring(2)); 4374 } else { 4375 xml.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 4376 } 4377 } 4378 if (app_only_auth) { 4379 if (_oauth_consumer_key === null && _oauth_bearer_token === null) { 4380 console.warn("To make an app-only auth API request, consumer key or bearer token must be set."); 4381 } 4382 // automatically fetch bearer token, if necessary 4383 if (_oauth_bearer_token === null) { 4384 return oauth2_token(function () { 4385 _callApi(httpmethod, method, params, multipart, app_only_auth, false, callback); 4386 }); 4387 } 4388 authorization = "Bearer " + _oauth_bearer_token; 4389 } 4390 if (authorization !== null) { 4391 xml.setRequestHeader((_use_proxy ? "X-" : "") + "Authorization", authorization); 4392 } 4393 xml.onreadystatechange = function () { 4394 if (xml.readyState >= 4) { 4395 var httpstatus = 12027; 4396 try { 4397 httpstatus = xml.status; 4398 } catch (e) {} 4399 var response = ""; 4400 try { 4401 response = xml.responseText; 4402 } catch (e) {} 4403 var reply = _parseApiReply(response); 4404 reply.httpstatus = httpstatus; 4405 var rate = null; 4406 if (typeof xml.getResponseHeader !== "undefined" && xml.getResponseHeader("x-rate-limit-limit") !== "") { 4407 rate = { 4408 limit: xml.getResponseHeader("x-rate-limit-limit"), 4409 remaining: xml.getResponseHeader("x-rate-limit-remaining"), 4410 reset: xml.getResponseHeader("x-rate-limit-reset") 4411 }; 4412 } 4413 callback(reply, rate); 4414 } 4415 }; 4416 xml.send(httpmethod === "GET" ? null : post_fields); 4417 return true; 4418 }; 4419 4420 /** 4421 * Parses the API reply to encode it in the set return_format 4422 * 4423 * @param string reply The actual reply, JSON-encoded or URL-encoded 4424 * 4425 * @return array|object The parsed reply 4426 */ 4427 var _parseApiReply = function _parseApiReply(reply) { 4428 if (typeof reply !== "string" || reply === "") { 4429 return {}; 4430 } 4431 if (reply === "[]") { 4432 return []; 4433 } 4434 var parsed; 4435 try { 4436 parsed = JSON.parse(reply); 4437 } catch (e) { 4438 parsed = {}; 4439 if (reply.indexOf("<" + "?xml version=\"1.0\" encoding=\"UTF-8\"?" + ">") === 0) { 4440 // we received XML... 4441 // since this only happens for errors, 4442 // don't perform a full decoding 4443 parsed.request = reply.match(/<request>(.*)<\/request>/)[1]; 4444 parsed.error = reply.match(/<error>(.*)<\/error>/)[1]; 4445 } else { 4446 // assume query format 4447 var elements = reply.split("&"); 4448 for (var i = 0; i < elements.length; i++) { 4449 var element = elements[i].split("=", 2); 4450 if (element.length > 1) { 4451 parsed[element[0]] = decodeURIComponent(element[1]); 4452 } else { 4453 parsed[element[0]] = null; 4454 } 4455 } 4456 } 4457 } 4458 return parsed; 4459 }; 4460 4461 return { 4462 setConsumerKey: setConsumerKey, 4463 getVersion: getVersion, 4464 setToken: setToken, 4465 setBearerToken: setBearerToken, 4466 setUseProxy: setUseProxy, 4467 setProxy: setProxy, 4468 getApiMethods: getApiMethods,
4469 __call: __call, 4470 oauth_authenticate: oauth_authenticate, 4471 oauth_authorize: oauth_authorize, 4472 oauth2_token: oauth2_token 4473 }; 4474 }; 4475 4476 if (( false ? "undefined" : _typeof(module)) === "object" && module && _typeof(module.exports) === "object") { 4477 // Expose codebird as module.exports in loaders that implement the Node 4478 // module pattern (including browserify). Do not create the global, since 4479 // the user will be storing it themselves locally, and globals are frowned 4480 // upon in the Node module world. 4481 module.exports = Codebird; 4482 } else { 4483 // Otherwise expose codebird to the global object as usual 4484 if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window) { 4485 window.Codebird = Codebird; 4486 } 4487 4488 // Register as a named AMD module, since codebird can be concatenated with other 4489 // files that may use define, but not via a proper concatenation script that 4490 // understands anonymous AMD modules. A named AMD is safest and most robust 4491 // way to register. Lowercase codebird is used because AMD module names are 4492 // derived from file names, and codebird is normally delivered in a lowercase 4493 // file name. Do this after creating the global so that if an AMD module wants 4494 // to call noConflict to hide this version of codebird, it will work. 4495 if (true) { 4496 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { 4497 return Codebird; 4498 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 4499 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 4500 } 4501 } 4502})(); 4503/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)(module))) 4504 4505/***/ }), 4506/* 19 */ 4507/***/ (function(module, exports, __webpack_require__) { 4508 4509"use strict"; 4510var __WEBPACK_AMD_DEFINE_RESULT__; 4511 4512// doT.js 4513// 2011, Laura Doktorova, https://github.com/olado/doT 4514// Licensed under the MIT license. 4515 4516(function () { 4517 "use strict"; 4518 4519 var doT = { 4520 version: '1.0.1', 4521 templateSettings: { 4522 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, 4523 interpolate: /\{\{=([\s\S]+?)\}\}/g, 4524 encode: /\{\{!([\s\S]+?)\}\}/g, 4525 use: /\{\{#([\s\S]+?)\}\}/g, 4526 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, 4527 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, 4528 defineParams: /^\s*([\w$]+):([\s\S]+)/, 4529 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, 4530 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, 4531 varname: 'it', 4532 strip: true, 4533 append: true, 4534 selfcontained: false 4535 }, 4536 template: undefined, //fn, compile template 4537 compile: undefined //fn, for express 4538 }, 4539 global; 4540 4541 if (typeof module !== 'undefined' && module.exports) { 4542 module.exports = doT; 4543 } else if (true) { 4544 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { 4545 return doT; 4546 }).call(exports, __webpack_require__, exports, module), 4547 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 4548 } else { 4549 global = function () { 4550 return this || (0, eval)('this'); 4551 }(); 4552 global.doT = doT; 4553 } 4554 4555 function encodeHTMLSource() { 4556 var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/' }, 4557 matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g; 4558 return function () { 4559 return this ? this.replace(matchHTML, function (m) { 4560 return encodeHTMLRules[m] || m; 4561 }) : this; 4562 }; 4563 } 4564 String.prototype.encodeHTML = encodeHTMLSource(); 4565 4566 var startend = { 4567 append: { start: "'+(", end: ")+'", endencode: "||'').toString().encodeHTML()+'" }, 4568 split: { start: "';out+=(", end: ");out+='", endencode: "||'').toString().encodeHTML();out+='" } 4569 }, 4570 skip = /$^/; 4571 4572 function resolveDefs(c, block, def) { 4573 return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function (m, code, assign, value) { 4574 if (code.indexOf('def.') === 0) { 4575 code = code.substring(4); 4576 } 4577 if (!(code in def)) { 4578 if (assign === ':') { 4579 if (c.defineParams) value.replace(c.defineParams, function (m, param, v) { 4580 def[code] = { arg: param, text: v }; 4581 }); 4582 if (!(code in def)) def[code] = value; 4583 } else { 4584 new Function("def", "def['" + code + "']=" + value)(def); 4585 } 4586 } 4587 return ''; 4588 }).replace(c.use || skip, function (m, code) { 4589 if (c.useParams) code = code.replace(c.useParams, function (m, s, d, param) { 4590 if (def[d] && def[d].arg && param) { 4591 var rw = (d + ":" + param).replace(/'|\\/g, '_'); 4592 def.__exp = def.__exp || {}; 4593 def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2"); 4594 return s + "def.__exp['" + rw + "']"; 4595 } 4596 }); 4597 var v = new Function("def", "return " + code)(def); 4598 return v ? resolveDefs(c, v, def) : v; 4599 }); 4600 } 4601 4602 function unescape(code) { 4603 return code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, ' '); 4604 } 4605 4606 doT.template = function (tmpl, c, def) { 4607 c = c || doT.templateSettings; 4608 var cse = c.append ? startend.append : startend.split, 4609 needhtmlencode, 4610 sid = 0, 4611 indv, 4612 str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl; 4613 4614 str = ("var out='" + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '')
4614: str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function (m, code) { 4615 return cse.start + unescape(code) + cse.end; 4616 }).replace(c.encode || skip, function (m, code) { 4617 needhtmlencode = true; 4618 return cse.start + unescape(code) + cse.endencode; 4619 }).replace(c.conditional || skip, function (m, elsecase, code) { 4620 return elsecase ? code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='" : code ? "';if(" + unescape(code) + "){out+='" : "';}out+='"; 4621 }).replace(c.iterate || skip, function (m, iterate, vname, iname) { 4622 if (!iterate) return "';} } out+='"; 4623 sid += 1;indv = iname || "i" + sid;iterate = unescape(iterate); 4624 return "';var arr" + sid + "=" + iterate + ";if(arr" + sid + "){var " + vname + "," + indv + "=-1,l" + sid + "=arr" + sid + ".length-1;while(" + indv + "<l" + sid + "){" + vname + "=arr" + sid + "[" + indv + "+=1];out+='"; 4625 }).replace(c.evaluate || skip, function (m, code) { 4626 return "';" + unescape(code) + "out+='"; 4627 }) + "';return out;").replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '').replace(/(\s|;|\}|^|\{)out\+=''\+/g, '$1out+='); 4628 4629 if (needhtmlencode && c.selfcontained) { 4630 str = "String.prototype.encodeHTML=(" + encodeHTMLSource.toString() + "());" + str; 4631 } 4632 try { 4633 return new Function(c.varname, str); 4634 } catch (e) { 4635 if (typeof console !== 'undefined') console.log("Could not create a template function: " + str); 4636 throw e; 4637 } 4638 }; 4639 4640 doT.compile = function (tmpl, def) { 4641 return doT.template(tmpl, null, def); 4642 }; 4643})(); 4644 4645/***/ }), 4646/* 20 */ 4647/***/ (function(module, exports, __webpack_require__) { 4648 4649"use strict"; 4650/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__; 4651 4652var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 4653 4654//! moment.js 4655//! version : 2.8.3 4656//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 4657//! license : MIT 4658//! momentjs.com 4659 4660(function (undefined) { 4661 /************************************ 4662 Constants 4663 ************************************/ 4664 4665 var moment, 4666 VERSION = '2.8.3', 4667 4668 // the global-scope this is NOT the global object in Node.js 4669 globalScope = typeof global !== 'undefined' ? global : this, 4670 oldGlobalMoment, 4671 round = Math.round, 4672 hasOwnProperty = Object.prototype.hasOwnProperty, 4673 i, 4674 YEAR = 0, 4675 MONTH = 1, 4676 DATE = 2, 4677 HOUR = 3, 4678 MINUTE = 4, 4679 SECOND = 5, 4680 MILLISECOND = 6, 4681 4682 4683 // internal storage for locale config files 4684 locales = {}, 4685 4686 4687 // extra moment internal properties (plugins register props here) 4688 momentProperties = [], 4689 4690 4691 // check for nodeJS 4692 hasModule = typeof module !== 'undefined' && module.exports, 4693 4694 4695 // ASP.NET json date format regex 4696 aspNetJsonRegex = /^\/?Date\((\-?\d+)/i, 4697 aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/, 4698 4699 4700 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 4701 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 4702 isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/, 4703 4704 4705 // format tokens 4706 formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g, 4707 localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, 4708 4709 4710 // parsing token regexes 4711 parseTokenOneOrTwoDigits = /\d\d?/, 4712 // 0 - 99 4713 parseTokenOneToThreeDigits = /\d{1,3}/, 4714 // 0 - 999 4715 parseTokenOneToFourDigits = /\d{1,4}/, 4716 // 0 - 9999 4717 parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, 4718 // -999,999 - 999,999 4719 parseTokenDigits = /\d+/, 4720 // nonzero number of digits 4721 parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, 4722 // any word (or two) characters or numbers including two/three word month in arabic. 4723 parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, 4724 // +00:00 -00:00 +0000 -0000 or Z 4725 parseTokenT = /T/i, 4726 // T (ISO separator) 4727 parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, 4728 // 123456789 123456789.123 4729 parseTokenOrdinal = /\d{1,2}/, 4730 4731 4732 //strict parsing regexes 4733 parseTokenOneDigit = /\d/, 4734 // 0 - 9 4735 parseTokenTwoDigits = /\d\d/, 4736 // 00 - 99 4737 parseTokenThreeDigits = /\d{3}/, 4738 // 000 - 999 4739 parseTokenFourDigits = /\d{4}/, 4740 // 0000 - 9999 4741 parseTokenSixDigits = /[+-]?\d{6}/, 4742 // -999,999 - 999,999
4743 parseTokenSignedNumber = /[+-]?\d+/, 4744 // -inf - inf 4745 4746 // iso 8601 regex 4747 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) 4748 isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 4749 isoFormat = 'YYYY-MM-DDTHH:mm:ssZ', 4750 isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], ['GGGG-[W]WW', /\d{4}-W\d{2}/], ['YYYY-DDD', /\d{4}-\d{3}/]], 4751 4752 4753 // iso time formats and regexes 4754 isoTimes = [['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], ['HH:mm', /(T| )\d\d:\d\d/], ['HH', /(T| )\d\d/]], 4755 4756 4757 // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30'] 4758 parseTimezoneChunker = /([\+\-]|\d\d)/gi, 4759 4760 4761 // getter and setter names 4762 proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), 4763 unitMillisecondFactors = { 4764 'Milliseconds': 1, 4765 'Seconds': 1e3, 4766 'Minutes': 6e4, 4767 'Hours': 36e5, 4768 'Days': 864e5, 4769 'Months': 2592e6, 4770 'Years': 31536e6 4771 }, 4772 unitAliases = { 4773 ms: 'millisecond', 4774 s: 'second', 4775 m: 'minute', 4776 h: 'hour', 4777 d: 'day', 4778 D: 'date', 4779 w: 'week', 4780 W: 'isoWeek', 4781 M: 'month', 4782 Q: 'quarter', 4783 y: 'year', 4784 DDD: 'dayOfYear', 4785 e: 'weekday', 4786 E: 'isoWeekday', 4787 gg: 'weekYear', 4788 GG: 'isoWeekYear' 4789 }, 4790 camelFunctions = { 4791 dayofyear: 'dayOfYear', 4792 isoweekday: 'isoWeekday', 4793 isoweek: 'isoWeek', 4794 weekyear: 'weekYear', 4795 isoweekyear: 'isoWeekYear' 4796 }, 4797 4798 4799 // format function strings 4800 formatFunctions = {}, 4801 4802 4803 // default relative time thresholds 4804 relativeTimeThresholds = { 4805 s: 45, // seconds to minute 4806 m: 45, // minutes to hour 4807 h: 22, // hours to day 4808 d: 26, // days to month 4809 M: 11 // months to year 4810 }, 4811 4812 4813 // tokens to ordinalize and pad 4814 ordinalizeTokens = 'DDD w W M D d'.split(' '), 4815 paddedTokens = 'M D H h m s w W'.split(' '), 4816 formatTokenFunctions = { 4817 M: function M() { 4818 return this.month() + 1; 4819 }, 4820 MMM: function MMM(format) { 4821 return this.localeData().monthsShort(this, format); 4822 }, 4823 MMMM: function MMMM(format) { 4824 return this.localeData().months(this, format); 4825 }, 4826 D: function D() { 4827 return this.date(); 4828 }, 4829 DDD: function DDD() { 4830 return this.dayOfYear(); 4831 }, 4832 d: function d() { 4833 return this.day(); 4834 }, 4835 dd: function dd(format) { 4836 return this.localeData().weekdaysMin(this, format); 4837 }, 4838 ddd: function ddd(format) { 4839 return this.localeData().weekdaysShort(this, format); 4840 }, 4841 dddd: function dddd(format) { 4842 return this.localeData().weekdays(this, format); 4843 }, 4844 w: function w() { 4845 return this.week(); 4846 }, 4847 W: function W() { 4848 return this.isoWeek(); 4849 }, 4850 YY: function YY() { 4851 return leftZeroFill(this.year() % 100, 2); 4852 }, 4853 YYYY: function YYYY() { 4854 return leftZeroFill(this.year(), 4); 4855 }, 4856 YYYYY: function YYYYY() { 4857 return leftZeroFill(this.year(), 5); 4858 }, 4859 YYYYYY: function YYYYYY() { 4860 var y = this.year(), 4861 sign = y >= 0 ? '+' : '-'; 4862 return sign + leftZeroFill(Math.abs(y), 6); 4863 }, 4864 gg: function gg() { 4865 return leftZeroFill(this.weekYear() % 100, 2); 4866 }, 4867 gggg: function gggg() { 4868 return leftZeroFill(this.weekYear(), 4); 4869 }, 4870 ggggg: function ggggg() { 4871 return leftZeroFill(this.weekYear(), 5); 4872 }, 4873 GG: function GG() { 4874 return leftZeroFill(this.isoWeekYear() % 100, 2); 4875 }, 4876 GGGG: function GGGG() { 4877 return leftZeroFill(this.isoWeekYear(), 4); 4878 }, 4879 GGGGG: function GGGGG() { 4880 return leftZeroFill(this.isoWeekYear(), 5); 4881 }, 4882 e: function e() { 4883 return this.weekday(); 4884 }, 4885 E: function E() { 4886 return this.isoWeekday(); 4887 }, 4888 a: function a() { 4889 return this.localeData().meridiem(this.hours(), this.minutes(), true); 4890 }, 4891 A: function A() { 4892 return this.localeData().meridiem(this.hours(), this.minutes(), false); 4893 }, 4894 H: function H() { 4895 return this.hours(); 4896 }, 4897 h: function h() { 4898 return this.hours() % 12 || 12; 4899 }, 4900 m: function m() { 4901 return this.minutes(); 4902 }, 4903 s: function s() { 4904 return this.seconds(); 4905 }, 4906 S: function S() { 4907 return toInt(this.milliseconds() / 100); 4908 }, 4909 SS: function SS() { 4910 return leftZeroFill(toInt(this.milliseconds() / 10), 2); 4911 }, 4912 SSS: function SSS() { 4913 return leftZeroFill(this.milliseconds(), 3); 4914 }, 4915 SSSS: function SSSS() { 4916 return leftZeroFill(this.milliseconds(), 3); 4917 }, 4918 Z: function Z() { 4919 var a = -this.zone(), 4920 b = '+'; 4921 if (a < 0) { 4922 a = -a; 4923 b = '-'; 4924 } 4925 return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2); 4926 }, 4927 ZZ: function ZZ() { 4928 var a = -this.zone(), 4929 b = '+'; 4930 if (a < 0) { 4931 a = -a; 4932 b = '-'; 4933 } 4934 return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2); 4935 }, 4936 z: function z() { 4937 return this.zoneAbbr(); 4938 }, 4939 zz: function zz() { 4940 return this.zoneName(); 4941 }, 4942 X: function X() { 4943 return this.unix(); 4944 }, 4945 Q: function Q() { 4946 return this.quarter(); 4947 } 4948 }, 4949 deprecations = {}, 4950 lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin']; 4951 4952 // Pick the first defined of two or three arguments. dfl comes from 4953 // default. 4954 function dfl(a, b, c) { 4955 switch (arguments.length) { 4956 case 2: 4957 return a != null ? a : b; 4958 case 3: 4959 return a != null ? a : b != null ? b : c; 4960 default: 4961 throw new Error('Implement me'); 4962 } 4963 } 4964 4965 function hasOwnProp(a, b) { 4966 return hasOwnProperty.call(a, b); 4967 } 4968 4969 function defaultParsingFlags() { 4970 // We need to deep clone this object, and es5 standard is not very 4971 // helpful. 4972 return { 4973 empty: false, 4974 unusedTokens: [], 4975 unusedInput: [], 4976 overflow: -2, 4977 charsLeftOver: 0, 4978 nullInput: false, 4979 invalidMonth: null, 4980 invalidFormat: false, 4981 userInvalidated: false, 4982 iso: false 4983 }; 4984 } 4985 4986 function printMsg(msg) { 4987 if (moment.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { 4988 console.warn('Deprecation warning: ' + msg); 4989 } 4990 } 4991 4992 function deprecate(msg, fn) { 4993 var firstTime = true; 4994 return extend(function () { 4995 if (firstTime) { 4996 printMsg(msg); 4997 firstTime = false;
4998 } 4999 return fn.apply(this, arguments); 5000 }, fn); 5001 } 5002 5003 function deprecateSimple(name, msg) { 5004 if (!deprecations[name]) { 5005 printMsg(msg); 5006 deprecations[name] = true; 5007 } 5008 } 5009 5010 function padToken(func, count) { 5011 return function (a) { 5012 return leftZeroFill(func.call(this, a), count); 5013 }; 5014 } 5015 function ordinalizeToken(func, period) { 5016 return function (a) { 5017 return this.localeData().ordinal(func.call(this, a), period); 5018 }; 5019 } 5020 5021 while (ordinalizeTokens.length) { 5022 i = ordinalizeTokens.pop(); 5023 formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i); 5024 } 5025 while (paddedTokens.length) { 5026 i = paddedTokens.pop(); 5027 formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2); 5028 } 5029 formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3); 5030 5031 /************************************ 5032 Constructors 5033 ************************************/ 5034 5035 function Locale() {} 5036 5037 // Moment prototype object 5038 function Moment(config, skipOverflow) { 5039 if (skipOverflow !== false) { 5040 checkOverflow(config); 5041 } 5042 copyConfig(this, config); 5043 this._d = new Date(+config._d); 5044 } 5045 5046 // Duration Constructor 5047 function Duration(duration) { 5048 var normalizedInput = normalizeObjectUnits(duration), 5049 years = normalizedInput.year || 0, 5050 quarters = normalizedInput.quarter || 0, 5051 months = normalizedInput.month || 0, 5052 weeks = normalizedInput.week || 0, 5053 days = normalizedInput.day || 0, 5054 hours = normalizedInput.hour || 0, 5055 minutes = normalizedInput.minute || 0, 5056 seconds = normalizedInput.second || 0, 5057 milliseconds = normalizedInput.millisecond || 0; 5058 5059 // representation for dateAddRemove 5060 this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 5061 minutes * 6e4 + // 1000 * 60 5062 hours * 36e5; // 1000 * 60 * 60 5063 // Because of dateAddRemove treats 24 hours as different from a 5064 // day when working around DST, we need to store them separately 5065 this._days = +days + weeks * 7; 5066 // It is impossible translate months into days without knowing 5067 // which months you are are talking about, so we have to store 5068 // it separately. 5069 this._months = +months + quarters * 3 + years * 12; 5070 5071 this._data = {}; 5072 5073 this._locale = moment.localeData(); 5074 5075 this._bubble(); 5076 } 5077 5078 /************************************ 5079 Helpers 5080 ************************************/ 5081 5082 function extend(a, b) { 5083 for (var i in b) { 5084 if (hasOwnProp(b, i)) { 5085 a[i] = b[i]; 5086 } 5087 } 5088 5089 if (hasOwnProp(b, 'toString')) { 5090 a.toString = b.toString; 5091 } 5092 5093 if (hasOwnProp(b, 'valueOf')) { 5094 a.valueOf = b.valueOf; 5095 } 5096 5097 return a; 5098 } 5099 5100 function copyConfig(to, from) { 5101 var i, prop, val; 5102 5103 if (typeof from._isAMomentObject !== 'undefined') { 5104 to._isAMomentObject = from._isAMomentObject; 5105 } 5106 if (typeof from._i !== 'undefined') { 5107 to._i = from._i; 5108 } 5109 if (typeof from._f !== 'undefined') { 5110 to._f = from._f; 5111 } 5112 if (typeof from._l !== 'undefined') { 5113 to._l = from._l; 5114 } 5115 if (typeof from._strict !== 'undefined') { 5116 to._strict = from._strict; 5117 } 5118 if (typeof from._tzm !== 'undefined') { 5119 to._tzm = from._tzm; 5120 } 5121 if (typeof from._isUTC !== 'undefined') { 5122 to._isUTC = from._isUTC; 5123 } 5124 if (typeof from._offset !== 'undefined') { 5125 to._offset = from._offset; 5126 } 5127 if (typeof from._pf !== 'undefined') { 5128 to._pf = from._pf; 5129 } 5130 if (typeof from._locale !== 'undefined') { 5131 to._locale = from._locale; 5132 } 5133 5134 if (momentProperties.length > 0) { 5135 for (i in momentProperties) { 5136 prop = momentProperties[i]; 5137 val = from[prop]; 5138 if (typeof val !== 'undefined') { 5139 to[prop] = val; 5140 } 5141 } 5142 } 5143 5144 return to; 5145 } 5146 5147 function absRound(number) { 5148 if (number < 0) { 5149 return Math.ceil(number); 5150 } else { 5151 return Math.floor(number); 5152 } 5153 } 5154 5155 // left zero fill a number 5156 // see http://jsperf.com/left-zero-filling for performance comparison 5157 function leftZeroFill(number, targetLength, forceSign) { 5158 var output = '' + Math.abs(number), 5159 sign = number >= 0; 5160 5161 while (output.length < targetLength) { 5162 output = '0' + output; 5163 } 5164 return (sign ? forceSign ? '+' : '' : '-') + output; 5165 } 5166 5167 function positiveMomentsDifference(base, other) { 5168 var res = { milliseconds: 0, months: 0 }; 5169 5170 res.months = other.month() - base.month() + (other.year() - base.year()) * 12; 5171 if (base.clone().add(res.months, 'M').isAfter(other)) { 5172 --res.months; 5173 } 5174 5175 res.milliseconds = +other - +base.clone().add(res.months, 'M'); 5176 5177 return res; 5178 } 5179 5180 function momentsDifference(base, other) { 5181 var res; 5182 other = makeAs(other, base); 5183 if (base.isBefore(other)) { 5184 res = positiveMomentsDifference(base, other); 5185 } else { 5186 res = positiveMomentsDifference(other, base); 5187 res.milliseconds = -res.milliseconds; 5188 res.months = -res.months; 5189 } 5190 5191 return res; 5192 } 5193 5194 // TODO: remove 'name' arg after deprecation is removed 5195 function createAdder(direction, name) { 5196 return function (val, period) { 5197 var dur, tmp; 5198 //invert the arguments, but complain about it 5199 if (period !== null && !isNaN(+period)) { 5200 deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); 5201 tmp = val;val = period;period = tmp; 5202 } 5203 5204 val = typeof val === 'string' ? +val : val; 5205 dur = moment.duration(val, period); 5206 addOrSubtractDurationFromMoment(this, dur, direction); 5207 return this; 5208 }; 5209 } 5210 5211 function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) { 5212 var milliseconds = duration._milliseconds, 5213 days = duration._days, 5214 months = duration._months; 5215 updateOffset = updateOffset == null ? true : updateOffset; 5216 5217 if (milliseconds) { 5218 mom._d.setTime(+mom._d + milliseconds * isAdding); 5219 } 5220 if (days) { 5221 rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding); 5222 } 5223 if (months) { 5224 rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding); 5225 } 5226 if (updateOffset) { 5227 moment.updateOffset(mom, days || months); 5228 } 5229 } 5230 5231 // check if is an array 5232 function isArray(input) { 5233 return Object.prototype.toString.call(input) === '[object Array]'; 5234 } 5235 5236 function isDate(input) { 5237 return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date; 5238 } 5239 5240 // compare two arrays, return the number of differences 5241 function compareArrays(array1, array2, dontConvert) { 5242 var len = Math.min(array1.length, array2.length), 5243 lengthDiff = Math.abs(array1.length - array2.length), 5244 diffs = 0, 5245 i; 5246 for (i = 0; i < len; i++) { 5247 if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { 5248 diffs++; 5249 } 5250 } 5251 return diffs + lengthDiff; 5252 } 5253 5254 function normalizeUnits(units) { 5255 if (units) { 5256 var lowered = units.toLowerCase().replace(/(.)s$/, '$1'); 5257 units = unitAliases[units] || camelFunctions[lowered] || lowered; 5258 } 5259 return units; 5260 } 5261
5262 function normalizeObjectUnits(inputObject) { 5263 var normalizedInput = {}, 5264 normalizedProp, 5265 prop; 5266 5267 for (prop in inputObject) { 5268 if (hasOwnProp(inputObject, prop)) { 5269 normalizedProp = normalizeUnits(prop); 5270 if (normalizedProp) { 5271 normalizedInput[normalizedProp] = inputObject[prop]; 5272 } 5273 } 5274 } 5275 5276 return normalizedInput; 5277 } 5278 5279 function makeList(field) { 5280 var count, setter; 5281 5282 if (field.indexOf('week') === 0) { 5283 count = 7; 5284 setter = 'day'; 5285 } else if (field.indexOf('month') === 0) { 5286 count = 12; 5287 setter = 'month'; 5288 } else { 5289 return; 5290 } 5291 5292 moment[field] = function (format, index) { 5293 var i, 5294 getter, 5295 method = moment._locale[field], 5296 results = []; 5297 5298 if (typeof format === 'number') { 5299 index = format; 5300 format = undefined; 5301 } 5302 5303 getter = function getter(i) { 5304 var m = moment().utc().set(setter, i); 5305 return method.call(moment._locale, m, format || ''); 5306 }; 5307 5308 if (index != null) { 5309 return getter(index); 5310 } else { 5311 for (i = 0; i < count; i++) { 5312 results.push(getter(i)); 5313 } 5314 return results; 5315 } 5316 }; 5317 } 5318 5319 function toInt(argumentForCoercion) { 5320 var coercedNumber = +argumentForCoercion, 5321 value = 0; 5322 5323 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 5324 if (coercedNumber >= 0) { 5325 value = Math.floor(coercedNumber); 5326 } else { 5327 value = Math.ceil(coercedNumber); 5328 } 5329 } 5330 5331 return value; 5332 } 5333 5334 function _daysInMonth(year, month) { 5335 return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); 5336 } 5337 5338 function _weeksInYear(year, dow, doy) { 5339 return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week; 5340 } 5341 5342 function daysInYear(year) { 5343 return _isLeapYear(year) ? 366 : 365; 5344 } 5345 5346 function _isLeapYear(year) { 5347 return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; 5348 } 5349 5350 function checkOverflow(m) { 5351 var overflow; 5352 if (m._a && m._pf.overflow === -2) { 5353 overflow = m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH : m._a[DATE] < 1 || m._a[DATE] > _daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE : m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR : m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE : m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND : m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND : -1; 5354 5355 if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { 5356 overflow = DATE; 5357 } 5358 5359 m._pf.overflow = overflow; 5360 } 5361 } 5362 5363 function _isValid(m) { 5364 if (m._isValid == null) { 5365 m._isValid = !isNaN(m._d.getTime()) && m._pf.overflow < 0 && !m._pf.empty && !m._pf.invalidMonth && !m._pf.nullInput && !m._pf.invalidFormat && !m._pf.userInvalidated; 5366 5367 if (m._strict) { 5368 m._isValid = m._isValid && m._pf.charsLeftOver === 0 && m._pf.unusedTokens.length === 0; 5369 } 5370 } 5371 return m._isValid; 5372 } 5373 5374 function normalizeLocale(key) { 5375 return key ? key.toLowerCase().replace('_', '-') : key; 5376 } 5377 5378 // pick the locale from the array 5379 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 5380 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 5381 function chooseLocale(names) { 5382 var i = 0, 5383 j, 5384 next, 5385 locale, 5386 split; 5387 5388 while (i < names.length) { 5389 split = normalizeLocale(names[i]).split('-'); 5390 j = split.length; 5391 next = normalizeLocale(names[i + 1]); 5392 next = next ? next.split('-') : null; 5393 while (j > 0) { 5394 locale = loadLocale(split.slice(0, j).join('-')); 5395 if (locale) { 5396 return locale; 5397 } 5398 if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { 5399 //the next array item is better than a shallower substring of this one 5400 break; 5401 } 5402 j--; 5403 } 5404 i++; 5405 } 5406 return null; 5407 } 5408 5409 function loadLocale(name) { 5410 var oldLocale = null; 5411 // if (!locales[name] && hasModule) { 5412 // try { 5413 // oldLocale = moment.locale(); 5414 // require('./locale/' + name); 5415 // // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales 5416 // moment.locale(oldLocale); 5417 // } catch (e) { } 5418 // } 5419 return locales[name]; 5420 } 5421 5422 // Return a moment from input, that is local/utc/zone equivalent to model. 5423 function makeAs(input, model) { 5424 return model._isUTC ? moment(input).zone(model._offset || 0) : moment(input).local(); 5425 } 5426 5427 /************************************ 5428 Locale 5429 ************************************/ 5430 5431 extend(Locale.prototype, { 5432 5433 set: function set(config) { 5434 var prop, i; 5435 for (i in config) { 5436 prop = config[i]; 5437 if (typeof prop === 'function') { 5438 this[i] = prop; 5439 } else { 5440 this['_' + i] = prop; 5441 } 5442 } 5443 }, 5444 5445 _months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), 5446 months: function months(m) { 5447 return this._months[m.month()]; 5448 }, 5449 5450 _monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 5451 monthsShort: function monthsShort(m) { 5452 return this._monthsShort[m.month()]; 5453 }, 5454 5455 monthsParse: function monthsParse(monthName) { 5456 var i, mom, regex; 5457 5458 if (!this._monthsParse) { 5459 this._monthsParse = []; 5460 } 5461 5462 for (i = 0; i < 12; i++) { 5463 // make the regex if we don't have it already 5464 if (!this._monthsParse[i]) { 5465 mom = moment.utc([2000, i]); 5466 regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 5467 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 5468 } 5469 // test the regex 5470 if (this._monthsParse[i].test(monthName)) { 5471 return i; 5472 } 5473 } 5474 }, 5475 5476 _weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), 5477 weekdays: function weekdays(m) { 5478 return this._weekdays[m.day()]; 5479 }, 5480 5481 _weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 5482 weekdaysShort: function weekdaysShort(m) { 5483 return this._weekdaysShort[m.day()]; 5484 }, 5485 5486 _weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 5487 weekdaysMin: function weekdaysMin(m) { 5488 return this._weekdaysMin[m.day()]; 5489 }, 5490 5491 weekdaysParse: function weekdaysParse(weekdayName) { 5492 var i, mom, regex; 5493 5494 if (!this._weekdaysParse) { 5495 this._weekdaysParse = []; 5496 } 5497 5498 for (i = 0; i < 7; i++) { 5499 // make the regex if we don't have it already 5500 if (!this._weekdaysParse[i]) { 5501 mom = moment([2000, 1]).day(i); 5502 regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); 5503 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 5504 } 5505 // test the regex 5506 if (this._weekdaysParse[i].test(weekdayName)) { 5507 return i; 5508 } 5509 } 5510 }, 5511 5512 _longDateFormat: { 5513 LT: 'h:mm A', 5514 L: 'MM/DD/YYYY', 5515 LL: 'MMMM D, YYYY', 5516 LLL: 'MMMM D, YYYY LT', 5517 LLLL: 'dddd, MMMM D, YYYY LT' 5518 }, 5519 longDateFormat: function longDateFormat(key) { 5520 var output = this._longDateFormat[key]; 5521 if (!output && this._longDateFormat[key.toUpperCase()]) { 5522 output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { 5523 return val.slice(1); 5524 }); 5525 this._longDateFormat[key] = output; 5526 } 5527 return output; 5528 }, 5529 5530 isPM: function isPM(input) { 5531 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing str
5531ings like arrays 5532 // Using charAt should be more compatible. 5533 return (input + '').toLowerCase().charAt(0) === 'p'; 5534 }, 5535 5536 _meridiemParse: /[ap]\.?m?\.?/i, 5537 meridiem: function meridiem(hours, minutes, isLower) { 5538 if (hours > 11) { 5539 return isLower ? 'pm' : 'PM'; 5540 } else { 5541 return isLower ? 'am' : 'AM'; 5542 } 5543 }, 5544 5545 _calendar: { 5546 sameDay: '[Today at] LT', 5547 nextDay: '[Tomorrow at] LT', 5548 nextWeek: 'dddd [at] LT', 5549 lastDay: '[Yesterday at] LT', 5550 lastWeek: '[Last] dddd [at] LT', 5551 sameElse: 'L' 5552 }, 5553 calendar: function calendar(key, mom) { 5554 var output = this._calendar[key]; 5555 return typeof output === 'function' ? output.apply(mom) : output; 5556 }, 5557 5558 _relativeTime: { 5559 future: 'in %s', 5560 past: '%s ago', 5561 s: 'a few seconds', 5562 m: 'a minute', 5563 mm: '%d minutes', 5564 h: 'an hour', 5565 hh: '%d hours', 5566 d: 'a day', 5567 dd: '%d days', 5568 M: 'a month', 5569 MM: '%d months', 5570 y: 'a year', 5571 yy: '%d years' 5572 }, 5573 5574 relativeTime: function relativeTime(number, withoutSuffix, string, isFuture) { 5575 var output = this._relativeTime[string]; 5576 return typeof output === 'function' ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); 5577 }, 5578 5579 pastFuture: function pastFuture(diff, output) { 5580 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 5581 return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); 5582 }, 5583 5584 ordinal: function ordinal(number) { 5585 return this._ordinal.replace('%d', number); 5586 }, 5587 _ordinal: '%d', 5588 5589 preparse: function preparse(string) { 5590 return string; 5591 }, 5592 5593 postformat: function postformat(string) { 5594 return string; 5595 }, 5596 5597 week: function week(mom) { 5598 return weekOfYear(mom, this._week.dow, this._week.doy).week; 5599 }, 5600 5601 _week: { 5602 dow: 0, // Sunday is the first day of the week. 5603 doy: 6 // The week that contains Jan 1st is the first week of the year. 5604 }, 5605 5606 _invalidDate: 'Invalid date',
5607 invalidDate: function invalidDate() { 5608 return this._invalidDate; 5609 } 5610 }); 5611 5612 /************************************ 5613 Formatting 5614 ************************************/ 5615 5616 function removeFormattingTokens(input) { 5617 if (input.match(/\[[\s\S]/)) { 5618 return input.replace(/^\[|\]$/g, ''); 5619 } 5620 return input.replace(/\\/g, ''); 5621 } 5622 5623 function makeFormatFunction(format) { 5624 var array = format.match(formattingTokens), 5625 i, 5626 length; 5627 5628 for (i = 0, length = array.length; i < length; i++) { 5629 if (formatTokenFunctions[array[i]]) { 5630 array[i] = formatTokenFunctions[array[i]]; 5631 } else { 5632 array[i] = removeFormattingTokens(array[i]); 5633 } 5634 } 5635 5636 return function (mom) { 5637 var output = ''; 5638 for (i = 0; i < length; i++) { 5639 output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; 5640 } 5641 return output; 5642 }; 5643 } 5644 5645 // format date using native date object 5646 function formatMoment(m, format) { 5647 if (!m.isValid()) { 5648 return m.localeData().invalidDate(); 5649 } 5650 5651 format = expandFormat(format, m.localeData()); 5652 5653 if (!formatFunctions[format]) { 5654 formatFunctions[format] = makeFormatFunction(format); 5655 } 5656 5657 return formatFunctions[format](m); 5658 } 5659 5660 function expandFormat(format, locale) { 5661 var i = 5; 5662 5663 function replaceLongDateFormatTokens(input) { 5664 return locale.longDateFormat(input) || input; 5665 } 5666 5667 localFormattingTokens.lastIndex = 0; 5668 while (i >= 0 && localFormattingTokens.test(format)) { 5669 format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); 5670 localFormattingTokens.lastIndex = 0; 5671 i -= 1; 5672 } 5673 5674 return format; 5675 } 5676 5677 /************************************ 5678 Parsing 5679 ************************************/ 5680 5681 // get the regex to find the next token 5682 function getParseRegexForToken(token, config) { 5683 var a, 5684 strict = config._strict; 5685 switch (token) { 5686 case 'Q': 5687 return parseTokenOneDigit; 5688 case 'DDDD': 5689 return parseTokenThreeDigits; 5690 case 'YYYY': 5691 case 'GGGG': 5692 case 'gggg': 5693 return strict ? parseTokenFourDigits : parseTokenOneToFourDigits; 5694 case 'Y': 5695 case 'G': 5696 case 'g': 5697 return parseTokenSignedNumber; 5698 case 'YYYYYY': 5699 case 'YYYYY': 5700 case 'GGGGG': 5701 case 'ggggg': 5702 return strict ? parseTokenSixDigits : parseTokenOneToSixDigits; 5703 case 'S': 5704 if (strict) { 5705 return parseTokenOneDigit; 5706 } 5707 /* falls through */ 5708 case 'SS': 5709 if (strict) { 5710 return parseTokenTwoDigits; 5711 } 5712 /* falls through */ 5713 case 'SSS': 5714 if (strict) { 5715 return parseTokenThreeDigits; 5716 } 5717 /* falls through */ 5718 case 'DDD': 5719 return parseTokenOneToThreeDigits; 5720 case 'MMM': 5721 case 'MMMM': 5722 case 'dd': 5723 case 'ddd': 5724 case 'dddd': 5725 return parseTokenWord; 5726 case 'a': 5727 case 'A': 5728 return config._locale._meridiemParse; 5729 case 'X': 5730 return parseTokenTimestampMs; 5731 case 'Z': 5732 case 'ZZ': 5733 return parseTokenTimezone; 5734 case 'T': 5735 return parseTokenT; 5736 case 'SSSS': 5737 return parseTokenDigits; 5738 case 'MM': 5739 case 'DD': 5740 case 'YY': 5741 case 'GG': 5742 case 'gg': 5743 case 'HH': 5744 case 'hh': 5745 case 'mm': 5746 case 'ss': 5747 case 'ww': 5748 case 'WW': 5749 return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits; 5750 case 'M': 5751 case 'D': 5752 case 'd': 5753 case 'H': 5754 case 'h': 5755 case 'm': 5756 case 's': 5757 case 'w': 5758 case 'W': 5759 case 'e': 5760 case 'E': 5761 return parseTokenOneOrTwoDigits; 5762 case 'Do': 5763 return parseTokenOrdinal; 5764 default: 5765 a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i')); 5766 return a; 5767 } 5768 } 5769 5770 function timezoneMinutesFromString(string) {
5771 string = string || ''; 5772 var possibleTzMatches = string.match(parseTokenTimezone) || [], 5773 tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [], 5774 parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0], 5775 minutes = +(parts[1] * 60) + toInt(parts[2]); 5776 5777 return parts[0] === '+' ? -minutes : minutes; 5778 } 5779 5780 // function to convert string input to date 5781 function addTimeToArrayFromToken(token, input, config) { 5782 var a, 5783 datePartArray = config._a; 5784 5785 switch (token) { 5786 // QUARTER 5787 case 'Q': 5788 if (input != null) { 5789 datePartArray[MONTH] = (toInt(input) - 1) * 3; 5790 } 5791 break; 5792 // MONTH 5793 case 'M': // fall through to MM 5794 case 'MM': 5795 if (input != null) { 5796 datePartArray[MONTH] = toInt(input) - 1; 5797 } 5798 break; 5799 case 'MMM': // fall through to MMMM 5800 case 'MMMM': 5801 a = config._locale.monthsParse(input); 5802 // if we didn't find a month name, mark the date as invalid. 5803 if (a != null) { 5804 datePartArray[MONTH] = a; 5805 } else { 5806 config._pf.invalidMonth = input; 5807 } 5808 break; 5809 // DAY OF MONTH 5810 case 'D': // fall through to DD 5811 case 'DD': 5812 if (input != null) { 5813 datePartArray[DATE] = toInt(input); 5814 } 5815 break; 5816 case 'Do': 5817 if (input != null) { 5818 datePartArray[DATE] = toInt(parseInt(input, 10)); 5819 } 5820 break; 5821 // DAY OF YEAR 5822 case 'DDD': // fall through to DDDD 5823 case 'DDDD': 5824 if (input != null) { 5825 config._dayOfYear = toInt(input); 5826 } 5827 5828 break; 5829 // YEAR 5830 case 'YY': 5831 datePartArray[YEAR] = moment.parseTwoDigitYear(input); 5832 break; 5833 case 'YYYY': 5834 case 'YYYYY': 5835 case 'YYYYYY': 5836 datePartArray[YEAR] = toInt(input); 5837 break; 5838 // AM / PM 5839 case 'a': // fall through to A 5840 case 'A': 5841 config._isPm = config._locale.isPM(input); 5842 break; 5843 // 24 HOUR 5844 case 'H': // fall through to hh 5845 case 'HH': // fall through to hh 5846 case 'h': // fall through to hh 5847 case 'hh': 5848 datePartArray[HOUR] = toInt(input); 5849 break; 5850 // MINUTE 5851 case 'm': // fall through to mm 5852 case 'mm': 5853 datePartArray[MINUTE] = toInt(input); 5854 break; 5855 // SECOND 5856 case 's': // fall through to ss 5857 case 'ss': 5858 datePartArray[SECOND] = toInt(input); 5859 break; 5860 // MILLISECOND 5861 case 'S': 5862 case 'SS': 5863 case 'SSS': 5864 case 'SSSS': 5865 datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000); 5866 break; 5867 // UNIX TIMESTAMP WITH MS 5868 case 'X': 5869 config._d = new Date(parseFloat(input) * 1000); 5870 break; 5871 // TIMEZONE 5872 case 'Z': // fall through to ZZ 5873 case 'ZZ': 5874 config._useUTC = true; 5875 config._tzm = timezoneMinutesFromString(input); 5876 break; 5877 // WEEKDAY - human 5878 case 'dd': 5879 case 'ddd': 5880 case 'dddd': 5881 a = config._locale.weekdaysParse(input); 5882 // if we didn't get a weekday name, mark the date as invalid 5883 if (a != null) { 5884 config._w = config._w || {}; 5885 config._w['d'] = a; 5886 } else { 5887 config._pf.invalidWeekday = input; 5888 } 5889 break; 5890 // WEEK, WEEK DAY - numeric 5891 case 'w': 5892 case 'ww': 5893 case 'W': 5894 case 'WW': 5895 case 'd': 5896 case 'e': 5897 case 'E': 5898 token = token.substr(0, 1); 5899 /* falls through */ 5900 case 'gggg': 5901 case 'GGGG': 5902 case 'GGGGG': 5903 token = token.substr(0, 2); 5904 if (input) { 5905 config._w = config._w || {}; 5906 config._w[token] = toInt(input); 5907 } 5908 break; 5909 case 'gg': 5910 case 'GG': 5911 config._w = config._w || {}; 5912 config._w[token] = moment.parseTwoDigitYear(input); 5913 } 5914 } 5915 5916 function dayOfYearFromWeekInfo(config) { 5917 var w, weekYear, week, weekday, dow, doy, temp; 5918 5919 w = config._w; 5920 if (w.GG != null || w.W != null || w.E != null) { 5921 dow = 1; 5922 doy = 4; 5923 5924 // TODO: We need to take the current isoWeekYear, but that depends on 5925 // how we interpret now (local, utc, fixed offset). So create 5926 // a now version of current config (take local/utc/offset flags, and 5927 // create now). 5928 weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year); 5929 week = dfl(w.W, 1); 5930 weekday = dfl(w.E, 1); 5931 } else { 5932 dow = config._locale._week.dow; 5933 doy = config._locale._week.doy; 5934
5935 weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year); 5936 week = dfl(w.w, 1); 5937 5938 if (w.d != null) { 5939 // weekday -- low day numbers are considered next week 5940 weekday = w.d; 5941 if (weekday < dow) { 5942 ++week; 5943 } 5944 } else if (w.e != null) { 5945 // local weekday -- counting starts from begining of week 5946 weekday = w.e + dow; 5947 } else { 5948 // default to begining of week 5949 weekday = dow; 5950 } 5951 } 5952 temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); 5953 5954 config._a[YEAR] = temp.year; 5955 config._dayOfYear = temp.dayOfYear; 5956 } 5957 5958 // convert an array to a date. 5959 // the array should mirror the parameters below 5960 // note: all values past the year are optional and will default to the lowest possible value. 5961 // [year, month, day , hour, minute, second, millisecond] 5962 function dateFromConfig(config) { 5963 var i, 5964 date, 5965 input = [], 5966 currentDate, 5967 yearToUse; 5968 5969 if (config._d) { 5970 return; 5971 } 5972 5973 currentDate = currentDateArray(config); 5974 5975 //compute day of the year from weeks and weekdays 5976 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 5977 dayOfYearFromWeekInfo(config); 5978 } 5979 5980 //if the day of the year is set, figure out what it is 5981 if (config._dayOfYear) { 5982 yearToUse = dfl(config._a[YEAR], currentDate[YEAR]); 5983 5984 if (config._dayOfYear > daysInYear(yearToUse)) { 5985 config._pf._overflowDayOfYear = true; 5986 } 5987 5988 date = makeUTCDate(yearToUse, 0, config._dayOfYear); 5989 config._a[MONTH] = date.getUTCMonth(); 5990 config._a[DATE] = date.getUTCDate(); 5991 } 5992 5993 // Default to current date. 5994 // * if no year, month, day of month are given, default to today 5995 // * if day of month is given, default month and year 5996 // * if month is given, default only year 5997 // * if year is given, don't default anything 5998 for (i = 0; i < 3 && config._a[i] == null; ++i) { 5999 config._a[i] = input[i] = currentDate[i]; 6000 } 6001 6002 // Zero out whatever was not defaulted, including time 6003 for (; i < 7; i++) { 6004 config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; 6005 } 6006 6007 config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); 6008 // Apply timezone offset from input. The actual zone can be changed 6009 // with parseZone. 6010 if (config._tzm != null) { 6011 config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm); 6012 } 6013 } 6014 6015 function dateFromObject(config) { 6016 var normalizedInput; 6017 6018 if (config._d) { 6019 return; 6020 } 6021 6022 normalizedInput = normalizeObjectUnits(config._i); 6023 config._a = [normalizedInput.year, normalizedInput.month, normalizedInput.day, normalizedInput.hour, normalizedInput.minute, normalizedInput.second, normalizedInput.millisecond]; 6024 6025 dateFromConfig(config); 6026 } 6027 6028 function currentDateArray(config) { 6029 var now = new Date(); 6030 if (config._useUTC) { 6031 return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()]; 6032 } else { 6033 return [now.getFullYear(), now.getMonth(), now.getDate()]; 6034 } 6035 } 6036 6037 // date from string and format string 6038 function makeDateFromStringAndFormat(config) { 6039 if (config._f === moment.ISO_8601) { 6040 parseISO(config); 6041 return; 6042 } 6043 6044 config._a = []; 6045 config._pf.empty = true; 6046 6047 // This array is used to make a Date, either with `new Date` or `Date.UTC` 6048 var string = '' + config._i, 6049 i, 6050 parsedInput, 6051 tokens, 6052 token, 6053 skipped, 6054 stringLength = string.length, 6055 totalParsedInputLength = 0; 6056 6057 tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; 6058 6059 for (i = 0; i < tokens.length; i++) { 6060 token = tokens[i]; 6061 parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; 6062 if (parsedInput) { 6063 skipped = string.substr(0, string.indexOf(parsedInput)); 6064 if (skipped.length > 0) { 6065 config._pf.unusedInput.push(skipped); 6066 }
6067 string = string.slice(string.indexOf(parsedInput) + parsedInput.length); 6068 totalParsedInputLength += parsedInput.length; 6069 } 6070 // don't parse if it's not a known token 6071 if (formatTokenFunctions[token]) { 6072 if (parsedInput) { 6073 config._pf.empty = false; 6074 } else { 6075 config._pf.unusedTokens.push(token); 6076 } 6077 addTimeToArrayFromToken(token, parsedInput, config); 6078 } else if (config._strict && !parsedInput) { 6079 config._pf.unusedTokens.push(token); 6080 } 6081 } 6082 6083 // add remaining unparsed input length to the string 6084 config._pf.charsLeftOver = stringLength - totalParsedInputLength; 6085 if (string.length > 0) { 6086 config._pf.unusedInput.push(string); 6087 } 6088 6089 // handle am pm 6090 if (config._isPm && config._a[HOUR] < 12) { 6091 config._a[HOUR] += 12; 6092 } 6093 // if is 12 am, change hours to 0 6094 if (config._isPm === false && config._a[HOUR] === 12) { 6095 config._a[HOUR] = 0; 6096 } 6097 6098 dateFromConfig(config); 6099 checkOverflow(config); 6100 } 6101 6102 function unescapeFormat(s) { 6103 return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { 6104 return p1 || p2 || p3 || p4; 6105 }); 6106 } 6107 6108 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 6109 function regexpEscape(s) { 6110 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 6111 } 6112 6113 // date from string and array of format strings 6114 function makeDateFromStringAndArray(config) { 6115 var tempConfig, bestMoment, scoreToBeat, i, currentScore; 6116 6117 if (config._f.length === 0) { 6118 config._pf.invalidFormat = true; 6119 config._d = new Date(NaN); 6120 return; 6121 } 6122 6123 for (i = 0; i < config._f.length; i++) { 6124 currentScore = 0; 6125 tempConfig = copyConfig({}, config); 6126 if (config._useUTC != null) { 6127 tempConfig._useUTC = config._useUTC; 6128 } 6129 tempConfig._pf = defaultParsingFlags(); 6130 tempConfig._f = config._f[i]; 6131 makeDateFromStringAndFormat(tempConfig); 6132 6133 if (!_isValid(tempConfig)) { 6134 continue; 6135 } 6136 6137 // if there is any input that was not parsed add a penalty for that format 6138 currentScore += tempConfig._pf.charsLeftOver; 6139 6140 //or tokens 6141 currentScore += tempConfig._pf.unusedTokens.length * 10; 6142 6143 tempConfig._pf.score = currentScore; 6144 6145 if (scoreToBeat == null || currentScore < scoreToBeat) { 6146 scoreToBeat = currentScore; 6147 bestMoment = tempConfig; 6148 } 6149 } 6150 6151 extend(config, bestMoment || tempConfig); 6152 } 6153 6154 // date from iso format 6155 function parseISO(config) { 6156 var i, 6157 l, 6158 string = config._i, 6159 match = isoRegex.exec(string); 6160 6161 if (match) { 6162 config._pf.iso = true; 6163 for (i = 0, l = isoDates.length; i < l; i++) { 6164 if (isoDates[i][1].exec(string)) { 6165 // match[5] should be 'T' or undefined 6166 config._f = isoDates[i][0] + (match[6] || ' '); 6167 break; 6168 } 6169 } 6170 for (i = 0, l = isoTimes.length; i < l; i++) { 6171 if (isoTimes[i][1].exec(string)) { 6172 config._f += isoTimes[i][0]; 6173 break; 6174 } 6175 } 6176 if (string.match(parseTokenTimezone)) { 6177 config._f += 'Z'; 6178 } 6179 makeDateFromStringAndFormat(config); 6180 } else { 6181 config._isValid = false; 6182 } 6183 } 6184 6185 // date from iso format or fallback 6186 function makeDateFromString(config) { 6187 parseISO(config); 6188 if (config._isValid === false) { 6189 delete config._isValid; 6190 moment.createFromInputFallback(config); 6191 } 6192 } 6193 6194 function map(arr, fn) { 6195 var res = [], 6196 i; 6197 for (i = 0; i < arr.length; ++i) { 6198 res.push(fn(arr[i], i)); 6199 } 6200 return res; 6201 } 6202 6203 function makeDateFromInput(config) { 6204 var input = config._i, 6205 matched; 6206 if (input === undefined) { 6207 config._d = new Date(); 6208 } else if (isDate(input)) {
6209 config._d = new Date(+input); 6210 } else if ((matched = aspNetJsonRegex.exec(input)) !== null) { 6211 config._d = new Date(+matched[1]); 6212 } else if (typeof input === 'string') { 6213 makeDateFromString(config); 6214 } else if (isArray(input)) { 6215 config._a = map(input.slice(0), function (obj) { 6216 return parseInt(obj, 10); 6217 }); 6218 dateFromConfig(config); 6219 } else if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object') { 6220 dateFromObject(config); 6221 } else if (typeof input === 'number') { 6222 // from milliseconds 6223 config._d = new Date(input); 6224 } else { 6225 moment.createFromInputFallback(config); 6226 } 6227 } 6228 6229 function makeDate(y, m, d, h, M, s, ms) { 6230 //can't just apply() to create a date: 6231 //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply 6232 var date = new Date(y, m, d, h, M, s, ms); 6233 6234 //the date constructor doesn't accept years < 1970 6235 if (y < 1970) { 6236 date.setFullYear(y); 6237 } 6238 return date; 6239 } 6240 6241 function makeUTCDate(y) { 6242 var date = new Date(Date.UTC.apply(null, arguments)); 6243 if (y < 1970) { 6244 date.setUTCFullYear(y); 6245 } 6246 return date; 6247 } 6248 6249 function parseWeekday(input, locale) { 6250 if (typeof input === 'string') { 6251 if (!isNaN(input)) { 6252 input = parseInt(input, 10); 6253 } else { 6254 input = locale.weekdaysParse(input); 6255 if (typeof input !== 'number') { 6256 return null; 6257 } 6258 } 6259 } 6260 return input; 6261 } 6262 6263 /************************************ 6264 Relative Time 6265 ************************************/ 6266 6267 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 6268 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 6269 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); 6270 } 6271 6272 function relativeTime(posNegDuration, withoutSuffix, locale) { 6273 var duration = moment.duration(posNegDuration).abs(), 6274 seconds = round(duration.as('s')), 6275 minutes = round(duration.as('m')), 6276 hours = round(duration.as('h')), 6277 days = round(duration.as('d')), 6278 months = round(duration.as('M')), 6279 years = round(duration.as('y')), 6280 args = seconds < relativeTimeThresholds.s && ['s', seconds] || minutes === 1 && ['m'] || minutes < relativeTimeThresholds.m && ['mm', minutes] || hours === 1 && ['h'] || hours < relativeTimeThresholds.h && ['hh', hours] || days === 1 && ['d'] || days < relativeTimeThresholds.d && ['dd', days] || months === 1 && ['M'] || months < relativeTimeThresholds.M && ['MM', months] || years === 1 && ['y'] || ['yy', years]; 6281 6282 args[2] = withoutSuffix; 6283 args[3] = +posNegDuration > 0; 6284 args[4] = locale; 6285 return substituteTimeAgo.apply({}, args); 6286 } 6287 6288 /************************************ 6289 Week of Year 6290 ************************************/ 6291 6292 // firstDayOfWeek 0 = sun, 6 = sat 6293 // the day of the week that starts the week 6294 // (usually sunday or monday) 6295 // firstDayOfWeekOfYear 0 = sun, 6 = sat 6296 // the first week is the week that contains the first 6297 // of this day of the week 6298 // (eg. ISO weeks use thursday (4)) 6299 function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { 6300 var end = firstDayOfWeekOfYear - firstDayOfWeek, 6301 daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), 6302 adjustedMoment; 6303 6304 if (daysToDayOfWeek > end) { 6305 daysToDayOfWeek -= 7; 6306 } 6307 6308 if (daysToDayOfWeek < end - 7) { 6309 daysToDayOfWeek += 7; 6310 } 6311 6312 adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd'); 6313 return { 6314 week: Math.ceil(adjustedMoment.dayOfYear() / 7), 6315 year: adjustedMoment.year() 6316 }; 6317 } 6318 6319 //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 6320 function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { 6321 var d = makeUTCDate(year, 0, 1).getUTCDay(), 6322 daysToAdd, 6323 dayOfYear; 6324 6325 d = d === 0 ? 7 : d; 6326 weekday = weekday != null ? weekday : firstDayOfWeek; 6327 daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0); 6328 dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1; 6329 6330 return { 6331 year: dayOfYear > 0 ? year : year - 1, 6332 dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear 6333 }; 6334 } 6335 6336 /************************************ 6337 Top Level Functions 6338 ************************************/ 6339 6340 function makeMoment(config) { 6341 var input = config._i, 6342 format = config._f; 6343 6344 config._locale = config._locale || moment.localeData(config._l); 6345 6346 if (input === null || format === undefined && input === '') {
6347 return moment.invalid({ nullInput: true }); 6348 } 6349 6350 if (typeof input === 'string') { 6351 config._i = input = config._locale.preparse(input); 6352 } 6353 6354 if (moment.isMoment(input)) { 6355 return new Moment(input, true); 6356 } else if (format) { 6357 if (isArray(format)) { 6358 makeDateFromStringAndArray(config); 6359 } else { 6360 makeDateFromStringAndFormat(config); 6361 } 6362 } else { 6363 makeDateFromInput(config); 6364 } 6365 6366 return new Moment(config); 6367 } 6368 6369 moment = function moment(input, format, locale, strict) { 6370 var c; 6371 6372 if (typeof locale === 'boolean') { 6373 strict = locale; 6374 locale = undefined; 6375 } 6376 // object construction must be done this way. 6377 // https://github.com/moment/moment/issues/1423 6378 c = {}; 6379 c._isAMomentObject = true; 6380 c._i = input; 6381 c._f = format; 6382 c._l = locale; 6383 c._strict = strict; 6384 c._isUTC = false; 6385 c._pf = defaultParsingFlags(); 6386 6387 return makeMoment(c); 6388 }; 6389 6390 moment.suppressDeprecationWarnings = false; 6391 6392 moment.createFromInputFallback = deprecate('moment construction falls back to js Date. This is ' + 'discouraged and will be removed in upcoming major ' + 'release. Please refer to ' + 'https://github.com/moment/moment/issues/1407 for more info.', function (config) { 6393 config._d = new Date(config._i); 6394 }); 6395 6396 // Pick a moment m from moments so that m[fn](other) is true for all 6397 // other. This relies on the function fn to be transitive. 6398 // 6399 // moments should either be an array of moment objects or an array, whose 6400 // first element is an array of moment objects. 6401 function pickBy(fn, moments) { 6402 var res, i; 6403 if (moments.length === 1 && isArray(moments[0])) { 6404 moments = moments[0]; 6405 } 6406 if (!moments.length) { 6407 return moment(); 6408 } 6409 res = moments[0]; 6410 for (i = 1; i < moments.length; ++i) { 6411 if (moments[i][fn](res)) { 6412 res = moments[i]; 6413 } 6414 } 6415 return res; 6416 } 6417 6418 moment.min = function () { 6419 var args = [].slice.call(arguments, 0); 6420 6421 return pickBy('isBefore', args); 6422 }; 6423 6424 moment.max = function () { 6425 var args = [].slice.call(arguments, 0); 6426 6427 return pickBy('isAfter', args); 6428 }; 6429 6430 // creating with utc 6431 moment.utc = function (input, format, locale, strict) { 6432 var c; 6433 6434 if (typeof locale === 'boolean') { 6435 strict = locale; 6436 locale = undefined; 6437 } 6438 // object construction must be done this way. 6439 // https://github.com/moment/moment/issues/1423 6440 c = {}; 6441 c._isAMomentObject = true; 6442 c._useUTC = true; 6443 c._isUTC = true; 6444 c._l = locale; 6445 c._i = input; 6446 c._f = format; 6447 c._strict = strict; 6448 c._pf = defaultParsingFlags(); 6449 6450 return makeMoment(c).utc(); 6451 }; 6452 6453 // creating with unix timestamp (in seconds) 6454 moment.unix = function (input) { 6455 return moment(input * 1000); 6456 }; 6457 6458 // duration 6459 moment.duration = function (input, key) { 6460 var duration = input, 6461 6462 // matching against regexp is expensive, do it on demand 6463 match = null, 6464 sign, 6465 ret, 6466 parseIso, 6467 diffRes; 6468 6469 if (moment.isDuration(input)) { 6470 duration = { 6471 ms: input._milliseconds, 6472 d: input._days, 6473 M: input._months 6474 }; 6475 } else if (typeof input === 'number') { 6476 duration = {}; 6477 if (key) { 6478 duration[key] = input; 6479 } else { 6480 duration.milliseconds = input; 6481 } 6482 } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) { 6483 sign = match[1] === '-' ? -1 : 1; 6484 duration = { 6485 y: 0, 6486 d: toInt(match[DATE]) * sign, 6487 h: toInt(match[HOUR]) * sign, 6488 m: toInt(match[MINUTE]) * sign, 6489 s: toInt(match[SECOND]) * sign, 6490 ms: toInt(match[MILLISECOND]) * sign 6491 }; 6492 } else if (!!(match = isoDurationRegex.exec(input))) { 6493 sign = match[1] === '-' ? -1 : 1; 6494 parseIso = function parseIso(inp) { 6495 // We'd normally use ~~inp for this, but unfortunately it also 6496 // converts floats to ints. 6497 // inp may be undefined, so careful calling replace on it. 6498 var res = inp && parseFloat(inp.replace(',', '.')); 6499 // apply sign while we're at it 6500 return (isNaN(res) ? 0 : res) * sign; 6501 }; 6502 duration = { 6503 y: parseIso(match[2]), 6504 M: parseIso(match[3]), 6505 d: parseIso(match[4]), 6506 h: parseIso(match[5]), 6507 m: parseIso(match[6]), 6508 s: parseIso(match[7]), 6509 w: parseIso(match[8]) 6510 }; 6511 } else if ((typeof duration === 'undefined' ? 'undefined' : _typeof(duration)) === 'object' && ('from' in duration || 'to' in duration)) { 6512 diffRes = momentsDifference(moment(duration.from), moment(duration.to)); 6513 6514 duration = {}; 6515 duration.ms = diffRes.milliseconds; 6516 duration.M = diffRes.months; 6517 } 6518 6519 ret = new Duration(duration); 6520 6521 if (moment.isDuration(input) && hasOwnProp(input, '_locale')) { 6522 ret._locale = input._locale; 6523 } 6524 6525 return ret; 6526 }; 6527 6528 // version number 6529 moment.version = VERSION; 6530 6531 // default format 6532 moment.defaultFormat = isoFormat; 6533 6534 // constant that refers to the ISO standard 6535 moment.ISO_8601 = function () {}; 6536 6537 // Plugins that add properties should also add the key here (null value), 6538 // so we can properly clone ourselves. 6539 moment.momentProperties = momentProperties; 6540 6541 // This function will be called whenever a moment is mutated. 6542 // It is intended to keep the offset in sync with the timezone. 6543 moment.updateOffset = function () {}; 6544 6545 // This function allows you to set a threshold for relative time strings 6546 moment.relativeTimeThreshold = function (threshold, limit) { 6547 if (relativeTimeThresholds[threshold] === undefined) { 6548 return false;
6549 } 6550 if (limit === undefined) { 6551 return relativeTimeThresholds[threshold]; 6552 } 6553 relativeTimeThresholds[threshold] = limit; 6554 return true; 6555 }; 6556 6557 moment.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', function (key, value) { 6558 return moment.locale(key, value); 6559 }); 6560 6561 // This function will load locale and then set the global locale. If 6562 // no arguments are passed in, it will simply return the current global 6563 // locale key. 6564 moment.locale = function (key, values) { 6565 var data; 6566 if (key) { 6567 if (typeof values !== 'undefined') { 6568 data = moment.defineLocale(key, values); 6569 } else { 6570 data = moment.localeData(key); 6571 } 6572 6573 if (data) { 6574 moment.duration._locale = moment._locale = data; 6575 } 6576 } 6577 6578 return moment._locale._abbr; 6579 }; 6580 6581 moment.defineLocale = function (name, values) { 6582 if (values !== null) { 6583 values.abbr = name; 6584 if (!locales[name]) { 6585 locales[name] = new Locale(); 6586 } 6587 locales[name].set(values); 6588 6589 // backwards compat for now: also set the locale 6590 moment.locale(name); 6591 6592 return locales[name]; 6593 } else { 6594 // useful for testing 6595 delete locales[name]; 6596 return null; 6597 } 6598 }; 6599 6600 moment.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', function (key) { 6601 return moment.localeData(key); 6602 }); 6603 6604 // returns locale data 6605 moment.localeData = function (key) { 6606 var locale; 6607 6608 if (key && key._locale && key._locale._abbr) { 6609 key = key._locale._abbr; 6610 } 6611 6612 if (!key) { 6613 return moment._locale; 6614 } 6615 6616 if (!isArray(key)) { 6617 //short-circuit everything else 6618 locale = loadLocale(key); 6619 if (locale) { 6620 return locale; 6621 } 6622 key = [key]; 6623 } 6624 6625 return chooseLocale(key); 6626 }; 6627 6628 // compare moment object 6629 moment.isMoment = function (obj) { 6630 return obj instanceof Moment || obj != null && hasOwnProp(obj, '_isAMomentObject'); 6631 }; 6632 6633 // for typechecking Duration objects 6634 moment.isDuration = function (obj) { 6635 return obj instanceof Duration; 6636 }; 6637 6638 for (i = lists.length - 1; i >= 0; --i) { 6639 makeList(lists[i]); 6640 } 6641 6642 moment.normalizeUnits = function (units) { 6643 return normalizeUnits(units); 6644 }; 6645 6646 moment.invalid = function (flags) { 6647 var m = moment.utc(NaN); 6648 if (flags != null) { 6649 extend(m._pf, flags); 6650 } else { 6651 m._pf.userInvalidated = true; 6652 } 6653 6654 return m; 6655 }; 6656 6657 moment.parseZone = function () { 6658 return moment.apply(null, arguments).parseZone(); 6659 }; 6660 6661 moment.parseTwoDigitYear = function (input) { 6662 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 6663 }; 6664 6665 /************************************ 6666 Moment Prototype 6667 ************************************/ 6668 6669 extend(moment.fn = Moment.prototype, { 6670 6671 clone: function clone() { 6672 return moment(this); 6673 }, 6674 6675 valueOf: function valueOf() { 6676 return +this._d + (this._offset || 0) * 60000; 6677 }, 6678 6679 unix: function unix() { 6680 return Math.floor(+this / 1000); 6681 }, 6682 6683 toString: function toString() { 6684 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); 6685 }, 6686 6687 toDate: function toDate() { 6688 return this._offset ? new Date(+this) : this._d; 6689 }, 6690 6691 toISOString: function toISOString() { 6692 var m = moment(this).utc(); 6693 if (0 < m.year() && m.year() <= 9999) { 6694 return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); 6695 } else { 6696 return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); 6697 } 6698 }, 6699 6700 toArray: function toArray() { 6701 var m = this; 6702 return [m.year(), m.month(), m.date(), m.hours(), m.minutes(), m.seconds(), m.milliseconds()]; 6703 }, 6704 6705 isValid: function isValid() { 6706 return _isValid(this); 6707 }, 6708 6709 isDSTShifted: function isDSTShifted() { 6710 if (this._a) { 6711 return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0; 6712 } 6713 6714 return false;
6715 }, 6716 6717 parsingFlags: function parsingFlags() { 6718 return extend({}, this._pf); 6719 }, 6720 6721 invalidAt: function invalidAt() { 6722 return this._pf.overflow; 6723 }, 6724 6725 utc: function utc(keepLocalTime) { 6726 return this.zone(0, keepLocalTime); 6727 }, 6728 6729 local: function local(keepLocalTime) { 6730 if (this._isUTC) { 6731 this.zone(0, keepLocalTime); 6732 this._isUTC = false; 6733 6734 if (keepLocalTime) { 6735 this.add(this._dateTzOffset(), 'm'); 6736 } 6737 } 6738 return this; 6739 }, 6740 6741 format: function format(inputString) { 6742 var output = formatMoment(this, inputString || moment.defaultFormat); 6743 return this.localeData().postformat(output); 6744 }, 6745 6746 add: createAdder(1, 'add'), 6747 6748 subtract: createAdder(-1, 'subtract'), 6749 6750 diff: function diff(input, units, asFloat) { 6751 var that = makeAs(input, this), 6752 zoneDiff = (this.zone() - that.zone()) * 6e4, 6753 diff, 6754 output, 6755 daysAdjust; 6756 6757 units = normalizeUnits(units); 6758 6759 if (units === 'year' || units === 'month') { 6760 // average number of days in the months in the given dates 6761 diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2 6762 // difference in months 6763 output = (this.year() - that.year()) * 12 + (this.month() - that.month()); 6764 // adjust by taking difference in days, average number of days 6765 // and dst in the given months. 6766 daysAdjust = this - moment(this).startOf('month') - (that - moment(that).startOf('month')); 6767 // same as above but with zones, to negate all dst 6768 daysAdjust -= (this.zone() - moment(this).startOf('month').zone() - (that.zone() - moment(that).startOf('month').zone())) * 6e4; 6769 output += daysAdjust / diff; 6770 if (units === 'year') { 6771 output = output / 12; 6772 } 6773 } else { 6774 diff = this - that; 6775 output = units === 'second' ? diff / 1e3 : // 1000 6776 units === 'minute' ? diff / 6e4 : // 1000 * 60 6777 units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60 6778 units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst 6779 units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst 6780 diff; 6781 } 6782 return asFloat ? output : absRound(output); 6783 }, 6784 6785 from: function from(time, withoutSuffix) { 6786 return moment.duration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix); 6787 }, 6788 6789 fromNow: function fromNow(withoutSuffix) { 6790 return this.from(moment(), withoutSuffix); 6791 }, 6792 6793 calendar: function calendar(time) { 6794 // We want to compare the start of today, vs this. 6795 // Getting start-of-today depends on whether we're zone'd or not. 6796 var now = time || moment(), 6797 sod = makeAs(now, this).startOf('day'), 6798 diff = this.diff(sod, 'days', true), 6799 format = diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; 6800 return this.format(this.localeData().calendar(format, this)); 6801 }, 6802 6803 isLeapYear: function isLeapYear() { 6804 return _isLeapYear(this.year()); 6805 }, 6806 6807 isDST: function isDST() { 6808 return this.zone() < this.clone().month(0).zone() || this.zone() < this.clone().month(5).zone(); 6809 }, 6810 6811 day: function day(input) { 6812 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); 6813 if (input != null) { 6814 input = parseWeekday(input, this.localeData()); 6815 return this.add(input - day, 'd'); 6816 } else { 6817 return day; 6818 } 6819 }, 6820 6821 month: makeAccessor('Month', true), 6822 6823 startOf: function startOf(units) { 6824 units = normalizeUnits(units); 6825 // the following switch intentionally omits break keywords 6826 // to utilize falling through the cases. 6827 switch (units) { 6828 case 'year': 6829 this.month(0); 6830 /* falls through */ 6831 case 'quarter': 6832 case 'month': 6833 this.date(1); 6834 /* falls through */ 6835 case 'week': 6836 case 'isoWeek': 6837 case 'day': 6838 this.hours(0); 6839 /* falls through */ 6840 case 'hour': 6841 this.minutes(0); 6842 /* falls through */ 6843 case 'minute': 6844 this.seconds(0); 6845 /* falls through */ 6846 case 'second': 6847 this.milliseconds(0); 6848 /* falls through */ 6849 } 6850 6851 // weeks are a special case 6852 if (units === 'week') { 6853 this.weekday(0); 6854 } else if (units === 'isoWeek') { 6855 this.isoWeekday(1); 6856 } 6857 6858 // quarters are also special 6859 if (units === 'quarter') { 6860 this.month(Math.floor(this.month() / 3) * 3); 6861 } 6862 6863 return this; 6864 }, 6865 6866 endOf: function endOf(units) { 6867 units = normalizeUnits(units); 6868 return this.startOf(units).add(1, units === 'isoWeek' ? 'week' : units).subtract(1, 'ms'); 6869 }, 6870 6871 isAfter: function isAfter(input, units) { 6872 units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); 6873 if (units === 'millisecond') { 6874 input = moment.isMoment(input) ? input : moment(input); 6875 return +this > +input; 6876 } else { 6877 return +this.clone().startOf(units) > +moment(input).startOf(units); 6878 } 6879 }, 6880 6881 isBefore: function isBefore(input, units) { 6882 units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); 6883 if (units === 'millisecond') { 6884 input = moment.isMoment(input) ? input : moment(input); 6885 return +this < +input; 6886 } else { 6887 return +this.clone().startOf(units) < +moment(input).startOf(units); 6888 } 6889 }, 6890 6891 isSame: function isSame(input, units) { 6892 units = normalizeUnits(units || 'millisecond'); 6893 if (units === 'millisecond') { 6894 input = moment.isMoment(input) ? input : moment(input); 6895 return +this === +input; 6896 } else { 6897 return +this.clone().startOf(units) === +makeAs(input, this).startOf(units); 6898 } 6899 }, 6900 6901 min: deprecate('moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', function (other) { 6902 other = moment.apply(null, arguments);
6903 return other < this ? this : other; 6904 }), 6905 6906 max: deprecate('moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', function (other) { 6907 other = moment.apply(null, arguments); 6908 return other > this ? this : other; 6909 }), 6910 6911 // keepLocalTime = true means only change the timezone, without 6912 // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]--> 6913 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone 6914 // +0200, so we adjust the time as needed, to be valid. 6915 // 6916 // Keeping the time actually adds/subtracts (one hour) 6917 // from the actual represented time. That is why we call updateOffset 6918 // a second time. In case it wants us to change the offset again 6919 // _changeInProgress == true case, then we have to adjust, because 6920 // there is no such time in the given timezone. 6921 zone: function zone(input, keepLocalTime) { 6922 var offset = this._offset || 0, 6923 localAdjust; 6924 if (input != null) { 6925 if (typeof input === 'string') { 6926 input = timezoneMinutesFromString(input); 6927 } 6928 if (Math.abs(input) < 16) { 6929 input = input * 60; 6930 } 6931 if (!this._isUTC && keepLocalTime) { 6932 localAdjust = this._dateTzOffset(); 6933 } 6934 this._offset = input; 6935 this._isUTC = true; 6936 if (localAdjust != null) { 6937 this.subtract(localAdjust, 'm'); 6938 } 6939 if (offset !== input) { 6940 if (!keepLocalTime || this._changeInProgress) { 6941 addOrSubtractDurationFromMoment(this, moment.duration(offset - input, 'm'), 1, false); 6942 } else if (!this._changeInProgress) { 6943 this._changeInProgress = true; 6944 moment.updateOffset(this, true); 6945 this._changeInProgress = null; 6946 } 6947 } 6948 } else { 6949 return this._isUTC ? offset : this._dateTzOffset(); 6950 } 6951 return this; 6952 }, 6953 6954 zoneAbbr: function zoneAbbr() { 6955 return this._isUTC ? 'UTC' : ''; 6956 }, 6957 6958 zoneName: function zoneName() { 6959 return this._isUTC ? 'Coordinated Universal Time' : ''; 6960 }, 6961 6962 parseZone: function parseZone() { 6963 if (this._tzm) { 6964 this.zone(this._tzm); 6965 } else if (typeof this._i === 'string') { 6966 this.zone(this._i); 6967 } 6968 return this; 6969 }, 6970 6971 hasAlignedHourOffset: function hasAlignedHourOffset(input) { 6972 if (!input) { 6973 input = 0; 6974 } else { 6975 input = moment(input).zone(); 6976 } 6977 6978 return (this.zone() - input) % 60 === 0; 6979 }, 6980 6981 daysInMonth: function daysInMonth() { 6982 return _daysInMonth(this.year(), this.month()); 6983 }, 6984 6985 dayOfYear: function dayOfYear(input) { 6986 var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1; 6987 return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); 6988 }, 6989 6990 quarter: function quarter(input) { 6991 return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); 6992 }, 6993 6994 weekYear: function weekYear(input) { 6995 var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; 6996 return input == null ? year : this.add(input - year, 'y'); 6997 }, 6998 6999 isoWeekYear: function isoWeekYear(input) { 7000 var year = weekOfYear(this, 1, 4).year; 7001 return input == null ? year : this.add(input - year, 'y'); 7002 }, 7003 7004 week: function week(input) { 7005 var week = this.localeData().week(this); 7006 return input == null ? week : this.add((input - week) * 7, 'd'); 7007 }, 7008 7009 isoWeek: function isoWeek(input) { 7010 var week = weekOfYear(this, 1, 4).week; 7011 return input == null ? week : this.add((input - week) * 7, 'd'); 7012 }, 7013 7014 weekday: function weekday(input) { 7015 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; 7016 return input == null ? weekday : this.add(input - weekday, 'd'); 7017 }, 7018 7019 isoWeekday: function isoWeekday(input) { 7020 // behaves the same as moment#day except 7021 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 7022 // as a setter, sunday should belong to the previous week. 7023 return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); 7024 }, 7025 7026 isoWeeksInYear: function isoWeeksInYear() { 7027 return _weeksInYear(this.year(), 1, 4); 7028 }, 7029 7030 weeksInYear: function weeksInYear() { 7031 var weekInfo = this.localeData()._week; 7032 return _weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); 7033 }, 7034 7035 get: function get(units) { 7036 units = normalizeUnits(units); 7037 return this[units](); 7038 }, 7039 7040 set: function set(units, value) { 7041 units = normalizeUnits(units); 7042 if (typeof this[units] === 'function') { 7043 this[units](value); 7044 } 7045 return this; 7046 }, 7047 7048 // If passed a locale key, it will set the locale for this 7049 // instance. Otherwise, it will return the locale configuration 7050 // variables for this instance. 7051 locale: function locale(key) { 7052 var newLocaleData; 7053 7054 if (key === undefined) { 7055 return this._locale._abbr; 7056 } else { 7057 newLocaleData = moment.localeData(key); 7058 if (newLocaleData != null) { 7059 this._locale = newLocaleData; 7060 } 7061 return this; 7062 } 7063 }, 7064 7065 lang: deprecate('moment().lang() is deprecated. Use moment().localeData() instead.', function (key) { 7066 if (key === undefined) { 7067 return this.localeData(); 7068 } else { 7069 return this.locale(key); 7070 } 7071 }), 7072 7073 localeData: function localeData() { 7074 return this._locale; 7075 }, 7076 7077 _dateTzOffset: function _dateTzOffset() { 7078 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 7079 // https://github.com/moment/moment/pull/1871 7080 return Math.round(this._d.getTimezoneOffset() / 15) * 15; 7081 } 7082 }); 7083 7084 function rawMonthSetter(mom, value) { 7085 var dayOfMonth; 7086 7087 // TODO: Move this out of here! 7088 if (typeof value === 'string') { 7089 value = mom.localeData().monthsParse(value); 7090 // TODO: Another silent failure? 7091 if (typeof value !== 'number') { 7092 return mom; 7093 } 7094 } 7095 7096 dayOfMonth = Math.min(mom.date(), _daysInMonth(mom.year(), value)); 7097 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); 7098 return mom; 7099 } 7100 7101 function rawGetter(mom, unit) { 7102 return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); 7103 } 7104 7105 function rawSetter(mom, unit, value) { 7106 if (unit === 'Month') { 7107 return rawMonthSetter(mom, value); 7108 } else { 7109 return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 7110 } 7111 } 7112 7113 function makeAccessor(unit, keepTime) { 7114 return function (value) { 7115 if (value != null) { 7116 rawSetter(this, unit, value); 7117 moment.updateOffset(this, keepTime); 7118 return this; 7119 } else { 7120 return rawGetter(this, unit); 7121 } 7122 }; 7123 } 7124 7125 moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false); 7126 moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false); 7127 moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false); 7128 // Setting the hour should keep the time, because the user explicitly 7129 // specified which hour he wants. So trying to maintain the same hour (in 7130 // a new timezone) makes sense. Adding/subtracting hours does not follow 7131 // this rule. 7132 moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true); 7133 // moment.fn.month is defined separately 7134 moment.fn.date = makeAccessor('Date', true); 7135 moment.fn.dates = deprecate('dates accessor is deprecated. Use date instead.', makeAccessor('Date', true)); 7136 moment.fn.year = makeAccessor('FullYear', true); 7137 moment.fn.years = deprecate('years accessor is deprecated. Use year instead.', makeAccessor('FullYear', true)); 7138 7139 // add plural methods 7140 moment.fn.days = moment.fn.day; 7141 moment.fn.months = moment.fn.month; 7142 moment.fn.weeks = moment.fn.week; 7143 moment.fn.isoWeeks = moment.fn.isoWeek; 7144 moment.fn.quarters = moment.fn.quarter; 7145 7146 // add aliased format methods 7147 moment.fn.toJSON = moment.fn.toISOString; 7148 7149 /************************************ 7150 Duration Prototype 7151 ************************************/ 7152 7153 function daysToYears(days) { 7154 // 400 years have 146097 days (taking into account leap year rules) 7155 return days * 400 / 146097; 7156 } 7157 7158 function yearsToDays(years) { 7159 // years * 365 + absRound(years / 4) - 7160 // absRound(years / 100) + absRound(years / 400); 7161 return years * 146097 / 400; 7162 } 7163 7164 extend(moment.duration.fn = Duration.prototype, { 7165 7166 _bubble: function _bubble() { 7167 var milliseconds = this._milliseconds, 7168 days = this._days, 7169 months = this._months, 7170 data = this._data, 7171 seconds, 7172 minutes, 7173 hours, 7174 years = 0; 7175 7176 // The following code bubbles up values, see the tests for 7177 // examples of what that means. 7178 data.milliseconds = milliseconds % 1000; 7179 7180 seconds = absRound(milliseconds / 1000); 7181 data.seconds = seconds % 60; 7182 7183 minutes = absRound(seconds / 60); 7184 data.minutes = minutes % 60; 7185 7186 hours = absRound(minutes / 60); 7187 data.hours = hours % 24; 7188 7189 days += absRound(hours / 24); 7190 7191 // Accurately convert days to years, assume start from year 0. 7192 years = absRound(daysToYears(days)); 7193 days -= absRound(yearsToDays(years)); 7194 7195 // 30 days to a month
7196 // TODO (iskren): Use anchor date (like 1st Jan) to compute this. 7197 months += absRound(days / 30); 7198 days %= 30; 7199 7200 // 12 months -> 1 year 7201 years += absRound(months / 12); 7202 months %= 12; 7203 7204 data.days = days; 7205 data.months = months; 7206 data.years = years; 7207 }, 7208 7209 abs: function abs() { 7210 this._milliseconds = Math.abs(this._milliseconds); 7211 this._days = Math.abs(this._days); 7212 this._months = Math.abs(this._months); 7213 7214 this._data.milliseconds = Math.abs(this._data.milliseconds); 7215 this._data.seconds = Math.abs(this._data.seconds); 7216 this._data.minutes = Math.abs(this._data.minutes); 7217 this._data.hours = Math.abs(this._data.hours); 7218 this._data.months = Math.abs(this._data.months); 7219 this._data.years = Math.abs(this._data.years); 7220 7221 return this; 7222 }, 7223 7224 weeks: function weeks() { 7225 return absRound(this.days() / 7); 7226 }, 7227 7228 valueOf: function valueOf() { 7229 return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; 7230 }, 7231 7232 humanize: function humanize(withSuffix) { 7233 var output = relativeTime(this, !withSuffix, this.localeData()); 7234 7235 if (withSuffix) { 7236 output = this.localeData().pastFuture(+this, output); 7237 } 7238 7239 return this.localeData().postformat(output); 7240 }, 7241 7242 add: function add(input, val) { 7243 // supports only 2.0-style add(1, 's') or add(moment) 7244 var dur = moment.duration(input, val); 7245 7246 this._milliseconds += dur._milliseconds; 7247 this._days += dur._days; 7248 this._months += dur._months; 7249 7250 this._bubble(); 7251 7252 return this; 7253 }, 7254 7255 subtract: function subtract(input, val) { 7256 var dur = moment.duration(input, val); 7257 7258 this._milliseconds -= dur._milliseconds; 7259 this._days -= dur._days; 7260 this._months -= dur._months; 7261 7262 this._bubble(); 7263 7264 return this; 7265 }, 7266 7267 get: function get(units) { 7268 units = normalizeUnits(units); 7269 return this[units.toLowerCase() + 's'](); 7270 }, 7271 7272 as: function as(units) { 7273 var days, months; 7274 units = normalizeUnits(units); 7275 7276 if (units === 'month' || units === 'year') { 7277 days = this._days + this._milliseconds / 864e5; 7278 months = this._months + daysToYears(days) * 12; 7279 return units === 'month' ? months : months / 12; 7280 } else { 7281 // handle milliseconds separately because of floating point math errors (issue #1867) 7282 days = this._days + yearsToDays(this._months / 12); 7283 switch (units) { 7284 case 'week': 7285 return days / 7 + this._milliseconds / 6048e5; 7286 case 'day': 7287 return days + this._milliseconds / 864e5; 7288 case 'hour': 7289 return days * 24 + this._milliseconds / 36e5; 7290 case 'minute': 7291 return days * 24 * 60 + this._milliseconds / 6e4; 7292 case 'second': 7293 return days * 24 * 60 * 60 + this._milliseconds / 1000; 7294 // Math.floor prevents floating point math errors here 7295 case 'millisecond': 7296 return Math.floor(days * 24 * 60 * 60 * 1000) + this._milliseconds; 7297 default: 7298 throw new Error('Unknown unit ' + units); 7299 } 7300 } 7301 }, 7302 7303 lang: moment.fn.lang, 7304 locale: moment.fn.locale, 7305 7306 toIsoString: deprecate('toIsoString() is deprecated. Please use toISOString() instead ' + '(notice the capitals)', function () { 7307 return this.toISOString(); 7308 }), 7309 7310 toISOString: function toISOString() { 7311 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 7312 var years = Math.abs(this.years()), 7313 months = Math.abs(this.months()), 7314 days = Math.abs(this.days()), 7315 hours = Math.abs(this.hours()), 7316 minutes = Math.abs(this.minutes()), 7317 seconds = Math.abs(this.seconds() + this.milliseconds() / 1000); 7318 7319 if (!this.asSeconds()) { 7320 // this is the same as C#'s (Noda) and python (isodate)... 7321 // but not other JS (goog.date) 7322 return 'P0D'; 7323 } 7324 7325 return (this.asSeconds() < 0 ? '-' : '') + 'P' + (years ? years + 'Y' : '') + (months ? months + 'M' : '') + (days ? days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hours + 'H' : '') + (minutes ? minutes + 'M' : '') + (seconds ? seconds + 'S' : ''); 7326 }, 7327 7328 localeData: function localeData() { 7329 return this._locale; 7330 } 7331 }); 7332 7333 moment.duration.fn.toString = moment.duration.fn.toISOString; 7334 7335 function makeDurationGetter(name) { 7336 moment.duration.fn[name] = function () { 7337 return this._data[name]; 7338 }; 7339 } 7340 7341 for (i in unitMillisecondFactors) { 7342 if (hasOwnProp(unitMillisecondFactors, i)) { 7343 makeDurationGetter(i.toLowerCase()); 7344 } 7345 } 7346 7347 moment.duration.fn.asMilliseconds = function () { 7348 return this.as('ms'); 7349 }; 7350 moment.duration.fn.asSeconds = function () { 7351 return this.as('s'); 7352 }; 7353 moment.duration.fn.asMinutes = function () { 7354 return this.as('m'); 7355 }; 7356 moment.duration.fn.asHours = function () { 7357 return this.as('h'); 7358 }; 7359 moment.duration.fn.asDays = function () { 7360 return this.as('d'); 7361 }; 7362 moment.duration.fn.asWeeks = function () { 7363 return this.as('weeks'); 7364 }; 7365 moment.duration.fn.asMonths = function () { 7366 return this.as('M'); 7367 }; 7368 moment.duration.fn.asYears = function () { 7369 return this.as('y'); 7370 }; 7371 7372 /************************************ 7373 Default Locale 7374 ************************************/ 7375 7376 // Set default locale, other locale will inherit from English. 7377 moment.locale('en', { 7378 ordinal: function ordinal(number) { 7379 var b = number % 10, 7380 output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; 7381 return number + output; 7382 } 7383 }); 7384 7385 /* EMBED_LOCALES */ 7386 7387 /************************************ 7388 Exposing Moment 7389 ************************************/ 7390 7391 function makeGlobal(shouldDeprecate) { 7392 /*global ender:false */ 7393 if (typeof ender !== 'undefined') { 7394 return; 7395 } 7396 oldGlobalMoment = globalScope.moment; 7397 if (shouldDeprecate) {
7398 globalScope.moment = deprecate('Accessing Moment through the global scope is ' + 'deprecated, and will be removed in an upcoming ' + 'release.', moment); 7399 } else { 7400 globalScope.moment = moment; 7401 } 7402 } 7403 7404 // CommonJS module is defined 7405 if (hasModule) { 7406 module.exports = moment; 7407 } else if (true) { 7408 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, module) { 7409 if (module.config && module.config() && module.config().noGlobal === true) { 7410 // release the global variable 7411 globalScope.moment = oldGlobalMoment; 7412 } 7413 7414 return moment; 7415 }).call(exports, __webpack_require__, exports, module), 7416 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 7417 makeGlobal(true); 7418 } else { 7419 makeGlobal(); 7420 } 7421}).call(undefined); 7422/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(1)(module))) 7423 7424/***/ }), 7425/* 21 */ 7426/***/ (function(module, exports, __webpack_require__) { 7427 7428"use strict"; 7429 7430 7431if (typeof Object.create !== 'function') { 7432 Object.create = function (obj) { 7433 function F() {} 7434 F.prototype = obj; 7435 return new F(); 7436 }; 7437} 7438 7439function striptags(html) { 7440 var tmp = document.createElement("DIV"); 7441 tmp.innerHTML = html; 7442 return tmp.textContent || tmp.innerText; 7443} 7444 7445(function ($, window, document, undefined) { 7446 $.fn.socialfeed = function (_options) { 7447 7448 var defaults = { 7449 plugin_folder: '', // a folder in which the plugin is located (with a slash in the end) 7450 template: 'template.html', // a path to the template file 7451 show_media: false, // show images of attachments if available 7452 media_min_width: 300, 7453 length: 500, // maximum length of post message shown 7454 date_format: 'll', 7455 date_locale: 'en' 7456 }; 7457 //--------------------------------------------------------------------------------- 7458 var options = $.extend(defaults, _options), 7459 container = $(this), 7460 template, 7461 social_networks = ['facebook', 'instagram', 'vk', 'google', 'blogspot', 'twitter', 'pinterest', 'rss'], 7462 posts_to_load_count = 0, 7463 loaded_post_count = 0; 7464 // container.empty().css('display', 'block'); 7465 //--------------------------------------------------------------------------------- 7466 7467 //--------------------------------------------------------------------------------- 7468 // This function performs consequent data loading from all of the sources by calling corresponding functions 7469 function calculatePostsToLoadCount() { 7470 social_networks.forEach(function (network) { 7471 if (options[network]) { 7472 if (options[network].accounts) { 7473 posts_to_load_count += options[network].limit * options[network].accounts.length; 7474 } else if (options[network].urls) { 7475 posts_to_load_count += options[network].limit * options[network].urls.length; 7476 } else { 7477 posts_to_load_count += options[network].limit; 7478 } 7479 } 7480 }); 7481 } 7482 7483 calculatePostsToLoadCount(); 7484 7485 function fireCallback() { 7486 var fire = true; 7487 /*$.each(Object.keys(loaded), function() { 7488 if (loaded[this] > 0) 7489 fire = false; 7490 });*/ 7491 if (fire && options.callback) { 7492 options.callback(); 7493 } 7494 } 7495 7496 var Utility = { 7497 request: function request(url, callback) { 7498 $.ajax({ 7499 url: url, 7500 dataType: 'jsonp', 7501 success: callback 7502 }); 7503 }, 7504 get_request: function get_request(url, callback) { 7505 $.get(url, callback, 'json'); 7506 }, 7507 wrapLinks: function wrapLinks(string, social_network) { 7508 // var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; 7509 // if (social_network === 'google-plus') { 7510 // string = string.replace(/(@|#)([a-z0-9_]+['])/ig, Utility.wrapGoogleplusTagTemplate); 7511 // } else { 7512 // string = string.replace(exp, Utility.wrapLinkTemplate); 7513 // } 7514 return string; 7515 }, 7516 wrapLinkTemplate: function wrapLinkTemplate(string) { 7517 return '<a target="_blank" href="' + string + '">' + string + '<\/a>'; 7518 }, 7519 wrapGoogleplusTagTemplate: function wrapGoogleplusTagTemplate(string) { 7520 return '<a target="_blank" href="https://plus.google.com/s/' + string + '" >' + string + '<\/a>'; 7521 }, 7522 shorten: function shorten(string) {
7523 string = $.trim(string); 7524 return string; 7525 // if (string.length > options.length) { 7526 // return jQuery.trim(string).substring(0, options.length).split(" ").slice(0, -1).join(" ") + "..."; 7527 // } else { 7528 // return string; 7529 // } 7530 }, 7531 stripHTML: function stripHTML(string) { 7532 if (typeof string === "undefined" || string === null) { 7533 return ''; 7534 } 7535 return string.replace(/(<([^>]+)>)|nbsp;|\s{2,}|/ig, ""); 7536 } 7537 }; 7538 7539 function SocialFeedPost(social_network, data) { 7540 this.content = data; 7541 this.content.social_network = social_network; 7542 this.content.attachment = this.content.attachment === undefined ? '' : this.content.attachment; 7543 this.content.time_ago = data.dt_create.locale(options.date_locale).fromNow(); 7544 this.content.date = data.dt_create.locale(options.date_locale).format(options.date_format); 7545 this.content.dt_create = this.content.dt_create.valueOf(); 7546 this.content.text = Utility.wrapLinks(Utility.shorten(data.message + ' ' + data.description), data.social_network); 7547 this.content.moderation_passed = options.moderation ? options.moderation(this.content) : true; 7548 7549 Feed[social_network].posts.push(this); 7550 } 7551 SocialFeedPost.prototype = { 7552 render: function render() { 7553 var rendered_html = Feed.template(this.content); 7554 var data = this.content; 7555 7556 if ($(container).children('[social-feed-id=' + data.id + ']').length !== 0) { 7557 return false; 7558 } 7559 if ($(container).children().length === 0) { 7560 $(container).append(rendered_html); 7561 } else { 7562 var i = 0, 7563 insert_index = -1; 7564 $.each($(container).children(), function () { 7565 if ($(this).attr('dt-create') < data.dt_create) { 7566 insert_index = i; 7567 return false; 7568 } 7569 i++; 7570 }); 7571 $(container).append(rendered_html); 7572 if (insert_index >= 0) { 7573 insert_index++; 7574 var before = $(container).children('div:nth-child(' + insert_index + ')'), 7575 current = $(container).children('div:last-child'); 7576 $(current).insertBefore(before); 7577 } 7578 } 7579 if (options.media_min_width) { 7580 7581 var query = '[social-feed-id=' + data.id + '] img.attachment'; 7582 var image = $(query); 7583 7584 // preload the image 7585 var height, 7586 width = ''; 7587 var img = new Image(); 7588 var imgSrc = image.attr("src"); 7589 7590 $(img).on('load', function () { 7591 if (img.width < options.media_min_width) { 7592 image.hide(); 7593 } 7594 // garbage collect img 7595 // delete img; 7596 }).on('error', function () { 7597 // image couldnt be loaded 7598 image.hide(); 7599 }).attr({ 7600 src: imgSrc 7601 }); 7602 } 7603 7604 loaded_post_count++; 7605 7606 if (loaded_post_count == posts_to_load_count) { 7607 fireCallback(); 7608 } 7609 } 7610 7611 }; 7612 7613 var Feed = { 7614 template: false, 7615 init: function init() { 7616 Feed.getTemplate(function () { 7617 social_networks.forEach(function (network) { 7618 if (options[network]) { 7619 if (options[network].accounts) { 7620 //loaded[network] = 0; 7621 options[network].accounts.forEac
7621h(function (account) { 7622 //loaded[network]++; 7623 Feed[network].getData(account); 7624 }); 7625 } else if (options[network].urls) { 7626 options[network].urls.forEach(function (url) { 7627 Feed[network].getData(url); 7628 }); 7629 } else { 7630 Feed[network].getData(); 7631 } 7632 } 7633 }); 7634 }); 7635 setTimeout(fireCallback, 4000); 7636 }, 7637 getTemplate: function getTemplate(callback) { 7638 if (Feed.template) return callback();else { 7639 if (options.template_html) { 7640 Feed.template = doT.template(options.template_html); 7641 return callback(); 7642 } else { 7643 $.get(options.template, function (template_html) { 7644 Feed.template = doT.template(template_html); 7645 return callback(); 7646 }); 7647 } 7648 } 7649 }, 7650 twitter: { 7651 posts: [], 7652 loaded: false, 7653 api: 'http://api.tweecool.com/', 7654 7655 getData: function getData(account) { 7656 7657 var cb = new Codebird(); 7658 cb.setConsumerKey(options.twitter.consumer_key, options.twitter.consumer_secret); 7659 7660 // Allow setting your own proxy with Codebird 7661 if (options.twitter.proxy !== undefined) { 7662 cb.setProxy(options.twitter.proxy); 7663 } 7664 7665 switch (account[0]) { 7666 case '@': 7667 var userid = account.substr(1); 7668 cb.__call("statuses_userTimeline", { 7669 "id": userid, 7670 "exclude_replies": true, 7671 "count": options.twitter.limit, 7672 "tweet_mode": typeof options.twitter.tweet_mode === "undefined" ? "compatibility" : options.twitter.tweet_mode 7673 }, Feed.twitter.utility.getPosts, true // this parameter required 7674 ); 7675 break; 7676 case '#': 7677 var hashtag = account.substr(1); 7678 cb.__call("search_tweets", { 7679 "q": hashtag, 7680 "count": options.twitter.limit, 7681 "tweet_mode": typeof options.twitter.tweet_mode === "undefined" ? "compatibility" : options.twitter.tweet_mode 7682 }, function (reply) { 7683 Feed.twitter.utility.getPosts(reply.statuses); 7684 }, true // this parameter required 7685 ); 7686 break; 7687 default: 7688 } 7689 }, 7690 utility: { 7691 getPosts: function getPosts(json) { 7692 if (json) { 7693 $.each(json, function () { 7694 var element = this; 7695 if (!element.retweeted_status) { 7696 var post = new SocialFeedPost('twitter', Feed.twitter.utility.unifyPostData(element)); 7697 post.render(); 7698 } else { 7699 posts_to_load_count = posts_to_load_count - 1; 7700 } 7701 }); 7702 } 7703 }, 7704 unifyPostData: function unifyPostData(element) { 7705 var post = {}; 7706 if (element.id) {
7707 post.id = element.id_str; 7708 //prevent a moment.js console warning due to Twitter's poor date format. 7709 post.dt_create = moment(element.created_at, 'dd MMM DD HH:mm:ss ZZ YYYY'); 7710 post.author_link = 'http://twitter.com/' + element.user.screen_name; 7711 post.author_picture = element.user.profile_image_url_https; 7712 post.post_url = post.author_link + '/status/' + element.id_str; 7713 post.author_name = element.user.name; 7714 post.message = typeof element.text === "undefined" ? striptags(element.full_text.substr(element.display_text_range[0], element.display_text_range[1])) : striptags(element.text); 7715 post.description = ''; 7716 post.link = 'http://twitter.com/' + element.user.screen_name + '/status/' + element.id_str; 7717 7718 if (options.show_media === true) { 7719 if (element.entities.media && element.entities.media.length > 0) { 7720 var image_url = element.entities.media[0].media_url_https; 7721 if (image_url) { 7722 post.attachment = '<img class="attachment" src="' + image_url + '" />'; 7723 } 7724 } 7725 } 7726 } 7727 return post; 7728 } 7729 } 7730 }, 7731 facebook: { 7732 posts: [], 7733 graph: 'https://graph.facebook.com/', 7734 loaded: false, 7735 getData: function getData(account) { 7736 var proceed = function proceed(request_url) { 7737 Utility.request(request_url, Feed.facebook.utility.getPosts); 7738 }; 7739 var fields = '?fields=id,from,name,message,created_time,story,description,link'; 7740 fields += options.show_media === true ? ',picture,object_id' : ''; 7741 var request_url, 7742 limit = '&limit=' + options.facebook.limit,
7743 query_extention = '&access_token=' + options.facebook.access_token + '&callback=?'; 7744 switch (account[0]) { 7745 case '@': 7746 var username = account.substr(1); 7747 Feed.facebook.utility.getUserId(username, function (userdata) { 7748 if (userdata.id !== '') { 7749 request_url = Feed.facebook.graph + 'v2.4/' + userdata.id + '/posts' + fields + limit + query_extention; 7750 proceed(request_url); 7751 } 7752 }); 7753 break; 7754 case '!': 7755 var page = account.substr(1); 7756 request_url = Feed.facebook.graph + 'v2.4/' + page + '/feed' + fields + limit + query_extention; 7757 proceed(request_url); 7758 break; 7759 default: 7760 proceed(request_url); 7761 } 7762 }, 7763 utility: { 7764 getUserId: function getUserId(username, callback) {
7765 var query_extention = '&access_token=' + options.facebook.access_token + '&callback=?'; 7766 var url = 'https://graph.facebook.com/' + username + '?' + query_extention; 7767 var result = ''; 7768 $.get(url, callback, 'json'); 7769 }, 7770 prepareAttachment: function prepareAttachment(element) { 7771 var image_url = element.picture; 7772 if (image_url.indexOf('_b.') !== -1) { 7773 //do nothing it is already big 7774 } else if (image_url.indexOf('safe_image.php') !== -1) { 7775 image_url = Feed.facebook.utility.getExternalImageURL(image_url, 'url'); 7776 } else if (image_url.indexOf('app_full_proxy.php') !== -1) { 7777 image_url = Feed.facebook.utility.getExternalImageURL(image_url, 'src'); 7778 } else if (element.object_id) { 7779 image_url = Feed.facebook.graph + element.object_id + '/picture/?type=normal'; 7780 } 7781 return '<img class="attachment" src="' + image_url + '" />'; 7782 }, 7783 getExternalImageURL: function getExternalImageURL(image_url, parameter) { 7784 image_url = decodeURIComponent(image_url).split(parameter + '=')[1]; 7785 if (image_url.indexOf('fbcdn-sphotos') === -1) { 7786 return image_url.split('&')[0]; 7787 } else { 7788 return image_url; 7789 } 7790 }, 7791 getPosts: function getPosts(json) { 7792 if (json['data']) { 7793 json['data'].forEach(function (element) { 7794 var post = new SocialFeedPost('facebook', Feed.facebook.utility.unifyPostData(element)); 7795 post.render(); 7796 }); 7797 } 7798 }, 7799 unifyPostData: function unifyPostData(element) { 7800 var post = {}, 7801 text = element.message ? element.message : element.story; 7802 7803 post.id = element.id; 7804 post.dt_create = moment(element.created_time); 7805 post.author_link = 'http://facebook.com/' + element.from.id; 7806 post.author_picture = Feed.facebook.graph + element.from.id + '/picture'; 7807 post.author_name = element.from.name; 7808 post.name = element.name || ""; 7809 post.message = text ? text : ''; 7810 post.description = element.description ? element.description : ''; 7811 post.link = element.link ? element.link : 'http://facebook.com/' + element.from.id; 7812 7813 if (options.show_media === true) { 7814 if (element.picture) { 7815 var attachment = Feed.facebook.utility.prepareAttachment(element); 7816 if (attachment) { 7817 post.attachment = attachment; 7818 } 7819 } 7820 } 7821 return post; 7822 } 7823 } 7824 }, 7825 google: { 7826 posts: [], 7827 loaded: false, 7828 api: 'https://www.googleapis.com/plus/v1/', 7829 getData: function getData(account) { 7830 var request_url; 7831 switch (account[0]) { 7832 case '#': 7833 var hashtag = account.substr(1); 7834 request_url = Feed.google.api + 'activities?query=' + hashtag + '&key=' + options.google.access_token + '&maxResults=' + options.google.limit; 7835 Utility.get_request(request_url, Feed.google.utility.getPosts); 7836 break; 7837 case '@': 7838 var username = account.substr(1); 7839 request_url = Feed.google.api + 'people/' + username + '/activities/public?key=' + options.google.access_token + '&maxResults=' + options.google.limit; 7840 Utility.get_request(request_url, Feed.google.utility.getPosts); 7841 break; 7842 default: 7843 } 7844 }, 7845 utility: { 7846 getPosts: function getPosts(json) { 7847 if (json.items) { 7848 $.each(json.items, function (i) { 7849 var post = new SocialFeedPost('google', Feed.google.utility.unifyPostData(json.items[i])); 7850 post.render(); 7851 }); 7852 } 7853 }, 7854 unifyPostData: function unifyPostData(element) { 7855 var post = {}; 7856
7857 post.id = element.id; 7858 post.attachment = ''; 7859 post.description = ''; 7860 post.dt_create = moment(element.published); 7861 post.author_link = element.actor.url; 7862 post.author_picture = element.actor.image.url; 7863 post.author_name = element.actor.displayName; 7864 7865 if (options.show_media === true) { 7866 if (element.object.attachments) { 7867 $.each(element.object.attachments, function () { 7868 var image = ''; 7869 if (this.fullImage) { 7870 image = this.fullImage.url; 7871 } else { 7872 if (this.objectType === 'album') { 7873 if (this.thumbnails && this.thumbnails.length > 0) { 7874 if (this.thumbnails[0].image) { 7875 image = this.thumbnails[0].image.url; 7876 } 7877 } 7878 } 7879 } 7880 post.attachment = '<img class="attachment" src="' + image
7880+ '"/>'; 7881 }); 7882 } 7883 } 7884 post.message = element.title; 7885 post.link = element.url; 7886 7887 return post; 7888 } 7889 } 7890 }, 7891 instagram: { 7892 posts: [], 7893 api: 'https://api.instagram.com/v1/', 7894 loaded: false, 7895 accessType: function accessType() { 7896 // If we have both the client_id and access_token set in options, 7897 // use access_token for authentication. If client_id is not set 7898 // then use access_token. If neither are set, log an error to console. 7899 if (typeof options.instagram.access_token === 'undefined' && typeof options.instagram.client_id === 'undefined') { 7900 console.log('You need to define a client_id or access_token to authenticate with Instagram\'s API.'); 7901 return undefined; 7902 } 7903 if (options.instagram.access_token) { 7904 options.instagram.client_id = undefined; 7905 } 7906 options.instagram.access_type = typeof options.instagram.client_id === 'undefined' ? 'access_token' : 'client_id'; 7907 return options.instagram.access_type; 7908 }, 7909 getData: function getData(account) { 7910 var url; 7911 7912 // API endpoint URL depends on which authentication type we're using. 7913 if (this.accessType() !== 'undefined') { 7914 var authTokenParams = options.instagram.access_type + '=' + options.instagram[options.instagram.access_type]; 7915 } 7916 7917 switch (account[0]) { 7918 case '@': 7919 var username = account.substr(1); 7920 url = Feed.instagram.api + 'users/search/?q=' + username + '&' + authTokenParams + '&count=1' + '&callback=?'; 7921 Utility.request(url, Feed.instagram.utility.getUsers); 7922 break; 7923 case '#': 7924 var hashtag = account.substr(1); 7925 url = Feed.instagram.api + 'tags/' + hashtag + '/media/recent/?' + authTokenParams + '&' + 'count=' + options.instagram.limit + '&callback=?'; 7926 Utility.request(url, Feed.instagram.utility.getImages); 7927 break; 7928 case '&': 7929 var id = account.substr(1); 7930 url = Feed.instagram.api + 'users/' + id + '/?' + authTokenParams + '&' + 'count=' + options.instagram.limit + '&callback=?'; 7931 Utility.request(url, Feed.instagram.utility.getUsers); 7932 default: 7933 } 7934 }, 7935 utility: { 7936 getImages: function getImages(json) { 7937 if (json.data) { 7938 json.data.forEach(function (element) { 7939 var post = new SocialFeedPost('instagram', Feed.instagram.utility.unifyPostData(element)); 7940 post.render(); 7941 }); 7942 } 7943 }, 7944 getUsers: function getUsers(json) { 7945 // API endpoint URL depends on which authentication type we're using. 7946 if (options.instagram.access_type !== 'undefined') { 7947 var authTokenParams = options.instagram.access_type + '=' + options.instagram[options.instagram.access_type]; 7948 } 7949 7950 if (!jQuery.isArray(json.data)) json.data = [json.data]; 7951 json.data.forEach(function (user) { 7952 var url = Feed.instagram.api + 'users/' + user.id + '/media/recent/?' + authTokenParams + '&' + 'count=' + options.instagram.limit + '&callback=?'; 7953 Utility.request(url, Feed.instagram.utility.getImages); 7954 }); 7955 }, 7956 unifyPostData: function unifyPostData(element) { 7957 var post = {}; 7958
7959 post.id = element.id; 7960 post.dt_create = moment(element.created_time * 1000); 7961 post.author_link = 'http://instagram.com/' + element.user.username; 7962 post.author_picture = element.user.profile_picture; 7963 post.author_name = element.user.full_name || element.user.username; 7964 post.message = element.caption && element.caption ? element.caption.text : ''; 7965 post.description = ''; 7966 post.link = element.link; 7967 if (options.show_media) { 7968 post.attachment = element.images.standard_resolution.url; 7969 } 7970 return post; 7971 } 7972 } 7973 }, 7974 vk: { 7975 posts: [], 7976 loaded: false, 7977 base: 'http://vk.com/', 7978 api: 'https://api.vk.com/method/', 7979 user_json_template: 'https://api.vk.com/method/' + 'users.get?fields=first_name,%20last_name,%20screen_name,%20photo&uid=', 7980 group_json_template: 'https://api.vk.com/method/' + 'groups.getById?fields=first_name,%20last_name,%20screen_name,%20photo&gid=', 7981 getData: function getData(account) { 7982 var request_url; 7983 7984 switch (account[0]) { 7985 case '@': 7986 var username = account.substr(1); 7987 request_url = Feed.vk.api + 'wall.get?owner_id=' + username + '&filter=' + options.vk.source + '&count=' + options.vk.limit + '&callback=?'; 7988 Utility.get_request(request_url, Feed.vk.utility.getPosts); 7989 break; 7990 case '#': 7991 var hashtag = account.substr(1); 7992 request_url = Feed.vk.api + 'newsfeed.search?q=' + hashtag + '&count=' + options.vk.limit + '&callback=?'; 7993 Utility.get_request(request_url, Feed.vk.utility.getPosts); 7994 break; 7995 default: 7996 } 7997 }, 7998 utility: { 7999 getPosts: function getPosts(json) { 8000 if (json.response) { 8001 $.each(json.response, function () { 8002 if (this != parseInt(this) && this.post_type === 'post') { 8003 var owner_id = this.owner_id ? this.owner_id : this.from_id, 8004 vk_wall_owner_url = owner_id > 0 ? Feed.vk.user_json_template + owner_id + '&callback=?' : Feed.vk.group_json_template + -1 * owner_id + '&callback=?', 8005 element = this; 8006 Utility.get_request(vk_wall_owner_url, function (wall_owner) { 8007 Feed.vk.utility.unifyPostData(wall_owner, element, json); 8008 }); 8009 } 8010 }); 8011 } 8012 }, 8013 unifyPostData: function unifyPostData(wall_owner, element, json) { 8014 var post = {}; 8015 8016 post.id = element.id; 8017 post.dt_create = moment.unix(element.date); 8018 post.description = ' '; 8019 post.message = Utility.stripHTML(element.text); 8020 if (options.show_media) { 8021 if (element.attachment) { 8022 if (element.attachment.type === 'link') post.attachment = '<img class="attachment" src="' + element.attachment.link.image_src + '" />'; 8023 if (element.attachment.type === 'video') post.attachment = '<img class="attachment" src="' + element.attachment.video.image_big + '" />'; 8024 if (element.attachment.type === 'photo') post.attachment = '<img class="attachment" src="' + element.attachment.photo.src_big + '" />'; 8025 } 8026 } 8027 8028 if (element.from_id > 0) { 8029 var vk_user_json = Feed.vk.user_json_template + element.from_id + '&callback=?'; 8030 Utility.get_request(vk_user_json, function (user_json) { 8031 var vk_post = new SocialFeedPost('vk', Feed.vk.utility.getUser(user_json, post, element, json)); 8032 vk_post.render(); 8033 }); 8034 } else { 8035 var vk_group_json = Feed.vk.group_json_template + -1 * element.from_id + '&callback=?'; 8036 Utility.get_request(vk_group_json, function (user_json) { 8037 var vk_post = new SocialFeedPost('vk', Feed.vk.utility.getGroup(user_json, post, element, json)); 8038 vk_post.render(); 8039 }); 8040 } 8041 }, 8042 getUser: function getUser(user_json, post, element, json) { 8043 post.author_name = user_json.response[0].first_name + ' ' + user_json.response[0].last_name; 8044 post.author_picture = user_json.response[0].photo; 8045 post.author_link = Feed.vk.base + user_json.response[0].screen_name; 8046 post.link = Feed.vk.base + user_json.response[0].screen_name + '?w=wall' + element.from_id + '_' + element.i
8046d; 8047 8048 return post; 8049 }, 8050 getGroup: function getGroup(user_json, post, element, json) { 8051 post.author_name = user_json.response[0].name; 8052 post.author_picture = user_json.response[0].photo; 8053 post.author_link = Feed.vk.base + user_json.response[0].screen_name; 8054 post.link = Feed.vk.base + user_json.response[0].screen_name + '?w=wall-' + user_json.response[0].gid + '_' + element.id; 8055 8056 return post; 8057 } 8058 } 8059 }, 8060 blogspot: { 8061 loaded: false, 8062 getData: function getData(account) { 8063 var url; 8064 8065 switch (account[0]) { 8066 case '@': 8067 var username = account.substr(1); 8068 url = 'http://' + username + '.blogspot.com/feeds/posts/default?alt=json-in-script&callback=?'; 8069 request(url, getPosts); 8070 break; 8071 default: 8072 } 8073 }, 8074 utility: { 8075 getPosts: function getPosts(json) { 8076 $.each(json.feed.entry, function () { 8077 var post = {}, 8078 element = this; 8079 post.id = element.id['$t'].replace(/[^a-z0-9]/gi, ''); 8080 post.dt_create = moment(element.published['$t']); 8081 post.author_link = element.author[0]['uri']['$t']; 8082 post.author_picture = 'http:' + element.author[0]['gd$image']['src']; 8083 post.author_name = element.author[0]['name']['$t']; 8084 post.message = element.title['$t'] + '</br></br>' + stripHTML(element.content['$t']); 8085 post.description = ''; 8086 post.link = element.link.pop().href; 8087 8088 if (options.show_media) { 8089 if (element['media$thumbnail']) { 8090 post.attachment = '<img class="attachment" src="' + element['media$thumbnail']['url'] + '" />'; 8091 } 8092 } 8093 8094 post.render(); 8095 }); 8096 } 8097 } 8098 }, 8099 pinterest: { 8100 posts: [], 8101 loaded: false, 8102 apiv1: 'https://api.pinterest.com/v1/', 8103 8104 getData: function getData(account) { 8105 var request_url, 8106 limit = 'limit=' + options.pinterest.limit, 8107 fields = 'fields=id,created_at,link,note,creator(url,first_name,last_name,image),image', 8108 query_extention = fields + '&access_token='
8108+ options.pinterest.access_token + '&' + limit + '&callback=?'; 8109 switch (account[0]) { 8110 case '@': 8111 var username = account.substr(1); 8112 if (username === 'me') { 8113 request_url = Feed.pinterest.apiv1 + 'me/pins/?' + query_extention; 8114 } else { 8115 request_url = Feed.pinterest.apiv1 + 'boards/' + username + '/pins?' + query_extention; 8116 } 8117 break; 8118 default: 8119 } 8120 Utility.request(request_url, Feed.pinterest.utility.getPosts); 8121 }, 8122 utility: { 8123 8124 getPosts: function getPosts(json) { 8125 json.data.forEach(function (element) { 8126 var post = new SocialFeedPost('pinterest', Feed.pinterest.utility.unifyPostData(element)); 8127 post.render(); 8128 }); 8129 }, 8130 8131 unifyPostData: function unifyPostData(element) { 8132 var post = {}; 8133 8134 post.id = element.id; 8135 post.dt_create = moment(element.created_at); 8136 post.author_link = element.creator.url; 8137 post.author_picture = element.creator.image['60x60'].url; 8138 post.author_name = element.creator.first_name + element.creator.last_name; 8139 post.message = element.note; 8140 post.description = ''; 8141 post.social_network = 'pinterest'; 8142 post.link = element.link ? element.link : 'https://www.pinterest.com/pin/' + element.id; 8143 if (options.show_media) { 8144 post.attachment = '<img class="attachment" src="' + element.image['original'].url + '" />'; 8145 } 8146 return post; 8147 } 8148 } 8149 }, 8150 rss: { 8151 posts: [], 8152 loaded: false, 8153 api: 'https://query.yahooapis.com/v1/public/yql?q=', 8154 datatype: 'json', 8155 8156 getData: function getData(url) { 8157 var limit = options.rss.limit, 8158 yql = encodeURIComponent('select entry FROM feednormalizer where url=\'' + url + '\' AND output=\'atom_1.0\' | truncate(count=' + limit + ')'), 8159 request_url = Feed.rss.api + yql + '&format=json&callback=?'; 8160 8161 Utility.request(request_url, Feed.rss.utility.getPosts, Feed.rss.datatype); 8162 }, 8163 utility: { 8164 8165 getPosts: function getPosts(json) { 8166 if (json.query.count > 0) { 8167 $.each(json.query.results.feed, function (index, element) { 8168 var post = new SocialFeedPost('rss', Feed.rss.utility.unifyPostData(index, element)); 8169 post.render(); 8170 }); 8171 } 8172 }, 8173 8174 unifyPostData: function unifyPostData(index, element) { 8175 8176 var item = element; 8177 8178 if (element.entry !== undefined) { 8179 item = element.entry; 8180 } 8181 var post = {}; 8182 8183 post.id = '"' + item.id + '"'; 8184 post.dt_create = moment(item.published, 'YYYY-MM-DDTHH:mm:ssZ', 'en'); 8185 8186 post.author_link = ''; 8187 post.author_picture = ''; 8188 post.author_name = ''; 8189 if (item.creator !== undefined) { 8190 post.author_name = item.creator; 8191 } 8192 post.message = item.title; 8193 post.description = ''; 8194 if (item.summary !== undefined) { 8195 post.description = Utility.stripHTML(item.summary.content); 8196 } 8197 post.social_network = 'rss'; 8198 post.link = item.link.href; 8199 if (options.show_media && item.thumbnail !== undefined) { 8200 post.attachment = '<img class="attachment" src="' + item.thumbnail.url + '" />'; 8201 } 8202 return post; 8203 } 8204 } 8205 } 8206 }; 8207 8208 //make the plugin chainable 8209 return this.each(function () { 8210 // Initialization 8211 Feed.init(); 8212 if (options.update_period) { 8213 setInterval(function () { 8214 return Feed.init(); 8215 }, options.update_period); 8216 } 8217 }); 8218 }; 8219})(jQuery); 8220 8221/***/ }), 8222/* 22 */ 8223/***/ (function(module, exports, __webpack_require__) { 8224 8225"use strict"; 8226 8227 8228Object.defineProperty(exports, "__esModule", { 8229 value: true 8230}); 8231// const plyr = window.plyr = require('plyr/dist/plyr.js'); 8232 8233var initialize = function initialize() { 8234 plyr.setup({ 8235 controls: ['play', 'progress', 'current-time', 'mute'], 8236 loadSprite: false, 8237 iconUrl: '/wp-content/themes/gavin/resources/assets/images/plyr.svg' 8238 }); 8239 // console.log(plyr); 8240}; 8241 8242exports.default = initialize; 8243 8244/***/ }), 8245/* 23 */ 8246/***/ (function(module, exports, __webpack_require__) { 8247 8248"use strict"; 8249 8250 8251Object.defineProperty(exports, "__esModule", { 8252 value: true 8253}); 8254 8255var _jquery = __webpack_require__(0); 8256 8257var _jquery2 = _interopRequireDefault(_jquery); 8258 8259var _velocityMin = __webpack_require__(24); 8260 8261var _velocityMin2 = _interopRequireDefault(_velocityMin); 8262 8263function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 8264 8265var $bioContainer = (0, _jquery2.default)('.bio-container'); 8266var $mainContainer = $bioContainer.find('.main-container'); 8267var $teamContainer = (0, _jquery2.default)('.team'); 8268var $people = (0, _jquery2.default)('.team .person'); 8269var slide = true; 8270 8271var handlePersonClick = function handlePersonClick(e) { 8272 var $person = (0, _jquery2.default)(e.currentTarget); 8273 8274 if ($person.hasClass('active')) { 8275 closeBioContainer($person); 8276 return; 8277 } 8278 8279 setBioData($person.data('biopic'), $person.data('name'), $person.data('credentials'), $person.data('title'), $person.data('bio'), $person.data('phone'), $person.data('email')); 8280 8281 $people.removeClass('active'); 8282 8283 var isMobile = (0, _jquery2.default)(window).width() < 800; 8284 var $target = isMobile ? $person.nextAll('.small-start').first() : $person.nextAll().last().length ? $person.nextAll().last() : $person; 8285 8286 if (isMobile) { 8287 if ($person.data('index') % 2 == 0) { 8288 $bioContainer.insertAfter($person); 8289 } else { 8290 if ($person.next().length == 0) { 8291 $bioContainer.insertAfter($person); 8292 } else { 8293 $bioContainer.insertAfter($person.next()); 8294 } 8295 } 8296 } else { 8297 $bioContainer.insertAfter($target); 8298 } 8299 setCaretPosition($person); 8300 $bioContainer.addClass('active'); 8301 if (slide) { 8302 $mainContainer.velocity('slideDown', { 8303 duration: 350, 8304 easing: "linear", 8305 complete: function complete(elements) { 8306 scrollToPerson($person, true); 8307 } 8308 }); 8309 slide = false;
8310 } else { 8311 scrollToPerson($person, false); 8312 } 8313 $person.addClass('active'); 8314}; 8315 8316var setBioData = function setBioData(photo, name, credentials, title, bio, phone, email) { 8317 $mainContainer.find('.name').html(name); 8318 $mainContainer.find('.credentials').html(credentials); 8319 $mainContainer.find('.title').html(title); 8320 $mainContainer.find('.bio').html(bio.replace(/\s\s+/g, ' ')); 8321 $mainContainer.find('.phone').html(phone); 8322 $mainContainer.find('.email').html(email).attr('href', 'mailto:' + email); 8323 8324 if (photo && photo.length) { 8325 $mainContainer.removeClass('no-photo'); 8326 $mainContainer.find('.photo img').attr('src', photo); 8327 } else { 8328 $mainContainer.addClass('no-photo'); 8329 $mainContainer.find('.photo img').attr('src', ''); 8330 } 8331}; 8332 8333var scrollToPerson = function scrollToPerson($person, animate) { 8334 var scrollPos = $person.offset().top - ((0, _jquery2.default)(window).width() < 800 ? 58 : 70); 8335 8336 if (animate) { 8337 var speed = 500; 8338 (0, _jquery2.default)('html, body').animate({ 8339 scrollTop: scrollPos 8340 }, speed); 8341 } else { 8342 (0, _jquery2.default)('html, body').scrollTop(scrollPos); 8343 } 8344}; 8345 8346var closeBioContainer = function closeBioContainer($person) { 8347 $person.removeClass('active'); 8348 scrollToPerson($person, true); 8349 $mainContainer.velocity('slideUp', { 8350 duration: 350, 8351 easing: "easeIn", 8352 complete: function complete(elements) { 8353 $bioContainer.removeClass('active'); 8354 } 8355 }); 8356 slide = true; 8357 return; 8358}; 8359 8360var setCaretPosition = function setCaretPosition($person) { 8361 var position = $person.offset().left - $teamContainer.offset().left + $person.width() / 2; 8362 (0, _jquery2.default)('.bio-container .caret-container').css('transform', 'translateX(' + position + 'px)'); 8363}; 8364 8365var selectPrevPerson = function selectPrevPerson($person) { 8366 if ($person.prevAll('.person').length) { 8367 $person.prevAll('.person').first().trigger('click'); 8368 } 8369}; 8370 8371var selectNextPerson = function selectNextPerson($person) { 8372 if ($person.nextAll('.person').length) { 8373 $person.nextAll('.person').first().trigger('click'); 8374 } 8375}; 8376 8377var initialize = function initialize() { 8378 // Hack to clear last item if its even 8379 if ($people.length % 2 === 1) { 8380 $people.last().addClass('break'); 8381 } 8382 8383 // $people.click(handlePersonClick); 8384 (0, _jquery2.default)('body').on('click', '.team .person', handlePersonClick); 8385 8386 $bioContainer.find('.close-container').click(function () { 8387 closeBioContainer((0, _jquery2.default)('.person.active')); 8388 }); 8389 8390 (0, _jquery2.default)(document).keydown(function (e) { 8391 var $person = (0, _jquery2.default)('.person.active'); 8392 8393 if (!$person.length) { 8394 return; 8395 } 8396 8397 if (e.keyCode == 37) { 8398 // Left arrow 8399 selectPrevPerson($person); 8400 } else if (e.keyCode == '39') { 8401 // right arrow 8402 selectNextPerson($person); 8403 } else if (e.keyCode == '27') { 8404 // Escape 8405 closeBioContainer($person); 8406 } 8407 }); 8408}; 8409 8410exports.default = initialize; 8411 8412/***/ }), 8413/* 24 */ 8414/***/ (function(module, exports, __webpack_require__) { 8415 8416"use strict"; 8417/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; 8418 8419var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 8420 8421/*! VelocityJS.org (1.3.1). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ 8422/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ 8423!function (a) { 8424 "use strict"; 8425 function b(a) { 8426 var b = a.length, 8427 d = c.type(a);return "function" !== d && !c.isWindow(a) && (!(1 !== a.nodeType || !b) || "array" === d || 0 === b || "number" == typeof b && b > 0 && b - 1 in a); 8428 }if (!a.jQuery) { 8429 var c = function c(a, b) { 8430 return new c.fn.init(a, b); 8431 };c.isWindow = function (a) { 8432 return a && a === a.window; 8433 }, c.type = function (a) { 8434 return a ? "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) || "function" == typeof a ? e[g.call(a)] || "object" : typeof a === "undefined" ? "undefined" : _typeof(a) : a + ""; 8435 }, c.isArray = Array.isArray || function (a) { 8436 return "array" === c.type(a); 8437 }, c.isPlainObject = function (a) { 8438 var b;if (!a || "object" !== c.type(a) || a.nodeType || c.isWindow(a)) return !1;try { 8439 if (a.constructor && !f.call(a, "constructor") && !f.call(a.constructor.prototype, "isPrototypeOf")) return !1; 8440 } catch (d) { 8441 return !1; 8442 }for (b in a) {}return void 0 === b || f.call(a, b); 8443 }, c.each = function (a, c, d) { 8444 var e, 8445 f = 0, 8446 g = a.length, 8447 h = b(a);if (d) { 8448 if (h) for (; f < g && (e = c.apply(a[f], d), e !== !1); f++) {} else for (f in a) { 8449 if (a.hasOwnProperty(f) && (e = c.apply(a[f], d), e === !1)) break; 8450 } 8451 } else if (h) for (; f < g && (e = c.call(a[f], f, a[f]), e !== !1); f++) {} else for (f in a) { 8452 if (a.hasOwnProperty(f) && (e = c.call(a[f], f, a[f]), e === !1)) break; 8453 }return a; 8454 }, c.data = function (a, b, e) { 8455 if (void 0 === e) { 8456 var f = a[c.expando], 8457 g = f && d[f];if (void 0 === b) return g;if (g && b in g) return g[b]; 8458 } else if (void 0 !== b) { 8459 var h = a[c.expando] || (a[c.expando] = ++c.uuid);return d[h] = d[h] || {}, d[h][b] = e, e; 8460 } 8461 }, c.removeData = function (a, b) { 8462 var e = a[c.expando], 8463 f = e && d[e];f && (b ? c.each(b, function (a, b) { 8464 delete f[b]; 8465 }) : delete d[e]); 8466 }, c.extend = function () { 8467 var a, 8468 b, 8469 d, 8470 e, 8471 f, 8472 g, 8473 h = arguments[0] || {}, 8474 i = 1, 8475 j = arguments.length, 8476 k = !1;for ("boolean" == typeof h && (k = h, h = arguments[i] || {}, i++), "object" != (typeof h === "undefined" ? "undefined" : _typeof(h)) && "function" !== c.type(h) && (h = {}), i === j && (h = this, i--); i < j; i++) { 8477 if (f = arguments[i]) for (e in f) { 8478 f.hasOwnProperty(e) && (a = h[e], d = f[e], h !== d && (k && d && (c.isPlainObject(d) || (b = c.isArray(d))) ? (b ? (b = !1, g = a && c.isArray(a) ? a : []) : g = a && c.isPlainObject(a) ? a : {}, h[e] = c.extend(k, g, d)) : void 0 !== d && (h[e] = d))); 8479 } 8480 }return h; 8481 }, c.queue = function (a, d, e) { 8482 function f(a, c) { 8483 var d = c || [];return a && (b(Object(a)) ? !function (a, b) { 8484 for (var c = +b.length, d = 0, e = a.length; d < c;) { 8485 a[e++] = b[d++]; 8486 }if (c !== c) for (; void 0 !== b[d];) { 8487 a[e++] = b[d++]; 8488 }return a.length = e, a; 8489 }(d, "string" == typeof a ? [a] : a) : [].push.call(d, a)), d; 8490 }if (a) { 8491 d = (d || "fx") + "queue";var g = c.data(a, d);return e ? (!g || c.isArray(e) ? g = c.data(a, d, f(e)) : g.push(e), g) : g || []; 8492 } 8493 }, c.dequeue = function (a, b) { 8494 c.each(a.nodeType ? [a] : a, function (a, d) { 8495 b = b || "fx";var e = c.queue(d, b), 8496 f = e.shift();"inprogress" === f && (f = e.shift()), f && ("fx" === b && e.unshift("inprogress"), f.call(d, function () { 8497 c.dequeue(d, b); 8498 })); 8499 }); 8500 }, c.fn = c.prototype = { init: function init(a) { 8501 if (a.nodeType) return this[0] = a, this;throw new Error("Not a DOM node."); 8502 }, offset: function offset() { 8503 var b = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };return { top: b.top + (a.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0), left: b.left + (a.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0) }; 8504 }, position: function position() { 8505 function a(a) { 8506 for (var b = a.offsetParent || document; b && "html" !== b.nodeType.toLowerCase && "static" === b.style.position;) { 8507 b = b.offsetParent; 8508 }return b || document; 8509 }var b = this[0], 8510 d = a(b), 8511 e = this.offset(), 8512 f = /^(?:body|html)$/i.test(d.nodeName) ? { top: 0, left: 0 } : c(d).offset();return e.top -= parseFloat(b.style.marginTop) || 0, e.left -= parseFloat(b.style.marginLeft) || 0, d.style && (f.top += parseFloat(d.style.borderTopWidth) || 0, f.left += parseFloat(d.style.borderLeftWidth) || 0), { top: e.top - f.top, left: e.left - f.left }; 8513 } };var d = {};c.expando = "velocity" + new Date().getTime(), c.uuid = 0;for (var e = {}, f = e.hasOwnProperty, g = e.toString, h = "Boolean Number String Function Array Date RegExp Object Error".split(" "), i = 0; i < h.length; i++) { 8514 e["[object " + h[i] + "]"] = h[i].toLowerCase(); 8515 }c.fn.init.prototype = c.fn, a.Velocity = { Utilities: c }; 8516 } 8517}(window), function (a) { 8518 "use strict"; 8519 "object" == ( false ? "undefined" : _typeof(module)) && "object" == _typeof(module.exports) ? module.exports = a() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (a), 8520 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 8521 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : 8522 __WEBPACK_AMD_DEFINE_FACTORY__),
8523 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : a(); 8524}(function () { 8525 "use strict"; 8526 return function (a, b, c, d) { 8527 function e(a) { 8528 for (var b = -1, c = a ? a.length : 0, d = []; ++b < c;) { 8529 var e = a[b];e && d.push(e); 8530 }return d; 8531 }function f(a) { 8532 return p.isWrapped(a) ? a = [].slice.call(a) : p.isNode(a) && (a = [a]), a; 8533 }function g(a) { 8534 var b = m.data(a, "velocity");return null === b ? d : b; 8535 }function h(a) { 8536 return function (b) { 8537 return Math.round(b * a) * (1 / a); 8538 }; 8539 }function i(a, c, d, e) { 8540 function f(a, b) { 8541 return 1 - 3 * b + 3 * a; 8542 }function g(a, b) { 8543 return 3 * b - 6 * a; 8544 }function h(a) { 8545 return 3 * a; 8546 }function i(a, b, c) { 8547 return ((f(b, c) * a + g(b, c)) * a + h(b)) * a; 8548 }function j(a, b, c) { 8549 return 3 * f(b, c) * a * a + 2 * g(b, c) * a + h(b); 8550 }function k(b, c) { 8551 for (var e = 0; e < p; ++e) { 8552 var f = j(c, a, d);if (0 === f) return c;var g = i(c, a, d) - b;c -= g / f; 8553 }return c; 8554 }function l() { 8555 for (var b = 0; b < t; ++b) { 8556 x[b] = i(b * u, a, d); 8557 } 8558 }function m(b, c, e) { 8559 var f, 8560 g, 8561 h = 0;do { 8562 g = c + (e - c) / 2, f = i(g, a, d) - b, f > 0 ? e = g : c = g; 8563 } while (Math.abs(f) > r && ++h < s);return g; 8564 }function n(b) { 8565 for (var c = 0, e = 1, f = t - 1; e !== f && x[e] <= b; ++e) { 8566 c += u; 8567 }--e;var g = (b - x[e]) / (x[e + 1] - x[e]), 8568 h = c + g * u, 8569 i = j(h, a, d);return i >= q ? k(b, h) : 0 === i ? h : m(b, c, c + u); 8570 }function o() { 8571 y = !0, a === c && d === e || l(); 8572 }var p = 4, 8573 q = .001, 8574 r = 1e-7, 8575 s = 10, 8576 t = 11, 8577 u = 1 / (t - 1), 8578 v = "Float32Array" in b;if (4 !== arguments.length) return !1;for (var w = 0; w < 4; ++w) { 8579 if ("number" != typeof arguments[w] || isNaN(arguments[w]) || !isFinite(arguments[w])) return !1; 8580 }a = Math.min(a, 1), d = Math.min(d, 1), a = Math.max(a, 0), d = Math.max(d, 0);var x = v ? new Float32Array(t) : new Array(t), 8581 y = !1, 8582 z = function z(b) { 8583 return y || o(), a === c && d === e ? b : 0 === b ? 0 : 1 === b ? 1 : i(n(b), c, e); 8584 };z.getControlPoints = function () { 8585 return [{ x: a, y: c }, { x: d, y: e }]; 8586 };var A = "generateBezier(" + [a, c, d, e] + ")";return z.toString = function () { 8587 return A; 8588 }, z; 8589 }function j(a, b) { 8590 var c = a;return p.isString(a) ? t.Easings[a] || (c = !1) : c = p.isArray(a) && 1 === a.length ? h.apply(null, a) : p.isArray(a) && 2 === a.length ? u.apply(null, a.concat([b])) : !(!p.isArray(a) || 4 !== a.length) && i.apply(null, a), c === !1 && (c = t.Easings[t.defaults.easing] ? t.defaults.easing : s), c; 8591 }function k(a) { 8592 if (a) { 8593 var b = t.timestamp && a !== !0 ? a : new Date().getTime(), 8594 c = t.State.calls.length;c > 1e4 && (t.State.calls = e(t.State.calls), c = t.State.calls.length);for (var f = 0; f < c; f++) { 8595 if (t.State.calls[f]) { 8596 var h = t.State.calls[f], 8597 i = h[0], 8598 j = h[2], 8599 n = h[3], 8600 o = !!n, 8601 q = null;n || (n = t.State.calls[f][3] = b - 16);for (var r = Math.min((b - n) / j.duration, 1), s = 0, u = i.length; s < u; s++) { 8602 var w = i[s], 8603 y = w.element;if (g(y)) { 8604 var z = !1;if (j.display !== d && null !== j.display && "none" !== j.display) { 8605 if ("flex" === j.display) { 8606 var A = ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex"];m.each(A, function (a, b) { 8607 v.setPropertyValue(y, "display", b); 8608 }); 8609 }v.setPropertyValue(y, "display", j.display); 8610 }j.visibility !== d && "hidden" !== j.visibility && v.setPropertyValue(y, "visibility", j.visibility);for (var B in w) { 8611 if (w.hasOwnProperty(B) && "element" !== B) { 8612 var C, 8613 D = w[B], 8614 E = p.isString(D.easing) ? t.Easings[D.easing] : D.easing;if (1 === r) C = D.endValue;else { 8615 var F = D.endValue - D.startValue;if (C = D.startValue + F * E(r, j, F), !o && C === D.currentValue) continue; 8616 }if (D.currentValue = C, "tween" === B) q = C;else { 8617 var G;if (v.Hooks.registered[B]) { 8618 G = v.Hooks.getRoot(B);var H = g(y).rootPropertyValueCache[G];H && (D.rootPropertyValue = H); 8619 }var I = v.setPropertyValue(y, B, D.currentValue + (0 === parseFloat(C) ? "" : D.unitType), D.rootPropertyValue, D.scrollData);v.Hooks.registered[B] && (v.Normalizations.registered[G] ? g(y).rootPropertyValueCache[G] = v.Normalizations.registered[G]("extract", null, I[1]) : g(y).rootPropertyValueCache[G] = I[1]), "transform" === I[0] && (z = !0); 8620 } 8621 } 8622 }j.mobileHA && g(y).transformCache.translate3d === d && (g(y).transformCache.translate3d = "(0px, 0px, 0px)", z = !0), z && v.flushTransformCache(y); 8623 } 8624 }j.display !== d && "none" !== j.display && (t.State.calls[f][2].display = !1), j.visibility !== d && "hidden" !== j.visibility && (t.State.calls[f][2].visibility = !1), j.progress && j.progress.call(h[1], h[1], r, Math.max(0, n + j.duration - b), n, q), 1 === r && l(f); 8625 } 8626 } 8627 }t.State.isTicking && x(k); 8628 }function l(a, b) { 8629 if (!t.State.calls[a]) return !1;for (var c = t.State.calls[a][0], e = t.State.calls[a][1], f = t.
8629State.calls[a][2], h = t.State.calls[a][4], i = !1, j = 0, k = c.length; j < k; j++) { 8630 var l = c[j].element;b || f.loop || ("none" === f.display && v.setPropertyValue(l, "display", f.display), "hidden" === f.visibility && v.setPropertyValue(l, "visibility", f.visibility));var n = g(l);if (f.loop !== !0 && (m.queue(l)[1] === d || !/\.velocityQueueEntryFlag/i.test(m.queue(l)[1])) && n) { 8631 n.isAnimating = !1, n.rootPropertyValueCache = {};var o = !1;m.each(v.Lists.transforms3D, function (a, b) { 8632 var c = /^scale/.test(b) ? 1 : 0, 8633 e = n.transformCache[b];n.transformCache[b] !== d && new RegExp("^\\(" + c + "[^.]").test(e) && (o = !0, delete n.transformCache[b]); 8634 }), f.mobileHA && (o = !0, delete n.transformCache.translate3d), o && v.flushTransformCache(l), v.Values.removeClass(l, "velocity-animating"); 8635 }if (!b && f.complete && !f.loop && j === k - 1) try { 8636 f.complete.call(e, e); 8637 } catch (p) { 8638 setTimeout(function () { 8639 throw p; 8640 }, 1); 8641 }h && f.loop !== !0 && h(e), n && f.loop === !0 && !b && (m.each(n.tweensContainer, function (a, b) { 8642 if (/^rotate/.test(a) && (parseFloat(b.startValue) - parseFloat(b.endValue)) % 360 === 0) { 8643 var c = b.startValue;b.startValue = b.endValue, b.endValue = c; 8644 }/^backgroundPosition/.test(a) && 100 === parseFloat(b.endValue) && "%" === b.unitType && (b.endValue = 0, b.startValue = 100); 8645 }), t(l, "reverse", { loop: !0, delay: f.delay })), f.queue !== !1 && m.dequeue(l, f.queue); 8646 }t.State.calls[a] = !1;for (var q = 0, r = t.State.calls.length; q < r; q++) { 8647 if (t.State.calls[q] !== !1) { 8648 i = !0;break; 8649 } 8650 }i === !1 && (t.State.isTicking = !1, delete t.State.calls, t.State.calls = []); 8651 }var m, 8652 n = function () { 8653 if (c.documentMode) return c.documentMode;for (var a = 7; a > 4; a--) { 8654 var b = c.createElement("div");if (b.innerHTML = "<!--[if IE " + a + "]><span></span><![endif]-->", b.getElementsByTagName("span").length) return b = null, a; 8655 }return d; 8656 }(), 8657 o = function () { 8658 var a = 0;return b.webkitRequestAnimationFrame || b.mozRequestAnimationFrame || function (b) { 8659 var c, 8660 d = new Date().getTime();return c = Math.max(0, 16 - (d - a)), a = d + c, setTimeout(function () { 8661 b(d + c); 8662 }, c); 8663 }; 8664 }(), 8665 p = { isString: function isString(a) { 8666 return "string" == typeof a; 8667 }, isArray: Array.isArray || function (a) { 8668 return "[object Array]" === Object.prototype.toString.call(a); 8669 }, isFunction: function isFunction(a) { 8670 return "[object Function]" === Object.prototype.toString.call(a); 8671 }, isNode: function isNode(a) { 8672 return a && a.nodeType; 8673 }, isNodeList: function isNodeList(a) { 8674 return "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) && /^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(a)) && a.length !== d && (0 === a.length || "object" == _typeof(a[0]) && a[0].nodeType > 0); 8675 }, isWrapped: function isWrapped(a) { 8676 return a && (a.jquery || b.Zepto && b.Zepto.zepto.isZ(a)); 8677 }, isSVG: function isSVG(a) { 8678 return b.SVGElement && a instanceof b.SVGElement; 8679 }, isEmptyObject: function isEmptyObject(a) { 8680 for (var b in a) { 8681 if (a.hasOwnProperty(b)) return !1; 8682 }return !0; 8683 } }, 8684 q = !1;if (a.fn && a.fn.jquery ? (m = a, q = !0) : m = b.Velocity.Utilities, n <= 8 && !q) throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if (n <= 7) return void (jQuery.fn.velocity = jQuery.fn.animate);var r = 400, 8685 s = "swing", 8686 t = { State: { isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isAndroid: /Android/i.test(navigator.userAgent), isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent), isChrome: b.chrome, isFirefox: /Firefox/i.test(navigator.userAgent), prefixElement: c.createElement("div"), prefixMatches: {}, scrollAnchor: null, scrollPropertyLeft: null, scrollPropertyTop: null, isTicking: !1, calls: [] }, CSS: {}, Utilities: m, Redirects: {}, Easings: {}, Promise: b.Promise, defaults: { queue: "", duration: r, easing: s, begin: d, complete: d, progress: d, display: d, visibility: d, loop: !1, delay: !1, mobileHA: !0, _cacheValues: !0, promiseRe
8686jectEmpty: !0 }, init: function init(a) { 8687 m.data(a, "velocity", { isSVG: p.isSVG(a), isAnimating: !1, computedStyle: null, tweensContainer: null, rootPropertyValueCache: {}, transformCache: {} }); 8688 }, hook: null, mock: !1, version: { major: 1, minor: 3, patch: 1 }, debug: !1, timestamp: !0 };b.pageYOffset !== d ? (t.State.scrollAnchor = b, t.State.scrollPropertyLeft = "pageXOffset", t.State.scrollPropertyTop = "pageYOffset") : (t.State.scrollAnchor = c.documentElement || c.body.parentNode || c.body, t.State.scrollPropertyLeft = "scrollLeft", t.State.scrollPropertyTop = "scrollTop");var u = function () { 8689 function a(a) { 8690 return -a.tension * a.x - a.friction * a.v; 8691 }function b(b, c, d) { 8692 var e = { x: b.x + d.dx * c, v: b.v + d.dv * c, tension: b.tension, friction: b.friction };return { dx: e.v, dv: a(e) }; 8693 }function c(c, d) { 8694 var e = { dx: c.v, dv: a(c) }, 8695 f = b(c, .5 * d, e), 8696 g = b(c, .5 * d, f), 8697 h = b(c, d, g), 8698 i = 1 / 6 * (e.dx + 2 * (f.dx + g.dx) + h.dx), 8699 j = 1 / 6 * (e.dv + 2 * (f.dv + g.dv) + h.dv);return c.x = c.x + i * d, c.v = c.v + j * d, c; 8700 }return function d(a, b, e) { 8701 var f, 8702 g, 8703 h, 8704 i = { x: -1, v: 0, tension: null, friction: null }, 8705 j = [0], 8706 k = 0, 8707 l = 1e-4, 8708 m = .016;for (a = parseFloat(a) || 500, b = parseFloat(b) || 20, e = e || null, i.tension = a, i.friction = b, f = null !== e, f ? (k = d(a, b), g = k / e * m) : g = m;;) { 8709 if (h = c(h || i, g), j.push(1 + h.x), k += 16, !(Math.abs(h.x) > l && Math.abs(h.v) > l)) break; 8710 }return f ? function (a) { 8711 return j[a * (j.length - 1) | 0]; 8712 } : k; 8713 }; 8714 }();t.Easings = { linear: function linear(a) { 8715 return a; 8716 }, swing: function swing(a) { 8717 return .5 - Math.cos(a * Math.PI) / 2; 8718 }, spring: function spring(a) { 8719 return 1 - Math.cos(4.5 * a * Math.PI) * Math.exp(6 * -a); 8720 } }, m.each([["ease", [.25, .1, .25, 1]], ["ease-in", [.42, 0, 1, 1]], ["ease-out", [0, 0, .58, 1]], ["ease-in-out", [.42, 0, .58, 1]], ["easeInSine", [.47, 0, .745, .715]], ["easeOutSine", [.39, .575, .565, 1]], ["easeInOutSine", [.445, .05, .55, .95]], ["easeInQuad", [.55, .085, .68, .53]], ["easeOutQuad", [.25, .46, .45, .94]], ["easeInOutQuad", [.455, .03, .515, .955]], ["easeInCubic", [.55, .055, .675, .19]], ["easeOutCubic", [.215, .61, .355, 1]], ["easeInOutCubic", [.645, .045, .355, 1]], ["easeInQuart", [.895, .03, .685, .22]], ["easeOutQuart", [.165, .84, .44, 1]], ["easeInOutQuart", [.77, 0, .175, 1]], ["easeInQuint", [.755, .05, .855, .06]], ["easeOutQuint", [.23, 1, .32, 1]], ["easeInOutQuint", [.86, 0, .07, 1]], ["easeInExpo", [.95, .05, .795, .035]], ["easeOutExpo", [.19, 1, .22, 1]], ["easeInOutExpo", [1, 0, 0, 1]], ["easeInCirc", [.6, .04, .98, .335]], ["easeOutCirc", [.075, .82, .165, 1]], ["easeInOutCirc", [.785, .135, .15, .86]]], function (a, b) { 8721 t.Easings[b[0]] = i.apply(null, b[1]); 8722 });var v = t.CSS = { RegEx: { isHex: /^#([A-f\d]{3}){1,2}$/i, valueUnwrap: /^[A-z]+\((.*)\)$/i, wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/, valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi }, Lists: { colors: ["fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"], transformsBase: ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"], transforms3D: ["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"] }, Hooks: { templates: { textShadow: ["Color X Y Blur", "black 0px 0px 0px"], boxShadow: ["Color X Y Blur Spread", "black 0px 0px 0px 0px"], clip: ["Top Right Bottom Left", "0px 0px 0px 0px"], backgroundPosition: ["X Y", "0% 0%"], transformOrigin: ["X Y Z", "50% 50% 0px"], perspectiveOrigin: ["X Y", "50% 50%"] }, registered: {}, register: function register() { 8723 for (var a = 0; a < v.Lists.colors.length; a++) { 8724 var b = "color" === v.Lists.colors[a] ? "0 0 0 1" : "255 255 255 1";
8724v.Hooks.templates[v.Lists.colors[a]] = ["Red Green Blue Alpha", b]; 8725 }var c, d, e;if (n) for (c in v.Hooks.templates) { 8726 if (v.Hooks.templates.hasOwnProperty(c)) { 8727 d = v.Hooks.templates[c], e = d[0].split(" ");var f = d[1].match(v.RegEx.valueSplit);"Color" === e[0] && (e.push(e.shift()), f.push(f.shift()), v.Hooks.templates[c] = [e.join(" "), f.join(" ")]); 8728 } 8729 }for (c in v.Hooks.templates) { 8730 if (v.Hooks.templates.hasOwnProperty(c)) { 8731 d = v.Hooks.templates[c], e = d[0].split(" ");for (var g in e) { 8732 if (e.hasOwnProperty(g)) { 8733 var h = c + e[g], 8734 i = g;v.Hooks.registered[h] = [c, i]; 8735 } 8736 } 8737 } 8738 } 8739 }, getRoot: function getRoot(a) { 8740 var b = v.Hooks.registered[a];return b ? b[0] : a; 8741 }, cleanRootPropertyValue: function cleanRootPropertyValue(a, b) { 8742 return v.RegEx.valueUnwrap.test(b) && (b = b.match(v.RegEx.valueUnwrap)[1]), v.Values.isCSSNullValue(b) && (b = v.Hooks.templates[a][1]), b; 8743 }, extractValue: function extractValue(a, b) { 8744 var c = v.Hooks.registered[a];if (c) { 8745 var d = c[0], 8746 e = c[1];return b = v.Hooks.cleanRootPropertyValue(d, b), b.toString().match(v.RegEx.valueSplit)[e]; 8747 }return b; 8748 }, injectValue: function injectValue(a, b, c) { 8749 var d = v.Hooks.registered[a];if (d) { 8750 var e, 8751 f, 8752 g = d[0], 8753 h = d[1];return c = v.Hooks.cleanRootPropertyValue(g, c), e = c.toString().match(v.RegEx.valueSplit), e[h] = b, f = e.join(" "); 8754 }return c; 8755 } }, Normalizations: { registered: { clip: function clip(a, b, c) { 8756 switch (a) {case "name": 8757 return "clip";case "extract": 8758 var d;return v.RegEx.wrappedValueAlreadyExtracted.test(c) ? d = c : (d = c.toString().match(v.RegEx.valueUnwrap), d = d ? d[1].replace(/,(\s+)?/g, " ") : c), d;case "inject": 8759 return "rect(" + c + ")";} 8760 }, blur: function blur(a, b, c) { 8761 switch (a) {case "name": 8762 return t.State.isFirefox ? "filter" : "-webkit-filter";case "extract": 8763 var d = parseFloat(c);if (!d && 0 !== d) { 8764 var e = c.toString().match(/blur\(([0-9]+[A-z]+)\)/i);d = e ? e[1] : 0; 8765 }return d;case "inject": 8766 return parseFloat(c) ? "blur(" + c + ")" : "none";} 8767 }, opacity: function opacity(a, b, c) { 8768 if (n <= 8) switch (a) {case "name": 8769 return "filter";case "extract": 8770 var d = c.toString().match(/alpha\(opacity=(.*)\)/i);return c = d ? d[1] / 100 : 1;case "inject": 8771 return b.style.zoom = 1, parseFloat(c) >= 1 ? "" : "alpha(opacity=" + parseInt(100 * parseFloat(c), 10) + ")";} else switch (a) {case "name": 8772 return "opacity";case "extract": 8773 return c;case "inject": 8774 return c;} 8775 } }, register: function register() { 8776 function a(a, b, c) { 8777 var d = "border-box" === v.getPropertyValue(b, "boxSizing").toString().toLowerCase();if (d === (c || !1)) { 8778 var e, 8779 f, 8780 g = 0, 8781 h = "width" === a ? ["Left", "Right"] : ["Top", "Bottom"], 8782 i = ["padding" + h[0], "padding" + h[1], "border" + h[0] + "Width", "border" + h[1] + "Width"];for (e = 0; e < i.length; e++) { 8783 f = parseFloat(v.getPropertyValue(b, i[e])), isNaN(f) || (g += f); 8784 }return c ? -g : g; 8785 }return 0; 8786 }function b(b, c) { 8787 return function (d, e, f) { 8788 switch (d) {case "name": 8789 return b;case "extract": 8790 return parseFloat(f) + a(b, e, c);case "inject": 8791 return parseFloat(f) - a(b, e, c) + "px";} 8792 }; 8793 }n && !(n > 9) || t.State.isGingerbread || (v.Lists.transformsBase = v.Lists.transformsBase.concat(v.Lists.transforms3D));for (var c = 0; c < v.Lists.transformsBase.length; c++) { 8794 !function () { 8795 var a = v.Lists.transformsBase[c];v.Normalizations.registered[a] = function (b, c, e) { 8796 switch (b) {case "name": 8797 return "transform";case "extract": 8798 return g(c) === d || g(c).transformCache[a] === d ? /^scale/i.test(a) ? 1 : 0 : g(c).transformCache[a].replace(/[()]/g, "");case "inject": 8799 var f = !1;switch (a.substr(0, a.length - 1)) {case "translate": 8800 f = !/(%|px|em|rem|vw|vh|\d)$/i.test(e);break;case "scal":case "scale": 8801 t.State.isAndroid && g(c).transformCache[a] === d && e < 1 && (e = 1), f = !/(\d)$/i.test(e);break;case "skew": 8802 f = !/(deg|\d)$/i.test(e);break;case "rotate": 8803 f = !/(deg|\d)$/i.test(e);}return f || (g(c).transformCache[a] = "(" + e + ")"), g(c).transformCache[a];} 8804 }; 8805 }(); 8806 }for (var e = 0; e < v.Lists.colors.length; e++) { 8807 !function () { 8808 var a = v.Lists.colors[e];v.Normalizations.registered[a] = function (b, c, e) { 8809 switch (b) {case "name": 8810 return a;case "extract": 8811 var f;if (v.RegEx.wrappedValueAlreadyExtracted.test(e)) f = e;else { 8812 var g, 8813 h = { black: "rgb(0, 0, 0)", blue: "rgb(0, 0, 255)", gray: "rgb(128, 128, 128)", green: "rgb(0, 128, 0)", red: "rgb(255, 0, 0)", white: "rgb(255, 255, 255)" };/^[A-z]+$/i.test(e) ? g = h[e] !== d ? h[e] : h.black : v.RegEx.isHex.test(e) ? g = "rgb(" + v.Values.hexToRgb(e).join(" ") + ")" : /^rgba?\(/i.test(e) || (g = h.black), f = (g || e).toString().match(v.RegEx.valueUnwrap
8813)[1].replace(/,(\s+)?/g, " "); 8814 }return (!n || n > 8) && 3 === f.split(" ").length && (f += " 1"), f;case "inject": 8815 return n <= 8 ? 4 === e.split(" ").length && (e = e.split(/\s+/).slice(0, 3).join(" ")) : 3 === e.split(" ").length && (e += " 1"), (n <= 8 ? "rgb" : "rgba") + "(" + e.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")";} 8816 }; 8817 }(); 8818 }v.Normalizations.registered.innerWidth = b("width", !0), v.Normalizations.registered.innerHeight = b("height", !0), v.Normalizations.registered.outerWidth = b("width"), v.Normalizations.registered.outerHeight = b("height"); 8819 } }, Names: { camelCase: function camelCase(a) { 8820 return a.replace(/-(\w)/g, function (a, b) { 8821 return b.toUpperCase(); 8822 }); 8823 }, SVGAttribute: function SVGAttribute(a) { 8824 var b = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return (n || t.State.isAndroid && !t.State.isChrome) && (b += "|transform"), new RegExp("^(" + b + ")$", "i").test(a); 8825 }, prefixCheck: function prefixCheck(a) { 8826 if (t.State.prefixMatches[a]) return [t.State.prefixMatches[a], !0];for (var b = ["", "Webkit", "Moz", "ms", "O"], c = 0, d = b.length; c < d; c++) { 8827 var e;if (e = 0 === c ? a : b[c] + a.replace(/^\w/, function (a) { 8828 return a.toUpperCase(); 8829 }), p.isString(t.State.prefixElement.style[e])) return t.State.prefixMatches[a] = e, [e, !0]; 8830 }return [a, !1]; 8831 } }, Values: { hexToRgb: function hexToRgb(a) { 8832 var b, 8833 c = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, 8834 d = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a = a.replace(c, function (a, b, c, d) { 8835 return b + b + c + c + d + d; 8836 }), b = d.exec(a), b ? [parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)] : [0, 0, 0]; 8837 }, isCSSNullValue: function isCSSNullValue(a) { 8838 return !a || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a); 8839 }, getUnitType: function getUnitType(a) { 8840 return (/^(rotate|skew)/i.test(a) ? "deg" : /(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(a) ? "" : "px" 8841 ); 8842 }, getDisplayType: function getDisplayType(a) { 8843 var b = a && a.tagName.toString().toLowerCase();return (/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b) ? "inline" : /^(li)$/i.test(b) ? "list-item" : /^(tr)$/i.test(b) ? "table-row" : /^(table)$/i.test(b) ? "table" : /^(tbody)$/i.test(b) ? "table-row-group" : "block" 8844 ); 8845 }, addClass: function addClass(a, b) { 8846 a.classList ? a.classList.add(b) : a.className += (a.className.length ? " " : "") + b; 8847 }, removeClass: function removeClass(a, b) { 8848 a.classList ? a.classList.remove(b) : a.className = a.className.toString().replace(new RegExp("(^|\\s)" + b.split(" ").join("|") + "(\\s|$)", "gi"), " "); 8849 } }, getPropertyValue: function getPropertyValue(a, c, e, f) { 8850 function h(a, c) { 8851 var e = 0;if (n <= 8) e = m.css(a, c);else { 8852 var i = !1;/^(width|height)$/.test(c) && 0 === v.getPropertyValue(a, "display") && (i = !0, v.setPropertyValue(a, "display", v.Values.getDisplayType(a)));var j = function j() { 8853 i && v.setPropertyValue(a, "display", "none"); 8854 };if (!f) { 8855 if ("height" === c && "border-box" !== v.getPropertyValue(a, "boxSizing").toString().toLowerCase()) { 8856 var k = a.offsetHeight - (parseFloat(v.getPropertyValue(a, "borderTopWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "borderBottomWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingTop")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingBottom")) || 0);return j(), k; 8857 }if ("width" === c && "border-box" !== v.getPropertyValue(a, "boxSizing").toString().toLowerCase()) { 8858 var l = a.offsetWidth - (parseFloat(v.getPropertyValue(a, "borderLeftWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "borderRightWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingLeft")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingRight")) || 0);return j(), l; 8859 } 8860 }var o;o = g(a) === d ? b.getComputedStyle(a, null) : g(a).computedStyle ? g(a).computedStyle : g(a).computedStyle = b.getComputedStyle(a, null), "borderColor" === c && (c = "borderTopColor"), e = 9 === n && "filter" === c ? o.getPropertyValue(c) : o[c], "" !== e && null !== e || (e = a.style[c]), j(); 8861 }if ("auto" === e && /^(top|right|bottom|left)$/i.test(c)) { 8862 var p = h(a, "position");("fixed" === p || "absolute" === p && /top|left/i.test(c)) && (e = m(a).position()[c] + "px"); 8863 }return e; 8864 }var i;if (v.Hooks.registered[c]) { 8865 var j = c, 8866 k = v.Hooks.getRoot(j);e === d && (e = v.getPropertyValue(a, v.Names.prefixCheck(k)[0])), v.Normalizations.registered[k] && (e = v.Normalizations.registered[k]("extract", a, e)), i = v.Hooks.extractValue(j, e); 8867 } else if (v.Normalizations.registered[c]) { 8868 var l, o;l = v.Normalizations.registered[c]("name", a), "transform" !== l && (o = h(a, v.Names.prefixCheck(l)[0]), v.Values.isCSSNullValue(o) && v.Hooks.templates[c] && (o = v.Hooks.templates[c][1])), i = v.Normalizations.registered[c]("extract", a, o); 8869 }if (!/^[\d-]/.test(i)) { 8870 var p = g(a);if (p && p.isSVG && v.Names.SVGAttribute(c)) { 8871 if (/^(height|width)$/i.test(c)) try { 8872 i = a.getBBox()[c]; 8873 } catch (q) { 8874 i = 0; 8875 } else i = a.getAttribute(c); 8876 } else i = h(a, v.Names.prefixCheck(c)[0]); 8877 }return v.Values.isCSSNullValue(i) && (i = 0), t.debug >= 2 && console.log("Get " + c + ": " + i), i; 8878 }, setPropertyValue: function setPropertyValue(a, c, d, e, f) { 8879 var h = c;if ("scroll" === c) f.container ? f.container["scroll" + f.direction] = d : "Left" === f.direction ? b.scrollTo(d, f.alternateValue) : b.scrollTo(f.alternateValue, d);else if (v.Normalizations.registered[c] && "transform" === v.Normalizations.registered[c]("name", a)) v.Normalizations.registered[c]("inject", a, d), h = "transform", d = g(a).transformCache[c];else { 8880 if (v.Hooks.registered[c]) { 8881 var i = c, 8882 j = v.Hooks.getRoot(c);e = e || v.getPropertyValue(a, j), d = v.Hooks.injectValue(i, d, e), c = j; 8883 }
8883if (v.Normalizations.registered[c] && (d = v.Normalizations.registered[c]("inject", a, d), c = v.Normalizations.registered[c]("name", a)), h = v.Names.prefixCheck(c)[0], n <= 8) try { 8884 a.style[h] = d; 8885 } catch (k) { 8886 t.debug && console.log("Browser does not support [" + d + "] for [" + h + "]"); 8887 } else { 8888 var l = g(a);l && l.isSVG && v.Names.SVGAttribute(c) ? a.setAttribute(c, d) : a.style[h] = d; 8889 }t.debug >= 2 && console.log("Set " + c + " (" + h + "): " + d); 8890 }return [h, d]; 8891 }, flushTransformCache: function flushTransformCache(a) { 8892 var b = "", 8893 c = g(a);if ((n || t.State.isAndroid && !t.State.isChrome) && c && c.isSVG) { 8894 var d = function d(b) { 8895 return parseFloat(v.getPropertyValue(a, b)); 8896 }, 8897 e = { translate: [d("translateX"), d("translateY")], skewX: [d("skewX")], skewY: [d("skewY")], scale: 1 !== d("scale") ? [d("scale"), d("scale")] : [d("scaleX"), d("scaleY")], rotate: [d("rotateZ"), 0, 0] };m.each(g(a).transformCache, function (a) { 8898 /^translate/i.test(a) ? a = "translate" : /^scale/i.test(a) ? a = "scale" : /^rotate/i.test(a) && (a = "rotate"), e[a] && (b += a + "(" + e[a].join(" ") + ") ", delete e[a]); 8899 }); 8900 } else { 8901 var f, h;m.each(g(a).transformCache, function (c) { 8902 return f = g(a).transformCache[c], "transformPerspective" === c ? (h = f, !0) : (9 === n && "rotateZ" === c && (c = "rotate"), void (b += c + f + " ")); 8903 }), h && (b = "perspective" + h + " " + b); 8904 }v.setPropertyValue(a, "transform", b); 8905 } };v.Hooks.register(), v.Normalizations.register(), t.hook = function (a, b, c) { 8906 var e;return a = f(a), m.each(a, function (a, f) { 8907 if (g(f) === d && t.init(f), c === d) e === d && (e = v.getPropertyValue(f, b));else { 8908 var h = v.setPropertyValue(f, b, c);"transform" === h[0] && t.CSS.flushTransformCache(f), e = h; 8909 } 8910 }), e; 8911 };var w = function w() { 8912 function a() { 8913 return i ? y.promise || null : n; 8914 }function e(a, e) { 8915 function f(f) { 8916 var n, o;if (i.begin && 0 === A) try { 8917 i.begin.call(q, q); 8918 } catch (r) { 8919 setTimeout(function () { 8920 throw r; 8921 }, 1); 8922 }if ("scroll" === D) { 8923 var w, 8924 x, 8925 B, 8926 C = /^x$/i.test(i.axis) ? "Left" : "Top", 8927 E = parseFloat(i.offset) || 0;i.container ? p.isWrapped(i.container) || p.isNode(i.container) ? (i.container = i.container[0] || i.container, w = i.container["scroll" + C], B = w + m(a).position()[C.toLowerCase()] + E) : i.container = null : (w = t.State.scrollAnchor[t.State["scrollProperty" + C]], x = t.State.scrollAnchor[t.State["scrollProperty" + ("Left" === C ? "Top" : "Left")]], B = m(a).offset()[C.toLowerCase()] + E), l = { scroll: { rootPropertyValue: !1, startValue: w, currentValue: w, endValue: B, unitType: "", easing: i.easing, scrollData: { container: i.container, direction: C, alternateValue: x } }, element: a }, t.debug && console.log("tweensContainer (scroll): ", l.scroll, a); 8928 } else if ("reverse" === D) { 8929 if (n = g(a), !n) return;if (!n.tweensContainer) return void m.dequeue(a, i.queue);"none" === n.opts.display && (n.opts.display = "auto"), "hidden" === n.opts.visibility && (n.opts.visibility = "visible"), n.opts.loop = !1, n.opts.begin = null, n.opts.complete = null, u.easing || delete i.easing, u.duration || delete i.duration, i = m.extend({}, n.opts, i), o = m.extend(!0, {}, n ? n.tweensContainer : null);for (var F in o) { 8930 if (o.hasOwnProperty(F) && "element" !== F) { 8931 var G = o[F].startValue;o[F].startValue = o[F].currentValue = o[F].endValue, o[F].endValue = G, p.isEmptyObject(u) || (o[F].easing = i.easing), t.debug && console.log("reverse tweensContainer (" + F + "): " + JSON.stringify(o[F]), a); 8932 } 8933 }l = o; 8934 } else if ("start" === D) { 8935 n = g(a), n && n.tweensContainer && n.isAnimating === !0 && (o = n.tweensContainer);var H, 8936 K = function K(b, c) { 8937 var f, g, h;return p.isFunction(b) && (b = b.call(a, e, z)), p.isArray(b) ? (f = b[0], !p.isArray(b[1]) && /^[\d-]/.test(b[1]) || p.isFunction(b[1]) || v.RegEx.isHex.test(b[1]) ? h
8937= b[1] : (p.isString(b[1]) && !v.RegEx.isHex.test(b[1]) || p.isArray(b[1])) && (g = c ? b[1] : j(b[1], i.duration), b[2] !== d && (h = b[2]))) : f = b, c || (g = g || i.easing), p.isFunction(f) && (f = f.call(a, e, z)), p.isFunction(h) && (h = h.call(a, e, z)), [f || 0, g, h]; 8938 }, 8939 L = function L(a) { 8940 return !!p.isArray(a) && p.isFunction(a[0]) && (a[1] === d || p.isFunction(a[1])); 8941 };m.each(s, function (a, b) { 8942 if (H || (H = RegExp("^" + v.Lists.colors.join("$|^") + "$")), H.test(v.Names.camelCase(a)) && !L(b)) { 8943 var c = K(b, !0), 8944 e = c[0], 8945 f = c[1], 8946 g = c[2];if (v.RegEx.isHex.test(e)) { 8947 for (var h = ["Red", "Green", "Blue"], i = v.Values.hexToRgb(e), j = g ? v.Values.hexToRgb(g) : d, k = 0; k < h.length; k++) { 8948 var l = [i[k]];f && l.push(f), j !== d && l.push(j[k]), s[v.Names.camelCase(a) + h[k]] = l; 8949 }delete s[a]; 8950 } 8951 } 8952 });for (var M in s) { 8953 if (s.hasOwnProperty(M)) { 8954 var N = K(s[M]), 8955 O = N[0], 8956 P = N[1], 8957 Q = N[2];M = v.Names.camelCase(M);var R = v.Hooks.getRoot(M), 8958 S = !1;if (n && n.isSVG || "tween" === R || v.Names.prefixCheck(R)[1] !== !1 || v.Normalizations.registered[R] !== d) { 8959 (i.display !== d && null !== i.display && "none" !== i.display || i.visibility !== d && "hidden" !== i.visibility) && /opacity|filter/.test(M) && !Q && 0 !== O && (Q = 0), i._cacheValues && o && o[M] ? (Q === d && (Q = o[M].endValue + o[M].unitType), S = n.rootPropertyValueCache[R]) : v.Hooks.registered[M] ? Q === d ? (S = v.getPropertyValue(a, R), Q = v.getPropertyValue(a, M, S)) : S = v.Hooks.templates[R][1] : Q === d && (Q = v.getPropertyValue(a, M));var T, 8960 U, 8961 V, 8962 W = !1, 8963 X = function X(a, b) { 8964 var c, d;return d = (b || "0").toString().toLowerCase().replace(/[%A-z]+$/, function (a) { 8965 return c = a, ""; 8966 }), c || (c = v.Values.getUnitType(a)), [d, c]; 8967 };T = X(M, Q), Q = T[0], V = T[1], T = X(M, O), O = T[0].replace(/^([+-\/*])=/, function (a, b) { 8968 return W = b, ""; 8969 }), U = T[1], Q = parseFloat(Q) || 0, O = parseFloat(O) || 0, "%" === U && (/^(fontSize|lineHeight)$/.test(M) ? (O /= 100, U = "em") : /^scale/.test(M) ? (O /= 100, U = "") : /(Red|Green|Blue)$/i.test(M) && (O = O / 100 * 255, U = ""));var Y = function Y() { 8970 var d = { myParent: a.parentNode || c.body, position: v.getPropertyValue(a, "position"), fontSize: v.getPropertyValue(a, "fontSize") }, 8971 e = d.position === I.lastPosition && d.myParent === I.lastParent, 8972 f = d.fontSize === I.lastFontSize;I.lastParent = d.myParent, I.lastPosition = d.position, I.lastFontSize = d.fontSize;var g = 100, 8973 h = {};if (f && e) h.emToPx = I.lastEmToPx, h.percentToPxWidth = I.lastPercentToPxWidth, h.percentToPxHeight = I.lastPercentToPxHeight;else { 8974 var i = n && n.isSVG ? c.createElementNS("http://www.w3.org/2000/svg", "rect") : c.createElement("div");t.init(i), d.myParent.appendChild(i), m.each(["overflow", "overflowX", "overflowY"], function (a, b) { 8975 t.CSS.setPropertyValue(i, b, "hidden"); 8976 }), t.CSS.setPropertyValue(i, "position", d.position), t.CSS.setPropertyValue(i, "fontSize", d.fontSize), t.CSS.setPropertyValue(i, "boxSizing", "content-box"), m.each(["minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height"], function (a, b) { 8977 t.CSS.setPropertyValue(i, b, g + "%"); 8978 }), t.CSS.setPropertyValue(i, "paddingLeft", g + "em"), h.percentToPxWidth = I.lastPercentToPxWidth = (parseFloat(v.getPropertyValue(i, "width", null, !0)) || 1) / g, h.percentToPxHeight = I.lastPercentToPxHeight = (parseFloat(v.getPropertyValue(i, "height", null, !0)) || 1) / g, h.emToPx = I.lastEmToPx = (parseFloat(v.getPropertyValue(i, "paddingLeft")) || 1) / g, d.myParent.removeChild(i); 8979 }return null === I.remToPx && (I.remToPx = parseFloat(v.getPropertyValue(c.body, "fontSize")) || 16), null === I.vwToPx && (I.vwToPx = parseFloat(b.innerWidth) / 100, I.vhToPx = parseFloat(b.innerHe
8979ight) / 100), h.remToPx = I.remToPx, h.vwToPx = I.vwToPx, h.vhToPx = I.vhToPx, t.debug >= 1 && console.log("Unit ratios: " + JSON.stringify(h), a), h; 8980 };if (/[\/*]/.test(W)) U = V;else if (V !== U && 0 !== Q) if (0 === O) U = V;else { 8981 h = h || Y();var Z = /margin|padding|left|right|width|text|word|letter/i.test(M) || /X$/.test(M) || "x" === M ? "x" : "y";switch (V) {case "%": 8982 Q *= "x" === Z ? h.percentToPxWidth : h.percentToPxHeight;break;case "px": 8983 break;default: 8984 Q *= h[V + "ToPx"];}switch (U) {case "%": 8985 Q *= 1 / ("x" === Z ? h.percentToPxWidth : h.percentToPxHeight);break;case "px": 8986 break;default: 8987 Q *= 1 / h[U + "ToPx"];} 8988 }switch (W) {case "+": 8989 O = Q + O;break;case "-": 8990 O = Q - O;break;case "*": 8991 O = Q * O;break;case "/": 8992 O = Q / O;}l[M] = { rootPropertyValue: S, startValue: Q, currentValue: Q, endValue: O, unitType: U, easing: P }, t.debug && console.log("tweensContainer (" + M + "): " + JSON.stringify(l[M]), a); 8993 } else t.debug && console.log("Skipping [" + R + "] due to a lack of browser support."); 8994 } 8995 }l.element = a; 8996 }l.element && (v.Values.addClass(a, "velocity-animating"), J.push(l), n = g(a), n && ("" === i.queue && (n.tweensContainer = l, n.opts = i), n.isAnimating = !0), A === z - 1 ? (t.State.calls.push([J, q, i, null, y.resolver]), t.State.isTicking === !1 && (t.State.isTicking = !0, k())) : A++); 8997 }var h, 8998 i = m.extend({}, t.defaults, u), 8999 l = {};switch (g(a) === d && t.init(a), parseFloat(i.delay) && i.queue !== !1 && m.queue(a, i.queue, function (b) { 9000 t.velocityQueueEntryFlag = !0, g(a).delayTimer = { setTimeout: setTimeout(b, parseFloat(i.delay)), next: b }; 9001 }), i.duration.toString().toLowerCase()) {case "fast": 9002 i.duration = 200;break;case "normal": 9003 i.duration = r;break;case "slow": 9004 i.duration = 600;break;default: 9005 i.duration = parseFloat(i.duration) || 1;}t.mock !== !1 && (t.mock === !0 ? i.duration = i.delay = 1 : (i.duration *= parseFloat(t.mock) || 1, i.delay *= parseFloat(t.mock) || 1)), i.easing = j(i.easing, i.duration), i.begin && !p.isFunction(i.begin) && (i.begin = null), i.progress && !p.isFunction(i.progress) && (i.progress = null), i.complete && !p.isFunction(i.complete) && (i.complete = null), i.display !== d && null !== i.display && (i.display = i.display.toString().toLowerCase(), "auto" === i.display && (i.display = t.CSS.Values.getDisplayType(a))), i.visibility !== d && null !== i.visibility && (i.visibility = i.visibility.toString().toLowerCase()), i.mobileHA = i.mobileHA && t.State.isMobile && !t.State.isGingerbread, i.queue === !1 ? i.delay ? setTimeout(f, i.delay) : f() : m.queue(a, i.queue, function (a, b) { 9006 return b === !0 ? (y.promise && y.resolver(q), !0) : (t.velocityQueueEntryFlag = !0, void f(a)); 9007 }), "" !== i.queue && "fx" !== i.queue || "inprogress" === m.queue(a)[0] || m.dequeue(a); 9008 }var h, 9009 i, 9010 n, 9011 o, 9012 q, 9013 s, 9014 u, 9015 x = arguments[0] && (arguments[0].p || m.isPlainObject(arguments[0].properties) && !arguments[0].properties.names || p.isString(arguments[0].properties));p.isWrapped(this) ? (i = !1, o = 0, q = this, n = this) : (i = !0, o = 1, q = x ? arguments[0].elements || arguments[0].e : arguments[0]);var y = { promise: null, resolver: null, rejecter: null };if (i && t.Promise && (y.promise = new t.Promise(function (a, b) { 9016 y.resolver = a, y.rejecter = b; 9017 })), x ? (s = arguments[0].properties || arguments[0].p, u = arguments[0].options || arguments[0].o) : (s = arguments[o], u = arguments[o + 1]), q = f(q), !q) return void (y.promise && (s && u && u.promiseRejectEmpty === !1 ? y.resolver() : y.rejecter()));var z = q.length, 9018 A = 0;if (!/^(stop|finish|finishAll)$/i.test(s) && !m.isPlainObject(u)) { 9019 var B = o + 1;u = {};for (var C = B; C < arguments.length; C++) { 9020 p.isArray(arguments[C]) || !/^(fast|normal|slow)$/i.test(arguments[C]) && !/^\d/.test(arguments[C]) ? p.isString(arguments[C]) || p.isArray(arguments[C]) ? u.easing = arguments[C] : p.isFunction(arguments[C]) && (u.complete = arguments[C]) : u.duration = arguments[C]; 9021 } 9022 }var D;switch (s) {case "scroll": 9023 D = "scroll";break;case "reverse": 9024 D = "reverse";break;case "finish":case "finishAll":case "stop": 9025 m.each(q, function (a, b) { 9026 g(b) && g(b).delayTimer && (clearTimeout(g(b).delayTimer.setTimeout), g(b).delayTimer.next && g(b).delayTimer.next(), delete g(b).delayTimer), "finishAll" !== s || u !== !0 && !p.isString(u) || (m.each(m.queue(b, p.isString(u) ? u : ""), function (a, b) { 9027 p.isFunction(b) && b(); 9028 }), m.queue(b, p.isString(u) ? u : "", [])); 9029 });var E = [];return m.each(t.State.calls, function (a, b) { 9030 b && m.each(b[1], function (c, e) { 9031 var f = u === d ? "" : u;return f !== !0 && b[2].queue !== f && (u !== d || b[2].queue !== !1) || void m.each(q, function (c, d) { 9032 if (d === e) if ((u === !0 || p.isString(u)) && (m.each(m.queue(d, p.isString(u) ? u : ""), function (a, b) { 9033 p.isFunction(b) && b(null, !0); 9034 }), m.queue(d, p.isString(u) ? u : "", [])), "stop" === s) { 9035 var h = g(d);h && h.tweensContainer && f !== !1 && m.each(h.tweensContainer, function (a, b) { 9036 b.endValue = b.currentValue; 9037 }), E.push(a); 9038 } else "finish" !== s && "finishAll" !== s || (b[2].duration = 1); 9039 }); 9040 }); 9041 }), "stop" === s && (m.each(E, function (a, b) { 9042 l(b, !0); 9043 }), y.promise && y.resolver(q)), a();default: 9044 if (!m.isPlainObject(s) || p.isEmptyObject(s)) { 9045 if (p.isString(s) && t.Redirects[s]) { 9046 h = m.extend({}, u);var F = h.duration, 9047 G = h.delay || 0;return h.backwards === !0 && (q = m.extend(!0, [], q).reverse()), m.each(q, function (a, b) { 9048 parseFloat(h.stagger) ? h.delay = G + parseFloat(h.stagger) * a : p.isFunction(h.stagger) && (h.delay
9048= G + h.stagger.call(b, a, z)), h.drag && (h.duration = parseFloat(F) || (/^(callout|transition)/.test(s) ? 1e3 : r), h.duration = Math.max(h.duration * (h.backwards ? 1 - a / z : (a + 1) / z), .75 * h.duration, 200)), t.Redirects[s].call(b, b, h || {}, a, z, q, y.promise ? y : d); 9049 }), a(); 9050 }var H = "Velocity: First argument (" + s + ") was not a property map, a known action, or a registered redirect. Aborting.";return y.promise ? y.rejecter(new Error(H)) : console.log(H), a(); 9051 }D = "start";}var I = { lastParent: null, lastPosition: null, lastFontSize: null, lastPercentToPxWidth: null, lastPercentToPxHeight: null, lastEmToPx: null, remToPx: null, vwToPx: null, vhToPx: null }, 9052 J = [];m.each(q, function (a, b) { 9053 p.isNode(b) && e(b, a); 9054 }), h = m.extend({}, t.defaults, u), h.loop = parseInt(h.loop, 10);var K = 2 * h.loop - 1;if (h.loop) for (var L = 0; L < K; L++) { 9055 var M = { delay: h.delay, progress: h.progress };L === K - 1 && (M.display = h.display, M.visibility = h.visibility, M.complete = h.complete), w(q, "reverse", M); 9056 }return a(); 9057 };t = m.extend(w, t), t.animate = w;var x = b.requestAnimationFrame || o;return t.State.isMobile || c.hidden === d || c.addEventListener("visibilitychange", function () { 9058 c.hidden ? (x = function x(a) { 9059 return setTimeout(function () { 9060 a(!0); 9061 }, 16); 9062 }, k()) : x = b.requestAnimationFrame || o; 9063 }), a.Velocity = t, a !== b && (a.fn.velocity = w, a.fn.velocity.defaults = t.defaults), m.each(["Down", "Up"], function (a, b) { 9064 t.Redirects["slide" + b] = function (a, c, e, f, g, h) { 9065 var i = m.extend({}, c), 9066 j = i.begin, 9067 k = i.complete, 9068 l = {}, 9069 n = { height: "", marginTop: "", marginBottom: "", paddingTop: "", paddingBottom: "" };i.display === d && (i.display = "Down" === b ? "inline" === t.CSS.Values.getDisplayType(a) ? "inline-block" : "block" : "none"), i.begin = function () { 9070 0 === e && j && j.call(g, g);for (var c in n) { 9071 if (n.hasOwnProperty(c)) { 9072 l[c] = a.style[c];var d = v.getPropertyValue(a, c);n[c] = "Down" === b ? [d, 0] : [0, d]; 9073 } 9074 }l.overflow = a.style.overflow, a.style.overflow = "hidden"; 9075 }, i.complete = function () { 9076 for (var b in l) { 9077 l.hasOwnProperty(b) && (a.style[b] = l[b]); 9078 }e === f - 1 && (k && k.call(g, g), h && h.resolver(g)); 9079 }, t(a, n, i); 9080 }; 9081 }), m.each(["In", "Out"], function (a, b) { 9082 t.Redirects["fade" + b] = function (a, c, e, f, g, h) { 9083 var i = m.extend({}, c), 9084 j = i.complete, 9085 k = { opacity: "In" === b ? 1 : 0 };0 !== e && (i.begin = null), e !== f - 1 ? i.complete = null : i.complete = function () { 9086 j && j.call(g, g), h && h.resolver(g); 9087 }, i.display === d && (i.display = "In" === b ? "auto" : "none"), t(this, k, i); 9088 }; 9089 }), t; 9090 }(window.jQuery || window.Zepto || window, window, document); 9091}); 9092/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)(module))) 9093 9094/***/ }), 9095/* 25 */ 9096/***/ (function(module, exports, __webpack_require__) { 9097 9098"use strict"; 9099 9100 9101Object.defineProperty(exports, "__esModule", { 9102 value: true 9103}); 9104 9105var _jquery = __webpack_require__(0); 9106 9107var _jquery2 = _interopRequireDefault(_jquery); 9108 9109var _autosize = __webpack_require__(26); 9110 9111var _autosize2 = _interopRequireDefault(_autosize); 9112 9113function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9114 9115var initialize = function initialize() { 9116 var $form = (0, _jquery2.default)('#contact'); 9117 9118 (0, _jquery2.default)('input[type=radio][name=contact]').change(function (e) { 9119 (0, _jquery2.default)('.form-item.hideable').removeClass('active'); 9120 if (e.currentTarget.value === 'email') { 9121 (0, _jquery2.default)('.form-item.email-container').addClass('active'); 9122 } else { 9123 (0, _jquery2.default)('.form-item.phone-container').addClass('active'); 9124 } 9125 }); 9126 9127 (0, _autosize2.default)(document.querySelectorAll('textarea')); 9128 9129 (0, _jquery2.default)('.contact-contents .success-message .reset').click(function (e) {
9130 $form.find('#name').val(''); 9131 $form.find('#email').val(''); 9132 $form.find('#message').val(''); 9133 (0, _jquery2.default)('.contact-contents').removeClass('success'); 9134 }); 9135 9136 $form.submit(function (e) { 9137 e.preventDefault(); 9138 9139 var formData = objectifyForm((0, _jquery2.default)(this).serializeArray()); 9140 9141 (0, _jquery2.default)(this).find('.form-item').removeClass('error'); 9142 (0, _jquery2.default)(this).find('small.error').addClass('hidden'); 9143 var error = false; 9144 9145 // Require name 9146 if (!formData.name || formData.name.length <= 0) { 9147 (0, _jquery2.default)(this).find('.name-container').addClass('error'); 9148 error = true; 9149 } 9150 9151 if (formData.contact == 'email' && (!formData.email || formData.email.length <= 0)) { 9152 (0, _jquery2.default)(this).find('.email-container').addClass('error'); 9153 error = true; 9154 } 9155 9156 if ((formData.contact == 'text' || formData.contact == 'call') && (!formData.phone || formData.phone.length <= 0 || formData.phone.match(/[a-z]/i))) { 9157 (0, _jquery2.default)(this).find('.phone-container').addClass('error'); 9158 error = true; 9159 } 9160 9161 if (!error) { 9162 // Submit the form 9163 _jquery2.default.post("/wp-content/themes/gavin/app/mailer.php", formData).done(function (response) { 9164 if (JSON.parse(response).success) { 9165 (0, _jquery2.default)('.contact-contents').addClass('success'); 9166 } else { 9167 $form.find('small.server-error').removeClass('hidden'); 9168 } 9169 }).fail(function () { 9170 $form.find('small.server-error').removeClass('hidden'); 9171 }); 9172 } else { 9173 $form.find('small.validation-error').removeClass('hidden'); 9174 } 9175 }); 9176}; 9177 9178function objectifyForm(formArray) { 9179 var returnArray = {}; 9180 for (var i = 0; i < formArray.length; i++) { 9181 returnArray[formArray[i]['name']] = formArray[i]['value']; 9182 } 9183 return returnArray; 9184} 9185 9186exports.default = initialize; 9187 9188/***/ }), 9189/* 26 */ 9190/***/ (function(module, exports, __webpack_require__) { 9191 9192var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 9193 autosize 4.0.4 9194 license: MIT 9195 http://www.jacklmoore.com/autosize 9196*/ 9197(function (global, factory) { 9198 if (true) { 9199 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 9200 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 9201 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 9202 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 9203 } else if (typeof exports !== "undefined") { 9204 factory(module, exports); 9205 } else { 9206 var mod = { 9207 exports: {} 9208 }; 9209 factory(mod, mod.exports); 9210 global.autosize = mod.exports; 9211 } 9212})(this, function (module, exports) { 9213 'use strict'; 9214 9215 var map = typeof Map === "function" ? new Map() : function () { 9216 var keys = []; 9217 var values = []; 9218 9219 return { 9220 has: function has(key) { 9221 return keys.indexOf(key) > -1; 9222 }, 9223 get: function get(key) { 9224 return values[keys.indexOf(key)]; 9225 }, 9226 set: function set(key, value) { 9227 if (keys.indexOf(key) === -1) { 9228 keys.push(key); 9229 values.push(value); 9230 } 9231 }, 9232 delete: function _delete(key) { 9233 var index = keys.indexOf(key); 9234 if (index > -1) { 9235 keys.splice(index, 1); 9236 values.splice(index, 1); 9237 } 9238 } 9239 }; 9240 }(); 9241 9242 var createEvent = function createEvent(name) { 9243 return new Event(name, { bubbles: true }); 9244 }; 9245 try { 9246 new Event('test'); 9247 } catch (e) { 9248 // IE does not support `new Event()` 9249 createEvent = function createEvent(name) { 9250 var evt = document.createEvent('Event'); 9251 evt.initEvent(name, true, false); 9252 return evt; 9253 }; 9254 } 9255 9256 function assign(ta) { 9257 if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return; 9258 9259 var heightOffset = null; 9260 var clientWidth = null; 9261 var cachedHeight = null; 9262 9263 function init() { 9264 var style = window.getComputedStyle(ta, null); 9265 9266 if (style.resize === 'vertical') { 9267 ta.style.resize = 'none'; 9268 } else if (style.resize === 'both') { 9269 ta.style.resize = 'horizontal'; 9270 } 9271 9272 if (style.boxSizing === 'content-box') { 9273 heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom)); 9274 } else { 9275 heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth); 9276 } 9277 // Fix when a textarea is not on document body and heightOffset is Not a Number 9278 if (isNaN(heightOffset)) { 9279 heightOffset = 0; 9280 } 9281 9282 update(); 9283 } 9284 9285 function changeOverflow(value) { 9286 { 9287 // Chrome/Safari-specific fix: 9288 // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space 9289 // made available by removing the scrollbar. The following forces the necessary text reflow. 9290 var width = ta.style.width; 9291 ta.style.width = '0px'; 9292 // Force reflow: 9293 /* jshint ignore:start */ 9294 ta.offsetWidth; 9295 /* jshint ignore:end */ 9296 ta.style.width = width; 9297 } 9298 9299 ta.style.overflowY = value; 9300 } 9301 9302 function getParentOverflows(el) { 9303 var arr = []; 9304 9305 while (el && el.parentNode && el.parentNode instanceof Element) { 9306 if (el.parentNode.scrollTop) { 9307 arr.push({ 9308 node: el.parentNode, 9309 scrollTop: el.parentNode.scrollTop 9310 }); 9311 } 9312 el = el.parentNode; 9313 } 9314 9315 return arr; 9316 } 9317 9318 function resize() { 9319 if (ta.scrollHeight === 0) { 9320 // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM. 9321 return; 9322 } 9323 9324 var overflows = getParentOverflows(ta);
9325 var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240) 9326 9327 ta.style.height = ''; 9328 ta.style.height = ta.scrollHeight + heightOffset + 'px'; 9329 9330 // used to check if an update is actually necessary on window.resize 9331 clientWidth = ta.clientWidth; 9332 9333 // prevents scroll-position jumping 9334 overflows.forEach(function (el) { 9335 el.node.scrollTop = el.scrollTop; 9336 }); 9337 9338 if (docTop) { 9339 document.documentElement.scrollTop = docTop; 9340 } 9341 } 9342 9343 function update() { 9344 resize(); 9345 9346 var styleHeight = Math.round(parseFloat(ta.style.height)); 9347 var computed = window.getComputedStyle(ta, null); 9348 9349 // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box 9350 var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight; 9351 9352 // The actual height not matching the style height (set via the resize method) indicates that 9353 // the max-height has been exceeded, in which case the overflow should be allowed. 9354 if (actualHeight < styleHeight) { 9355 if (computed.overflowY === 'hidden') { 9356 changeOverflow('scroll'); 9357 resize(); 9358 actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; 9359 } 9360 } else { 9361 // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands. 9362 if (computed.overflowY !== 'hidden') { 9363 changeOverflow('hidden'); 9364 resize(); 9365 actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; 9366 } 9367 } 9368 9369 if (cachedHeight !== actualHeight) { 9370 cachedHeight = actualHeight; 9371 var evt = createEvent('autosize:resized'); 9372 try { 9373 ta.dispatchEvent(evt); 9374 } catch (err) { 9375 // Firefox will throw an error on dispatchEvent for a detached element 9376 // https://bugzilla.mozilla.org/show_bug.cgi?id=889376 9377 } 9378 } 9379 } 9380 9381 var pageResize = function pageResize() { 9382 if (ta.clientWidth !== clientWidth) { 9383 update(); 9384 } 9385 }; 9386 9387 var destroy = function (style) { 9388 window.removeEventListener('resize', pageResize, false); 9389 ta.removeEventListener('input', update, false); 9390 ta.removeEventListener('keyup', update, false); 9391 ta.removeEventListener('autosize:destroy', destroy, false); 9392 ta.removeEventListener('autosize:update', update, false); 9393 9394 Object.keys(style).forEach(function (key) { 9395 ta.style[key] = style[key]; 9396 }); 9397 9398 map.delete(ta); 9399 }.bind(ta, { 9400 height: ta.style.height, 9401 resize: ta.style.resize, 9402 overflowY: ta.style.overflowY, 9403 overflowX: ta.style.overflowX, 9404 wordWrap: ta.style.wordWrap 9405 }); 9406 9407 ta.addEventListener('autosize:destroy', destroy, false); 9408 9409 // IE9 does not fire onpropertychange or oninput for deletions, 9410 // so binding to onkeyup to catch most of those events. 9411 // There is no way that I know of to detect something like 'cut' in IE9. 9412 if ('onpropertychange' in ta && 'oninput' in ta) { 9413 ta.addEventListener('keyup', update, false); 9414 } 9415 9416 window.addEventListener('resize', pageResize, false); 9417 ta.addEventListener('input', update, false); 9418 ta.addEventListener('autosize:update', update, false); 9419 ta.style.overflowX = 'hidden'; 9420 ta.style.wordWrap = 'break-word'; 9421 9422 map.set(ta, { 9423 destroy: destroy, 9424 update: update 9425 }); 9426 9427 init(); 9428 } 9429 9430 function destroy(ta) { 9431 var methods = map.get(ta); 9432 if (methods) { 9433 methods.destroy(); 9434 } 9435 } 9436 9437 function update(ta) { 9438 var methods = map.get(ta); 9439 if (methods) { 9440 methods.update(); 9441 } 9442 } 9443 9444 var autosize = null; 9445 9446 // Do nothing in Node.js environment and IE8 (or lower) 9447 if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') { 9448 autosize = function autosize(el) { 9449 return el; 9450 }; 9451 autosize.destroy = function (el) { 9452 return el; 9453 }; 9454 autosize.update = function (el) { 9455 return el; 9456 }; 9457 } else { 9458 autosize = function autosize(el, options) { 9459 if (el) { 9460 Array.prototype.forEach.call(el.length ? el : [el], function (x) { 9461 return assign(x, options); 9462 }); 9463 } 9464 return el; 9465 }; 9466 autosize.destroy = function (el) { 9467 if (el) { 9468 Array.prototype.forEach.call(el.length ? el : [el], destroy); 9469 } 9470 return el; 9471 }; 9472 autosize.update = function (el) { 9473 if (el) { 9474 Array.prototype.forEach.call(el.length ? el : [el], update); 9475 } 9476 return el; 9477 }; 9478 } 9479 9480 exports.default = autosize; 9481 module.exports = exports['default']; 9482}); 9483 9484/***/ }), 9485/* 27 */ 9486/***/ (function(module, exports, __webpack_require__) { 9487 9488"use strict"; 9489 9490 9491Object.defineProperty(exports, "__esModule", { 9492 value: true 9493}); 9494 9495var _jquery = __webpack_require__(0); 9496 9497var _jquery2 = _interopRequireDefault(_jquery); 9498 9499function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9500 9501var initNewsletter = function initNewsletter() { 9502 var $form = (0, _jquery2.default)('.js-newsletter-form'); 9503 9504 $form.on('submit', function (e) { 9505 e.preventDefault(); 9506 9507 var formData = objectifyForm((0, _jquery2.default)(this).serializeArray()); 9508 9509 (0, _jquery2.default)(this).find('.form-item').removeClass('error'); 9510 (0, _jquery2.default)(this).find('small.error').addClass('hidden'); 9511 9512 var error = false;
9513 9514 if (!formData.email || formData.email.length <= 0) { 9515 (0, _jquery2.default)(this).find('.email-container').addClass('error'); 9516 error = true; 9517 } 9518 9519 if (!formData.consent || formData.consent.length <= 0 || formData.consent == "off") { 9520 (0, _jquery2.default)(this).find('.consent-container').addClass('error'); 9521 error = true; 9522 } 9523 9524 if (!error) { 9525 // Submit the form 9526 _jquery2.default.post("/wp-content/themes/gavin/app/newsletter.php", formData).done(function (response) { 9527 if (JSON.parse(response).success) { 9528 (0, _jquery2.default)('.newsletter .contents.right').addClass('success'); 9529 } else { 9530 $form.find('small.server-error').removeClass('hidden'); 9531 } 9532 }).fail(function () { 9533 $form.find('small.server-error').removeClass('hidden'); 9534 }); 9535 } else { 9536 (0, _jquery2.default)(this).find('small.validation-error').removeClass('hidden'); 9537 } 9538 }); 9539}; 9540 9541function objectifyForm(formArray) { 9542 var returnArray = {}; 9543 for (var i = 0; i < formArray.length; i++) { 9544 returnArray[formArray[i]['name']] = formArray[i]['value']; 9545 } 9546 return returnArray; 9547} 9548 9549exports.default = initNewsletter; 9550 9551/***/ }), 9552/* 28 */ 9553/***/ (function(module, exports, __webpack_require__) { 9554 9555"use strict"; 9556 9557 9558Object.defineProperty(exports, "__esModule", { 9559 value: true 9560}); 9561 9562var _jquery = __webpack_require__(0); 9563 9564var _jquery2 = _interopRequireDefault(_jquery); 9565 9566var _shareSelectedText = __webpack_require__(29); 9567 9568var _shareSelectedText2 = _interopRequireDefault(_shareSelectedText); 9569 9570function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 9571 9572window.$ = _jquery2.default; 9573 9574 9575var initialize = function initialize() { 9576 if ((0, _jquery2.default)('.archive-chalk-talk').length) { 9577 // Handle load next set of posts 9578 var group = 3; 9579 if ((0, _jquery2.default)('.posts-group').length <= group) { 9580 (0, _jquery2.default)('.load-more-container').remove(); 9581 } 9582 9583 (0, _jquery2.default)('a.load-more').click(function (e) { 9584 e.preventDefault(); 9585 (0, _jquery2.default)('.posts-group.group-' + group).removeClass('hidden'); 9586 (0, _jquery2.default)('.posts-group.group-' + (group + 1)).removeClass('hidden'); 9587 (0, _jquery2.default)('.posts-group.group-' + (group + 2)).removeClass('hidden'); 9588 group = group + 3; 9589 9590 if (!(0, _jquery2.default)('.posts-group.group-' + (group + 2)).length) { 9591 (0, _jquery2.default)('.load-more-container').remove(); 9592 } 9593 }); 9594 } 9595 9596 if ((0, _jquery2.default)('.archive-smart-money').length) { 9597 // Handle load next set of posts 9598 var _group = 3; 9599 if ((0, _jquery2.default)('.post').length <= _group) { 9600 (0, _jquery2.default)('a.load-more').remove(); 9601 } 9602 9603 (0, _jquery2.default)('a.load-more').click(function (e) { 9604 e.preventDefault(); 9605 (0, _jquery2.default)('.post.group-' + _group).removeClass('hidden'); 9606 (0, _jquery2.default)('.post.group-' + (_group + 1)).removeClass('hidden'); 9607 (0, _jquery2.default)('.post.group-' + (_group + 2)).removeClass('hidden'); 9608 _group = _group + 3; 9609 9610 if (!(0, _jquery2.default)('.post.group-' + (_group + 2)).length) { 9611 (0, _jquery2.default)('.load-more-container').remove(); 9612 } 9613 }); 9614 } 9615 9616 // Handle showing additional content for a post 9617 (0, _jquery2.default)('.post a.toggle-more').click(function (e) { 9618 e.preventDefault(); 9619 (0, _jquery2.default)(e.currentTarget).closest('.post').toggleClass('active'); 9620 }); 9621 9622 // Initialize share-selected-text 9623 window.shareSelectedText('.post .content', { 9624 tooltipClass: '', // cool, if you want to customize the tooltip 9625 sanitize: true, // will sanitize the user selection to respect the Twitter Max length (recommended) 9626 buttons: [// services that you want to enable you can add : 9627 'facebook', 'email', 'twitter', 'linkedin'], 9628 anchorsClass: '', // class given to each tooltip's links 9629 twitterUsername: 'GavinHockeyWlth', // for twitter widget, will add 'via @twitterUsername' at the end of the tweet. 9630 facebookAppID: '162024947847611', // Can also be an HTML element inside the <head> tag of your page : <meta property="fb:APP_ID" content="YOUR_APP_ID"/> 9631 facebookDisplayMode: 'popup', //can be 'popup' || 'page' 9632 tooltipTimeout: 250 //Timeout before that the tooltip appear in ms 9633 }); 9634}; 9635 9636exports.default = initialize; 9637 9638/***/ }), 9639/* 29 */ 9640/***/ (function(module, exports, __webpack_require__) { 9641 9642"use strict"; 9643/*! 9644 * Share Selected Text 9645 * version: 1.1.1 9646 * license: MIT 9647 * url: https://github.com/VincentLoy/share-selected-text 9648 * author: Vincent Loy <[email protected]> 9649 * contributors: 9650 * - Wendy Beth <[email protected]> 9651 * - Dmitry Motorin <[email protected]> 9652 * - Dustin Armstrong 9653 */ 9654 9655 9656(function (exports) { 9657 'use strict'; 9658 9659 var getPageUrl = function getPageUrl() { 9660 if (document.querySelector('meta[property="og:url"]') && document.querySelector('meta[property="og:url"]').getAttribute('content')) { 9661 return document.querySelector('meta[property="og:url"]').getAttribute('content'); 9662 } 9663 9664 return window.location.href; 9665 }; 9666 9667 // constants 9668 var TOOLTIP_HEIGHT = 36; 9669 var FACTOR = 1.33; 9670 var TWITTER_LIMIT_LENGTH = 140; 9671 var TWITTER_URL_LENGTH_COUNT = 24; 9672 var TWITTER_QUOTES = 2; 9673 var TWITTER_DOTS = 3; 9674 var TOOLTIP_TIMEOUT = 250; 9675 var FACEBOOK_DISPLAY_MODES = { 9676 popup: 'popup', 9677 page: 'page' 9678 }; 9679 9680 var REAL_TWITTER_LIMIT = TWITTER_LIMIT_LENGTH - TWITTER_URL_LENGTH_COUNT - TWITTER_QUOTES - TWITTER_DOTS; 9681 9682 var SOCIAL = { 9683 email: 'email', 9684 twitter: 'twitter', 9685 buffer: 'buffer', 9686 digg: 'digg', 9687 linkedin: 'linkedin', 9688 stumbleupon: 'stumbleupon', 9689 reddit: 'reddit', 9690 tumblr: 'tumblr', 9691 facebook: 'facebook' 9692 }; 9693 9694 var NO_START_WITH = /[ .,!?/\\\+\-=*£$€:~§%^µ)(|@"{}&#><_]/g; 9695 var NO_ENDS_WITH = /[ ,/\\\+\-=*£$€:~§%^µ)(|@"{}&#><_]/g; 9696 var PAGE_URL = getPageUrl(); 9697 9698 // globals 9699 var tooltip = undefined; 9700 var parameters = undefined; 9701 var selected = {}; 9702 9703 var extend = function extend(out) { 9704 out = out || {}; 9705 9706 for (var i = 1; i < arguments.length; i += 1) { 9707 if (arguments[i]) { 9708 for (var key in arguments[i]) { 9709 if (arguments[i].hasOwnProperty(key)) { 9710 out[key] = arguments[i][key]; 9711 } 9712 } 9713 } 9714 } 9715 return out; 9716 }; 9717 9718 var hideTooltip = function hideTooltip() { 9719 tooltip.classList.remove('active'); 9720 }; 9721 9722 var showTooltip = function showTooltip() { 9723 tooltip.classList.add('active'); 9724 }; 9725 9726 var smartSanitize = function smartSanitize(text) { 9727 while (text.length && text[0].match(NO_START_WITH)) { 9728 text = text.substring(1, text.length); 9729 } 9730 9731 while (text.length && text[text.length - 1].match(NO_ENDS_WITH)) { 9732 text = text.substring(0, text.length - 1); 9733 } 9734 9735 return text; 9736 }; 9737 9738 var sanitizeText = function sanitizeText(text) { 9739 var sociaType = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; 9740 9741 var author = ''; 9742 var tweetLimit = REAL_TWITTER_LIMIT; 9743 9744 if (!text) { 9745 return ''; 9746 } 9747
9748 if (parameters.twitterUsername && sociaType === SOCIAL.twitter) { 9749 author = ' via @' + parameters.twitterUsername; 9750 tweetLimit = REAL_TWITTER_LIMIT - author.length; 9751 } 9752 9753 if (text.length > REAL_TWITTER_LIMIT) { 9754 text = text.substring(0, tweetLimit); 9755 text = text.substring(0, text.lastIndexOf(' ')) + '...'; 9756 } else { 9757 text = text.substring(0, tweetLimit + TWITTER_DOTS); 9758 } 9759 9760 return smartSanitize(text); 9761 }; 9762 9763 var generateSocialUrl = function generateSocialUrl(socialType, text) { 9764 if (parameters.sanitize) { 9765 text = sanitizeText(text, socialType); 9766 } else { 9767 text = smartSanitize(text); 9768 } 9769 9770 var twitterUrl = 'https://twitter.com/intent/tweet?&text="' + text + '"&via=GavinHockeyWlth&url=' + encodeURI(PAGE_URL) + ''; 9771 9772 if (parameters.twitterUsername && parameters.twitterUsername.length) { 9773 twitterUrl += '&via=' + parameters.twitterUsername; 9774 } 9775 9776 var facebookUrl = 'https://facebook.com/dialog/share?display=' + parameters.facebookDisplayMode + '&href=' + PAGE_URL + '"e=' + text; 9777 9778 if (document.querySelector('meta[property="fb:app_id"]') && document.querySelector('meta[property="fb:app_id"]').getAttribute('content')) { 9779 var content = document.querySelector('meta[property="fb:app_id"]'); 9780 facebookUrl += '&app_id=' + content; 9781 } else if (parameters.facebookAppID && parameters.facebookAppID.length) { 9782 facebookUrl += '&app_id=' + parameters.facebookAppID; 9783 } else { 9784 var idx = parameters.buttons.indexOf('facebook'); 9785 if (idx > -1) { 9786 parameters.buttons.splice(idx, 1); 9787 } 9788 } 9789 9790 var urls = { 9791 email: 'mailto:?&subject=Gavin Management Group&body=' + text, 9792 twitter: twitterUrl, 9793 buffer: 'https://buffer.com/add?text="' + text + '"&url=' + PAGE_URL, 9794 digg: 'http://digg.com/submit?url=' + PAGE_URL + '&title=' + text, 9795 linkedin: 'https://www.linkedin.com/shareArticle?title=' + encodeURI(text) + '&url=' + encodeURI(PAGE_URL) + '&mini=' + true, 9796 stumbleupon: 'http://www.stumbleupon.com/submit?url=' + PAGE_URL + '&title=' + text, 9797 reddit: 'https://reddit.com/submit?url=' + PAGE_URL + '&title=' + text, 9798 tumblr: 'https://www.tumblr.com/widgets/share/tool?canonicalUrl=' + PAGE_URL + '&caption=' + text, 9799 facebook: facebookUrl 9800 }; 9801 9802 if (urls.hasOwnProperty(socialType)) { 9803 return urls[socialType]; 9804 } 9805 9806 return ''; 9807 }; 9808 9809 var updateTooltip = function updateTooltip(rect) { 9810 var actualPosition = document.documentElement.scrollTop || document.body.scrollTop; 9811 var body = document.querySelector('body'); 9812 9813 tooltip.style.top = actualPosition + rect.top - TOOLTIP_HEIGHT * FACTOR + 'px'; 9814 tooltip.style.left = rect.left + rect.width / 2 - body.getBoundingClientRect().width / 2 + 'px'; 9815 9816 Array.prototype.forEach.call(parameters.buttons, function (btn) { 9817 tooltip.querySelector('.share-selected-text-btn-' + btn).href = generateSocialUrl(btn, selected.text); 9818 }); 9819 9820 window.setTimeout(function () { 9821 showTooltip(); 9822 }, parameters.tooltipTimeout); 9823 }; 9824 9825 var generateAnchorTag = function generateAnchorTag(anchorType) { 9826 var customIconClass = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; 9827 9828 var anchorTag = document.createElement('A'); 9829 var anchorIcon = document.createElement('i'); 9830 9831 if (parameters.anchorsClass) { 9832 ['share-selected-text-btn', 'share-selected-text-btn-' + anchorType, '' + parameters.anchorsClass].map(function (item) { 9833 return anchorTag.classList.add(item); 9834 }); 9835 } else { 9836 ['share-selected-text-btn', 'share-selected-text-btn-' + anchorType].map(function (item) { 9837 return anchorTag.classList.add(item); 9838 }); 9839 } 9840 9841 if (customIconClass) { 9842 anchorIcon.classList.add('' + customIconClass); 9843 } else { 9844 ['icon-sst-' + anchorType, 'fa', 'fa-' + anchorType].map(function (item) { 9845 return anchorIcon.classList.add(item); 9846 }); 9847 } 9848 9849 anchorIcon.style.pointerEvents = 'none'; 9850 anchorTag.addEventListener('click', function (e) { 9851 e.preventDefault();
9852 var windowFeatures = 'status=no,menubar=no,location=no,scrollbars=no,width=720,height=540'; 9853 var url = e.target.href; 9854 window.open(url, 'Share this post', windowFeatures); 9855 }); 9856 9857 anchorTag.href = generateSocialUrl(anchorType, selected.text ? selected.text : ''); 9858 anchorTag.appendChild(anchorIcon); 9859 return anchorTag; 9860 }; 9861 9862 var generateTooltip = function generateTooltip() { 9863 var body = document.querySelector('body'); 9864 var mainDiv = document.createElement('DIV'); 9865 var btnContainer = document.createElement('DIV'); 9866 9867 mainDiv.classList.add('share-selected-text-main-container'); 9868 btnContainer.classList.add('share-selected-text-inner'); 9869 9870 if (parameters.tooltipClass) { 9871 btnContainer.classList.add(parameters.tooltipClass); 9872 } 9873 9874 mainDiv.style.height = TOOLTIP_HEIGHT + 'px'; 9875 mainDiv.style.top = 0; 9876 mainDiv.style.left = 0; 9877 9878 Array.prototype.forEach.call(parameters.buttons, function (btn) { 9879 var aTag = generateAnchorTag(btn); 9880 btnContainer.appendChild(aTag); 9881 }); 9882 9883 mainDiv.appendChild(btnContainer); 9884 body.appendChild(mainDiv); 9885 9886 return mainDiv; 9887 }; 9888 9889 var getSelectedText = function getSelectedText() { 9890 var text = ''; 9891 var selection = undefined; 9892 9893 if (window.getSelection) { 9894 selection = window.getSelection(); 9895 text = selection.toString(); 9896 } else if (document.selection && document.selection.type !== 'Control') { 9897 selection = document.selection.createRange(); 9898 text = selection.text; 9899 } 9900 9901 return { 9902 selection: selection, 9903 text: text 9904 }; 9905 }; 9906 9907 var shareTooltip = function shareTooltip() { 9908 selected = getSelectedText(); 9909 9910 if (selected.text.length) { 9911 var oRange = selected.selection.getRangeAt(0); 9912 var oRect = oRange.getBoundingClientRect(); 9913 updateTooltip(oRect); 9914 } else { 9915 hideTooltip(); 9916 } 9917 }; 9918 9919 exports.shareSelectedText = function (element, args) { 9920 var elt = document.querySelectorAll(element); 9921 9922 parameters = extend({ 9923 tooltipClass: '', 9924 sanitize: true, 9925 buttons: [SOCIAL.twitter, SOCIAL.buffer], 9926 anchorsClass: '', 9927 twitterUsername: '', 9928 facebookAppID: '', 9929 facebookDisplayMode: FACEBOOK_DISPLAY_MODES.popup, 9930 tooltipTimeout: TOOLTIP_TIMEOUT 9931 }, args); 9932 9933 tooltip = generateTooltip(); 9934 9935 Array.prototype.forEach.call(elt, function (el) { 9936 el.addEventListener('mouseup', function () { 9937 shareTooltip(); 9938 }); 9939 }); 9940 }; 9941})(window); 9942 9943/*global jQuery, shareSelectedText*/ 9944if (window.jQuery) { 9945 (function ($, shareSelected) { 9946 'use strict'; 9947 9948 var shareSelectedify = function shareSelectedify(el, options) { 9949 shareSelected(el, options); 9950 }; 9951 9952 $.fn.shareSelectedText = function (options) { 9953 return shareSelectedify(this.selector, options); 9954 }; 9955 })(jQuery, shareSelectedText); 9956} 9957 9958/***/ }), 9959/* 30 */ 9960/***/ (function(module, exports, __webpack_require__) { 9961 9962"use strict"; 9963 9964 9965Object.defineProperty(exports, "__esModule", { 9966 value: true 9967}); 9968var categoryNavigation = function categoryNavigation() { 9969 $(document).on("click", ".js-category", function (e) { 9970 e.preventDefault(); 9971 var $this = $(this); 9972 var categorySlug = $this.data("slug"); 9973 9974 // Find all .section__categories elements in the document 9975 var $sectionCategories = $('.section__categories'); 9976 9977 // Update active state for all matching links 9978 $sectionCategories.find('a[data-slug="' + categorySlug + '"]').parent().addClass('current__category'); 9979 $sectionCategories.find('a[data-slug="' + categorySlug + '"]').parent().siblings().removeClass('current__category'); 9980 9981 // Construct new URL with query parameter 9982 var currentUrl = new URL(window.location.href); 9983 currentUrl.searchParams.set('category', categorySlug); 9984 9985 // Remove /page/X/ from the URL path if it exists 9986 var pathSegments = currentUrl.pathname.split('/'); 9987 var filteredSegments = pathSegments.filter(function (segment) { 9988 return segment !== 'page' && segment !== ''; 9989 }).filter(function (segment, index, arr) { 9990 // Remove the segment immediately after 'page' (the number) 9991 if (pathSegments[index - 1] === 'page') { 9992 return false;
9993 } 9994 return true; 9995 }); 9996 currentUrl.pathname = filteredSegments.join('/'); 9997 9998 // Update browser URL without reloading 9999 history.pushState({}, '', currentUrl); 10000 10001 // Make AJAX request with the new URL 10002 $.ajax({ 10003 url: currentUrl.toString(), // Use the updated URL 10004 type: "GET", 10005 beforeSend: function beforeSend() { 10006 $('body').addClass('loading'); 10007 }, 10008 success: function success(response) { 10009 // Extract and update the relevant parts of the response 10010 var newProjects = $(response).find(".js-category-fulter").html(); 10011 var newPagination = $(response).find(".js-paging").html(); 10012 10013 $(".js-category-fulter").html(newProjects); 10014 $(".js-paging").html(newPagination); 10015 }, 10016 error: function error(_error) { 10017 console.log(_error); 10018 }, 10019 complete: function complete() { 10020 $('body').removeClass('loading'); 10021 } 10022 }); 10023 }); 10024}; 10025 10026exports.default = categoryNavigation; 10027 10028/***/ }), 10029/* 31 */ 10030/***/ (function(module, exports, __webpack_require__) { 10031 10032"use strict"; 10033 10034 10035$(window).on('load', function () { 10036 if (!getCookie('crb_popup_closed') && !isHidden()) { 10037 $('.js-popup-newsletter').removeClass('hidden'); 10038 } 10039}); 10040 10041$(document).on("click", ".js-close-popup", function (e) { 10042 e.preventDefault();
10043 setCookie('crb_popup_closed', '1', setTimer()); 10044 $('.js-popup-newsletter').addClass('hidden'); 10045}); 10046 10047$(document).on("submit", ".js-newsletter-form", function (e) { 10048 e.preventDefault(); 10049 setCookie('crb_popup_closed', '1', 365); 10050 $('.js-popup-newsletter').addClass('hidden'); 10051}); 10052 10053function setCookie(name, value, days) { 10054 var expires = ''; 10055 if (days) { 10056 var date = new Date(); 10057 date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); 10058 expires = '; expires=' + date.toUTCString(); 10059 } 10060 document.cookie = name + '=' + (value || '') + expires + '; path=/'; 10061} 10062 10063function getCookie(name) { 10064 var match = document.cookie.match(RegExp('(?:^|;\\s*)' + name + '=([^;]*)')); 10065 return match ? match[1] : null; 10066} 10067 10068function setTimer() { 10069 var time = $('.js-popup-newsletter').data('duration'); 10070 if (time == '') { 10071 time = 3; 10072 } 10073 return time; 10074} 10075 10076function isHidden() { 10077 var hidden = $('.js-popup-newsletter').data('hidden'); 10078 return hidden; 10079} 10080 10081/***/ }), 10082/* 32 */ 10083/***/ (function(module, exports, __webpack_require__) { 10084 10085"use strict"; 10086 10087 10088Object.defineProperty(exports, "__esModule", { 10089 value: true 10090}); 10091 10092var _vueMin = __webpack_require__(3); 10093 10094var _vueMin2 = _interopRequireDefault(_vueMin); 10095 10096var _vueNumericMin = __webpack_require__(4); 10097 10098var _vueNumericMin2 = _interopRequireDefault(_vueNumericMin); 10099 10100var _numeral = __webpack_require__(5); 10101 10102var _numeral2 = _interopRequireDefault(_numeral); 10103 10104var _headroomMin = __webpack_require__(7); 10105 10106var _headroomMin2 = _interopRequireDefault(_headroomMin); 10107 10108var _vMoney = __webpack_require__(6); 10109 10110function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 10111 10112function isNumeric(n) { 10113 return !isNaN(parseFloat(n)) && isFinite(n); 10114} 10115 10116var initialize = function initialize() { 10117 if (!document.querySelector('tax-calc')) { 10118 return; 10119 } 10120 10121 _vueMin2.default.component('tax-calc', { 10122 template: '#tpl-tax-calc', 10123 10124 data: function data() { 10125 return { 10126 salary: 850000, 10127 rates: { 10128 federal: window.gavin.rates.federal, 10129 state_province: window.gavin.rates.state_province 10130 }, 10131 teams: window.gavin.teams, 10132 selectedTeams: { 10133 first: false, 10134 second: false 10135 }, 10136 openSelects: { 10137 first: false, 10138 second: false 10139 }, 10140 moneyConfig: { 10141 decimal: '.', 10142 thousands: ',', 10143 prefix: '$', 10144 suffix: '', 10145 precision: 0, 10146 masked: false 10147 } 10148 }; 10149 }, 10150 10151 components: { VueNumeric: _vueNumericMin2.default, Money: _vMoney.Money }, 10152 10153 filters: { 10154 dollarize: function dollarize(value) { 10155 if (!value) return '0'; 10156 return (0, _numeral2.default)(value).format('0,0'); 10157 }, 10158 percentize: function percentize(value) { 10159 return (0, _numeral2.default)(value).format('00.00'); 10160 } 10161 }, 10162 10163 mounted: function mounted() { 10164 // Handle salary input stickiness 10165 var salaryContainer = document.querySelector('.salary-container'); 10166 var header = document.querySelector('header'); 10167 10168 var headroom = new _headroomMin2.default(salaryContainer, { 10169 offset: salaryContainer.offsetTop - header.offsetHeight - header.offsetTop - 10 10170 }); 10171 headroom.init(); 10172 10173 window.addEventListener("resize", function () { 10174 if (document.body.clientWidth > 800) { 10175 headroom.offset = salaryContainer.offsetTop - header.offsetHeight - header.offsetTop - 10; 10176 } 10177 }, true); 10178 10179 new Waypoint({ 10180 element: document.querySelector('footer'), 10181 handler: function handler(direction) { 10182 if (direction === 'up') { 10183 salaryContainer.classList.remove('hidden'); 10184 } else { 10185 salaryContainer.classList.add('hidden'); 10186 } 10187 }, 10188 offset: 450 10189 }); 10190 }, 10191 10192 10193 methods: { 10194 preventScroll: function preventScroll() { 10195 var salaryContainer = document.querySelector('.salary-container'); 10196 if (window.outerWidth < 800 && !salaryContainer.classList.contains('stuck')) { 10197 var top = salaryContainer.getBoundingClientRect().top - 200; 10198 window.scrollTo(0, top); 10199 document.body.scrollTop = top; 10200 } 10201 }, 10202 selectTeam: function selectTeam(slot, team) {
10203 this.selectedTeams[slot] = team; 10204 }, 10205 findRateFromBracket: function findRateFromBracket(value, bracket) { 10206 var isFederal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; 10207 var log = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; 10208 10209 var rate = 0; 10210 var taxedAmount = 0; 10211 var reducedSalary = parseFloat(value); 10212 10213 bracket.forEach(function (range, key) { 10214 var min = parseFloat(range.min); 10215 var max = parseFloat(range.max); 10216 if (isFederal && isNumeric(max)) { 10217 max = max + 1; 10218 } else if (typeof range.use_salary_as_max !== 'undefined' && range.use_salary_as_max === true) { 10219 if (reducedSalary < max) { 10220 max = value; 10221 } 10222 } else if (typeof range.use_salary_only_when_higher_than_min !== 'undefined' && range.use_salary_only_when_higher_than_min === true) { 10223 max = value; 10224 } else if (typeof range.use_next_max !== 'undefined' && range.use_next_max === true) { 10225 if (reducedSalary < max) { 10226 max = value; 10227 } 10228 max = bracket[key + 1].max; 10229 } 10230 10231 max = isNumeric(max) ? max : value; 10232 10233 var rate = parseFloat(range.rate / 100); 10234 10235 if (reducedSalary >= min) { 10236 var taxableIncome = Math.min(reducedSalary, max) - min; 10237 var marginalTax = taxableIncome * rate; 10238 taxedAmount += marginalTax; 10239 } 10240 }); 10241 10242 var data = { 10243 'rate': taxedAmount / value * 100, 10244 'taxedAmount': taxedAmount 10245 }; 10246 10247 return data; 10248 }, 10249 10250 findRateFromNYBracket: function findRateFromNYBracket(value, bracket, deduction) { 10251 var taxedAmount = 0; 10252 10253 for (var i = 1; i < bracket.length; i++) { 10254 var range = bracket[i]; 10255 var max = isNumeric(range.max) ? parseFloat(range.max) : null; 10256 var isLastBracket = max === null; 10257 var rate = parseFloat(range.rate) / 100; 10258 10259 if (isLastBracket || value < max) { 10260 taxedAmount = (value - deduction) * rate; 10261 break; 10262 } 10263 } 10264 10265 var data = { 10266 'rate': taxedAmount / value * 100, 10267 'taxedAmount': taxedAmount 10268 }; 10269 10270 return data; 10271 }, 10272 toggleSelect: function toggleSelect(slot) { 10273 this.openSelects[slot] = !this.openSelects[slot]; 10274 }, 10275 generateRate: function generateRate(team) { 10276 var _this = this; 10277 10278 if (!team) { 10279 return 0.0; 10280 } 10281 10282 var rate = 0; 10283 var taxedAmount = 0; 10284 10285 if (this.salary < 850000) { 10286 return; 10287 } 10288 10289 // If team is american (check against array of countries), determine federal rate based on salary 10290 if (window.gavin.stateAbbrevs.indexOf(team.state_province) >= 0) { 10291 var rateFromBracket = this.findRateFromBracket(this.salary, this.rates.federal, true); 10292 10293 rate = rate + rateFromBracket.rate; 10294 taxedAmount = taxedAmount + rateFromBracket.taxedAmount; 10295 } 10296 10297 // Determine provincial rate based on salary 10298 this.rates.state_province.forEach(function (location) { 10299 if (location.state_province_name === team.state_province) { 10300 var _rateFromBracket = void 0; 10301 10302 if (location.state_province_name === 'NY') { 10303 _rateFromBracket = _this.findRateFromNYBracket(_this.salary, location.tax_rates, 8000); 10304 } else { 10305 _rateFromBracket = _this.findRateFromBracket(_this.salary, location.tax_rates, false); 10306 } 10307 10308 rate = rate + _rateFromBracket.rate; 10309 taxedAmount = taxedAmount + _rateFromBracket.taxedAmount; 10310 } 10311 }); 10312 10313 // Add city rate 10314 if (team.city_rate) { 10315 var _rateFromBracket2 = this.findRateFromBracket(this.salary, team.city_rate, false); 10316 10317 rate = rate + _rateFromBracket2.rate; 10318 taxedAmount = taxedAmount + _rateFromBracket2.taxedAmount; 10319 } 10320 10321 var totalRate = rate > 0 ? parseFloat((rate / 100).toFixed(4)) : 0; 10322 var totalData = { 10323 'totalRate': totalRate, 10324 'totalTax': taxedAmount 10325 }; 10326 10327 return totalData; 10328 } 10329 } 10330 }); 10331 10332 var app = new _vueMin2.default({ 10333 el: '#vue-container' 10334 }); 10335}; 10336 10337exports.default = initialize; 10338 10339/***/ }), 10340/* 33 */ 10341/***/ (function(module, exports, __webpack_require__) { 10342 10343/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) || 10344 (typeof self !== "undefined" && self) || 10345 window; 10346var apply = Function.prototype.apply; 10347 10348// DOM APIs, for completeness 10349 10350exports.setTimeout = function() { 10351 return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout); 10352}; 10353exports.setInterval = function() { 10354 return new Timeout(apply.call(setInterval, scope, arguments), clearInterval); 10355}; 10356exports.clearTimeout = 10357exports.clearInterval = function(timeout) { 10358 if (timeout) { 10359 timeout.close(); 10360 } 10361}; 10362 10363function Timeout(id, clearFn) { 10364 this._id = id; 10365 this._clearFn = clearFn; 10366} 10367Timeout.prototype.unref = Timeout.prototype.ref = function() {}; 10368Timeout.prototype.close = function() { 10369 this._clearFn.call(scope, this._id); 10370}; 10371 10372// Does not start the time, just sets up the members needed. 10373exports.enroll = function(item, msecs) { 10374 clearTimeout(item._idleTimeoutId); 10375 item._idleTimeout = msecs; 10376}; 10377 10378exports.unenroll = function(item) { 10379 clearTimeout(item._idleTimeoutId); 10380 item._idleTimeout = -1; 10381}; 10382 10383exports._unrefActive = exports.active = function(item) { 10384 clearTimeout(item._idleTimeoutId); 10385 10386 var msecs = item._idleTimeout; 10387 if (msecs >= 0) { 10388 item._idleTimeoutId = setTimeout(function onTimeout() { 10389 if (item._onTimeout) 10390 item._onTimeout(); 10391 }, msecs); 10392 } 10393}; 10394 10395// setimmediate attaches itself to the global object 10396__webpack_require__(34); 10397// On some exotic environments, it's not clear which object `setimmediate` was 10398// able to install onto. Search each possibility in the same order as the 10399// `setimmediate` library. 10400exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) || 10401 (typeof global !== "undefined" && global.setImmediate) || 10402 (this && this.setImmediate); 10403exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || 10404 (typeof global !== "undefined" && global.clearImmediate) || 10405 (this && this.clearImmediate); 10406 10407/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) 10408 10409/***/ }), 10410/* 34 */ 10411/***/ (function(module, exports, __webpack_require__) { 10412 10413/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { 10414 "use strict"; 10415 10416 if (global.setImmediate) { 10417 return; 10418 } 10419 10420 var nextHandle = 1; // Spec says greater than zero 10421 var tasksByHandle = {}; 10422 var currentlyRunningATask = false;
vendor: 5,701 bytes, lines 10423-10583
10423 var doc = global.document; 10424 var registerImmediate; 10425 10426 function setImmediate(callback) { 10427 // Callback can either be a function or a string 10428 if (typeof callback !== "function") { 10429 callback = new Function("" + callback); 10430 } 10431 // Copy function arguments 10432 var args = new Array(arguments.length - 1); 10433 for (var i = 0; i < args.length; i++) { 10434 args[i] = arguments[i + 1]; 10435 } 10436 // Store and register the task 10437 var task = { callback: callback, args: args }; 10438 tasksByHandle[nextHandle] = task; 10439 registerImmediate(nextHandle); 10440 return nextHandle++; 10441 } 10442 10443 function clearImmediate(handle) { 10444 delete tasksByHandle[handle]; 10445 } 10446 10447 function run(task) { 10448 var callback = task.callback; 10449 var args = task.args; 10450 switch (args.length) { 10451 case 0: 10452 callback(); 10453 break; 10454 case 1: 10455 callback(args[0]); 10456 break; 10457 case 2: 10458 callback(args[0], args[1]); 10459 break; 10460 case 3: 10461 callback(args[0], args[1], args[2]); 10462 break; 10463 default: 10464 callback.apply(undefined, args); 10465 break; 10466 } 10467 } 10468 10469 function runIfPresent(handle) { 10470 // From the spec: "Wait until any invocations of this algorithm started before this one have completed." 10471 // So if we're currently running a task, we'll need to delay this invocation. 10472 if (currentlyRunningATask) { 10473 // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a 10474 // "too much recursion" error. 10475 setTimeout(runIfPresent, 0, handle); 10476 } else { 10477 var task = tasksByHandle[handle]; 10478 if (task) { 10479 currentlyRunningATask = true; 10480 try { 10481 run(task); 10482 } finally { 10483 clearImmediate(handle); 10484 currentlyRunningATask = false; 10485 } 10486 } 10487 } 10488 } 10489 10490 function installNextTickImplementation() { 10491 registerImmediate = function(handle) { 10492 process.nextTick(function () { runIfPresent(handle); }); 10493 }; 10494 } 10495 10496 function canUsePostMessage() { 10497 // The test against `importScripts` prevents this implementation from being installed inside a web worker, 10498 // where `global.postMessage` means something completely different and can't be used for this purpose. 10499 if (global.postMessage && !global.importScripts) { 10500 var postMessageIsAsynchronous = true; 10501 var oldOnMessage = global.onmessage; 10502 global.onmessage = function() { 10503 postMessageIsAsynchronous = false; 10504 }; 10505 global.postMessage("", "*"); 10506 global.onmessage = oldOnMessage; 10507 return postMessageIsAsynchronous; 10508 } 10509 } 10510 10511 function installPostMessageImplementation() { 10512 // Installs an event handler on `global` for the `message` event: see 10513 // * https://developer.mozilla.org/en/DOM/window.postMessage 10514 // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages 10515 10516 var messagePrefix = "setImmediate$" + Math.random() + "$"; 10517 var onGlobalMessage = function(event) { 10518 if (event.source === global && 10519 typeof event.data === "string" && 10520 event.data.indexOf(messagePrefix) === 0) { 10521 runIfPresent(+event.data.slice(messagePrefix.length)); 10522 } 10523 }; 10524 10525 if (global.addEventListener) { 10526 global.addEventListener("message", onGlobalMessage, false); 10527 } else { 10528 global.attachEvent("onmessage", onGlobalMessage); 10529 } 10530 10531 registerImmediate = function(handle) { 10532 global.postMessage(messagePrefix + handle, "*"); 10533 }; 10534 } 10535 10536 function installMessageChannelImplementation() { 10537 var channel = new MessageChannel(); 10538 channel.port1.onmessage = function(event) { 10539 var handle = event.data; 10540 runIfPresent(handle); 10541 }; 10542 10543 registerImmediate = function(handle) { 10544 channel.port2.postMessage(handle); 10545 }; 10546 } 10547 10548 function installReadyStateChangeImplementation() { 10549 var html = doc.documentElement; 10550 registerImmediate = function(handle) { 10551 // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted 10552 // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. 10553 var script = doc.createElement("script"); 10554 script.onreadystatechange = function () { 10555 runIfPresent(handle); 10556 script.onreadystatechange = null; 10557 html.removeChild(script); 10558 script = null; 10559 }; 10560 html.appendChild(script); 10561 }; 10562 } 10563 10564 function installSetTimeoutImplementation() { 10565 registerImmediate = function(handle) { 10566 setTimeout(runIfPresent, 0, handle); 10567 }; 10568 } 10569 10570 // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. 10571 var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); 10572 attachTo = attachTo && attachTo.setTimeout ? attachTo : global; 10573 10574 // Don't get fooled by e.g. browserify environments. 10575 if ({}.toString.call(global.process) === "[object process]") { 10576 // For Node.js before 0.9 10577 installNextTickImplementation(); 10578 10579 } else if (canUsePostMessage()) { 10580 // For non-IE10 modern browsers 10581 installPostMessageImplementation(); 10582 10583 }
vendor: 4,142 bytes, lines 10583-10704
10583 else if (global.MessageChannel) { 10584 // For web workers, where supported 10585 installMessageChannelImplementation(); 10586 10587 } else if (doc && "onreadystatechange" in doc.createElement("script")) { 10588 // For IE 6–8 10589 installReadyStateChangeImplementation(); 10590 10591 } else { 10592 // For older browsers 10593 installSetTimeoutImplementation(); 10594 } 10595 10596 attachTo.setImmediate = setImmediate; 10597 attachTo.clearImmediate = clearImmediate; 10598}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self)); 10599 10600/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(35))) 10601 10602/***/ }), 10603/* 35 */ 10604/***/ (function(module, exports) { 10605 10606// shim for using process in browser 10607var process = module.exports = {}; 10608 10609// cached from whatever global is present so that test runners that stub it 10610// don't break things. But we need to wrap it in a try catch in case it is 10611// wrapped in strict mode code which doesn't define any globals. It's inside a 10612// function because try/catches deoptimize in certain engines. 10613 10614var cachedSetTimeout; 10615var cachedClearTimeout; 10616 10617function defaultSetTimout() { 10618 throw new Error('setTimeout has not been defined'); 10619} 10620function defaultClearTimeout () { 10621 throw new Error('clearTimeout has not been defined'); 10622} 10623(function () { 10624 try { 10625 if (typeof setTimeout === 'function') { 10626 cachedSetTimeout = setTimeout; 10627 } else { 10628 cachedSetTimeout = defaultSetTimout; 10629 } 10630 } catch (e) { 10631 cachedSetTimeout = defaultSetTimout; 10632 } 10633 try { 10634 if (typeof clearTimeout === 'function') { 10635 cachedClearTimeout = clearTimeout; 10636 } else { 10637 cachedClearTimeout = defaultClearTimeout; 10638 } 10639 } catch (e) { 10640 cachedClearTimeout = defaultClearTimeout; 10641 } 10642} ()) 10643function runTimeout(fun) { 10644 if (cachedSetTimeout === setTimeout) { 10645 //normal enviroments in sane situations 10646 return setTimeout(fun, 0); 10647 } 10648 // if setTimeout wasn't available but was latter defined 10649 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 10650 cachedSetTimeout = setTimeout; 10651 return setTimeout(fun, 0); 10652 } 10653 try { 10654 // when when somebody has screwed with setTimeout but no I.E. maddness 10655 return cachedSetTimeout(fun, 0); 10656 } catch(e){ 10657 try { 10658 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 10659 return cachedSetTimeout.call(null, fun, 0); 10660 } catch(e){ 10661 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 10662 return cachedSetTimeout.call(this, fun, 0); 10663 } 10664 } 10665 10666 10667} 10668function runClearTimeout(marker) { 10669 if (cachedClearTimeout === clearTimeout) { 10670 //normal enviroments in sane situations 10671 return clearTimeout(marker); 10672 } 10673 // if clearTimeout wasn't available but was latter defined 10674 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 10675 cachedClearTimeout = clearTimeout; 10676 return clearTimeout(marker); 10677 } 10678 try { 10679 // when when somebody has screwed with setTimeout but no I.E. maddness 10680 return cachedClearTimeout(marker); 10681 } catch (e){ 10682 try { 10683 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 10684 return cachedClearTimeout.call(null, marker); 10685 } catch (e){ 10686 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 10687 // Some versions of I.E. have different rules for clearTimeout vs setTimeout 10688 return cachedClearTimeout.call(this, marker); 10689 } 10690 } 10691 10692 10693 10694} 10695var queue = []; 10696var draining = false; 10697var currentQueue; 10698var queueIndex = -1; 10699 10700function cleanUpNextTick() { 10701 if (!draining || !currentQueue) { 10702 return; 10703 } 10704 draining = false;
10705 if (currentQueue.length) { 10706 queue = currentQueue.concat(queue); 10707 } else { 10708 queueIndex = -1; 10709 } 10710 if (queue.length) { 10711 drainQueue(); 10712 } 10713} 10714 10715function drainQueue() { 10716 if (draining) { 10717 return; 10718 } 10719 var timeout = runTimeout(cleanUpNextTick); 10720 draining = true; 10721 10722 var len = queue.length; 10723 while(len) { 10724 currentQueue = queue; 10725 queue = []; 10726 while (++queueIndex < len) { 10727 if (currentQueue) { 10728 currentQueue[queueIndex].run(); 10729 } 10730 } 10731 queueIndex = -1; 10732 len = queue.length; 10733 } 10734 currentQueue = null; 10735 draining = false; 10736 runClearTimeout(timeout); 10737} 10738 10739process.nextTick = function (fun) { 10740 var args = new Array(arguments.length - 1); 10741 if (arguments.length > 1) { 10742 for (var i = 1; i < arguments.length; i++) { 10743 args[i - 1] = arguments[i]; 10744 } 10745 } 10746 queue.push(new Item(fun, args)); 10747 if (queue.length === 1 && !draining) { 10748 runTimeout(drainQueue); 10749 } 10750}; 10751 10752// v8 likes predictible objects 10753function Item(fun, array) { 10754 this.fun = fun; 10755 this.array = array; 10756} 10757Item.prototype.run = function () { 10758 this.fun.apply(null, this.array); 10759}; 10760process.title = 'browser'; 10761process.browser = true; 10762process.env = {}; 10763process.argv = []; 10764process.version = ''; // empty string to avoid regexp issues 10765process.versions = {}; 10766 10767function noop() {} 10768 10769process.on = noop; 10770process.addListener = noop; 10771process.once = noop; 10772process.off = noop; 10773process.removeListener = noop; 10774process.removeAllListeners = noop; 10775process.emit = noop; 10776process.prependListener = noop; 10777process.prependOnceListener = noop; 10778 10779process.listeners = function (name) { return [] } 10780 10781process.binding = function (name) { 10782 throw new Error('process.binding is not supported'); 10783}; 10784 10785process.cwd = function () { return '/' }; 10786process.chdir = function (dir) { 10787 throw new Error('process.chdir is not supported'); 10788}; 10789process.umask = function() { return 0; }; 10790 10791 10792/***/ }), 10793/* 36 */ 10794/***/ (function(module, exports, __webpack_require__) { 10795 10796"use strict"; 10797 10798 10799Object.defineProperty(exports, "__esModule", { 10800 value: true 10801}); 10802 10803var _vueMin = __webpack_require__(3); 10804 10805var _vueMin2 = _interopRequireDefault(_vueMin); 10806 10807var _numeral = __webpack_require__(5); 10808 10809var _numeral2 = _interopRequireDefault(_numeral); 10810 10811var _vueNumericMin = __webpack_require__(4); 10812 10813var _vueNumericMin2 = _interopRequireDefault(_vueNumericMin); 10814 10815var _vMoney = __webpack_require__(6); 10816 10817function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 10818 10819var initialize = function initialize() { 10820 if (!document.querySelector('escrow-calc')) { 10821 return; 10822 } 10823 10824 _vueMin2.default.component('escrow-calc', { 10825 template: '#tpl-escrow-calc', 10826 10827 data: function data() { 10828 return { 10829 seasons: window.gavin.seasons, 10830 activeSeasons: [], 10831 salary: [], 10832 gamesPlayed: [], 10833 escrowMultiplier: [], 10834 moneyConfig: { 10835 decimal: '.', 10836 thousands: ',', 10837 prefix: '$', 10838 suffix: '', 10839 precision: 2, 10840 masked: false 10841 }, 10842 percentConfig: { 10843 decimal: '.', 10844 thousands: ',', 10845 prefix: '', 10846 suffix: '%', 10847 precision: 2, 10848 masked: false 10849 }, 10850 // This is horrible, but v-money pukes when trying to update arrays 10851 salaryList: { 10852 salary_0: 0, 10853 salary_1: 0, 10854 salary_2: 0, 10855 salary_3: 0, 10856 salary_4: 0, 10857 salary_5: 0, 10858 salary_6: 0, 10859 salary_7: 0, 10860 salary_8: 0, 10861 salary_9: 0, 10862 salary_10: 0, 10863 salary_11: 0, 10864 salary_12: 0, 10865 salary_13: 0, 10866 salary_14: 0, 10867 salary_15: 0, 10868 salary_16: 0, 10869 salary_17: 0 10870 } 10871 }; 10872 }, 10873 10874 components: { VueNumeric: _vueNumericMin2.default, Money: _vMoney.Money }, 10875 10876 created: function created() { 10877 var normalNumGames = 82; 10878 for (var i = 0; i < this.seasons.length; i++) { 10879 var maxGames = parseInt(this.seasons[i].max_games); 10880 this.gamesPlayed.push(maxGames); 10881 if (maxGames < normalNumGames) { 10882 this.escrowMultiplier.push(maxGames / normalNumGames); 10883 } else { 10884 this.escrowMultiplier.push(1); 10885 } 10886 10887 this.activeSeasons.push(false); 10888 } 10889 }, 10890 10891 filters: { 10892 dollarize: function dollarize(value) { 10893 if (!value) return '0'; 10894 return (0, _numeral2.default)(value).format('0,0'); 10895 }, 10896 percentize: function percentize(value) { 10897 if (!value) return '0'; 10898 return (0, _numeral2.default)(value).format('00.00'); 10899 } 10900 }, 10901 10902 computed: { 10903 totalLost: function totalLost() { 10904 var total = 0; 10905 for (var i = 0; i < this.seasons.length; i++) { 10906 if (this.activeSeasons[i] && this.seasons[i].escrow_retained && this.seasons[i].escrow_refunded) { 10907 total = total + (this.calculateEscrow(this.seasons[i].escrow_retained, i) - this.calculateEscrow(this.seasons[i].escrow_refunded, i)
10907); 10908 } 10909 } 10910 console.log('total: ' + total); 10911 return total; 10912 }, 10913 totalPercentage: function totalPercentage() { 10914 var totalEarnings = 0; 10915 for (var i = 0; i < this.seasons.length; i++) { 10916 if (this.activeSeasons[i] && this.salaryList['salary_' + i]) { 10917 totalEarnings = totalEarnings + this.salaryList['salary_' + i]; 10918 } 10919 } 10920 return this.totalLost / totalEarnings * 100; 10921 } 10922 }, 10923 10924 methods: { 10925 getPercent: function getPercent(value) { 10926 if (!value) return '0'; 10927 return (0, _numeral2.default)(value).format('00.00'); 10928 }, 10929 activateSeason: function activateSeason(index) { 10930 _vueMin2.default.set(this.activeSeasons, index, true); 10931 }, 10932 calculateMultiplier: function calculateMultiplier(index) { 10933 _vueMin2.default.set(this.salaryList, 'salary_' + index, this.escrowMultiplier[index] * this.salaryList['salary_' + index]); 10934 }, 10935 toggleActiveSeason: function toggleActiveSeason(index) { 10936 _vueMin2.default.set(this.activeSeasons, index, !this.activeSeasons[index]); 10937 _vueMin2.default.set(this.salaryList, 'salary_' + index, 0); 10938 _vueMin2.default.set(this.gamesPlayed, index, parseInt(this.seasons[index].max_games)); 10939 }, 10940 getRatio: function getRatio(index) { 10941 if (typeof index === 'undefined' || !this.seasons[index]) { 10942 return 1; 10943 } 10944 return this.gamesPlayed[index] / parseInt(this.seasons[index].max_games); 10945 }, 10946 selectGamesPlayed: function selectGamesPlayed(index, num) { 10947 this.gamesPlayed[index] = num; 10948 }, 10949 calculateEscrow: function calculateEscrow(escrow, index) { 10950 var escrowRate = parseFloat(escrow) / 100; 10951 // const escrowMultiplier = this.escrowMultiplier[index] || 1; 10952 return escrowRate * this.salaryList['salary_' + index] * this.getRatio(index); 10953 } 10954 } 10955 }); 10956 10957 var app = new _vueMin2.default({ 10958 el: '#vue-container' 10959 }); 10960}; 10961 10962exports.default = initialize; 10963 10964/***/ }), 10965/* 37 */ 10966/***/ (function(module, exports, __webpack_require__) { 10967 10968"use strict"; 10969 10970 10971Object.defineProperty(exports, "__esModule", { 10972 value: true 10973}); 10974 10975var _vueMin = __webpack_require__(3); 10976 10977var _vueMin2 = _interopRequireDefault(_vueMin); 10978 10979var _vueNumericMin = __webpack_require__(4); 10980 10981var _vueNumericMin2 = _interopRequireDefault(_vueNumericMin); 10982 10983var _vMoney = __webpack_require__(6); 10984 10985var _numeral = __webpack_require__(5); 10986 10987var _numeral2 = _interopRequireDefault(_numeral); 10988 10989function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 10990 10991// This function is from David Goodman's Javascript Bible. 10992function conv_number(expr, decplaces) { 10993 var str = "" + Math.round(eval(expr) * Math.pow(10, decplaces)); 10994 while (str.length <= decplaces) { 10995 str = "0" + str; 10996 } 10997 10998 var decpoint = str.length - decplaces; 10999 return str.substring(0, decpoint) + "." + str.substring(decpoint, str.length); 11000} 11001 11002// Parameters are rate, total number of periods, payment made each period and future value 11003function presentValue(rate, nper, pmt, fv) { 11004 rate = parseFloat(rate); 11005 nper = parseFloat(nper); 11006 pmt = parseFloat(pmt); 11007 fv = parseFloat(fv); 11008 if (nper == 0) { 11009 alert("Why do you want to test me with zeros?"); 11010 return 0; 11011 } 11012 var pv_value = void 0; 11013 if (rate == 0) { 11014 // Interest rate is 0 11015 pv_value = -(fv + pmt * nper); 11016 } else { 11017 var _x = Math.pow(1 + rate, -nper); 11018 var y = Math.pow(1 + rate, nper); 11019 pv_value = -(_x * (fv * rate - pmt + y * pmt)) / rate; 11020 } 11021 pv_value = conv_number(pv_value, 2); 11022 return pv_value; 11023} 11024 11025function fv(rate, nper, pmt, pv) { 11026 rate = parseFloat(rate); 11027 nper = parseFloat(nper); 11028 pmt = parseFloat(pmt); 11029 pv = parseFloat(pv); 11030 if (nper == 0) { 11031 alert("Why do you want to test me with zeros?"); 11032 return 0; 11033 } 11034 var fv_value = void 0; 11035 if (rate == 0) { 11036 // Interest rate is 0 11037 fv_value = -(pv + pmt * nper); 11038 } else { 11039 x = Math.pow(1 + rate, nper); 11040 fv_value = -(-pmt + x * pmt + rate * x * pv) / rate; 11041 } 11042 fv_value = conv_number(fv_value, 2); 11043 return fv_value; 11044} 11045 11046var initialize = function initialize() { 11047 if (!document.querySelector('retirement-calc')) { 11048 return; 11049 } 11050 11051 _vueMin2.default.component('retirement-calc', { 11052 template: '#tpl-retirement-calc', 11053 11054 data: function data() { 11055 return { 11056 input: { 11057 income: { 11058 salary: 0, 11059 escrow: 0, 11060 state: false, 11061 city: false 11062 }, 11063 expense: { 11064 agentFees: 0, 11065 insurancePremium: 0, 11066 training: 0 11067 }, 11068 fixedOutflows: { 11069 accountantFees: 0, 11070 autoInsurance: 0, 11071 liabilityInsurance: 0, 11072 comms: 0, 11073 financialManagement: 0, 11074 property: 0 11075 }, 11076 variableOutflows: { 11077 residence: 0, 11078 personal: 0, 11079 transportation: 0, 11080 discretionary: 0 11081 }, 11082 selectedAge: 25 11083 }, 11084 rates: { 11085 federal: window.gavin.rates.federal, 11086 state_province: window.gavin.rates.state_province, 11087 cities: false 11088 }, 11089 states: window.gavin.states, 11090 teams: window.gavin.teams, 11091 stateSelectOpen: false, 11092 citySelectOpen: false, 11093 formError: false, 11094 moneyConfig: {
11095 decimal: '.', 11096 thousands: ',', 11097 prefix: '$', 11098 suffix: '', 11099 precision: 0, 11100 masked: false 11101 }, 11102 percentConfig: { 11103 decimal: '.', 11104 thousands: ',', 11105 prefix: '', 11106 suffix: '%', 11107 precision: 2, 11108 masked: false 11109 } 11110 }; 11111 }, 11112 11113 components: { VueNumeric: _vueNumericMin2.default, Money: _vMoney.Money }, 11114 11115 filters: { 11116 dollarize: function dollarize(value) { 11117 if (!value) return '0'; 11118 return (0, _numeral2.default)(value).format('0,0'); 11119 }, 11120 percentize: function percentize(value) { 11121 return (0, _numeral2.default)(value).format('00.00'); 11122 } 11123 }, 11124 11125 computed: { 11126 totalIncome: function totalIncome() { 11127 var _this = this; 11128 11129 var escrowLosses = this.input.income.salary * (this.input.income.escrow / 100); 11130 11131 var taxLosses = 0; 11132 if (this.input.income.state) { 11133 var rate = 0; 11134 11135 // If team is american (check against array of countries), determine federal rate based on salary 11136 if (window.gavin.stateAbbrevs.indexOf(this.input.income.state.abbrev) >= 0) { 11137 rate = rate + this.findRateFromBracket(this.input.income.salary, this.rates.federal); 11138 } 11139 11140 // Determine provincial rate based on salary 11141 this.rates.state_province.forEach(function (location) { 11142 if (location.state_province_name === _this.input.income.state.abbrev) { 11143 rate = rate + _this.findRateFromBracket(_this.input.income.salary, location.tax_rates); 11144 } 11145 }); 11146 11147 // Add city rate 11148 if (this.input.income.city) { 11149 rate = rate + this.findRateFromBracket(this.input.income.salary, this.input.income.city.city_rate); 11150 } 11151 11152 taxLosses = this.input.income.salary * (rate / 100); 11153 } 11154 11155 return this.input.income.salary - escrowLosses - taxLosses; 11156 }, 11157 totalExpenses: function totalExpenses() { 11158 var agentFees = this.input.income.salary * (this.input.expense.agentFees / 100); 11159 return agentFees + this.input.expense.insurancePremium + this.input.expense.training; 11160 }, 11161 totalFixedOutflows: function totalFixedOutflows() { 11162 var values = Object.keys(this.input.fixedOutflows).map(function (e) { 11163 return this.input.fixedOutflows[e]; 11164 }.bind(this)); 11165 11166 return values.reduce(function (a, b) { 11167 return a + b; 11168 }); 11169 }, 11170 totalVariableOutflows: function totalVariableOutflows() { 11171 var values = Object.keys(this.input.variableOutflows).map(function (e) { 11172 return this.input.variableOutflows[e]; 11173 }.bind(this)); 11174 11175 return values.reduce(function (a, b) { 11176 return a + b; 11177 }); 11178 }, 11179 annualMinimumTarget: function annualMinimumTarget() { 11180 return this.totalIncome - this.totalExpenses - this.totalFixedOutflows - this.totalVariableOutflows; 11181 }, 11182 annualAverageOutflows: function annualAverageOutflows() { 11183 return this.totalExpenses + this.totalFixedOutflows + this.totalVariableOutflows; 11184 }, 11185 monthlyAverageOutflows: function monthlyAverageOutflows() { 11186 return (this.totalExpenses + this.totalFixedOutflows + this.totalVariableOutflows) / 12; 11187 }, 11188 amountRequired: function amountRequired() { 11189 if (this.input.selectedAge) { 11190 var maxAge = 80; 11191 return presentValue(0.05, maxAge - this.input.selectedAge, 0 - this.totalFixedOutflows - this.totalVariableOutflows, 0); 11192 } else { 11193 return 0; 11194 } 11195 } 11196 }, 11197 11198 methods: { 11199 findRateFromBracket: function findRateFromBracket(value, bracket) { 11200 var rate = 0; 11201 var taxedAmount = 0; 11202 var reducedSalary = parseFloat(value); 11203 11204 bracket.forEach(function (range) { 11205 var min = parseFloat(range.min); 11206 var max = parseFloat(range.max); 11207 var rate = (parseFloat(range.rate) / 100).toFixed(4); 11208 11209 if (reducedSalary >= min) { 11210 taxedAmount = taxedAmount + ((max ? max : value) - min) * rate; 11211 } 11212 }); 11213 11214 return taxedAmount / value * 100; 11215 }, 11216 toggleStateSelect: function toggleStateSelect() { 11217 this.stateSelectOpen = !this.stateSelectOpen; 11218 }, 11219 openStateSelect: function openStateSelect() { 11220 _vueMin2.default.set(this.input.income, 'state', false); 11221 this.stateSelectOpen = true; 11222 }, 11223 closeStateSelect: function closeStateSelect() { 11224 this.stateSelectOpen = false;
11225 }, 11226 toggleCitySelect: function toggleCitySelect() { 11227 this.citySelectOpen = !this.citySelectOpen; 11228 }, 11229 openCitySelect: function openCitySelect() { 11230 this.citySelectOpen = true; 11231 }, 11232 closeCitySelect: function closeCitySelect() { 11233 this.citySelectOpen = false; 11234 }, 11235 selectState: function selectState(state) { 11236 _vueMin2.default.set(this.input.income, 'state', state); 11237 this.closeStateSelect(); 11238 document.querySelector('.state-selector').blur(); 11239 _vueMin2.default.set(this.input.income, 'city', false); 11240 11241 // Get cities of selected state 11242 var cities = []; 11243 this.teams.forEach(function (team) { 11244 if (team.state_province == state.abbrev && team.city_rate) { 11245 cities.push(team); 11246 } 11247 }); 11248 11249 if (cities.length == 1) { 11250 _vueMin2.default.set(this.input.income, 'city', cities[0]); 11251 } else { 11252 _vueMin2.default.set(this.rates, 'cities', cities); 11253 } 11254 }, 11255 selectCity: function selectCity(city) { 11256 _vueMin2.default.set(this.input.income, 'city', city); 11257 this.closeCitySelect(); 11258 }, 11259 clearInputs: function clearInputs() { 11260 _vueMin2.default.set(this, 'input', { 11261 income: { 11262 salary: 0, 11263 escrow: 0, 11264 state: false, 11265 city: false 11266 }, 11267 expense: { 11268 agentFees: 0, 11269 insurancePremium: 0, 11270 training: 0 11271 }, 11272 fixedOutflows: { 11273 accountantFees: 0, 11274 autoInsurance: 0, 11275 liabilityInsurance: 0, 11276 comms: 0, 11277 financialManagement: 0, 11278 property: 0 11279 }, 11280 variableOutflows: { 11281 residence: 0, 11282 personal: 0, 11283 transportation: 0, 11284 discretionary: 0 11285 }, 11286 selectedAge: 25 11287 }); 11288 } 11289 } 11290 }); 11291 11292 var app = new _vueMin2.default({ 11293 el: '#vue-container' 11294 }); 11295}; 11296 11297exports.default = initialize; 11298 11299/***/ }), 11300/* 38 */ 11301/***/ (function(module, exports, __webpack_require__) { 11302 11303"use strict"; 11304 11305 11306var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 11307 11308/*! 11309Waypoints - 4.0.1 11310Copyright © 2011-2016 Caleb Troughton 11311Licensed under the MIT license. 11312https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 11313*/ 11314(function () { 11315 'use strict'; 11316 11317 var keyCounter = 0; 11318 var allWaypoints = {}; 11319 11320 /* http://imakewebthings.com/waypoints/api/waypoint */ 11321 function Waypoint(options) { 11322 if (!options) { 11323 throw new Error('No options passed to Waypoint constructor'); 11324 } 11325 if (!options.element) { 11326 throw new Error('No element option passed to Waypoint constructor'); 11327 } 11328 if (!options.handler) { 11329 throw new Error('No handler option passed to Waypoint constructor'); 11330 } 11331 11332 this.key = 'waypoint-' + keyCounter; 11333 this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options); 11334 this.element = this.options.element; 11335 this.adapter = new Waypoint.Adapter(this.element); 11336 this.callback = options.handler; 11337 this.axis = this.options.horizontal ? 'horizontal' : 'vertical'; 11338 this.enabled = this.options.enabled; 11339 this.triggerPoint = null; 11340 this.group = Waypoint.Group.findOrCreate({ 11341 name: this.options.group, 11342 axis: this.axis 11343 }); 11344 this.context = Waypoint.Context.findOrCreateByElement(this.options.context); 11345 11346 if (Waypoint.offsetAliases[this.options.offset]) { 11347 this.options.offset = Waypoint.offsetAliases[this.options.offset]; 11348 } 11349 this.group.add(this); 11350 this.context.add(this); 11351 allWaypoints[this.key] = this; 11352 keyCounter += 1; 11353 } 11354 11355 /* Private */ 11356 Waypoint.prototype.queueTrigger = function (direction) { 11357 this.group.queueTrigger(this, direction); 11358 }; 11359 11360 /* Private */ 11361 Waypoint.prototype.trigger = function (args) { 11362 if (!this.enabled) { 11363 return; 11364 } 11365 if (this.callback) { 11366 this.callback.apply(this, args); 11367 } 11368 }; 11369 11370 /* Public */ 11371 /* http://imakewebthings.com/waypoints/api/destroy */ 11372 Waypoint.prototype.destroy = function () { 11373 this.context.remove(this); 11374 this.group.remove(this); 11375 delete allWaypoints[this.key]; 11376 }; 11377 11378 /* Public */ 11379 /* http://imakewebthings.com/waypoints/api/disable */ 11380 Waypoint.prototype.disable = function () { 11381 this.enabled = false;
11382 return this; 11383 }; 11384 11385 /* Public */ 11386 /* http://imakewebthings.com/waypoints/api/enable */ 11387 Waypoint.prototype.enable = function () { 11388 this.context.refresh(); 11389 this.enabled = true; 11390 return this; 11391 }; 11392 11393 /* Public */ 11394 /* http://imakewebthings.com/waypoints/api/next */ 11395 Waypoint.prototype.next = function () { 11396 return this.group.next(this); 11397 }; 11398 11399 /* Public */ 11400 /* http://imakewebthings.com/waypoints/api/previous */ 11401 Waypoint.prototype.previous = function () { 11402 return this.group.previous(this); 11403 }; 11404 11405 /* Private */ 11406 Waypoint.invokeAll = function (method) { 11407 var allWaypointsArray = []; 11408 for (var waypointKey in allWaypoints) { 11409 allWaypointsArray.push(allWaypoints[waypointKey]); 11410 } 11411 for (var i = 0, end = allWaypointsArray.length; i < end; i++) { 11412 allWaypointsArray[i][method](); 11413 } 11414 }; 11415 11416 /* Public */ 11417 /* http://imakewebthings.com/waypoints/api/destroy-all */ 11418 Waypoint.destroyAll = function () { 11419 Waypoint.invokeAll('destroy'); 11420 }; 11421 11422 /* Public */ 11423 /* http://imakewebthings.com/waypoints/api/disable-all */ 11424 Waypoint.disableAll = function () { 11425 Waypoint.invokeAll('disable'); 11426 }; 11427 11428 /* Public */ 11429 /* http://imakewebthings.com/waypoints/api/enable-all */ 11430 Waypoint.enableAll = function () { 11431 Waypoint.Context.refreshAll();
11432 for (var waypointKey in allWaypoints) { 11433 allWaypoints[waypointKey].enabled = true; 11434 } 11435 return this; 11436 }; 11437 11438 /* Public */ 11439 /* http://imakewebthings.com/waypoints/api/refresh-all */ 11440 Waypoint.refreshAll = function () { 11441 Waypoint.Context.refreshAll(); 11442 }; 11443 11444 /* Public */ 11445 /* http://imakewebthings.com/waypoints/api/viewport-height */ 11446 Waypoint.viewportHeight = function () { 11447 return window.innerHeight || document.documentElement.clientHeight; 11448 }; 11449 11450 /* Public */ 11451 /* http://imakewebthings.com/waypoints/api/viewport-width */ 11452 Waypoint.viewportWidth = function () { 11453 return document.documentElement.clientWidth; 11454 }; 11455 11456 Waypoint.adapters = []; 11457 11458 Waypoint.defaults = { 11459 context: window, 11460 continuous: true, 11461 enabled: true, 11462 group: 'default', 11463 horizontal: false, 11464 offset: 0 11465 }; 11466 11467 Waypoint.offsetAliases = { 11468 'bottom-in-view': function bottomInView() { 11469 return this.context.innerHeight() - this.adapter.outerHeight(); 11470 }, 11471 'right-in-view': function rightInView() { 11472 return this.context.innerWidth() - this.adapter.outerWidth(); 11473 } 11474 }; 11475 11476 window.Waypoint = Waypoint; 11477})();(function () { 11478 'use strict'; 11479 11480 function requestAnimationFrameShim(callback) { 11481 window.setTimeout(callback, 1000 / 60); 11482 } 11483 11484 var keyCounter = 0; 11485 var contexts = {}; 11486 var Waypoint = window.Waypoint; 11487 var oldWindowLoad = window.onload; 11488 11489 /* http://imakewebthings.com/waypoints/api/context */ 11490 function Context(element) { 11491 this.element = element; 11492 this.Adapter = Waypoint.Adapter; 11493 this.adapter = new this.Adapter(element); 11494 this.key = 'waypoint-context-' + keyCounter; 11495 this.didScroll = false; 11496 this.didResize = false; 11497 this.oldScroll = { 11498 x: this.adapter.scrollLeft(), 11499 y: this.adapter.scrollTop() 11500 }; 11501 this.waypoints = { 11502 vertical: {}, 11503 horizontal: {} 11504 }; 11505 11506 element.waypointContextKey = this.key; 11507 contexts[element.waypointContextKey] = this; 11508 keyCounter += 1; 11509 if (!Waypoint.windowContext) { 11510 Waypoint.windowContext = true; 11511 Waypoint.windowContext = new Context(window); 11512 } 11513 11514 this.createThrottledScrollHandler(); 11515 this.createThrottledResizeHandler(); 11516 } 11517 11518 /* Private */ 11519 Context.prototype.add = function (waypoint) { 11520 var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'; 11521 this.waypoints[axis][waypoint.key] = waypoint; 11522 this.refresh(); 11523 }; 11524 11525 /* Private */ 11526 Context.prototype.checkEmpty = function () { 11527 var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal); 11528 var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical); 11529 var isWindow = this.element == this.element.window; 11530 if (horizontalEmpty && verticalEmpty && !isWindow) { 11531 this.adapter.off('.waypoints'); 11532 delete contexts[this.key]; 11533 } 11534 }; 11535 11536 /* Private */ 11537 Context.prototype.createThrottledResizeHandler = function () { 11538 var self = this; 11539 11540 function resizeHandler() { 11541 self.handleResize(); 11542 self.didResize = false; 11543 } 11544 11545 this.adapter.on('resize.waypoints', function () { 11546 if (!self.didResize) { 11547 self.didResize = true; 11548 Waypoint.requestAnimationFrame(resizeHandler); 11549 } 11550 }); 11551 }; 11552 11553 /* Private */ 11554 Context.prototype.createThrottledScrollHandler = function () { 11555 var self = this; 11556 function scrollHandler() { 11557 self.handleScroll(); 11558 self.didScroll = false; 11559 } 11560 11561 this.adapter.on('scroll.waypoints', function () { 11562 if (!self.didScroll || Waypoint.isTouch) { 11563 self.didScroll = true; 11564 Waypoint.requestAnimationFrame(scrollHandler); 11565 } 11566 }); 11567 }; 11568 11569 /* Private */ 11570 Context.prototype.handleResize = function () { 11571 Waypoint.Context.refreshAll(); 11572 }; 11573 11574 /* Private */ 11575 Context.prototype.handleScroll = function () { 11576 var triggeredGroups = {}; 11577 var axes = { 11578 horizontal: { 11579 newScroll: this.adapter.scrollLeft(), 11580 oldScroll: this.oldScroll.x, 11581 forward: 'right', 11582 backward: 'left' 11583 }, 11584 vertical: { 11585 newScroll: this.adapter.scrollTop(), 11586 oldScroll: this.oldScroll.y, 11587 forward: 'down', 11588 backward: 'up' 11589 } 11590 }; 11591 11592 for (var axisKey in axes) { 11593 var axis = axes[axisKey]; 11594 var isForward = axis.newScroll > axis.oldScroll; 11595 var direction = isForward ? axis.forward : axis.backward; 11596
11597 for (var waypointKey in this.waypoints[axisKey]) { 11598 var waypoint = this.waypoints[axisKey][waypointKey]; 11599 if (waypoint.triggerPoint === null) { 11600 continue; 11601 } 11602 var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint; 11603 var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint; 11604 var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint; 11605 var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint; 11606 if (crossedForward || crossedBackward) { 11607 waypoint.queueTrigger(direction); 11608 triggeredGroups[waypoint.group.id] = waypoint.group; 11609 } 11610 } 11611 } 11612 11613 for (var groupKey in triggeredGroups) { 11614 triggeredGroups[groupKey].flushTriggers(); 11615 } 11616 11617 this.oldScroll = { 11618 x: axes.horizontal.newScroll, 11619 y: axes.vertical.newScroll 11620 }; 11621 }; 11622 11623 /* Private */ 11624 Context.prototype.innerHeight = function () { 11625 /*eslint-disable eqeqeq */ 11626 if (this.element == this.element.window) { 11627 return Waypoint.viewportHeight(); 11628 } 11629 /*eslint-enable eqeqeq */ 11630 return this.adapter.innerHeight(); 11631 }; 11632 11633 /* Private */ 11634 Context.prototype.remove = function (waypoint) { 11635 delete this.waypoints[waypoint.axis][waypoint.key]; 11636 this.checkEmpty(); 11637 }; 11638 11639 /* Private */ 11640 Context.prototype.innerWidth = function () { 11641 /*eslint-disable eqeqeq */ 11642 if (this.element == this.element.window) { 11643 return Waypoint.viewportWidth(); 11644 } 11645 /*eslint-enable eqeqeq */ 11646 return this.adapter.innerWidth(); 11647 }; 11648 11649 /* Public */ 11650 /* http://imakewebthings.com/waypoints/api/context-destroy */ 11651 Context.prototype.destroy = function () { 11652 var allWaypoints = []; 11653 for (var axis in this.waypoints) {
11654 for (var waypointKey in this.waypoints[axis]) { 11655 allWaypoints.push(this.waypoints[axis][waypointKey]); 11656 } 11657 } 11658 for (var i = 0, end = allWaypoints.length; i < end; i++) { 11659 allWaypoints[i].destroy(); 11660 } 11661 }; 11662 11663 /* Public */ 11664 /* http://imakewebthings.com/waypoints/api/context-refresh */ 11665 Context.prototype.refresh = function () { 11666 /*eslint-disable eqeqeq */ 11667 var isWindow = this.element == this.element.window; 11668 /*eslint-enable eqeqeq */ 11669 var contextOffset = isWindow ? undefined : this.adapter.offset(); 11670 var triggeredGroups = {}; 11671 var axes; 11672 11673 this.handleScroll(); 11674 axes = { 11675 horizontal: { 11676 contextOffset: isWindow ? 0 : contextOffset.left, 11677 contextScroll: isWindow ? 0 : this.oldScroll.x, 11678 contextDimension: this.innerWidth(), 11679 oldScroll: this.oldScroll.x, 11680 forward: 'right', 11681 backward: 'left', 11682 offsetProp: 'left' 11683 }, 11684 vertical: { 11685 contextOffset: isWindow ? 0 : contextOffset.top, 11686 contextScroll: isWindow ? 0 : this.oldScroll.y, 11687 contextDimension: this.innerHeight(), 11688 oldScroll: this.oldScroll.y, 11689 forward: 'down', 11690 backward: 'up', 11691 offsetProp: 'top' 11692 } 11693 }; 11694 11695 for (var axisKey in axes) { 11696 var axis = axes[axisKey];
11697 for (var waypointKey in this.waypoints[axisKey]) { 11698 var waypoint = this.waypoints[axisKey][waypointKey]; 11699 var adjustment = waypoint.options.offset; 11700 var oldTriggerPoint = waypoint.triggerPoint; 11701 var elementOffset = 0; 11702 var freshWaypoint = oldTriggerPoint == null; 11703 var contextModifier, wasBeforeScroll, nowAfterScroll; 11704 var triggeredBackward, triggeredForward; 11705 11706 if (waypoint.element !== waypoint.element.window) { 11707 elementOffset = waypoint.adapter.offset()[axis.offsetProp]; 11708 } 11709 11710 if (typeof adjustment === 'function') { 11711 adjustment = adjustment.apply(waypoint); 11712 } else if (typeof adjustment === 'string') { 11713 adjustment = parseFloat(adjustment); 11714 if (waypoint.options.offset.indexOf('%') > -1) { 11715 adjustment = Math.ceil(axis.contextDimension * adjustment / 100); 11716 } 11717 } 11718 11719 contextModifier = axis.contextScroll - axis.contextOffset; 11720 waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment); 11721 wasBeforeScroll = oldTriggerPoint < axis.oldScroll; 11722 nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll; 11723 triggeredBackward = wasBeforeScroll && nowAfterScroll; 11724 triggeredForward = !wasBeforeScroll && !nowAfterScroll; 11725 11726 if (!freshWaypoint && triggeredBackward) { 11727 waypoint.queueTrigger(axis.backward); 11728 triggeredGroups[waypoint.group.id] = waypoint.group; 11729 } else if (!freshWaypoint && triggeredForward) { 11730 waypoint.queueTrigger(axis.forward); 11731 triggeredGroups[waypoint.group.id] = waypoint.group; 11732 } else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) { 11733 waypoint.queueTrigger(axis.forward); 11734 triggeredGroups[waypoint.group.id] = waypoint.group; 11735 } 11736 } 11737 } 11738 11739 Waypoint.requestAnimationFrame(function () { 11740 for (var groupKey in triggeredGroups) { 11741 triggeredGroups[groupKey].flushTriggers(); 11742 } 11743 }); 11744 11745 return this; 11746 }; 11747 11748 /* Private */ 11749 Context.findOrCreateByElement = function (element) { 11750 return Context.findByElement(element) || new Context(element); 11751 }; 11752 11753 /* Private */ 11754 Context.refreshAll = function () { 11755 for (var contextId in contexts) { 11756 contexts[contextId].refresh(); 11757 } 11758 }; 11759 11760 /* Public */ 11761 /* http://imakewebthings.com/waypoints/api/context-find-by-element */ 11762 Context.findByElement = function (element) { 11763 return contexts[element.waypointContextKey]; 11764 }; 11765 11766 window.onload = function () { 11767 if (oldWindowLoad) { 11768 oldWindowLoad(); 11769 } 11770 Context.refreshAll(); 11771 }; 11772 11773 Waypoint.requestAnimationFrame = function (callback) { 11774 var requestFn = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || requestAnimationFrameShim; 11775 requestFn.call(window, callback); 11776 }; 11777 Waypoint.Context = Context; 11778})();(function () { 11779 'use strict'; 11780 11781 function byTriggerPoint(a, b) { 11782 return a.triggerPoint - b.triggerPoint; 11783 } 11784 11785 function byReverseTriggerPoint(a, b) { 11786 return b.triggerPoint - a.triggerPoint; 11787 } 11788 11789 var groups = { 11790 vertical: {}, 11791 horizontal: {} 11792 }; 11793 var Waypoint = window.Waypoint; 11794 11795 /* http://imakewebthings.com/waypoints/api/group */ 11796 function Group(options) { 11797 this.name = options.name; 11798 this.axis = options.axis; 11799 this.id = this.name + '-' + this.axis; 11800 this.waypoints = []; 11801 this.clearTriggerQueues(); 11802 groups[this.axis][this.name] = this; 11803 } 11804 11805 /* Private */ 11806 Group.prototype.add = function (waypoint) { 11807 this.waypoints.push(waypoint); 11808 }; 11809 11810 /* Private */ 11811 Group.prototype.clearTriggerQueues = function () { 11812 this.triggerQueues = { 11813 up: [], 11814 down: [], 11815 left: [], 11816 right: [] 11817 }; 11818 }; 11819 11820 /* Private */ 11821 Group.prototype.flushTriggers = function () { 11822 for (var direction in this.triggerQueues) { 11823 var waypoints = this.triggerQueues[direction]; 11824 var reverse = direction === 'up' || direction === 'left'; 11825 waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint); 11826 for (var i = 0, end = waypoints.length; i < end; i += 1) { 11827 var waypoint = waypoints[i]; 11828 if (waypoint.options.continuous || i === waypoints.length - 1) { 11829 waypoint.trigger([direction]); 11830 } 11831 } 11832 } 11833 this.clearTriggerQueues(); 11834 }; 11835 11836 /* Private */ 11837 Group.prototype.next = function (waypoint) { 11838 this.waypoints.sort(byTriggerPoint); 11839 var index = Waypoint.Adapter.inArray(waypoint, this.waypoints); 11840 var isLast = index === this.waypoints.length - 1; 11841 return isLast ? null : this.waypoints[index + 1]; 11842 }; 11843 11844 /* Private */ 11845 Group.prototype.previous = function (waypoint) { 11846 this.waypoints.sort(byTriggerPoint); 11847 var index = Waypoint.Adapter.inArray(waypoint, this.waypoints); 11848 return index ? this.waypoints[index - 1] : null; 11849 }; 11850 11851 /* Private */ 11852 Group.prototype.queueTrigger = function (waypoint, direction) { 11853 this.triggerQueues[direction].push(waypoint); 11854 }; 11855 11856 /* Private */ 11857 Group.prototype.remove = function (waypoint) { 11858 var index = Waypoint.Adapter.inArray(waypoint, this.waypoints); 11859 if (index > -1) { 11860 this.waypoints.splice(index, 1); 11861 } 11862 }; 11863 11864 /* Public */ 11865 /* http://imakewebthings.com/waypoints/api/first */ 11866 Group.prototype.first = function () { 11867 return this.waypoints[0]; 11868 }; 11869 11870 /* Public */ 11871 /* http://imakewebthings.com/waypoints/api/last */ 11872 Group.prototype.last = function () { 11873 return this.waypoints[this.waypoints.length - 1]; 11874 }; 11875 11876 /* Private */ 11877 Group.findOrCreate = function (options) { 11878 return groups[options.axis][options.name] || new Group(options); 11879 }; 11880 11881 Waypoint.Group = Group; 11882})();(function () { 11883 'use strict'; 11884 11885 var Waypoint = window.Waypoint; 11886 11887 function isWindow(element) { 11888 return element === element.window; 11889 } 11890 11891 function getWindow(element) { 11892 if (isWindow(element)) { 11893 return element; 11894 } 11895 return element.defaultView; 11896 } 11897 11898 function NoFrameworkAdapter(element) { 11899 this.element = element; 11900 this.handlers = {}; 11901 } 11902
11903 NoFrameworkAdapter.prototype.innerHeight = function () { 11904 var isWin = isWindow(this.element); 11905 return isWin ? this.element.innerHeight : this.element.clientHeight; 11906 }; 11907 11908 NoFrameworkAdapter.prototype.innerWidth = function () { 11909 var isWin = isWindow(this.element); 11910 return isWin ? this.element.innerWidth : this.element.clientWidth; 11911 }; 11912 11913 NoFrameworkAdapter.prototype.off = function (event, handler) { 11914 function removeListeners(element, listeners, handler) { 11915 for (var i = 0, end = listeners.length - 1; i < end; i++) { 11916 var listener = listeners[i]; 11917 if (!handler || handler === listener) { 11918 element.removeEventListener(listener); 11919 } 11920 } 11921 } 11922 11923 var eventParts = event.split('.'); 11924 var eventType = eventParts[0]; 11925 var namespace = eventParts[1]; 11926 var element = this.element; 11927 11928 if (namespace && this.handlers[namespace] && eventType) { 11929 removeListeners(element, this.handlers[namespace][eventType], handler); 11930 this.handlers[namespace][eventType] = []; 11931 } else if (eventType) { 11932 for (var ns in this.handlers) { 11933 removeListeners(element, this.handlers[ns][eventType] || [], handler); 11934 this.handlers[ns][eventType] = []; 11935 } 11936 } else if (namespace && this.handlers[namespace]) { 11937 for (var type in this.handlers[namespace]) { 11938 removeListeners(element, this.handlers[namespace][type], handler); 11939 } 11940 this.handlers[namespace] = {}; 11941 } 11942 }; 11943 11944 /* Adapted from jQuery 1.x offset() */ 11945 NoFrameworkAdapter.prototype.offset = function () { 11946 if (!this.element.ownerDocument) { 11947 return null; 11948 } 11949 11950 var documentElement = this.element.ownerDocument.documentElement; 11951 var win = getWindow(this.element.ownerDocument); 11952 var rect = { 11953 top: 0, 11954 left: 0 11955 }; 11956 11957 if (this.element.getBoundingClientRect) { 11958 rect = this.element.getBoundingClientRect(); 11959 } 11960 11961 return { 11962 top: rect.top + win.pageYOffset - documentElement.clientTop, 11963 left: rect.left + win.pageXOffset - documentElement.clientLeft 11964 }; 11965 }; 11966 11967 NoFrameworkAdapter.prototype.on = function (event, handler) { 11968 var eventParts = event.split('.'); 11969 var eventType = eventParts[0]; 11970 var namespace = eventParts[1] || '__default'; 11971 var nsHandlers = this.handlers[namespace] = this.handlers[namespace] || {}; 11972 var nsTypeList = nsHandlers[eventType] = nsHandlers[eventType] || []; 11973 11974 nsTypeList.push(handler); 11975 this.element.addEventListener(eventType, handler); 11976 }; 11977 11978 NoFrameworkAdapter.prototype.outerHeight = function (includeMargin) { 11979 var height = this.innerHeight(); 11980 var computedStyle; 11981 11982 if (includeMargin && !isWindow(this.element)) { 11983 computedStyle = window.getComputedStyle(this.element); 11984 height += parseInt(computedStyle.marginTop, 10); 11985 height += parseInt(computedStyle.marginBottom, 10); 11986 } 11987 11988 return height; 11989 }; 11990 11991 NoFrameworkAdapter.prototype.outerWidth = function (includeMargin) { 11992 var width = this.innerWidth(); 11993 var computedStyle; 11994 11995 if (includeMargin && !isWindow(this.element)) { 11996 computedStyle = window.getComputedStyle(this.element); 11997 width += parseInt(computedStyle.marginLeft, 10); 11998 width += parseInt(computedStyle.marginRight, 10); 11999 } 12000 12001 return width; 12002 }; 12003 12004 NoFrameworkAdapter.prototype.scrollLeft = function () { 12005 var win = getWindow(this.element); 12006 return win ? win.pageXOffset : this.element.scrollLeft; 12007 }; 12008 12009 NoFrameworkAdapter.prototype.scrollTop = function () { 12010 var win = getWindow(this.element); 12011 return win ? win.pageYOffset : this.element.scrollTop; 12012 }; 12013 12014 NoFrameworkAdapter.extend = function () { 12015 var args = Array.prototype.slice.call(arguments); 12016 12017 function merge(target, obj) { 12018 if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') { 12019 for (var key in obj) { 12020 if (obj.hasOwnProperty(key)) { 12021 target[key] = obj[key]; 12022 } 12023 } 12024 } 12025 12026 return target; 12027 } 12028 12029 for (var i = 1, end = args.length; i < end; i++) { 12030 merge(args[0], args[i]); 12031 } 12032 return args[0]; 12033 }; 12034 12035 NoFrameworkAdapter.inArray = function (element, array, i) { 12036 return array == null ? -1 : array.indexOf(element, i); 12037 }; 12038 12039 NoFrameworkAdapter.isEmptyObject = function (obj) { 12040 /* eslint no-unused-vars: 0 */ 12041 for (var name in obj) { 12042 return false;
12043 } 12044 return true; 12045 }; 12046 12047 Waypoint.adapters.push({ 12048 name: 'noframework', 12049 Adapter: NoFrameworkAdapter 12050 }); 12051 Waypoint.Adapter = NoFrameworkAdapter; 12052})(); 12053 12054/***/ }), 12055/* 39 */ 12056/***/ (function(module, exports) { 12057 12058// removed by extract-text-webpack-plugin 12059 12060/***/ }) 12061],[9]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.