@pactsafe/pactsafe-react-sdk
Advanced tools
Comparing version 2.6.1 to 2.7.0
@@ -76,2 +76,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
_ps('set', 'client_library', 'react-sdk'); | ||
_ps('set', 'client_version', "2.7.0"); | ||
return _this; | ||
@@ -78,0 +82,0 @@ } |
@@ -93,3 +93,3 @@ /* | ||
for (var i = 0; i < scripts.length; i += 1) { | ||
if (scripts[i].src.indexOf(psScriptURL) !== -1) { | ||
if (scripts[i].src && scripts[i].src.indexOf(psScriptURL) !== -1) { | ||
return true; | ||
@@ -96,0 +96,0 @@ } |
@@ -87,2 +87,6 @@ "use strict"; | ||
_ps('set', 'client_library', 'react-sdk'); | ||
_ps('set', 'client_version', "2.7.0"); | ||
return _this; | ||
@@ -89,0 +93,0 @@ } |
@@ -95,3 +95,3 @@ "use strict"; | ||
for (var i = 0; i < scripts.length; i += 1) { | ||
if (scripts[i].src.indexOf(psScriptURL) !== -1) { | ||
if (scripts[i].src && scripts[i].src.indexOf(psScriptURL) !== -1) { | ||
return true; | ||
@@ -98,0 +98,0 @@ } |
{ | ||
"name": "@pactsafe/pactsafe-react-sdk", | ||
"version": "2.6.1", | ||
"version": "2.7.0", | ||
"description": "PactSafe React SDK - React SDK for easy Clickwrap/Browsewrap implementation leveraging PactSafe's JavaScript API", | ||
@@ -45,2 +45,3 @@ "author": "PactSafe", | ||
"babel-jest": "^23.6.0", | ||
"babel-plugin-search-and-replace": "^1.1.1", | ||
"babel-preset-env": "^1.7.0", | ||
@@ -47,0 +48,0 @@ "babel-preset-react": "^6.24.1", |
/*! | ||
* @pactsafe/pactsafe-react-sdk v2.6.1 - https://github.com/PactSafe/pactsafe-react-sdk | ||
* @pactsafe/pactsafe-react-sdk v2.7.0 - https://github.com/PactSafe/pactsafe-react-sdk | ||
* MIT Licensed | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.PSReactSDK=t(require("react")):e.PSReactSDK=t(e.React)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,t){e.exports={injectSnippet:function(e,t){var r,n,o,i,a,c,s,u,p,l;r=window,n=document,o="script",i=e,a=t,c="_ps",s=function(){console.log("Unable to load the PactSafe PS.JS Library.")},r.PactSafeObject=c,r._ps=r._ps||function(){(r._ps.q=r._ps.q||[]).push(arguments)},r._ps.on=function(){(r._ps.e=r._ps.e||[]).push(arguments)},r._ps.once=function(){(r._ps.eo=r._ps.eo||[]).push(arguments)},r._ps.off=function(){(r._ps.o=r._ps.o||[]).push(arguments)},r._ps.t=1*new Date,r._ps.l=0,u=n.createElement(o),p=n.getElementsByTagName(o)[0],u.async=1,u.src=i,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p?p.parentNode.insertBefore(u,p):document.body.appendChild(u),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,(u=n.createElement(o)).async=1,u.src=a,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p.parentNode.insertBefore(u,p),(l=function(e,t){try{(t=n.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+r._ps.t+"&u="+encodeURIComponent(e),n.getElementsByTagName("body")[0].appendChild(t)}catch(e){}})(i),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,s&&s.call(this),l(a))}),4e3))}),4e3)},isSnippetLoaded:function(e){var t=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r,n){return"boolean"==typeof e?e:"function"==typeof e?e(t,r,n):!(!0!=!!e||!e)},o=function(e,t){return Object.hasOwnProperty.call(e,t)},i=function(e,t,r,n){return n?new Error(n):new Error("Required "+e[t]+" `"+t+"` was not specified in `"+r+"`.")};t.default=function(e,t,r){return function(e,t){if("function"!=typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(t&&"string"!=typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,r),function(a,c,s){for(var u=arguments.length,p=Array(3<u?u-3:0),l=3;l<u;l++)p[l-3]=arguments[l];return n(t,a,c,s)?o(a,c)?e.apply(void 0,[a,c,s].concat(p)):i(a,c,s,r):e.apply(void 0,[a,c,s].concat(p))}}},function(e,t,r){var n=r(6),o=r(7);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[i+c]=a[c];return t||o(a)}},function(e,t,r){(function(e,r){var n="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",c=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[n]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[o]=u["[object Number]"]=u[i]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var p="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,f=p||l||Function("return this")(),d=t&&!t.nodeType&&t,_=d&&"object"==typeof r&&r&&!r.nodeType&&r,y=_&&_.exports===d,h=y&&p.process,v=function(){try{return h&&h.binding&&h.binding("util")}catch(e){}}(),g=v&&v.isTypedArray;function b(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function m(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function j(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var S,w,E,O=Array.prototype,k=Function.prototype,A=Object.prototype,P=f["__core-js_shared__"],R=k.toString,L=A.hasOwnProperty,M=(S=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",I=A.toString,D=RegExp("^"+R.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=y?f.Buffer:void 0,x=f.Symbol,K=f.Uint8Array,B=A.propertyIsEnumerable,C=O.splice,W=x?x.toStringTag:void 0,U=Object.getOwnPropertySymbols,z=T?T.isBuffer:void 0,N=(w=Object.keys,E=Object,function(e){return w(E(e))}),G=ve(f,"DataView"),V=ve(f,"Map"),F=ve(f,"Promise"),$=ve(f,"Set"),q=ve(f,"WeakMap"),Y=ve(Object,"create"),H=je(G),J=je(V),Q=je(F),X=je($),Z=je(q),ee=x?x.prototype:void 0,te=ee?ee.valueOf:void 0;function re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new oe;++t<r;)this.add(e[t])}function ae(e){var t=this.__data__=new ne(e);this.size=t.size}function ce(e,t){var r=Ee(e),n=!r&&we(e),o=!r&&!n&&Oe(e),i=!r&&!n&&!o&&Le(e),a=r||n||o||i,c=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=c.length;for(var u in e)!t&&!L.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||me(u,s))||c.push(u);return c}function se(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=L.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(e){}var o=I.call(e);n&&(t?e[W]=r:delete e[W]);return o}(e):function(e){return I.call(e)}(e)}function pe(e){return Re(e)&&ue(e)==n}function le(e,t,r,c,s){return e===t||(null==e||null==t||!Re(e)&&!Re(t)?e!=e&&t!=t:function(e,t,r,c,s,u){var p=Ee(e),l=Ee(t),f=p?"[object Array]":be(e),d=l?"[object Array]":be(t),_=(f=f==n?i:f)==i,y=(d=d==n?i:d)==i,h=f==d;if(h&&Oe(e)){if(!Oe(t))return!1;p=!0,_=!1}if(h&&!_)return u||(u=new ae),p||Le(e)?_e(e,t,r,c,s,u):function(e,t,r,n,i,c,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new K(e),new K(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var u=m;case a:var p=1&n;if(u||(u=j),e.size!=t.size&&!p)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var f=_e(u(e),u(t),n,i,c,s);return s.delete(e),f;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,f,r,c,s,u);if(!(1&r)){var v=_&&L.call(e,"__wrapped__"),g=y&&L.call(t,"__wrapped__");if(v||g){var b=v?e.value():e,S=g?t.value():t;return u||(u=new ae),s(b,S,r,c,u)}}if(!h)return!1;return u||(u=new ae),function(e,t,r,n,o,i){var a=1&r,c=ye(e),s=c.length,u=ye(t).length;if(s!=u&&!a)return!1;var p=s;for(;p--;){var l=c[p];if(!(a?l in t:L.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var d=!0;i.set(e,t),i.set(t,e);var _=a;for(;++p<s;){l=c[p];var y=e[l],h=t[l];if(n)var v=a?n(h,y,l,t,e,i):n(y,h,l,e,t,i);if(!(void 0===v?y===h||o(y,h,r,n,i):v)){d=!1;break}_||(_="constructor"==l)}if(d&&!_){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,c,s,u)}(e,t,r,c,le,s))}function fe(e){return!(!Pe(e)||function(e){return!!M&&M in e}(e))&&(ke(e)?D:c).test(je(e))}function de(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||A,t!==n)return N(e);var t,r,n,o=[];for(var i in Object(e))L.call(e,i)&&"constructor"!=i&&o.push(i);return o}function _e(e,t,r,n,o,i){var a=1&r,c=e.length,s=t.length;if(c!=s&&!(a&&s>c))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,l=!0,f=2&r?new ie:void 0;for(i.set(e,t),i.set(t,e);++p<c;){var d=e[p],_=t[p];if(n)var y=a?n(_,d,p,t,e,i):n(d,_,p,e,t,i);if(void 0!==y){if(y)continue;l=!1;break}if(f){if(!b(t,(function(e,t){if(a=t,!f.has(a)&&(d===e||o(d,e,r,n,i)))return f.push(t);var a}))){l=!1;break}}else if(d!==_&&!o(d,_,r,n,i)){l=!1;break}}return i.delete(e),i.delete(t),l}function ye(e){return function(e,t,r){var n=t(e);return Ee(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Me,ge)}function he(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ve(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return fe(r)?r:void 0}re.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return L.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:L.call(t,e)},re.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,r=se(t,e);return!(r<0)&&(r==t.length-1?t.pop():C.call(t,r,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,r=se(t,e);return r<0?void 0:t[r][1]},ne.prototype.has=function(e){return se(this.__data__,e)>-1},ne.prototype.set=function(e,t){var r=this.__data__,n=se(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(V||ne),string:new re}},oe.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return he(this,e).get(e)},oe.prototype.has=function(e){return he(this,e).has(e)},oe.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ne,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ne){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new oe(n)}return r.set(e,t),this.size=r.size,this};var ge=U?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(U(e),(function(t){return B.call(e,t)})))}:function(){return[]},be=ue;function me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}function je(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(G&&"[object DataView]"!=be(new G(new ArrayBuffer(1)))||V&&be(new V)!=o||F&&"[object Promise]"!=be(F.resolve())||$&&be(new $)!=a||q&&"[object WeakMap]"!=be(new q))&&(be=function(e){var t=ue(e),r=t==i?e.constructor:void 0,n=r?je(r):"";if(n)switch(n){case H:return"[object DataView]";case J:return o;case Q:return"[object Promise]";case X:return a;case Z:return"[object WeakMap]"}return t});var we=pe(function(){return arguments}())?pe:function(e){return Re(e)&&L.call(e,"callee")&&!B.call(e,"callee")},Ee=Array.isArray;var Oe=z||function(){return!1};function ke(e){if(!Pe(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var Le=g?function(e){return function(t){return e(t)}}(g):function(e){return Re(e)&&Ae(e.length)&&!!u[ue(e)]};function Me(e){return null!=(t=e)&&Ae(t.length)&&!ke(t)?ce(e):de(e);var t}r.exports=function(e,t){return le(e,t)}}).call(this,r(8),r(9)(e))},function(e,t,r){e.exports=r(10)},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";r.r(t),r.d(t,"PSClickWrap",(function(){return _})),r.d(t,"PSBrowseWrap",(function(){return h}));var n=r(0),o=r.n(n),i=(r(2),r(3)),a=r.n(i),c=r(4),s=r.n(c),u=r(1),p=r.n(u);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e){var t,r;function n(t){var r,n,o,i;r=e.call(this,t)||this,n=f(r),i=!1,(o="_isMounted")in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,r.createClickWrap=r.createClickWrap.bind(f(r)),r.state={clickwrapGroupKey:null,dynamicGroup:!1},r.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var a=r.props,c=a.accessId,s=a.backupScriptURL,u=a.debug,l=a.disableSending,d=a.dynamic,_=a.injectSnippetOnly,y=a.psScriptUrl,h=a.signerId,v=a.testMode;return p.a.isSnippetLoaded(y,s)||p.a.injectSnippet(y,s),u&&(_ps.debug=!0),_?f(r):(_ps("create",c,{test_mode:v,disable_sending:l,dynamic:d,signer_id:h}),r)}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){var e=this.props.injectSnippetOnly;this._isMounted=!0,e||this.createClickWrap()},i.componentDidUpdate=function(e){var t=this.props,r=t.clickWrapStyle,n=t.filter,o=t.groupKey,i=t.injectSnippetOnly,a=t.renderData,c=t.signerId,u=this.state,p=u.clickwrapGroupKey,l=u.dynamicGroup,f=_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&p&&_ps.getByKey(p);i||(r!==e.clickWrapStyle&&!l&&f&&(_ps.getByKey(p).site.set("style",r),_ps.getByKey(p).retrieveHTML()),s()(a,e.renderData)||(r&&f&&_ps.getByKey(p).site.set("style",r),_ps(p+":retrieveHTML",a)),c!==e.signerId&&(r&&f&&_ps.getByKey(p).site.set("style",r),_ps("set","signer_id",c)),r!==e.clickWrapStyle&&l&&this.createClickWrap(),n!==e.filter&&this.createClickWrap(),o===e.groupKey||l||(this.createClickWrap(),f&&_ps.getByKey(p).retrieveHTML()))},i.componentWillUnmount=function(){this._isMounted=!1;var e=this.props,t=e.injectSnippetOnly,r=e.groupKey;t||(_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&_ps.getByKey(r)&&(_ps.getByKey(r).rendered&&(_ps.getByKey(r).rendered=!1),_ps.getByKey(r).resetData()),this.unregisterEventListeners())},i.registerEventListener=function(e,t){var r=this,n=function(){for(var n,o=!1,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];(a.forEach((function(e){(e&&e.get&&e.get("key")&&e.get("key")===t||e&&"[object Site]"===e.toString())&&(o=!0)})),o)&&(n=r.props)[e].apply(n,a)},o=a()();return n.toString=function(){return o},_ps.on(this.propsEventMap[e],n),n.toString()},i.registerEventListeners=function(e){var t=this,r={};Object.keys(this.propsEventMap).forEach((function(n){t.props[n]&&(r[t.propsEventMap[n]]=t.registerEventListener(n,e))})),this._isMounted&&this.setState({eventListeners:r})},i.unregisterEventListeners=function(){var e=this;this.state.eventListeners&&Object.keys(this.state.eventListeners).forEach((function(t){var r=e.state.eventListeners[t],n=function(){return r};n.toString=function(){return r},_ps.off(t,n)}))},i.createClickWrap=function(){var e=this,t=this.props,r=t.clickWrapStyle,n=t.confirmationEmail,o=t.containerId,i=t.displayAll,a=t.displayImmediately,c=t.filter,s=t.forceScroll,u=t.groupKey,p=t.injectSnippetOnly,f=t.renderData,d={filter:c,container_selector:o,confirmation_email:n,signer_id_selector:t.signerIdSelector,style:r,display_all:i,render_data:f,auto_run:a,force_scroll:s,allow_disagreed:t.allowDisagreed||!1};if(!p){u&&this._isMounted&&this.setState({clickwrapGroupKey:u,dynamicGroup:!1});var _=!u,y=function(t,r){if(r){var n=u||r.get("key"),o={clickwrapGroupKey:n};_&&(o.dynamicGroup=!0),e._isMounted&&e.setState(o),_||r.render(),e.registerEventListeners(n)}};u?_ps("load",u,l({},d,{event_callback:y})):_ps("load",l({},d,{event_callback:y}))}},i.render=function(){var e=this.props.containerId;return o.a.createElement("div",{id:e})},n}(o.a.Component);d.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",d.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",d.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",d.MUST_SET_ALLOW_DISAGREED="PSClickWrap Error: You must set allowDisagreed as true to make onInvalid work",d.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var _=d;var y=function(e){var t,r;function n(t){var r,n=(r=e.call(this,t)||this).props,o=n.psScriptUrl,i=n.groupKey,a=n.accessId;return p.a.isSnippetLoaded(o)||p.a.injectSnippet(o),r.targetSelector="psbw-"+i,_ps("create",a),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){var e=this.props,t=e.groupKey,r=e.position,n=e.badgeText,o=e.alwaysVisible,i=e.openLegalCenter;_ps("load",t,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},i.componentWillUnmount=function(){var e=this.props.groupKey;_ps.getByKey(e).rendered=!1},i.isSnippetLoaded=function(){for(var e=this.props.psScriptUrl,t=document.getElementsByTagName("script"),r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1},i.render=function(){var e=this.props,t=e.link,r=e.linkText;return o.a.createElement("a",{href:t,id:this.targetSelector},r)},n}(o.a.Component);y.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",y.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var h=y}]).default})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.PSReactSDK=t(require("react")):e.PSReactSDK=t(e.React)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,t){e.exports={injectSnippet:function(e,t){var r,n,o,i,a,c,s,u,p,l;r=window,n=document,o="script",i=e,a=t,c="_ps",s=function(){console.log("Unable to load the PactSafe PS.JS Library.")},r.PactSafeObject=c,r._ps=r._ps||function(){(r._ps.q=r._ps.q||[]).push(arguments)},r._ps.on=function(){(r._ps.e=r._ps.e||[]).push(arguments)},r._ps.once=function(){(r._ps.eo=r._ps.eo||[]).push(arguments)},r._ps.off=function(){(r._ps.o=r._ps.o||[]).push(arguments)},r._ps.t=1*new Date,r._ps.l=0,u=n.createElement(o),p=n.getElementsByTagName(o)[0],u.async=1,u.src=i,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p?p.parentNode.insertBefore(u,p):document.body.appendChild(u),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,(u=n.createElement(o)).async=1,u.src=a,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p.parentNode.insertBefore(u,p),(l=function(e,t){try{(t=n.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+r._ps.t+"&u="+encodeURIComponent(e),n.getElementsByTagName("body")[0].appendChild(t)}catch(e){}})(i),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,s&&s.call(this),l(a))}),4e3))}),4e3)},isSnippetLoaded:function(e){var t=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<t.length;r+=1)if(t[r].src&&-1!==t[r].src.indexOf(e))return!0;return!1}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r,n){return"boolean"==typeof e?e:"function"==typeof e?e(t,r,n):!(!0!=!!e||!e)},o=function(e,t){return Object.hasOwnProperty.call(e,t)},i=function(e,t,r,n){return n?new Error(n):new Error("Required "+e[t]+" `"+t+"` was not specified in `"+r+"`.")};t.default=function(e,t,r){return function(e,t){if("function"!=typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(t&&"string"!=typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,r),function(a,c,s){for(var u=arguments.length,p=Array(3<u?u-3:0),l=3;l<u;l++)p[l-3]=arguments[l];return n(t,a,c,s)?o(a,c)?e.apply(void 0,[a,c,s].concat(p)):i(a,c,s,r):e.apply(void 0,[a,c,s].concat(p))}}},function(e,t,r){var n=r(6),o=r(7);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[i+c]=a[c];return t||o(a)}},function(e,t,r){(function(e,r){var n="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",c=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[n]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[o]=u["[object Number]"]=u[i]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var p="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,f=p||l||Function("return this")(),d=t&&!t.nodeType&&t,_=d&&"object"==typeof r&&r&&!r.nodeType&&r,y=_&&_.exports===d,h=y&&p.process,v=function(){try{return h&&h.binding&&h.binding("util")}catch(e){}}(),g=v&&v.isTypedArray;function b(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function m(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function j(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var S,w,E,O=Array.prototype,k=Function.prototype,A=Object.prototype,P=f["__core-js_shared__"],R=k.toString,L=A.hasOwnProperty,M=(S=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",I=A.toString,D=RegExp("^"+R.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=y?f.Buffer:void 0,x=f.Symbol,K=f.Uint8Array,B=A.propertyIsEnumerable,C=O.splice,W=x?x.toStringTag:void 0,U=Object.getOwnPropertySymbols,z=T?T.isBuffer:void 0,N=(w=Object.keys,E=Object,function(e){return w(E(e))}),G=ve(f,"DataView"),V=ve(f,"Map"),F=ve(f,"Promise"),$=ve(f,"Set"),q=ve(f,"WeakMap"),Y=ve(Object,"create"),H=je(G),J=je(V),Q=je(F),X=je($),Z=je(q),ee=x?x.prototype:void 0,te=ee?ee.valueOf:void 0;function re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new oe;++t<r;)this.add(e[t])}function ae(e){var t=this.__data__=new ne(e);this.size=t.size}function ce(e,t){var r=Ee(e),n=!r&&we(e),o=!r&&!n&&Oe(e),i=!r&&!n&&!o&&Le(e),a=r||n||o||i,c=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=c.length;for(var u in e)!t&&!L.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||me(u,s))||c.push(u);return c}function se(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=L.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(e){}var o=I.call(e);n&&(t?e[W]=r:delete e[W]);return o}(e):function(e){return I.call(e)}(e)}function pe(e){return Re(e)&&ue(e)==n}function le(e,t,r,c,s){return e===t||(null==e||null==t||!Re(e)&&!Re(t)?e!=e&&t!=t:function(e,t,r,c,s,u){var p=Ee(e),l=Ee(t),f=p?"[object Array]":be(e),d=l?"[object Array]":be(t),_=(f=f==n?i:f)==i,y=(d=d==n?i:d)==i,h=f==d;if(h&&Oe(e)){if(!Oe(t))return!1;p=!0,_=!1}if(h&&!_)return u||(u=new ae),p||Le(e)?_e(e,t,r,c,s,u):function(e,t,r,n,i,c,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new K(e),new K(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var u=m;case a:var p=1&n;if(u||(u=j),e.size!=t.size&&!p)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var f=_e(u(e),u(t),n,i,c,s);return s.delete(e),f;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,f,r,c,s,u);if(!(1&r)){var v=_&&L.call(e,"__wrapped__"),g=y&&L.call(t,"__wrapped__");if(v||g){var b=v?e.value():e,S=g?t.value():t;return u||(u=new ae),s(b,S,r,c,u)}}if(!h)return!1;return u||(u=new ae),function(e,t,r,n,o,i){var a=1&r,c=ye(e),s=c.length,u=ye(t).length;if(s!=u&&!a)return!1;var p=s;for(;p--;){var l=c[p];if(!(a?l in t:L.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var d=!0;i.set(e,t),i.set(t,e);var _=a;for(;++p<s;){l=c[p];var y=e[l],h=t[l];if(n)var v=a?n(h,y,l,t,e,i):n(y,h,l,e,t,i);if(!(void 0===v?y===h||o(y,h,r,n,i):v)){d=!1;break}_||(_="constructor"==l)}if(d&&!_){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,c,s,u)}(e,t,r,c,le,s))}function fe(e){return!(!Pe(e)||function(e){return!!M&&M in e}(e))&&(ke(e)?D:c).test(je(e))}function de(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||A,t!==n)return N(e);var t,r,n,o=[];for(var i in Object(e))L.call(e,i)&&"constructor"!=i&&o.push(i);return o}function _e(e,t,r,n,o,i){var a=1&r,c=e.length,s=t.length;if(c!=s&&!(a&&s>c))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,l=!0,f=2&r?new ie:void 0;for(i.set(e,t),i.set(t,e);++p<c;){var d=e[p],_=t[p];if(n)var y=a?n(_,d,p,t,e,i):n(d,_,p,e,t,i);if(void 0!==y){if(y)continue;l=!1;break}if(f){if(!b(t,(function(e,t){if(a=t,!f.has(a)&&(d===e||o(d,e,r,n,i)))return f.push(t);var a}))){l=!1;break}}else if(d!==_&&!o(d,_,r,n,i)){l=!1;break}}return i.delete(e),i.delete(t),l}function ye(e){return function(e,t,r){var n=t(e);return Ee(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Me,ge)}function he(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ve(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return fe(r)?r:void 0}re.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return L.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:L.call(t,e)},re.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,r=se(t,e);return!(r<0)&&(r==t.length-1?t.pop():C.call(t,r,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,r=se(t,e);return r<0?void 0:t[r][1]},ne.prototype.has=function(e){return se(this.__data__,e)>-1},ne.prototype.set=function(e,t){var r=this.__data__,n=se(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(V||ne),string:new re}},oe.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return he(this,e).get(e)},oe.prototype.has=function(e){return he(this,e).has(e)},oe.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ne,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ne){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new oe(n)}return r.set(e,t),this.size=r.size,this};var ge=U?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(U(e),(function(t){return B.call(e,t)})))}:function(){return[]},be=ue;function me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}function je(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(G&&"[object DataView]"!=be(new G(new ArrayBuffer(1)))||V&&be(new V)!=o||F&&"[object Promise]"!=be(F.resolve())||$&&be(new $)!=a||q&&"[object WeakMap]"!=be(new q))&&(be=function(e){var t=ue(e),r=t==i?e.constructor:void 0,n=r?je(r):"";if(n)switch(n){case H:return"[object DataView]";case J:return o;case Q:return"[object Promise]";case X:return a;case Z:return"[object WeakMap]"}return t});var we=pe(function(){return arguments}())?pe:function(e){return Re(e)&&L.call(e,"callee")&&!B.call(e,"callee")},Ee=Array.isArray;var Oe=z||function(){return!1};function ke(e){if(!Pe(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var Le=g?function(e){return function(t){return e(t)}}(g):function(e){return Re(e)&&Ae(e.length)&&!!u[ue(e)]};function Me(e){return null!=(t=e)&&Ae(t.length)&&!ke(t)?ce(e):de(e);var t}r.exports=function(e,t){return le(e,t)}}).call(this,r(8),r(9)(e))},function(e,t,r){e.exports=r(10)},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";r.r(t),r.d(t,"PSClickWrap",(function(){return _})),r.d(t,"PSBrowseWrap",(function(){return h}));var n=r(0),o=r.n(n),i=(r(2),r(3)),a=r.n(i),c=r(4),s=r.n(c),u=r(1),p=r.n(u);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e){var t,r;function n(t){var r,n,o,i;r=e.call(this,t)||this,n=f(r),i=!1,(o="_isMounted")in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,r.createClickWrap=r.createClickWrap.bind(f(r)),r.state={clickwrapGroupKey:null,dynamicGroup:!1},r.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var a=r.props,c=a.accessId,s=a.backupScriptURL,u=a.debug,l=a.disableSending,d=a.dynamic,_=a.injectSnippetOnly,y=a.psScriptUrl,h=a.signerId,v=a.testMode;return p.a.isSnippetLoaded(y,s)||p.a.injectSnippet(y,s),u&&(_ps.debug=!0),_?f(r):(_ps("create",c,{test_mode:v,disable_sending:l,dynamic:d,signer_id:h}),_ps("set","client_library","react-sdk"),_ps("set","client_version","2.7.0"),r)}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){var e=this.props.injectSnippetOnly;this._isMounted=!0,e||this.createClickWrap()},i.componentDidUpdate=function(e){var t=this.props,r=t.clickWrapStyle,n=t.filter,o=t.groupKey,i=t.injectSnippetOnly,a=t.renderData,c=t.signerId,u=this.state,p=u.clickwrapGroupKey,l=u.dynamicGroup,f=_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&p&&_ps.getByKey(p);i||(r!==e.clickWrapStyle&&!l&&f&&(_ps.getByKey(p).site.set("style",r),_ps.getByKey(p).retrieveHTML()),s()(a,e.renderData)||(r&&f&&_ps.getByKey(p).site.set("style",r),_ps(p+":retrieveHTML",a)),c!==e.signerId&&(r&&f&&_ps.getByKey(p).site.set("style",r),_ps("set","signer_id",c)),r!==e.clickWrapStyle&&l&&this.createClickWrap(),n!==e.filter&&this.createClickWrap(),o===e.groupKey||l||(this.createClickWrap(),f&&_ps.getByKey(p).retrieveHTML()))},i.componentWillUnmount=function(){this._isMounted=!1;var e=this.props,t=e.injectSnippetOnly,r=e.groupKey;t||(_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&_ps.getByKey(r)&&(_ps.getByKey(r).rendered&&(_ps.getByKey(r).rendered=!1),_ps.getByKey(r).resetData()),this.unregisterEventListeners())},i.registerEventListener=function(e,t){var r=this,n=function(){for(var n,o=!1,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];(a.forEach((function(e){(e&&e.get&&e.get("key")&&e.get("key")===t||e&&"[object Site]"===e.toString())&&(o=!0)})),o)&&(n=r.props)[e].apply(n,a)},o=a()();return n.toString=function(){return o},_ps.on(this.propsEventMap[e],n),n.toString()},i.registerEventListeners=function(e){var t=this,r={};Object.keys(this.propsEventMap).forEach((function(n){t.props[n]&&(r[t.propsEventMap[n]]=t.registerEventListener(n,e))})),this._isMounted&&this.setState({eventListeners:r})},i.unregisterEventListeners=function(){var e=this;this.state.eventListeners&&Object.keys(this.state.eventListeners).forEach((function(t){var r=e.state.eventListeners[t],n=function(){return r};n.toString=function(){return r},_ps.off(t,n)}))},i.createClickWrap=function(){var e=this,t=this.props,r=t.clickWrapStyle,n=t.confirmationEmail,o=t.containerId,i=t.displayAll,a=t.displayImmediately,c=t.filter,s=t.forceScroll,u=t.groupKey,p=t.injectSnippetOnly,f=t.renderData,d={filter:c,container_selector:o,confirmation_email:n,signer_id_selector:t.signerIdSelector,style:r,display_all:i,render_data:f,auto_run:a,force_scroll:s,allow_disagreed:t.allowDisagreed||!1};if(!p){u&&this._isMounted&&this.setState({clickwrapGroupKey:u,dynamicGroup:!1});var _=!u,y=function(t,r){if(r){var n=u||r.get("key"),o={clickwrapGroupKey:n};_&&(o.dynamicGroup=!0),e._isMounted&&e.setState(o),_||r.render(),e.registerEventListeners(n)}};u?_ps("load",u,l({},d,{event_callback:y})):_ps("load",l({},d,{event_callback:y}))}},i.render=function(){var e=this.props.containerId;return o.a.createElement("div",{id:e})},n}(o.a.Component);d.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",d.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",d.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",d.MUST_SET_ALLOW_DISAGREED="PSClickWrap Error: You must set allowDisagreed as true to make onInvalid work",d.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var _=d;var y=function(e){var t,r;function n(t){var r,n=(r=e.call(this,t)||this).props,o=n.psScriptUrl,i=n.groupKey,a=n.accessId;return p.a.isSnippetLoaded(o)||p.a.injectSnippet(o),r.targetSelector="psbw-"+i,_ps("create",a),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){var e=this.props,t=e.groupKey,r=e.position,n=e.badgeText,o=e.alwaysVisible,i=e.openLegalCenter;_ps("load",t,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},i.componentWillUnmount=function(){var e=this.props.groupKey;_ps.getByKey(e).rendered=!1},i.isSnippetLoaded=function(){for(var e=this.props.psScriptUrl,t=document.getElementsByTagName("script"),r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1},i.render=function(){var e=this.props,t=e.link,r=e.linkText;return o.a.createElement("a",{href:t,id:this.targetSelector},r)},n}(o.a.Component);y.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",y.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var h=y}]).default})); | ||
//# sourceMappingURL=pactsafe-react-sdk.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306163
3617
24
5