mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 07:05:37 +01:00
0fb5da94e6
Updates packages: annotations, api-fetch, block-library, blocks, components, core-data, data, dom, edit-post, editor, format-library, jest-console, jest-preset-default, keycodes, html-entities, list-reusable-blocks, notices, nux, rich-text, scripts, token-list, url, viewport Fixes undefined notices in some blocks. Removes incorrect `'gutenberg'` textdomain too. See #45145 Built from https://develop.svn.wordpress.org/branches/5.0@43919 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
8.4 KiB
JavaScript
1 line
8.4 KiB
JavaScript
this.wp=this.wp||{},this.wp.i18n=function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)r.d(e,o,function(n){return t[n]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=319)}({125:function(t,n,r){var e;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function i(t){return function(t,n){var r,e,u,a,s,c,f,l,p,d=1,g=t.length,h="";for(e=0;e<g;e++)if("string"==typeof t[e])h+=t[e];else if(Array.isArray(t[e])){if((a=t[e])[2])for(r=n[d],u=0;u<a[2].length;u++){if(!r.hasOwnProperty(a[2][u]))throw new Error(i('[sprintf] property "%s" does not exist',a[2][u]));r=r[a[2][u]]}else r=a[1]?n[a[1]]:n[d++];if(o.not_type.test(a[8])&&o.not_primitive.test(a[8])&&r instanceof Function&&(r=r()),o.numeric_arg.test(a[8])&&"number"!=typeof r&&isNaN(r))throw new TypeError(i("[sprintf] expecting number but found %T",r));switch(o.number.test(a[8])&&(l=r>=0),a[8]){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a[6]?parseInt(a[6]):0);break;case"e":r=a[7]?parseFloat(r).toExponential(a[7]):parseFloat(r).toExponential();break;case"f":r=a[7]?parseFloat(r).toFixed(a[7]):parseFloat(r);break;case"g":r=a[7]?String(Number(r.toPrecision(a[7]))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a[7]?r.substring(0,a[7]):r;break;case"t":r=String(!!r),r=a[7]?r.substring(0,a[7]):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a[7]?r.substring(0,a[7]):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a[7]?r.substring(0,a[7]):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}o.json.test(a[8])?h+=r:(!o.number.test(a[8])||l&&!a[3]?p="":(p=l?"+":"-",r=r.toString().replace(o.sign,"")),c=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",f=a[6]-(p+r).length,s=a[6]&&f>0?c.repeat(f):"",h+=a[5]?p+r+s:"0"===c?p+s+r:s+p+r)}return h}(function(t){if(a[t])return a[t];var n,r=t,e=[],i=0;for(;r;){if(null!==(n=o.text.exec(r)))e.push(n[0]);else if(null!==(n=o.modulo.exec(r)))e.push("%");else{if(null===(n=o.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){i|=1;var u=[],s=n[2],c=[];if(null===(c=o.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(u.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=o.key_access.exec(s)))u.push(c[1]);else{if(null===(c=o.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");u.push(c[1])}n[2]=u}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");e.push(n)}r=r.substring(n[0].length)}return a[t]=e}(t),arguments)}function u(t,n){return i.apply(null,[t].concat(n||[]))}var a=Object.create(null);n.sprintf=i,n.vsprintf=u,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=u,void 0===(e=function(){return{sprintf:i,vsprintf:u}}.call(n,r,n,t))||(t.exports=e))}()},15:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,"a",function(){return e})},319:function(t,n,r){"use strict";r.r(n);var e,o,i,u,a=r(8);e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},o=["(","?"],i={")":["("],":":["?","?:"]},u=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(t){return!t},"*":function(t,n){return t*n},"/":function(t,n){return t/n},"%":function(t,n){return t%n},"+":function(t,n){return t+n},"-":function(t,n){return t-n},"<":function(t,n){return t<n},"<=":function(t,n){return t<=n},">":function(t,n){return t>n},">=":function(t,n){return t>=n},"==":function(t,n){return t===n},"!=":function(t,n){return t!==n},"&&":function(t,n){return t&&n},"||":function(t,n){return t||n},"?:":function(t,n,r){if(t)throw n;return r}};function c(t){var n=function(t){for(var n,r,a,s,c=[],f=[];n=t.match(u);){for(r=n[0],(a=t.substr(0,n.index).trim())&&c.push(a);s=f.pop();){if(i[r]){if(i[r][0]===s){r=i[r][1]||r;break}}else if(o.indexOf(s)>=0||e[s]<e[r]){f.push(s);break}c.push(s)}i[r]||f.push(r),t=t.substr(n.index+r.length)}return(t=t.trim())&&c.push(t),c.concat(f.reverse())}(t);return function(t){return function(t,n){var r,e,o,i,u=[];for(r=0;r<t.length;r++){if(o=t[r],e=s[o])try{i=e.apply(null,u.splice(-1*e.length))}catch(t){return t}else i=n.hasOwnProperty(o)?n[o]:+o;u.push(i)}return u[0]}(n,t)}}var f={contextDelimiter:"",onMissingKey:null};function l(t,n){var r;for(r in this.data=t,this.pluralForms={},n=n||{},this.options={},f)this.options[r]=n[r]||f[r]}l.prototype.getPluralForm=function(t,n){var r,e,o=this.pluralForms[t];return o||(e=function(t){var n,r,e;for(n=t.split(";"),r=0;r<n.length;r++)if(0===(e=n[r].trim()).indexOf("plural="))return e.substr(7)}((r=this.data[t][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms),o=this.pluralForms[t]=function(t){var n=c(t);return function(t){return+n({n:t})}}(e)),o(n)},l.prototype.dcnpgettext=function(t,n,r,e,o){var i,u,a;return i=void 0===o?0:this.getPluralForm(t,o),u=r,n&&(u=n+this.options.contextDelimiter+r),(a=this.data[t][u])&&a[i]?a[i]:(this.options.onMissingKey&&this.options.onMissingKey(r,t),0===i?r:e)};var p=r(41),d=r.n(p),g=r(125),h=r.n(g);r.d(n,"setLocaleData",function(){return x}),r.d(n,"__",function(){return w}),r.d(n,"_x",function(){return _}),r.d(n,"_n",function(){return O}),r.d(n,"_nx",function(){return j}),r.d(n,"sprintf",function(){return S});var v={"":{plural_forms:"plural=(n!=1)"}},b=d()(console.error),y=new l({});function x(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";y.data[n]=Object(a.a)({},v,y.data[n],t),y.data[n][""]=Object(a.a)({},v[""],y.data[n][""])}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return y.data[t]||x(void 0,t),y.dcnpgettext(t,n,r,e,o)}function w(t,n){return m(n,void 0,t)}function _(t,n,r){return m(r,n,t)}function O(t,n,r,e){return m(e,void 0,t,n,r)}function j(t,n,r,e,o){return m(o,e,t,n,r)}function S(t){try{for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return h.a.sprintf.apply(h.a,[t].concat(r))}catch(n){return b("sprintf error: \n\n"+n.toString()),t}}},41:function(t,n,r){t.exports=function(t,n){var r,e,o,i=0;function u(){var n,u,a=e,s=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(u=0;u<s;u++)if(a.args[u]!==arguments[u]){a=a.next;continue t}return a!==e&&(a===o&&(o=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=e,a.prev=null,e.prev=a,e=a),a.val}a=a.next}for(n=new Array(s),u=0;u<s;u++)n[u]=arguments[u];return a={args:n,val:t.apply(null,n)},e?(e.prev=a,a.next=e):o=a,i===r?(o=o.prev).next=null:i++,e=a,a.val}return n&&n.maxSize&&(r=n.maxSize),u.clear=function(){e=null,o=null,i=0},u}},8:function(t,n,r){"use strict";r.d(n,"a",function(){return o});var e=r(15);function o(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(n){Object(e.a)(t,n,r[n])})}return t}}}); |