window.HarnessWidget=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=39)}([function(e,t,n){"use strict";var o=n(4),r=n(10),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function T(e){return null!==e&&"object"==typeof e}function s(e){return"[object Function]"===i.call(e)}function S(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,o=e.length;n=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(i)}),e.exports=s}).call(this,n(12))},function(e,t,n){e.exports=n(9)},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),o=0;o * @license MIT */ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var o=n(2),r=n(0),i=n(21),a=n(22);function T(e){this.defaults=e,this.interceptors={request:new i,response:new i}}T.prototype.request=function(e){"string"==typeof e&&(e=r.merge({url:arguments[0]},arguments[1])),(e=r.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.forEach(["delete","get","head","options"],function(e){T.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}}),r.forEach(["post","put","patch"],function(e){T.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}}),e.exports=T},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function T(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var s,S=[],l=!1,c=-1;function u(){l&&s&&(l=!1,s.length?S=s.concat(S):c=-1,S.length&&b())}function b(){if(!l){var e=T(u);l=!0;for(var t=S.length;t;){for(s=S,S=[];++c1)for(var n=1;n=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var o=n(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var o=e;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=o.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(){this.message="String contains an invalid character"}r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,i=String(e),a="",T=0,s=o;i.charAt(0|T)||(s="=",T%1);a+=s.charAt(63&t>>8-T%1*8)){if((n=i.charCodeAt(T+=.75))>255)throw new r;t=t<<8|n}return a}},function(e,t,n){"use strict";var o=n(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,r,i,a){var T=[];T.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&T.push("expires="+new Date(n).toGMTString()),o.isString(r)&&T.push("path="+r),o.isString(i)&&T.push("domain="+i),!0===a&&T.push("secure"),document.cookie=T.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var o=n(0);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";var o=n(0),r=n(23),i=n(7),a=n(2),T=n(24),s=n(25);function S(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return S(e),e.baseURL&&!T(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return S(e),t.data=r(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(S(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var o=n(0);e.exports=function(e,t,n){return o.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var o=n(8);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){var o=n(29);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(35)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(30);(e.exports=n(31)(!1)).push([e.i,"@font-face {\n font-family: proxima-nova;\n font-style: normal;\n font-weight: 400;\n src: url("+o(n(32))+') format("truetype"); }\n\n@font-face {\n font-family: proxima-nova;\n font-style: normal;\n font-weight: 600;\n src: url('+o(n(33))+') format("woff"), url('+o(n(34))+') format("truetype"); }\n\n@keyframes showButtonText {\n 0% {\n opacity: 0; }\n 90% {\n opacity: 0; }\n 100% {\n opacity: 1; } }\n\n@keyframes showOverlay {\n 0% {\n opacity: 0; }\n 100% {\n opacity: .15; } }\n\n.h-widget-wrap {\n font-size: 16px;\n text-align: left;\n font-weight: normal;\n font-family: proxima-nova, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n .h-widget-wrap .h-widget-overlay {\n display: none; }\n .h-widget-wrap .h-widget-button {\n position: fixed;\n z-index: 10000000;\n bottom: 20px;\n right: 20px;\n width: 150px;\n height: 50px;\n font-size: 22px;\n line-height: 50px;\n background-color: white;\n border-radius: 50px;\n text-align: center;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);\n display: block;\n color: white;\n font-weight: 600;\n text-decoration: none;\n vertical-align: middle;\n transition: width .4s ease-in-out; }\n .h-widget-wrap .h-widget-button > span {\n animation: showButtonText 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }\n .h-widget-wrap .h-widget-button > span svg {\n width: 19px;\n vertical-align: middle; }\n .h-widget-wrap .h-widget-button > span svg path {\n fill: white; }\n .h-widget-wrap .h-widget-btn-close {\n display: none; }\n .h-widget-wrap .h-widget-frame {\n position: fixed;\n bottom: 85px;\n right: 20px;\n z-index: 10000001;\n border-radius: 10px;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);\n overflow: hidden;\n transform: translateX(415px);\n transition: transform .4s ease-in-out;\n background-color: white; }\n .h-widget-wrap .h-widget-frame iframe {\n display: block;\n height: 605px;\n width: 390px;\n border: none;\n max-height: calc(100vh - 95px); }\n .h-widget-wrap.h-widget-wrap-opened .h-widget-button {\n width: 50px; }\n .h-widget-wrap.h-widget-wrap-opened .h-widget-frame {\n display: block;\n transform: translateX(0); }\n .h-widget-wrap.h-widget-wrap-opened .h-widget-btn-close {\n display: inline-block; }\n .h-widget-wrap.h-widget-wrap-opened .h-widget-btn-open {\n display: none; }\n .h-widget-wrap.h-widget-wrap-opened .h-widget-overlay {\n display: block;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 9999999;\n background-color: #1f314a;\n animation: showOverlay 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }\n .h-widget-wrap.h-widget-wrap-mobile .h-widget-button {\n width: 50px; }\n',""])},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r=0&&l.splice(t,1)}function A(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return n.nc}();o&&(e.attrs.nonce=o)}return M(t,e.attrs),d(e,t),t}function M(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function G(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var a=S++;n=s||(s=A(t)),o=h.bind(null,n,a,!1),r=h.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",M(t,e.attrs),d(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=c(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),T=e.href;e.href=URL.createObjectURL(a),T&&URL.revokeObjectURL(T)}.bind(null,n,t),r=function(){P(n),n.href&&URL.revokeObjectURL(n.href)}):(n=A(t),o=function(e,t){var n=t.css,o=t.media;o&&e.setAttribute("media",o);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){P(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=b(e,t);return u(n,t),function(e){for(var o=[],r=0;r=0&&(a=a.substring(0,S)+"([\\w._\\+]+)"+a.substring(S+5)),r[T]=new RegExp(a,"i");l.props[o]=r}i(l.oss),i(l.phones),i(l.tablets),i(l.uas),i(l.utils),l.oss0={WindowsPhoneOS:l.oss.WindowsPhoneOS,WindowsMobileOS:l.oss.WindowsMobileOS}}(),t.findMatch=function(e,t){for(var o in e)if(n.call(e,o)&&e[o].test(t))return o;return null},t.findMatches=function(e,t){var o=[];for(var r in e)n.call(e,r)&&e[r].test(t)&&o.push(r);return o},t.getVersionStr=function(e,o){var r,i,a,T,s=t.mobileDetectRules.props;if(n.call(s,e))for(a=(r=s[e]).length,i=0;i1&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},t.isMobileFallback=function(e){return t.detectMobileBrowsers.fullPattern.test(e)||t.detectMobileBrowsers.shortPattern.test(e.substr(0,4))},t.isTabletFallback=function(e){return t.detectMobileBrowsers.tabletPattern.test(e)},t.prepareDetectionCache=function(e,n,o){if(void 0===e.mobile){var r,i,T;if(i=t.findMatch(t.mobileDetectRules.tablets,n))return e.mobile=e.tablet=i,void(e.phone=null);if(r=t.findMatch(t.mobileDetectRules.phones,n))return e.mobile=e.phone=r,void(e.tablet=null);t.isMobileFallback(n)?void 0===(T=a.isPhoneSized(o))?(e.mobile=t.FALLBACK_MOBILE,e.tablet=e.phone=null):T?(e.mobile=e.phone=t.FALLBACK_PHONE,e.tablet=null):(e.mobile=e.tablet=t.FALLBACK_TABLET,e.phone=null):t.isTabletFallback(n)?(e.mobile=e.tablet=t.FALLBACK_TABLET,e.phone=null):e.mobile=e.tablet=e.phone=null}},t.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&e.version("iPad")>=4.3||e.os("iOS")&&e.version("iPhone")>=3.1||e.os("iOS")&&e.version("iPod")>=3.1||e.version("Android")>2.1&&e.is("Webkit")||e.version("Windows Phone OS")>=7||e.is("BlackBerry")&&e.version("BlackBerry")>=6||e.match("Playbook.*Tablet")||e.version("webOS")>=1.4&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&e.version("Firefox")>=12||e.is("Chrome")&&e.is("AndroidOS")&&e.version("Android")>=4||e.is("Skyfire")&&e.version("Skyfire")>=4.1&&e.is("AndroidOS")&&e.version("Android")>=2.3||e.is("Opera")&&e.version("Opera Mobi")>11&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&e.version("Bada")>=2||(e.is("UC Browser")||e.is("Dolfin"))&&e.version("Android")>=2.3||e.match("Kindle Fire")||e.is("Kindle")&&e.version("Kindle")>=3||e.is("AndroidOS")&&e.is("NookTablet")||e.version("Chrome")>=11&&!t||e.version("Safari")>=5&&!t||e.version("Firefox")>=4&&!t||e.version("MSIE")>=7&&!t||e.version("Opera")>=10&&!t?"A":e.os("iOS")&&e.version("iPad")<4.3||e.os("iOS")&&e.version("iPhone")<3.1||e.os("iOS")&&e.version("iPod")<3.1||e.is("Blackberry")&&e.version("BlackBerry")>=5&&e.version("BlackBerry")<6||e.version("Opera Mini")>=5&&e.version("Opera Mini")<=6.5&&(e.version("Android")>=2.3||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||e.version("Opera Mobi")>=11&&e.is("SymbianOS")?"B":(e.version("BlackBerry")<5||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile"),"C")},t.detectOS=function(e){return t.findMatch(t.mobileDetectRules.oss0,e)||t.findMatch(t.mobileDetectRules.oss,e)},t.getDeviceSmallerSide=function(){return window.screen.width{let o=a+"/whitelabel/"+t+"/config";i.a.get(o).then(t=>{e(t.data)}).catch(e=>{console.error(e.response),n(e.response.data)})})).then(e=>{!function(e){const t=e.primary_color,n=e.secondary_color,o=function(){const e=document.createElement("style");return e.appendChild(document.createTextNode("")),document.head.appendChild(e),e}();o.sheet.insertRule(`.h-widget-wrap .text-primary{color: ${t};}`,0),o.sheet.insertRule(`.h-widget-wrap .text-secondary{color: ${n};}`,0),o.sheet.insertRule(`.h-widget-wrap .bg-primary{background-color: ${t}; border-color: ${t};fill: ${t};}`,0),o.sheet.insertRule(`.h-widget-wrap .bg-secondary{background-color: ${n}; border-color: ${n};fill: ${n};}`,0)}(e);let t=o.api.scheme;"staging.harnessapp.com"===o.api.url&&(t="http");const n=`${t}://${e.subdomain}.${o.api.url}/widget`;if(document.querySelector(".h-widget-wrap"))return!1;const r=document.createElement("div");r.classList.add("h-widget-wrap"),T.mobile()&&r.classList.add("h-widget-wrap-mobile");const i=document.createElement("div");i.classList.add("h-widget-overlay"),i.onclick=(e=>{e.preventDefault(),console.log("click.overlay"),r.classList.toggle("h-widget-wrap-opened")}),r.appendChild(i);const a=document.createElement("a");if(a.href=n,a.classList.add("h-widget-button"),a.classList.add("bg-primary"),T.mobile()?a.innerHTML='\n \n ':(a.innerHTML='\n Donate\n \n ',a.onclick=(e=>{e.preventDefault(),r.classList.toggle("h-widget-wrap-opened")})),r.appendChild(a),!T.mobile()){const e=document.createElement("div");e.classList.add("h-widget-frame"),e.innerHTML=``,r.appendChild(e)}document.body.appendChild(r)})}}}()}]).default;