-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js.map
1 lines (1 loc) · 12.7 KB
/
bundle.js.map
1
{"version":3,"sources":["webpack://Web Internet Providers/webpack/runtime/chunk loaded","webpack://Web Internet Providers/./src/main.js","webpack://Web Internet Providers/webpack/bootstrap","webpack://Web Internet Providers/webpack/runtime/amd options","webpack://Web Internet Providers/webpack/runtime/compat get default export","webpack://Web Internet Providers/webpack/runtime/define property getters","webpack://Web Internet Providers/webpack/runtime/global","webpack://Web Internet Providers/webpack/runtime/hasOwnProperty shorthand","webpack://Web Internet Providers/webpack/runtime/jsonp chunk loading","webpack://Web Internet Providers/webpack/startup"],"names":["deferred","Buffer","signInBtn","document","getElementById","signOutBtn","snackbar","querySelector","redirectBtn","authClient","appUri","queryString","window","location","search","urlParams","URLSearchParams","pubKey64","get","environment","IIUrl_local","async","options","pubKey","toString","identity","console","log","getPublicKey","updateView","getIdentity","principal","getPrincipal","disabled","getDelegation","toJSON","delegations","delegation","pubkey","JSON","stringify","delegations64","open","timeoutMs","setTimeout","onclick","IIUrl","login","identityProvider","maxTimeToLive","onSuccess","logout","init","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","call","m","amdO","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","this","Function","e","obj","prop","prototype","hasOwnProperty","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","chunkLoadingGlobal","self","forEach","bind","push","__webpack_exports__"],"mappings":"UAAIA,E,kECIJ,MAAMC,EAAS,cAETC,EAAYC,SAASC,eAAe,aACpCC,EAAaF,SAASC,eAAe,cACrCE,EAAW,IAAI,IAAYH,SAASI,cAAc,kBAClDC,EAAcL,SAASC,eAAe,eAC9BD,SAASC,eAAe,OAEtC,IAAIK,EACAC,EAAS,GAEb,MAAMC,EAAcC,OAAOC,SAASC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file":"bundle.js","sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { Actor, HttpAgent, Principal } from \"@dfinity/agent\";\r\nimport { DelegationIdentity, Ed25519KeyIdentity } from \"@dfinity/identity\";\r\nimport { AuthClient } from \"@dfinity/auth-client\";\r\nimport {MDCSnackbar} from '@material/snackbar';\r\nconst Buffer = require(\"buffer\").Buffer;\r\n\r\nconst signInBtn = document.getElementById(\"signinBtn\");\r\nconst signOutBtn = document.getElementById(\"signoutBtn\");\r\nconst snackbar = new MDCSnackbar(document.querySelector('.mdc-snackbar'));\r\nconst redirectBtn = document.getElementById(\"redirectBtn\");\r\nconst msgEl = document.getElementById(\"msg\");\r\n\r\nlet authClient;\r\nlet appUri = '';\r\n\r\nconst queryString = window.location.search;\r\nconst urlParams = new URLSearchParams(queryString);\r\nconst pubKey64 = urlParams.get('pubKey64');\r\nconst environment = urlParams.get('environment') || 'prod';\r\nconst IIUrl_local = urlParams.get('IIUrl') || 'http://192.168.68.118:8000/?canisterId=rwlgt-iiaaa-aaaaa-aaaaa-cai';\r\n\r\nconst init = async () => {\r\n const options = {};\r\n if(pubKey64 && pubKey64 !==''){\r\n\tconst pubKey = new Buffer(pubKey64, 'base64').toString();\r\n\toptions.identity = Ed25519KeyIdentity.fromJSON(pubKey);\r\n\tconsole.log(pubKey);\r\n\tconsole.log(options.identity.getPublicKey());\r\n }\r\n authClient = await AuthClient.create(options);\r\n\r\n const updateView = () => {\r\n const identity = authClient.getIdentity();\r\n\r\n const principal = identity.getPrincipal();\r\n if (identity instanceof DelegationIdentity) {\r\n\t signInBtn.disabled = true;\r\n const publicKey = (identity.getDelegation().toJSON())?.delegations[0]?.delegation?.pubkey;\r\n\t console.log((identity.getDelegation().toJSON()));\r\n\t const delegations = JSON.stringify(identity.getDelegation().toJSON());\r\n\t console.log('logged in');\r\n\t const delegations64 = new Buffer(delegations).toString(\"base64\");\r\n\t \r\n\t //redirect to app here\r\n\t appUri = \"exp://192.168.68.117:19000/--/Photos?principal=\"+principal+\"&delegations64=\"+delegations64;\r\n\t console.log(appUri);\r\n\t snackbar.open();\r\n\t snackbar.timeoutMs = -1;\r\n\t setTimeout(()=>{\r\n\t\twindow.location = appUri;\r\n\t },20);\r\n }else{\r\n\t\tconsole.log('not logged in');\r\n\t\tsignOutBtn.disabled = true;\r\n\t}\r\n }\r\n\r\n updateView();\r\n \r\n redirectBtn.onclick = async () => {\r\n setTimeout(()=>{\r\n\t\twindow.location = appUri;\r\n\t},10);\r\n };\r\n\r\n signInBtn.onclick = async () => {\r\n\t let IIUrl = '';\r\n\t if(environment === 'local'){\r\n\t\tIIUrl = IIUrl_local;\r\n\t }else{\r\n\t\tIIUrl = 'https://identity.ic0.app/';\r\n\t }\r\n authClient.login({\r\n identityProvider: IIUrl,\r\n\t maxTimeToLive: 1000000000000000,\r\n onSuccess: updateView\r\n });\r\n };\r\n\r\n signOutBtn.onclick = async () => {\r\n authClient.logout();\r\n\tsignOutBtn.disabled = true;\r\n\tsignInBtn.disabled = false;\r\n updateView();\r\n };\r\n};\r\n\r\ninit();\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t296: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tfor(moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) var result = runtime(__webpack_require__);\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkWeb_Internet_Providers\"] = self[\"webpackChunkWeb_Internet_Providers\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [706], () => (__webpack_require__(225)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"sourceRoot":""}