paymentiq-cashier-bootstrapper 1.3.21 → 1.3.24-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.md ADDED
@@ -0,0 +1,204 @@
1
+ ## Changes made to PaymentIQ-Cashier-V2-Integration
2
+
3
+ #### 1.3.23
4
+ - Added iframe permissions for autoplay, microphone, fullscreen, accelerometer, magnetometer, gyroscope, picture-in-picture and otp-credentials.
5
+
6
+ #### 1.3.22
7
+ - Added type for new config property `showCustomAmountButton`
8
+
9
+ #### 1.3.21
10
+ - Fixed bug: node limitations. Removed node engines from package.json
11
+
12
+ #### 1.3.20
13
+ - Added `clipboard-read`, `clipboard-write` allow flags to main iframe
14
+
15
+ #### 1.3.19
16
+ - Added `payment` allow flag to main iframe
17
+
18
+ #### 1.3.18
19
+ - Updated CashierConfig types
20
+ #### 1.3.17
21
+ - Added support for Casumo environment
22
+
23
+ #### 1.3.16
24
+ - Fixed MrGreen environment postMessage origin
25
+
26
+ #### 1.3.15
27
+ - Fixed TypeScript Error TS2411 for hostUri and didToken in Attributes interface
28
+
29
+ #### 1.3.14
30
+ - New callback for get user information, called 'lookupUserData'
31
+
32
+ #### 1.3.13
33
+ - Handle userData parameter (object) and pass it on to the checkout client as JSON string.
34
+
35
+ #### 1.3.12
36
+ - Updated tests in Checkout and omitted double logoUrl values in index.d.ts
37
+
38
+ #### 1.3.11
39
+ - Added `version` parameter to lookup. Version should match a branch of the checkout client, otherwise it'll fallback to master.
40
+
41
+ #### 1.3.10
42
+
43
+ - Development readme
44
+ - Patches to types and interfaces in the Theme & CashierConfig interface
45
+
46
+ #### 1.3.9
47
+
48
+ - Pass on containerMinHeight to cashier via api.css internally on CASHIER_INIT_LOAD event.
49
+ - Adding new config keys to CashierConfig interface.
50
+
51
+ #### 1.3.8
52
+
53
+ - Expose Typescript interfaces through index.d.ts (https://support.paymentiq.io/issues/14461)
54
+ - Added new config properties to IPiqCashierConfig
55
+ - Added mrgreen as a supported environment
56
+
57
+ #### 1.3.7
58
+
59
+ - Read passed in sessionId when identifiedUser was reported and setupCashier should be triggered + pass in object of parameters
60
+ - Try catch around setupCashier
61
+ - New callback when transaction is about to initate, called 'transactionInit'
62
+
63
+ #### 1.3.6
64
+
65
+ - E2E tests to to test url/configs being generated correctly and also some callbacks being triggered on different events.
66
+
67
+ #### 1.3.5
68
+
69
+ - Patch to 1.3.4 - store away attributes before clearing from config object
70
+
71
+ #### 1.3.4
72
+
73
+ - Create isolated function to delete config properties that is only necessary for iframe element.
74
+
75
+ #### 1.3.3
76
+
77
+ - Support for tracking scripts tags.
78
+
79
+ #### 1.3.2
80
+
81
+ - Automated deploys to experimental without a manual confirmation.
82
+ - Automated deploy to npm as a beta version without manual confirmation.
83
+ - Bugfix: cashierInitLoad and lookupInitLoad was triggered from the integration script + by the apps, making the callback triggering twice
84
+ - Refactored lookup handlers into separate handler functions
85
+ - Immutability bugfix to lookupConfig
86
+ - 'cancelled' by user callback
87
+ - 'onLoadError' callback
88
+
89
+ #### 1.3.1
90
+
91
+ - A new callback triggered when a user has cancelled a transaction, called 'cancelled'.
92
+ - A new callback when cashier displays an error at initial load, or has not loaded withing a specific timeframe.
93
+
94
+ #### 1.3.0
95
+
96
+ - Rewrite to typescript
97
+ - Origin check added to postMessage
98
+ - Origin added to outgoing postMessages
99
+
100
+ #### 1.2.5
101
+
102
+ - Allow hotjar tracking on iframes
103
+
104
+ #### 1.2.4
105
+
106
+ - New callback 'validationFailed' that will trigger for tx validations fails.
107
+ - Move all onCallbacksFunction event types to separate file.
108
+
109
+ #### 1.2.3
110
+
111
+ - Auth-generation for communication with Devcode Identity
112
+ - Receive a userId from Lookup to use when rendering the cashier
113
+ - Receive user object from Lookup - pass arbitrary user data to the cashier
114
+ - Receive attributes object from Lookup - arbitrary data to be appended to every transaction
115
+ - Added hostUri config parameter - using this to verify postMessage origin in the cashier/checkout
116
+ - Checking origin for all incoming postMessages
117
+
118
+ #### 1.2.2
119
+
120
+ - New callbacks - TX_PENDING and TX_UNRESOLVED.
121
+ - Added reset method that destroys the current cashier (window.\_PaymentIQCashierReset)
122
+ - Keep track if cashier has been loaded. If PIQ_LOOKUP_CUSTOMER_IDENTIFIED is sent, unpause instead of rendering another cashier
123
+ - destroy cashier PIQ_LOOKUP_CUSTOMER_RESET and set cashierLoaded to false
124
+
125
+ #### 1.2.1
126
+
127
+ - Removed alert that was left in
128
+ - App SET_HEIGHT now always updates iframe heigth
129
+
130
+ #### 1.2.0
131
+
132
+ - Bugfix. POST_INTEGRATION_URL = POST_INTEGRATION_URL_PAR has to be included in setupAppEventListeners function.
133
+ - Handler for PIQ_LOOKUP_CUSTOMER_RESET not destroys the cashier (we need a userId from checkout when loading cashier)
134
+ - Added PostMessage-handling for Native Payment support (e.g applePay, googlePay)
135
+ - Added PostMessage support for native app redirects (lets the native app when it should redirect to another app on the device)
136
+
137
+ #### 1.1.0
138
+
139
+ - New eventlistener to recieve PIQ BO configs and add them as cashier URL to window object. Added support for running as a Checkout, a cashier combined with a lookup component
140
+
141
+ #### 1.0.19
142
+
143
+ - Temporary quick bugfix for stringifying of all objects and array types.
144
+
145
+ #### 1.0.18
146
+
147
+ - Added support to add "user" in configurations parameter. Also, all configs with type "object" will be stringified only.
148
+
149
+ #### 1.0.17
150
+
151
+ - 1 new callback: `cashierInitLoad`. Available from cashier version 1.0.16
152
+
153
+ #### 1.0.16
154
+
155
+ - Previously multiple event listers were registered when the host site was reloaded. Now we always remove the previous before registering any new ones.
156
+
157
+ #### 1.0.15
158
+
159
+ - 2 new callbacks: `isVisible` & `isHidden`.
160
+
161
+ Used for hybrid-apps, when you only want to show the app when a provider has loaded.
162
+
163
+ #### 1.0.14
164
+
165
+ - 3 new callbacks, navigate, userSelectPaymentMethod and enterPaymentMethodDetails
166
+
167
+ #### 1.0.13
168
+
169
+ - setup mandatory event listeners in separate method.
170
+
171
+ #### 1.0.12
172
+
173
+ - event listeners for dealing with redirects to providers that requires their own windows.
174
+
175
+ #### 1.0.11
176
+
177
+ - Now available as npm-package at paymentiq-cashier-bootstrapper
178
+
179
+ #### 1.0.10
180
+
181
+ - Console.error when iframe-url is over 2000 characters long
182
+ - Added console.log with path to local file when running dev
183
+
184
+ #### 1.0.9
185
+
186
+ - Need to temporarily re-add Change callback-handler.
187
+
188
+ #### 1.0.8
189
+
190
+ - Auto adjust height - only adjust if height is bigger than the surrounding contiainer
191
+ - Removed postMessage callback for 'Change' - not much point + performance heavy
192
+
193
+ #### 1.0.2
194
+
195
+ - Added allow='geolocation \*' to iframe
196
+
197
+ #### 1.0.1
198
+
199
+ - Now taking the passed in environment, governs what endpoint to get the cashier from (production. test or development)
200
+
201
+ #### 1.0.0
202
+
203
+ - Inital project version & setup. Return an iframe containing the cashier-v2 and append it to the passed in dom-node
204
+
package/CHANGES.md.zip ADDED
Binary file
package/dist/cashier.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.beta=t():e.beta=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var a,r;!function(i,o,s){"use strict";"undefined"!=typeof window&&n(2)?void 0===(r="function"==typeof(a=s)?a.call(t,n,t,e):a)||(e.exports=r):e.exports?e.exports=s():o.exports?o.exports=s():o.Fingerprint2=s()}(0,this,(function(){"use strict";void 0===Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var e=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},t=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},a=function(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},r=function(e,t){return[e[0]^t[0],e[1]^t[1]]},i=function(e){return e=r(e,[0,e[0]>>>1]),e=t(e,[4283543511,3981806797]),e=r(e,[0,e[0]>>>1]),e=t(e,[3301882366,444984403]),e=r(e,[0,e[0]>>>1])},o=function(o,s){s=s||0;for(var c=(o=o||"").length%16,d=o.length-c,l=[0,s],u=[0,s],f=[0,0],p=[0,0],h=[2277735313,289559509],m=[1291169091,658871167],g=0;g<d;g+=16)f=[255&o.charCodeAt(g+4)|(255&o.charCodeAt(g+5))<<8|(255&o.charCodeAt(g+6))<<16|(255&o.charCodeAt(g+7))<<24,255&o.charCodeAt(g)|(255&o.charCodeAt(g+1))<<8|(255&o.charCodeAt(g+2))<<16|(255&o.charCodeAt(g+3))<<24],p=[255&o.charCodeAt(g+12)|(255&o.charCodeAt(g+13))<<8|(255&o.charCodeAt(g+14))<<16|(255&o.charCodeAt(g+15))<<24,255&o.charCodeAt(g+8)|(255&o.charCodeAt(g+9))<<8|(255&o.charCodeAt(g+10))<<16|(255&o.charCodeAt(g+11))<<24],f=t(f,h),f=n(f,31),f=t(f,m),l=r(l,f),l=n(l,27),l=e(l,u),l=e(t(l,[0,5]),[0,1390208809]),p=t(p,m),p=n(p,33),p=t(p,h),u=r(u,p),u=n(u,31),u=e(u,l),u=e(t(u,[0,5]),[0,944331445]);switch(f=[0,0],p=[0,0],c){case 15:p=r(p,a([0,o.charCodeAt(g+14)],48));case 14:p=r(p,a([0,o.charCodeAt(g+13)],40));case 13:p=r(p,a([0,o.charCodeAt(g+12)],32));case 12:p=r(p,a([0,o.charCodeAt(g+11)],24));case 11:p=r(p,a([0,o.charCodeAt(g+10)],16));case 10:p=r(p,a([0,o.charCodeAt(g+9)],8));case 9:p=r(p,[0,o.charCodeAt(g+8)]),p=t(p,m),p=n(p,33),p=t(p,h),u=r(u,p);case 8:f=r(f,a([0,o.charCodeAt(g+7)],56));case 7:f=r(f,a([0,o.charCodeAt(g+6)],48));case 6:f=r(f,a([0,o.charCodeAt(g+5)],40));case 5:f=r(f,a([0,o.charCodeAt(g+4)],32));case 4:f=r(f,a([0,o.charCodeAt(g+3)],24));case 3:f=r(f,a([0,o.charCodeAt(g+2)],16));case 2:f=r(f,a([0,o.charCodeAt(g+1)],8));case 1:f=r(f,[0,o.charCodeAt(g)]),f=t(f,h),f=n(f,31),f=t(f,m),l=r(l,f)}return l=r(l,[0,o.length]),u=r(u,[0,o.length]),l=e(l,u),u=e(u,l),l=i(l),u=i(u),l=e(l,u),u=e(u,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(u[0]>>>0).toString(16)).slice(-8)+("00000000"+(u[1]>>>0).toString(16)).slice(-8)},s={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},c=function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,a=e.length;n<a;n++)t(e[n],n,e);else for(var r in e)e.hasOwnProperty(r)&&t(e[r],r,e)},d=function(e,t){var n=[];return null==e?n:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(c(e,(function(e,a,r){n.push(t(e,a,r))})),n)},l=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},u=function(e){var t=[window.screen.width,window.screen.height];return e.screen.detectScreenOrientation&&t.sort().reverse(),t},f=function(e){if(window.screen.availWidth&&window.screen.availHeight){var t=[window.screen.availHeight,window.screen.availWidth];return e.screen.detectScreenOrientation&&t.sort().reverse(),t}return e.NOT_AVAILABLE},p=function(e){if(null==navigator.plugins)return e.NOT_AVAILABLE;for(var t=[],n=0,a=navigator.plugins.length;n<a;n++)navigator.plugins[n]&&t.push(navigator.plugins[n]);return m(e)&&(t=t.sort((function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}))),d(t,(function(e){var t=d(e,(function(e){return[e.type,e.suffixes]}));return[e.name,e.description,t]}))},h=function(e){var t=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){t=d(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],(function(t){try{return new window.ActiveXObject(t),t}catch(t){return e.ERROR}}))}else t.push(e.NOT_AVAILABLE);return navigator.plugins&&(t=t.concat(p(e))),t},m=function(e){for(var t=!1,n=0,a=e.plugins.sortPluginsFor.length;n<a;n++){var r=e.plugins.sortPluginsFor[n];if(navigator.userAgent.match(r)){t=!0;break}}return t},g=function(e){try{return!!window.sessionStorage}catch(t){return e.ERROR}},y=function(e){try{return!!window.localStorage}catch(t){return e.ERROR}},v=function(e){try{return!!window.indexedDB}catch(t){return e.ERROR}},T=function(e){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:e.NOT_AVAILABLE},w=function(e){return navigator.cpuClass||e.NOT_AVAILABLE},E=function(e){return navigator.platform?navigator.platform:e.NOT_AVAILABLE},A=function(e){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:e.NOT_AVAILABLE},S=function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]},C=function(e){var t=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var a=n.getContext("2d");return a.rect(0,0,10,10),a.rect(2,2,6,6),t.push("canvas winding:"+(!1===a.isPointInPath(5,5,"evenodd")?"yes":"no")),a.textBaseline="alphabetic",a.fillStyle="#f60",a.fillRect(125,1,62,20),a.fillStyle="#069",e.dontUseFakeFontInCanvas?a.font="11pt Arial":a.font="11pt no-real-font-123",a.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),a.fillStyle="rgba(102, 204, 0, 0.2)",a.font="18pt Arial",a.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),a.globalCompositeOperation="multiply",a.fillStyle="rgb(255,0,255)",a.beginPath(),a.arc(50,50,50,0,2*Math.PI,!0),a.closePath(),a.fill(),a.fillStyle="rgb(0,255,255)",a.beginPath(),a.arc(100,50,50,0,2*Math.PI,!0),a.closePath(),a.fill(),a.fillStyle="rgb(255,255,0)",a.beginPath(),a.arc(75,100,50,0,2*Math.PI,!0),a.closePath(),a.fill(),a.fillStyle="rgb(255,0,255)",a.arc(75,75,75,0,2*Math.PI,!0),a.arc(75,75,25,0,2*Math.PI,!0),a.fill("evenodd"),n.toDataURL&&t.push("canvas fp:"+n.toDataURL()),t},b=function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"};if(!(e=U()))return null;var n=[],a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a);var r=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),a.itemSize=3,a.numItems=3;var i=e.createProgram(),o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),e.compileShader(o);var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),e.compileShader(s),e.attachShader(i,o),e.attachShader(i,s),e.linkProgram(i),e.useProgram(i),i.vertexPosAttrib=e.getAttribLocation(i,"attrVertex"),i.offsetUniform=e.getUniformLocation(i,"uniformOffset"),e.enableVertexAttribArray(i.vertexPosArray),e.vertexAttribPointer(i.vertexPosAttrib,a.itemSize,e.FLOAT,!1,0,0),e.uniform2f(i.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,a.numItems);try{n.push(e.canvas.toDataURL())}catch(e){}n.push("extensions:"+(e.getSupportedExtensions()||[]).join(";")),n.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),n.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),n.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),n.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),n.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),n.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),n.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),n.push("webgl max anisotropy:"+function(e){var t=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");if(t){var n=e.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(e)),n.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),n.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),n.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),n.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),n.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),n.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),n.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),n.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),n.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),n.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),n.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),n.push("webgl red bits:"+e.getParameter(e.RED_BITS)),n.push("webgl renderer:"+e.getParameter(e.RENDERER)),n.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),n.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),n.push("webgl vendor:"+e.getParameter(e.VENDOR)),n.push("webgl version:"+e.getParameter(e.VERSION));try{var d=e.getExtension("WEBGL_debug_renderer_info");d&&(n.push("webgl unmasked vendor:"+e.getParameter(d.UNMASKED_VENDOR_WEBGL)),n.push("webgl unmasked renderer:"+e.getParameter(d.UNMASKED_RENDERER_WEBGL)))}catch(e){}return e.getShaderPrecisionFormat?(c(["FLOAT","INT"],(function(t){c(["VERTEX","FRAGMENT"],(function(a){c(["HIGH","MEDIUM","LOW"],(function(r){c(["precision","rangeMin","rangeMax"],(function(i){var o=e.getShaderPrecisionFormat(e[a+"_SHADER"],e[r+"_"+t])[i];"precision"!==i&&(i="precision "+i);var s=["webgl ",a.toLowerCase()," shader ",r.toLowerCase()," ",t.toLowerCase()," ",i,":",o].join("");n.push(s)}))}))}))})),F(e),n):(F(e),n)},I=function(){try{var e=U(),t=e.getExtension("WEBGL_debug_renderer_info"),n=e.getParameter(t.UNMASKED_VENDOR_WEBGL)+"~"+e.getParameter(t.UNMASKED_RENDERER_WEBGL);return F(e),n}catch(e){return null}},O=function(){var e=document.createElement("div");e.innerHTML="&nbsp;",e.className="adsbox";var t=!1;try{document.body.appendChild(e),t=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(e)}catch(e){t=!1}return t},_=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(e){return!0}return!1},x=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},B=function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.oscpu,a=navigator.platform.toLowerCase();if(e=t.indexOf("windows phone")>=0?"Windows Phone":t.indexOf("windows")>=0||t.indexOf("win16")>=0||t.indexOf("win32")>=0||t.indexOf("win64")>=0||t.indexOf("win95")>=0||t.indexOf("win98")>=0||t.indexOf("winnt")>=0||t.indexOf("wow64")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0||t.indexOf("cros")>=0||t.indexOf("x11")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0||t.indexOf("ipod")>=0||t.indexOf("crios")>=0||t.indexOf("fxios")>=0?"iOS":t.indexOf("macintosh")>=0||t.indexOf("mac_powerpc)")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows"!==e&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e&&-1===t.indexOf("cros"))return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(n.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(n.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===e))return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||((a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||((a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||!(a.indexOf("arm")>=0&&"Windows Phone"===e)&&(!(a.indexOf("pike")>=0&&t.indexOf("opera mini")>=0)&&((a.indexOf("win")<0&&a.indexOf("linux")<0&&a.indexOf("mac")<0&&a.indexOf("iphone")<0&&a.indexOf("ipad")<0&&a.indexOf("ipod")<0)!==("Other"===e)||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e))))},P=function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(t.indexOf("edge/")>=0||t.indexOf("iemobile/")>=0)return!1;if(t.indexOf("opera mini")>=0)return!1;if(("Chrome"===(e=t.indexOf("firefox/")>=0?"Firefox":t.indexOf("opera/")>=0||t.indexOf(" opr/")>=0?"Opera":t.indexOf("chrome/")>=0?"Chrome":t.indexOf("safari/")>=0?t.indexOf("android 1.")>=0||t.indexOf("android 2.")>=0||t.indexOf("android 3.")>=0||t.indexOf("android 4.")>=0?"AOSP":"Safari":t.indexOf("trident/")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==n)return!0;var a,r=eval.toString().length;if(37===r&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===r&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===r&&"Chrome"!==e&&"AOSP"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(e){try{e.toSource(),a=!0}catch(e){a=!1}}return a&&"Firefox"!==e&&"Other"!==e},k=function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},M=function(){if(!k())return!1;var e=U(),t=!!window.WebGLRenderingContext&&!!e;return F(e),t},L=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},R=function(){return void 0!==window.swfobject},D=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},N=function(e,t){window.___fp_swf_loaded=function(t){e(t)};var n=t.fonts.swfContainerId;!function(e){var t=document.createElement("div");t.setAttribute("id",e.fonts.swfContainerId),document.body.appendChild(t)}();var a={onReady:"___fp_swf_loaded"};window.swfobject.embedSWF(t.fonts.swfPath,n,"1","1","9.0.0",!1,a,{allowScriptAccess:"always",menu:"false"},{})},U=function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t},F=function(e){var t=e.getExtension("WEBGL_lose_context");null!=t&&t.loseContext()},G=[{key:"userAgent",getData:function(e){e(navigator.userAgent)}},{key:"webdriver",getData:function(e,t){e(null==navigator.webdriver?t.NOT_AVAILABLE:navigator.webdriver)}},{key:"language",getData:function(e,t){e(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||t.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(e,t){e(window.screen.colorDepth||t.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(e,t){e(navigator.deviceMemory||t.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(e,t){e(window.devicePixelRatio||t.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(e,t){e(T(t))}},{key:"screenResolution",getData:function(e,t){e(u(t))}},{key:"availableScreenResolution",getData:function(e,t){e(f(t))}},{key:"timezoneOffset",getData:function(e){e((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(e,t){window.Intl&&window.Intl.DateTimeFormat?e((new window.Intl.DateTimeFormat).resolvedOptions().timeZone):e(t.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(e,t){e(g(t))}},{key:"localStorage",getData:function(e,t){e(y(t))}},{key:"indexedDb",getData:function(e,t){e(v(t))}},{key:"addBehavior",getData:function(e){e(!(!document.body||!document.body.addBehavior))}},{key:"openDatabase",getData:function(e){e(!!window.openDatabase)}},{key:"cpuClass",getData:function(e,t){e(w(t))}},{key:"platform",getData:function(e,t){e(E(t))}},{key:"doNotTrack",getData:function(e,t){e(A(t))}},{key:"plugins",getData:function(e,t){L()?t.plugins.excludeIE?e(t.EXCLUDED):e(h(t)):e(p(t))}},{key:"canvas",getData:function(e,t){k()?e(C(t)):e(t.NOT_AVAILABLE)}},{key:"webgl",getData:function(e,t){M()?e(b()):e(t.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(e){M()?e(I()):e()}},{key:"adBlock",getData:function(e){e(O())}},{key:"hasLiedLanguages",getData:function(e){e(_())}},{key:"hasLiedResolution",getData:function(e){e(x())}},{key:"hasLiedOs",getData:function(e){e(B())}},{key:"hasLiedBrowser",getData:function(e){e(P())}},{key:"touchSupport",getData:function(e){e(S())}},{key:"fonts",getData:function(e,t){var n=["monospace","sans-serif","serif"],a=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];if(t.fonts.extendedJsFonts){a=a.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"])}a=(a=a.concat(t.fonts.userDefinedFonts)).filter((function(e,t){return a.indexOf(e)===t}));var r=document.getElementsByTagName("body")[0],i=document.createElement("div"),o=document.createElement("div"),s={},c={},d=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="72px",e.style.fontStyle="normal",e.style.fontWeight="normal",e.style.letterSpacing="normal",e.style.lineBreak="auto",e.style.lineHeight="normal",e.style.textTransform="none",e.style.textAlign="left",e.style.textDecoration="none",e.style.textShadow="none",e.style.whiteSpace="normal",e.style.wordBreak="normal",e.style.wordSpacing="normal",e.innerHTML="mmmmmmmmmmlli",e},l=function(e,t){var n=d();return n.style.fontFamily="'"+e+"',"+t,n},u=function(e){for(var t=!1,a=0;a<n.length;a++)if(t=e[a].offsetWidth!==s[n[a]]||e[a].offsetHeight!==c[n[a]])return t;return t},f=function(){for(var e=[],t=0,a=n.length;t<a;t++){var r=d();r.style.fontFamily=n[t],i.appendChild(r),e.push(r)}return e}();r.appendChild(i);for(var p=0,h=n.length;p<h;p++)s[n[p]]=f[p].offsetWidth,c[n[p]]=f[p].offsetHeight;var m=function(){for(var e={},t=0,r=a.length;t<r;t++){for(var i=[],s=0,c=n.length;s<c;s++){var d=l(a[t],n[s]);o.appendChild(d),i.push(d)}e[a[t]]=i}return e}();r.appendChild(o);for(var g=[],y=0,v=a.length;y<v;y++)u(m[a[y]])&&g.push(a[y]);r.removeChild(o),r.removeChild(i),e(g)},pauseBefore:!0},{key:"fontsFlash",getData:function(e,t){return R()?D()?t.fonts.swfPath?void N((function(t){e(t)}),t):e("missing options.fonts.swfPath"):e("flash not installed"):e("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(e,t){var n=t.audio;if(n.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return e(t.EXCLUDED);var a=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==a)return e(t.NOT_AVAILABLE);var r=new a(1,44100,44100),i=r.createOscillator();i.type="triangle",i.frequency.setValueAtTime(1e4,r.currentTime);var o=r.createDynamicsCompressor();c([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],(function(e){void 0!==o[e[0]]&&"function"==typeof o[e[0]].setValueAtTime&&o[e[0]].setValueAtTime(e[1],r.currentTime)})),i.connect(o),o.connect(r.destination),i.start(0),r.startRendering();var s=setTimeout((function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "'+navigator.userAgent+'".'),r.oncomplete=function(){},r=null,e("audioTimeout")}),n.timeout);r.oncomplete=function(t){var n;try{clearTimeout(s),n=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce((function(e,t){return e+Math.abs(t)}),0).toString(),i.disconnect(),o.disconnect()}catch(t){return void e(t)}e(n)}}},{key:"enumerateDevices",getData:function(e,t){if(!l())return e(t.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then((function(t){e(t.map((function(e){return"id="+e.deviceId+";gid="+e.groupId+";"+e.kind+";"+e.label})))})).catch((function(t){e(t)}))}}],H=function(e){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/Valve/fingerprintjs2#upgrade-guide-from-182-to-200")};return H.get=function(e,t){t?e||(e={}):(t=e,e={}),function(e,t){if(null==t)return e;var n,a;for(a in t)null==(n=t[a])||Object.prototype.hasOwnProperty.call(e,a)||(e[a]=n)}(e,s),e.components=e.extraComponents.concat(G);var n={data:[],addPreprocessedComponent:function(t,a){"function"==typeof e.preprocessor&&(a=e.preprocessor(t,a)),n.data.push({key:t,value:a})}},a=-1,r=function(i){if((a+=1)>=e.components.length)t(n.data);else{var o=e.components[a];if(e.excludes[o.key])r(!1);else{if(!i&&o.pauseBefore)return a-=1,void setTimeout((function(){r(!0)}),1);try{o.getData((function(e){n.addPreprocessedComponent(o.key,e),r(!1)}),e)}catch(e){n.addPreprocessedComponent(o.key,String(e)),r(!1)}}}};r(!1)},H.getPromise=function(e){return new Promise((function(t,n){H.get(e,t)}))},H.getV18=function(e,t){return null==t&&(t=e,e={}),H.get(e,(function(n){for(var a=[],r=0;r<n.length;r++){var i=n[r];if(i.value===(e.NOT_AVAILABLE||"not available"))a.push({key:i.key,value:"unknown"});else if("plugins"===i.key)a.push({key:"plugins",value:d(i.value,(function(e){var t=d(e[2],(function(e){return e.join?e.join("~"):e})).join(",");return[e[0],e[1],t].join("::")}))});else if(-1!==["canvas","webgl"].indexOf(i.key)&&Array.isArray(i.value))a.push({key:i.key,value:i.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(i.key)){if(!i.value)continue;a.push({key:i.key,value:1})}else i.value?a.push(i.value.join?{key:i.key,value:i.value.join(";")}:i):a.push({key:i.key,value:i.value})}var s=o(d(a,(function(e){return e.value})).join("~~~"),31);t(s,a)}))},H.x64hash128=o,H.VERSION="2.1.2",H}))},function(e){e.exports=JSON.parse('{"name":"paymentiq-cashier-bootstrapper","version":"1.3.20","description":"Integration bootstrapper for the PaymentIQ Cashier V2\\"","main":"dist/cashier.js","types":"index.d.ts","files":["dist","index.d.ts"],"scripts":{"build":"webpack --progress --colors --display-error-details --config build/webpack.base.conf.js","watch":"webpack --watch --progress --colors --display-error-details --config build/webpack.base.conf.js","serve":"serve -l 9091 ./","start":"concurrently --kill-others \\"npm run watch\\" \\"npm run serve\\"","cypress:all":"cypress run --headless --browser chrome","cypress":"cypress open","cypress:server":"npm run build && start-server-and-test start http://localhost:9091 cypress","cypress:start:all":"npm run build && start-server-and-test start http://localhost:9091 cypress:all","cypress:spec":"cypress run --spec cypress/integration/Checkout/checkout.spec.js","cypress:docker:run":"npm install cypress && npm run build && start-server-and-test start http://localhost:9091 cypress:all"},"repository":{"type":"git","url":"git+https://github.com/devcode-git/PaymentIQ-Cashier-V2-Integration.git"},"keywords":["Javascript","PaymentIQ","Cashier"],"author":"simon.solders@devcode.se","license":"ISC","bugs":{"url":"https://github.com/devcode-git/PaymentIQ-Cashier-V2-Integration/issues"},"homepage":"https://github.com/devcode-git/PaymentIQ-Cashier-V2-Integration#readme","dependencies":{"fingerprintjs2":"^2.1.0"},"devDependencies":{"@types/webpack-env":"^1.15.2","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-core":"^6.22.1","babel-loader":"^7.1.1","babel-plugin-dynamic-import-node":"^1.2.0","babel-plugin-transform-es2015-modules-commonjs":"^6.26.0","babel-plugin-transform-runtime":"^6.22.0","babel-preset-env":"^1.7.0","babel-preset-stage-2":"^6.22.0","concurrently":"^5.3.0","cypress":"^6.2.0","eslint":"^7.10.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-prefer-arrow":"^1.2.2","eslint-plugin-unicorn":"^22.0.0","serve":"^11.3.2","start-server-and-test":"^1.11.6","ts-loader":"^8.0.3","typescript":"^4.0.2","webpack":"^4.29.0","webpack-cli":"^3.3.12"},"engines":{"node":">=10.0.0 <15"}}')},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";n.r(t);var a=function(){return(a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function r(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))}function i(e,t){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o=n(0),s=n.n(o),c="SET_CSS",d="UPDATE_DATA",l="TX_SUCCESS",u="TX_FAILED",f="TX_PENDING",p="TX_UNRESOLVED",h="CASHIER_PAUSE",m="CASHIER_RESUME",g="POST_INTEGRATION_URL",y="PIQ_DEVICE_ID",v="PIQ_INITIATE_NATIVE_PAYMENT",T="PIQ_PROCESS_NATIVE_PAYMENT",w="PIQ_STATUS_NATIVE_PAYMENT",E="CHANGE",A="GET_INTEGRATIONS_SCRIPT_URL",S="CASHIER_INIT_LOAD",C="APP_SET_HEIGHT",b="DONE_LOADING",I="IS_LOADING",O="SELECTED_TX_METHOD",_="ENTERED_TX_METHOD_PAGE",x="APP_ROUTE_CHANGE",B="APP_VISIBLE",P="APP_HIDDEN",k="SETUP_AUTHORIZE_SCRIPT",M="EXECUTE_AUTHORIZE_METHOD",L="TOP_URL_REPLACE",R="APPLICATION_REDIRECT",D="ADD_CONFIG_TO_WINDOW",N="CANCEL_PENDING_WITHDRAWAL",U="TX_VALIDATION_FAILED",F="NEW_IFRAME",G="NEW_WINDOW",H="ONLOAD_ERROR",V="TX_CANCELLED",W="LOOKUP_INIT_LOAD",j="PIQ_LOOKUP_CUSTOMER_IDENTIFIED",X="PIQ_CUSTOMER_DATA",q="PIQ_LOOKUP_SHA_256",K="PIQ_LOOKUP_EDIT_USER",Q="PIQ_LOOKUP_CUSTOMER_RESET",J="PIQ_LOOKUP_REPORT_HEIGHT",z="TRANSACTION_INIT",Z=null,Y=null,$=null;function ee(e){return!(-1!==["https://test-api.paymentiq.io","https://mrgreen-api.paymentiq.io","https://casumo-api.paymentiq.io","https://api.paymentiq.io","https://pay.paymentiq.io","http://localhost:5000","http://0.0.0.0:5000","http://0.0.0.0:4000","http://localhost:4000"].indexOf(e.origin)||e.data&&e.data.eventType&&-1!==["CASHIER_INIT_LOAD","LOOKUP_INIT_LOAD","IS_LOADING"].indexOf(e.data.eventType))&&(e.data&&e.data.eventType&&console.error("Integration: Failed to read post message - invalid origin",e.origin,e.data.eventType),!0)}function te(e){e.data&&e.data.eventType&&console.error("Invalid origin - will not read PIQ Cashier events",e.data.eventType,e.origin)}var ne=function(e){if(ee(e))return te(e);switch(e.data.eventType){case S:if(Z.cashierInitLoad)return Z.cashierInitLoad();break;case W:if(Z.lookupInitLoad)return Z.lookupInitLoad();break;case E:if(Z.change)return Z.change({data:e.data.payload});break;case d:if(Z.update)return Z.update({data:e.data.payload});break;case l:if(Z.success)return Z.success({data:e.data.payload});break;case u:if(Z.failure)return Z.failure({data:e.data.payload});break;case f:if(Z.pending)return Z.pending({data:e.data.payload});break;case p:if(Z.unresolved)return Z.unresolved({data:e.data.payload});break;case C:return Te(e.data.payload.height);case h:if(Z.pause)return Z.pause({data:e.data.payload});break;case m:if(Z.resume)return Z.resume({data:e.data.payload});break;case I:if(Z.isLoading)return Z.isLoading({data:e.data.eventType});break;case b:if(Z.doneLoading)return Z.doneLoading({data:e.data.eventType});break;case B:if(Z.isVisible)return Z.isVisible();break;case P:if(Z.isHidden)return Z.isHidden();break;case O:if(Z.paymentMethodSelect&&e.data&&e.data.payload)return Z.paymentMethodSelect({data:e.data.payload});break;case _:if(Z.paymentMethodPageEntered&&e.data&&e.data.payload)return Z.paymentMethodPageEntered({data:e.data.payload});break;case x:if(Z.navigate&&e.data&&e.data.payload)return Z.navigate({data:e.data.payload});break;case F:case G:if(Z.newProviderWindow)return Z.newProviderWindow({data:e.data.eventType});break;case N:if(Z.cancelledPendingWD)return Z.cancelledPendingWD({data:e.data.payload});break;case U:if(Z.validationFailed)return Z.validationFailed({data:e.data.payload});break;case j:return function(e){var t=e.data,n=t.eventType,a=t.payload;if(!n&&"string"==typeof e.data){var r=JSON.parse(e.data);n=r.eventType,a=r.payload}if(Z.lookupUserIdentified&&Z.lookupUserIdentified({data:a}),!$||$.cashierLoaded)return de({iframe:document.getElementById("cashierIframe")});var i={userId:a.userId,sessionId:a.sessionId||null,user:a.user,attributes:a.attributes,didToken:a.didToken||null};$.setupCashier(i)}(e);case X:if(Z.lookupUserData)return Z.lookupUserData({data:e.data.payload});case V:if(Z.cancelled)return Z.cancelled({data:e.data.payload});break;case H:if(Z.onLoadError)return Z.onLoadError({data:e.data.payload});break;case z:if(Z.transactionInit)return Z.transactionInit({data:e.data.payload})}},ae=function(e){return r(void 0,void 0,void 0,(function(){var t,n,a,o,s,c,d,l;return i(this,(function(u){if(ee(e))return[2,te(e)];try{switch(t=e.data,n=t.eventType,a=t.payload,n||"string"!=typeof e.data||(o=JSON.parse(e.data),n=o.eventType,a=o.payload),n){case D:Ae(a);break;case k:!function(e){if(e&&e.authorizeScript){var t=e.provider,n=e.authorizeScript;try{var a="Authenticate_"+t;if(!document.getElementById(a)){var r=document.createElement("script");r.id=a,r.innerHTML=n,document.body.appendChild(r)}}catch(e){console.log(e),console.error("Unable to add authenticate script for "+t)}}}(a);break;case M:s=a.method,c=a.parameters,window[s](c);break;case A:return[2,Y(a)];case L:!function(e){window.location.replace(e.url);var t=JSON.stringify({eventType:R,payload:e});window.ReactNativeWebView?oe(t,window.ReactNativeWebView,"*"):oe(t)}(a);break;case v:!function(e){var t=JSON.stringify({eventType:v,payload:e});window.ReactNativeWebView?oe(t,window.ReactNativeWebView,"*"):oe(t)}(a);break;case T:d=document.getElementById("cashierIframe"),oe({eventType:T,payload:a},d.contentWindow,he());break;case w:l=JSON.stringify({eventType:"PIQ_STATUS_NATIVE_PAYMENT",payload:a}),window.ReactNativeWebView?oe(l,window.ReactNativeWebView,"*"):oe(l);break;case q:!function(e){r(void 0,void 0,void 0,(function(){var t,n,a,r,o;return i(this,(function(i){switch(i.label){case 0:return e.codeVerifier?(t=e.codeVerifier,n=new TextEncoder,a=n.encode(t),[4,window.crypto.subtle.digest("SHA-256",a)]):[3,2];case 1:r=i.sent(),o=document.getElementById("lookupIframe"),oe({eventType:q,payload:{codeChallenge:r,codeVerifier:t}},o.contentWindow,me(o)),i.label=2;case 2:return[2]}}))}))}(a);break;case K:return[2,ce({iframe:document.getElementById("cashierIframe")})];case Q:Se(),$.cashierLoaded=!1;break;case J:return[2,we(e.data.payload.height)]}}catch(e){console.log(e)}return[2]}))}))},re=function(e){Z=e,window.removeEventListener("message",ne,!1),window.addEventListener("message",ne),e.isLoading&&le()},ie=function(e){$=e,Y=ue,window.removeEventListener("message",ae,!1),window.addEventListener("message",ae)},oe=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);try{t?t.postMessage(e,n):window.postMessage(e,he())}catch(t){e.eventType?console.error("Failed to send postMessage: ",e.eventType):console.error(t)}},se=function(e,t){oe({eventType:c,payload:e},t.iframe.contentWindow,me(t.iframe))},ce=function(e){if(!e.iframe)return null;oe({eventType:h},e.iframe.contentWindow,me(e.iframe));var t=document.getElementById("cashierIframe");t&&(t.tabIndex=-1)},de=function(e){oe({eventType:m},e.iframe.contentWindow,me(e.iframe)),document.getElementById("cashierIframe").tabIndex=0},le=function(){var e=document.querySelector("#cashierIframe");e&&oe({eventType:I},e.contentWindow,me(e))},ue=function(e){var t=document.querySelector("#cashierIframe");oe({eventType:g,payload:{url:Ee("txRefId",e.txRefId),txRefId:e.txRefId}},t.contentWindow,me(t))},fe=function(e){if(window._piqDFP){var t=document.getElementById(e);pe(t,window._piqDFP),delete window._piqDFP}else setTimeout((function(){fe(e)}),50)},pe=function(e,t){t?oe({eventType:y,payload:{deviceId:t}},e.contentWindow,me(e)):console.error("DeviceId not defined")};function he(){return window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),window.location.origin}var me=function(e){var t=e.src.match(/^.+:\/\/[^/]+/)[0];return"https://test-api.paymentiq.io"===t||"https://api.paymentiq.io"===t||"https://mrgreen-api.paymentiq.io"===t||"https://casumo-api.paymentiq.io"===t?"https://pay.paymentiq.io":t},ge=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);try{var a=function(e){return n?e:encodeURIComponent(e)},r=function(e,t){return a("object"==typeof e&&("trackingPixels"===t||"trackingScripts"===t)?JSON.stringify(e):e)},i=[];for(var o in e){var s=e[o];t?null!==e[o]&&""!==e[o]&&i.push(a(o)+"="+r(s,o)):i.push(a(o)+"="+r(s,o))}return i.join("&")}catch(e){console.error(e)}},ye=function(e){var t=a({},e);try{var n=t.theme;for(var r in delete t.theme,n)for(var i in n[r])t["theme_"+r+"_"+i]=n[r][i]}catch(e){console.log(e)}try{var o=t.attributes;for(var s in function(e){delete e.containerMinHeight,delete e.initLoadErrorTimeout,delete e.attributes}(t),o)t["attributes."+s]=o[s];var c=t.user;for(var d in delete t.user,c)t["user."+d]=c[d]}catch(e){console.log(e)}return t},ve=function(e){var t=a({},e);return t.config&&(delete t.config.merchantId,delete t.config.userId,delete t.config.sessionId),t},Te=function(e){document.getElementById("cashierIframe").style.height=e+"px"},we=function(e){document.getElementById("lookupIframe").style.height=e+"px"},Ee=function(e,t){var n=self.window.location.href,a=null,r=new RegExp("[&\\?]"+e+"=");return r.test(n)?(r=new RegExp("([&\\?])"+e+"=\\d+"),a=n.replace(r,"$1"+e+"="+t)):a=n.indexOf("?")>-1?n+"&"+e+"="+t:n+"?"+e+"="+t,a},Ae=function(e){try{var t=JSON.parse(e.config),n=window.PIQ_CASHIER_URI.split("?")[0]+"?"+ge(ye(t));window.PIQ_BO_CONFIG_URI=n,window.PIQ_BO_CONFIG_MERGED=a(a({},window.__PIQ_CASHIER_CONFIG__),e)}catch(e){console.log(e)}},Se=function(){try{var e=document.getElementById("cashierIframe");e?e.remove():console.log("No PIQ Cashier found and can't reset")}catch(e){console.error(e),console.log("Unable to destroy PIQ Cashier - has it been setup?")}},Ce=n(1),be=function(e,t,n,a){n.iframe=document.createElement("iframe");var r=t.environment,i=t.containerHeight,o=void 0===i?"100%":i,s=t.containerWidth,c=void 0===s?"100%":s,d=t.containerMinHeight,l=void 0===d?"0px":d,u=function(e){if(!e)return"https://api.paymentiq.io/paymentiq/cashier";switch(e){case"production":return"https://api.paymentiq.io/paymentiq/cashier";case"mrgreen":return"https://mrgreen-api.paymentiq.io/paymentiq/cashier";case"casumo":return"https://casumo-api.paymentiq.io/paymentiq/cashier";case"test":return"https://test-api.paymentiq.io/paymentiq/cashier";case"development":return"http://localhost:5000"}}(r);n.iframe.style.borderWidth=0,n.iframe.style.height=o,n.iframe.style.minHeight=l,n.iframe.style.width=c,n.iframe.style.left="0px",n.iframe.allow="geolocation *;camera *;payment *;clipboard-read *; clipboard-write *;",n.iframe.allowTransparency,n.iframe.id="cashierIframe",n.iframe.setAttribute("data-hj-allow-iframe","true"),n.iframe.setAttribute("data-cy","cashier-iframe");var f=ge(ye(t));f.length>2e3&&console.error("Query length is over 2000 characters. self can be breaking in some browsers. Look into your passed in parameters, are all needed? Did you know that any passed in attributes can be passed in using the Javascript-API instead?. Read more over at https://docs.paymentiq.io/europe/cashier/general/javascriptapi");var p=u+"/?"+f+"&attributes.bootstrapVersion="+Ce.version;return n.iframe.src=p,n.iframe.onload=a,e.appendChild(n.iframe),window.PIQ_CASHIER_URI=p,n.iframe},Ie=function(e,t,n){var r=a({},t);r.didAccessToken&&(r.didAccessToken=JSON.stringify(r.didAccessToken)),r.userData&&(r.userData=JSON.stringify(r.userData)),n.iframe=document.createElement("iframe");var i=r.environment,o=(r.containerHeight,r.containerWidth),s=void 0===o?"1px":o,c=r.containerMinHeight,d=void 0===c?"0px":c,l=function(e,t){if(!e)return"http://localhost:4000";switch(e){case"production":case"test":return"https://pay.paymentiq.io/checkout-client/"+(t||"master");case"development":return"http://localhost:4000"}}(i,r.version);n.iframe.style.borderWidth=0,n.iframe.style.height="250px",n.iframe.style.minHeight=d,n.iframe.style.width=s,n.iframe.style.minWidth="100%",n.iframe.style.left="0px",n.iframe.allow="geolocation *",n.iframe.id="lookupIframe",n.iframe.setAttribute("data-hj-allow-iframe","true"),n.iframe.setAttribute("data-cy","lookup-iframe");var u=ge(ye(r));return u.length>2e3&&console.error("Query length is over 2000 characters. self can be breaking in some browsers. Look into your passed in parameters, are all needed? Did you know that any passed in attributes can be passed in using the Javascript-API instead?. Read more over at https://docs.paymentiq.io/europe/cashier/general/javascriptapi"),n.iframe.src=l+"/?"+u,e.appendChild(n.iframe),n.iframe},Oe=function(){function e(e,t,n){this.initCssSet=!1;var r=document.querySelector(e);r.className="piq-cashier-wrapper",this.cashierContainerId=(new Date).getTime().toString(),r.setAttribute("cashier_container_uid",this.cashierContainerId),t.containerMinHeight&&(this.containerMinHeight=t.containerMinHeight);var i=a({},t),o=function(e){var t=e.font,n=e.locale,r=he();if(e.attributes||(e.attributes={}),e.attributes.hostUri=r,e.lookupConfig){var i=a({},e.lookupConfig),o=a(a(a(a({merchantId:e.merchantId},i),t&&{font:t}),n&&{locale:n}),{hostUri:r,theme:a({},e.theme),containerWidth:e.containerWidth||void 0,environment:i.environment||e.environment||"production"});return delete e.lookupConfig,{cashierConfig:e,lookupConfig:o}}return{cashierConfig:e}}(i),c=o.cashierConfig,d=o.lookupConfig;return this.cashierConfig=c,this.element=r,this.lookupLoaded=!1,this.cashierLoaded=!1,d?this.setupCheckoutFlow(r,d,n,this):this.setupCashierFlow(n),function(){try{s.a.getV18({},(function(e){window._piqDFP=e}))}catch(e){console.error("Failed to generate device id"),console.error(e)}}(),window.__PIQ_CASHIER_CONFIG__=i,this.api(!1,null)}return e.prototype.setupCashierFlow=function(e){this.setupCashier({callback:e})},e.prototype.setupCheckoutFlow=function(e,t,n,a){var r=this,i=null;t&&(t.domElement||e)&&(i=Ie(t.domElement||e,t,a)),i.onload=function(){r.lookupLoaded=!0,n(r.api(!0,i))}},e.prototype.setupCashier=function(e){var t=this;try{var n=e.callback,r=void 0===n?null:n,i=e.userId,o=e.sessionId,s=e.user,c=void 0===s?{}:s,d=e.attributes,l=void 0===d?{}:d,u=e.didToken,f=void 0===u?null:u,p=this.element,h=this.cashierConfig,m=this.cashierLoaded;if(p&&h&&!m){i&&(h.userId=i),o&&(h.sessionId=o),f&&(h.attributes||(h.attributes={}),h.attributes.didToken=f),h.user=a(a({},h.user),c),h.attributes=a(a({},h.attributes),l);var g=be(p,h,this,(function(){t.cashierLoaded=!0,r&&r(t.api(!0,g))}));!function(e,t,n){void 0===e&&(e=1e4),setTimeout((function(){var a=document.querySelector(".piq-cashier-wrapper").attributes.cashier_container_uid.value;n()||t!==a||self.postMessage({eventType:H,payload:{status:"Could not load cashier iframe. Execution time limit was exceeded: "+e+" milliseconds",timeLimit:e}},"*")}),e)}(h.initLoadErrorTimeout,this.cashierContainerId,(function(){return t.cashierLoaded}))}}catch(e){console.log("Failed to setup cashier"),console.error(e)}},e.prototype.api=function(e,t){var n,r,i=this,o={set:function(e){!function(e,t){oe({eventType:d,payload:ve(e)},t.iframe.contentWindow,me(t.iframe))}(e,i)},css:function(e){se(e,i)},pause:function(){ce(i)},resume:function(){de(i)},on:function(){}};return this.containerMinHeight&&!this.initCssSet&&(n=this.containerMinHeight,r=this,window.addEventListener("message",(function(e){e.data.eventType===S&&se("\n #app-container.auto-height {\n min-height: "+n+"!important;\n }\n ",r)})),this.initCssSet=!0),e&&t?(fe(t.id),ie(this),a(a({},o),{on:function(e){re(e)}})):o},e}();window._PaymentIQCashier=Oe,window._PaymentIQCashierReset=Se;t.default=Oe}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.beta=t():e.beta=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var a,r;!function(i,o,s){"use strict";"undefined"!=typeof window&&n(2)?void 0===(r="function"==typeof(a=s)?a.call(t,n,t,e):a)||(e.exports=r):e.exports?e.exports=s():o.exports?o.exports=s():o.Fingerprint2=s()}(0,this,(function(){"use strict";void 0===Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var e=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},t=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},a=function(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},r=function(e,t){return[e[0]^t[0],e[1]^t[1]]},i=function(e){return e=r(e,[0,e[0]>>>1]),e=t(e,[4283543511,3981806797]),e=r(e,[0,e[0]>>>1]),e=t(e,[3301882366,444984403]),e=r(e,[0,e[0]>>>1])},o=function(o,s){s=s||0;for(var c=(o=o||"").length%16,d=o.length-c,l=[0,s],u=[0,s],f=[0,0],p=[0,0],h=[2277735313,289559509],m=[1291169091,658871167],g=0;g<d;g+=16)f=[255&o.charCodeAt(g+4)|(255&o.charCodeAt(g+5))<<8|(255&o.charCodeAt(g+6))<<16|(255&o.charCodeAt(g+7))<<24,255&o.charCodeAt(g)|(255&o.charCodeAt(g+1))<<8|(255&o.charCodeAt(g+2))<<16|(255&o.charCodeAt(g+3))<<24],p=[255&o.charCodeAt(g+12)|(255&o.charCodeAt(g+13))<<8|(255&o.charCodeAt(g+14))<<16|(255&o.charCodeAt(g+15))<<24,255&o.charCodeAt(g+8)|(255&o.charCodeAt(g+9))<<8|(255&o.charCodeAt(g+10))<<16|(255&o.charCodeAt(g+11))<<24],f=t(f,h),f=n(f,31),f=t(f,m),l=r(l,f),l=n(l,27),l=e(l,u),l=e(t(l,[0,5]),[0,1390208809]),p=t(p,m),p=n(p,33),p=t(p,h),u=r(u,p),u=n(u,31),u=e(u,l),u=e(t(u,[0,5]),[0,944331445]);switch(f=[0,0],p=[0,0],c){case 15:p=r(p,a([0,o.charCodeAt(g+14)],48));case 14:p=r(p,a([0,o.charCodeAt(g+13)],40));case 13:p=r(p,a([0,o.charCodeAt(g+12)],32));case 12:p=r(p,a([0,o.charCodeAt(g+11)],24));case 11:p=r(p,a([0,o.charCodeAt(g+10)],16));case 10:p=r(p,a([0,o.charCodeAt(g+9)],8));case 9:p=r(p,[0,o.charCodeAt(g+8)]),p=t(p,m),p=n(p,33),p=t(p,h),u=r(u,p);case 8:f=r(f,a([0,o.charCodeAt(g+7)],56));case 7:f=r(f,a([0,o.charCodeAt(g+6)],48));case 6:f=r(f,a([0,o.charCodeAt(g+5)],40));case 5:f=r(f,a([0,o.charCodeAt(g+4)],32));case 4:f=r(f,a([0,o.charCodeAt(g+3)],24));case 3:f=r(f,a([0,o.charCodeAt(g+2)],16));case 2:f=r(f,a([0,o.charCodeAt(g+1)],8));case 1:f=r(f,[0,o.charCodeAt(g)]),f=t(f,h),f=n(f,31),f=t(f,m),l=r(l,f)}return l=r(l,[0,o.length]),u=r(u,[0,o.length]),l=e(l,u),u=e(u,l),l=i(l),u=i(u),l=e(l,u),u=e(u,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(u[0]>>>0).toString(16)).slice(-8)+("00000000"+(u[1]>>>0).toString(16)).slice(-8)},s={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},c=function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,a=e.length;n<a;n++)t(e[n],n,e);else for(var r in e)e.hasOwnProperty(r)&&t(e[r],r,e)},d=function(e,t){var n=[];return null==e?n:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(c(e,(function(e,a,r){n.push(t(e,a,r))})),n)},l=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},u=function(e){var t=[window.screen.width,window.screen.height];return e.screen.detectScreenOrientation&&t.sort().reverse(),t},f=function(e){if(window.screen.availWidth&&window.screen.availHeight){var t=[window.screen.availHeight,window.screen.availWidth];return e.screen.detectScreenOrientation&&t.sort().reverse(),t}return e.NOT_AVAILABLE},p=function(e){if(null==navigator.plugins)return e.NOT_AVAILABLE;for(var t=[],n=0,a=navigator.plugins.length;n<a;n++)navigator.plugins[n]&&t.push(navigator.plugins[n]);return m(e)&&(t=t.sort((function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}))),d(t,(function(e){var t=d(e,(function(e){return[e.type,e.suffixes]}));return[e.name,e.description,t]}))},h=function(e){var t=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){t=d(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],(function(t){try{return new window.ActiveXObject(t),t}catch(t){return e.ERROR}}))}else t.push(e.NOT_AVAILABLE);return navigator.plugins&&(t=t.concat(p(e))),t},m=function(e){for(var t=!1,n=0,a=e.plugins.sortPluginsFor.length;n<a;n++){var r=e.plugins.sortPluginsFor[n];if(navigator.userAgent.match(r)){t=!0;break}}return t},g=function(e){try{return!!window.sessionStorage}catch(t){return e.ERROR}},y=function(e){try{return!!window.localStorage}catch(t){return e.ERROR}},v=function(e){try{return!!window.indexedDB}catch(t){return e.ERROR}},T=function(e){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:e.NOT_AVAILABLE},w=function(e){return navigator.cpuClass||e.NOT_AVAILABLE},E=function(e){return navigator.platform?navigator.platform:e.NOT_AVAILABLE},A=function(e){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:e.NOT_AVAILABLE},S=function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]},C=function(e){var t=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var a=n.getContext("2d");return a.rect(0,0,10,10),a.rect(2,2,6,6),t.push("canvas winding:"+(!1===a.isPointInPath(5,5,"evenodd")?"yes":"no")),a.textBaseline="alphabetic",a.fillStyle="#f60",a.fillRect(125,1,62,20),a.fillStyle="#069",e.dontUseFakeFontInCanvas?a.font="11pt Arial":a.font="11pt no-real-font-123",a.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),a.fillStyle="rgba(102, 204, 0, 0.2)",a.font="18pt Arial",a.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),a.globalCompositeOperation="multiply",a.fillStyle="rgb(255,0,255)",a.beginPath(),a.arc(50,50,50,0,2*Math.PI,!0),a.closePath(),a.fill(),a.fillStyle="rgb(0,255,255)",a.beginPath(),a.arc(100,50,50,0,2*Math.PI,!0),a.closePath(),a.fill(),a.fillStyle="rgb(255,255,0)",a.beginPath(),a.arc(75,100,50,0,2*Math.PI,!0),a.closePath(),a.fill(),a.fillStyle="rgb(255,0,255)",a.arc(75,75,75,0,2*Math.PI,!0),a.arc(75,75,25,0,2*Math.PI,!0),a.fill("evenodd"),n.toDataURL&&t.push("canvas fp:"+n.toDataURL()),t},b=function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"};if(!(e=U()))return null;var n=[],a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a);var r=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),a.itemSize=3,a.numItems=3;var i=e.createProgram(),o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),e.compileShader(o);var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),e.compileShader(s),e.attachShader(i,o),e.attachShader(i,s),e.linkProgram(i),e.useProgram(i),i.vertexPosAttrib=e.getAttribLocation(i,"attrVertex"),i.offsetUniform=e.getUniformLocation(i,"uniformOffset"),e.enableVertexAttribArray(i.vertexPosArray),e.vertexAttribPointer(i.vertexPosAttrib,a.itemSize,e.FLOAT,!1,0,0),e.uniform2f(i.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,a.numItems);try{n.push(e.canvas.toDataURL())}catch(e){}n.push("extensions:"+(e.getSupportedExtensions()||[]).join(";")),n.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),n.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),n.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),n.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),n.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),n.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),n.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),n.push("webgl max anisotropy:"+function(e){var t=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");if(t){var n=e.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(e)),n.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),n.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),n.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),n.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),n.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),n.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),n.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),n.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),n.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),n.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),n.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),n.push("webgl red bits:"+e.getParameter(e.RED_BITS)),n.push("webgl renderer:"+e.getParameter(e.RENDERER)),n.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),n.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),n.push("webgl vendor:"+e.getParameter(e.VENDOR)),n.push("webgl version:"+e.getParameter(e.VERSION));try{var d=e.getExtension("WEBGL_debug_renderer_info");d&&(n.push("webgl unmasked vendor:"+e.getParameter(d.UNMASKED_VENDOR_WEBGL)),n.push("webgl unmasked renderer:"+e.getParameter(d.UNMASKED_RENDERER_WEBGL)))}catch(e){}return e.getShaderPrecisionFormat?(c(["FLOAT","INT"],(function(t){c(["VERTEX","FRAGMENT"],(function(a){c(["HIGH","MEDIUM","LOW"],(function(r){c(["precision","rangeMin","rangeMax"],(function(i){var o=e.getShaderPrecisionFormat(e[a+"_SHADER"],e[r+"_"+t])[i];"precision"!==i&&(i="precision "+i);var s=["webgl ",a.toLowerCase()," shader ",r.toLowerCase()," ",t.toLowerCase()," ",i,":",o].join("");n.push(s)}))}))}))})),F(e),n):(F(e),n)},I=function(){try{var e=U(),t=e.getExtension("WEBGL_debug_renderer_info"),n=e.getParameter(t.UNMASKED_VENDOR_WEBGL)+"~"+e.getParameter(t.UNMASKED_RENDERER_WEBGL);return F(e),n}catch(e){return null}},O=function(){var e=document.createElement("div");e.innerHTML="&nbsp;",e.className="adsbox";var t=!1;try{document.body.appendChild(e),t=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(e)}catch(e){t=!1}return t},_=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(e){return!0}return!1},x=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},B=function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.oscpu,a=navigator.platform.toLowerCase();if(e=t.indexOf("windows phone")>=0?"Windows Phone":t.indexOf("windows")>=0||t.indexOf("win16")>=0||t.indexOf("win32")>=0||t.indexOf("win64")>=0||t.indexOf("win95")>=0||t.indexOf("win98")>=0||t.indexOf("winnt")>=0||t.indexOf("wow64")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0||t.indexOf("cros")>=0||t.indexOf("x11")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0||t.indexOf("ipod")>=0||t.indexOf("crios")>=0||t.indexOf("fxios")>=0?"iOS":t.indexOf("macintosh")>=0||t.indexOf("mac_powerpc)")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows"!==e&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e&&-1===t.indexOf("cros"))return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(n.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(n.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===e))return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||((a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||((a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||!(a.indexOf("arm")>=0&&"Windows Phone"===e)&&(!(a.indexOf("pike")>=0&&t.indexOf("opera mini")>=0)&&((a.indexOf("win")<0&&a.indexOf("linux")<0&&a.indexOf("mac")<0&&a.indexOf("iphone")<0&&a.indexOf("ipad")<0&&a.indexOf("ipod")<0)!==("Other"===e)||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e))))},P=function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(t.indexOf("edge/")>=0||t.indexOf("iemobile/")>=0)return!1;if(t.indexOf("opera mini")>=0)return!1;if(("Chrome"===(e=t.indexOf("firefox/")>=0?"Firefox":t.indexOf("opera/")>=0||t.indexOf(" opr/")>=0?"Opera":t.indexOf("chrome/")>=0?"Chrome":t.indexOf("safari/")>=0?t.indexOf("android 1.")>=0||t.indexOf("android 2.")>=0||t.indexOf("android 3.")>=0||t.indexOf("android 4.")>=0?"AOSP":"Safari":t.indexOf("trident/")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==n)return!0;var a,r=eval.toString().length;if(37===r&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===r&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===r&&"Chrome"!==e&&"AOSP"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(e){try{e.toSource(),a=!0}catch(e){a=!1}}return a&&"Firefox"!==e&&"Other"!==e},k=function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},M=function(){if(!k())return!1;var e=U(),t=!!window.WebGLRenderingContext&&!!e;return F(e),t},L=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},R=function(){return void 0!==window.swfobject},D=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},N=function(e,t){window.___fp_swf_loaded=function(t){e(t)};var n=t.fonts.swfContainerId;!function(e){var t=document.createElement("div");t.setAttribute("id",e.fonts.swfContainerId),document.body.appendChild(t)}();var a={onReady:"___fp_swf_loaded"};window.swfobject.embedSWF(t.fonts.swfPath,n,"1","1","9.0.0",!1,a,{allowScriptAccess:"always",menu:"false"},{})},U=function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t},F=function(e){var t=e.getExtension("WEBGL_lose_context");null!=t&&t.loseContext()},G=[{key:"userAgent",getData:function(e){e(navigator.userAgent)}},{key:"webdriver",getData:function(e,t){e(null==navigator.webdriver?t.NOT_AVAILABLE:navigator.webdriver)}},{key:"language",getData:function(e,t){e(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||t.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(e,t){e(window.screen.colorDepth||t.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(e,t){e(navigator.deviceMemory||t.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(e,t){e(window.devicePixelRatio||t.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(e,t){e(T(t))}},{key:"screenResolution",getData:function(e,t){e(u(t))}},{key:"availableScreenResolution",getData:function(e,t){e(f(t))}},{key:"timezoneOffset",getData:function(e){e((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(e,t){window.Intl&&window.Intl.DateTimeFormat?e((new window.Intl.DateTimeFormat).resolvedOptions().timeZone):e(t.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(e,t){e(g(t))}},{key:"localStorage",getData:function(e,t){e(y(t))}},{key:"indexedDb",getData:function(e,t){e(v(t))}},{key:"addBehavior",getData:function(e){e(!(!document.body||!document.body.addBehavior))}},{key:"openDatabase",getData:function(e){e(!!window.openDatabase)}},{key:"cpuClass",getData:function(e,t){e(w(t))}},{key:"platform",getData:function(e,t){e(E(t))}},{key:"doNotTrack",getData:function(e,t){e(A(t))}},{key:"plugins",getData:function(e,t){L()?t.plugins.excludeIE?e(t.EXCLUDED):e(h(t)):e(p(t))}},{key:"canvas",getData:function(e,t){k()?e(C(t)):e(t.NOT_AVAILABLE)}},{key:"webgl",getData:function(e,t){M()?e(b()):e(t.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(e){M()?e(I()):e()}},{key:"adBlock",getData:function(e){e(O())}},{key:"hasLiedLanguages",getData:function(e){e(_())}},{key:"hasLiedResolution",getData:function(e){e(x())}},{key:"hasLiedOs",getData:function(e){e(B())}},{key:"hasLiedBrowser",getData:function(e){e(P())}},{key:"touchSupport",getData:function(e){e(S())}},{key:"fonts",getData:function(e,t){var n=["monospace","sans-serif","serif"],a=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];if(t.fonts.extendedJsFonts){a=a.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"])}a=(a=a.concat(t.fonts.userDefinedFonts)).filter((function(e,t){return a.indexOf(e)===t}));var r=document.getElementsByTagName("body")[0],i=document.createElement("div"),o=document.createElement("div"),s={},c={},d=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="72px",e.style.fontStyle="normal",e.style.fontWeight="normal",e.style.letterSpacing="normal",e.style.lineBreak="auto",e.style.lineHeight="normal",e.style.textTransform="none",e.style.textAlign="left",e.style.textDecoration="none",e.style.textShadow="none",e.style.whiteSpace="normal",e.style.wordBreak="normal",e.style.wordSpacing="normal",e.innerHTML="mmmmmmmmmmlli",e},l=function(e,t){var n=d();return n.style.fontFamily="'"+e+"',"+t,n},u=function(e){for(var t=!1,a=0;a<n.length;a++)if(t=e[a].offsetWidth!==s[n[a]]||e[a].offsetHeight!==c[n[a]])return t;return t},f=function(){for(var e=[],t=0,a=n.length;t<a;t++){var r=d();r.style.fontFamily=n[t],i.appendChild(r),e.push(r)}return e}();r.appendChild(i);for(var p=0,h=n.length;p<h;p++)s[n[p]]=f[p].offsetWidth,c[n[p]]=f[p].offsetHeight;var m=function(){for(var e={},t=0,r=a.length;t<r;t++){for(var i=[],s=0,c=n.length;s<c;s++){var d=l(a[t],n[s]);o.appendChild(d),i.push(d)}e[a[t]]=i}return e}();r.appendChild(o);for(var g=[],y=0,v=a.length;y<v;y++)u(m[a[y]])&&g.push(a[y]);r.removeChild(o),r.removeChild(i),e(g)},pauseBefore:!0},{key:"fontsFlash",getData:function(e,t){return R()?D()?t.fonts.swfPath?void N((function(t){e(t)}),t):e("missing options.fonts.swfPath"):e("flash not installed"):e("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(e,t){var n=t.audio;if(n.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return e(t.EXCLUDED);var a=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==a)return e(t.NOT_AVAILABLE);var r=new a(1,44100,44100),i=r.createOscillator();i.type="triangle",i.frequency.setValueAtTime(1e4,r.currentTime);var o=r.createDynamicsCompressor();c([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],(function(e){void 0!==o[e[0]]&&"function"==typeof o[e[0]].setValueAtTime&&o[e[0]].setValueAtTime(e[1],r.currentTime)})),i.connect(o),o.connect(r.destination),i.start(0),r.startRendering();var s=setTimeout((function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "'+navigator.userAgent+'".'),r.oncomplete=function(){},r=null,e("audioTimeout")}),n.timeout);r.oncomplete=function(t){var n;try{clearTimeout(s),n=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce((function(e,t){return e+Math.abs(t)}),0).toString(),i.disconnect(),o.disconnect()}catch(t){return void e(t)}e(n)}}},{key:"enumerateDevices",getData:function(e,t){if(!l())return e(t.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then((function(t){e(t.map((function(e){return"id="+e.deviceId+";gid="+e.groupId+";"+e.kind+";"+e.label})))})).catch((function(t){e(t)}))}}],H=function(e){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/Valve/fingerprintjs2#upgrade-guide-from-182-to-200")};return H.get=function(e,t){t?e||(e={}):(t=e,e={}),function(e,t){if(null==t)return e;var n,a;for(a in t)null==(n=t[a])||Object.prototype.hasOwnProperty.call(e,a)||(e[a]=n)}(e,s),e.components=e.extraComponents.concat(G);var n={data:[],addPreprocessedComponent:function(t,a){"function"==typeof e.preprocessor&&(a=e.preprocessor(t,a)),n.data.push({key:t,value:a})}},a=-1,r=function(i){if((a+=1)>=e.components.length)t(n.data);else{var o=e.components[a];if(e.excludes[o.key])r(!1);else{if(!i&&o.pauseBefore)return a-=1,void setTimeout((function(){r(!0)}),1);try{o.getData((function(e){n.addPreprocessedComponent(o.key,e),r(!1)}),e)}catch(e){n.addPreprocessedComponent(o.key,String(e)),r(!1)}}}};r(!1)},H.getPromise=function(e){return new Promise((function(t,n){H.get(e,t)}))},H.getV18=function(e,t){return null==t&&(t=e,e={}),H.get(e,(function(n){for(var a=[],r=0;r<n.length;r++){var i=n[r];if(i.value===(e.NOT_AVAILABLE||"not available"))a.push({key:i.key,value:"unknown"});else if("plugins"===i.key)a.push({key:"plugins",value:d(i.value,(function(e){var t=d(e[2],(function(e){return e.join?e.join("~"):e})).join(",");return[e[0],e[1],t].join("::")}))});else if(-1!==["canvas","webgl"].indexOf(i.key)&&Array.isArray(i.value))a.push({key:i.key,value:i.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(i.key)){if(!i.value)continue;a.push({key:i.key,value:1})}else i.value?a.push(i.value.join?{key:i.key,value:i.value.join(";")}:i):a.push({key:i.key,value:i.value})}var s=o(d(a,(function(e){return e.value})).join("~~~"),31);t(s,a)}))},H.x64hash128=o,H.VERSION="2.1.2",H}))},function(e){e.exports=JSON.parse('{"name":"paymentiq-cashier-bootstrapper","description":"Integration bootstrapper for the PaymentIQ Cashier V2\\"","version":"1.3.24-beta.0","main":"dist/cashier.js","types":"index.d.ts","files":["dist","index.d.ts"],"scripts":{"build":"webpack --progress --colors --display-error-details --config build/webpack.base.conf.js","watch":"webpack --watch --progress --colors --display-error-details --config build/webpack.base.conf.js","serve":"serve -l 9091 ./","start":"concurrently --kill-others \\"npm run watch\\" \\"npm run serve\\"","cypress:all":"cypress run --headless --browser chrome","cypress":"cypress open","cypress:server":"npm run build && start-server-and-test start http://localhost:9091 cypress","cypress:start:all":"npm run build && start-server-and-test start http://localhost:9091 cypress:all","cypress:spec":"cypress run --spec cypress/integration/Checkout/checkout.spec.js","cypress:docker:run":"npm install cypress && npm run build && start-server-and-test start http://localhost:9091 cypress:all"},"repository":{"type":"git","url":"git+https://github.com/devcode-git/PaymentIQ-Cashier-V2-Integration.git"},"keywords":["Javascript","PaymentIQ","Cashier"],"author":"simon.solders@devcode.se","license":"ISC","bugs":{"url":"https://github.com/devcode-git/PaymentIQ-Cashier-V2-Integration/issues"},"homepage":"https://github.com/devcode-git/PaymentIQ-Cashier-V2-Integration#readme","dependencies":{"fingerprintjs2":"^2.1.0"},"devDependencies":{"@types/webpack-env":"^1.15.2","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","babel-core":"^6.22.1","babel-loader":"^7.1.1","babel-plugin-dynamic-import-node":"^1.2.0","babel-plugin-transform-es2015-modules-commonjs":"^6.26.0","babel-plugin-transform-runtime":"^6.22.0","babel-preset-env":"^1.7.0","babel-preset-stage-2":"^6.22.0","concurrently":"^5.3.0","cypress":"^6.2.0","eslint":"^7.10.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-prefer-arrow":"^1.2.2","eslint-plugin-unicorn":"^22.0.0","serve":"^11.3.2","start-server-and-test":"^1.11.6","ts-loader":"^8.0.3","typescript":"^4.0.2","webpack":"^4.29.0","webpack-cli":"^3.3.12"}}')},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";n.r(t);var a=function(){return(a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function r(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))}function i(e,t){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o=n(0),s=n.n(o),c="SET_CSS",d="UPDATE_DATA",l="TX_SUCCESS",u="TX_FAILED",f="TX_PENDING",p="TX_UNRESOLVED",h="CASHIER_PAUSE",m="CASHIER_RESUME",g="POST_INTEGRATION_URL",y="PIQ_DEVICE_ID",v="PIQ_INITIATE_NATIVE_PAYMENT",T="PIQ_PROCESS_NATIVE_PAYMENT",w="PIQ_STATUS_NATIVE_PAYMENT",E="CHANGE",A="GET_INTEGRATIONS_SCRIPT_URL",S="CASHIER_INIT_LOAD",C="APP_SET_HEIGHT",b="DONE_LOADING",I="IS_LOADING",O="SELECTED_TX_METHOD",_="ENTERED_TX_METHOD_PAGE",x="APP_ROUTE_CHANGE",B="APP_VISIBLE",P="APP_HIDDEN",k="SETUP_AUTHORIZE_SCRIPT",M="EXECUTE_AUTHORIZE_METHOD",L="TOP_URL_REPLACE",R="APPLICATION_REDIRECT",D="ADD_CONFIG_TO_WINDOW",N="CANCEL_PENDING_WITHDRAWAL",U="TX_VALIDATION_FAILED",F="NEW_IFRAME",G="NEW_WINDOW",H="ONLOAD_ERROR",V="TX_CANCELLED",W="LOOKUP_INIT_LOAD",j="PIQ_LOOKUP_CUSTOMER_IDENTIFIED",X="PIQ_CUSTOMER_DATA",q="PIQ_LOOKUP_SHA_256",K="PIQ_LOOKUP_EDIT_USER",Q="PIQ_LOOKUP_CUSTOMER_RESET",J="PIQ_LOOKUP_REPORT_HEIGHT",z="TRANSACTION_INIT",Z=null,Y=null,$=null;function ee(e){return!(-1!==["https://test-api.paymentiq.io","https://mrgreen-api.paymentiq.io","https://casumo-api.paymentiq.io","https://api.paymentiq.io","https://pay.paymentiq.io","http://localhost:5000","http://0.0.0.0:5000","http://0.0.0.0:4000","http://localhost:4000"].indexOf(e.origin)||e.data&&e.data.eventType&&-1!==["CASHIER_INIT_LOAD","LOOKUP_INIT_LOAD","IS_LOADING"].indexOf(e.data.eventType))&&(e.data&&e.data.eventType&&console.error("Integration: Failed to read post message - invalid origin",e.origin,e.data.eventType),!0)}function te(e){e.data&&e.data.eventType&&console.error("Invalid origin - will not read PIQ Cashier events",e.data.eventType,e.origin)}var ne=function(e){if(ee(e))return te(e);switch(e.data.eventType){case S:if(Z.cashierInitLoad)return Z.cashierInitLoad();break;case W:if(Z.lookupInitLoad)return Z.lookupInitLoad();break;case E:if(Z.change)return Z.change({data:e.data.payload});break;case d:if(Z.update)return Z.update({data:e.data.payload});break;case l:if(Z.success)return Z.success({data:e.data.payload});break;case u:if(Z.failure)return Z.failure({data:e.data.payload});break;case f:if(Z.pending)return Z.pending({data:e.data.payload});break;case p:if(Z.unresolved)return Z.unresolved({data:e.data.payload});break;case C:return Te(e.data.payload.height);case h:if(Z.pause)return Z.pause({data:e.data.payload});break;case m:if(Z.resume)return Z.resume({data:e.data.payload});break;case I:if(Z.isLoading)return Z.isLoading({data:e.data.eventType});break;case b:if(Z.doneLoading)return Z.doneLoading({data:e.data.eventType});break;case B:if(Z.isVisible)return Z.isVisible();break;case P:if(Z.isHidden)return Z.isHidden();break;case O:if(Z.paymentMethodSelect&&e.data&&e.data.payload)return Z.paymentMethodSelect({data:e.data.payload});break;case _:if(Z.paymentMethodPageEntered&&e.data&&e.data.payload)return Z.paymentMethodPageEntered({data:e.data.payload});break;case x:if(Z.navigate&&e.data&&e.data.payload)return Z.navigate({data:e.data.payload});break;case F:case G:if(Z.newProviderWindow)return Z.newProviderWindow({data:e.data.eventType});break;case N:if(Z.cancelledPendingWD)return Z.cancelledPendingWD({data:e.data.payload});break;case U:if(Z.validationFailed)return Z.validationFailed({data:e.data.payload});break;case j:return function(e){var t=e.data,n=t.eventType,a=t.payload;if(!n&&"string"==typeof e.data){var r=JSON.parse(e.data);n=r.eventType,a=r.payload}if(Z.lookupUserIdentified&&Z.lookupUserIdentified({data:a}),!$||$.cashierLoaded)return de({iframe:document.getElementById("cashierIframe")});var i={userId:a.userId,sessionId:a.sessionId||null,user:a.user,attributes:a.attributes,didToken:a.didToken||null};$.setupCashier(i)}(e);case X:if(Z.lookupUserData)return Z.lookupUserData({data:e.data.payload});case V:if(Z.cancelled)return Z.cancelled({data:e.data.payload});break;case H:if(Z.onLoadError)return Z.onLoadError({data:e.data.payload});break;case z:if(Z.transactionInit)return Z.transactionInit({data:e.data.payload})}},ae=function(e){return r(void 0,void 0,void 0,(function(){var t,n,a,o,s,c,d,l;return i(this,(function(u){if(ee(e))return[2,te(e)];try{switch(t=e.data,n=t.eventType,a=t.payload,n||"string"!=typeof e.data||(o=JSON.parse(e.data),n=o.eventType,a=o.payload),n){case D:Ae(a);break;case k:!function(e){if(e&&e.authorizeScript){var t=e.provider,n=e.authorizeScript;try{var a="Authenticate_"+t;if(!document.getElementById(a)){var r=document.createElement("script");r.id=a,r.innerHTML=n,document.body.appendChild(r)}}catch(e){console.log(e),console.error("Unable to add authenticate script for "+t)}}}(a);break;case M:s=a.method,c=a.parameters,window[s](c);break;case A:return[2,Y(a)];case L:!function(e){window.location.replace(e.url);var t=JSON.stringify({eventType:R,payload:e});window.ReactNativeWebView?oe(t,window.ReactNativeWebView,"*"):oe(t)}(a);break;case v:!function(e){var t=JSON.stringify({eventType:v,payload:e});window.ReactNativeWebView?oe(t,window.ReactNativeWebView,"*"):oe(t)}(a);break;case T:d=document.getElementById("cashierIframe"),oe({eventType:T,payload:a},d.contentWindow,he());break;case w:l=JSON.stringify({eventType:"PIQ_STATUS_NATIVE_PAYMENT",payload:a}),window.ReactNativeWebView?oe(l,window.ReactNativeWebView,"*"):oe(l);break;case q:!function(e){r(void 0,void 0,void 0,(function(){var t,n,a,r,o;return i(this,(function(i){switch(i.label){case 0:return e.codeVerifier?(t=e.codeVerifier,n=new TextEncoder,a=n.encode(t),[4,window.crypto.subtle.digest("SHA-256",a)]):[3,2];case 1:r=i.sent(),o=document.getElementById("lookupIframe"),oe({eventType:q,payload:{codeChallenge:r,codeVerifier:t}},o.contentWindow,me(o)),i.label=2;case 2:return[2]}}))}))}(a);break;case K:return[2,ce({iframe:document.getElementById("cashierIframe")})];case Q:Se(),$.cashierLoaded=!1;break;case J:return[2,we(e.data.payload.height)]}}catch(e){console.log(e)}return[2]}))}))},re=function(e){Z=e,window.removeEventListener("message",ne,!1),window.addEventListener("message",ne),e.isLoading&&le()},ie=function(e){$=e,Y=ue,window.removeEventListener("message",ae,!1),window.addEventListener("message",ae)},oe=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);try{t?t.postMessage(e,n):window.postMessage(e,he())}catch(t){e.eventType?console.error("Failed to send postMessage: ",e.eventType):console.error(t)}},se=function(e,t){oe({eventType:c,payload:e},t.iframe.contentWindow,me(t.iframe))},ce=function(e){if(!e.iframe)return null;oe({eventType:h},e.iframe.contentWindow,me(e.iframe));var t=document.getElementById("cashierIframe");t&&(t.tabIndex=-1)},de=function(e){oe({eventType:m},e.iframe.contentWindow,me(e.iframe)),document.getElementById("cashierIframe").tabIndex=0},le=function(){var e=document.querySelector("#cashierIframe");e&&oe({eventType:I},e.contentWindow,me(e))},ue=function(e){var t=document.querySelector("#cashierIframe");oe({eventType:g,payload:{url:Ee("txRefId",e.txRefId),txRefId:e.txRefId}},t.contentWindow,me(t))},fe=function(e){if(window._piqDFP){var t=document.getElementById(e);pe(t,window._piqDFP),delete window._piqDFP}else setTimeout((function(){fe(e)}),50)},pe=function(e,t){t?oe({eventType:y,payload:{deviceId:t}},e.contentWindow,me(e)):console.error("DeviceId not defined")};function he(){return window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),window.location.origin}var me=function(e){var t=e.src.match(/^.+:\/\/[^/]+/)[0];return"https://test-api.paymentiq.io"===t||"https://api.paymentiq.io"===t||"https://mrgreen-api.paymentiq.io"===t||"https://casumo-api.paymentiq.io"===t?"https://pay.paymentiq.io":t},ge=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);try{var a=function(e){return n?e:encodeURIComponent(e)},r=function(e,t){return a("object"==typeof e&&("trackingPixels"===t||"trackingScripts"===t)?JSON.stringify(e):e)},i=[];for(var o in e){var s=e[o];t?null!==e[o]&&""!==e[o]&&i.push(a(o)+"="+r(s,o)):i.push(a(o)+"="+r(s,o))}return i.join("&")}catch(e){console.error(e)}},ye=function(e){var t=a({},e);try{var n=t.theme;for(var r in delete t.theme,n)for(var i in n[r])t["theme_"+r+"_"+i]=n[r][i]}catch(e){console.log(e)}try{var o=t.attributes;for(var s in function(e){delete e.containerMinHeight,delete e.initLoadErrorTimeout,delete e.attributes}(t),o)t["attributes."+s]=o[s];var c=t.user;for(var d in delete t.user,c)t["user."+d]=c[d]}catch(e){console.log(e)}return t},ve=function(e){var t=a({},e);return t.config&&(delete t.config.merchantId,delete t.config.userId,delete t.config.sessionId),t},Te=function(e){document.getElementById("cashierIframe").style.height=e+"px"},we=function(e){document.getElementById("lookupIframe").style.height=e+"px"},Ee=function(e,t){var n=self.window.location.href,a=null,r=new RegExp("[&\\?]"+e+"=");return r.test(n)?(r=new RegExp("([&\\?])"+e+"=\\d+"),a=n.replace(r,"$1"+e+"="+t)):a=n.indexOf("?")>-1?n+"&"+e+"="+t:n+"?"+e+"="+t,a},Ae=function(e){try{var t=JSON.parse(e.config),n=window.PIQ_CASHIER_URI.split("?")[0]+"?"+ge(ye(t));window.PIQ_BO_CONFIG_URI=n,window.PIQ_BO_CONFIG_MERGED=a(a({},window.__PIQ_CASHIER_CONFIG__),e)}catch(e){console.log(e)}},Se=function(){try{var e=document.getElementById("cashierIframe");e?e.remove():console.log("No PIQ Cashier found and can't reset")}catch(e){console.error(e),console.log("Unable to destroy PIQ Cashier - has it been setup?")}},Ce="geolocation *;camera *;payment *;clipboard-read *;clipboard-write *;autoplay *;microphone *;fullscreen *;accelerometer *;magnetometer *;gyroscope *;picture-in-picture *;otp-credentials *;",be=n(1),Ie=function(e,t,n,a){n.iframe=document.createElement("iframe");var r=t.environment,i=t.containerHeight,o=void 0===i?"100%":i,s=t.containerWidth,c=void 0===s?"100%":s,d=t.containerMinHeight,l=void 0===d?"0px":d,u=function(e){if(!e)return"https://api.paymentiq.io/paymentiq/cashier";switch(e){case"production":return"https://api.paymentiq.io/paymentiq/cashier";case"mrgreen":return"https://mrgreen-api.paymentiq.io/paymentiq/cashier";case"casumo":return"https://casumo-api.paymentiq.io/paymentiq/cashier";case"test":return"https://test-api.paymentiq.io/paymentiq/cashier";case"development":return"http://localhost:5000"}}(r);n.iframe.style.borderWidth=0,n.iframe.style.height=o,n.iframe.style.minHeight=l,n.iframe.style.width=c,n.iframe.style.left="0px",n.iframe.allow=Ce,n.iframe.allowTransparency,n.iframe.id="cashierIframe",n.iframe.setAttribute("data-hj-allow-iframe","true"),n.iframe.setAttribute("data-cy","cashier-iframe");var f=ge(ye(t));f.length>2e3&&console.error("Query length is over 2000 characters. self can be breaking in some browsers. Look into your passed in parameters, are all needed? Did you know that any passed in attributes can be passed in using the Javascript-API instead?. Read more over at https://docs.paymentiq.io/europe/cashier/general/javascriptapi");var p=u+"/?"+f+"&attributes.bootstrapVersion="+be.version;return n.iframe.src=p,n.iframe.onload=a,e.appendChild(n.iframe),window.PIQ_CASHIER_URI=p,n.iframe},Oe=function(e,t,n){var r=a({},t);r.didAccessToken&&(r.didAccessToken=JSON.stringify(r.didAccessToken)),r.userData&&(r.userData=JSON.stringify(r.userData)),n.iframe=document.createElement("iframe");var i=r.environment,o=(r.containerHeight,r.containerWidth),s=void 0===o?"1px":o,c=r.containerMinHeight,d=void 0===c?"0px":c,l=function(e,t){if(!e)return"http://localhost:4000";switch(e){case"production":case"test":return"https://pay.paymentiq.io/checkout-client/"+(t||"master");case"development":return"http://localhost:4000"}}(i,r.version);n.iframe.style.borderWidth=0,n.iframe.style.height="250px",n.iframe.style.minHeight=d,n.iframe.style.width=s,n.iframe.style.minWidth="100%",n.iframe.style.left="0px",n.iframe.allow=Ce,n.iframe.id="lookupIframe",n.iframe.setAttribute("data-hj-allow-iframe","true"),n.iframe.setAttribute("data-cy","lookup-iframe");var u=ge(ye(r));return u.length>2e3&&console.error("Query length is over 2000 characters. self can be breaking in some browsers. Look into your passed in parameters, are all needed? Did you know that any passed in attributes can be passed in using the Javascript-API instead?. Read more over at https://docs.paymentiq.io/europe/cashier/general/javascriptapi"),n.iframe.src=l+"/?"+u,e.appendChild(n.iframe),n.iframe},_e=function(){function e(e,t,n){this.initCssSet=!1;var r=document.querySelector(e);r.className="piq-cashier-wrapper",this.cashierContainerId=(new Date).getTime().toString(),r.setAttribute("cashier_container_uid",this.cashierContainerId),t.containerMinHeight&&(this.containerMinHeight=t.containerMinHeight);var i=a({},t),o=function(e){var t=e.font,n=e.locale,r=he();if(e.attributes||(e.attributes={}),e.attributes.hostUri=r,e.lookupConfig){var i=a({},e.lookupConfig),o=a(a(a(a({merchantId:e.merchantId},i),t&&{font:t}),n&&{locale:n}),{hostUri:r,theme:a({},e.theme),containerWidth:e.containerWidth||void 0,environment:i.environment||e.environment||"production"});return delete e.lookupConfig,{cashierConfig:e,lookupConfig:o}}return{cashierConfig:e}}(i),c=o.cashierConfig,d=o.lookupConfig;return this.cashierConfig=c,this.element=r,this.lookupLoaded=!1,this.cashierLoaded=!1,d?this.setupCheckoutFlow(r,d,n,this):this.setupCashierFlow(n),function(){try{s.a.getV18({},(function(e){window._piqDFP=e}))}catch(e){console.error("Failed to generate device id"),console.error(e)}}(),window.__PIQ_CASHIER_CONFIG__=i,this.api(!1,null)}return e.prototype.setupCashierFlow=function(e){this.setupCashier({callback:e})},e.prototype.setupCheckoutFlow=function(e,t,n,a){var r=this,i=null;t&&(t.domElement||e)&&(i=Oe(t.domElement||e,t,a)),i.onload=function(){r.lookupLoaded=!0,n(r.api(!0,i))}},e.prototype.setupCashier=function(e){var t=this;try{var n=e.callback,r=void 0===n?null:n,i=e.userId,o=e.sessionId,s=e.user,c=void 0===s?{}:s,d=e.attributes,l=void 0===d?{}:d,u=e.didToken,f=void 0===u?null:u,p=this.element,h=this.cashierConfig,m=this.cashierLoaded;if(p&&h&&!m){i&&(h.userId=i),o&&(h.sessionId=o),f&&(h.attributes||(h.attributes={}),h.attributes.didToken=f),h.user=a(a({},h.user),c),h.attributes=a(a({},h.attributes),l);var g=Ie(p,h,this,(function(){t.cashierLoaded=!0,r&&r(t.api(!0,g))}));!function(e,t,n){void 0===e&&(e=1e4),setTimeout((function(){var a=document.querySelector(".piq-cashier-wrapper").attributes.cashier_container_uid.value;n()||t!==a||self.postMessage({eventType:H,payload:{status:"Could not load cashier iframe. Execution time limit was exceeded: "+e+" milliseconds",timeLimit:e}},"*")}),e)}(h.initLoadErrorTimeout,this.cashierContainerId,(function(){return t.cashierLoaded}))}}catch(e){console.log("Failed to setup cashier"),console.error(e)}},e.prototype.api=function(e,t){var n,r,i=this,o={set:function(e){!function(e,t){oe({eventType:d,payload:ve(e)},t.iframe.contentWindow,me(t.iframe))}(e,i)},css:function(e){se(e,i)},pause:function(){ce(i)},resume:function(){de(i)},on:function(){}};return this.containerMinHeight&&!this.initCssSet&&(n=this.containerMinHeight,r=this,window.addEventListener("message",(function(e){e.data.eventType===S&&se("\n #app-container.auto-height {\n min-height: "+n+"!important;\n }\n ",r)})),this.initCssSet=!0),e&&t?(fe(t.id),ie(this),a(a({},o),{on:function(e){re(e)}})):o},e}();window._PaymentIQCashier=_e,window._PaymentIQCashierReset=Se;t.default=_e}])}));
package/index.d.ts CHANGED
@@ -157,6 +157,7 @@ export interface CashierConfig {
157
157
  showTransactionOverview?: BooleanOrBooleanString
158
158
  predefinedValues?: BooleanOrBooleanString
159
159
  predefinedAmounts?: number[]
160
+ showCustomAmountButton?: boolean
160
161
  showReceipt?: ShowReceipt
161
162
  showHeader?: BooleanOrBooleanString
162
163
  showFooter?: BooleanOrBooleanString
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "paymentiq-cashier-bootstrapper",
3
- "version": "1.3.21",
4
3
  "description": "Integration bootstrapper for the PaymentIQ Cashier V2\"",
4
+ "version": "1.3.24-beta.0",
5
5
  "main": "dist/cashier.js",
6
6
  "types": "index.d.ts",
7
7
  "files": [