/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ var executeModules = data[2]; /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ // add entry modules from loaded chunk to deferred list /******/ deferredModules.push.apply(deferredModules, executeModules || []); /******/ /******/ // run deferred modules when all chunks ready /******/ return checkDeferredModules(); /******/ }; /******/ function checkDeferredModules() { /******/ var result; /******/ for(var i = 0; i < deferredModules.length; i++) { /******/ var deferredModule = deferredModules[i]; /******/ var fulfilled = true; /******/ for(var j = 1; j < deferredModule.length; j++) { /******/ var depId = deferredModule[j]; /******/ if(installedChunks[depId] !== 0) fulfilled = false; /******/ } /******/ if(fulfilled) { /******/ deferredModules.splice(i--, 1); /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); /******/ } /******/ } /******/ /******/ return result; /******/ } /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "main": 0 /******/ }; /******/ /******/ var deferredModules = []; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // add entry module to deferred list /******/ deferredModules.push(["./ts/main.ts","vendor"]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) /************************************************************************/ /******/ ({ /***/ "./css/main.scss": /*!***********************!*\ !*** ./css/main.scss ***! \***********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./node_modules/file-loader/dist/cjs.js?name=exBERT.html!./exBERT.html": /*!*****************************************************************************!*\ !*** ./node_modules/file-loader/dist/cjs.js?name=exBERT.html!./exBERT.html ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "exBERT.html"; /***/ }), /***/ "./node_modules/file-loader/dist/cjs.js?name=index.html!./index.html": /*!***************************************************************************!*\ !*** ./node_modules/file-loader/dist/cjs.js?name=index.html!./index.html ***! \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "index.html"; /***/ }), /***/ "./ts/api/demoAPI.ts": /*!***************************!*\ !*** ./ts/api/demoAPI.ts ***! \***************************/ /*! exports provided: DemoAPI */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DemoAPI", function() { return DemoAPI; }); const DemoAPI = { "527fdac4404bf9ba5412646ad457950d4482762c": "527fdac4404bf9ba5412646ad457950d4482762c.json", "59b4acc05f1d80ecbef1c23eaf2fda10222cb257": "59b4acc05f1d80ecbef1c23eaf2fda10222cb257.json", "354992f2ee236604c874a3a627e4042bc68586f8": "354992f2ee236604c874a3a627e4042bc68586f8.json", "5015e5a318605cea6808538db14d8af16887b076": "5015e5a318605cea6808538db14d8af16887b076.json", "3c9aa152ac894306040703c5095599b199cad1a9": "3c9aa152ac894306040703c5095599b199cad1a9.json", "0fece0c87203e83afd1674b5aeebaed0f5fa0562": "0fece0c87203e83afd1674b5aeebaed0f5fa0562.json", "d3a0e4045ea48a275ce51a6af0280406060f47cf": "d3a0e4045ea48a275ce51a6af0280406060f47cf.json", "ed98d751ab9b6a4a0e85e9332b420a4c13ab75a7": "ed98d751ab9b6a4a0e85e9332b420a4c13ab75a7.json", "0d24ae08eeb21af82c666cbe2ac0646ed9c9d9a6": "0d24ae08eeb21af82c666cbe2ac0646ed9c9d9a6.json", "6de053b3b8a4d904780c9a6545a0a63cbbb2b144": "6de053b3b8a4d904780c9a6545a0a63cbbb2b144.json", "f68df23365faf02f9c01439345bed66936ed85f7": "f68df23365faf02f9c01439345bed66936ed85f7.json", "4608cb4fc00b43fff68098e85676fad57c940f02": "4608cb4fc00b43fff68098e85676fad57c940f02.json", "dfcd50146da8d8122a5a57c2a3c0abce503ba94b": "dfcd50146da8d8122a5a57c2a3c0abce503ba94b.json", "34c8629d4265d7f3ede3add42f3613b205d94c1c": "34c8629d4265d7f3ede3add42f3613b205d94c1c.json", "db2dc252a786650f64395a0f5d181c0831019cbf": "db2dc252a786650f64395a0f5d181c0831019cbf.json", "da4597d73d444757bde9176395bf31aad3334131": "da4597d73d444757bde9176395bf31aad3334131.json", "a2ebf13d3c9371fcf738b9651824e2c3cd1ff8e0": "a2ebf13d3c9371fcf738b9651824e2c3cd1ff8e0.json", "bc419238c20dd1c5cfe1cc427ab3d1e31353436a": "bc419238c20dd1c5cfe1cc427ab3d1e31353436a.json", "84e8be9fe562fbd0487c03b55cc6b4f3fb8cd787": "84e8be9fe562fbd0487c03b55cc6b4f3fb8cd787.json", "207e6c98a0e149dc7e6ed67118296d8a8c89b3c3": "207e6c98a0e149dc7e6ed67118296d8a8c89b3c3.json", "c185a9349ba5a325acf8514e9b50de71280488aa": "c185a9349ba5a325acf8514e9b50de71280488aa.json", "dde481a5cd3667ae8c6c5b5e1421dc882b6a2dd6": "dde481a5cd3667ae8c6c5b5e1421dc882b6a2dd6.json", "f63e14e935d98948b4a0ebc9663400dbe4263348": "f63e14e935d98948b4a0ebc9663400dbe4263348.json", "79b964d1a5c854deaeace26813f96994bb82aef2": "79b964d1a5c854deaeace26813f96994bb82aef2.json", "3b1168ec96af00c4e887341e92a878f8752e1d17": "3b1168ec96af00c4e887341e92a878f8752e1d17.json", "8c462bc298e3183efa8d9e863e25ea5d89806b03": "8c462bc298e3183efa8d9e863e25ea5d89806b03.json", "9939698edaa25bbae9ee1d27864e698f13963f06": "9939698edaa25bbae9ee1d27864e698f13963f06.json", "73f1ee497b3e7b6394e55726b18dbf9d514dcea6": "73f1ee497b3e7b6394e55726b18dbf9d514dcea6.json", "c7cdb80bf813e1de241260aede6cd28ea65ccfae": "c7cdb80bf813e1de241260aede6cd28ea65ccfae.json", "a96fed16eab1bf6d08e4001c02894d9c549df627": "a96fed16eab1bf6d08e4001c02894d9c549df627.json", "a8eaf10da8dc75b42e72bdc7091776247fff9657": "a8eaf10da8dc75b42e72bdc7091776247fff9657.json", "a8194f2309e1c71e977ef8d3be572ae00b0e91f2": "a8194f2309e1c71e977ef8d3be572ae00b0e91f2.json", "2f4a15b66fcfb0c7a43a33d93763990282bfc5aa": "2f4a15b66fcfb0c7a43a33d93763990282bfc5aa.json", "06095cef4a7f49b18f153e67e33fddb831a15b46": "06095cef4a7f49b18f153e67e33fddb831a15b46.json", "4c93eaf0c0ce56f1e5d5100916abf4d31eb35da5": "4c93eaf0c0ce56f1e5d5100916abf4d31eb35da5.json", "f8c40c67c851a0489f7480c99b31b4f606c0184b": "f8c40c67c851a0489f7480c99b31b4f606c0184b.json", "e4e71f6ea57be2e05d62af0825a80f144421e02d": "e4e71f6ea57be2e05d62af0825a80f144421e02d.json", "e7d9d520882782c7cfbffeadaaf22b4c0a081c7c": "e7d9d520882782c7cfbffeadaaf22b4c0a081c7c.json", "4aa4eb10ead44a0a3c2dd95407017a928138b32b": "4aa4eb10ead44a0a3c2dd95407017a928138b32b.json", "da31d55ee8cb01bcdb29572cb902b8e799685be2": "da31d55ee8cb01bcdb29572cb902b8e799685be2.json", "e427181fb02bbf19f7bbb65c9d9389d2d9a41812": "e427181fb02bbf19f7bbb65c9d9389d2d9a41812.json", "bbcab9e1ca60a851fd7ecfda80de470afa740936": "bbcab9e1ca60a851fd7ecfda80de470afa740936.json", "4de96aa205076863c9fb4ea99e2ba86fa131ff76": "4de96aa205076863c9fb4ea99e2ba86fa131ff76.json", "e4c6d1b3004e3cdd0c879a59639b5ce993207a99": "e4c6d1b3004e3cdd0c879a59639b5ce993207a99.json", "fbc9da79b8bf39dc9998408526741f811a13e6aa": "fbc9da79b8bf39dc9998408526741f811a13e6aa.json", "528554ee4e615c61287c40ed9a2aea69b91af6c9": "528554ee4e615c61287c40ed9a2aea69b91af6c9.json", "5e7073c03c37d19826b2fb4a6599ccaedde492e4": "5e7073c03c37d19826b2fb4a6599ccaedde492e4.json", "71c4a886cdee58a371ae2115311b150e84e555f6": "71c4a886cdee58a371ae2115311b150e84e555f6.json", "4bce0970a465fe9b96305e06af19c5d9c97d7cc3": "4bce0970a465fe9b96305e06af19c5d9c97d7cc3.json", "efdb1f0a70f22f80ff3cea0cb79bec717fc8b6f7": "efdb1f0a70f22f80ff3cea0cb79bec717fc8b6f7.json", "174c6f786d139ce111381045d60d25682a168b99": "174c6f786d139ce111381045d60d25682a168b99.json", "a8c23e88d6ca6d4efd2646b0742c0fa32dbd55a4": "a8c23e88d6ca6d4efd2646b0742c0fa32dbd55a4.json", "f6949c28752de35a870efde308585acd46a25278": "f6949c28752de35a870efde308585acd46a25278.json", "c1bdb8cbafd5d5d8f6bda2b4db16b6bc2d62e18a": "c1bdb8cbafd5d5d8f6bda2b4db16b6bc2d62e18a.json", "2b81a8f602251cf40b4682c8cedb3966b912d7c6": "2b81a8f602251cf40b4682c8cedb3966b912d7c6.json", "8f94e843d2510047fd1af46f249afe87ff49cc2f": "8f94e843d2510047fd1af46f249afe87ff49cc2f.json", "4e3ddb51550c03c64fdbe5592526665100d32930": "4e3ddb51550c03c64fdbe5592526665100d32930.json", "f816b23af9aa4312c80e668a66a156c934cb330c": "f816b23af9aa4312c80e668a66a156c934cb330c.json", "2fe05a911a574b8a6d4b05eb13db9e09aaacad2d": "2fe05a911a574b8a6d4b05eb13db9e09aaacad2d.json", "5c71496726395aaa4d0a65373fd1651b5a0e6b1f": "5c71496726395aaa4d0a65373fd1651b5a0e6b1f.json", }; /***/ }), /***/ "./ts/api/mainApi.ts": /*!***************************!*\ !*** ./ts/api/mainApi.ts ***! \***************************/ /*! exports provided: emptyTokenDisplay, API */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emptyTokenDisplay", function() { return emptyTokenDisplay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API", function() { return API; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /* harmony import */ var _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/TokenWrapper */ "./ts/data/TokenWrapper.ts"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _demoAPI__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./demoAPI */ "./ts/api/demoAPI.ts"); /* harmony import */ var object_hash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! object-hash */ "./node_modules/object-hash/dist/object_hash.js"); /* harmony import */ var object_hash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(object_hash__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../etc/apiHelpers */ "./ts/etc/apiHelpers.ts"); /* harmony import */ var _etc_URLHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../etc/URLHandler */ "./ts/etc/URLHandler.ts"); const emptyTokenDisplay = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_1__["TokenDisplay"](); const baseurl = _etc_URLHandler__WEBPACK_IMPORTED_MODULE_6__["URLHandler"].basicURL(); /** * A rewrite of `d3-fetch`'s `d3.json` callback. If an api call fails, make a backup call to specified url and payload, if specified. * * @param response Object expected at time of callback * @param backupUrl Backup url in the event of fail * @param backupPayload Backup payload if making a post request */ function responseJson(response, backupUrl = null, backupPayload = null) { if (!response.ok) { if (backupUrl != null) { console.log("STATIC FILE NOT FOUND"); return fetch(backupUrl, backupPayload).then(responseJson); } throw new Error(response.status + " " + response.statusText); } return response.json(); } /** * Check first if the information being sent exists in a static demo file. If it does, send that. Otherwise, make a normal call to the server. * * @param toSend The packet of information to send to an API endpoint * @param backupUrl Backup url in the event that the demo file is not found * @param backupPayload Backup payload if demo file not found, for POST requests only */ function checkDemoAPI(toSend, backupUrl = null, backupPayload = null) { const hsh = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend); console.log("CHECKING DEMOAPI: " + hsh); if (_demoAPI__WEBPACK_IMPORTED_MODULE_3__["DemoAPI"].hasOwnProperty(hsh)) { // Relies on a symbolic link being present in the dist folder to the demo folder const path = './demo/' + _demoAPI__WEBPACK_IMPORTED_MODULE_3__["DemoAPI"][hsh]; console.log("TRYING TO SENDING STATIC: ", path); const follow = (response) => responseJson(response, backupUrl, backupPayload); return fetch(path).then(follow); } return d3__WEBPACK_IMPORTED_MODULE_0__["json"](backupUrl, backupPayload); } class API { constructor(baseURL = null) { this.baseURL = baseURL; if (this.baseURL == null) { this.baseURL = baseurl + '/api'; } } getModelDetails(model, hashObj = null) { const toSend = { model: model }; const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + "/get-model-details", toSend); console.log("--- GET " + url); if (hashObj != null) { const key = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend); d3__WEBPACK_IMPORTED_MODULE_0__["json"](url).then(r => { hashObj[key] = r; }); } return checkDemoAPI(toSend, url); } getMetaAttentions(model, sentence, layer, hashObj = null) { const toSend = { model: model, sentence: sentence, layer: layer }; const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + "/attend+meta", toSend); console.log("--- GET " + url); // Add hash and value to hashObj if (hashObj != null) { const key = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend); d3__WEBPACK_IMPORTED_MODULE_0__["json"](url).then(r => { hashObj[key] = r; }); } return checkDemoAPI(toSend, url); } /** * Update the display based on the information that was already parsed from the passed sentence. * * @param a The displayed tokens in the columns * @param sentenceA The original sentence that led to the tokenized information in `a` * @param layer Which layer to search at * @param hashObj If not null, store the information of the responses into the passed object. Used for creating demos. */ updateMaskedAttentions(model, tokens, sentence, layer, hashObj = null) { const toSend = { model: model, tokens: ramda__WEBPACK_IMPORTED_MODULE_2__["map"](ramda__WEBPACK_IMPORTED_MODULE_2__["prop"]('text'), tokens.tokenData), sentence: sentence, // Empty masks need to be sent as a number, unfortunately. Choosing -1 for this mask: tokens.maskInds.length ? tokens.maskInds : [-1], layer: layer, }; const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + '/update-mask'); const payload = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["toPayload"])(toSend); if (hashObj != null) { // Add hash and value to hashObj for demo purposes const key = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend); d3__WEBPACK_IMPORTED_MODULE_0__["json"](url, payload).then(r => { hashObj[key] = r; }); } console.log("--- POST " + url, payload); return checkDemoAPI(toSend, url, payload); } } ; /***/ }), /***/ "./ts/data/AttentionCapsule.ts": /*!*************************************!*\ !*** ./ts/data/AttentionCapsule.ts ***! \*************************************/ /*! exports provided: makeFromMetaResponse, AttentionWrapper */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeFromMetaResponse", function() { return makeFromMetaResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttentionWrapper", function() { return AttentionWrapper; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _etc_Tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../etc/_Tools */ "./ts/etc/_Tools.ts"); /* harmony import */ var _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tensorflow/tfjs */ "./node_modules/@tensorflow/tfjs/dist/tf.esm.js"); /** * Notes: * * - Also encapsulate the CLS/SEP info vs. no CLS/SEP info * - When layer format changes from list, drop the index into conf.layer */ const bpeTokens = ["[CLS]", "[SEP]", "", "", "<|endoftext|>"]; const findBadIndexes = (x) => _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["findAllIndexes"](x.map(t => t.text), (a) => lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](bpeTokens, a)); function makeFromMetaResponse(r, isZeroed) { const key = 'aa'; // Change this if backend response changes to be simpler const currPair = r[key]; const left = currPair.left; const right = currPair.right; const leftZero = _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["findAllIndexes"](left.map(t => t.text), (a) => lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](bpeTokens, a)); const rightZero = _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["findAllIndexes"](right.map(t => t.text), (a) => lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](bpeTokens, a)); return new AttentionWrapper(currPair.att, [leftZero, rightZero], isZeroed); } class AttentionWrapper { constructor(att, badToks = [[], []], isZeroed = true) { this.nLayers = 12; this.nHeads = 12; this.init(att, badToks, isZeroed); } init(att, badToks = [[], []], isZeroed) { this.isZeroed = isZeroed; this._att = att; this._zeroedAttTensor = zeroRowCol(_tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__["tensor3d"](att), badToks[0], badToks[1]); this._attTensor = _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__["tensor3d"](att); // If I put this first, buffer modifications change this too. this.badToks = badToks; } updateFromNormal(r, isZeroed) { const key = 'aa'; // Change this if backend response changes to be simpler const currPair = r[key]; const left = currPair.left; const right = currPair.right; const leftZero = findBadIndexes(left); const rightZero = findBadIndexes(right); this.init(currPair.att, [leftZero, rightZero], isZeroed); } get attTensor() { const tens = this.isZeroed ? this._zeroedAttTensor : this._attTensor; return tens; } get att() { return this.attTensor.arraySync(); } zeroed(val) { if (val == null) return this.isZeroed; this.isZeroed = val; return this; } toggleZeroing() { this.zeroed(!this.zeroed()); } _byHeads(heads) { if (heads.length == 0) { return _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__["zerosLike"](this._byHead(0)); } return this.attTensor.gather(heads, 0).sum(0); } _byHead(head) { return this.attTensor.gather([head], 0).squeeze([0]); } byHeads(heads) { return this._byHeads(heads).arraySync(); } byHead(head) { return this._byHead(head).arraySync(); } } function zeroRowCol(tens, rows, cols) { let outTens = tens.clone(); let atb = outTens.bufferSync(); lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[0]).forEach((head) => { lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[1]).forEach((i) => { // Set rows to 0 if (lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](rows, i)) { lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[2]).forEach((j) => { atb.set(0, head, i, j); }); } // Set cols to 0 lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[2]).forEach((j) => { if (lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](cols, j)) lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[1]).forEach((i) => { atb.set(0, head, i, j); }); }); }); }); return outTens; } /***/ }), /***/ "./ts/data/TokenWrapper.ts": /*!*********************************!*\ !*** ./ts/data/TokenWrapper.ts ***! \*********************************/ /*! exports provided: TokenDisplay, TokenWrapper, sideToLetter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenDisplay", function() { return TokenDisplay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenWrapper", function() { return TokenWrapper; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sideToLetter", function() { return sideToLetter; }); /* harmony import */ var _etc_Tools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../etc/_Tools */ "./ts/etc/_Tools.ts"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /** * The original tokens, and the indexes that need to be masked */ const emptyFullResponse = [{ text: '[SEP]', topk_words: [], topk_probs: [] }]; class TokenDisplay { constructor(tokens = emptyFullResponse, maskInds = []) { this.tokenData = tokens; this.maskInds = maskInds; } /** * Push idx to the mask idx list in order from smallest to largest */ mask(val) { const currInd = lodash__WEBPACK_IMPORTED_MODULE_1__["indexOf"](this.maskInds, val); if (currInd == -1) { _etc_Tools__WEBPACK_IMPORTED_MODULE_0__["orderedInsert_"](this.maskInds, val); } else { console.log(`${val} already in maskInds!`); console.log(this.maskInds); } } toggle(val) { const currInd = lodash__WEBPACK_IMPORTED_MODULE_1__["indexOf"](this.maskInds, val); if (currInd == -1) { console.log(`Masking ${val}`); this.mask(val); } else { console.log(`Unmasking ${val}`); this.unmask(val); } } unmask(val) { lodash__WEBPACK_IMPORTED_MODULE_1__["pull"](this.maskInds, val); } resetMask() { this.maskInds = []; } length() { return this.tokenData.length; } concat(other) { const newTokens = lodash__WEBPACK_IMPORTED_MODULE_1__["concat"](this.tokenData, other.tokenData); const newMask = lodash__WEBPACK_IMPORTED_MODULE_1__["concat"](this.maskInds, other.maskInds.map(x => x + this.length())); return new TokenDisplay(newTokens, newMask); } } class TokenWrapper { constructor(r) { this.updateFromResponse(r); } updateFromResponse(r) { const tokensA = r.aa.left; this.updateFromComponents(tokensA, []); } updateFromComponents(a, maskA) { this.a = new TokenDisplay(a, maskA); } updateTokens(r) { const desiredKeys = ['contexts', 'embeddings', 'topk_probs', 'topk_words']; const newTokens = r.aa.left.map(v => ramda__WEBPACK_IMPORTED_MODULE_2__["pick"](desiredKeys, v)); const pairs = ramda__WEBPACK_IMPORTED_MODULE_2__["zip"](this.a.tokenData, newTokens); pairs.forEach((d, i) => { Object.keys(d[1]).map(k => { d[0][k] = d[1][k]; }); }); } /** * Mask the appropriate sentence at the index indicated */ mask(sID, idx) { this[sID].mask(idx); const opts = ["a", "b"]; const Na = this.a.length(); } } function sideToLetter(side, atype) { // const atype = conf.attType; if (atype == "all") { return "all"; } const out = side == "left" ? atype[0] : atype[1]; // No type checking? return out; } /***/ }), /***/ "./ts/etc/SVGplus.ts": /*!***************************!*\ !*** ./ts/etc/SVGplus.ts ***! \***************************/ /*! exports provided: SVG, SVGMeasurements */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SVG", function() { return SVG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SVGMeasurements", function() { return SVGMeasurements; }); /* harmony import */ var d3_selection_multi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection-multi */ "./node_modules/d3-selection-multi/index.js"); /** * Created by hen on 5/15/17. * Modified by hoo on 4/16/19. */ class SVG { static translate({ x, y }) { return "translate(" + x + "," + y + ")"; } static rotate(deg) { return `rotate(${deg})`; } static group(parent, classes, pos = { x: 0, y: 0 }) { return parent.append('g').attrs({ class: classes, "transform": SVG.translate(pos) }); } } class SVGMeasurements { constructor(baseElement, classes = '') { this.measureElement = baseElement.append('text') .attrs({ x: 0, y: -20, class: classes }); } textLength(text, style = null) { this.measureElement.attr('style', style); this.measureElement.text(text); const tl = this.measureElement.node().getComputedTextLength(); this.measureElement.text(''); return tl; } } /***/ }), /***/ "./ts/etc/SimpleEventHandler.ts": /*!**************************************!*\ !*** ./ts/etc/SimpleEventHandler.ts ***! \**************************************/ /*! exports provided: SimpleEventHandler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleEventHandler", function() { return SimpleEventHandler; }); /** * Created by hen on 5/15/17. * Modified by hoo on 4/16/19. */ class SimpleEventHandler { constructor(element) { this.element = element; this.eventListeners = []; } bind(eventNames, eventFunction) { for (const eventName of eventNames.split(' ')) { this.eventListeners.push({ eventName, eventFunction }); const eventFunctionWrap = e => eventFunction(e.detail, e); this.element.addEventListener(eventName, eventFunctionWrap, false); } } getListeners() { return this.eventListeners; } trigger(eventName, detail) { this.element.dispatchEvent(new CustomEvent(eventName, { detail })); } } /***/ }), /***/ "./ts/etc/URLHandler.ts": /*!******************************!*\ !*** ./ts/etc/URLHandler.ts ***! \******************************/ /*! exports provided: URLHandler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URLHandler", function() { return URLHandler; }); /** * Created by hen on 5/15/17. */ class URLHandler { static basicURL() { const url_path = window.location.pathname.split('/').slice(0, -2).join('/'); return window.location.origin + (url_path.length ? url_path : ''); } /** * Read all URL parameters into a map. * @returns {Map} the url parameters as a key-value store (ES6 map) */ static get parameters() { // Adapted from: http://stackoverflow.com/questions/2090551/parse-query-string-in-javascript const query = window.location.search.substring(1); const vars = query.split('&'); console.log(vars, "--- vars"); const urlParameters = {}; const isInt = x => (/^[0-9]+$/).test(x); const isFloat = x => (/^[0-9]+\.[0-9]*$/).test(x); const typeCast = val => { if (isInt(val)) { return Number.parseInt(val, 10); } else if (isFloat(val)) { return Number.parseFloat(val); } // else: return val; }; vars.forEach(v => { if (v.length > 0) { const splits = v.split('='); const key = decodeURIComponent(splits[0]); let raw_value = decodeURIComponent(splits[1]); const isArray = raw_value.startsWith('..'); if (isArray) { raw_value = raw_value.slice(2); } if (raw_value.length < 1) { urlParameters[key] = isArray ? [] : ''; } else if (isArray) { urlParameters[key] = raw_value.split(',') .map(val => typeCast(val)); } else { urlParameters[key] = typeCast(raw_value); } } }); return urlParameters; } /** * Generates an URL string from a map of url parameters * @param {{}} urlParameters - the map of parameters * @returns {string} - an URI string */ static urlString(urlParameters) { const attr = []; Object.keys(urlParameters).forEach(k => { const v = urlParameters[k]; if (v !== undefined) { let value = v; if (Array.isArray(v)) value = '..' + v.join(','); attr.push(encodeURI(k + '=' + value)); } }); const url = window.location.pathname; let res = url.substring(url.lastIndexOf('/') + 1); if (attr.length > 0) { res += '?' + attr.join('&'); } return res; } static updateURLParam(key, value, addToBrowserHistory = true) { const currentParams = URLHandler.parameters; currentParams[key] = value; URLHandler.updateUrl(currentParams, addToBrowserHistory); } // /** // * Generates a key-value map of all URL params and replaces replaceKeys // * @param updateKeys // */ // static updateURLParams(updateKeys) { // const currentParams = URLHandler.parameters; // Object.keys(updateKeys).forEach((k) => currentParams[k] = updateKeys[k]) // return currentParams; // } static updateUrl(urlParameters, addToBrowserHistory = true) { if (addToBrowserHistory) { window.history.pushState(urlParameters, '', URLHandler.urlString(urlParameters)); } else { window.history.replaceState(urlParameters, '', URLHandler.urlString(urlParameters)); } } } /***/ }), /***/ "./ts/etc/Util.ts": /*!************************!*\ !*** ./ts/etc/Util.ts ***! \************************/ /*! exports provided: Util, Sel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Util", function() { return Util; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sel", function() { return Sel; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /** * Created by hen on 5/15/17. * Modifyed by hoo on 4/16/19. */ let the_unique_id_counter = 0; class Util { static simpleUId({ prefix = '' }) { the_unique_id_counter += 1; return prefix + the_unique_id_counter; } } /** * Selection utility functions should be static methods in the below class */ class Sel { } Sel.setSelVisible = (x) => x.attr("visibility", "visible"); Sel.setSelHidden = (x) => x.attr("visibility", "hidden"); Sel.setVisible = (x) => Sel.setSelVisible(d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](x)); Sel.setHidden = (x) => Sel.setSelHidden(d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](x)); Sel.hideElement = (hE) => hE.transition().styles({ 'opacity': 0, 'pointer-events': 'none', 'display': 'none' }); Sel.unhideElement = (hE) => hE.transition().styles({ 'opacity': 1, 'pointer-events': null, 'display': null }); /***/ }), /***/ "./ts/etc/_Tools.ts": /*!**************************!*\ !*** ./ts/etc/_Tools.ts ***! \**************************/ /*! exports provided: findAllIndexes, insertAt_, orderedInsert_, set2SortedArray, makeRandom */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findAllIndexes", function() { return findAllIndexes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertAt_", function() { return insertAt_; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orderedInsert_", function() { return orderedInsert_; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set2SortedArray", function() { return set2SortedArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeRandom", function() { return makeRandom; }); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); function ascOrder(n1, n2) { if (n1 < n2) { return -1; } else if (n1 > n2) { return 1; } return 0; } /** * Find all indexes that match a particular predicate */ function findAllIndexes(array, predicate) { let fromIndex = 0; let results = []; let i = lodash__WEBPACK_IMPORTED_MODULE_0__["findIndex"](array, predicate, fromIndex); while (i != -1) { results.push(i); i = lodash__WEBPACK_IMPORTED_MODULE_0__["findIndex"](array, predicate, i + 1); } return results; } ; function insertAt_(array, val, ind) { array.splice(ind, 0, val); return array; } /** * Convert a set to an ordered array */ function set2SortedArray(input) { return Array.from(input).sort(ascOrder); } /** * Insert a value into array in sorted order IN PLACE * * WARNING: Only handles numbers, sorted from least to greatest * - Assumes already sorted array */ function orderedInsert_(array, val, coldstart = false) { // Resort array if desired if (coldstart) { array.sort(ascOrder); } const ind = lodash__WEBPACK_IMPORTED_MODULE_0__["sortedIndex"](array, val); return insertAt_(array, val, ind); } function makeRandom(len) { const a = new Array(len).fill(0); return a.map((x) => { return lodash__WEBPACK_IMPORTED_MODULE_0__["random"](-5, 5, true); }); } /***/ }), /***/ "./ts/etc/apiHelpers.ts": /*!******************************!*\ !*** ./ts/etc/apiHelpers.ts ***! \******************************/ /*! exports provided: makeUrl, toPayload */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeUrl", function() { return makeUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toPayload", function() { return toPayload; }); /** * Convert a JS object into GET URL parameters * * @param base Base URL atop which to add GET parameters * @param params Object to insert into a URL string */ function makeUrl(base, params) { if (params) { let out = base + "?"; Object.keys(params).forEach(k => { out += k; out += '='; out += params[k]; out += "&"; }); return out.replace(/&$/g, ""); } else { return base; } } ; /** * Convert information in GET request into the message for a POST request */ const toPayload = (toSend) => { return { method: "POST", body: JSON.stringify(toSend), headers: { "Content-type": "application/json; charset=UTF-8" } }; }; /***/ }), /***/ "./ts/etc/arrayUtils.ts": /*!******************************!*\ !*** ./ts/etc/arrayUtils.ts ***! \******************************/ /*! exports provided: sortWithIndices */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortWithIndices", function() { return sortWithIndices; }); /** * Copies and sorts an array while keeping track of the indices. Currently only supports sorting max -> min. * * @param arr - Array to be copied and sorted */ function sortWithIndices(arr, fn) { // If fn is not provided, default to sorting by max value if (!fn) { fn = function (left, right) { return left[0] > right[0] ? -1 : 1; }; } let out = { arr: [], sortIndices: [] }; let idxTracker = []; for (let i = 0; i < arr.length; i++) { idxTracker[i] = [arr[i], i]; } idxTracker.sort(function (left, right) { return left[0] > right[0] ? -1 : 1; }); for (var j = 0; j < arr.length; j++) { out.sortIndices.push(idxTracker[j][1]); out.arr[j] = idxTracker[j][0]; } return out; } /***/ }), /***/ "./ts/etc/types.ts": /*!*************************!*\ !*** ./ts/etc/types.ts ***! \*************************/ /*! exports provided: Toggled, NormBy, ModelKind */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Toggled", function() { return Toggled; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormBy", function() { return NormBy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelKind", function() { return ModelKind; }); var Toggled; (function (Toggled) { Toggled[Toggled["ADDED"] = 0] = "ADDED"; Toggled[Toggled["REMOVED"] = 1] = "REMOVED"; })(Toggled || (Toggled = {})); var NormBy; (function (NormBy) { NormBy[NormBy["ROW"] = 0] = "ROW"; NormBy[NormBy["COL"] = 1] = "COL"; NormBy[NormBy["ALL"] = 2] = "ALL"; })(NormBy || (NormBy = {})); var ModelKind; (function (ModelKind) { ModelKind["Bidirectional"] = "bidirectional"; ModelKind["Autoregressive"] = "autoregressive"; })(ModelKind || (ModelKind = {})); /***/ }), /***/ "./ts/etc/xd3.ts": /*!***********************!*\ !*** ./ts/etc/xd3.ts ***! \***********************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.clear = function () { this.selectAll('*').remove(); return this; }; d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.toggleClass = function (className) { this.classed(className, !this.classed(className)); return this; }; d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.show = function () { this.style('display', 'initial'); return this; }; d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.hide = function () { this.style('display', 'none'); return this; }; d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.toggle = function () { var isHidden = this.style('display') == 'none'; return this.style('display', isHidden ? 'inherit' : 'none'); }; d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.after = function (tagName) { var elements = []; this.each(function () { var element = document.createElement(tagName); this.parentNode.insertBefore(element, this.nextSibling); elements.push(element); }); return d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](elements); }; d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.before = function (tagName) { var elements = []; this.each(function () { var element = document.createElement(tagName); this.parentNode.insertBefore(element, this); elements.push(element); }); return d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](elements); }; /***/ }), /***/ "./ts/main.ts": /*!********************!*\ !*** ./ts/main.ts ***! \********************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _vis_attentionVis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vis/attentionVis */ "./ts/vis/attentionVis.ts"); /* harmony import */ var _file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! file-loader?name=exBERT.html!../exBERT.html */ "./node_modules/file-loader/dist/cjs.js?name=exBERT.html!./exBERT.html"); /* harmony import */ var _file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! file-loader?name=index.html!../index.html */ "./node_modules/file-loader/dist/cjs.js?name=index.html!./index.html"); /* harmony import */ var _file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _css_main_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/main.scss */ "./css/main.scss"); /* harmony import */ var _css_main_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_main_scss__WEBPACK_IMPORTED_MODULE_3__); window.onload = () => { const base = document.getElementById('attention-vis'); //@ts-ignore const mainVis = new _vis_attentionVis__WEBPACK_IMPORTED_MODULE_0__["MainGraphic"](base); console.log("Done loading window"); }; /***/ }), /***/ "./ts/uiConfig.ts": /*!************************!*\ !*** ./ts/uiConfig.ts ***! \************************/ /*! exports provided: UIConfig */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UIConfig", function() { return UIConfig; }); /* harmony import */ var _etc_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./etc/types */ "./ts/etc/types.ts"); /* harmony import */ var _etc_Tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./etc/_Tools */ "./ts/etc/_Tools.ts"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./etc/URLHandler */ "./ts/etc/URLHandler.ts"); const falsey = val => (new Set(['false', 0, "no", false, null, ""])).has(val); const truthy = val => !falsey(val); const toNumber = x => +x; class UIConfig { constructor() { this._conf = {}; this._nHeads = 12; this._nLayers = null; this.attType = 'aa'; this.fromURL(); this.toURL(false); } toURL(updateHistory = false) { _etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__["URLHandler"].updateUrl(this._conf, updateHistory); } fromURL() { const params = _etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__["URLHandler"].parameters; this._conf = { model: params['model'] || 'bert-base-cased', modelKind: params['modelKind'] || _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Bidirectional, sentence: params['sentence'] || "The girl ran to a local pub to escape the din of her city.", layer: params['layer'] || 1, heads: this._initHeads(params['heads']), threshold: params['threshold'] || 0.7, tokenInd: params['tokenInd'] || null, tokenSide: params['tokenSide'] || null, maskInds: params['maskInds'] || [9], hideClsSep: truthy(params['hideClsSep']) || true, }; this._token = { side: this._conf.tokenSide, ind: this._conf.tokenInd }; } _initHeads(v) { if (v == null || v.length < 1) { this.selectAllHeads(); } else { console.log(this.headSet(new Set(v))._conf.heads); } return this.heads(); } nHeads(val) { if (val == null) return this._nHeads; this._nHeads = val; return this; } nLayers(val) { if (val == null) return this._nLayers; this._nLayers = val; return this; } toggleSelectAllHeads() { if (this.heads().length == 0) { this.selectAllHeads(); } else { this.selectNoHeads(); } } selectAllHeads() { this.headSet(new Set(lodash__WEBPACK_IMPORTED_MODULE_2__["range"](0, this._nHeads))); } selectNoHeads() { this.headSet(new Set([])); } toggleHead(head) { let out; if (this.headSet().has(head)) { this.headSet().delete(head); out = _etc_types__WEBPACK_IMPORTED_MODULE_0__["Toggled"].REMOVED; } else { this.headSet().add(head); out = _etc_types__WEBPACK_IMPORTED_MODULE_0__["Toggled"].ADDED; } // Set through setter function to ensure url is updated this.headSet(this.headSet()); // I hate mutable datastructures... This is confusing. return out; } toggleToken(e) { const picker = ramda__WEBPACK_IMPORTED_MODULE_3__["pick"](['ind', 'side']); const compareEvent = picker(e); const compareToken = picker(this.token()); if (ramda__WEBPACK_IMPORTED_MODULE_3__["equals"](compareToken, compareEvent)) { this.rmToken(); } else { this.token(e); } return this; } token(val) { if (val == null) return this._token; this._token = val; this._conf.tokenInd = val.ind; this._conf.tokenSide = val.side; this.toURL(); return this; } hasToken() { const conf = this._conf; const actuallyNull = ((conf.tokenInd == null) && (conf.tokenSide == null)); const strNull = (conf.tokenInd == "null"); return (!actuallyNull) && (!strNull); } rmToken() { this.token({ ind: null, side: null }); return this; } sentence(val) { if (val == null) return this._conf.sentence; this._conf.sentence = val; this.toURL(true); return this; } threshold(val) { if (val == null) return this._conf.threshold; this._conf.threshold = val; this.toURL(); return this; } heads() { return this._conf.heads; } layer(val) { if (val == null) return this._conf.layer; this._conf.layer = val; this.toURL(); return this; } headSet(val) { if (val == null) { return this._headSet; } this._headSet = val; this._conf.heads = _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["set2SortedArray"](this._headSet); this.toURL(); return this; } maskInds(val) { if (val == null) return this._conf.maskInds; this._conf.maskInds = val; this.toURL(); return this; } hideClsSep(val) { if (val == null) return this._conf.hideClsSep; this._conf.hideClsSep = truthy(val); this.toURL(); return this; } model(val) { if (val == null) return this._conf.model; this._conf.model = val; this.toURL(); return this; } modelKind(val) { if (val == null) return this._conf.modelKind; this._conf.modelKind = val; this.toURL(); return this; } /** * Return the offset needed for the modelKind in the configuration */ get offset() { switch (this.modelKind()) { case _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Bidirectional: { return 0; } case _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Autoregressive: { return 0; } default: { return 0; } } } get showNext() { return this.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Autoregressive ? true : false; } get matchHistogramDescription() { return this.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Autoregressive ? "Next" : "Matched"; } } /***/ }), /***/ "./ts/vis/AttentionConnector.ts": /*!**************************************!*\ !*** ./ts/vis/AttentionConnector.ts ***! \**************************************/ /*! exports provided: scaleLinearWidth, AttentionGraph */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scaleLinearWidth", function() { return scaleLinearWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttentionGraph", function() { return AttentionGraph; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /* harmony import */ var d3_selection_multi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection-multi */ "./node_modules/d3-selection-multi/index.js"); /* harmony import */ var _EdgeConnector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./EdgeConnector */ "./ts/vis/EdgeConnector.ts"); /* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts"); /* harmony import */ var _etc_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../etc/types */ "./ts/etc/types.ts"); const scaleLinearWidth = opacity => 5 * opacity ^ 0.33; class AttentionGraph extends _VisComponent__WEBPACK_IMPORTED_MODULE_3__["VComponent"] { constructor(d3Parent, eventHandler, options = {}) { super(d3Parent, eventHandler); this.css_name = ''; // OPTIONS WITH DEFAULTS this._threshold = 0.7; // Accumulation threshold. Between 0-1 this.options = { boxheight: 26, height: 500, width: 200, offset: 0, }; /** * Scale the opacity according to the values of the data, from 0 to max of contained data * Normalize by each source target, or across the whole */ this.createScales = () => { this.opacityScales = []; let arr = []; // Group normalization switch (this.normBy) { case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ROW: arr = this.edgeData.extent(1); this.opacityScales = []; arr.forEach((v, i) => { this.opacityScales.push(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]() .domain([0, v[1]]) .range([0, 0.9])); }); break; case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].COL: arr = this.edgeData.extent(0); this.opacityScales = []; arr.forEach((v, i) => { this.opacityScales.push(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]() .domain([0, v[1]]) .range([0, 0.9])); }); break; case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ALL: const maxIn = d3__WEBPACK_IMPORTED_MODULE_0__["max"](this.plotData.map((d) => d.v)); for (let i = 0; i < this._data.length; i++) { this.opacityScales.push(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]() .domain([0, maxIn]) .range([0, 1])); } break; default: console.log("Nor norming specified"); break; } }; this.superInitSVG(options); this._init(); } _init() { this.svg = this.parent; this.graph = this.svg.selectAll(`.atn-curve`); this.linkGen = d3__WEBPACK_IMPORTED_MODULE_0__["linkHorizontal"]() .x(d => d[0]) .y(d => d[1]); } // Define whether to use the 'j' or 'i' attribute to calculate opacities scaleIdx() { switch (this.normBy) { case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].COL: return 'j'; case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ROW: return 'i'; case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ALL: return 'i'; } } /** * Create connections between locations of the SVG using D3's linkGen */ createConnections() { const self = this; const op = this.options; if (this.paths) { this.paths.attrs({ 'd': (d, i) => { const data = { source: [0, op.boxheight * (d.i + 0.5 + op.offset)], target: [op.width, op.boxheight * (d.j + 0.5)] // + 2 allows small offset }; return this.linkGen(data); }, 'class': 'atn-curve' }) .attr("src-idx", (d, i) => d.i) .attr("target-idx", (d, i) => d.j); } } /** * Change the height of the SVG */ updateHeight() { const op = this.options; if (this.svg != null) { this.svg.attr("height", this.options.height + (op.offset * this.options.boxheight)); } return this; } /** * Change the width of the SVG */ updateWidth() { if (this.svg != null) { this.svg.attr("width", this.options.width); } return this; } /** * Change the Opacity of the lines according to the value of the data */ updateOpacity() { const self = this; if (this.paths != null) { // paths.transition().duration(500).attr('opacity', (d) => { this.paths.attr('opacity', (d) => { const val = this.opacityScales[d[self.scaleIdx()]](d.v); return val; }); this.paths.attr('stroke-width', (d) => { const val = this.opacityScales[d[self.scaleIdx()]](d.v); return scaleLinearWidth(val); //5 * val^0.33; }); } return this; } /** * Rerender the graph in the event that the data changes */ updateData() { if (this.graph != null) { d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](".atn-curve").remove(); const data = this.plotData; this.paths = this.graph .data(data) .join('path'); this.createConnections(); this.updateOpacity(); return this; } } data(value) { if (value == null) { return this._data; } this._data = value; this.edgeData = new _EdgeConnector__WEBPACK_IMPORTED_MODULE_2__["EdgeData"](value); this.plotData = this.edgeData.format(this._threshold); this.createScales(); this.updateData(); return this; } height(value) { if (value == null) { return this.options.height; } this.options.height = value; this.updateHeight(); return this; } width(value) { if (value == null) { return this.options.width; } this.options.width = value; this.updateWidth(); return this; } threshold(value) { if (value == null) { return this._threshold; } this._threshold = value; this.plotData = this.edgeData.format(this._threshold); this.createScales(); this.updateData(); return this; } _wrangle(data) { return data; } _render(data) { this.svg.html(''); this.updateHeight(); this.updateWidth(); this.updateData(); return this; } } AttentionGraph.events = {}; // No events needed for this one /***/ }), /***/ "./ts/vis/AttentionHeadBox.ts": /*!************************************!*\ !*** ./ts/vis/AttentionHeadBox.ts ***! \************************************/ /*! exports provided: getAttentionInfo, AttentionHeadBox */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAttentionInfo", function() { return getAttentionInfo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttentionHeadBox", function() { return AttentionHeadBox; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts"); /* harmony import */ var _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/SVGplus */ "./ts/etc/SVGplus.ts"); /* harmony import */ var _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tensorflow/tfjs */ "./node_modules/@tensorflow/tfjs/dist/tf.esm.js"); /** * From an attention matrix selected by layer, show a summary of the attentions belonging to each head. * * @param headMat The matrix representing all the attentions by head (layer already selected) * @param headList The heads that are selected * @param side Is this the right or the left display? * @param tokenInd If not null, select just the information from a single token across heads * @returns Information needed to label the headbox */ function getAttentionInfo(headMat, headList, side = "left", token = null) { // Collect only from headlist, average each head, transpose to ease iteration if (headList.length == 0) { return { rows: [[]], labels: [], max: 0, }; } let dim = null; // Only change the attention graph opposite selected token if (token != null && (token.side != side)) { dim = token.side == "left" ? -2 : -1; // Assign to "from" direction if "left" } let axis = side == "left" ? 2 : 1; // average across the axis representing the attentions. let gatheredMat = _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__["tensor3d"](headMat); if (dim != null) { gatheredMat = gatheredMat.gather([token.ind], dim); } let newMat = gatheredMat.gather(headList, 0).mean([axis]).transpose(); const rowInfo = newMat.arraySync(); const out = { rows: rowInfo, labels: headList, max: newMat.max().arraySync(), }; return out; } ; class AttentionHeadBox extends _VisComponent__WEBPACK_IMPORTED_MODULE_1__["VComponent"] { constructor(d3Parent, eventHandler, options = {}) { super(d3Parent, eventHandler); this.css_name = ''; this.rowCssName = 'att-head'; this.boxCssName = 'att-rect'; this._current = {}; this.options = { boxDim: 26, yscale: 1, xscale: 0.5, side: "left", maxWidth: 200, offset: 0, }; this.superInitSVG(options); this._init(); } _init() { this.headRows = this.base.selectAll(`.${this.rowCssName}`); this.headCells = this.headRows.selectAll(`${this.boxCssName}`); this.opacityScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().range([0, 1]); } updateCurrent() { const op = this.options; const cur = this._current; const nHeads = this._data.rows[0].length; const baseHeadWidth = op.boxDim * op.xscale; // Scale headwidth according to maximum width const getHeadScale = (nH) => (Math.min(op.maxWidth / nH, baseHeadWidth) / baseHeadWidth) * op.xscale; cur.headHeight = op.boxDim * op.yscale; cur.headWidth = getHeadScale(nHeads) * op.boxDim; cur.xPad = cur.headWidth; cur.yPad = (op.boxDim - cur.headHeight) / 2; const getBoxWidth = (headWidth) => { const maxBwidth = 100; const bwidth = this._data.rows[0].length * cur.headWidth; const scale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]; if (bwidth > maxBwidth) { return; } }; cur.boxWidth = (this._data.rows[0].length * cur.headWidth); cur.totalWidth = (2 * cur.xPad) + cur.boxWidth; cur.totalHeight = (op.boxDim * (this._data.rows.length + op.offset)); return this._current; } updateData() { const op = this.options; const self = this; const boxEvent = (i) => { return { ind: i, side: op.side, head: self._data.labels[i] }; }; const cur = this.updateCurrent(); const getBaseX = () => self.base.node().getBoundingClientRect().left; const getBaseY = () => self.base.node().getBoundingClientRect().top; this.base.html(''); this.parent .attr("width", cur.totalWidth) .attr("height", cur.totalHeight); this.headRows = this.base.selectAll(`.${self.rowCssName}`) .data(self._data.rows) .join("g") .attrs({ class: (d, i) => `${self.rowCssName} ${self.rowCssName}-${i}`, transform: (d, i) => { return _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].translate({ x: cur.xPad, y: (op.boxDim * (i + op.offset)) + cur.yPad, }); }, width: cur.boxWidth, height: cur.headHeight, }) .on("mouseover", (d, i) => { self.eventHandler.trigger(AttentionHeadBox.events.rowMouseOver, { ind: i, side: op.side }); }) .on("mouseout", (d, i) => { self.eventHandler.trigger(AttentionHeadBox.events.rowMouseOut, { ind: i, side: op.side }); }); this.headCells = this.headRows .selectAll(`${this.boxCssName}`) .data(d => d) .join('rect') .attrs({ x: (d, i) => i * cur.headWidth, y: 0, class: this.boxCssName, head: (d, i) => self._data.labels[i], width: cur.headWidth, height: cur.headHeight, opacity: (d) => this.opacityScale(d), fill: "blue" }) .on("mouseover", (d, i) => { self.eventHandler.trigger(AttentionHeadBox.events.boxMouseOver, boxEvent(i)); }) .on("mouseout", (d, i) => { self.eventHandler.trigger(AttentionHeadBox.events.boxMouseOut, boxEvent(i)); }) .on("click", (d, i) => { self.eventHandler.trigger(AttentionHeadBox.events.boxClick, boxEvent(i)); }) .on("mousemove", function (d, i) { const op = self.options; const mouse = d3__WEBPACK_IMPORTED_MODULE_0__["mouse"](self.base.node()); self.eventHandler.trigger(AttentionHeadBox.events.boxMouseMove, { ind: i, side: op.side, baseX: getBaseX(), baseY: getBaseY(), mouse: mouse }); }) .append("svg:title") .text((d, i) => "Head " + (self._data.labels[i] + 1)); } _wrangle(data) { this._data = data; this.opacityScale = this.opacityScale.domain([0, data.max]); return data; } _render(data) { this.updateData(); } } AttentionHeadBox.events = { rowMouseOver: "AttentionHeadBox_RowMouseOver", rowMouseOut: "AttentionHeadBox_RowMouseOut", boxMouseOver: "AttentionHeadBox_BoxMouseOver", boxMouseOut: "AttentionHeadBox_BoxMouseOut", boxMouseMove: "AttentionHeadBox_BoxMouseMove", boxClick: "AttentionHeadBox_BoxClick", }; /***/ }), /***/ "./ts/vis/EdgeConnector.ts": /*!*********************************!*\ !*** ./ts/vis/EdgeConnector.ts ***! \*********************************/ /*! exports provided: toEdges, EdgeData */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toEdges", function() { return toEdges; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EdgeData", function() { return EdgeData; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); /* harmony import */ var _etc_arrayUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/arrayUtils */ "./ts/etc/arrayUtils.ts"); /* harmony import */ var _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tensorflow/tfjs */ "./node_modules/@tensorflow/tfjs/dist/tf.esm.js"); /** * Convert data matrix to necessary data array to pass to SVG connections */ function toEdges(data, cutoffAmt = 1) { let outArr = []; let cutoff; data.forEach((row, i) => { cutoff = cutoffAmt * d3__WEBPACK_IMPORTED_MODULE_0__["sum"](row); let counter = 0; const sortedArr = _etc_arrayUtils__WEBPACK_IMPORTED_MODULE_2__["sortWithIndices"](row); sortedArr.arr.forEach((v, j) => { if (counter < cutoff) { const obj = { i: i, j: sortedArr.sortIndices[j], v: v, }; outArr.push(obj); counter += v; } }); }); return outArr; } /** * Class for implementing operations on AttentionGraph implementation. * Closely tied to [[AttentionConnector]] */ class EdgeData { constructor(data) { this.data = data; this.tensData = _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__["tensor"](data); } min(axis) { return this.tensData.min(axis).dataSync(); } max(axis) { return this.tensData.max(axis).dataSync(); } extent(axis) { return d3__WEBPACK_IMPORTED_MODULE_0__["zip"](this.min(axis), this.max(axis)); } /** * Format the data to send to SVG chart. * * @param accumulateThresh - A float between 0 and 1, indicating the amount of weight to display. Defaults to 0.7. */ format(accumulateThresh = 0.7) { return toEdges(this.data, accumulateThresh); } } /***/ }), /***/ "./ts/vis/TextToken.ts": /*!*****************************!*\ !*** ./ts/vis/TextToken.ts ***! \*****************************/ /*! exports provided: TextTokens, LeftTextToken, RightTextToken */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextTokens", function() { return TextTokens; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeftTextToken", function() { return LeftTextToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RightTextToken", function() { return RightTextToken; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts"); class TextTokens extends _VisComponent__WEBPACK_IMPORTED_MODULE_3__["VComponent"] { constructor(d3Parent, eventHandler, options = {}) { super(d3Parent, eventHandler); this.eInfo = (sel, i) => { return { sel: sel, side: this.side, ind: i }; }; this.eEmbedding = (sel, i, embed) => { return { sel: sel, side: this.side, ind: i, embeddings: embed }; }; this.options = { boxheight: 26, offset: 0, divHover: { width: 150, height: 150, offset: [3, 3], textInfo: "Would predict..." }, }; this.superInitHTML(options); } mask(maskInds) { this.parent.selectAll(`.${this.css_name}`) .each((d, i, n) => { const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](n[i]); sel.classed("masked-token", lodash__WEBPACK_IMPORTED_MODULE_2__["includes"](maskInds, i)); }); } getEmbedding(ind) { return this._data[ind]; } _init() { } _wrangle(data) { this.data = this._data; return this._data; } _divPlacement() { const getBaseX = () => self.base.node().getBoundingClientRect().left; const getBaseY = () => self.base.node().getBoundingClientRect().top; const self = this; const op = this.options; const mouse = d3__WEBPACK_IMPORTED_MODULE_0__["mouse"](self.base.node()); const divOffset = [3, 3]; const left = mouse[0] + getBaseX() - (op.divHover.width + divOffset[0]); const top = mouse[1] + getBaseY() + divOffset[1]; return [left, top]; } _render(data) { const op = this.options; const self = this; // Reset token display this.base.selectAll("*").remove(); this.divHover = this.base.append('div') .classed('tok-info', true) .classed('mat-hover-display', true) .classed(this.hover_css_name, true) .style('width', String(this.options.divHover.width) + 'px') .style('height', String(this.options.divHover.height) + 'px'); this.divHover .append('p') .classed('p-info', true) .style('font-weight', 'bold') .text(op.divHover.textInfo); // Add blank divs console.log(`Internal offset (${this.side}): `, op.offset); const blankDivs = this.base.selectAll(`.blank-text-box`); blankDivs.data(ramda__WEBPACK_IMPORTED_MODULE_1__["range"](0, op.offset)) .join("div") .classed("blank-text-box", true) .classed("token", true) .style("height", op.boxheight + 'px') .text((d) => " "); // Render normal text box data self.textBoxes = this.base.selectAll(`.${this.css_name}`) .data(data) .join("div") .attr("class", (d, i) => `token ${this.css_name} token-${i}`) .attr("id", (d, i) => `${this.css_name}-${i}`) .style('height', op.boxheight + 'px') .text((d) => { return d.text.replace("\u0120", " ").replace("\u010A", "\\n"); }) .on('mouseover', function (d, i) { const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this); sel.style('background', 'lightblue'); self.eventHandler.trigger(TextTokens.events.tokenMouseOver, self.eInfo(sel, i)); self.divHover.style('visibility', 'visible'); }) .on('mouseout', function (d, i) { let sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this); sel.style('background', 0); self.eventHandler.trigger(TextTokens.events.tokenMouseOut, self.eInfo(sel, i)); self.divHover.style('visibility', 'hidden'); }) .on('mousemove', function (d, i) { const s = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this); const [left, top] = self._divPlacement(); self.divHover .style('left', String(left) + 'px') .style('top', String(top) + 'px') .selectAll(".topk-word-box") //@ts-ignore .data(d3__WEBPACK_IMPORTED_MODULE_0__["zip"](d.topk_words, d.topk_probs)) .join('p') .classed("topk-word-box", true) .text(w => { const name = w[0].replace(/\u0120/g, " ").replace(/\u010A/g, "\\n"); const prob = w[1].toFixed(2); return name + ": " + prob; }); }); self.addClick(self.textBoxes); } addClick(textboxes) { const self = this; self.textBoxes = textboxes .on('click', (d, i, n) => { const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](n[i]); self.eventHandler.trigger(TextTokens.events.tokenClick, self.eEmbedding(sel, i, d.embeddings)); }) .on('dblclick', (d, i, n) => { const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](n[i]); self.eventHandler.trigger(TextTokens.events.tokenDblClick, self.eInfo(sel, i)); }); } } TextTokens.events = { tokenMouseOver: "TextToken_TokenMouseOver", tokenMouseOut: "TextToken_TokenMouseOut", tokenClick: "TextToken_TokenClick", tokenDblClick: "TextToken_TokenDblClick", }; class LeftTextToken extends TextTokens { constructor(d3Parent, eventHandler, options = {}) { super(d3Parent, eventHandler); this.css_name = 'left-token'; this.hover_css_name = 'left-token-hover'; this.side = 'left'; this.offset = 1; } } class RightTextToken extends TextTokens { constructor(d3Parent, eventHandler, options = {}) { super(d3Parent, eventHandler); this.css_name = 'right-token'; this.hover_css_name = 'right-token-hover'; this.side = 'right'; this.offset = 0; } _divPlacement() { const getBaseX = () => self.base.node().getBoundingClientRect().left; const getBaseY = () => self.base.node().getBoundingClientRect().top; const self = this; const op = this.options; const mouse = d3__WEBPACK_IMPORTED_MODULE_0__["mouse"](self.base.node()); const divOffset = [3, 3]; const left = mouse[0] + getBaseX() + divOffset[0]; const top = mouse[1] + getBaseY() + divOffset[1]; return [left, top]; } } /***/ }), /***/ "./ts/vis/VisComponent.ts": /*!********************************!*\ !*** ./ts/vis/VisComponent.ts ***! \********************************/ /*! exports provided: VComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VComponent", function() { return VComponent; }); /* harmony import */ var _etc_Util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../etc/Util */ "./ts/etc/Util.ts"); /* harmony import */ var _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../etc/SimpleEventHandler */ "./ts/etc/SimpleEventHandler.ts"); /* harmony import */ var _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/SVGplus */ "./ts/etc/SVGplus.ts"); /** * Should have VComponentHTML and VComponentSVG * * Common Properties: * - events * - eventHandler (V important) * - options (Maintains public state. Can expose these with get/set functions with auto update) * - _current (Maintains private state) * - cssName (synced with corresponding CSS file) * - parent (HTML is div containing the base, SVG is SVG element) * - base (HTML is div with css_name established) * - _data (Data used to create and render the component) * - _renderData (Data needed to display. This may not be needed, but is currently used in histogram) * * Common Methods: * - constructor * - _render() Consider replacing with `_updateData()` that updates all data at once * - update() Consider replacing this with `data()` that auto updates data * - redraw() * - destroy() */ class VComponent { // CONSTRUCTOR ============================================================ /** * Simple constructor. Subclasses should call @superInit(options) as well. * see why here: https://stackoverflow.com/questions/43595943/why-are-derived-class-property-values-not-seen-in-the-base-class-constructor * * template: constructor(d3Parent: D3Sel, eventHandler?: SimpleEventHandler, options: {} = {}) { super(d3Parent, eventHandler); // -- access to subclass params: this.superInit(options); } * * @param {D3Sel} d3parent D3 selection of parent SVG DOM Element * @param {SimpleEventHandler} eventHandler a global event handler object or 'null' for local event handler */ constructor(d3parent, eventHandler) { this.id = _etc_Util__WEBPACK_IMPORTED_MODULE_0__["Util"].simpleUId({}); this.parent = d3parent; // If not further specified - create a local event handler bound to the bas element this.eventHandler = eventHandler || new _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_1__["SimpleEventHandler"](this.parent.node()); // Object for storing internal states and variables this._visibility = { hidden: false }; } superInitHTML(options = {}) { Object.keys(options).forEach(key => this.options[key] = options[key]); this.base = this.parent.append('div') .classed(this.css_name, true); } /** * Has to be called as last call in subclass constructor. * * @param {{}} options * @param defaultLayers -- create the default layers: bg -> main -> fg */ superInitSVG(options = {}, defaultLayers = ['bg', 'main', 'fg']) { // Set default options if not specified in constructor call // const defaults = this.defaultOptions; // this.options = {}; // const keys = new Set([...Object.keys(defaults), ...Object.keys(options)]); // keys.forEach(key => this.options[key] = (key in options) ? options[key] : defaults[key]); Object.keys(options).forEach(key => this.options[key] = options[key]); this.layers = {}; // Create the base group element const svg = this.parent; this.base = _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].group(svg, this.css_name + ' ID' + this.id, this.options.pos); // create default layers: background, main, foreground if (defaultLayers) { // construction order is important ! defaultLayers.forEach(layer => { this.layers[layer] = _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].group(this.base, layer); }); } } // DATA UPDATE & RENDER ============================================================ /** * Every time data has changed, update is called and * triggers wrangling and re-rendering * @param {Object} data data object * @return {*} --- */ update(data) { this._data = data; if (this._visibility.hidden) return; this.renderData = this._wrangle(data); this._render(this.renderData); } // UPDATE OPTIONS ============================================================ /** * Updates instance options * @param {Object} options only the options that should be updated * @param {Boolean} reRender if option change requires a re-rendering (default:false) * @returns {*} --- */ updateOptions({ options, reRender = false }) { Object.keys(options).forEach(k => this.options[k] = options[k]); if (reRender) this._render(this.renderData); } // === CONVENIENCE ==== redraw() { this._render(this.renderData); } setHideElement(hE) { this._visibility.hideElement = hE; } hideView() { if (!this._visibility.hidden) { const hE = this._visibility.hideElement || this.parent; hE.transition().styles({ 'opacity': 0, 'pointer-events': 'none' }).style('display', 'none'); this._visibility.hidden = true; } } unhideView() { if (this._visibility.hidden) { const hE = this._visibility.hideElement || this.parent; hE.transition().styles({ 'opacity': 1, 'pointer-events': null, 'display': null }); this._visibility.hidden = false; // this.update(this.data); } } destroy() { this.base.remove(); } clear() { this.base.html(''); } } // STATIC FIELDS ============================================================ /** * The static property that contains all class related events. * Should be overwritten and event strings have to be unique!! */ VComponent.events = { noEvent: 'VComponent_noEvent' }; /***/ }), /***/ "./ts/vis/attentionVis.ts": /*!********************************!*\ !*** ./ts/vis/attentionVis.ts ***! \********************************/ /*! exports provided: MainGraphic */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MainGraphic", function() { return MainGraphic; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _etc_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../etc/types */ "./ts/etc/types.ts"); /* harmony import */ var _etc_xd3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../etc/xd3 */ "./ts/etc/xd3.ts"); /* harmony import */ var _api_mainApi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../api/mainApi */ "./ts/api/mainApi.ts"); /* harmony import */ var _uiConfig__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../uiConfig */ "./ts/uiConfig.ts"); /* harmony import */ var _TextToken__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TextToken */ "./ts/vis/TextToken.ts"); /* harmony import */ var _AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./AttentionHeadBox */ "./ts/vis/AttentionHeadBox.ts"); /* harmony import */ var _AttentionConnector__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AttentionConnector */ "./ts/vis/AttentionConnector.ts"); /* harmony import */ var _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../data/TokenWrapper */ "./ts/data/TokenWrapper.ts"); /* harmony import */ var _data_AttentionCapsule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data/AttentionCapsule */ "./ts/data/AttentionCapsule.ts"); /* harmony import */ var _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../etc/SimpleEventHandler */ "./ts/etc/SimpleEventHandler.ts"); /* harmony import */ var _etc_Util__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../etc/Util */ "./ts/etc/Util.ts"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); /* harmony import */ var _staticLayout__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./staticLayout */ "./ts/vis/staticLayout.ts"); /** * Showing the top left part of exBERT, no information from the embeddings or the contexts */ function isNullToken(tok) { const isSomeNull = x => { return (x == null) || (x == "null"); }; const tokIsNull = tok == null; const tokHasNull = isSomeNull(tok.side) || isSomeNull(tok.ind); return tokIsNull || tokHasNull; } function showBySide(e) { // Check if saved token in uiConf is null if (!isNullToken(e)) { const classSelector = e.side == "left" ? "src-idx" : "target-idx"; _etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setHidden(".atn-curve"); _etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setVisible(`.atn-curve[${classSelector}='${e.ind}']`); } } function chooseShowBySide(savedEvent, newEvent) { if (isNullToken(savedEvent)) { showBySide(newEvent); } } function chooseShowAll(savedEvent) { if (isNullToken(savedEvent)) _etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setVisible(".atn-curve"); } function unselectHead(head) { const affectedHeads = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](`.att-rect[head='${head}']`); affectedHeads.classed("unselected", true); } function selectHead(head) { const affectedHeads = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](`.att-rect[head='${head}']`); affectedHeads.classed("unselected", false); } function setSelDisabled(attr, sel) { const val = attr ? true : null; sel.attr('disabled', val); } class MainGraphic { /** * * @param base 'div' html element into which everything below will be rendered */ constructor(baseDiv) { this.base = d3__WEBPACK_IMPORTED_MODULE_0__["select"](baseDiv); this.api = new _api_mainApi__WEBPACK_IMPORTED_MODULE_5__["API"](); this.uiConf = new _uiConfig__WEBPACK_IMPORTED_MODULE_6__["UIConfig"](); this.sels = Object(_staticLayout__WEBPACK_IMPORTED_MODULE_16__["createStaticSkeleton"])(this.base); this.eventHandler = new _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_12__["SimpleEventHandler"](this.base.node()); this.vizs = { leftHeads: new _AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"](this.sels.atnHeads.left, this.eventHandler, { side: "left", }), rightHeads: new _AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"](this.sels.atnHeads.right, this.eventHandler, { side: "right" }), tokens: { left: new _TextToken__WEBPACK_IMPORTED_MODULE_7__["LeftTextToken"](this.sels.tokens.left, this.eventHandler), right: new _TextToken__WEBPACK_IMPORTED_MODULE_7__["RightTextToken"](this.sels.tokens.right, this.eventHandler), }, attentionSvg: new _AttentionConnector__WEBPACK_IMPORTED_MODULE_9__["AttentionGraph"](this.sels.atnDisplay, this.eventHandler), }; this._bindEventHandler(); this.mainInit(); } mainInit() { const self = this; this.sels.body.style("cursor", "progress"); this.api.getModelDetails(this.uiConf.model()).then(md => { const val = md.payload; // If changing to model with fewer layers, cap accordingly this.uiConf.nLayers(val.nlayers).nHeads(val.nheads); const currLayer = this.uiConf.layer(); const maxLayer = this.uiConf.nLayers() - 1; this.uiConf.layer(Math.min(currLayer, maxLayer)); this.initLayers(this.uiConf.nLayers()); this.api.getMetaAttentions(this.uiConf.model(), this.uiConf.sentence(), this.uiConf.layer()).then(attention => { const att = attention.payload; this.initFromResponse(att); // Wrap postInit into function so asynchronous call does not mess with necessary inits const postResponseDisplayCleanup = () => { this._toggleTokenSel(); }; let normBy; if ((this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) && (!this.uiConf.hideClsSep())) { normBy = _etc_types__WEBPACK_IMPORTED_MODULE_3__["NormBy"].COL; } else { normBy = _etc_types__WEBPACK_IMPORTED_MODULE_3__["NormBy"].ALL; } this.vizs.attentionSvg.normBy = normBy; if (this.uiConf.maskInds().length > 0) { this.tokCapsule.a.maskInds = this.uiConf.maskInds(); this.api.updateMaskedAttentions(this.uiConf.model(), this.tokCapsule.a, this.uiConf.sentence(), this.uiConf.layer()).then(resp => { const r = resp.payload; this.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep()); this.tokCapsule.updateTokens(r); this.update(); postResponseDisplayCleanup(); }); } else { this.update(); postResponseDisplayCleanup(); } if (this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) { // Ensure only 1 mask ind is present for autoregressive models if (this.uiConf.hasToken()) { this.grayToggle(this.uiConf.token().ind); } self.vizs.tokens.left.options.divHover.textInfo = "Would predict next..."; self.vizs.tokens.right.options.divHover.textInfo = "Would predict next..."; } else { self.vizs.tokens.left.options.divHover.textInfo = "Would predict here..."; self.vizs.tokens.right.options.divHover.textInfo = "Would predict here..."; } this.sels.body.style("cursor", "default"); }); }); } initFromResponse(attention) { this.attCapsule = Object(_data_AttentionCapsule__WEBPACK_IMPORTED_MODULE_11__["makeFromMetaResponse"])(attention, this.uiConf.hideClsSep()); this.tokCapsule = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_10__["TokenWrapper"](attention); this._staticInits(); } leaveCorpusMsg(msg) { this.vizs.corpusInspector.hideView(); this.vizs.corpusMatManager.hideView(); console.log("Running leave msg"); _etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].unhideElement(this.sels.corpusMsgBox); this.sels.corpusMsgBox.text(msg); } _bindEventHandler() { const self = this; this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenDblClick, (e) => { switch (self.uiConf.modelKind()) { case _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional: { e.sel.classed("masked-token", !e.sel.classed("masked-token")); const letter = Object(_data_TokenWrapper__WEBPACK_IMPORTED_MODULE_10__["sideToLetter"])(e.side, this.uiConf.attType); self.tokCapsule[letter].toggle(e.ind); self.sels.body.style("cursor", "progress"); self.api.updateMaskedAttentions(this.uiConf.model(), this.tokCapsule.a, this.uiConf.sentence(), this.uiConf.layer()).then((resp) => { const r = resp.payload; self.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep()); self.tokCapsule.updateTokens(r); self.uiConf.maskInds(this.tokCapsule.a.maskInds); self.update(); self.sels.body.style("cursor", "default"); }); break; } case _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive: { console.log("Autoregressive model doesn't do masking"); break; } default: { console.log("What kind of model is this?"); break; } } }); this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenMouseOver, (e) => { chooseShowBySide(this.uiConf.token(), e); }); this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenMouseOut, (e) => { chooseShowAll(this.uiConf.token()); }); this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenClick, (e) => { const tokToggle = () => { this.uiConf.toggleToken(e); this._toggleTokenSel(); showBySide(e); }; tokToggle(); this.renderAttHead(); }); this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.rowMouseOver, (e) => { self.sels.atnHeads.headInfo.style('visibility', 'visible'); }); this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.rowMouseOut, () => { self.sels.atnHeads.headInfo.style('visibility', 'hidden'); // Don't do anything special on row mouse out }); this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxMouseOver, (e) => { const updateMat = this.attCapsule.byHead(e.head); this.vizs.attentionSvg.data(updateMat); this.vizs.attentionSvg.update(updateMat); showBySide(this.uiConf.token()); }); this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxMouseOut, () => { const att = this.attCapsule.byHeads(this.uiConf.heads()); this.vizs.attentionSvg.data(att); this.vizs.attentionSvg.update(att); showBySide(this.uiConf.token()); }); this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxMouseMove, (e) => { const headInfo = self.sels.atnHeads.headInfo; let left, top, borderRadius; if (e.side == "left") { const divOffset = [12, 3]; left = e.mouse[0] + e.baseX - (+headInfo.style('width').replace('px', '') + divOffset[0]); top = e.mouse[1] + e.baseY - (+headInfo.style('height').replace('px', '') + divOffset[1]); borderRadius = "8px 8px 1px 8px"; } else { const divOffset = [-13, 3]; left = e.mouse[0] + e.baseX + divOffset[0]; top = e.mouse[1] + e.baseY - (+headInfo.style('height').replace('px', '') + divOffset[1]); borderRadius = "8px 8px 8px 1px"; } headInfo .style('visibility', 'visible') .style('left', String(left) + 'px') .style('top', String(top) + 'px') .style('border-radius', borderRadius) .text(`Head: ${e.ind + 1}`); // Don't do anything special on row mouse over }); this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxClick, (e) => { const result = this.uiConf.toggleHead(e.head); if (result == _etc_types__WEBPACK_IMPORTED_MODULE_3__["Toggled"].ADDED) { selectHead(e.head); } else if (result == _etc_types__WEBPACK_IMPORTED_MODULE_3__["Toggled"].REMOVED) { unselectHead(e.head); } this._renderHeadSummary(); this.renderSvg(); }); } _toggleTokenSel() { const e = this.uiConf.token(); const alreadySelected = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.selected-token'); // If no token should be selected, unselect all tokens if (!this.uiConf.hasToken()) { const newSel = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.selected-token'); if (!newSel.empty()) newSel.classed('selected-token', false); } // Otherwise, select the indicated token else { const token2String = (e) => `#${e.side}-token-${e.ind}`; const newSel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](token2String(e)); // Check that selection exists if (!newSel.empty()) newSel.classed('selected-token', true); } // Remove previous token selection, if any if (!alreadySelected.empty()) { alreadySelected.classed('selected-token', false); } if (this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) { this.grayToggle(+e.ind); this.markNextToggle(+e.ind, this.tokCapsule.a.length()); } } /** Gray all tokens that have index greater than ind */ grayBadToks(ind) { if (this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) { const grayToks = function (d, i) { const s = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this); s.classed("masked-token", i > ind); }; d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.right-token').each(grayToks); d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.left-token').each(grayToks); } } grayToggle(ind) { if (this.uiConf.hasToken()) this.grayBadToks(ind); else d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.token').classed('masked-token', false); } markNextWordToks(ind, N) { const markToks = function (d, i) { const s = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this); s.classed("next-token", i == Math.min(ind + 1, N)); }; d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.right-token').each(markToks); d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.left-token').each(markToks); } markNextToggle(ind, N) { if (this.uiConf.hasToken()) this.markNextWordToks(ind, N); else d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.token').classed('next-token', false); } _staticInits() { this._initSentenceForm(); this._initModelSelection(); this._renderHeadSummary(); this._initToggle(); this.renderAttHead(); this.renderTokens(); } _initSentenceForm() { const self = this; this.sels.form.sentenceA.attr('placeholder', "Enter new sentence to analyze"); this.sels.form.sentenceA.attr('value', this.uiConf.sentence()); const submitNewSentence = () => { // replace all occurences of '#' in sentence as this causes the API to break const sentence_a = this.sels.form.sentenceA.property("value").replace(/\#/g, ''); // Only update if the form is filled correctly if (sentence_a.length) { this.sels.body.style("cursor", "progress"); this.api.getMetaAttentions(this.uiConf.model(), sentence_a, this.uiConf.layer()) .then((resp) => { const r = resp.payload; this.uiConf.sentence(sentence_a); this.uiConf.rmToken(); this.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep()); this.tokCapsule.updateFromResponse(r); this._toggleTokenSel(); this.update(); this.sels.body.style("cursor", "default"); }); } }; const onEnter = ramda__WEBPACK_IMPORTED_MODULE_2__["curry"]((keyCode, f, event) => { const e = event || window.event; if (e.keyCode !== keyCode) return; e.preventDefault(); f(); }); const onEnterSubmit = onEnter(13, submitNewSentence); const btn = this.sels.form.button; const inputBox = this.sels.form.sentenceA; btn.on("click", submitNewSentence); inputBox.on('keypress', onEnterSubmit); } _renderHeadSummary() { this.sels.selectedHeads .html(ramda__WEBPACK_IMPORTED_MODULE_2__["join"](', ', this.uiConf.heads().map(h => h + 1))); } initLayers(nLayers) { const self = this; let hasActive = false; const checkboxes = self.sels.layerCheckboxes.selectAll(".layerCheckbox") .data(lodash__WEBPACK_IMPORTED_MODULE_1__["range"](0, nLayers)) .join("label") .attr("class", "btn button layerCheckbox") .classed('active', (d, i) => { // Assign to largest layer available if uiConf.layer() > new nLayers if (d == self.uiConf.layer()) { // Javascript is 0 indexed! hasActive = true; return true; } if (!hasActive && d == nLayers) { self.uiConf.layer(d); hasActive = true; return true; } return false; }) .text((d) => d + 1) .append("input") .attr("type", "radio") .attr("class", "checkbox-inline") .attr("name", "layerbox") // .attr("head", d => d) .attr("id", (d, i) => "layerCheckbox" + i); // .text((d, i) => d + " ") Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["fromEvent"])(checkboxes.nodes(), 'change').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["tap"])((e) => { const myData = d3__WEBPACK_IMPORTED_MODULE_0__["select"](e.target).datum(); console.log(myData, "--- myData"); this.sels.layerCheckboxes.selectAll(".layerCheckbox") .classed('active', d => d === myData); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["map"])((v) => +d3__WEBPACK_IMPORTED_MODULE_0__["select"](v.target).datum()), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["tap"])(v => { console.log("New layer: ", v); self.uiConf.layer(v); self.sels.body.style("cursor", "progress"); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["switchMap"])((v) => Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["from"])(self.api.updateMaskedAttentions(self.uiConf.model(), self.tokCapsule.a, self.uiConf.sentence(), v)))).subscribe({ next: (resp) => { const r = resp.payload; self.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep()); self.tokCapsule.updateTokens(r); self.uiConf.maskInds(self.tokCapsule.a.maskInds); self.update(); self.sels.body.style("cursor", "default"); self._toggleTokenSel(); } }); const layerId = `#layerCheckbox${this.uiConf.layer()}`; console.log("Layer ID: ", layerId); d3__WEBPACK_IMPORTED_MODULE_0__["select"](layerId).attr("checked", "checked"); // Init threshold stuff const dispThresh = (thresh) => Math.round(thresh * 100); d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#my-range-value').text(dispThresh(self.uiConf.threshold())); this.sels.threshSlider.on("input", lodash__WEBPACK_IMPORTED_MODULE_1__["throttle"](function () { const node = this; self.uiConf.threshold(+node.value / 100); d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#my-range-value').text(dispThresh(self.uiConf.threshold())); self.vizs.attentionSvg.threshold(self.uiConf.threshold()); }, 100)); this.sels.headSelectAll.on("click", function () { self.uiConf.selectAllHeads(); self.renderSvg(); self.renderAttHead(); }); this.sels.headSelectNone.on("click", function () { self.uiConf.selectNoHeads(); self.renderSvg(); self.renderAttHead(); _etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setHidden(".atn-curve"); }); } _initToggle() { Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["fromEvent"])(this.sels.clsToggle.node(), 'input').pipe( // @ts-ignore -- TODO: FIX ! Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["map"])(e => e.srcElement.checked)).subscribe({ next: v => { this.uiConf.hideClsSep(v); this.attCapsule.zeroed(v); this.renderSvg(); this.renderAttHead(); } }); } _initModelSelection() { const self = this; // Below are the available models. Will need to choose 3 to be available ONLY const data = [ { name: "bert-base-cased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "bert-base-uncased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "bert-base-german-cased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "xlm-mlm-en-2048", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "distilbert-base-uncased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "distilroberta-base", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "albert-base-v1", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "albert-xxlarge-v2", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "xlm-roberta-base", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, // { name: "t5-small", kind: tp.ModelKind.Autoregressive }, { name: "roberta-base", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional }, { name: "gpt2", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive }, { name: "distilgpt2", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive }, ]; const names = ramda__WEBPACK_IMPORTED_MODULE_2__["map"](ramda__WEBPACK_IMPORTED_MODULE_2__["prop"]('name'))(data); const kinds = ramda__WEBPACK_IMPORTED_MODULE_2__["map"](ramda__WEBPACK_IMPORTED_MODULE_2__["prop"]('kind'))(data); const kindmap = ramda__WEBPACK_IMPORTED_MODULE_2__["zipObj"](names, kinds); this.sels.modelSelector.selectAll('.model-option') .data(data) .join('option') .classed('model-option', true) .property('value', d => d.name) .attr("modelkind", d => d.kind) .text(d => d.name); this.sels.modelSelector.property('value', this.uiConf.model()); this.sels.modelSelector.on('change', function () { const me = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this); const mname = me.property('value'); self.uiConf.model(mname); self.uiConf.modelKind(kindmap[mname]); if (kindmap[mname] == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) { console.log("RESETTING MASK INDS"); self.uiConf.maskInds([]); } self.mainInit(); }); } renderAttHead() { const heads = lodash__WEBPACK_IMPORTED_MODULE_1__["range"](0, this.uiConf._nHeads); const focusAtt = this.attCapsule.att; const token = this.uiConf.hasToken() ? this.uiConf.token() : null; //@ts-ignore const leftAttInfo = Object(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["getAttentionInfo"])(focusAtt, heads, "left", token); //@ts-ignore const rightAttInfo = Object(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["getAttentionInfo"])(focusAtt, heads, "right", token); this.vizs.leftHeads.options.offset = this.uiConf.offset; this.vizs.leftHeads.update(leftAttInfo); this.vizs.rightHeads.update(rightAttInfo); this._renderHeadSummary(); // Make sure heads.forEach((h) => { if (this.uiConf.headSet().has(h)) { selectHead(h); } else { unselectHead(h); } }); } ; renderTokens() { const left = this.tokCapsule[this.uiConf.attType[0]]; const right = this.tokCapsule[this.uiConf.attType[1]]; console.log("now: ", this.uiConf.offset); this.vizs.tokens.left.options.offset = this.uiConf.offset; this.vizs.tokens.left.update(left.tokenData); this.vizs.tokens.left.mask(left.maskInds); this.vizs.tokens.right.update(right.tokenData); this.vizs.tokens.right.mask(right.maskInds); // displaySelectedToken } renderSvg() { const att = this.attCapsule.byHeads(this.uiConf.heads()); this.vizs.attentionSvg.options.offset = this.uiConf.offset; const svg = this.vizs.attentionSvg.data(att); svg.update(att); const maxTokens = lodash__WEBPACK_IMPORTED_MODULE_1__["max"]([this.tokCapsule.a.length()]); const newHeight = svg.options.boxheight * maxTokens; svg.height(newHeight); // Don't redisplay everything if one token is selected showBySide(this.uiConf.token()); } ; render() { this.renderTokens(); this.renderSvg(); this.renderAttHead(); } update() { this.render(); } } /***/ }), /***/ "./ts/vis/staticLayout.ts": /*!********************************!*\ !*** ./ts/vis/staticLayout.ts ***! \********************************/ /*! exports provided: createStaticSkeleton */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStaticSkeleton", function() { return createStaticSkeleton; }); /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); function createStaticSkeleton(base) { // ---- TEMPLATE ----- // language=HTML function template() { return `
Filters
Hide Special Tokens
Show top 70% of att:
Layer
Selected heads:

