hello.pledge.to
Open in
urlscan Pro
35.83.26.52
Public Scan
URL:
https://hello.pledge.to/assets/widget.js
Submission: On November 07 via manual from US — Scanned from DE
Submission: On November 07 via manual from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
(()=>{var Et=Object.create;var V=Object.defineProperty,yt=Object.defineProperties,wt=Object.getOwnPropertyDescriptor,Ct=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertyNames,G=Object.getOwnPropertySymbols,It=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable;var tt=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))et.call(t,r)&&tt(e,r,t[r]);if(G)for(var r of G(t))Ot.call(t,r)&&tt(e,r,t[r]);return e},O=(e,t)=>yt(e,Ct(t));var _t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Tt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Nt(t))!et.call(e,a)&&a!==r&&V(e,a,{get:()=>t[a],enumerable:!(i=wt(t,a))||i.enumerable});return e};var Rt=(e,t,r)=>(r=e!=null?Et(It(e)):{},Tt(t||!e||!e.__esModule?V(r,"default",{value:e,enumerable:!0}):r,e));var ot=_t((nt,st)=>{var Dt=nt.__extends||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i},L;typeof WebKitMutationObserver<"u"?L=WebKitMutationObserver:L=MutationObserver;if(L===void 0)throw console.error("DOM Mutation Observers are required."),console.error("https://developer.mozilla.org/en-US/docs/DOM/MutationObserver"),Error("DOM Mutation Observers are required");var N=function(){function e(){this.nodes=[],this.values=[]}return e.prototype.isIndex=function(t){return+t===t>>>0},e.prototype.nodeId=function(t){var r=t[e.ID_PROP];return r||(r=t[e.ID_PROP]=e.nextId_++),r},e.prototype.set=function(t,r){var i=this.nodeId(t);this.nodes[i]=t,this.values[i]=r},e.prototype.get=function(t){var r=this.nodeId(t);return this.values[r]},e.prototype.has=function(t){return this.nodeId(t)in this.nodes},e.prototype.delete=function(t){var r=this.nodeId(t);delete this.nodes[r],this.values[r]=void 0},e.prototype.keys=function(){var t=[];for(var r in this.nodes)!this.isIndex(r)||t.push(this.nodes[r]);return t},e.ID_PROP="__mutation_summary_node_map_id__",e.nextId_=1,e}(),f;(function(e){e[e.STAYED_OUT=0]="STAYED_OUT",e[e.ENTERED=1]="ENTERED",e[e.STAYED_IN=2]="STAYED_IN",e[e.REPARENTED=3]="REPARENTED",e[e.REORDERED=4]="REORDERED",e[e.EXITED=5]="EXITED"})(f||(f={}));var St=function(){function e(t,r,i,a,n,s,c,m){r===void 0&&(r=!1),i===void 0&&(i=!1),a===void 0&&(a=!1),n===void 0&&(n=null),s===void 0&&(s=!1),c===void 0&&(c=null),m===void 0&&(m=null),this.node=t,this.childList=r,this.attributes=i,this.characterData=a,this.oldParentNode=n,this.added=s,this.attributeOldValues=c,this.characterDataOldValue=m,this.isCaseInsensitive=this.node.nodeType===Node.ELEMENT_NODE&&this.node instanceof HTMLElement&&this.node.ownerDocument instanceof HTMLDocument}return e.prototype.getAttributeOldValue=function(t){if(!!this.attributeOldValues)return this.isCaseInsensitive&&(t=t.toLowerCase()),this.attributeOldValues[t]},e.prototype.getAttributeNamesMutated=function(){var t=[];if(!this.attributeOldValues)return t;for(var r in this.attributeOldValues)t.push(r);return t},e.prototype.attributeMutated=function(t,r){this.attributes=!0,this.attributeOldValues=this.attributeOldValues||{},!(t in this.attributeOldValues)&&(this.attributeOldValues[t]=r)},e.prototype.characterDataMutated=function(t){this.characterData||(this.characterData=!0,this.characterDataOldValue=t)},e.prototype.removedFromParent=function(t){this.childList=!0,this.added||this.oldParentNode?this.added=!1:this.oldParentNode=t},e.prototype.insertedIntoParent=function(){this.childList=!0,this.added=!0},e.prototype.getOldParent=function(){if(this.childList){if(this.oldParentNode)return this.oldParentNode;if(this.added)return null}return this.node.parentNode},e}(),rt=function(){function e(){this.added=new N,this.removed=new N,this.maybeMoved=new N,this.oldPrevious=new N,this.moved=void 0}return e}(),At=function(e){Dt(t,e);function t(r,i){e.call(this),this.rootNode=r,this.reachableCache=void 0,this.wasReachableCache=void 0,this.anyParentsChanged=!1,this.anyAttributesChanged=!1,this.anyCharacterDataChanged=!1;for(var a=0;a<i.length;a++){var n=i[a];switch(n.type){case"childList":this.anyParentsChanged=!0;for(var s=0;s<n.removedNodes.length;s++){var c=n.removedNodes[s];this.getChange(c).removedFromParent(n.target)}for(var s=0;s<n.addedNodes.length;s++){var c=n.addedNodes[s];this.getChange(c).insertedIntoParent()}break;case"attributes":this.anyAttributesChanged=!0;var m=this.getChange(n.target);m.attributeMutated(n.attributeName,n.oldValue);break;case"characterData":this.anyCharacterDataChanged=!0;var m=this.getChange(n.target);m.characterDataMutated(n.oldValue);break}}}return t.prototype.getChange=function(r){var i=this.get(r);return i||(i=new St(r),this.set(r,i)),i},t.prototype.getOldParent=function(r){var i=this.get(r);return i?i.getOldParent():r.parentNode},t.prototype.getIsReachable=function(r){if(r===this.rootNode)return!0;if(!r)return!1;this.reachableCache=this.reachableCache||new N;var i=this.reachableCache.get(r);return i===void 0&&(i=this.getIsReachable(r.parentNode),this.reachableCache.set(r,i)),i},t.prototype.getWasReachable=function(r){if(r===this.rootNode)return!0;if(!r)return!1;this.wasReachableCache=this.wasReachableCache||new N;var i=this.wasReachableCache.get(r);return i===void 0&&(i=this.getWasReachable(this.getOldParent(r)),this.wasReachableCache.set(r,i)),i},t.prototype.reachabilityChange=function(r){return this.getIsReachable(r)?this.getWasReachable(r)?f.STAYED_IN:f.ENTERED:this.getWasReachable(r)?f.EXITED:f.STAYED_OUT},t}(N),kt=function(){function e(t,r,i,a,n){this.rootNode=t,this.mutations=r,this.selectors=i,this.calcReordered=a,this.calcOldPreviousSibling=n,this.treeChanges=new At(t,r),this.entered=[],this.exited=[],this.stayedIn=new N,this.visited=new N,this.childListChangeMap=void 0,this.characterDataOnly=void 0,this.matchCache=void 0,this.processMutations()}return e.prototype.processMutations=function(){if(!(!this.treeChanges.anyParentsChanged&&!this.treeChanges.anyAttributesChanged))for(var t=this.treeChanges.keys(),r=0;r<t.length;r++)this.visitNode(t[r],void 0)},e.prototype.visitNode=function(t,r){if(!this.visited.has(t)){this.visited.set(t,!0);var i=this.treeChanges.get(t),a=r;if((i&&i.childList||a==null)&&(a=this.treeChanges.reachabilityChange(t)),a!==f.STAYED_OUT){if(this.matchabilityChange(t),a===f.ENTERED)this.entered.push(t);else if(a===f.EXITED)this.exited.push(t),this.ensureHasOldPreviousSiblingIfNeeded(t);else if(a===f.STAYED_IN){var n=f.STAYED_IN;i&&i.childList&&(i.oldParentNode!==t.parentNode?(n=f.REPARENTED,this.ensureHasOldPreviousSiblingIfNeeded(t)):this.calcReordered&&this.wasReordered(t)&&(n=f.REORDERED)),this.stayedIn.set(t,n)}if(a!==f.STAYED_IN)for(var s=t.firstChild;s;s=s.nextSibling)this.visitNode(s,a)}}},e.prototype.ensureHasOldPreviousSiblingIfNeeded=function(t){if(!!this.calcOldPreviousSibling){this.processChildlistChanges();var r=t.parentNode,i=this.treeChanges.get(t);i&&i.oldParentNode&&(r=i.oldParentNode);var a=this.childListChangeMap.get(r);a||(a=new rt,this.childListChangeMap.set(r,a)),a.oldPrevious.has(t)||a.oldPrevious.set(t,t.previousSibling)}},e.prototype.getChanged=function(t,r,i){this.selectors=r,this.characterDataOnly=i;for(var a=0;a<this.entered.length;a++){var n=this.entered[a],s=this.matchabilityChange(n);(s===f.ENTERED||s===f.STAYED_IN)&&t.added.push(n)}for(var c=this.stayedIn.keys(),a=0;a<c.length;a++){var n=c[a],s=this.matchabilityChange(n);if(s===f.ENTERED)t.added.push(n);else if(s===f.EXITED)t.removed.push(n);else if(s===f.STAYED_IN&&(t.reparented||t.reordered)){var m=this.stayedIn.get(n);t.reparented&&m===f.REPARENTED?t.reparented.push(n):t.reordered&&m===f.REORDERED&&t.reordered.push(n)}}for(var a=0;a<this.exited.length;a++){var n=this.exited[a],s=this.matchabilityChange(n);(s===f.EXITED||s===f.STAYED_IN)&&t.removed.push(n)}},e.prototype.getOldParentNode=function(t){var r=this.treeChanges.get(t);if(r&&r.childList)return r.oldParentNode?r.oldParentNode:null;var i=this.treeChanges.reachabilityChange(t);if(i===f.STAYED_OUT||i===f.ENTERED)throw Error("getOldParentNode requested on invalid node.");return t.parentNode},e.prototype.getOldPreviousSibling=function(t){var r=t.parentNode,i=this.treeChanges.get(t);i&&i.oldParentNode&&(r=i.oldParentNode);var a=this.childListChangeMap.get(r);if(!a)throw Error("getOldPreviousSibling requested on invalid node.");return a.oldPrevious.get(t)},e.prototype.getOldAttribute=function(t,r){var i=this.treeChanges.get(t);if(!i||!i.attributes)throw Error("getOldAttribute requested on invalid node.");var a=i.getAttributeOldValue(r);if(a===void 0)throw Error("getOldAttribute requested for unchanged attribute name.");return a},e.prototype.attributeChangedNodes=function(t){if(!this.treeChanges.anyAttributesChanged)return{};var r,i;if(t){r={},i={};for(var a=0;a<t.length;a++){var n=t[a];r[n]=!0,i[n.toLowerCase()]=n}}for(var s={},c=this.treeChanges.keys(),a=0;a<c.length;a++){var m=c[a],d=this.treeChanges.get(m);if(!!d.attributes&&!(f.STAYED_IN!==this.treeChanges.reachabilityChange(m)||f.STAYED_IN!==this.matchabilityChange(m)))for(var y=m,b=d.getAttributeNamesMutated(),p=0;p<b.length;p++){var n=b[p];if(!(r&&!r[n]&&!(d.isCaseInsensitive&&i[n]))){var o=d.getAttributeOldValue(n);o!==y.getAttribute(n)&&(i&&d.isCaseInsensitive&&(n=i[n]),s[n]=s[n]||[],s[n].push(y))}}}return s},e.prototype.getOldCharacterData=function(t){var r=this.treeChanges.get(t);if(!r||!r.characterData)throw Error("getOldCharacterData requested on invalid node.");return r.characterDataOldValue},e.prototype.getCharacterDataChanged=function(){if(!this.treeChanges.anyCharacterDataChanged)return[];for(var t=this.treeChanges.keys(),r=[],i=0;i<t.length;i++){var a=t[i];if(f.STAYED_IN===this.treeChanges.reachabilityChange(a)){var n=this.treeChanges.get(a);!n.characterData||a.textContent==n.characterDataOldValue||r.push(a)}}return r},e.prototype.computeMatchabilityChange=function(t,r){this.matchCache||(this.matchCache=[]),this.matchCache[t.uid]||(this.matchCache[t.uid]=new N);var i=this.matchCache[t.uid],a=i.get(r);return a===void 0&&(a=t.matchabilityChange(r,this.treeChanges.get(r)),i.set(r,a)),a},e.prototype.matchabilityChange=function(t){var r=this;if(this.characterDataOnly)switch(t.nodeType){case Node.COMMENT_NODE:case Node.TEXT_NODE:return f.STAYED_IN;default:return f.STAYED_OUT}if(!this.selectors)return f.STAYED_IN;if(t.nodeType!==Node.ELEMENT_NODE)return f.STAYED_OUT;for(var i=t,a=this.selectors.map(function(c){return r.computeMatchabilityChange(c,i)}),n=f.STAYED_OUT,s=0;n!==f.STAYED_IN&&s<a.length;){switch(a[s]){case f.STAYED_IN:n=f.STAYED_IN;break;case f.ENTERED:n===f.EXITED?n=f.STAYED_IN:n=f.ENTERED;break;case f.EXITED:n===f.ENTERED?n=f.STAYED_IN:n=f.EXITED;break}s++}return n},e.prototype.getChildlistChange=function(t){var r=this.childListChangeMap.get(t);return r||(r=new rt,this.childListChangeMap.set(t,r)),r},e.prototype.processChildlistChanges=function(){if(!this.childListChangeMap){this.childListChangeMap=new N;for(var t=0;t<this.mutations.length;t++){let m=function(d,y){!d||i.oldPrevious.has(d)||i.added.has(d)||i.maybeMoved.has(d)||y&&(i.added.has(y)||i.maybeMoved.has(y))||i.oldPrevious.set(d,y)};var c=m,r=this.mutations[t];if(r.type=="childList"&&!(this.treeChanges.reachabilityChange(r.target)!==f.STAYED_IN&&!this.calcOldPreviousSibling)){for(var i=this.getChildlistChange(r.target),a=r.previousSibling,n=0;n<r.removedNodes.length;n++){var s=r.removedNodes[n];m(s,a),i.added.has(s)?i.added.delete(s):(i.removed.set(s,!0),i.maybeMoved.delete(s)),a=s}m(r.nextSibling,a);for(var n=0;n<r.addedNodes.length;n++){var s=r.addedNodes[n];i.removed.has(s)?(i.removed.delete(s),i.maybeMoved.set(s,!0)):i.added.set(s,!0)}}}}},e.prototype.wasReordered=function(t){if(!this.treeChanges.anyParentsChanged)return!1;this.processChildlistChanges();var r=t.parentNode,i=this.treeChanges.get(t);i&&i.oldParentNode&&(r=i.oldParentNode);var a=this.childListChangeMap.get(r);if(!a)return!1;if(a.moved)return a.moved.get(t);a.moved=new N;var n=new N;function s(b){if(!b||!a.maybeMoved.has(b))return!1;var p=a.moved.get(b);return p!==void 0||(n.has(b)?p=!0:(n.set(b,!0),p=y(b)!==m(b)),n.has(b)?(n.delete(b),a.moved.set(b,p)):p=a.moved.get(b)),p}var c=new N;function m(b){var p=c.get(b);if(p!==void 0)return p;for(p=a.oldPrevious.get(b);p&&(a.removed.has(p)||s(p));)p=m(p);return p===void 0&&(p=b.previousSibling),c.set(b,p),p}var d=new N;function y(b){if(d.has(b))return d.get(b);for(var p=b.previousSibling;p&&(a.added.has(p)||s(p));)p=p.previousSibling;return d.set(b,p),p}return a.maybeMoved.keys().forEach(s),a.moved.get(t)},e}(),Mt=function(){function e(t,r){var i=this;if(this.projection=t,this.added=[],this.removed=[],this.reparented=r.all||r.element||r.characterData?[]:void 0,this.reordered=r.all?[]:void 0,t.getChanged(this,r.elementFilter,r.characterData),r.all||r.attribute||r.attributeList){var a=r.attribute?[r.attribute]:r.attributeList,n=t.attributeChangedNodes(a);r.attribute?this.valueChanged=n[r.attribute]||[]:(this.attributeChanged=n,r.attributeList&&r.attributeList.forEach(function(c){i.attributeChanged.hasOwnProperty(c)||(i.attributeChanged[c]=[])}))}if(r.all||r.characterData){var s=t.getCharacterDataChanged();r.characterData?this.valueChanged=s:this.characterDataChanged=s}this.reordered&&(this.getOldPreviousSibling=t.getOldPreviousSibling.bind(t))}return e.prototype.getOldParentNode=function(t){return this.projection.getOldParentNode(t)},e.prototype.getOldAttribute=function(t,r){return this.projection.getOldAttribute(t,r)},e.prototype.getOldCharacterData=function(t){return this.projection.getOldCharacterData(t)},e.prototype.getOldPreviousSibling=function(t){return this.projection.getOldPreviousSibling(t)},e}(),x=/[a-zA-Z_]+/,H=/[a-zA-Z0-9_\-]+/;function it(e){return'"'+e.replace(/"/,'\\"')+'"'}var Pt=function(){function e(){}return e.prototype.matches=function(t){if(t===null)return!1;if(this.attrValue===void 0)return!0;if(!this.contains)return this.attrValue==t;for(var r=t.split(" "),i=0;i<r.length;i++)if(this.attrValue===r[i])return!0;return!1},e.prototype.toString=function(){return this.attrName==="class"&&this.contains?"."+this.attrValue:this.attrName==="id"&&!this.contains?"#"+this.attrValue:this.contains?"["+this.attrName+"~="+it(this.attrValue)+"]":"attrValue"in this?"["+this.attrName+"="+it(this.attrValue)+"]":"["+this.attrName+"]"},e}(),F=function(){function e(){this.uid=e.nextUid++,this.qualifiers=[]}return Object.defineProperty(e.prototype,"caseInsensitiveTagName",{get:function(){return this.tagName.toUpperCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectorString",{get:function(){return this.tagName+this.qualifiers.join("")},enumerable:!0,configurable:!0}),e.prototype.isMatching=function(t){return t[e.matchesSelector](this.selectorString)},e.prototype.wasMatching=function(t,r,i){if(!r||!r.attributes)return i;var a=r.isCaseInsensitive?this.caseInsensitiveTagName:this.tagName;if(a!=="*"&&a!==t.tagName)return!1;for(var n=[],s=!1,c=0;c<this.qualifiers.length;c++){var m=this.qualifiers[c],d=r.getAttributeOldValue(m.attrName);n.push(d),s=s||d!==void 0}if(!s)return i;for(var c=0;c<this.qualifiers.length;c++){var m=this.qualifiers[c],d=n[c];if(d===void 0&&(d=t.getAttribute(m.attrName)),!m.matches(d))return!1}return!0},e.prototype.matchabilityChange=function(t,r){var i=this.isMatching(t);return i?this.wasMatching(t,r,i)?f.STAYED_IN:f.ENTERED:this.wasMatching(t,r,i)?f.EXITED:f.STAYED_OUT},e.parseSelectors=function(t){var r=[],i,a;function n(){i&&(a&&(i.qualifiers.push(a),a=void 0),r.push(i)),i=new e}function s(){a&&i.qualifiers.push(a),a=new Pt}for(var c=/\s/,m,d="Invalid or unsupported selector syntax.",y=1,b=2,p=3,o=4,h=5,u=6,v=7,E=8,w=9,C=10,_=11,T=12,Z=13,M=14,g=y,J=0;J<t.length;){var l=t[J++];switch(g){case y:if(l.match(x)){n(),i.tagName=l,g=b;break}if(l=="*"){n(),i.tagName="*",g=p;break}if(l=="."){n(),s(),i.tagName="*",a.attrName="class",a.contains=!0,g=o;break}if(l=="#"){n(),s(),i.tagName="*",a.attrName="id",g=o;break}if(l=="["){n(),s(),i.tagName="*",a.attrName="",g=u;break}if(l.match(c))break;throw Error(d);case b:if(l.match(H)){i.tagName+=l;break}if(l=="."){s(),a.attrName="class",a.contains=!0,g=o;break}if(l=="#"){s(),a.attrName="id",g=o;break}if(l=="["){s(),a.attrName="",g=u;break}if(l.match(c)){g=M;break}if(l==","){g=y;break}throw Error(d);case p:if(l=="."){s(),a.attrName="class",a.contains=!0,g=o;break}if(l=="#"){s(),a.attrName="id",g=o;break}if(l=="["){s(),a.attrName="",g=u;break}if(l.match(c)){g=M;break}if(l==","){g=y;break}throw Error(d);case o:if(l.match(x)){a.attrValue=l,g=h;break}throw Error(d);case h:if(l.match(H)){a.attrValue+=l;break}if(l=="."){s(),a.attrName="class",a.contains=!0,g=o;break}if(l=="#"){s(),a.attrName="id",g=o;break}if(l=="["){s(),g=u;break}if(l.match(c)){g=M;break}if(l==","){g=y;break}throw Error(d);case u:if(l.match(x)){a.attrName=l,g=v;break}if(l.match(c))break;throw Error(d);case v:if(l.match(H)){a.attrName+=l;break}if(l.match(c)){g=E;break}if(l=="~"){a.contains=!0,g=w;break}if(l=="="){a.attrValue="",g=_;break}if(l=="]"){g=p;break}throw Error(d);case E:if(l=="~"){a.contains=!0,g=w;break}if(l=="="){a.attrValue="",g=_;break}if(l=="]"){g=p;break}if(l.match(c))break;throw Error(d);case w:if(l=="="){a.attrValue="",g=_;break}throw Error(d);case C:if(l=="]"){g=p;break}if(l.match(c))break;throw Error(d);case _:if(l.match(c))break;if(l=='"'||l=="'"){m=l,g=Z;break}a.attrValue+=l,g=T;break;case T:if(l.match(c)){g=C;break}if(l=="]"){g=p;break}if(l=="'"||l=='"')throw Error(d);a.attrValue+=l;break;case Z:if(l==m){g=C;break}a.attrValue+=l;break;case M:if(l.match(c))break;if(l==","){g=y;break}throw Error(d)}}switch(g){case y:case b:case p:case h:case M:n();break;default:throw Error(d)}if(!r.length)throw Error(d);return r},e.nextUid=1,e.matchesSelector=function(){var t=document.createElement("div");return typeof t.webkitMatchesSelector=="function"?"webkitMatchesSelector":typeof t.mozMatchesSelector=="function"?"mozMatchesSelector":typeof t.msMatchesSelector=="function"?"msMatchesSelector":"matchesSelector"}(),e}(),Lt=/^([a-zA-Z:_]+[a-zA-Z0-9_\-:\.]*)$/;function at(e){if(typeof e!="string"||(e=e.trim(),!e))throw Error("Invalid request opion. attribute must be a non-zero length string.");if(!e.match(Lt))throw Error("Invalid request option. invalid attribute name: "+e);return e}function Vt(e){if(!e.trim().length)throw Error("Invalid request option: elementAttributes must contain at least one attribute.");for(var t={},r={},i=e.split(/\s+/),a=0;a<i.length;a++){var n=i[a];if(!!n){var n=at(n),s=n.toLowerCase();if(t[s])throw Error("Invalid request option: observing multiple case variations of the same attribute is not supported.");r[n]=!0,t[s]=!0}}return Object.keys(r)}function xt(e){var t={};return e.forEach(function(r){r.qualifiers.forEach(function(i){t[i.attrName]=!0})}),Object.keys(t)}var Ht=function(){function e(t){var r=this;this.connected=!1,this.options=e.validateOptions(t),this.observerOptions=e.createObserverOptions(this.options.queries),this.root=this.options.rootNode,this.callback=this.options.callback,this.elementFilter=Array.prototype.concat.apply([],this.options.queries.map(function(i){return i.elementFilter?i.elementFilter:[]})),this.elementFilter.length||(this.elementFilter=void 0),this.calcReordered=this.options.queries.some(function(i){return i.all}),this.queryValidators=[],e.createQueryValidator&&(this.queryValidators=this.options.queries.map(function(i){return e.createQueryValidator(r.root,i)})),this.observer=new L(function(i){r.observerCallback(i)}),this.reconnect()}return e.createObserverOptions=function(t){var r={childList:!0,subtree:!0},i;function a(n){if(!(r.attributes&&!i)){if(r.attributes=!0,r.attributeOldValue=!0,!n){i=void 0;return}i=i||{},n.forEach(function(s){i[s]=!0,i[s.toLowerCase()]=!0})}}return t.forEach(function(n){if(n.characterData){r.characterData=!0,r.characterDataOldValue=!0;return}if(n.all){a(),r.characterData=!0,r.characterDataOldValue=!0;return}if(n.attribute){a([n.attribute.trim()]);return}var s=xt(n.elementFilter).concat(n.attributeList||[]);s.length&&a(s)}),i&&(r.attributeFilter=Object.keys(i)),r},e.validateOptions=function(t){for(var r in t)if(!(r in e.optionKeys))throw Error("Invalid option: "+r);if(typeof t.callback!="function")throw Error("Invalid options: callback is required and must be a function");if(!t.queries||!t.queries.length)throw Error("Invalid options: queries must contain at least one query request object.");for(var i={callback:t.callback,rootNode:t.rootNode||document,observeOwnChanges:!!t.observeOwnChanges,oldPreviousSibling:!!t.oldPreviousSibling,queries:[]},a=0;a<t.queries.length;a++){var n=t.queries[a];if(n.all){if(Object.keys(n).length>1)throw Error("Invalid request option. all has no options.");i.queries.push({all:!0});continue}if("attribute"in n){var s={attribute:at(n.attribute)};if(s.elementFilter=F.parseSelectors("*["+s.attribute+"]"),Object.keys(n).length>1)throw Error("Invalid request option. attribute has no options.");i.queries.push(s);continue}if("element"in n){var c=Object.keys(n).length,s={element:n.element,elementFilter:F.parseSelectors(n.element)};if(n.hasOwnProperty("elementAttributes")&&(s.attributeList=Vt(n.elementAttributes),c--),c>1)throw Error("Invalid request option. element only allows elementAttributes option.");i.queries.push(s);continue}if(n.characterData){if(Object.keys(n).length>1)throw Error("Invalid request option. characterData has no options.");i.queries.push({characterData:!0});continue}throw Error("Invalid request option. Unknown query request.")}return i},e.prototype.createSummaries=function(t){if(!t||!t.length)return[];for(var r=new kt(this.root,t,this.elementFilter,this.calcReordered,this.options.oldPreviousSibling),i=[],a=0;a<this.options.queries.length;a++)i.push(new Mt(r,this.options.queries[a]));return i},e.prototype.checkpointQueryValidators=function(){this.queryValidators.forEach(function(t){t&&t.recordPreviousState()})},e.prototype.runQueryValidators=function(t){this.queryValidators.forEach(function(r,i){r&&r.validate(t[i])})},e.prototype.changesToReport=function(t){return t.some(function(r){var i=["added","removed","reordered","reparented","valueChanged","characterDataChanged"];if(i.some(function(s){return r[s]&&r[s].length}))return!0;if(r.attributeChanged){var a=Object.keys(r.attributeChanged),n=a.some(function(s){return!!r.attributeChanged[s].length});if(n)return!0}return!1})},e.prototype.observerCallback=function(t){this.options.observeOwnChanges||this.observer.disconnect();var r=this.createSummaries(t);this.runQueryValidators(r),this.options.observeOwnChanges&&this.checkpointQueryValidators(),this.changesToReport(r)&&this.callback(r),!this.options.observeOwnChanges&&this.connected&&(this.checkpointQueryValidators(),this.observer.observe(this.root,this.observerOptions))},e.prototype.reconnect=function(){if(this.connected)throw Error("Already connected");this.observer.observe(this.root,this.observerOptions),this.connected=!0,this.checkpointQueryValidators()},e.prototype.takeSummaries=function(){if(!this.connected)throw Error("Not connected");var t=this.createSummaries(this.observer.takeRecords());return this.changesToReport(t)?t:void 0},e.prototype.disconnect=function(){var t=this.takeSummaries();return this.observer.disconnect(),this.connected=!1,t},e.NodeMap=N,e.parseElementFilter=F.parseSelectors,e.optionKeys={callback:!0,queries:!0,rootNode:!0,oldPreviousSibling:!0,observeOwnChanges:!0},e}();st.exports=Ht});var vt=Rt(ot());var Ft={className:"plg-donate",path:"/widgets/donate",params:["amount","tipRate","firstName","lastName","email","locale","currency","subscription","pledge","honoreeName","styleBrandColor","styleSeamless","styleHideHeader","styleHideFooter","styleHideSocial","template","enableSession","donationTags","disableHeaderLink","paymentMethod","publicFeedOption"],iframeOptions:{allow:"payment",allowPaymentRequest:!0,title:"Donation Form"},intersection:!0,identifier(e){return e.widgetId||[e.partnerKey,e.itemId||e.externalId||["ein",e.ein].join("/")].filter(Boolean).join("/")},height(e){if(e.height&&e.height!="auto")return e.height;let t=374;return e.styleHideHeader&&(t=t-138),e.styleHideFooter&&(t=t-56),t.toString()},autoHeight(e){return!e.height||e.height==="auto"},isValid(e){return e.widgetId||e.partnerKey&&(e.itemId||e.externalId||e.ein)}},R=Ft;var Ut={className:"plg-impact",path:"/widgets/impact",params:["responsive"],iframeOptions:{scrolling:"no"},identifier(e){return e.widgetId},height(e,t){let r=e.width||"100%",i=/%$/.test(r)?t.offsetWidth*(parseFloat(r)/100):parseInt(r);return i<400?i*191/250:i*73/400},autoHeight(){return!0},isValid(e){return e.widgetId}},U=Ut;var Yt={iframeOptions:{scrolling:"no"},identifier(e){return[e.partnerKey,e.itemId].filter(Boolean).join("/")},height(e){return e.height&&e.height!=="auto"?e.height:"220"},autoHeight(e){return!e.height||e.height==="auto"},isValid(e){return e.partnerKey}},D=Yt;var Wt=e=>{try{return JSON.parse(e)}catch(t){return e}},S=Wt;var jt=(e,t)=>{let r=[e,e.replace(/^https?:\/\/([^.]+\.)?pledgeling\.com$/,"https://$1pledge.to"),e.replace(/^https?:\/\/([^.]+\.)?pledgeling\.test$/,"https://$1pledge.test")];return a=>{r.indexOf(a.origin)>-1&&t(a)}},A=jt;var qt=({dataset:e,element:t,iframe:r,origin:i})=>{if(!e.searchToDonate)return;let a=s=>{let c=document.createElement("div");c.className="plg-donate",c.setAttribute("data-partner-key",e.partnerKey),c.setAttribute("data-ein",s.ein),c.setAttribute("data-x-search-widget",s.search_widget),c.setAttribute("data-x-original-item-id",e.itemId),t.style.display="none",t.parentNode.insertBefore(c,t)},n=s=>{if(s.source!=r.contentWindow)return;let c=S(s.data);switch(c.action){case"searchToDonateOrganizationSet":return a(c.data)}};addEventListener("message",A(i,n))},ht=qt;var Qt=O(I({},D),{className:"plg-search",path:"/widgets/search",params:["organizationId","organizationIds","multipleOrganizations","maxOrganizations","beneficiaryId","beneficiaryUuid","beneficiaryType","goal","eventType","featuredId","featuredUuid","featuredCopy","featuredPaid","template","matching"],init:ht}),P=Qt;var zt=O(I({},D),{className:"plg-crowd",path:"/widgets/crowd",params:["goal","purpose","template"]}),Y=zt;var $t=O(I({},D),{className:"plg-host",path:"/widgets/host",params:P.params.concat("purpose"),height(e){return e.height&&e.height!=="auto"?e.height:"255"}}),W=$t;var Bt={className:"plg-goal",path:"/widgets/goal",params:["showActiveTotals","showChangeAction","showDonateAction"],iframeOptions:{scrolling:"no"},iframeStyle:{transition:"height 0.3s"},identifier(e){return[e.partnerKey,e.itemId].filter(Boolean).join("/")},height(){return"150"},autoHeight(){return!0},isValid(e){return e.partnerKey&&e.itemId}},j=Bt;var Kt=O(I({},R),{className:"plg-donate-gift",iframeOptions:O(I({},R.iframeOptions),{scrolling:"no"}),standardParams:O(I({},R.standardParams),{template:"impact-gifts"})}),q=Kt;var Xt={LOAD_ATTR:"data-stay-back-this-widget-is-loaded",Widgets:{[R.className]:R,[U.className]:U,[P.className]:P,[Y.className]:Y,[W.className]:W,[j.className]:j,[q.className]:q}},k=Xt;var ut=[],ct=e=>{e.target.style.transition="",e.target.removeEventListener("transitionend",ct)},Zt=(e,t,r)=>{let i=ut.find(a=>a.contentWindow==e);i&&i.style.height!=t&&(r&&(i.style.transition="height 0.3s",i.addEventListener("transitionend",ct)),i.style.height=t)},Jt=e=>{let t=S(e.data),r=!1;switch(t.message){case"setWidgetHeightSmooth":r=!0;case"setWidgetHeight":return Zt(e.source,`${t.data}px`,r)}},Gt={add(e){ut.push(e)},init(e){addEventListener("message",A(e,Jt))}},Q=Gt;(function(){"use strict";if(typeof window!="object")return;if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var e=window.document,t=[];function r(o){this.time=o.time,this.target=o.target,this.rootBounds=o.rootBounds,this.boundingClientRect=o.boundingClientRect,this.intersectionRect=o.intersectionRect||y(),this.isIntersecting=!!o.intersectionRect;var h=this.boundingClientRect,u=h.width*h.height,v=this.intersectionRect,E=v.width*v.height;u?this.intersectionRatio=Number((E/u).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function i(o,h){var u=h||{};if(typeof o!="function")throw new Error("callback must be a function");if(u.root&&u.root.nodeType!=1)throw new Error("root must be an Element");this._checkForIntersections=n(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=o,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(u.rootMargin),this.thresholds=this._initThresholds(u.threshold),this.root=u.root||null,this.rootMargin=this._rootMarginValues.map(function(v){return v.value+v.unit}).join(" ")}i.prototype.THROTTLE_TIMEOUT=100,i.prototype.POLL_INTERVAL=null,i.prototype.USE_MUTATION_OBSERVER=!0,i.prototype.observe=function(o){var h=this._observationTargets.some(function(u){return u.element==o});if(!h){if(!(o&&o.nodeType==1))throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:o,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},i.prototype.unobserve=function(o){this._observationTargets=this._observationTargets.filter(function(h){return h.element!=o}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},i.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},i.prototype.takeRecords=function(){var o=this._queuedEntries.slice();return this._queuedEntries=[],o},i.prototype._initThresholds=function(o){var h=o||[0];return Array.isArray(h)||(h=[h]),h.sort().filter(function(u,v,E){if(typeof u!="number"||isNaN(u)||u<0||u>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return u!==E[v-1]})},i.prototype._parseRootMargin=function(o){var h=o||"0px",u=h.split(/\s+/).map(function(v){var E=/^(-?\d*\.?\d+)(px|%)$/.exec(v);if(!E)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(E[1]),unit:E[2]}});return u[1]=u[1]||u[0],u[2]=u[2]||u[0],u[3]=u[3]||u[1],u},i.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(window,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},i.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,c(window,"resize",this._checkForIntersections,!0),c(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},i.prototype._checkForIntersections=function(){var o=this._rootIsInDom(),h=o?this._getRootRect():y();this._observationTargets.forEach(function(u){var v=u.element,E=d(v),w=this._rootContainsTarget(v),C=u.entry,_=o&&w&&this._computeTargetAndRootIntersection(v,h),T=u.entry=new r({time:a(),target:v,boundingClientRect:E,rootBounds:h,intersectionRect:_});C?o&&w?this._hasCrossedThreshold(C,T)&&this._queuedEntries.push(T):C&&C.isIntersecting&&this._queuedEntries.push(T):this._queuedEntries.push(T)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},i.prototype._computeTargetAndRootIntersection=function(o,h){if(window.getComputedStyle(o).display!="none"){for(var u=d(o),v=u,E=p(o),w=!1;!w;){var C=null,_=E.nodeType==1?window.getComputedStyle(E):{};if(_.display=="none")return;if(E==this.root||E==e?(w=!0,C=h):E!=e.body&&E!=e.documentElement&&_.overflow!="visible"&&(C=d(E)),C&&(v=m(C,v),!v))break;E=p(E)}return v}},i.prototype._getRootRect=function(){var o;if(this.root)o=d(this.root);else{var h=e.documentElement,u=e.body;o={top:0,left:0,right:h.clientWidth||u.clientWidth,width:h.clientWidth||u.clientWidth,bottom:h.clientHeight||u.clientHeight,height:h.clientHeight||u.clientHeight}}return this._expandRectByRootMargin(o)},i.prototype._expandRectByRootMargin=function(o){var h=this._rootMarginValues.map(function(v,E){return v.unit=="px"?v.value:v.value*(E%2?o.width:o.height)/100}),u={top:o.top-h[0],right:o.right+h[1],bottom:o.bottom+h[2],left:o.left-h[3]};return u.width=u.right-u.left,u.height=u.bottom-u.top,u},i.prototype._hasCrossedThreshold=function(o,h){var u=o&&o.isIntersecting?o.intersectionRatio||0:-1,v=h.isIntersecting?h.intersectionRatio||0:-1;if(u!==v)for(var E=0;E<this.thresholds.length;E++){var w=this.thresholds[E];if(w==u||w==v||w<u!=w<v)return!0}},i.prototype._rootIsInDom=function(){return!this.root||b(e,this.root)},i.prototype._rootContainsTarget=function(o){return b(this.root||e,o)},i.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},i.prototype._unregisterInstance=function(){var o=t.indexOf(this);o!=-1&&t.splice(o,1)};function a(){return window.performance&&performance.now&&performance.now()}function n(o,h){var u=null;return function(){u||(u=setTimeout(function(){o(),u=null},h))}}function s(o,h,u,v){typeof o.addEventListener=="function"?o.addEventListener(h,u,v||!1):typeof o.attachEvent=="function"&&o.attachEvent("on"+h,u)}function c(o,h,u,v){typeof o.removeEventListener=="function"?o.removeEventListener(h,u,v||!1):typeof o.detatchEvent=="function"&&o.detatchEvent("on"+h,u)}function m(o,h){var u=Math.max(o.top,h.top),v=Math.min(o.bottom,h.bottom),E=Math.max(o.left,h.left),w=Math.min(o.right,h.right),C=w-E,_=v-u;return C>=0&&_>=0&&{top:u,bottom:v,left:E,right:w,width:C,height:_}}function d(o){var h;try{h=o.getBoundingClientRect()}catch(u){}return h?(h.width&&h.height||(h={top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.right-h.left,height:h.bottom-h.top}),h):y()}function y(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function b(o,h){for(var u=h;u;){if(u==o)return!0;u=p(u)}return!1}function p(o){var h=o.parentNode;return h&&h.nodeType==11&&h.host?h.host:h&&h.assignedSlot?h.assignedSlot.parentNode:h}window.IntersectionObserver=i,window.IntersectionObserverEntry=r})();var lt=[],dt=(e,t)=>{e.contentWindow.postMessage(JSON.stringify({message:"isIntersecting",data:t,frameToken:e._frameToken}),"*")},te=e=>e.forEach(t=>{t.target._frameToken?dt(t.target,t.isIntersecting):t.target._isIntersecting=t.isIntersecting}),ee=(e,t)=>{let r=lt.find(i=>i.contentWindow==e);!r||(r._frameToken=t,dt(r,r._isIntersecting),delete r._isIntersecting)},re=e=>{let t=S(e.data);switch(t.message){case"intersectionLoaded":return ee(e.source,t.frameToken)}},ie={add(e){lt.push(e),this.observer.observe(e)},init(e){this.observer=new IntersectionObserver(te),addEventListener("message",A(e,re))}},z=ie;var ae=e=>/^\d*(\.\d+)?$/.test(e)?`${e}px`:e,$=ae;var ne=(e,t)=>t.reduce((r,i)=>(e[i]!==void 0&&(r[i]=e[i]),r),{}),B=ne;var se=e=>e.replace(/([A-Z])/g,(t,r)=>`_${r.toLowerCase()}`),oe=e=>e.replace(/([A-Z])/g,(t,r)=>`-${r.toLowerCase()}`),he=e=>`data-${oe(e)}`,ue=e=>B(e,Object.keys(e).filter(t=>/^x[A-Z]/.test(t))),ft=(e,t)=>Object.keys(e).filter(r=>e[r]).map(r=>[encodeURIComponent(t(r)),encodeURIComponent(e[r])].join("=")).join("&"),ce=(e,t)=>O(I(I({},B(e,t.params)),t.standardParams),{embeddedOn:location.href||1}),le=(e,t,r)=>{let i=e.dataset;if(!t.isValid(i))return console.error("Invalid widget config"),!1;let a=[t.path,t.identifier(i)].join("/"),n=ce(i,t),s=ft(ue(i),he),c=ft(O(I({},n),{metadata:s}),se),m=r+[a,c].join("?"),d=document.createElement("iframe");for(d.className=`${t.className}-iframe ${i.iframeClass||""}`,d.src=m,d.style.width=$(i.width||"100%"),d.style.height=$(t.height(i,e)),d.style.border=0,d.style.display="block",d.setAttribute("role","presentation"),t.iframeOptions&&Object.keys(t.iframeOptions).forEach(y=>d[y]=t.iframeOptions[y]),t.iframeStyle&&Object.keys(t.iframeStyle).forEach(y=>d.style[y]=t.iframeStyle[y]);e.firstChild;)e.removeChild(e.firstChild);return e.appendChild(d),t.init&&t.init({dataset:i,element:e,iframe:d,origin:r}),{iframe:d,autoHeight:t.autoHeight(i,e),intersection:t.intersection}},pt=le;var mt=document.currentScript,X=new URL(mt.src,location).origin,gt=e=>{if(e.getAttribute(k.LOAD_ATTR))return;e.setAttribute(k.LOAD_ATTR,"1");let t=Object.keys(k.Widgets).filter(s=>e.className.split(" ").indexOf(s)>-1);if(t.length>1)return console.error("Widget can only be of one type",t);let r=k.Widgets[t[0]],{iframe:i,autoHeight:a,intersection:n}=pt(e,r,X);a&&Q.add(i),n&&z.add(i)},K=()=>{let e="."+Object.keys(k.Widgets).join(",.");document.querySelectorAll(e).forEach(gt),new vt.default({callback(t){t[0].added.forEach(gt)},queries:[{element:e}]})},bt=()=>{let e=mt.dataset;e.exposeAs&&(window[e.exposeAs]={init:K}),Q.init(X),z.init(X),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",K):setTimeout(K,1)};bt();})(); //# sourceMappingURL=//assets.pledge.to/assets/widget.js-079f9df747d92cad1ab799e2248dc298a75bf4cda88e960fa6adb96f7eb97897.map //! ;