window.HarnessWidget=function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=38)}([function(e,t,o){"use strict";var n=o(4),r=o(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 o=0,n=e.length;o=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){s.headers[e]=n.merge(i)})),e.exports=s}).call(this,o(12))},function(e,t,o){"use strict";e.exports=function(e,t){return function(){for(var o=new Array(arguments.length),n=0;n * @license MIT */ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,o){"use strict";var n=o(3),r=o(0),i=o(20),a=o(21);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(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],o=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;)o=o.then(t.shift(),t.shift());return o},r.forEach(["delete","get","head","options"],(function(e){T.prototype[e]=function(t,o){return this.request(r.merge(o||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){T.prototype[e]=function(t,o,n){return this.request(r.merge(n||{},{method:e,url:t,data:o}))}})),e.exports=T},function(e,t){var o,n,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(o===setTimeout)return setTimeout(e,0);if((o===i||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=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 o=1;o=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([o]):a[t]?a[t]+", "+o:o}})),a):a}},function(e,t,o){"use strict";var n=o(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function r(e){var n=e;return t&&(o.setAttribute("href",n),n=o.href),o.setAttribute("href",n),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return e=r(window.location.href),function(t){var o=n.isString(t)?r(t):t;return o.protocol===e.protocol&&o.host===e.host}}():function(){return!0}},function(e,t,o){"use strict";var n=o(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,o,r,i,a){var T=[];T.push(e+"="+encodeURIComponent(t)),n.isNumber(o)&&T.push("expires="+new Date(o).toGMTString()),n.isString(r)&&T.push("path="+r),n.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,o){"use strict";var n=o(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){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},function(e,t,o){"use strict";var n=o(0),r=o(22),i=o(7),a=o(3),T=o(23),s=o(24);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=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.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,o){"use strict";var n=o(0);e.exports=function(e,t,o){return n.forEach(o,(function(o){e=o(e,t)})),e}},function(e,t,o){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,o){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,o){"use strict";var n=o(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 o=this;e((function(e){o.reason||(o.reason=new n(e),t(o.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,o){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,o){var n=o(28);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(34)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,o){var n=o(29);(e.exports=o(30)(!1)).push([e.i,"@font-face{font-family:proxima-nova;font-style:normal;font-weight:400;src:url("+n(o(31))+') format("truetype")}@font-face{font-family:proxima-nova;font-style:normal;font-weight:600;src:url('+n(o(32))+') format("woff"),url('+n(o(33))+') format("truetype")}@keyframes showButtonText{0%{opacity:0}90%{opacity:0}100%{opacity:1}}@keyframes showOverlay{0%{opacity:0}100%{opacity:.15}}.h-widget-wrap{font-size:16px;text-align:left;font-weight:normal;font-family:proxima-nova, sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.h-widget-wrap .h-widget-overlay{display:none}.h-widget-wrap .h-widget-button{position:fixed;z-index:10000000;bottom:20px;right:20px;width:150px;height:50px;font-size:22px;line-height:50px;background-color:white;border-radius:50px;text-align:center;box-shadow:0 2px 4px 0 rgba(0,0,0,0.2);display:block;color:white;font-weight:600;text-decoration:none;vertical-align:middle;transition:width .4s ease-in-out}.h-widget-wrap .h-widget-button>span{animation:showButtonText 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards}.h-widget-wrap .h-widget-button>span svg{width:19px;vertical-align:middle}.h-widget-wrap .h-widget-button>span svg path{fill:white}.h-widget-wrap .h-widget-btn-close{display:none}.h-widget-wrap .h-widget-frame{position:fixed;bottom:85px;right:20px;z-index:10000001;border-radius:10px;box-shadow:0 2px 4px 0 rgba(0,0,0,0.2);overflow:hidden;transform:translateX(415px);transition:transform .4s ease-in-out;background-color:white}.h-widget-wrap .h-widget-frame iframe{display:block;height:605px;width:390px;border:none;max-height:calc(100vh - 95px)}.h-widget-wrap.h-widget-wrap-opened .h-widget-button{width:50px}.h-widget-wrap.h-widget-wrap-opened .h-widget-frame{display:block;transform:translateX(0)}.h-widget-wrap.h-widget-wrap-opened .h-widget-btn-close{display:inline-block}.h-widget-wrap.h-widget-wrap-opened .h-widget-btn-open{display:none}.h-widget-wrap.h-widget-wrap-opened .h-widget-overlay{display:block;position:fixed;width:100%;height:100%;top:0;left:0;z-index:9999999;background-color:#1f314a;animation:showOverlay 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards}.h-widget-wrap.h-widget-wrap-mobile .h-widget-button{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 o=function(e,t){var o=e[1]||"",n=e[3];if(!n)return o;if(t&&"function"==typeof btoa){var r=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=n.sources.map((function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"}));return[o].concat(i).concat([r]).join("\n")}var a;return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o})).join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r=0&&c.splice(t,1)}function M(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return o.nc}();n&&(e.attrs.nonce=n)}return G(t,e.attrs),d(e,t),t}function G(e,t){Object.keys(t).forEach((function(o){e.setAttribute(o,t[o])}))}function f(e,t){var o,n,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=l++;o=S||(S=M(t)),n=B.bind(null,o,a,!1),r=B.bind(null,o,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",G(t,e.attrs),d(e,t),t}(t),n=C.bind(null,o,t),r=function(){A(o),o.href&&URL.revokeObjectURL(o.href)}):(o=M(t),n=H.bind(null,o),r=function(){A(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(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 o=P(e,t);return b(o,t),function(e){for(var n=[],r=0;r=0&&(a=a.substring(0,S)+"([\\w._\\+]+)"+a.substring(S+5)),r[T]=new RegExp(a,"i");l.props[n]=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 n in e)if(o.call(e,n)&&e[n].test(t))return n;return null},t.findMatches=function(e,t){var n=[];for(var r in e)o.call(e,r)&&e[r].test(t)&&n.push(r);return n},t.getVersionStr=function(e,n){var r,i,a,T,s=t.mobileDetectRules.props;if(o.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,o,n){if( /*!mobile-detect v1.4.4 2019-09-21*/ /*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/ void 0===e.mobile){var r,i,T;if(i=t.findMatch(t.mobileDetectRules.tablets,o))return e.mobile=e.tablet=i,void(e.phone=null);if(r=t.findMatch(t.mobileDetectRules.phones,o))return e.mobile=e.phone=r,void(e.tablet=null);t.isMobileFallback(o)?void 0===(T=a.isPhoneSized(n))?(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(o)?(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 n=a+"/whitelabel/"+t+"/config";i.a.get(n).then(t=>{e(t.data)}).catch(e=>{console.error(e.response),o(e.response.data)})})).then(e=>{!function(e){const t=e.primary_color,o=e.secondary_color,n=function(){const e=document.createElement("style");return e.appendChild(document.createTextNode("")),document.head.appendChild(e),e}();n.sheet.insertRule(`.h-widget-wrap .txt-primary{color: ${t} !important; }`,0),n.sheet.insertRule(`.h-widget-wrap .txt-secondary{color: ${o} !important;} `,0),n.sheet.insertRule(`.h-widget-wrap .bg-primary{background-color: ${t}; border-color: ${t};fill: ${t};}`,0),n.sheet.insertRule(`.h-widget-wrap .bg-secondary{background-color: ${o}; border-color: ${o};fill: ${o};}`,0)}(e);let t=n.api.scheme;"staging.harnessapp.com"===n.api.url&&(t="http");const o=`${t}://${e.subdomain}.${n.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=o,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;