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