WordPress/wp-includes/js/dist/date.min.js

12 lines
199 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.date=function(c){var M={};function o(A){if(M[A])return M[A].exports;var a=M[A]={i:A,l:!1,exports:{}};return c[A].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=c,o.c=M,o.d=function(c,M,A){o.o(c,M)||Object.defineProperty(c,M,{enumerable:!0,get:A})},o.r=function(c){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},o.t=function(c,M){if(1&M&&(c=o(c)),8&M)return c;if(4&M&&"object"==typeof c&&c&&c.__esModule)return c;var A=Object.create(null);if(o.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:c}),2&M&&"string"!=typeof c)for(var a in c)o.d(A,a,function(M){return c[M]}.bind(null,a));return A},o.n=function(c){var M=c&&c.__esModule?function(){return c.default}:function(){return c};return o.d(M,"a",M),M},o.o=function(c,M){return Object.prototype.hasOwnProperty.call(c,M)},o.p="",o(o.s="./node_modules/@wordpress/date/build-module/index.js")}({"./node_modules/@wordpress/date/build-module/index.js":function(c,M,o){"use strict";o.r(M),o.d(M,"setSettings",(function(){return p})),o.d(M,"__experimentalGetSettings",(function(){return n})),o.d(M,"format",(function(){return r})),o.d(M,"date",(function(){return L})),o.d(M,"gmdate",(function(){return O})),o.d(M,"dateI18n",(function(){return q})),o.d(M,"gmdateI18n",(function(){return N})),o.d(M,"isInTheFuture",(function(){return d})),o.d(M,"getDate",(function(){return f}));var A=o("moment"),a=o.n(A);o("./node_modules/moment-timezone/moment-timezone.js"),o("./node_modules/moment-timezone/moment-timezone-utils.js");const z=/^[+-][0-1][0-9](:?[0-9][0-9])?$/;let b={l10n:{locale:"en",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],meridiem:{am:"am",pm:"pm",AM:"AM",PM:"PM"},relative:{future:"%s from now",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}},formats:{time:"g: i a",date:"F j, Y",datetime:"F j, Y g: i a",datetimeAbbreviated:"M j, Y g: i a"},timezone:{offset:"0",string:"",abbr:""}};function p(c){b=c;const M=a.a.locale();a.a.updateLocale(c.l10n.locale,{parentLocale:M,months:c.l10n.months,monthsShort:c.l10n.monthsShort,weekdays:c.l10n.weekdays,weekdaysShort:c.l10n.weekdaysShort,meridiem:(M,o,A)=>M<12?A?c.l10n.meridiem.am:c.l10n.meridiem.AM:A?c.l10n.meridiem.pm:c.l10n.meridiem.PM,longDateFormat:{LT:c.formats.time,LTS:null,L:null,LL:c.formats.date,LLL:c.formats.datetime,LLLL:null},relativeTime:c.l10n.relative}),a.a.locale(M),i()}function n(){return b}function i(){a.a.tz.add(a.a.tz.pack({name:"WP",abbrs:["WP"],untils:[null],offsets:[60*-b.timezone.offset||0]}))}const e={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S(c){const M=c.format("D");return c.format("Do").replace(M,"")},w:"d",z:c=>(parseInt(c.format("DDD"),10)-1).toString(),W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:c=>c.daysInMonth(),L:c=>c.isLeapYear()?"1":"0",o:"GGGG",Y:"YYYY",y:"YY",a:"a",A:"A",B(c){const M=a()(c).utcOffset(60),o=parseInt(M.format("s"),10),A=parseInt(M.format("m"),10),z=parseInt(M.format("H"),10);return parseInt(((o+60*A+3600*z)/86.4).toString(),10)},g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSSSSS",v:"SSS",e:"zz",I:c=>c.isDST()?"1":"0",O:"ZZ",P:"Z",T:"z",Z(c){const M=c.format("Z"),o="-"===M[0]?-1:1,A=M.substring(1).split(":").map(c=>parseInt(c,10));return o*(60*A[0]+A[1])*60},c:"YYYY-MM-DDTHH:mm:ssZ",r:"ddd, D MMM YYYY HH:mm:ss ZZ",U:"X"};function r(c,M=new Date){let o,A;const z=[],b=a()(M);for(o=0;o<c.length;o++)if(A=c[o],"\\"!==A)if(A in e){const c=e[A];"string"!=typeof c?z.push("["+c(b)+"]"):z.push(c)}else z.push("["+A+"]");else o++,z.push("["+c[o]+"]");return b.format(z.join("[]"))}function L(c,M=new Date,o){return r(c,t(M,o))}function O(c,M=new Dat
//! version : 0.5.33
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(b,p){"use strict";c.exports?c.exports=p(o("./node_modules/moment-timezone/index.js")):(a=[o("moment")],void 0===(z="function"==typeof(A=p)?A.apply(M,a):A)||(c.exports=z))}(0,(function(c){"use strict";if(!c.tz)throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");var M="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX";function o(c,o){for(var A="",a=Math.abs(c),z=Math.floor(a),b=function(c,o){for(var A,a=".",z="";o>0;)o-=1,c*=60,A=Math.floor(c+1e-6),a+=M[A],c-=A,A&&(z+=a,a="");return z}(a-z,Math.min(~~o,10));z>0;)A=M[z%60]+A,z=Math.floor(z/60);return c<0&&(A="-"+A),A&&b?A+b:(b||"-"!==A)&&(A||b)||"0"}function A(c){var M,A=[],a=0;for(M=0;M<c.length-1;M++)A[M]=o(Math.round((c[M]-a)/1e3)/60,1),a=c[M];return A.join(" ")}function a(c){var M,A,a=0,z=[],b=[],p=[],n={};for(M=0;M<c.abbrs.length;M++)void 0===n[A=c.abbrs[M]+"|"+c.offsets[M]]&&(n[A]=a,z[a]=c.abbrs[M],b[a]=o(Math.round(60*c.offsets[M])/60,1),a++),p[M]=o(n[A],0);return z.join(" ")+"|"+b.join(" ")+"|"+p.join("")}function z(c){if(!c)return"";if(c<1e3)return c;var M=String(0|c).length-2;return Math.round(c/Math.pow(10,M))+"e"+M}function b(c){return function(c){if(!c.name)throw new Error("Missing name");if(!c.abbrs)throw new Error("Missing abbrs");if(!c.untils)throw new Error("Missing untils");if(!c.offsets)throw new Error("Missing offsets");if(c.offsets.length!==c.untils.length||c.offsets.length!==c.abbrs.length)throw new Error("Mismatched array lengths")}(c),[c.name,a(c),A(c.untils),z(c.population)].join("|")}function p(c){return[c.name,c.zones.join(" ")].join("|")}function n(c,M){var o;if(c.length!==M.length)return!1;for(o=0;o<c.length;o++)if(c[o]!==M[o])return!1;return!0}function i(c,M){return n(c.offsets,M.offsets)&&n(c.abbrs,M.abbrs)&&n(c.untils,M.untils)}function e(c,M){var o=[],A=[];return c.links&&(A=c.links.slice()),function(c,M,o,A){var a,z,b,p,n,e,r=[];for(a=0;a<c.length;a++){for(e=!1,b=c[a],z=0;z<r.length;z++)i(b,p=(n=r[z])[0])&&(b.population>p.population||b.population===p.population&&A&&A[b.name]?n.unshift(b):n.push(b),e=!0);e||r.push([b])}for(a=0;a<r.length;a++)for(n=r[a],M.push(n[0]),z=1;z<n.length;z++)o.push(n[0].name+"|"+n[z].name)}(c.zones,o,A,M),{version:c.version,zones:o,links:A.sort()}}function r(c,M,o){var A=Array.prototype.slice,a=function(c,M,o){var A,a,z=0,b=c.length+1;for(o||(o=M),M>o&&(a=M,M=o,o=a),a=0;a<c.length;a++)null!=c[a]&&((A=new Date(c[a]).getUTCFullYear())<M&&(z=a+1),A>o&&(b=Math.min(b,a+1)));return[z,b]}(c.untils,M,o),z=A.apply(c.untils,a);return z[z.length-1]=null,{name:c.name,abbrs:A.apply(c.abbrs,a),untils:z,offsets:A.apply(c.offsets,a),population:c.population,countries:c.countries}}return c.tz.pack=b,c.tz.packBase60=o,c.tz.createLinks=e,c.tz.filterYears=r,c.tz.filterLinkPack=function(c,M,o,A){var a,z,n=c.zones,i=[];for(a=0;a<n.length;a++)i[a]=r(n[a],M,o);for(z=e({zones:i,links:c.links.slice(),version:c.version},A),a=0;a<z.zones.length;a++)z.zones[a]=b(z.zones[a]);return z.countries=c.countries?c.countries.map((function(c){return p(c)})):[],z},c.tz.packCountry=p,c}))},"./node_modules/moment-timezone/moment-timezone.js":function(c,M,o){var A,a,z;//! moment-timezone.js
//! version : 0.5.33
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(b,p){"use strict";c.exports?c.exports=p(o("moment")):(a=[o("moment")],void 0===(z="function"==typeof(A=p)?A.apply(M,a):A)||(c.exports=z))}(0,(function(c){"use strict";void 0===c.version&&c.default&&(c=c.default);var M,o={},A={},a={},z={},b={};c&&"string"==typeof c.version||S("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var p=c.version.split("."),n=+p[0],i=+p[1];function e(c){return c>96?c-87:c>64?c-29:c-48}function r(c){var M=0,o=c.split("."),A=o[0],a=o[1]||"",z=1,b=0,p=1;for(45===c.charCodeAt(0)&&(M=1,p=-1);M<A.length;M++)b=60*b+e(A.charCodeAt(M));for(M=0;M<a.length;M++)z/=60,b+=e(a.charCodeAt(M))*z;return b*p}function L(c){for(var M=0;M<c.length;M++)c[M]=r(c[M])}function O(c,M){var o,A=[];for(o=0;o<M.length;o++)A[o]=c[M[o]];return A}function q(c){var M=c.split("|"),o=M[2].split(" "),A=M[3].split(""),a=M[4].split(" ");return L(o),L(A),L(a),function(c,M){for(var o=0;o<M;o++)c[o]=Math.round((c[o-1]||0)+6e4*c[o]);c[M-1]=1/0}(a,A.length),{name:M[0],abbrs:O(M[1].split(" "),A),offsets:O(o,A),untils:a,population:0|M[5]}}function N(c){c&&this._set(q(c))}function d(c,M){this.name=c,this.zones=M}function f(c){var M=c.toTimeString(),o=M.match(/\([a-z ]+\)/i);"GMT"===(o=o&&o[0]?(o=o[0].match(/[A-Z]/g))?o.join(""):void 0:(o=M.match(/[A-Z]{3,5}/g))?o[0]:void 0)&&(o=void 0),this.at=+c,this.abbr=o,this.offset=c.getTimezoneOffset()}function t(c){this.zone=c,this.offsetScore=0,this.abbrScore=0}function u(c,M){for(var o,A;A=6e4*((M.at-c.at)/12e4|0);)(o=new f(new Date(c.at+A))).offset===c.offset?c=o:M=o;return c}function W(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 X(c,M){var o,A;for(L(M),o=0;o<M.length;o++)A=M[o],b[A]=b[A]||{},b[A][c]=!0}function l(c){var M,o,A,a=c.length,p={},n=[];for(M=0;M<a;M++)for(o in A=b[c[M].offset]||{})A.hasOwnProperty(o)&&(p[o]=!0);for(M in p)p.hasOwnProperty(M)&&n.push(z[M]);return n}function B(){try{var c=Intl.DateTimeFormat().resolvedOptions().timeZone;if(c&&c.length>3){var M=z[T(c)];if(M)return M;S("Moment Timezone found "+c+" from the Intl api, but did not have that data loaded.")}}catch(c){}var o,A,a,b=function(){var c,M,o,A=(new Date).getFullYear()-2,a=new f(new Date(A,0,1)),z=[a];for(o=1;o<48;o++)(M=new f(new Date(A,o,1))).offset!==a.offset&&(c=u(a,M),z.push(c),z.push(new f(new Date(c.at+6e4)))),a=M;for(o=0;o<4;o++)z.push(new f(new Date(A+o,0,1))),z.push(new f(new Date(A+o,6,1)));return z}(),p=b.length,n=l(b),i=[];for(A=0;A<n.length;A++){for(o=new t(m(n[A]),p),a=0;a<p;a++)o.scoreOffsetAt(b[a]);i.push(o)}return i.sort(W),i.length>0?i[0].zone.name:void 0}function T(c){return(c||"").toLowerCase().replace(/\//g,"_")}function s(c){var M,A,a,b;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)b=T(A=(a=c[M].split("|"))[0]),o[b]=c[M],z[b]=A,X(b,a[2].split(" "))}function m(c,M){c=T(c);var a,b=o[c];return b instanceof N?b:"string"==typeof b?(b=new N(b),o[c]=b,b):A[c]&&M!==m&&(a=m(A[c],m))?((b=o[c]=new N)._set(a),b.name=z[c],b):null}function E(c){var M,o,a,b;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)a=T((o=c[M].split("|"))[0]),b=T(o[1]),A[a]=b,z[a]=o[0],A[b]=a,z[b]=o[1]}function C(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 R(M){var o=Array.prototype.slice.call(arguments,0,-1),A=arguments[arguments.length-1],a=m(A),z=c.utc.apply(null,o);return a&&!c.isMoment(M)&&C(z)&&z.add(a.parse(z),"minutes"),z.tz(A),z}(n<2||2===n&&i<6)&&S("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+c.version+". See momentjs.com"),N.prototype={_set:function(c){this.name=c.name,this.abbrs=c.abbrs,this.untils=c.untils,this.offsets=c.offsets,this.population=c.population},_index:function(c){var M,o=+c,A=this.untils;for(M=0;M<A.length;M++)if(o<A[M])return M},countries:function(){var c=this.name;return Object.keys(a).filter((function(M