// r.json() returns a Promise that resolves /to/ the parsed object.
returnr.json().then(function (d){
// Copy the status code to the object we pass on.
d.responseStatus=r.status;
d.responseOk=r.ok;
// Pass on the JSON object.
returnd;
});
});
}
};
})();
}
/******/})()
;
\ No newline at end of file
(()=>{functionn(o){returnn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(n){returntypeofn}:function(n){returnn&&"function"==typeofSymbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeofn},n(o)}window.CiviCRMInlay=window.CiviCRMInlay||{app:null,inlays:{},debug:function(){}},window.CiviCRMInlay.app||function(){localStorage&&localStorage.getItem("inlayDebug")&&(window.CiviCRMInlay.debug=console.debug);varo=window.CiviCRMInlay.debug;o("Defining CiviCRMInlay.app");vare=window.CiviCRMInlay;e.app={bundleInfo:function(n,o){vare=Math.floor(((newDate).getTime()-n)/1e3),t="s",r=e<300?console.info:console.log;e>120?(e=Math.floor(e/60),t="mins"):e>1440?(e=Math.floor(e/24/60),t="days"):e>60&&(e=Math.floor(e/60),t="hrs"),r("Inlay bundle ".concat(o," created ").concat(e,"").concat(t," ago"))},bootWhenReady:function(){"complete"===document.readyState?(o("Document is already ready, booting any new inlays."),e.app.boot()):(o("Waiting for DOMContentLoaded to boot any new inlays."),document.addEventListener("DOMContentLoaded",e.app.boot))},boot:function(){o("Inlay app booting");vart=[];[].forEach.call(document.querySelectorAll("script[data-inlay-id]"),(function(r){t.push(r);vari=r.dataset.inlayId;r.inlayBooted?o("Inlay ".concat(i,": already booted")):iine.inlays?(o("Inlay ".concat(i,": booting")),r.inlayBooted=!0,e.inlays[i]&&e.inlays[i].initinwindow?window[e.inlays[i].init]({initData:e.inlays[i],publicID:i,script:r,request:function(o){returne.app.request(i,o).catch((function(o){returnconsole.error("Inlay caught unexpected "+n(o),o),alert("Sorry, an error occurred."),{error:o,responseOk:!1,responseStatus:500}}))}}):console.error("Failed to boot inlay ".concat(i,": missing data or init function"))):console.warn("Inlay ".concat(i,": Failed to instantiate from script:"))})),o("All inlays booted",t)},request:function(o,t){if(!o)returnconsole.warn("Inlay broken: missing publicID in call to request()"),Promise.resolve({error:"Configuration problem on website. Code Inlay1"});if(!e.inlays[o])returnconsole.warn("Inlay broken: invalid publicID in call to request()"),Promise.resolve({error:"Configuration problem on website. Code Inlay2"});if("object"!==n(t.body))returnconsole.warn("Inlay broken: request must be called with object for body"),Promise.resolve({error:"Configuration problem on website. Code Inlay3"});(t=JSON.parse(JSON.stringify(t))).headers&&t.headers["Content-Type"]||(t.headers=t.headers||{},t.headers["Content-Type"]="application/json"),t.body.publicID=o,t.body=JSON.stringify(t.body);varr=e.inlays[o].inlayEndpoint;return"xdebug"int&&(r+=(r.indexOf("?")>-1?"&":"?")+"XDEBUG_SESSION_START="+encodeURIComponent(t.xdebug),deletet.xdebug),"get"===t.method&&(r+=(r.indexOf("?")>-1?"&":"?")+"inlayJSON="+encodeURIComponent(t.body),deletet.body),Object.assign(t,{mode:"cors",cache:"no-cache",credentials:"omit",redirect:"error",referrerPolicy:"origin-when-cross-origin"}),fetch(r,t).then((function(n){varo=n.headers.get("content-type");if(!o||!o.includes("application/json"))thrownewTypeError("Server Error: JSON response required.");returnn.json().then((function(o){returno.responseStatus=n.status,o.responseOk=n.ok,o}))}))}}}()})();