You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
43 KiB

!function(a,i){"use strict";"object"==typeof module&&module.exports?module.exports=i(require("moment")):"function"==typeof define&&define.amd?define(["moment"],i):i(a.moment)}(this,function(o){"use strict";void 0===o.version&&o.default&&(o=o.default);var i,A={},n={},t={},s={},u={};o&&"string"==typeof o.version||N("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var a=o.version.split("."),e=+a[0],r=+a[1];function m(a){return 96<a?a-87:64<a?a-29:a-48}function c(a){var i=0,e=a.split("."),r=e[0],c=e[1]||"",o=1,A=0,n=1;for(45===a.charCodeAt(0)&&(n=-(i=1));i<r.length;i++)A=60*A+m(r.charCodeAt(i));for(i=0;i<c.length;i++)o/=60,A+=m(c.charCodeAt(i))*o;return A*n}function l(a){for(var i=0;i<a.length;i++)a[i]=c(a[i])}function f(a,i){var e,r=[];for(e=0;e<i.length;e++)r[e]=a[i[e]];return r}function p(a){var i=a.split("|"),e=i[2].split(" "),r=i[3].split(""),c=i[4].split(" ");return l(e),l(r),l(c),function(a,i){for(var e=0;e<i;e++)a[e]=Math.round((a[e-1]||0)+6e4*a[e]);a[i-1]=1/0}(c,r.length),{name:i[0],abbrs:f(i[1].split(" "),r),offsets:f(e,r),untils:c,population:0|i[5]}}function b(a){a&&this._set(p(a))}function M(a,i){this.name=a,this.zones=i}function d(a){var i=a.toTimeString(),e=i.match(/\([a-z ]+\)/i);"GMT"===(e=e&&e[0]?(e=e[0].match(/[A-Z]/g))?e.join(""):void 0:(e=i.match(/[A-Z]{3,5}/g))?e[0]:void 0)&&(e=void 0),this.at=+a,this.abbr=e,this.offset=a.getTimezoneOffset()}function h(a){this.zone=a,this.offsetScore=0,this.abbrScore=0}function E(a,i){for(var e,r;r=6e4*((i.at-a.at)/12e4|0);)(e=new d(new Date(a.at+r))).offset===a.offset?a=e:i=e;return a}function g(a,i){return a.offsetScore!==i.offsetScore?a.offsetScore-i.offsetScore:a.abbrScore!==i.abbrScore?a.abbrScore-i.abbrScore:a.zone.population!==i.zone.population?i.zone.population-a.zone.population:i.zone.name.localeCompare(a.zone.name)}function P(a,i){var e,r;for(l(i),e=0;e<i.length;e++)r=i[e],u[r]=u[r]||{},u[r][a]=!0}function z(){try{var a=Intl.DateTimeFormat().resolvedOptions().timeZone;if(a&&3<a.length){var i=s[T(a)];if(i)return i;N("Moment Timezone found "+a+" from the Intl api, but did not have that data loaded.")}}catch(a){}var e,r,c,o=function(){var a,i,e,r=(new Date).getFullYear()-2,c=new d(new Date(r,0,1)),o=[c];for(e=1;e<48;e++)(i=new d(new Date(r,e,1))).offset!==c.offset&&(a=E(c,i),o.push(a),o.push(new d(new Date(a.at+6e4)))),c=i;for(e=0;e<4;e++)o.push(new d(new Date(r+e,0,1))),o.push(new d(new Date(r+e,6,1)));return o}(),A=o.length,n=function(a){var i,e,r,c=a.length,o={},A=[];for(i=0;i<c;i++)for(e in r=u[a[i].offset]||{})r.hasOwnProperty(e)&&(o[e]=!0);for(i in o)o.hasOwnProperty(i)&&A.push(s[i]);return A}(o),t=[];for(r=0;r<n.length;r++){for(e=new h(_(n[r]),A),c=0;c<A;c++)e.scoreOffsetAt(o[c]);t.push(e)}return t.sort(g),0<t.length?t[0].zone.name:void 0}function T(a){return(a||"").toLowerCase().replace(/\//g,"_")}function S(a){var i,e,r,c;for("string"==typeof a&&(a=[a]),i=0;i<a.length;i++)c=T(e=(r=a[i].split("|"))[0]),A[c]=a[i],s[c]=e,P(c,r[2].split(" "))}function _(a,i){a=T(a);var e,r=A[a];return r instanceof b?r:"string"==typeof r?(r=new b(r),A[a]=r):n[a]&&i!==_&&(e=_(n[a],_))?((r=A[a]=new b)._set(e),r.name=s[a],r):null}function k(a){var i,e,r,c;for("string"==typeof a&&(a=[a]),i=0;i<a.length;i++)r=T((e=a[i].split("|"))[0]),c=T(e[1]),n[r]=c,s[r]=e[0],n[c]=r,s[c]=e[1]}function C(a){S(a.zones),k(a.links),function(a){var i,e,r,c;if(a&&a.length)for(i=0;i<a.length;i++)e=(c=a[i].split("|"))[0].toUpperCase(),r=c[1].split(" "),t[e]=new M(e,r)}(a.countries),G.dataVersion=a.version}function B(a){var i="X"===a._f||"x"===a._f;return!(!a._a||void 0!==a._tzm||i)}function N(a){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(a)}function G(a){var i=Array.prototype.slice.call(arguments,0,-1),e=arguments[arguments.length-1],r=_(e),c=o.utc.apply(null,i);return r&&!o.isMoment(a)&&B(c)&&c.add(r.parse(c),"minutes"),c.tz(e),c}(e<2||2==e&&r<6)&&N("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+o.version+". See momentjs.com"),b.prototype={_set:function(a){this.name=a.name,this.abbrs=a.abbrs,this.u