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
133 KiB

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