You focus on one token by click. You can mask any token by double click.

You can select and de-select a head by a click on the heatmap columns

`; } base.html(template); // ---- TEMPLATE.end ----- /** * Top level sections */ const sentenceInput = base.select("#sentence-input"); const connectorContainer = base.select('#connector-container'); const atnControls = base.select('#connector-controls'); const atnContainer = base.select('#atn-container'); /** * Sentence Input */ const sentenceA = base.select('#form-sentence-a'); const formButton = base.select('#update-sentence'); /** * Connector Controls */ const modelSelector = base.select('#model-option-selector'); const threshSlider = base.select('#my-range'); const layerCheckboxes = base.select('#layer-select'); const clsToggle = base.select('#cls-toggle'); const selectedHeads = base.select('#selected-heads'); const headSelectAll = base.select('#select-all-heads'); const headSelectNone = base.select('#select-no-heads'); /** * For main attention vis */ const headInfoBox = base.select('#head-info-box'); const headBoxLeft = base.select('#left-att-heads'); const tokensLeft = base.select('#left-tokens'); const atnDisplay = base.select('#atn-display'); const tokensRight = base.select('#right-tokens'); const headBoxRight = base.select('#right-att-heads'); /** * Return an object that provides handles to the important parts here */ return { body: d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body'), atnContainer: atnContainer, atnDisplay: atnDisplay, atnHeads: { left: headBoxLeft, right: headBoxRight, headInfo: headInfoBox }, form: { sentenceA: sentenceA, button: formButton }, tokens: { left: tokensLeft, right: tokensRight }, modelSelector: modelSelector, clsToggle: clsToggle, layerCheckboxes: layerCheckboxes, selectedHeads: selectedHeads, headSelectAll: headSelectAll, headSelectNone: headSelectNone, threshSlider: threshSlider, }; } /***/ }), /***/ 0: /*!************************!*\ !*** crypto (ignored) ***! \************************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /***/ 1: /*!****************************!*\ !*** node-fetch (ignored) ***! \****************************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /***/ 2: /*!**********************!*\ !*** util (ignored) ***! \**********************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /***/ 3: /*!************************!*\ !*** crypto (ignored) ***! \************************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /***/ 4: /*!********************************!*\ !*** string_decoder (ignored) ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /***/ 5: /*!********************!*\ !*** fs (ignored) ***! \********************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }) /******/ }); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vY3NzL21haW4uc2NzcyIsIndlYnBhY2s6Ly8vLi9leEJFUlQuaHRtbCIsIndlYnBhY2s6Ly8vLi9pbmRleC5odG1sIiwid2VicGFjazovLy8uL3RzL2FwaS9kZW1vQVBJLnRzIiwid2VicGFjazovLy8uL3RzL2FwaS9tYWluQXBpLnRzIiwid2VicGFjazovLy8uL3RzL2RhdGEvQXR0ZW50aW9uQ2Fwc3VsZS50cyIsIndlYnBhY2s6Ly8vLi90cy9kYXRhL1Rva2VuV3JhcHBlci50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvU1ZHcGx1cy50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvU2ltcGxlRXZlbnRIYW5kbGVyLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy9VUkxIYW5kbGVyLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy9VdGlsLnRzI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luIHRoZSBkaXN0IGZvbGRlciB0byB0aGUgZGVtbyBmb2xkZXJcbiAgICAgICAgY29uc3QgcGF0aCA9ICcuL2RlbW8vJyArIERlbW9BUElbaHNoXVxuICAgICAgICBjb25zb2xlLmxvZyhcIlRSWUlORyBUTyBTRU5ESU5HIFNUQVRJQzogXCIsIHBhdGgpO1xuICAgICAgICBjb25zdCBmb2xsb3cgPSAocmVzcG9uc2UpID0+IHJlc3BvbnNlSnNvbihyZXNwb25zZSwgYmFja3VwVXJsLCBiYWNrdXBQYXlsb2FkKVxuICAgICAgICByZXR1cm4gZmV0Y2gocGF0aCkudGhlbihmb2xsb3cpXG4gICAgfVxuICAgIHJldHVybiBkMy5qc29uKGJhY2t1cFVybCwgYmFja3VwUGF5bG9hZClcbn1cblxuXG5leHBvcnQgY2xhc3MgQVBJIHtcblxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgYmFzZVVSTDogc3RyaW5nID0gbnVsbCkge1xuICAgICAgICBpZiAodGhpcy5iYXNlVVJMID09IG51bGwpIHtcbiAgICAgICAgICAgIHRoaXMuYmFzZVVSTCA9IGJhc2V1cmwgKyAnL2FwaSc7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRNb2RlbERldGFpbHMobW9kZWw6IHN0cmluZywgaGFzaE9iajoge30gfCBudWxsID0gbnVsbCk6IFByb21pc2U8cnNwLk1vZGVsRGV0YWlsUmVzcG9uc2U+IHtcbiAgICAgICAgY29uc3QgdG9TZW5kID0ge1xuICAgICAgICAgICAgbW9kZWw6IG1vZGVsXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB1cmwgPSBtYWtlVXJsKHRoaXMuYmFzZVVSTCArIFwiL2dldC1tb2RlbC1kZXRhaWxzXCIsIHRvU2VuZClcbiAgICAgICAgY29uc29sZS5sb2coXCItLS0gR0VUIFwiICsgdXJsKTtcblxuICAgICAgICBpZiAoaGFzaE9iaiAhPSBudWxsKSB7XG4gICAgICAgICAgICBjb25zdCBrZXkgPSBoYXNoLnNoYTEodG9TZW5kKVxuICAgICAgICAgICAgZDMuanNvbih1cmwpLnRoZW4ociA9PiB7XG4gICAgICAgICAgICAgICAgaGFzaE9ialtrZXldID0gcjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2hlY2tEZW1vQVBJKHRvU2VuZCwgdXJsKVxuICAgIH1cblxuICAgIGdldE1ldGFBdHRlbnRpb25zKG1vZGVsOiBzdHJpbmcsIHNlbnRlbmNlOiBzdHJpbmcsIGxheWVyOiBudW1iZXIsIGhhc2hPYmo6IHt9IHwgbnVsbCA9IG51bGwpOiBQcm9taXNlPHJzcC5BdHRlbnRpb25EZXRhaWxzUmVzcG9uc2U+IHtcbiAgICAgICAgY29uc3QgdG9TZW5kID0ge1xuICAgICAgICAgICAgbW9kZWw6IG1vZGVsLFxuICAgICAgICAgICAgc2VudGVuY2U6IHNlbnRlbmNlLFxuICAgICAgICAgICAgbGF5ZXI6IGxheWVyXG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgdXJsID0gbWFrZVVybCh0aGlzLmJhc2VVUkwgKyBcIi9hdHRlbmQrbWV0YVwiLCB0b1NlbmQpXG4gICAgICAgIGNvbnNvbGUubG9nKFwiLS0tIEdFVCBcIiArIHVybCk7XG5cbiAgICAgICAgLy8gQWRkIGhhc2ggYW5kIHZhbHVlIHRvIGhhc2hPYmpcbiAgICAgICAgaWYgKGhhc2hPYmogIT0gbnVsbCkge1xuICAgICAgICAgICAgY29uc3Qga2V5ID0gaGFzaC5zaGExKHRvU2VuZClcbiAgICAgICAgICAgIGQzLmpzb24odXJsKS50aGVuKHIgPT4ge1xuICAgICAgICAgICAgICAgIGhhc2hPYmpba2V5XSA9IHI7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNoZWNrRGVtb0FQSSh0b1NlbmQsIHVybClcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBVcGRhdGUgdGh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F0pLmZvckVhY2goKGhlYWQpID0+IHtcbiAgICAgICAgXy5yYW5nZShhdGIuc2hhcGVbMV0pLmZvckVhY2goKGkpID0+IHtcbiAgICAgICAgICAgIC8vIFNldCByb3dzIHRvIDBcbiAgICAgICAgICAgIGlmIChfLmluY2x1ZGVzKHJvd3MsIGkpKSB7XG4gICAgICAgICAgICAgICAgXy5yYW5nZShhdGIuc2hhcGVbMl0pLmZvckVhY2goKGopID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYXRiLnNldCgwLCBoZWFkLCBpLCBqKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIFNldCBjb2xzIHRvIDBcbiAgICAgICAgICAgIF8ucmFuZ2UoYXRiLnNoYXBlWzJdKS5mb3JFYWNoKChqKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKF8uaW5jbHVkZXMoY29scywgaikpXG4gICAgICAgICAgICAgICAgICAgIF8ucmFuZ2UoYXRiLnNoYXBlWzFdKS5mb3JFYWNoKChpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhdGIuc2V0KDAsIGhlYWQsIGksIGopXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgIH0pXG5cbiAgICByZXR1cm4gb3V0VGVuc1xufSIsImltcG9ydCAqIGFzIHhfIGZyb20gJy4uL2V0Yy9fVG9vbHMnXG5pbXBvcnQgKiBhcyBfIGZyb20gJ2xvZGFzaCdcbmltcG9ydCAqIGFzIHRwIGZyb20gJy4uL2V0Yy90eXBlcydcbmltcG9ydCAqIGFzIFIgZnJvbSAncmFtZGEnXG5cbi8qKlxuICogVGhlIG9yaWdpbmFsIHRva2VucywgYW5kIHRoZSBpbmRleGVzIHRoYXQgbmVlZCB0byBiZSBtYXNrZWRcbiAqL1xuIGNvbnN0IGVtcHR5RnVsbFJlc3BvbnNlOiB0cC5GdWxsU2luZ2xlVG9rZW5J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gKyAodXJsX3BhdGgubGVuZ3RoID8gdXJsX3BhdGggOiAnJyk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVhZCBhbGwgVVJMIHBhcmFtZXRlcnMgaW50byBhIG1hcC5cbiAgICAgKiBAcmV0dXJucyB7TWFwfSB0aGUgdXJsIHBhcmFtZXRlcnMgYXMgYSBrZXktdmFsdWUgc3RvcmUgKEVTNiBtYXApXG4gICAgICovXG4gICAgc3RhdGljIGdldCBwYXJhbWV0ZXJzKCk6IG9iamVjdCB7XG4gICAgICAgIC8vIEFkYXB0ZWQgZnJvbTogIGh0dHA6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMvMjA5MDU1MS9wYXJzZS1xdWVyeS1zdHJpbmctaW4tamF2YXNjcmlwdFxuICAgICAgICBjb25zdCBxdWVyeSA9IHdpbmRvdy5sb2NhdGlvbi5zZWFyY2guc3Vic3RyaW5nKDEpO1xuICAgICAgICBjb25zdCB2YXJzID0gcXVlcnkuc3BsaXQoJyYnKTtcbiAgICAgICAgY29uc29sZS5sb2codmFycywgXCItLS0gdmFyc1wiKTtcblxuICAgICAgICBjb25zdCB1cmxQYXJhbWV0ZXJzID0ge307XG5cbiAgICAgICAgY29uc3QgaXNJbnQgPSB4ID0+ICgvXlswLTldKyQvKS50ZXN0KHgpO1xuICAgICAgICBjb25zdCBpc0Zsb2F0ID0geCA9PiAoL15bMC05XStcXC5bMC05XSokLykudGVzdCh4KTtcblxuICAgICAgICBjb25zdCB0eXBlQ2FzdCA9IHZhbCA9PiB7XG4gICAgICAgICAgICBpZiAoaXNJbnQodmFsKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIucGFyc2VJbnQodmFsLCAxMCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzRmxvYXQodmFsKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIucGFyc2VGbG9hdCh2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gZWxzZTpcbiAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgIH1cblxuXG4gICAgICAgIHZhcnMuZm9yRWFjaCh2ID0+IHtcbiAgICAgICAgICAgIGlmICh2Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzcGxpdHMgPSB2LnNwbGl0KCc9Jyk7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gZGVjb2RlVVJJQ29tcG9uZW50KHNwbGl0c1swXSk7XG4gICAgICAgICAgICAgICAgbGV0IHJhd192YWx1ZSA9IGRlY29kZVVSSUNvbXBvbmVudChzcGxpdHNbMV0pO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgaXNBcnJheSA9IHJhd192YWx1ZS5zdGFydHNXaXRoKCcuLicpO1xuICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgIHJhd192YWx1ZSA9IHJhd192YWx1ZS5zbGljZSgyKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAocmF3X3ZhbHVlLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgdXJsUGFyYW1ldGVyc1trZXldID0gaXNBcnJheSA/IFtdIDogJyc7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgIHVybFBhcmFtZXRlcnNba2V5XSA9IHJhd192YWx1ZS5zcGxpdCgnLCcpXG4gICAgICAgICAgICAgICAgICAgICAgICAubWFwKHZhbCA9PiB0eXBlQ2FzdCh2YWwpKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB1cmxQYXJhbWV0ZXJzW2tleV0gPSB0eXBlQ2FzdChyYXdfdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHVybFBhcmFtZXRlcnM7XG5cbiAgICB9XG5cblxuICAgIC8qKlxuICAgICAqIEdlbmVyYXRlcyBhbiBVUkwgc3RyaW5nIGZyb20gYSBtYXAgb2YgdXJsIHBhcmFtZXRlcnNcbiAgICAgKiBAcGFyYW0ge3t9fSB1cmxQYXJhbWV0ZXJzIC0gdGhlIG1hcCBvZiBwYXJhbWV0ZXJzXG4gICAgICogQHJldHVybnMge3N0cmluZ30gLSBhbiBVUkkgc3RyaW5nXG4gICAgICovXG4gICAgc3RhdGljIHVybFN0cmluZyh1cmxQYXJhbWV0ZXJzOiBvYmplY3QpIHtcbiAgICAgICAgY29uc3QgYXR0ciA9IFtdO1xuICAgICAgICBPYmplY3Qua2V5cyh1cmxQYXJhbWV0ZXJzKS5mb3JFYWNoKGsgPT4ge1xuICAgICAgICAgICAgY29uc3QgdiA9IHVybFBhcmFtZXRlcnNba107XG4gICAgICAgICAgICBpZiAodiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gdjtcbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh2KSkgdmFsdWUgPSAnLi4nICsgdi5qb2luKCcsJyk7XG4gICAgICAgICAgICAgICAgYXR0ci5wdXNoKGVuY29kZVVSSShrICsgJz0nICsgdmFsdWUpKVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuXG4gICAgICAgIGNvbnN0IHVybCA9IHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZTtcbiAgICAgICAgbGV0IHJlcyA9IHVybC5zdWJzdHJpbmcodXJsLmxhc3RJbmRleE9mKCcvJykgKyAxKTtcbiAgICAgICAgaWYgKGF0dHIubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgcmVzICs9ICc/JyArIGF0dHIuam9pbignJicpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzO1xuICAgIH1cblxuICAgIHN0YXRpYyB1cGRhdGVVUkxQYXJhbShrZXk6I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kZW5cIilcbiAgICBzdGF0aWMgc2V0VmlzaWJsZSA9ICh4OiBzdHJpbmcpID0+IFNlbC5zZXRTZWxWaXNpYmxlKGQzLnNlbGVjdEFsbCh4KSlcbiAgICBzdGF0aWMgc2V0SGlkZGVuID0gKHg6IHN0cmluZykgPT4gU2VsLnNldFNlbEhpZGRlbihkMy5zZWxlY3RBbGwoeCkpXG4gICAgc3RhdGljIGhpZGVFbGVtZW50ID0gKGhFOiBEM1NlbCkgPT4gaEUudHJhbnNpdGlvbigpLnN0eWxlcyh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvcGFjaXR5JzogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3BvaW50ZXItZXZlbnRzJzogJ25vbmUnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGlzcGxheSc6ICdub25lJ30pXG4gICAgc3RhdGljIHVuaGlkZUVsZW1lbnQgPSAoaEU6IEQzU2VsKSA9PiBoRS50cmFuc2l0aW9uKCkuc3R5bGVzKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29wYWNpdHknOiAxLCBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3BvaW50ZXItZXZlbnRzJzogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc3BsYXknOiBudWxsfSlcbn1cblxuZXhwb3J0IGludGVyZmFjZSBMb29zZU9iamVjdCB7XG4gICAgW2tleTogc3RyaW5nXTogYW55XG59XG5cbmV4cG9ydCB0eXBlIGQzUzxUIGV4dGVuZHMgQmFzZVR5cGUsIFUgPSBhbnk+ID0gZDMuU2VsZWN0aW9uPFQsIFUsIGFueSwgYW55PiIsImltcG9ydCAqIGFzIF8gZnJvbSAnbG9kYXNoJ1xuXG5mdW5jdGlvbiB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iAgICB0b2tlbigpOiB0cC5Ub2tlbkV2ZW50O1xuICAgIHRva2VuKHZhbDogdHAuVG9rZW5FdmVudCk6IHRoaXM7XG4gICAgdG9rZW4odmFsPzogdHAuVG9rZW5FdmVudCkge1xuICAgICAgICBpZiAodmFsID09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fdG9rZW5cblxuICAgICAgICB0aGlzLl90b2tlbiA9IHZhbDtcbiAgICAgICAgdGhpcy5fY29uZi50b2tlbkluZCA9IHZhbC5pbmQ7XG4gICAgICAgIHRoaXMuX2NvbmYudG9rZW5TaWRlID0gdmFsLnNpZGU7XG4gICAgICAgIHRoaXMudG9VUkwoKTtcblxuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIGhhc1Rva2VuKCkge1xuICAgICAgICBjb25zdCBjb25mID0gdGhpcy5fY29uZlxuICAgICAgICBjb25zdCBhY3R1YWxseU51bGwgPSAoKGNvbmYudG9rZW5JbmQgPT0gbnVsbCkgJiYgKGNvbmYudG9rZW5TaWRlID09IG51bGwpKVxuICAgICAgICBjb25zdCBzdHJOdWxsID0gKGNvbmYudG9rZW5JbmQgPT0gXCJudWxsXCIpXG4gICAgICAgIHJldHVybiAoIWFjdHVhbGx5TnVsbCkgJiYgKCFzdHJOdWxsKVxuICAgIH1cblxuICAgIHJtVG9rZW4oKSB7XG4gICAgICAgIHRoaXMudG9rZW4oeyBpbmQ6IG51bGwsIHNpZGU6IG51bGwgfSk7XG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgfVxuXG4gICAgc2VudGVuY2UoKTogc3RyaW5nO1xuICAgIHNlbnRlbmNlKHZhbDogc3RyaW5nKTogdGhpcztcbiAgICBzZW50ZW5jZSh2YWw/KSB7XG4gICAgICAgIGlmICh2YWwgPT0gbnVsbClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb25mLnNlbnRlbmNlXG5cbiAgICAgICAgdGhpcy5fY29uZi5zZW50ZW5jZSA9IHZhbFxuICAgICAgICB0aGlzLnRvVVJMKHRydWUpXG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgfVxuXG4gICAgdGhyZXNob2xkKCk6IG51bWJlcjtcbiAgICB0aHJlc2hvbGQodmFsOiBudW1iZXIpOiB0aGlzO1xuICAgIHRocmVzaG9sZCh2YWw/KSB7XG4gICAgICAgIGlmICh2YWwgPT0gbnVsbCkgcmV0dXJuIHRoaXMuX2NvbmYudGhyZXNob2xkO1xuXG4gICAgICAgIHRoaXMuX2NvbmYudGhyZXNob2xkID0gdmFsO1xuICAgICAgICB0aGlzLnRvVVJMKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGhlYWRzKCk6IG51bWJlcltdIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2NvbmYuaGVhZHNcbiAgICB9XG5cbiAgICBsYXllcigpOiBudW1iZXJcbiAgICBsYXllcih2YWw6IG51bWJlcik6IHRoaXNcbiAgICBsYXllcih2YWw/KSB7XG4gICAgICAgIGlmICh2YWwgPT0gbnVsbClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb25mLmxheWVyXG5cbiAgICAgICAgdGhpcy5fY29uZi5sYXllciA9IHZhbDtcbiAgICAgICAgdGhpcy50b1VSTCgpO1xuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIGhlYWRTZXQoKTogU2V0PG51bWJlcj47XG4gICAgaGVhZFNldCh2YWw6IFNldDxudW1iZXI+KTogdGhpcztcbiAgICBoZWFkU2V0KHZhbD8pIHtcbiAgICAgICAgaWYgKHZhbCA9PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5faGVhZFNldDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX2hlYWRTZXQgPSB2YWw7XG4gICAgICAgIHRoaXMuX2NvbmYuaGVhZHMgPSB4Xy5zZXQyU29ydGVkQXJyYXkodGhpcy5faGVhZFNldClcbiAgICAgICAgdGhpcy50b1VSTCgpO1x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biAgICAgICAgICAgIHRoaXMucGF0aHMuYXR0cnMoe1xuICAgICAgICAgICAgICAgICdkJzogKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YTogeyBzb3VyY2U6IFtudW1iZXIsIG51bWJlcl0sIHRhcmdldDogW251bWJlciwgbnVtYmVyXSB9ID1cbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlOiBbMCwgb3AuYm94aGVpZ2h0ICogKGQuaSArIDAuNSArIG9wLm9mZnNldCldLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0OiBbb3Aud2lkdGgsIG9wLmJveGhlaWdodCAqIChkLmogKyAwLjUpXSAvLyArIDIgYWxsb3dzIHNtYWxsIG9mZnNldFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5saW5rR2VuKGRhdGEpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgJ2NsYXNzJzogJ2F0bi1jdXJ2ZSdcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJzcmMtaWR4XCIsIChkLCBpKSA9PiBkLmkpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJ0YXJnZXQtaWR4XCIsIChkLCBpKSA9PiBkLmopO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ2hhbmdlIHRoZSBoZWlnaHQgb2YgdGhlIFNWR1xuICAgICAqL1xuICAgIHByaXZhdGUgdXBkYXRlSGVpZ2h0KCkge1xuICAgICAgICBjb25zdCBvcCA9IHRoaXMub3B0aW9ucztcbiAgICAgICAgaWYgKHRoaXMuc3ZnICE9IG51bGwpIHtcbiAgICAgICAgICAgIHRoaXMuc3ZnLmF0dHIoXCJoZWlnaHRcIiwgdGhpcy5vcHRpb25zLmhlaWdodCArIChvcC5vZmZzZXQgKiB0aGlzLm9wdGlvbnMuYm94aGVpZ2h0KSlcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDaGFuZ2UgdGhlIHdpZHRoIG9mIHRoZSBTVkdcbiAgICAgKi9cbiAgICBwcml2YXRlIHVwZGF0ZVdpZHRoKCkge1xuICAgICAgICBpZiAodGhpcy5zdmcgIT0gbnVsbCkge1xuICAgICAgICAgICAgdGhpcy5zdmcuYXR0cihcIndpZHRoXCIsIHRoaXMub3B0aW9ucy53aWR0aClcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDaGFuZ2UgdGhlIE9wYWNpdHkgb2YgdGhlIGxpbmVzIGFjY29yZGluZyB0byB0aGUgdmFsdWUgb2YgdGhlIGRhdGFcbiAgICAgKi9cbiAgICBwcml2YXRlIHVwZGF0ZU9wYWNpdHkoKSB7XG4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgICAgICBpZiAodGhpcy5wYXRocyAhPSBudWxsKSB7XG4gICAgICAgICAgICAvLyBwYXRocy50cmFuc2l0aW9uKCkuZHVyYXRpb24oNTAwKS5hdHRyKCdvcGFjaXR5JywgKGQpID0+IHtcbiAgICAgICAgICAgIHRoaXMucGF0aHMuYXR0cignb3BhY2l0eScsIChkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsID0gdGhpcy5vcGFjaXR5U2NhbGVzW2Rbc2VsZi5zY2FsZUlkeCgpXV0oZC52KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIHRoaXMucGF0aHMuYXR0cignc3Ryb2tlLXdpZHRoJywgKGQpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSB0aGlzLm9wYWNpdHlTY2FsZXNbZFtzZWxmLnNjYWxlSWR4KCldXShkLnYpO1xuICAgICAgICAgICAgIC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vLyBHcm91cCBub3JtYWxpemF0aW9uXG4gICAgICAgIHN3aXRjaCAodGhpcy5ub3JtQnkpe1xuICAgICAgICAgICAgY2FzZSB0cC5Ob3JtQnkuUk9XOlxuICAgICAgICAgICAgICAgIGFyciA9IHRoaXMuZWRnZURhdGEuZXh0ZW50KDEpO1xuICAgICAgICAgICAgICAgIHRoaXMub3BhY2l0eVNjYWxlcyA9IFtdO1xuICAgICAgICAgICAgICAgIGFyci5mb3JFYWNoKCh2LCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICh0aGlzLm9wYWNpdHlTY2FsZXMgYXMgZDMuU2NhbGVMaW5lYXI8YW55LCBhbnk+W10pLnB1c2goXG4gICAgICAgICAgICAgICAgICAgICAgICBkMy5zY2FsZUxpbmVhcigpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmRvbWFpbihbMCwgdlsxXV0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJhbmdlKFswLCAwLjldKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgdHAuTm9ybUJ5LkNPTDpcbiAgICAgICAgICAgICAgICBhcnIgPSB0aGlzLmVkZ2VEYXRhLmV4dGVudCgwKTtcbiAgICAgICAgICAgICAgICB0aGlzLm9wYWNpdHlTY2FsZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgodiwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAodGhpcy5vcGFjaXR5U2NhbGVzIGFzIGQzLlNjYWxlTGluZWFyPGFueSwgYW55PltdKS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgZDMuc2NhbGVMaW5lYXIoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5kb21haW4oWzAsIHZbMV1dKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgMC45XSlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIHRwLk5vcm1CeS5BTEw6XG4gICAgICAgICAgICAgICAgY29uc3QgbWF4SW4gPSBkMy5tYXgodGhpcy5wbG90RGF0YS5tYXAoKGQpID0+IGQudikpXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLl9kYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3BhY2l0eVNjYWxlcy5wdXNoKGQzLnNjYWxlTGluZWFyKClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5kb21haW4oWzAsIG1heEluXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgMV0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiTm9yIG5vcm1pbmcgc3BlY2lmaWVkXCIpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQWNjZXNzIC8gbW9kaWZ5IHRoZSBkYXRhIGluIGEgRDMgc3R5bGUgd2F5LiBJZiBtb2RpZmllZCwgdGhlIGNvbXBvbmVudCB3aWxsIHVwZGF0ZSBqdXN0IHRoZSBwYXJ0IHRoYXQgaXMgbmVlZGVkIHRvIGJlIHVwZGF0ZWRcbiAgICAgKi9cbiAgICBkYXRhKCk6IEF0dGVudGlvbkRhdGFcbiAgICBkYXRhKHZhbHVlOiBBdHRlbnRpb25EYXRhKTogdGhpc1xuICAgIGRhdGEodmFsdWU/KSB7XG4gICAgICAgIGlmICh2YWx1ZSA9PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZGF0YTtcbiAgICAgICAgfV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dzID0gdGhpcy5iYXNlLnNlbGVjdEFsbChgLiR7c2VsZi5yb3dDc3NOYW1lfWApXG4gICAgICAgICAgICAuZGF0YShzZWxmLl9kYXRhLnJvd3MpXG4gICAgICAgICAgICAuam9pbihcImdcIilcbiAgICAgICAgICAgIC5hdHRycyh7XG4gICAgICAgICAgICAgICAgY2xhc3M6IChkLCBpKSA9PiBgJHtzZWxmLnJvd0Nzc05hbWV9ICR7c2VsZi5yb3dDc3NOYW1lfS0ke2l9YCxcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkcudHJhbnNsYXRlKFxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHg6IGN1ci54UGFkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHk6IChvcC5ib3hEaW0gKiAoaSArIG9wLm9mZnNldCkpICsgY3VyLnlQYWQsXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd2lkdGg6IGN1ci5ib3hXaWR0aCxcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IGN1ci5oZWFkSGVpZ2h0LFxuXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdmVyXCIsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5yb3dNb3VzZU92ZXIsIHsgaW5kOiBpLCBzaWRlOiBvcC5zaWRlIH0pXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdXRcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLnJvd01vdXNlT3V0LCB7IGluZDogaSwgc2lkZTogb3Auc2lkZSB9KVxuICAgICAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmhlYWRDZWxscyA9IHRoaXMuaGVhZFJvd3NcbiAgICAgICAgICAgIC5zZWxlY3RBbGwoYCR7dGhpcy5ib3hDc3NOYW1lfWApXG4gICAgICAgICAgICAuZGF0YShkID0+IGQpXG4gICAgICAgICAgICAuam9pbigncmVjdCcpXG4gICAgICAgICAgICAuYXR0cnMoe1xuICAgICAgICAgICAgICAgIHg6IChkLCBpKSA9PiBpICogY3VyLmhlYWRXaWR0aCxcbiAgICAgICAgICAgICAgICB5OiAwLFxuICAgICAgICAgICAgICAgIGNsYXNzOiB0aGlzLmJveENzc05hbWUsXG4gICAgICAgICAgICAgICAgaGVhZDogKGQsIGkpID0+IHNlbGYuX2RhdGEubGFiZWxzW2ldLFxuICAgICAgICAgICAgICAgIHdpZHRoOiBjdXIuaGVhZFdpZHRoLFxuICAgICAgICAgICAgICAgIGhlaWdodDogY3VyLmhlYWRIZWlnaHQsXG4gICAgICAgICAgICAgICAgb3BhY2l0eTogKGQ6IG51bWJlcikgPT4gdGhpcy5vcGFjaXR5U2NhbGUoZCksXG4gICAgICAgICAgICAgICAgZmlsbDogXCJibHVlXCJcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oXCJtb3VzZW92ZXJcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLmJveE1vdXNlT3ZlciwgYm94RXZlbnQoaSkpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdXRcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLmJveE1vdXNlT3V0LCBib3hFdmVudChpKSlcbiAgICAgIC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AgICAgICAgICAgICAgICAgICAgaTogaSxcbiAgICAgICAgICAgICAgICAgICAgajogc29ydGVkQXJyLnNvcnRJbmRpY2VzW2pdLFxuICAgICAgICAgICAgICAgICAgICB2OiB2LFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvdXRBcnIucHVzaChvYmopO1xuICAgICAgICAgICAgICAgIGNvdW50ZXIgKz0gdjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH0pXG5cbiAgICByZXR1cm4gb3V0QXJyO1xufVxuLyoqXG4gKiBDbGFzcyBmb3IgaW1wbGVtZW50aW5nIG9wZXJhdGlvbnMgb24gQXR0ZW50aW9uR3JhcGggaW1wbGVtZW50YXRpb24uIFxuICogQ2xvc2VseSB0aWVkIHRvIFtbQXR0ZW50aW9uQ29ubmVjdG9yXV1cbiAqL1xuZXhwb3J0IGNsYXNzIEVkZ2VEYXRhIHtcbiAgICByZWFkb25seSB0ZW5zRGF0YTp0Zi5UZW5zb3I7XG5cbiAgICBjb25zdHJ1Y3RvciAocHVibGljIGRhdGE6bnVtYmVyW11bXSl7XG4gICAgICAgIHRoaXMudGVuc0RhdGEgPSB0Zi50ZW5zb3IoZGF0YSk7XG4gICAgfVxuXG4gICAgbWluKGF4aXM/Om51bWJlcik6VHlwZWRBcnJheSB7XG4gICAgICAgIHJldHVybiB0aGlzLnRlbnNEYXRhLm1pbihheGlzKS5kYXRhU3luYygpO1xuICAgIH1cblxuICAgIG1heChheGlzPzpudW1iZXIpOlR5cGVkQXJyYXl7XG4gICAgICAgIHJldHVybiB0aGlzLnRlbnNEYXRhLm1heChheGlzKS5kYXRhU3luYygpO1xuICAgIH1cblxuICAgIGV4dGVudChheGlzPzpudW1iZXIpOm51bWJlcltdW10ge1xuICAgICAgICByZXR1cm4gZDMuemlwKHRoaXMubWluKGF4aXMpLCB0aGlzLm1heChheGlzKSlcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBGb3JtYXQgdGh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YWNrZ3JvdW5kJywgMClcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuTW91c2VPdXQsIHNlbGYuZUluZm8oc2VsLCBpKSlcbiAgICAgICAgICAgICAgICBzZWxmLmRpdkhvdmVyLnN0eWxlKCd2aXNpYmlsaXR5JywgJ2hpZGRlbicpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHMgPSBkMy5zZWxlY3QodGhpcylcbiAgICAgICAgICAgICAgICBjb25zdCBbbGVmdCwgdG9wXSA9IHNlbGYuX2RpdlBsYWNlbWVudCgpXG5cbiAgICAgICAgICAgICAgICBzZWxmLmRpdkhvdmVyXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnbGVmdCcsIFN0cmluZyhsZWZ0KSArICdweCcpXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgndG9wJywgU3RyaW5nKHRvcCkgKyAncHgnKVxuICAgICAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKFwiLnRvcGstd29yZC1ib3hcIilcbiAgICAgICAgICAgICAgICAgICAgLy9AdHMtaWdub3JlXG4gICAgICAgICAgICAgICAgICAgIC5kYXRhKGQzLnppcChkLnRvcGtfd29yZHMsIGQudG9wa19wcm9icykpXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCdwJylcbiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoXCJ0b3BrLXdvcmQtYm94XCIsIHRydWUpXG4gICAgICAgICAgICAgICAgICAgIC50ZXh0KHcgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IHdbMF0ucmVwbGFjZSgvXFx1MDEyMC9nLCBcIiBcIikucmVwbGFjZSgvXFx1MDEwQS9nLCBcIlxcXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm9iID0gd1sxXS50b0ZpeGVkKDIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmFtZSArIFwiOiBcIiArIHByb2JcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgc2VsZi5hZGRDbGljayhzZWxmLnRleHRCb3hlcylcbiAgICB9XG5cbiAgICBhZGRDbGljayh0ZXh0Ym94ZXM6IEQzU2VsKSB7XG4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuXG4gICAgICAgIHNlbGYudGV4dEJveGVzID0gdGV4dGJveGVzXG4gICAgICAgICAgICAub24oJ2NsaWNrJywgKGQsIGksIG4pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWwgPSBkMy5zZWxlY3QobltpXSk7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihUZXh0VG9rZW5zLmV2ZW50cy50b2tlbkNsaWNrLCBzZWxmLmVFbWJlZGRpbmcoc2VsLCBpLCBkLmVtYmVkZGluZ3MpKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignZGJsY2xpY2snLCAoZCwgaSwgbikgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHNlbCA9IGQzLnNlbGVjdChuW2ldKTtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuRGJsQ2xpY2ssIHNlbGYuZUluZm8oc2VsLCBpKSlcbiAgICAgICAgICAgIH0pO1xuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIExlZnRUZXh0VG9rZW4gZXh0ZW5kcyBUZXh0VG9rZW5zIHtcblxuICAgIGNzc19uYW1lID0gJ2xlZnQtdG9rZW4nO1xuICAgIGhvdmVyX2Nzc19uYW1lID0gJ2xlZnQtdG9rZW4taG92ZXInXG4gICAgc2lkZ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ICAgICAgICBjb25zdCBtYXhMYXllciA9IHRoaXMudWlDb25mLm5MYXllcnMoKSAtIDFcbiAgICAgICAgICAgIHRoaXMudWlDb25mLmxheWVyKE1hdGgubWluKGN1cnJMYXllciwgbWF4TGF5ZXIpKVxuICAgICAgICAgICAgdGhpcy5pbml0TGF5ZXJzKHRoaXMudWlDb25mLm5MYXllcnMoKSlcblxuICAgICAgICAgICAgdGhpcy5hcGkuZ2V0TWV0YUF0dGVudGlvbnModGhpcy51aUNvbmYubW9kZWwoKSwgdGhpcy51aUNvbmYuc2VudGVuY2UoKSwgdGhpcy51aUNvbmYubGF5ZXIoKSkudGhlbihhdHRlbnRpb24gPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGF0dCA9IGF0dGVudGlvbi5wYXlsb2FkO1xuICAgICAgICAgICAgICAgIHRoaXMuaW5pdEZyb21SZXNwb25zZShhdHQpXG5cbiAgICAgICAgICAgICAgICAvLyBXcmFwIHBvc3RJbml0IGludG8gZnVuY3Rpb24gc28gYXN5bmNocm9ub3VzIGNhbGwgZG9lcyBub3QgbWVzcyB3aXRoIG5lY2Vzc2FyeSBpbml0c1xuICAgICAgICAgICAgICAgIGNvbnN0IHBvc3RSZXNwb25zZURpc3BsYXlDbGVhbnVwID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVUb2tlblNlbCgpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IG5vcm1CeVxuICAgICAgICAgICAgICAgIGlmICgodGhpcy51aUNvbmYubW9kZWxLaW5kKCkgPT0gdHAuTW9kZWxLaW5kLkF1dG9yZWdyZXNzaXZlKSAmJiAoIXRoaXMudWlDb25mLmhpZGVDbHNTZXAoKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9ybUJ5ID0gdHAuTm9ybUJ5LkNPTFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbm9ybUJ5ID0gdHAuTm9ybUJ5LkFMTFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnZpenMuYXR0ZW50aW9uU3ZnLm5vcm1CeSA9IG5vcm1CeVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudWlDb25mLm1hc2tJbmRzKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRva0NhcHN1bGUuYS5tYXNrSW5kcyA9IHRoaXMudWlDb25mLm1hc2tJbmRzKClcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwaS51cGRhdGVNYXNrZWRBdHRlbnRpb25zKHRoaXMudWlDb25mLm1vZGVsKCksIHRoaXMudG9rQ2Fwc3VsZS5hLCB0aGlzLnVpQ29uZi5zZW50ZW5jZSgpLCB0aGlzLnVpQ29uZi5sYXllcigpKS50aGVuKHJlc3AgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgciA9IHJlc3AucGF5bG9hZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYXR0Q2Fwc3VsZS51cGRhdGVGcm9tTm9ybWFsKHIsIHRoaXMudWlDb25mLmhpZGVDbHNTZXAoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRva0NhcHN1bGUudXBkYXRlVG9rZW5zKHIpXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3N0UmVzcG9uc2VEaXNwbGF5Q2xlYW51cCgpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKVxuICAgICAgICAgICAgICAgICAgICBwb3N0UmVzcG9uc2VEaXNwbGF5Q2xlYW51cCgpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudWlDb25mLm1vZGVsS2luZCgpID09IHRwLk1vZGVsS2luZC5BdXRvcmVncmVzc2l2ZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBFbnN1cmUgb25seSAxIG1hc2sgaW5kIGlzIHByZXNlbnQgZm9yIGF1dG9yZWdyZXNzaXZlIG1vZGVsc1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy51aUNvbmYuaGFzVG9rZW4oKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ncmF5VG9nZ2xlKDxudW1iZXI+dGhpcy51aUNvbmYudG9rZW4oKS5pbmQpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLnRva2Vucy5sZWZ0Lm9wdGlvbnMuZGl2SG92ZXIudGV4dEluZm8gPSBcIldvdWxkIHByZWRpY3QgbmV4dC4uLlwiXG4gICAgICAgICAgICAgICAgICAgIHNlbGYudml6cy50b2tlbnMucmlnaHQub3B0aW9ucy5kaXZIb3Zlci50ZXh0SW5mbyA9IFwiV291bGQgcHJlZGljdCBuZXh0Li4uXCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYudml6cy50b2tlbnMubGVmdC5vcHRpb25zLmRpdkhvdmVyLnRleHRJbmZvID0gXCJXb3VsZCBwcmVkaWN0IGhlcmUuLi5cIlxuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMudG9rZW5zLnJpZ2h0Lm9wdGlvbnMuZGl2SG92ZXIudGV4dEluZm8gPSBcIldvdWxkIHByZWRpY3QgaGVyZS4uLlwiXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJkZWZhdWx0XCIpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcblxuICAgIH1cblxuICAgIHByaXZhdGUgaW5pdEZ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W5cIikpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsZXR0ZXIgPSBzaWRlVG9MZXR0ZXIoZS5zaWRlLCB0aGlzLnVpQ29uZi5hdHRUeXBlKVxuICAgICAgICAgICAgICAgICAgICBzZWxmLnRva0NhcHN1bGVbbGV0dGVyXS50b2dnbGUoZS5pbmQpXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2Vscy5ib2R5LnN0eWxlKFwiY3Vyc29yXCIsIFwicHJvZ3Jlc3NcIilcblxuICAgICAgICAgICAgICAgICAgICBzZWxmLmFwaS51cGRhdGVNYXNrZWRBdHRlbnRpb25zKHRoaXMudWlDb25mLm1vZGVsKCksIHRoaXMudG9rQ2Fwc3VsZS5hLCB0aGlzLnVpQ29uZi5zZW50ZW5jZSgpLCB0aGlzLnVpQ29uZi5sYXllcigpKS50aGVuKChyZXNwOiByc3AuQXR0ZW50aW9uRGV0YWlsc1Jlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByID0gcmVzcC5wYXlsb2FkO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5hdHRDYXBzdWxlLnVwZGF0ZUZyb21Ob3JtYWwociwgdGhpcy51aUNvbmYuaGlkZUNsc1NlcCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYudG9rQ2Fwc3VsZS51cGRhdGVUb2tlbnMocik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYudWlDb25mLm1hc2tJbmRzKHRoaXMudG9rQ2Fwc3VsZS5hLm1hc2tJbmRzKVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJkZWZhdWx0XCIpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXNlIHRwLk1vZGVsS2luZC5BdXRvcmVncmVzc2l2ZToge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkF1dG9yZWdyZXNzaXZlIG1vZGVsIGRvZXNuJ3QgZG8gbWFza2luZ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJXaGF0IGtpbmQgb2YgbW9kZWwgaXMgdGhpcz9cIik7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5iaW5kKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuTW91c2VPdmVyLCAoZTogdHAuVG9rZW5FdmVudCkgPT4ge1xuICAgICAgICAgICAgY2hvb3NlU2hvd0J5U2lkZSh0aGlzLnVpQ29uZi50b2tlbigpLCBlKVxuICAgICAgICB9KVxuXG4gICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmJpbmQoVGV4dFRva2Vucy5ldmVudHMudG9rZW5Nb3VzZU91dCwgKGUpID0+IHtcbiAgICAgICAgICAgIGNob29zZVNob3dBbGwodGhpcy51aUNvbmYudG9rZW4oKSlcbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5iaW5kKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuQ2xpY2ssIChlOiB0cC5Ub2tlbkV2ZW50KSA9PiB7XG4gICAgICAgICAgICBjb25zdCB0b2tUb2dnbGUgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy51aUNvbmYudG9nZ2xlVG9rZW4oZSlcbiAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVUb2tlblNlbC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B4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IGRpdk9mZnNldCA9IFstMTMsIDNdXG4gICAgICAgICAgICAgICAgbGVmdCA9IGUubW91c2VbMF0gKyBlLmJhc2VYICsgZGl2T2Zmc2V0WzBdXG4gICAgICAgICAgICAgICAgdG9wID0gZS5tb3VzZVsxXSArIGUuYmFzZVkgLSAoK2hlYWRJbmZvLnN0eWxlKCdoZWlnaHQnKS5yZXBsYWNlKCdweCcsICcnKSArIGRpdk9mZnNldFsxXSlcbiAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXMgPSBcIjhweCA4cHggOHB4IDFweFwiXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGhlYWRJbmZvXG4gICAgICAgICAgICAgICAgLnN0eWxlKCd2aXNpYmlsaXR5JywgJ3Zpc2libGUnKVxuICAgICAgICAgICAgICAgIC5zdHlsZSgnbGVmdCcsIFN0cmluZyhsZWZ0KSArICdweCcpXG4gICAgICAgICAgICAgICAgLnN0eWxlKCd0b3AnLCBTdHJpbmcodG9wKSArICdweCcpXG4gICAgICAgICAgICAgICAgLnN0eWxlKCdib3JkZXItcmFkaXVzJywgYm9yZGVyUmFkaXVzKVxuICAgICAgICAgICAgICAgIC50ZXh0KGBIZWFkOiAke2UuaW5kICsgMX1gKVxuXG4gICAgICAgICAgICAvLyBEb24ndCBkbyBhbnl0aGluZyBzcGVjaWFsIG9uIHJvdyBtb3VzZSBvdmVyXG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuYmluZChBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5ib3hDbGljaywgKGU6IHsgaGVhZCB9KSA9PiB7XG4gICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnVpQ29uZi50b2dnbGVIZWFkKGUuaGVhZClcbiAgICAgICAgICAgIGlmIChyZXN1bHQgPT0gdHAuVG9nZ2xlZC5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LyBPbmx5IHVwZGF0ZSBpZiB0aGUgZm9ybSBpcyBmaWxsZWQgY29ycmVjdGx5XG4gICAgICAgICAgICBpZiAoc2VudGVuY2VfYS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbHMuYm9keS5zdHlsZShcImN1cnNvclwiLCBcInByb2dyZXNzXCIpXG4gICAgICAgICAgICAgICAgdGhpcy5hcGkuZ2V0TWV0YUF0dGVudGlvbnModGhpcy51aUNvbmYubW9kZWwoKSwgc2VudGVuY2VfYSwgdGhpcy51aUNvbmYubGF5ZXIoKSlcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKHJlc3A6IHJzcC5BdHRlbnRpb25EZXRhaWxzUmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHIgPSByZXNwLnBheWxvYWRcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudWlDb25mLnNlbnRlbmNlKHNlbnRlbmNlX2EpXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVpQ29uZi5ybVRva2VuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dENhcHN1bGUudXBkYXRlRnJvbU5vcm1hbChyLCB0aGlzLnVpQ29uZi5oaWRlQ2xzU2VwKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tDYXBzdWxlLnVwZGF0ZUZyb21SZXNwb25zZShyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3RvZ2dsZVRva2VuU2VsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJkZWZhdWx0XCIpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBvbkVudGVyID0gUi5j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ZXJzKSlcbiAgICAgICAgICAgIC5qb2luKFwibGFiZWxcIilcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgXCJidG4gYnV0dG9uIGxheWVyQ2hlY2tib3hcIilcbiAgICAgICAgICAgIC5jbGFzc2VkKCdhY3RpdmUnLCAoZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIEFzc2lnbiB0byBsYXJnZXN0IGxheWVyIGF2YWlsYWJsZSBpZiB1aUNvbmYubGF5ZXIoKSA+IG5ldyBuTGF5ZXJzXG4gICAgICAgICAgICAgICAgaWYgKGQgPT0gc2VsZi51aUNvbmYubGF5ZXIoKSkgeyAvLyBKYXZhc2NyaXB0IGlzIDAgaW5kZXhlZCFcbiAgICAgICAgICAgICAgICAgICAgaGFzQWN0aXZlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIWhhc0FjdGl2ZSAmJiBkID09IG5MYXllcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi51aUNvbmYubGF5ZXIoZClcbiAgICAgICAgICAgICAgICAgICAgaGFzQWN0aXZlID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZVxuXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLnRleHQoKGQpID0+IGQgKyAxKVxuICAgICAgICAgICAgLmFwcGVuZChcImlucHV0XCIpXG4gICAgICAgICAgICAuYXR0cihcInR5cGVcIiwgXCJyYWRpb1wiKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImNoZWNrYm94LWlubGluZVwiKVxuICAgICAgICAgICAgLmF0dHIoXCJuYW1lXCIsIFwibGF5ZXJib3hcIilcbiAgICAgICAgICAgIC8vIC5hdHRyKFwiaGVhZFwiLCBkID0+IGQpXG4gICAgICAgICAgICAuYXR0cihcImlkXCIsIChkLCBpKSA9PiBcImxheWVyQ2hlY2tib3hcIiArIGkpXG4gICAgICAgIC8vIC50ZXh0KChkLCBpKSA9PiBkICsgXCIgXCIpXG5cbiAgICAgICAgZnJvbUV2ZW50KGNoZWNrYm94ZXMubm9kZXMoKSwgJ2NoYW5nZScpLnBpcGUoXG4gICAgICAgICAgICB0YXAoKGU6IEV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgbXlEYXRhID0gZDMuc2VsZWN0KDxCYXNlVHlwZT5lLnRhcmdldCkuZGF0dW0oKTtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhteURhdGEsIFwiLS0tIG15RGF0YVwiKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbHMubGF5ZXJDaGVja2JveGVzLnNlbGVjdEFsbChcIi5sYXllckNoZWNrYm94XCIpXG4gICAgICAgICAgICAgICAgICAgIC5jbGFzc2VkKCdhY3RpdmUnLCBkID0+IGQgPT09IG15RGF0YSlcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgbWFwKCh2OiBFdmVudCkgPT4gK2QzLnNlbGVjdCg8QmFzZVR5cGU+di50YXJnZXQpLmRhdHVtKCkpLFxuICAgICAgICAgICAgdGFwKHYgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiTmV3IGxheWVyOiBcIiwgdik7XG4gICAgICAgICAgICAgICAgc2VsZi51aUNvbmYubGF5ZXIodik7XG4gICAgICAgICAgICAgICAgc2VsZi5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJwcm9ncmVzc1wiKTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgc3dpdGNoTWFwKCh2KSA9PiBmcm9tKHNlbGYuYXBpLnVwZGF0ZU1hc2tlZEF0dGVudGlvbnMoc2VsZi51aUNvbmYubW9kZWwoKSwgc2VsZi50b2tDYXBzdWxlLmEsIHN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NvbnN0IGtpbmRzID0gUi5tYXAoUi5wcm9wKCdraW5kJykpKGRhdGEpXG4gICAgICAgIGNvbnN0IGtpbmRtYXAgPSBSLnppcE9iaihuYW1lcywga2luZHMpXG5cbiAgICAgICAgdGhpcy5zZWxzLm1vZGVsU2VsZWN0b3Iuc2VsZWN0QWxsKCcubW9kZWwtb3B0aW9uJylcbiAgICAgICAgICAgIC5kYXRhKGRhdGEpXG4gICAgICAgICAgICAuam9pbignb3B0aW9uJylcbiAgICAgICAgICAgIC5jbGFzc2VkKCdtb2RlbC1vcHRpb24nLCB0cnVlKVxuICAgICAgICAgICAgLnByb3BlcnR5KCd2YWx1ZScsIGQgPT4gZC5uYW1lKVxuICAgICAgICAgICAgLmF0dHIoXCJtb2RlbGtpbmRcIiwgZCA9PiBkLmtpbmQpXG4gICAgICAgICAgICAudGV4dChkID0+IGQubmFtZSlcblxuICAgICAgICB0aGlzLnNlbHMubW9kZWxTZWxlY3Rvci5wcm9wZXJ0eSgndmFsdWUnLCB0aGlzLnVpQ29uZi5tb2RlbCgpKTtcblxuICAgICAgICB0aGlzLnNlbHMubW9kZWxTZWxlY3Rvci5vbignY2hhbmdlJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc3QgbWUgPSBkMy5zZWxlY3QodGhpcylcbiAgICAgICAgICAgIGNvbnN0IG1uYW1lID0gbWUucHJvcGVydHkoJ3ZhbHVlJylcbiAgICAgICAgICAgIHNlbGYudWlDb25mLm1vZGVsKG1uYW1lKTtcbiAgICAgICAgICAgIHNlbGYudWlDb25mLm1vZGVsS2luZChraW5kbWFwW21uYW1lXSk7XG4gICAgICAgICAgICBpZiAoa2luZG1hcFttbmFtZV0gPT0gdHAuTW9kZWxLaW5kLkF1dG9yZWdyZXNzaXZlKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJSRVNFVFRJTkcgTUFTSyBJTkRTXCIpO1xuICAgICAgICAgICAgICAgIHNlbGYudWlDb25mLm1hc2tJbmRz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1cIm1vZGVsLW9wdGlvbnNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9XCJ3aWR0aDoxNTBweDttYXJnaW4tYm90dG9tOiA1cHg7XCI+U2VsZWN0XG4gICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDwvbGFiZWw+PHNlbGVjdCBpZD1cIm1vZGVsLW9wdGlvbi1zZWxlY3RvclwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lPVwibW9kZWwtb3B0aW9uc1wiPlxuXG4gICAgICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgaWQ9XCJzZW50ZW5jZS1pbnB1dFwiPlxuICAgICAgICAgICAgICAgIDxmb3JtPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZm9ybS1ncm91cFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGZvcj1cImZvcm0tc2VudGVuY2UtYVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9XCJ3aWR0aDogMTUwcHg7IGRpc3BsYXk6IGlubGluZS1ibG9jazt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1wiPklucHV0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VudGVuY2U8L2xhYmVsPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IGlkPVwiZm9ybS1zZW50ZW5jZS1hXCIgdHlwZT1cInRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU9XCJzZW50LWEtaW5wdXRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiRW50ZXIgbmV3IHNlbnRlbmNlIHRvIGFuYWx5emVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPVwiVGhlIGdpcmwgcmFuIHRvIGEgbG9jYWwgcHViIHRvIGVzY2FwZSB0aGUgZGluIG9mIGhlciBjaXR5LlwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9XCJ3aWR0aDogY2FsYygxMDAlIC0gMjQwcHgpOyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7dmVydGljYWwtYWxpZ246IG1pZGRsZTtcIlxuICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ0biBidG4tcHJpbWFyeVwiIGlkPVwidXBkYXRlLXNlbnRlbmNlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPVwid2lkdGg6NzBweDtkaXNwbGF5OiBpbmxpbmUtYmxvY2s7cGFkZGluZzogM3B4IDNweDtcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBVcGRhdGVcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Zvcm0+XG4gICAgICAgICAgICAgICAgPCEtLSAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGFkZGluZ1wiPjwvZGl2Pi0tPlxuXG4gICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IHN0eWxlPVwiZGlzcGxheTogaW5saW5lLWJsb2NrOyB3aWR0aDoxNTBweDtcIj48Yj5GaWx0ZXJzPC9iPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJjbHMtdG9nZ2xlXCIgc3R5bGU9XCJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XCI+XG4gICAgICAgICAgICAgICAgICAgIDwhLS0gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbnB1dC1kZXNjcmlwdGlvblwiPi0tPlxuICAgICAgICAgICAgICAgICAgICBIaWRlIFNwZWNpYWwgVG9rZW5zXG4gICAgICAgICAgICAgICAgICAgIDwhLS0gICAgICAgICAgICAgICAgICAgIDwvZGl2Pi0tPlxuICAgICAgICAgICAgICAgICAgICA8bGFiZWwgY2xhc3M9XCJzd2l0Y2hcIiBzdHlsZT1cInZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT1cImNoZWNrYm94XCIgY2hlY2tlZD1cImNoZWNrZWRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwic2hvcnQtc2xpZGVyIHJvdW5kXCI+PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICA8L2xhYmVsPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgc3R5bGU9XCJtYXJnaW4tbGVmdDogMjVweDtkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XCI+XG4gICAgICAgICAgICAgICAgICAgIFNob3cgdG9wIDxzcGFuIGlkPVwibXktcmFuZ2UtdmFsdWVcIj43MDwvc3Bhbj4lIG9mIGF0dDpcbiAgICAgICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzbGlkZS1jb250YWluZXJcIlxuICAgICAgICAgICAgICAgICAgICAgc3R5bGU9XCJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7bWFyZ2luLWxlZnQ6IDVweDt3aWR0aDpjYWxjKDEwMCUgLSA1NTBweCk7XCI+XG4gICAgICAgICAgICAgICAgICAgIDwhLS0gICAgICAgICAgICAgICAgICAgIDxsYWJlbCBmb3I9XCJteS1yYW5nZVwiPi0tPlxuXG4gICAgICAgICAgICAgICAgICAgIDwhLS0gICAgICAgICAgICAgICAgICAgIDwvbGFiZWw+LS0+XG4gICAgICAgICAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9XCJyYW5nZVwiIG1pbj1cIjBcIiBtYXg9XCIxMDBcIiB2YWx1ZT1cIjcwXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cInNsaWRlclwiIGlkPVwibXktcmFuZ2VcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPVwidmVydGljYWwtYWxpZ246IG1pZGRsZTtkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XCI+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgPGRpdiBpZD1cImxheWVyLXNlbGVjdGlvblwiIHN0eWxlPVwibWFyZ2luLXRvcDogMTBweDtcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaW5wdXQtZGVzY3JpcHRpb25cIlxuICAgICAgICAgICAgICAgICAgICAgc3R5bGU9XCJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHdpZHRoOiAxNTBweDt2ZXJ0aWNhbC1hbGlnbjogdG9wO1wiPlxuICAgICAgICAgICAgICAgICAgICBMYXllclxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJsYXllci1zZWxlY3QgYnRuLWdyb3VwIGJ0bi1ncm91cC10b2dnbGVcIlxuICAgICAgICAgICAgICAgICAgICAgZGF0YS10b2dnbGU9XCJidXR0b25zXCIgaWQ9XCJsYXllci1zZWxlY3RcIlxuICAgICAgICAgICAgICAgICAgICAgc3R5bGU9XCJ2ZXJ0aWNhbC1hbGlnbjogdG9wO1wiPlxuXG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgPGRpdiBpZD1cInNlbGVjdGVkLWhlYWQtZGlzcGxheVwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbnB1dC1kZXNjcmlwdGlvblwiIHN0eWxlPVwiZGlzcGxheTogaW5saW5lLWJsb2NrOyB3aWR0aDogMTUwcHg7dmVydGljYWwtYWxpZ246IHRvcDtcIj5cbiAgICAgICAgICAgICAgICAgICAgU2VsZWN0ZWQgaGVhZHM6XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBpZD1cInNlbGVjdGVkLWhlYWRzXCIgc3R5bGU9XCJkaXNwbGF5OmlubGluZS1ibG9jazt2ZXJ0aWNhbC1hbGlnbjogdG9wO1wiPlxuXG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgPGRpdiBpZD1cImNvbm5lY3Rvci1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGlkPVwiY29ubmVjdG9yLWNvbnRyb2xzXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJsZWZ0LWNvbnRyb2wtaGFsZlwiPlxuXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwibGF5ZXItc2VsZWN0aW9uXCI+LS0+XG4gICAgICAgICAgICAgICAgICAgICAgICA8IS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJpbnB1dC1kZXNjcmlwdGlvblwiPi0tPlxuICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTGF5ZXI6LS0+XG4gICAgICAgICAgICAgICAgICAgICAgICA8IS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pi0tPlxuICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwibGF5ZXItc2VsZWN0IGJ0bi1ncm91cCBidG4tZ3JvdXAtdG9nZ2xlXCItLT5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLXRvZ2dsZT1cImJ1dHRvbnNcIiBpZD1cImxheWVyLXNlbGVjdFwiPi0tPlxuXG4gICAgICAgICAgICAgICAgICAgICAgICA8IS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pi0tPlxuICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pi0tPlxuXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicmlnaHQtY29udHJvbC1oYWxmIGhlYWQtY29udHJvbFwiPlxuPCEtLSAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJzZWxlY3RlZC1oZWFkLWRpc3BsYXlcIj4tLT5cbjwhLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImlucHV0LWRlc2NyaXB0aW9uXCI+LS0+XG48IS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZWxlY3RlZCBoZWFkczotLT5cbjwhLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+LS0+XG48IS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJzZWxlY3RlZC1oZWFkc1wiPi0tPlxuXG48IS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pi0tPlxuPCEtLSAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pi0tPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInNlbGVjdC1pbnB1dFwiIGlkPVwiaGVhZC1hbGwtb3Itbm9uZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gaWQ9XCJzZWxlY3QtYWxsLWhlYWRzXCI+U2VsZWN0IGFsbCBoZWFkc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gaWQ9XCJzZWxlY3Qtbm8taGVhZHNcIj5VbnNlbGVjdCBhbGwgaGVhZHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInVzYWdlLWluZm9cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWW91IGZvY3VzIG9uIG9uZSB0b2tlbiBieSA8Yj5jbGljazwvYj4uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFlvdSBjYW4gbWFzayBhbnkgdG9rZW4gYnkgPGI+ZG91YmxlIGNsaWNrPC9iPi5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3A+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFlvdSBjYW4gc2VsZWN0IGFuZCBkZS1zZWxlY3QgYSBoZWFkIGJ5IGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGI+Y2xpY2s8L2I+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uIHRoZSBoZWF0bWFwIGNvbHVtbnNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3A+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBpZD1cImF0bi1jb250YWluZXJc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