kollapsminoriteten/wp-content/plugins/jetpack/_inc/blocks/donations/view.js

13 lines
68 KiB
JavaScript
Raw Normal View History

2020-12-10 14:04:11 +01:00
!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=388)}({103:function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},104:function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},105:function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},106:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.log=function(){var t;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(n){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(n){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3
2020-09-15 14:30:05 +02:00
/*
* Exposes number format capability
*
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
* @license See CREDITS.md
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
*/
2020-12-10 14:04:11 +01:00
function(t,e){var n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(i,o):""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(c[1]||"").length<o&&(c[1]=c[1]||"",c[1]+=new Array(o-c[1].length+1).join("0")),c.join(a)}var v=s()("i18n-calypso"),_=[function(t){return t}],w={};function x(){E.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function C(t){return Array.prototype.slice.call(t)}function S(t){var e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&x("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",C(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&x("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",C(t));for(var n={},r=0;r<t.length;r++)"object"==typeof t[r]&&(n=t[r]);if("string"==typeof e?n.original=e:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof t[1]&&(n.plural=t[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function F(t,e){var n="gettext";e.context&&(n="p"+n),"string"==typeof e.original&&"string"==typeof e.plural&&(n="n"+n);var r=function(t,e){switch(t){case"gettext":return[e.original];case"ngettext":return[e.original,e.plural,e.count];case"npgettext":return[e.context,e.original,e.plural,e.count];case"pgettext":return[e.context,e.original]}return[]}(n,e);return t[n].apply(t,r)}function k(t,e){for(var n=_.length-1;n>=0;n--){var r=_[n](Object.assign({},e));if(t.state.locale[r.original])return F(t.state.jed,r)}return null}function E(){if(!(this instanceof E))return new E;this.defaultLocaleSlug="en",this.state={numberFormatSettings:{},jed:void 0,locale:void 0,localeSlug:void 0,translations:h()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new y.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}E.throwErrors=!1,E.prototype.moment=m.a,E.prototype.on=function(){var t;(t=this.stateObserver).on.apply(t,arguments)},E.prototype.off=function(){var t;(t=this.stateObserver).off.apply(t,arguments)},E.prototype.emit=function(){var t;(t=this.stateObserver).emit.apply(t,arguments)},E.prototype.numberFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof e?e:e.decimals||0,r=e.decPoint||this.state.numberFormatSettings.decimal_point||".",i=e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return b(t,n,r,i)},E.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},E.prototype.setLocale=function(t){if(t&&t[""]&&t[""]["key-hash"]){var e=t[""]["key-hash"],n=function(t,e){var n=!1===e?"":String(e);if(void 0!==w[n+t])return w[n+t];var r=d()().update(t).digest("hex");return w[n+t]=e?r.substr(0,e):r},r=function(t){return function(e){return e.context?(e.original=n(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=n(e.original,t),e}};if("sha1"===e.substr(0,4))if(4===e.length)_.push(r(!1));else{var i=e.substr(5).indexOf("-");if(i<0){var o=Number(e.substr(5));_.push(r(o))}else for(var s=Number(e.substr(5,i)),a=Number(e.substr(6+i)),c=s;c<=a;c++)_.push(r(c))}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.jed=new u.a({locale_data:{messages:this.state.locale}}),m.a.locale(this.state.localeSlug),this.state.numberFormatSettings.decimal_point=F(this.state.jed,S(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=F(this.state.jed,S(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberF
2020-09-15 14:30:05 +02:00
/**
* @preserve jed.js https://github.com/SlexAxton/Jed
*/
2020-11-18 09:10:44 +01:00
!function(n,r){var i=Array.prototype,o=Object.prototype,s=i.slice,a=o.hasOwnProperty,c=i.forEach,l={},u={forEach:function(t,e,n){var r,i,o;if(null!==t)if(c&&t.forEach===c)t.forEach(e,n);else if(t.length===+t.length){for(r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r,t)===l)return}else for(o in t)if(a.call(t,o)&&e.call(n,t[o],o,t)===l)return},extend:function(t){return this.forEach(s.call(arguments,1),(function(e){for(var n in e)t[n]=e[n]})),t}},p=function(t){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,t),this.textdomain(this.options.domain),t.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+t.domain+"`")};function h(t){return p.PF.compile(t||"nplurals=2; plural=(n != 1);")}function f(t,e){this._key=t,this._i18n=e}p.context_delimiter=String.fromCharCode(4),u.extend(f.prototype,{onDomain:function(t){return this._domain=t,this},withContext:function(t){return this._context=t,this},ifPlural:function(t,e){return this._val=t,this._pkey=e,this},fetch:function(t){return"[object Array]"!={}.toString.call(t)&&(t=[].slice.call(arguments,0)),(t&&t.length?p.sprintf:function(t){return t})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),t)}}),u.extend(p.prototype,{translate:function(t){return new f(t,this)},textdomain:function(t){if(!t)return this._textdomain;this._textdomain=t},gettext:function(t){return this.dcnpgettext.call(this,void 0,void 0,t)},dgettext:function(t,e){return this.dcnpgettext.call(this,t,void 0,e)},dcgettext:function(t,e){return this.dcnpgettext.call(this,t,void 0,e)},ngettext:function(t,e,n){return this.dcnpgettext.call(this,void 0,void 0,t,e,n)},dngettext:function(t,e,n,r){return this.dcnpgettext.call(this,t,void 0,e,n,r)},dcngettext:function(t,e,n,r){return this.dcnpgettext.call(this,t,void 0,e,n,r)},pgettext:function(t,e){return this.dcnpgettext.call(this,void 0,t,e)},dpgettext:function(t,e,n){return this.dcnpgettext.call(this,t,e,n)},dcpgettext:function(t,e,n){return this.dcnpgettext.call(this,t,e,n)},npgettext:function(t,e,n,r){return this.dcnpgettext.call(this,void 0,t,e,n,r)},dnpgettext:function(t,e,n,r,i){return this.dcnpgettext.call(this,t,e,n,r,i)},dcnpgettext:function(t,e,n,r,i){var o;if(r=r||n,t=t||this._textdomain,!this.options)return(o=new p).dcnpgettext.call(o,void 0,void 0,n,r,i);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[t])throw new Error("Domain `"+t+"` was not found.");if(!this.options.locale_data[t][""])throw new Error("No locale meta information provided.");if(!n)throw new Error("No translation key found.");var s,a,c,l=e?e+p.context_delimiter+n:n,u=this.options.locale_data,f=u[t],m=(u.messages||this.defaults.locale_data.messages)[""],g=f[""].plural_forms||f[""]["Plural-Forms"]||f[""]["plural-forms"]||m.plural_forms||m["Plural-Forms"]||m["plural-forms"];if(void 0===i)c=0;else{if("number"!=typeof i&&(i=parseInt(i,10),isNaN(i)))throw new Error("The number that was passed in is not a number.");c=h(g)(i)}if(!f)throw new Error("No domain named `"+t+"` could be found.");return!(s=f[l])||c>s.length?(this.options.missing_key_callback&&this.options.missing_key_callback(l,t),a=[n,r],!0===this.options.debug&&console.log(a[h(g)(i)]),a[h()(i)]):(a=s[c])||(a=[n,r])[h()(i)]}});var m,g,d=function(){function t(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function e(t,e){for(var n=[];e>0;n[--e]=t);return n.join("")}var n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,r){var i,o,s,a,c,l,u,p=1,h=n.length,f="",m=[];for(o=0;o<h;o++)if("string"===(f=t(n[o])))m.push(n[o]);else if("array"===f){if((a=n[o])[2])for(i=r[p],s=0;s<a[2].length;s++){if(!i.hasOwnProperty(a[2][s]))throw d('[sprintf] property "%s" does not exist',a[2][s]);i=i[a[2][s]]}else i=a[1]?r[a[1]]:r[p