chimee-helper-utils
Advanced tools
Comparing version 0.1.1 to 0.1.2
/** | ||
* chimee-helper-utils v0.1.1 | ||
* chimee-helper-utils v0.1.2 | ||
* (c) 2017 toxic-johann | ||
@@ -446,3 +446,3 @@ * Released under MIT | ||
try { | ||
return window.localStorage && localStorage.getItem(key); | ||
return window.localStorage.getItem(key); | ||
} catch (e) { | ||
@@ -465,3 +465,3 @@ try { | ||
try { | ||
window.localStorage && localStorage.setItem(key, val); | ||
window.localStorage.setItem(key, val); | ||
} catch (e) { | ||
@@ -472,4 +472,3 @@ var expires = new Date(); | ||
try { | ||
// $FlowFixMe: Fix later | ||
document.cookie = key + '=' + escape(val) + ';expires=' + expires.toGMTString() + ';path=/;'; | ||
document.cookie = key + '=' + escape(val) + ';expires=' + expires.toUTCString() + ';path=/;'; | ||
} catch (e) {} | ||
@@ -476,0 +475,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.chimeeHelperUtils=t.chimeeHelperUtils||{})}(this,function(t){"use strict";function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){return void 0===t||null===t}function r(t){return Array.isArray(t)}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function u(t){return"string"==typeof t||t instanceof String}function f(t){return"boolean"==typeof t}function a(t){return n(t)||f(t)||u(t)||i(t)}function c(t,e,n){if(a(t))throw TypeError("setFrozenAttr obj parameter can not be primitive type");if(!u(e))throw TypeError("setFrozenAttr key parameter must be String");Object.defineProperty(t,e,{value:n,configurable:!1,enumerable:!1,writable:!1})}function l(t,e,n){var r=t;if(e+n<r.length){for(;n--;)if(128!=(192&r[++e]))return!1;return!0}return!1}function s(t,e){var n=e,r=(t=""+(t||"")).length;return(((e=(e||r)-r)>0?t.repeat?"0".repeat(e):new Array(e+1).join("0"):"")+t).slice(0,n)}var p=Math.ceil,y=Math.floor,h=function(t){return isNaN(t=+t)?0:(t>0?y:p)(t)},d=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},m=e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),v=e(function(t){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)}),g=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},b=function(t,e,n){if(g(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},S=function(t){if(!w(t))throw TypeError(t+" is not an object!");return t},O=function(t){try{return!!t()}catch(t){return!0}},_=!O(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),j=m.document,A=w(j)&&w(j.createElement),F=function(t){return A?j.createElement(t):{}},E=!_&&!O(function(){return 7!=Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a}),M=function(t,e){if(!w(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!w(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},P=Object.defineProperty,T={f:_?Object.defineProperty:function(t,e,n){if(S(t),e=M(e,!0),S(n),E)try{return P(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},C=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=_?function(t,e,n){return T.f(t,e,C(1,n))}:function(t,e,n){return t[e]=n,t},x=function(t,e,n){var r,o,i,u=t&x.F,f=t&x.G,a=t&x.S,c=t&x.P,l=t&x.B,s=t&x.W,p=f?v:v[e]||(v[e]={}),y=p.prototype,h=f?m:a?m[e]:(m[e]||{}).prototype;f&&(n=e);for(r in n)(o=!u&&h&&void 0!==h[r])&&r in p||(i=o?h[r]:n[r],p[r]=f&&"function"!=typeof h[r]?n[r]:l&&o?b(i,m):s&&h[r]==i?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(i):c&&"function"==typeof i?b(Function.call,i):i,c&&((p.virtual||(p.virtual={}))[r]=i,t&x.R&&y&&!y[r]&&k(y,r,i)))};x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128;var N=x,R=k,I={}.hasOwnProperty,D=function(t,e){return I.call(t,e)},q={},z={}.toString,L=function(t){return z.call(t).slice(8,-1)},G=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==L(t)?t.split(""):Object(t)},W=function(t){return G(d(t))},J=Math.min,U=function(t){return t>0?J(h(t),9007199254740991):0},B=Math.max,H=Math.min,K=function(t,e){return(t=h(t))<0?B(t+e,0):H(t,e)},Q=m["__core-js_shared__"]||(m["__core-js_shared__"]={}),Y=function(t){return Q[t]||(Q[t]={})},$=0,V=Math.random(),X=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++$+V).toString(36))},Z=Y("keys"),tt=function(t){return Z[t]||(Z[t]=X(t))},et=function(t){return function(e,n,r){var o,i=W(e),u=U(i.length),f=K(r,u);if(t&&n!=n){for(;u>f;)if((o=i[f++])!=o)return!0}else for(;u>f;f++)if((t||f in i)&&i[f]===n)return t||f||0;return!t&&-1}}(!1),nt=tt("IE_PROTO"),rt=function(t,e){var n,r=W(t),o=0,i=[];for(n in r)n!=nt&&D(r,n)&&i.push(n);for(;e.length>o;)D(r,n=e[o++])&&(~et(i,n)||i.push(n));return i},ot="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),it=Object.keys||function(t){return rt(t,ot)},ut=_?Object.defineProperties:function(t,e){S(t);for(var n,r=it(e),o=r.length,i=0;o>i;)T.f(t,n=r[i++],e[n]);return t},ft=m.document&&document.documentElement,at=tt("IE_PROTO"),ct=function(){},lt=function(){var t,e=F("iframe"),n=ot.length;for(e.style.display="none",ft.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),lt=t.F;n--;)delete lt.prototype[ot[n]];return lt()},st=Object.create||function(t,e){var n;return null!==t?(ct.prototype=S(t),n=new ct,ct.prototype=null,n[at]=t):n=lt(),void 0===e?n:ut(n,e)},pt=e(function(t){var e=Y("wks"),n=m.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:X)("Symbol."+t))}).store=e}),yt=T.f,ht=pt("toStringTag"),dt=function(t,e,n){t&&!D(t=n?t:t.prototype,ht)&&yt(t,ht,{configurable:!0,value:e})},mt={};k(mt,pt("iterator"),function(){return this});var vt=function(t,e,n){t.prototype=st(mt,{next:C(1,n)}),dt(t,e+" Iterator")},gt=function(t){return Object(d(t))},bt=tt("IE_PROTO"),wt=Object.prototype,St=Object.getPrototypeOf||function(t){return t=gt(t),D(t,bt)?t[bt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?wt:null},Ot=pt("iterator"),_t=!([].keys&&"next"in[].keys()),jt=function(){return this},At=function(t,e,n,r,o,i,u){vt(n,e,r);var f,a,c,l=function(t){if(!_t&&t in h)return h[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},s=e+" Iterator",p="values"==o,y=!1,h=t.prototype,d=h[Ot]||h["@@iterator"]||o&&h[o],m=d||l(o),v=o?p?l("entries"):m:void 0,g="Array"==e?h.entries||d:d;if(g&&(c=St(g.call(new t)))!==Object.prototype&&dt(c,s,!0),p&&d&&"values"!==d.name&&(y=!0,m=function(){return d.call(this)}),u&&(_t||y||!h[Ot])&&k(h,Ot,m),q[e]=m,q[s]=jt,o)if(f={values:p?m:l("values"),keys:i?m:l("keys"),entries:v},u)for(a in f)a in h||R(h,a,f[a]);else N(N.P+N.F*(_t||y),e,f);return f},Ft=function(t){return function(e,n){var r,o,i=String(d(e)),u=h(n),f=i.length;return u<0||u>=f?t?"":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===f||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}}(!0);At(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ft(e,n),this._i+=t.length,{value:t,done:!1})});var Et=function(){},Mt=function(t,e){return{value:e,done:!!t}};At(Array,"Array",function(t,e){this._t=W(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Mt(1)):"keys"==e?Mt(0,n):"values"==e?Mt(0,t[n]):Mt(0,[n,t[n]])},"values");q.Arguments=q.Array,Et(),Et(),Et();for(var Pt=pt("toStringTag"),Tt=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],Ct=0;Ct<5;Ct++){var kt=Tt[Ct],xt=m[kt],Nt=xt&&xt.prototype;Nt&&!Nt[Pt]&&k(Nt,Pt,kt),q[kt]=q.Array}var Rt={f:pt},It=Rt.f("iterator"),Dt=e(function(t){t.exports={default:It,__esModule:!0}}),qt=e(function(t){var e=X("meta"),n=T.f,r=0,o=Object.isExtensible||function(){return!0},i=!O(function(){return o(Object.preventExtensions({}))}),u=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},f=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!w(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!D(t,e)){if(!o(t))return"F";if(!n)return"E";u(t)}return t[e].i},getWeak:function(t,n){if(!D(t,e)){if(!o(t))return!0;if(!n)return!1;u(t)}return t[e].w},onFreeze:function(t){return i&&f.NEED&&o(t)&&!D(t,e)&&u(t),t}}}),zt=T.f,Lt=function(t){var e=v.Symbol||(v.Symbol={});"_"==t.charAt(0)||t in e||zt(e,t,{value:Rt.f(t)})},Gt=function(t,e){for(var n,r=W(t),o=it(r),i=o.length,u=0;i>u;)if(r[n=o[u++]]===e)return n},Wt={f:Object.getOwnPropertySymbols},Jt={f:{}.propertyIsEnumerable},Ut=function(t){var e=it(t),n=Wt.f;if(n)for(var r,o=n(t),i=Jt.f,u=0;o.length>u;)i.call(t,r=o[u++])&&e.push(r);return e},Bt=Array.isArray||function(t){return"Array"==L(t)},Ht=ot.concat("length","prototype"),Kt={f:Object.getOwnPropertyNames||function(t){return rt(t,Ht)}},Qt=Kt.f,Yt={}.toString,$t="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Vt=function(t){try{return Qt(t)}catch(t){return $t.slice()}},Xt={f:function(t){return $t&&"[object Window]"==Yt.call(t)?Vt(t):Qt(W(t))}},Zt=Object.getOwnPropertyDescriptor,te={f:_?Zt:function(t,e){if(t=W(t),e=M(e,!0),E)try{return Zt(t,e)}catch(t){}if(D(t,e))return C(!Jt.f.call(t,e),t[e])}},ee=qt.KEY,ne=te.f,re=T.f,oe=Xt.f,ie=m.Symbol,ue=m.JSON,fe=ue&&ue.stringify,ae=pt("_hidden"),ce=pt("toPrimitive"),le={}.propertyIsEnumerable,se=Y("symbol-registry"),pe=Y("symbols"),ye=Y("op-symbols"),he=Object.prototype,de="function"==typeof ie,me=m.QObject,ve=!me||!me.prototype||!me.prototype.findChild,ge=_&&O(function(){return 7!=st(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=ne(he,e);r&&delete he[e],re(t,e,n),r&&t!==he&&re(he,e,r)}:re,be=function(t){var e=pe[t]=st(ie.prototype);return e._k=t,e},we=de&&"symbol"==typeof ie.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof ie},Se=function(t,e,n){return t===he&&Se(ye,e,n),S(t),e=M(e,!0),S(n),D(pe,e)?(n.enumerable?(D(t,ae)&&t[ae][e]&&(t[ae][e]=!1),n=st(n,{enumerable:C(0,!1)})):(D(t,ae)||re(t,ae,C(1,{})),t[ae][e]=!0),ge(t,e,n)):re(t,e,n)},Oe=function(t,e){S(t);for(var n,r=Ut(e=W(e)),o=0,i=r.length;i>o;)Se(t,n=r[o++],e[n]);return t},_e=function(t){var e=le.call(this,t=M(t,!0));return!(this===he&&D(pe,t)&&!D(ye,t))&&(!(e||!D(this,t)||!D(pe,t)||D(this,ae)&&this[ae][t])||e)},je=function(t,e){if(t=W(t),e=M(e,!0),t!==he||!D(pe,e)||D(ye,e)){var n=ne(t,e);return!n||!D(pe,e)||D(t,ae)&&t[ae][e]||(n.enumerable=!0),n}},Ae=function(t){for(var e,n=oe(W(t)),r=[],o=0;n.length>o;)D(pe,e=n[o++])||e==ae||e==ee||r.push(e);return r},Fe=function(t){for(var e,n=t===he,r=oe(n?ye:W(t)),o=[],i=0;r.length>i;)!D(pe,e=r[i++])||n&&!D(he,e)||o.push(pe[e]);return o};de||(R((ie=function(){if(this instanceof ie)throw TypeError("Symbol is not a constructor!");var t=X(arguments.length>0?arguments[0]:void 0),e=function(n){this===he&&e.call(ye,n),D(this,ae)&&D(this[ae],t)&&(this[ae][t]=!1),ge(this,t,C(1,n))};return _&&ve&&ge(he,t,{configurable:!0,set:e}),be(t)}).prototype,"toString",function(){return this._k}),te.f=je,T.f=Se,Kt.f=Xt.f=Ae,Jt.f=_e,Wt.f=Fe,Rt.f=function(t){return be(pt(t))}),N(N.G+N.W+N.F*!de,{Symbol:ie});for(var Ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Me=0;Ee.length>Me;)pt(Ee[Me++]);for(var Ee=it(pt.store),Me=0;Ee.length>Me;)Lt(Ee[Me++]);N(N.S+N.F*!de,"Symbol",{for:function(t){return D(se,t+="")?se[t]:se[t]=ie(t)},keyFor:function(t){if(we(t))return Gt(se,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){ve=!0},useSimple:function(){ve=!1}}),N(N.S+N.F*!de,"Object",{create:function(t,e){return void 0===e?st(t):Oe(st(t),e)},defineProperty:Se,defineProperties:Oe,getOwnPropertyDescriptor:je,getOwnPropertyNames:Ae,getOwnPropertySymbols:Fe}),ue&&N(N.S+N.F*(!de||O(function(){var t=ie();return"[null]"!=fe([t])||"{}"!=fe({a:t})||"{}"!=fe(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!we(t)){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return"function"==typeof(e=r[1])&&(n=e),!n&&Bt(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!we(e))return e}),r[1]=e,fe.apply(ue,r)}}}),ie.prototype[ce]||k(ie.prototype,ce,ie.prototype.valueOf),dt(ie,"Symbol"),dt(Math,"Math",!0),dt(m.JSON,"JSON",!0),Lt("asyncIterator"),Lt("observable");var Pe=v.Symbol,Te=e(function(t){t.exports={default:Pe,__esModule:!0}});e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(Dt),o=n(Te),i="function"==typeof o.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};e.default="function"==typeof o.default&&"symbol"===i(r.default)?function(t){return void 0===t?"undefined":i(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":i(t)}});!function(t,e){var n=(v.Object||{})[t]||Object[t],r={};r[t]=e(n),N(N.S+N.F*O(function(){n(1)}),"Object",r)}("keys",function(){return function(t){return it(gt(t))}});var Ce=v.Object.keys,ke=(e(function(t){t.exports={default:Ce,__esModule:!0}}),Math.floor);N(N.S,"Number",{isInteger:function(t){return!w(t)&&isFinite(t)&&ke(t)===t}});var xe=v.Number.isInteger,Ne=(e(function(t){t.exports={default:xe,__esModule:!0}}),"\t\n\v\f\r \u2028\u2029\ufeff"),Re="["+Ne+"]",Ie=RegExp("^"+Re+Re+"*"),De=RegExp(Re+Re+"*$"),qe=function(t,e,n){var r={},o=O(function(){return!!Ne[t]()||" "!=" "[t]()}),i=r[t]=o?e(ze):Ne[t];n&&(r[n]=i),N(N.P+N.F*o,"String",r)},ze=qe.trim=function(t,e){return t=String(d(t)),1&e&&(t=t.replace(Ie,"")),2&e&&(t=t.replace(De,"")),t},Le=qe,Ge=m.parseFloat,We=Le.trim,Je=1/Ge(Ne+"-0")!=-1/0?function(t){var e=We(String(t),3),n=Ge(e);return 0===n&&"-"==e.charAt(0)?-0:n}:Ge;N(N.S+N.F*(Number.parseFloat!=Je),"Number",{parseFloat:Je});var Ue=parseFloat,Be=(e(function(t){t.exports={default:Ue,__esModule:!0}}),function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}),He="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Ke=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return setTimeout(t,17)},Qe=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame||function(t){clearTimeout(t)};t.inBrowser=He,t.makeArray=function(t){return Array.from(t)},t.transObjectAttrIntoArray=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t,e){return+t-+e};return Object.keys(t).sort(e).reduce(function(e,n){return e.concat(t[n])},[])},t.runRejectableQueue=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new Promise(function(e,r){!function i(u){if(!(u>=t.length)){var f=o(t[u])?t[u].apply(t,Be(n)):t[u];return!1===f?r("stop"):Promise.resolve(f).then(function(){return i(u+1)}).catch(function(){return r("stop")})}e()}(0)})},t.runStoppableQueue=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function e(r){return r>=t.length||!1!==(o(t[r])?t[r].apply(t,Be(n)):t[r])&&e(++r)}(0)},t.setFrozenAttr=c,t.setAttrGetterAndSetter=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.get,i=n.set,f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"__";if(a(t))throw TypeError("setFrozenAttr obj parameter can not be primitive type");if(!u(e))throw TypeError("setAttrGetterAndSetter key parameter must be String");var c=t[e];if(!o(r)&&(Object.defineProperty(t,f+e,{value:c,configurable:!0,writable:!0,enumerable:!1}),r=function(){return this[f+e]},i&&o(i))){var l=i;i=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];this[f+e]=l.call.apply(l,[this].concat(n))}}Object.defineProperty(t,e,{get:r,set:i})},t.decodeUTF8=function(t){for(var e=[],n=t,r=0,o=t.length;r<o;)if(n[r]<128)e.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(l(n,r,1)){var i=(31&n[r])<<6|63&n[r+1];if(i>=128){e.push(String.fromCharCode(65535&i)),r+=2;continue}}}else if(n[r]<240){if(l(n,r,2)){var u=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(u>=2048&&55296!=(63488&u)){e.push(String.fromCharCode(65535&u)),r+=3;continue}}}else if(n[r]<248&&l(n,r,3)){var f=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(f>65536&&f<1114112){f-=65536,e.push(String.fromCharCode(f>>>10|55296)),e.push(String.fromCharCode(1023&f|56320)),r+=4;continue}}e.push(String.fromCharCode(65533)),++r}return e.join("")},t.debounce=function(t,e,n){var r=void 0,o=void 0,i=void 0,u=void 0,f=void 0,a=function a(){var c=new Date-u;c<e&&c>=0?r=setTimeout(a,e-c):(r=null,n||(f=t.apply(i,o),r||(i=o=null)))};return function(){i=this,o=arguments,u=new Date;var c=n&&!r;return r||(r=setTimeout(a,e)),c&&(f=t.apply(i,o),i=o=null),f}},t.throttle=function(t,e,n,r){var o=void 0,i=void 0,u=void 0,f=null,a=0;n||(n={});var c=function(){a=!1===n.leading?0:new Date-0,f=null,u=t.apply(o,i),f||(o=i=null)};return e=e||0,function(){var l=new Date;a||!1!==n.leading||(a=l);var s=e-(l-a);return o=r||this,i=arguments,s<=0||s>e?(f&&(clearTimeout(f),f=null),a=l,u=t.apply(o,i),f||(o=i=null)):f||!1===n.trailing||(f=setTimeout(c,s)),u}},t.raf=Ke,t.caf=Qe,t.strRepeat=s,t.formatTime=function(t){var e=Math.floor(t/3600);t=Math.floor(t%3600);var n=s(Math.floor(t/60),2),r=s(t=Math.floor(t%60),2);return e>=1?e+":"+n+":"+r:n+":"+r},t.addTransMethod=function(t){c(t,"trans",function(e){return t.__fns||c(t,"__fns",{}),t.__fns[e]||(t.__fns[e]=function(){if(!o(t[e]))throw TypeError("obj.trans(methodName) parameter must be Function");return t[e].apply(t,arguments)}),t.__fns[e]})},t.appendCSS=function(t){var e=document,n=e.querySelector("style");if(!n){n=e.createElement("style");var r=e.querySelector("head");r&&r.appendChild(n)}return n.appendChild(e.createTextNode(t)),n},t.formatDate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss.i",n=t.getFullYear().toString(),r={M:t.getMonth()+1,d:t.getDate(),h:t.getHours(),m:t.getMinutes(),s:t.getSeconds(),i:t.getMilliseconds()};e=e.replace(/(y+)/gi,function(t,e){return n.substr(4-Math.min(4,e.length))});for(var o in r)!function(t){e=e.replace(new RegExp("("+t+"+)","g"),function(e,n){return(r[t]<10&&n.length>1?"0":"")+r[t]})}(o);return e},t.getLocalStorage=function(t){try{return window.localStorage&&localStorage.getItem(t)}catch(n){try{var e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]*)(;|$)"));return r(e)?unescape(e[2]):""}catch(t){return""}}},t.setLocalStorage=function(t,e){try{window.localStorage&&localStorage.setItem(t,e)}catch(r){var n=new Date;n.setTime(n.getTime()+2592e7);try{document.cookie=t+"="+escape(e)+";expires="+n.toGMTString()+";path=/;"}catch(t){}}},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.chimeeHelperUtils=t.chimeeHelperUtils||{})}(this,function(t){"use strict";function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){return void 0===t||null===t}function r(t){return Array.isArray(t)}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function u(t){return"string"==typeof t||t instanceof String}function f(t){return"boolean"==typeof t}function a(t){return n(t)||f(t)||u(t)||i(t)}function c(t,e,n){if(a(t))throw TypeError("setFrozenAttr obj parameter can not be primitive type");if(!u(e))throw TypeError("setFrozenAttr key parameter must be String");Object.defineProperty(t,e,{value:n,configurable:!1,enumerable:!1,writable:!1})}function l(t,e,n){var r=t;if(e+n<r.length){for(;n--;)if(128!=(192&r[++e]))return!1;return!0}return!1}function s(t,e){var n=e,r=(t=""+(t||"")).length;return(((e=(e||r)-r)>0?t.repeat?"0".repeat(e):new Array(e+1).join("0"):"")+t).slice(0,n)}var p=Math.ceil,y=Math.floor,h=function(t){return isNaN(t=+t)?0:(t>0?y:p)(t)},d=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},m=e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),v=e(function(t){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)}),g=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},b=function(t,e,n){if(g(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},S=function(t){if(!w(t))throw TypeError(t+" is not an object!");return t},O=function(t){try{return!!t()}catch(t){return!0}},_=!O(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),j=m.document,A=w(j)&&w(j.createElement),F=function(t){return A?j.createElement(t):{}},E=!_&&!O(function(){return 7!=Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a}),M=function(t,e){if(!w(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!w(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},P=Object.defineProperty,T={f:_?Object.defineProperty:function(t,e,n){if(S(t),e=M(e,!0),S(n),E)try{return P(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},C=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=_?function(t,e,n){return T.f(t,e,C(1,n))}:function(t,e,n){return t[e]=n,t},x=function(t,e,n){var r,o,i,u=t&x.F,f=t&x.G,a=t&x.S,c=t&x.P,l=t&x.B,s=t&x.W,p=f?v:v[e]||(v[e]={}),y=p.prototype,h=f?m:a?m[e]:(m[e]||{}).prototype;f&&(n=e);for(r in n)(o=!u&&h&&void 0!==h[r])&&r in p||(i=o?h[r]:n[r],p[r]=f&&"function"!=typeof h[r]?n[r]:l&&o?b(i,m):s&&h[r]==i?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(i):c&&"function"==typeof i?b(Function.call,i):i,c&&((p.virtual||(p.virtual={}))[r]=i,t&x.R&&y&&!y[r]&&k(y,r,i)))};x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128;var N=x,R=k,I={}.hasOwnProperty,D=function(t,e){return I.call(t,e)},q={},z={}.toString,L=function(t){return z.call(t).slice(8,-1)},W=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==L(t)?t.split(""):Object(t)},G=function(t){return W(d(t))},U=Math.min,J=function(t){return t>0?U(h(t),9007199254740991):0},B=Math.max,H=Math.min,K=function(t,e){return(t=h(t))<0?B(t+e,0):H(t,e)},Q=m["__core-js_shared__"]||(m["__core-js_shared__"]={}),Y=function(t){return Q[t]||(Q[t]={})},$=0,V=Math.random(),X=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++$+V).toString(36))},Z=Y("keys"),tt=function(t){return Z[t]||(Z[t]=X(t))},et=function(t){return function(e,n,r){var o,i=G(e),u=J(i.length),f=K(r,u);if(t&&n!=n){for(;u>f;)if((o=i[f++])!=o)return!0}else for(;u>f;f++)if((t||f in i)&&i[f]===n)return t||f||0;return!t&&-1}}(!1),nt=tt("IE_PROTO"),rt=function(t,e){var n,r=G(t),o=0,i=[];for(n in r)n!=nt&&D(r,n)&&i.push(n);for(;e.length>o;)D(r,n=e[o++])&&(~et(i,n)||i.push(n));return i},ot="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),it=Object.keys||function(t){return rt(t,ot)},ut=_?Object.defineProperties:function(t,e){S(t);for(var n,r=it(e),o=r.length,i=0;o>i;)T.f(t,n=r[i++],e[n]);return t},ft=m.document&&document.documentElement,at=tt("IE_PROTO"),ct=function(){},lt=function(){var t,e=F("iframe"),n=ot.length;for(e.style.display="none",ft.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),lt=t.F;n--;)delete lt.prototype[ot[n]];return lt()},st=Object.create||function(t,e){var n;return null!==t?(ct.prototype=S(t),n=new ct,ct.prototype=null,n[at]=t):n=lt(),void 0===e?n:ut(n,e)},pt=e(function(t){var e=Y("wks"),n=m.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:X)("Symbol."+t))}).store=e}),yt=T.f,ht=pt("toStringTag"),dt=function(t,e,n){t&&!D(t=n?t:t.prototype,ht)&&yt(t,ht,{configurable:!0,value:e})},mt={};k(mt,pt("iterator"),function(){return this});var vt=function(t,e,n){t.prototype=st(mt,{next:C(1,n)}),dt(t,e+" Iterator")},gt=function(t){return Object(d(t))},bt=tt("IE_PROTO"),wt=Object.prototype,St=Object.getPrototypeOf||function(t){return t=gt(t),D(t,bt)?t[bt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?wt:null},Ot=pt("iterator"),_t=!([].keys&&"next"in[].keys()),jt=function(){return this},At=function(t,e,n,r,o,i,u){vt(n,e,r);var f,a,c,l=function(t){if(!_t&&t in h)return h[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},s=e+" Iterator",p="values"==o,y=!1,h=t.prototype,d=h[Ot]||h["@@iterator"]||o&&h[o],m=d||l(o),v=o?p?l("entries"):m:void 0,g="Array"==e?h.entries||d:d;if(g&&(c=St(g.call(new t)))!==Object.prototype&&dt(c,s,!0),p&&d&&"values"!==d.name&&(y=!0,m=function(){return d.call(this)}),u&&(_t||y||!h[Ot])&&k(h,Ot,m),q[e]=m,q[s]=jt,o)if(f={values:p?m:l("values"),keys:i?m:l("keys"),entries:v},u)for(a in f)a in h||R(h,a,f[a]);else N(N.P+N.F*(_t||y),e,f);return f},Ft=function(t){return function(e,n){var r,o,i=String(d(e)),u=h(n),f=i.length;return u<0||u>=f?t?"":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===f||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}}(!0);At(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ft(e,n),this._i+=t.length,{value:t,done:!1})});var Et=function(){},Mt=function(t,e){return{value:e,done:!!t}};At(Array,"Array",function(t,e){this._t=G(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Mt(1)):"keys"==e?Mt(0,n):"values"==e?Mt(0,t[n]):Mt(0,[n,t[n]])},"values");q.Arguments=q.Array,Et(),Et(),Et();for(var Pt=pt("toStringTag"),Tt=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],Ct=0;Ct<5;Ct++){var kt=Tt[Ct],xt=m[kt],Nt=xt&&xt.prototype;Nt&&!Nt[Pt]&&k(Nt,Pt,kt),q[kt]=q.Array}var Rt={f:pt},It=Rt.f("iterator"),Dt=e(function(t){t.exports={default:It,__esModule:!0}}),qt=e(function(t){var e=X("meta"),n=T.f,r=0,o=Object.isExtensible||function(){return!0},i=!O(function(){return o(Object.preventExtensions({}))}),u=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},f=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!w(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!D(t,e)){if(!o(t))return"F";if(!n)return"E";u(t)}return t[e].i},getWeak:function(t,n){if(!D(t,e)){if(!o(t))return!0;if(!n)return!1;u(t)}return t[e].w},onFreeze:function(t){return i&&f.NEED&&o(t)&&!D(t,e)&&u(t),t}}}),zt=T.f,Lt=function(t){var e=v.Symbol||(v.Symbol={});"_"==t.charAt(0)||t in e||zt(e,t,{value:Rt.f(t)})},Wt=function(t,e){for(var n,r=G(t),o=it(r),i=o.length,u=0;i>u;)if(r[n=o[u++]]===e)return n},Gt={f:Object.getOwnPropertySymbols},Ut={f:{}.propertyIsEnumerable},Jt=function(t){var e=it(t),n=Gt.f;if(n)for(var r,o=n(t),i=Ut.f,u=0;o.length>u;)i.call(t,r=o[u++])&&e.push(r);return e},Bt=Array.isArray||function(t){return"Array"==L(t)},Ht=ot.concat("length","prototype"),Kt={f:Object.getOwnPropertyNames||function(t){return rt(t,Ht)}},Qt=Kt.f,Yt={}.toString,$t="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Vt=function(t){try{return Qt(t)}catch(t){return $t.slice()}},Xt={f:function(t){return $t&&"[object Window]"==Yt.call(t)?Vt(t):Qt(G(t))}},Zt=Object.getOwnPropertyDescriptor,te={f:_?Zt:function(t,e){if(t=G(t),e=M(e,!0),E)try{return Zt(t,e)}catch(t){}if(D(t,e))return C(!Ut.f.call(t,e),t[e])}},ee=qt.KEY,ne=te.f,re=T.f,oe=Xt.f,ie=m.Symbol,ue=m.JSON,fe=ue&&ue.stringify,ae=pt("_hidden"),ce=pt("toPrimitive"),le={}.propertyIsEnumerable,se=Y("symbol-registry"),pe=Y("symbols"),ye=Y("op-symbols"),he=Object.prototype,de="function"==typeof ie,me=m.QObject,ve=!me||!me.prototype||!me.prototype.findChild,ge=_&&O(function(){return 7!=st(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=ne(he,e);r&&delete he[e],re(t,e,n),r&&t!==he&&re(he,e,r)}:re,be=function(t){var e=pe[t]=st(ie.prototype);return e._k=t,e},we=de&&"symbol"==typeof ie.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof ie},Se=function(t,e,n){return t===he&&Se(ye,e,n),S(t),e=M(e,!0),S(n),D(pe,e)?(n.enumerable?(D(t,ae)&&t[ae][e]&&(t[ae][e]=!1),n=st(n,{enumerable:C(0,!1)})):(D(t,ae)||re(t,ae,C(1,{})),t[ae][e]=!0),ge(t,e,n)):re(t,e,n)},Oe=function(t,e){S(t);for(var n,r=Jt(e=G(e)),o=0,i=r.length;i>o;)Se(t,n=r[o++],e[n]);return t},_e=function(t){var e=le.call(this,t=M(t,!0));return!(this===he&&D(pe,t)&&!D(ye,t))&&(!(e||!D(this,t)||!D(pe,t)||D(this,ae)&&this[ae][t])||e)},je=function(t,e){if(t=G(t),e=M(e,!0),t!==he||!D(pe,e)||D(ye,e)){var n=ne(t,e);return!n||!D(pe,e)||D(t,ae)&&t[ae][e]||(n.enumerable=!0),n}},Ae=function(t){for(var e,n=oe(G(t)),r=[],o=0;n.length>o;)D(pe,e=n[o++])||e==ae||e==ee||r.push(e);return r},Fe=function(t){for(var e,n=t===he,r=oe(n?ye:G(t)),o=[],i=0;r.length>i;)!D(pe,e=r[i++])||n&&!D(he,e)||o.push(pe[e]);return o};de||(R((ie=function(){if(this instanceof ie)throw TypeError("Symbol is not a constructor!");var t=X(arguments.length>0?arguments[0]:void 0),e=function(n){this===he&&e.call(ye,n),D(this,ae)&&D(this[ae],t)&&(this[ae][t]=!1),ge(this,t,C(1,n))};return _&&ve&&ge(he,t,{configurable:!0,set:e}),be(t)}).prototype,"toString",function(){return this._k}),te.f=je,T.f=Se,Kt.f=Xt.f=Ae,Ut.f=_e,Gt.f=Fe,Rt.f=function(t){return be(pt(t))}),N(N.G+N.W+N.F*!de,{Symbol:ie});for(var Ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Me=0;Ee.length>Me;)pt(Ee[Me++]);for(var Ee=it(pt.store),Me=0;Ee.length>Me;)Lt(Ee[Me++]);N(N.S+N.F*!de,"Symbol",{for:function(t){return D(se,t+="")?se[t]:se[t]=ie(t)},keyFor:function(t){if(we(t))return Wt(se,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){ve=!0},useSimple:function(){ve=!1}}),N(N.S+N.F*!de,"Object",{create:function(t,e){return void 0===e?st(t):Oe(st(t),e)},defineProperty:Se,defineProperties:Oe,getOwnPropertyDescriptor:je,getOwnPropertyNames:Ae,getOwnPropertySymbols:Fe}),ue&&N(N.S+N.F*(!de||O(function(){var t=ie();return"[null]"!=fe([t])||"{}"!=fe({a:t})||"{}"!=fe(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!we(t)){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return"function"==typeof(e=r[1])&&(n=e),!n&&Bt(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!we(e))return e}),r[1]=e,fe.apply(ue,r)}}}),ie.prototype[ce]||k(ie.prototype,ce,ie.prototype.valueOf),dt(ie,"Symbol"),dt(Math,"Math",!0),dt(m.JSON,"JSON",!0),Lt("asyncIterator"),Lt("observable");var Pe=v.Symbol,Te=e(function(t){t.exports={default:Pe,__esModule:!0}});e(function(t,e){function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(Dt),o=n(Te),i="function"==typeof o.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};e.default="function"==typeof o.default&&"symbol"===i(r.default)?function(t){return void 0===t?"undefined":i(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":i(t)}});!function(t,e){var n=(v.Object||{})[t]||Object[t],r={};r[t]=e(n),N(N.S+N.F*O(function(){n(1)}),"Object",r)}("keys",function(){return function(t){return it(gt(t))}});var Ce=v.Object.keys,ke=(e(function(t){t.exports={default:Ce,__esModule:!0}}),Math.floor);N(N.S,"Number",{isInteger:function(t){return!w(t)&&isFinite(t)&&ke(t)===t}});var xe=v.Number.isInteger,Ne=(e(function(t){t.exports={default:xe,__esModule:!0}}),"\t\n\v\f\r \u2028\u2029\ufeff"),Re="["+Ne+"]",Ie=RegExp("^"+Re+Re+"*"),De=RegExp(Re+Re+"*$"),qe=function(t,e,n){var r={},o=O(function(){return!!Ne[t]()||" "!=" "[t]()}),i=r[t]=o?e(ze):Ne[t];n&&(r[n]=i),N(N.P+N.F*o,"String",r)},ze=qe.trim=function(t,e){return t=String(d(t)),1&e&&(t=t.replace(Ie,"")),2&e&&(t=t.replace(De,"")),t},Le=qe,We=m.parseFloat,Ge=Le.trim,Ue=1/We(Ne+"-0")!=-1/0?function(t){var e=Ge(String(t),3),n=We(e);return 0===n&&"-"==e.charAt(0)?-0:n}:We;N(N.S+N.F*(Number.parseFloat!=Ue),"Number",{parseFloat:Ue});var Je=parseFloat,Be=(e(function(t){t.exports={default:Je,__esModule:!0}}),function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}),He="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Ke=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return setTimeout(t,17)},Qe=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame||function(t){clearTimeout(t)};t.inBrowser=He,t.makeArray=function(t){return Array.from(t)},t.transObjectAttrIntoArray=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t,e){return+t-+e};return Object.keys(t).sort(e).reduce(function(e,n){return e.concat(t[n])},[])},t.runRejectableQueue=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new Promise(function(e,r){!function i(u){if(!(u>=t.length)){var f=o(t[u])?t[u].apply(t,Be(n)):t[u];return!1===f?r("stop"):Promise.resolve(f).then(function(){return i(u+1)}).catch(function(){return r("stop")})}e()}(0)})},t.runStoppableQueue=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function e(r){return r>=t.length||!1!==(o(t[r])?t[r].apply(t,Be(n)):t[r])&&e(++r)}(0)},t.setFrozenAttr=c,t.setAttrGetterAndSetter=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.get,i=n.set,f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"__";if(a(t))throw TypeError("setFrozenAttr obj parameter can not be primitive type");if(!u(e))throw TypeError("setAttrGetterAndSetter key parameter must be String");var c=t[e];if(!o(r)&&(Object.defineProperty(t,f+e,{value:c,configurable:!0,writable:!0,enumerable:!1}),r=function(){return this[f+e]},i&&o(i))){var l=i;i=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];this[f+e]=l.call.apply(l,[this].concat(n))}}Object.defineProperty(t,e,{get:r,set:i})},t.decodeUTF8=function(t){for(var e=[],n=t,r=0,o=t.length;r<o;)if(n[r]<128)e.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(l(n,r,1)){var i=(31&n[r])<<6|63&n[r+1];if(i>=128){e.push(String.fromCharCode(65535&i)),r+=2;continue}}}else if(n[r]<240){if(l(n,r,2)){var u=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(u>=2048&&55296!=(63488&u)){e.push(String.fromCharCode(65535&u)),r+=3;continue}}}else if(n[r]<248&&l(n,r,3)){var f=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(f>65536&&f<1114112){f-=65536,e.push(String.fromCharCode(f>>>10|55296)),e.push(String.fromCharCode(1023&f|56320)),r+=4;continue}}e.push(String.fromCharCode(65533)),++r}return e.join("")},t.debounce=function(t,e,n){var r=void 0,o=void 0,i=void 0,u=void 0,f=void 0,a=function a(){var c=new Date-u;c<e&&c>=0?r=setTimeout(a,e-c):(r=null,n||(f=t.apply(i,o),r||(i=o=null)))};return function(){i=this,o=arguments,u=new Date;var c=n&&!r;return r||(r=setTimeout(a,e)),c&&(f=t.apply(i,o),i=o=null),f}},t.throttle=function(t,e,n,r){var o=void 0,i=void 0,u=void 0,f=null,a=0;n||(n={});var c=function(){a=!1===n.leading?0:new Date-0,f=null,u=t.apply(o,i),f||(o=i=null)};return e=e||0,function(){var l=new Date;a||!1!==n.leading||(a=l);var s=e-(l-a);return o=r||this,i=arguments,s<=0||s>e?(f&&(clearTimeout(f),f=null),a=l,u=t.apply(o,i),f||(o=i=null)):f||!1===n.trailing||(f=setTimeout(c,s)),u}},t.raf=Ke,t.caf=Qe,t.strRepeat=s,t.formatTime=function(t){var e=Math.floor(t/3600);t=Math.floor(t%3600);var n=s(Math.floor(t/60),2),r=s(t=Math.floor(t%60),2);return e>=1?e+":"+n+":"+r:n+":"+r},t.addTransMethod=function(t){c(t,"trans",function(e){return t.__fns||c(t,"__fns",{}),t.__fns[e]||(t.__fns[e]=function(){if(!o(t[e]))throw TypeError("obj.trans(methodName) parameter must be Function");return t[e].apply(t,arguments)}),t.__fns[e]})},t.appendCSS=function(t){var e=document,n=e.querySelector("style");if(!n){n=e.createElement("style");var r=e.querySelector("head");r&&r.appendChild(n)}return n.appendChild(e.createTextNode(t)),n},t.formatDate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss.i",n=t.getFullYear().toString(),r={M:t.getMonth()+1,d:t.getDate(),h:t.getHours(),m:t.getMinutes(),s:t.getSeconds(),i:t.getMilliseconds()};e=e.replace(/(y+)/gi,function(t,e){return n.substr(4-Math.min(4,e.length))});for(var o in r)!function(t){e=e.replace(new RegExp("("+t+"+)","g"),function(e,n){return(r[t]<10&&n.length>1?"0":"")+r[t]})}(o);return e},t.getLocalStorage=function(t){try{return window.localStorage.getItem(t)}catch(n){try{var e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]*)(;|$)"));return r(e)?unescape(e[2]):""}catch(t){return""}}},t.setLocalStorage=function(t,e){try{window.localStorage.setItem(t,e)}catch(r){var n=new Date;n.setTime(n.getTime()+2592e7);try{document.cookie=t+"="+escape(e)+";expires="+n.toUTCString()+";path=/;"}catch(t){}}},Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "chimee-helper-utils", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "utils of chimee", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -401,3 +401,3 @@ // @flow | ||
try { | ||
return window.localStorage && localStorage.getItem(key); | ||
return window.localStorage.getItem(key); | ||
} catch(e) { | ||
@@ -420,3 +420,3 @@ try { | ||
try { | ||
window.localStorage && localStorage.setItem(key, val); | ||
window.localStorage.setItem(key, val); | ||
} catch(e) { | ||
@@ -427,7 +427,5 @@ const expires = new Date(); | ||
try { | ||
// $FlowFixMe: Fix later | ||
document.cookie = key + '=' + escape(val) + ';expires=' + expires.toGMTString() + ';path=/;'; | ||
document.cookie = key + '=' + escape(val) + ';expires=' + expires.toUTCString() + ';path=/;'; | ||
} catch(e) {} | ||
} | ||
} | ||
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
165642
3748
1