-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
21 lines (19 loc) · 2.74 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Powerise</title>
</head>
<body>
<div id="app"></div>
<script>
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Powerise",[],t):"object"==typeof exports?exports.Powerise=t():e.Powerise=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Environment:()=>c,connect:()=>u});function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}var c=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),e.instance)return e.instance;e.instance=this}var t,n,r;return t=e,r=[{key:"setDebugMode",value:function(e){this.debug=e}},{key:"getInstance",value:function(){return new e}}],(n=[{key:"isDebugMode",value:function(){return e.debug}}])&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();r(c,"instance",void 0),r(c,"debug",!1);var u=function(e){var t=400,n=400,o="".concat(c.getInstance().isDebugMode()?"http://localhost:3000":"https://powerise.io","/connect?payload=").concat(btoa(JSON.stringify(e)));return new Promise((function(e,r){try{var i=window.open(o,"Popup","width=".concat(t,",height=").concat(n,",top=").concat(screen.height/2-n/2,",left=").concat(screen.width/2-t/2));window.addEventListener("message",(function(t){t.source===i&&e(t.data)}))}catch(e){r(e)}}))};return t})()));
</script>
<script>
Powerise.Environment.setDebugMode(true);
Powerise.connect({});
</script>
</body>
</html>