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

2 lines
18 KiB
JavaScript
Raw Normal View History

2022-04-02 10:26:41 +02:00
/*! For license information please see view.js.LICENSE.txt */
2025-12-12 13:13:07 +01:00
(()=>{var i={2707:(i,o,e)=>{"use strict";e.d(o,{Wu:()=>t});let s="";function n(i){if("https://subscribe.wordpress.com"===i.origin&&i.data){let o=i.data;if("string"==typeof o)try{o=JSON.parse(o)}catch{return}if(o&&o.result&&o.result.jwt_token&&(s=o.result.jwt_token,c(s)),o&&"close"===o.action&&s)window.location.reload(!0);else if(o&&"close"===o.action){window.removeEventListener("message",n);document.getElementById("memberships-modal-window").close(),document.body.classList.remove("jetpack-memberships-modal-open")}}}function r(i){i.insertAdjacentHTML("beforeend",'<span class="jetpack-memberships-spinner">\t<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\t\t<path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25" fill="currentColor" />\t\t<path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="jetpack-memberships-spinner-rotating" fill="currentColor" />\t</svg></span>'),i.addEventListener("click",o=>{o.preventDefault(),i.classList.add("is-loading"),i.setAttribute("aria-busy","true"),i.setAttribute("aria-live","polite");return function(i){return new Promise(o=>{const e=document.getElementById("memberships-modal-window");e&&document.body.removeChild(e);const s=document.createElement("dialog");s.setAttribute("id","memberships-modal-window"),s.classList.add("jetpack-memberships-modal"),s.classList.add("is-loading");const r=document.createElement("iframe");r.setAttribute("frameborder","0"),r.setAttribute("allowtransparency","true"),r.setAttribute("allowfullscreen","true"),r.addEventListener("load",function(){document.body.classList.add("jetpack-memberships-modal-open"),s.classList.remove("is-loading"),o()}),r.setAttribute("id","memberships-modal-iframe"),r.innerText="This feature requires inline frames. You have iframes disabled or your browser does not support them.",r.src=i+"&display=alternate&jwt_token="+l();const t=document.querySelector('input[name="lang"]')?.value;t&&(r.src=r.src+"&lang="+t),document.body.appendChild(s),s.appendChild(r),window.addEventListener("message",n,!1),s.showModal()})}(i.getAttribute("href")).then(()=>{i.classList.remove("is-loading"),i.setAttribute("aria-busy","false")}),i.blur(),!1})}const t=i=>{Array.prototype.slice.call(document.querySelectorAll(i)).forEach(i=>{if("true"!==i.getAttribute("data-jetpack-memberships-button-initialized")){try{r(i)}catch(i){console.error("Problem setting up Modal",i)}i.setAttribute("data-jetpack-memberships-button-initialized","true")}})},l=function(){const i=`; ${document.cookie}`.split("; wp-jp-premium-content-session=");if(2===i.length)return i.pop().split(";").shift()},c=function(i){const o=new Date,e=new Date(o.setMonth(o.getMonth()+1));document.cookie=`wp-jp-premium-content-session=${i}; expires=${e.toGMTString()}; path=/`}},50732:(i,o,e)=>{"use strict";e.d(o,{Ay:()=>r});var s=e(80117),n=e(66651);function r(i,o,e={}){const r=(0,s.i)(o);if(!r||isNaN(i))return null;const{decimal:t,grouping:l,precision:c,symbol:m}={...r,...e},a=i<0?"-":"";let p=(0,n.A)(Math.abs(i),c,t,l);return e.stripZeros&&(p=function(i,o){const e=new RegExp(`\\${o}0+$`);return i.replace(e,"")}(p,t)),`${a}${m}${p}`}},66651:(i,o,e)=>{"use strict";function s(i,o=0,e=".",s=","){const n=(i+"").replace(/[^0-9+\-Ee.]/g,""),r=isFinite(+n)?+n:0,t=isFinite(+o)?Math.abs(o):0,l=(t?function(i,o){const e=Math.pow(10,o);return""+(Math.round(i*e)/e).toFixed(o)}(r,t):""+Math.round(r)).split(".");return l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(l[1]||"").length<t&&(l[1]=l[1]||"",l[1]+=new Array(t-l[1].length+1).join("0")),l.join(e)}e.d(o,{A:()=>s})},74993:(i,o,e)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(e.p=window.Jetpack_Block_Assets_Base_Url)},76119:(i,o,e)=>{"use strict";e.d(o,{C_:()=>t,dv:()=>r});var s=e(80117);const n={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5};Object.keys(n).map(i=>{const{sy