From d27fb58d6acdbd3145516c0b74b6f5464d95839d Mon Sep 17 00:00:00 2001 From: Yinan Zhou Date: Mon, 19 Jun 2023 16:25:09 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B1=20Add=20sorting=20by=20name=20opti?= =?UTF-8?q?on=20for=20files=20and=20folios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Neon-gh/dashboard.js | 4 ++-- Neon-gh/editor.js | 4 ++-- css/dashboard.css | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Neon-gh/dashboard.js b/Neon-gh/dashboard.js index 96430a22b..174fbf407 100644 --- a/Neon-gh/dashboard.js +++ b/Neon-gh/dashboard.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}([function(e,t,n){"use strict";var i,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,r,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,i){var r,o,s,a;if(l(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=u(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=f.bind(i);return r.listener=n,i.wrapFn=r,r}function p(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=g(c,l);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var i,r,o,s=[n(37),n(38),n(39),n(40),n(41),n(42)],a=-1,c=[],l=!1;function u(){i&&r&&(i=!1,r.length?c=r.concat(c):a=-1,c.length&&d())}function d(){if(!i){l=!1,i=!0;for(var e=c.length,t=setTimeout(u);e;){for(r=c,c=[];r&&++a1)for(var n=1;ne.classList.remove("no-moving")),document.querySelectorAll(".selected").forEach(e=>{e.classList.remove("selected"),e.classList.contains("staff")?(e.removeAttribute("style"),i.unhighlight(e)):(e.removeAttribute("style"),e.style.fill=""),Array.from(e.querySelectorAll(".divLine")).forEach(e=>{e.style.stroke="",e.setAttribute("stroke-width","30px")}),Array.from(e.querySelectorAll(".neume")).forEach(e=>{e.style.fill=""}),Array.from(e.querySelectorAll(".sylTextRect-display")).forEach(e=>{e.style.fill="blue"}),e.parentElement.classList.contains("syllable-highlighted")&&(e.parentElement.style.fill="",e.parentElement.classList.add("syllable"),e.parentElement.classList.remove("syllable-highlighted"),Array.from(e.parentElement.querySelectorAll(".divLine")).forEach(e=>{e.style.stroke="",e.setAttribute("stroke-width","30px")}),Array.from(e.parentElement.querySelectorAll(".neume")).forEach(e=>{e.style.fill=""})),c.selectAll("#resizeRect").remove(),c.selectAll(".resizePoint").remove(),c.selectAll(".rotatePoint").remove()}),Array.from(document.querySelectorAll(".text-select")).forEach(e=>{e.style.color="",e.style.fontWeight="",e.classList.remove("text-select")}),document.getElementById("selByStaff").classList.contains("is-active")?a.endOptionsSelection():o.endGroupingSelection(),document.getElementById("extraEdit").innerHTML="",document.getElementById("extraEdit").parentElement.classList.add("hidden"),(0,r.updateHighlight)()}function d(e,t){e.classList.contains("selected")||(e.classList.add("selected"),i.unhighlight(e),i.highlight(e,"#d00"),a.triggerSplitActions(),o.initGroupingListeners(),t.dragInit())}function f(e,t){e.classList.contains("selected")||(e.classList.add("selected"),i.unhighlight(e),i.highlight(e,"#d00"),t.dragInit())}function h(e,t,n=!0){if(e){if(e.classList.contains("staff"))return d(e,t);if(e.classList.contains("layer"))return f(e,t);if(!e.classList.contains("selected")&&!e.classList.contains("sylTextRect")&&!e.classList.contains("sylTextRect-display")){let t;if(e.classList.add("selected"),e.style.fill="#d00",e.style.stroke=e.classList.contains("divLine")?"#d00":"black",e.querySelectorAll(".sylTextRect-display").length&&e.querySelectorAll(".sylTextRect-display").forEach(e=>{e.style.fill="#d00"}),e.querySelectorAll(".divLine").length&&e.querySelectorAll(".divLine").forEach(e=>{e.style.stroke="#d00"}),e.classList.contains("syllable")&&e.querySelectorAll(".neume").forEach(e=>{e.style.fill="#d00"}),e.classList.contains("syllable")?t=e.id:null!==e.closest(".syllable")&&(t=e.closest(".syllable").id),void 0!==t){document.querySelectorAll("span."+t).forEach(e=>{e.style.color="#d00",e.style.fontWeight="bold",e.classList.add("text-select")})}}n&&(0,r.updateHighlight)()}}async function p(e,t){const n=await t.getElementAttr(e.id,t.view.getCurrentPageURI());return Boolean(n.ligated)}function m(e,t){if(t.length<2)return!1;switch(e){case"selBySyllable":t.forEach(e=>{if(!e.classList.contains("syllable"))return!1});break;case"selByNeume":t.forEach(e=>{if(!e.classList.contains("neume"))return!1});break;case"selByStaff":t.forEach(e=>{if(!e.classList.contains("staff"))return!1});break;default:return!1}return!0}function g(e){const t=Array.from(e),n=t.pop().parentElement.parentElement;for(const e of t){if(e.parentElement.parentElement.id!==n.id)return!1}return!0}function v(e,t,n){const i=e,r=i.closest(".syl");if(!r.classList.contains("selected")){r.classList.add("selected"),i.style.fill="#d00";const o=e.closest(".syllable");o.style.fill="#d00",o.classList.add("syllable-highlighted"),o.querySelectorAll(".divLine").length&&(o.querySelectorAll(".neume").forEach(e=>{e.style.fill="#d00"}),o.querySelectorAll(".divLine").forEach(e=>{e.style.stroke="#d00"})),void 0!==n&&(0,s.resize)(r,n,t),void 0!==t&&t.dragInit();const a=e.closest(".syllable").id;if(void 0!==a){const e=document.querySelector("span."+a);e&&(e.style.color="#d00",e.style.fontWeight="bold",e.classList.add("text-select"))}}}t.getSelectionType=l,t.unselect=u,t.selectStaff=d,t.selectLayerElement=f,t.select=h,t.selectNcs=async function(e,t,n){if(!e.parentElement.classList.contains("selected")){const i=e.parentElement;if(u(),h(i),await p(i,t)){const e=i.previousSibling;if(await p(e,t))h(e);else{const e=i.nextSibling;await p(e,t)?h(e):console.warn("Error: Neither prev or next nc are ligatures")}o.triggerGrouping("ligature")}else i.classList.contains("nc")?a.triggerNcActions(i):console.warn("No action triggered!");n.dragInit()}},t.isLigature=p,t.areAdjacent=function(e,t){if(t.length<2)return!1;let n;switch(e){case"selBySyllable":n=Array.from(document.querySelectorAll(".syllable"));break;case"selByNeume":return!0;case"selByNc":n=Array.from(document.querySelectorAll(".nc"));break;case"selByStaff":n=Array.from(document.querySelectorAll(".staff"));break;default:return!1}const i=[];for(let e=0;e!(e.classList.contains("divLine")||e.classList.contains("accid")||e.classList.contains("clef")))))return!1;switch(e){case"selBySyllable":const e=t[0].closest(".staff");for(let n=0;n{const s=e.getAttribute("d").match(/\d+/g).map(e=>Number(e));void 0===o&&(o=Math.atan((s[3]-s[1])/(s[2]-s[0]))),(void 0===n||Math.min(s[1],s[3])r)&&(r=Math.max(s[1],s[3])),(void 0===i||s[2]>i)&&(i=s[2])}),{id:e.id,ulx:t,uly:n,lrx:i,lry:r,rotate:o}},t.selectBBox=v,t.selectNn=function(e){return!(e.length>0)||(e.forEach(e=>{h(e)}),!1)},t.selectAll=async function(e,t,n){const i=l();if(u(),0===e.length)return;let r,c=!1,d=!1;switch(i){case"selBySyllable":r=".syllable";break;case"selByNeume":r=".neume";break;case"selByNc":r=".nc";break;case"selByStaff":r=".staff";break;case"selByBBox":r=".sylTextRect-display";break;case"selByLayerElement":r=".clef, .custos, .accid, .divLine";break;default:return void console.error("Unknown selection type "+i)}const f=new Set;for(const t of e){let e=t.closest(r);if(null===e){if(e=t.closest(".clef, .custos, .accid, .divLine"),null===e){console.warn("Element "+t.id+" is not part of specified group and is not a clef or custos or accid or divLine.");continue}c=c||!0}else d=d||!0;f.add(e);const n=e.getAttribute("mei:follows");n&&(document.querySelector("#"+n.slice(1)).classList.add("no-moving"),f.add(document.querySelector("#"+n.slice(1))));const i=e.getAttribute("mei:precedes");i&&(document.querySelector("#"+i.slice(1)).classList.add("no-moving"),f.add(document.querySelector("#"+i.slice(1))))}f.forEach(e=>h(e,n,!1));const p=Array.from(f.values());if(!c||d)switch(i){case"selByStaff":switch(p.length){case 1:a.triggerSplitActions(),o.initGroupingListeners(),(0,s.resize)(p[0],t,n);break;default:a.triggerStaffActions(),o.initGroupingListeners()}break;case"selByLayerElement":1===f.size?a.triggerLayerElementActions(p[0]):a.triggerDefaultActions();break;case"selBySyllable":switch(p.length){case 1:a.triggerSyllableActions("singleSelect");break;case 2:o.isLinkable("selBySyllable",p)?a.triggerSyllableActions("linkableSelect"):o.isGroupable("selBySyllable",p)?a.triggerSyllableActions("multiSelect"):a.triggerSyllableActions("default");break;default:o.isGroupable("selBySyllable",p)?a.triggerSyllableActions("multiSelect"):a.triggerSyllableActions("default")}break;case"selByNeume":switch(p.length){case 1:a.triggerNeumeActions(),o.initGroupingListeners();break;default:o.isGroupable("selByNeume",p)?o.triggerGrouping("neume"):a.triggerDefaultActions()}break;case"selByNc":switch(p.length){case 1:a.triggerNcActions(p[0]);break;case 2:if(g(p)){if(p[0].parentElement===p[1].parentElement){const e=Array.from(p[0].parentElement.children);if(1===Math.abs(e.indexOf(p[0])-e.indexOf(p[1]))){let e=p[0].children[0],t=p[1].children[0],n=e.x.baseVal.value,i=t.x.baseVal.value,r=e.y.baseVal.value,s=t.y.baseVal.value;if((n>i||n===i&&rv(e,n,void 0))}break;default:console.error("Unknown selection type. This should not have occurred.")}else 1===f.size?a.triggerLayerElementActions(p[0]):"selBySyllable"==i?a.triggerDefaultSylActions():a.triggerDefaultActions()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queueNotification=t.Notification=void 0;const i=n(27),r=n(23),o=new Array(0);let s=null,a=!1;const c={default:"",warning:"⚠️ ",error:"🔴 ",success:"✅ "};class l{constructor(e,t){this.message=c[t]+e,this.displayed=!1,this.id=(0,r.uuidv4)(),this.isModeMessage=-1!==e.search("Mode"),this.timeoutID=-1,this.type=t}setTimeoutId(e){this.timeoutID=Math.max(e,-1)}display(){this.displayed=!0}getId(){return this.id}}function u(e){document.getElementById(e).remove(),null!==s&&s.getId()===e&&(s=null),o.length>0?d():0===document.querySelectorAll(".neon-notification").length&&(document.getElementById("notification-content").style.display="none",a=!1)}function d(){if(o.length>0){a=!0;const e=o.pop();!function(e){if(e.isModeMessage){if(null!==s)return window.clearTimeout(s.timeoutID),o.push(e),void u(s.getId());s=e}const t=document.getElementById("notification-content"),n=document.createElement("div");n.classList.add("neon-notification"),n.classList.add("neon-notification-"+e.type),n.id=e.getId(),n.innerHTML=e.message,t.append(n),t.style.display="",e.display()}(e),e.setTimeoutId(window.setTimeout(u,5e3,e.getId())),document.getElementById(e.getId()).addEventListener("click",()=>{window.clearTimeout(e.timeoutID),u(e.getId())})}}function f(e,t="default"){const n=new l(e,t);o.push(n),"error"!=n.type&&"warning"!=n.type||(0,i.recordNotification)(n),(!a||document.getElementById("notification-content").querySelectorAll(".neon-notification").length<3)&&d()}t.Notification=l,t.queueNotification=f,t.default={queueNotification:f}},function(e,t,n){"use strict";e.exports=function(e){return function(){var t=arguments.length;if(t){for(var n=[],i=-1;++i\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

',groupingTab:'

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

',systemTab:'

\n \n

\n

Click upper left and lower right corners of new staff.

'},t.insertControlsPanel='
\n
INSERT
\n \n \n \n
\n\t
\n \n
',t.editControlsPanel='
\n
EDIT
\n \n \n \n
\n
\n
\n
\n
Selection Mode:
\n
\n \n \n \n \n \n \n \n
\n
\n
\n\n
\n \n \n \x3c!--\n * The extraEdit panel is added for edit options that have dropdown menus\n * Like the Neume and Clef menus\n * This is done because the moreEdit menu needs to have overflow for cases where it has lots of buttons\n * But overflow ruins dropdown menus\n --\x3e\n \n
\n
\n
\n
\n
',t.ncActionContents='\n ',t.defaultNeumeActionContents='
\n \n \n
',t.neumeActionContents='\n
\n \n ',t.staffActionContents='\n \n ',t.defaultActionContents='
\n \n
',t.defaultSylActionContents='\n ',t.custosActionContents='
\n \n \n
',t.layerElementOutActionContents='
\n \n \n \n
',t.layerElementInActionContents='
\n \n \n \n
',t.accidActionContents='\n ',t.splitActionContents='
Split System:
\n
\n \n \n \n
',t.clefActionContents='\n
\n \n \n
\n ',t.divLineActionContents='\n',t.groupingMenu={nc:'
\n
\n \n \n
\n
',neume:'
\n
\n \n \n
\n
',syl:'
\n
\n \n \n \n
\n\t\t
',ligatureNc:'
\n
\n \n \n \n
\n
',ligature:'
\n
\n \n \n
\n
',splitSyllable:'
\n
\n \n \n
\n
'},t.editTextModal='
\n \n \n
\n
Cancel
\n
Save
\n
\n
',t.hotkeysModal='\n
\n \x3c!-- "Display" hotkeys --\x3e\n
\n
Display
\n
\n
\n
Shift
\n
+
\n
+
\n
\n
Zoom In
\n
\n
\n
\n
Shift
\n
+
\n
-
\n
\n
Zoom Out
\n
\n
\n
\n
0
\n
\n
Zoom Reset
\n
\n
\n
\n
h
\n
\n
Hide Glyph
\n
\n
\n\n \x3c!-- "Edit" hotkeys --\x3e\n
\n
Edit
\n
\n
\n
Ctrl
\n
+
\n
z
\n
or
\n
\n
+
\n
z
\n
\n
Undo
\n
\n
\n
\n
Ctrl
\n
+
\n
Shift
\n
+
\n
z
\n
or
\n
\n
+
\n
Shift
\n
+
\n
z
\n
\n
Redo
\n
\n
\n
\n
q/w/e/r/t/y
\n
\n
\n Highlight by Staff/Syllable/Neume/LayerElement/Selection/Off\n
\n
\n
\n
\n
1/2/3/4
\n
\n
\n Select by Syllable/Neume/Neume Component/Staff\n
\n
\n
\n
\n
Shift
\n
+
\n
Number
\n
\n
\n Begin Insert for the nth option in the selected tab\n
\n
\n
\n\n \x3c!-- "Other" hotkeys --\x3e\n
\n
Other
\n
\n
\n
s
\n
\n
Save File
\n
\n
\n
\n
Esc
\n
\n
Return to Edit Mode
\n
\n
\n
',t.syllableActionsContent='\n
\n \n \n \n \n
\n',t.errorLogsPanelContents='
\n
Error Log
\n \n \n \n
\n
'},function(e,t){e.exports=d3},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";for(var i=n(11),r=[],o=0;o<256;++o)r.push((o+256).toString(16).substr(1));t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase();if(!Object(i.a)(n))throw TypeError("Stringified UUID is invalid");return n}},function(e,t,n){"use strict";var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t.a=function(e){return"string"==typeof e&&i.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGlyphBBox=t.isOutOfSVGBounds=t.getStaffByCoords=t.getStaffIdByCoords=t.getSVGRelCoords=void 0;const i=n(3);function r(e,t){const n=new DOMPoint(e,t),i=document.querySelector(".active-page > .definition-scale").querySelector(".system"),{x:r,y:o}=n.matrixTransform(i.getScreenCTM().inverse());return{x:r,y:o}}function o(e,t){const n=Array.from(document.querySelectorAll(".staff")).map(e=>(0,i.getStaffBBox)(e)),{x:o,y:s}=r(e,t),a=n.find(e=>o<=e.lrx&&o>=e.ulx&&s<=e.lry&&s>=e.uly);return a?a.id:null}t.getSVGRelCoords=r,t.getStaffIdByCoords=o,t.getStaffByCoords=function(e,t){const n=o(e,t);return document.querySelector("#"+n)},t.isOutOfSVGBounds=function(e,t){const n=document.querySelector("#bgimg");return e<=0||e>=Number(n.getAttribute("width"))||t<=0||t>=Number(n.getAttribute("height"))},t.getGlyphBBox=function(e){const t="rect"==e.tagName?e.getBBox():e.parentNode.getBBox();return{ulx:t.x,uly:t.y,lrx:t.x+t.width,lry:t.y+t.height}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerDefaultActions=t.triggerDefaultSylActions=t.triggerSplitActions=t.triggerStaffSplitMode=t.triggerStaffActions=t.triggerLayerElementActions=t.triggerSyllableActions=t.triggerNeumeActions=t.triggerNcActions=t.addChangeStaffListener=t.moveOutsideSyllableHandler=t.insertToSyllableHandler=t.changeStaffHandler=t.removeHandler=t.endOptionsSelection=t.deleteButtonHandler=t.unsetLiquescentAnticlockwiseAction=t.unsetLiquescentClockwiseAction=t.unsetVirgaReversedAction=t.unsetVirgaAction=t.unsetInclinatumAction=t.initNeonView=void 0;const i=n(7),r=n(24),o=n(4),s=n(35),a=n(36),c=n(3);let l;function u(e){return{action:"set",param:{elementId:e,attrType:"tilt",attrValue:""}}}function d(e){return{action:"set",param:{elementId:e,attrType:"tilt",attrValue:""}}}function f(e){return{action:"set",param:{elementId:e,attrType:"tilt",attrValue:""}}}function h(e){return{action:"set",param:{elementId:e,attrType:"curve",attrValue:""}}}function p(e){return{action:"set",param:{elementId:e,attrType:"curve",attrValue:""}}}function m(e){"d"!==e.key&&"Backspace"!==e.key||(v(),e.preventDefault())}function g(){const e=document.getElementById("moreEdit"),t=document.getElementById("extraEdit");e&&(e.innerHTML="",e.parentElement.classList.add("hidden")),t&&(t.innerHTML="",t.parentElement.classList.add("hidden")),document.body.removeEventListener("keydown",m)}function v(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{t.classList.contains("syl")&&(t=t.closest(".syllable")),t.classList.contains("accid")&&(t=t.closest(".accid")),t.classList.contains("divLine")&&(t=t.closest(".divLine")),e.push({action:"remove",param:{elementId:t.id}})});const t={action:"chain",param:e};g(),l.edit(t,l.view.getCurrentPageURI()).then(()=>{l.updateForCurrentPage()})}function y(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push({action:"changeStaff",param:{elementId:t.id}})});const t={action:"chain",param:e};g(),l.edit(t,l.view.getCurrentPageURI()).then(()=>{l.updateForCurrentPage()})}function b(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push({action:"insertToSyllable",param:{elementId:t.id}})});const t={action:"chain",param:e};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Insert Success","success"):o.default.queueNotification("Insert Failed XoX","error"),g(),l.updateForCurrentPage()})}function _(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push({action:"moveOutsideSyllable",param:{elementId:t.id}})});const t={action:"chain",param:e};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Move Success","success"):o.default.queueNotification("Move Failed XoX","error"),g(),l.updateForCurrentPage()})}function w(){const e=document.getElementById("delete");e&&(e.removeEventListener("click",v),e.addEventListener("click",v),document.body.addEventListener("keydown",m))}function k(){const e=document.getElementById("changeStaff");null==e||e.removeEventListener("click",y),null==e||e.addEventListener("click",y)}function S(e,t,n=!0){const i=document.getElementById(e);i&&(i.parentElement.classList.remove("hidden"),n?i.innerHTML=t:i.innerHTML+=t)}function E(e){l.edit(e,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}function L(){const e=document.querySelector(".staff.selected");if(null!==e){new s.SplitStaffHandler(l,e).startSplit(),g()}else console.error("No staff was selected!"),g()}function A(){document.querySelectorAll(".drop_select").forEach(e=>{const t=()=>{document.body.removeEventListener("click",t),e.classList.remove("is-active")};e.addEventListener("click",n=>{e.classList.toggle("is-active"),Array.from(document.querySelectorAll(".drop_select")).filter(t=>t!==e).forEach(e=>e.classList.remove("is-active")),n.stopPropagation(),e.classList.contains("is-active")?document.body.addEventListener("click",t):document.body.removeEventListener("click",t)})})}t.initNeonView=function(e){l=e,r.initNeonView(e)},t.unsetInclinatumAction=u,t.unsetVirgaAction=d,t.unsetVirgaReversedAction=f,t.unsetLiquescentClockwiseAction=h,t.unsetLiquescentAnticlockwiseAction=p,t.deleteButtonHandler=m,t.endOptionsSelection=g,t.removeHandler=v,t.changeStaffHandler=y,t.insertToSyllableHandler=b,t.moveOutsideSyllableHandler=_,t.addChangeStaffListener=k,t.triggerNcActions=function(e){g(),S("moreEdit",i.defaultActionContents),S("extraEdit",i.ncActionContents),w(),document.querySelector("#Punctum.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=f(e.id),r=h(e.id),s=p(e.id);l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#Inclinatum.dropdown-item").addEventListener("click",()=>{const t=d(e.id),n=f(e.id),i=h(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"tilt",attrValue:"se"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#Virga.dropdown-item").addEventListener("click",()=>{const t=f(e.id),n=u(e.id),i=h(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"tilt",attrValue:"s"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#VirgaReversed.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=h(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"tilt",attrValue:"n"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#LiquescentClockwise.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=f(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"curve",attrValue:"c"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#LiquescentAnticlockwise.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=f(e.id),r=h(e.id),s={action:"set",param:{elementId:e.id,attrType:"curve",attrValue:"a"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),A()},t.triggerNeumeActions=function(){g(),S("moreEdit",i.defaultNeumeActionContents),S("extraEdit",i.neumeActionContents),w();const e=document.querySelectorAll(".selected");function t(t){const n={action:"changeGroup",param:{elementId:e[0].id,contour:t}};l.edit(n,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Grouping Changed","success"):o.default.queueNotification("Grouping Failed","error"),g(),l.updateForCurrentPage()})}1===e.length?(document.getElementById("split-neume").addEventListener("click",()=>{const e=document.querySelector(".neume.selected");if(null!==e){new a.SplitNeumeHandler(l,e).startSplit(),g()}else console.error("No staff was selected!"),g()}),document.querySelector("#Pes.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#PesSubpunctis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Clivis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Scandicus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#ScandicusFlexus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#ScandicusSubpunctis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Climacus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#ClimacusResupinus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Torculus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#TorculusResupinus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Porrectus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#PorrectusFlexus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#PorrectusSubpunctis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Pressus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),A()):console.warn("More than one neume selected! Cannot trigger Neume ClickSelect actions.")},t.triggerSyllableActions=function(e){g(),S("moreEdit",i.syllableActionsContent);let t="";switch(e){case"singleSelect":t+='
\n \n \n \n
';break;case"linkableSelect":t+='
\n \n \n \n
';break;case"multiSelect":t+='
\n \n \n \n
';break;case"default":t+='
\n \n \n
'}S("moreEdit",t,!0),k(),w(),r.initGroupingListeners()},t.triggerLayerElementActions=function(e){var t,n,r,s;if(g(),e.classList.contains("custos"))return S("moreEdit",i.custosActionContents),k(),void w();S("moreEdit",e.parentElement.classList.contains("syllable")?i.layerElementInActionContents:i.layerElementOutActionContents,!1),e.classList.contains("accid")?(S("extraEdit",i.accidActionContents),function(e){document.querySelector("#ChangeToFlat.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"accid",attrValue:"f"}})}),document.querySelector("#ChangeToNatural.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"accid",attrValue:"n"}})}),A()}(e)):e.classList.contains("clef")?(S("extraEdit",i.clefActionContents),function(e){document.querySelector("#increment-octave").addEventListener("click",()=>{const t={action:"displaceClefOctave",param:{elementId:e.id,direction:"above"}};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Clef octave incremented.","success"):o.default.queueNotification("Maximum octave displacement reached. Clef can only be displaced up to 3 octaves.","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#decrement-octave").addEventListener("click",()=>{const t={action:"displaceClefOctave",param:{elementId:e.id,direction:"below"}};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Clef octave decremented.","success"):o.default.queueNotification("Maximum octave displacement reached. Clef can only be displaced up to 3 octaves.","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#CClef.dropdown-item").addEventListener("click",()=>{E({action:"setClef",param:{elementId:e.id,shape:"C"}})}),document.querySelector("#FClef.dropdown-item").addEventListener("click",()=>{E({action:"setClef",param:{elementId:e.id,shape:"F"}})}),A()}(e)):e.classList.contains("divLine")&&(S("extraEdit",i.divLineActionContents),function(e){document.querySelector("#ChangeToMinima.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"minima"}})}),document.querySelector("#ChangeToMaior.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"maior"}})}),document.querySelector("#ChangeToMaxima.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"maxima"}})}),document.querySelector("#ChangeToFinalis.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"finalis"}})}),document.querySelector("#ChangeToCaesura.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"caesura"}})}),document.querySelector("#ChangeToVirgula.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"virgula"}})}),A()}(e)),k(),null===(t=document.getElementById("insertToSyllable"))||void 0===t||t.addEventListener("click",b),null===(n=document.getElementById("moveOutsideSyllable"))||void 0===n||n.addEventListener("click",_),w(),k(),null===(r=document.getElementById("insertToSyllable"))||void 0===r||r.addEventListener("click",b),null===(s=document.getElementById("moveOutsideSyllable"))||void 0===s||s.addEventListener("click",_)},t.triggerStaffActions=function(){g(),S("moreEdit",i.staffActionContents),w(),document.getElementById("merge-systems").addEventListener("click",()=>{r.mergeStaves()})},t.triggerStaffSplitMode=L,t.triggerSplitActions=function(){g(),S("moreEdit",i.splitActionContents),w(),document.getElementById("split-system").addEventListener("click",()=>{L()}),document.getElementById("reset-rotate").addEventListener("click",()=>{const e=document.querySelector(".staff.selected"),t=(0,c.getStaffBBox)(e),n=Math.tan(t.rotate)*(t.lrx-t.ulx);if(null!==e){const i={action:"resizeRotate",param:{elementId:e.id,ulx:t.ulx,uly:t.rotate>0?t.uly+n/2:t.uly-n/2,lrx:t.lrx,lry:t.rotate>0?t.lry-n/2:t.lry+n/2,rotate:0}};l.edit(i,l.view.getCurrentPageURI()).then(async e=>{e&&await l.updateForCurrentPage()}),g()}else console.error("No staff was selected"),g()})},t.triggerDefaultSylActions=function(){g(),S("moreEdit",i.defaultSylActionContents),w(),k()},t.triggerDefaultActions=function(){g(),S("moreEdit",i.defaultActionContents),w()}},function(e,t,n){e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],i=e[1],r=e[2],o=e[3];i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[0]-680876936|0)<<7|n>>>25)+i|0)&i|~n&r)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&i)+t[2]+606105819|0)<<17|r>>>15)+o|0)&o|~r&n)+t[3]-1044525330|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[4]-176418897|0)<<7|n>>>25)+i|0)&i|~n&r)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&i)+t[6]-1473231341|0)<<17|r>>>15)+o|0)&o|~r&n)+t[7]-45705983|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[8]+1770035416|0)<<7|n>>>25)+i|0)&i|~n&r)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&i)+t[10]-42063|0)<<17|r>>>15)+o|0)&o|~r&n)+t[11]-1990404162|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[12]+1804603682|0)<<7|n>>>25)+i|0)&i|~n&r)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&i)+t[14]-1502002290|0)<<17|r>>>15)+o|0)&o|~r&n)+t[15]+1236535329|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[1]-165796510|0)<<5|n>>>27)+i|0)&r|i&~r)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&i|n&~i)+t[11]+643717713|0)<<14|r>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[5]-701558691|0)<<5|n>>>27)+i|0)&r|i&~r)+t[10]+38016083|0)<<9|o>>>23)+n|0)&i|n&~i)+t[15]-660478335|0)<<14|r>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[9]+568446438|0)<<5|n>>>27)+i|0)&r|i&~r)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&i|n&~i)+t[3]-187363961|0)<<14|r>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[13]-1444681467|0)<<5|n>>>27)+i|0)&r|i&~r)+t[2]-51403784|0)<<9|o>>>23)+n|0)&i|n&~i)+t[7]+1735328473|0)<<14|r>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[5]-378558|0)<<4|n>>>28)+i|0)^i^r)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^i)+t[11]+1839030562|0)<<16|r>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[1]-1530992060|0)<<4|n>>>28)+i|0)^i^r)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^i)+t[7]-155497632|0)<<16|r>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[13]+681279174|0)<<4|n>>>28)+i|0)^i^r)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^i)+t[3]-722521979|0)<<16|r>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[9]-640364487|0)<<4|n>>>28)+i|0)^i^r)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^i)+t[15]+530742520|0)<<16|r>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|i>>>9)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[0]-198630844|0)<<6|n>>>26)+i|0)|~r))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[14]-1416354905|0)<<15|r>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[12]+1700485571|0)<<6|n>>>26)+i|0)|~r))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[10]-1051523|0)<<15|r>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[8]+1873313359|0)<<6|n>>>26)+i|0)|~r))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[6]-1560198380|0)<<15|r>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[4]-145523070|0)<<6|n>>>26)+i|0)|~r))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[2]+718787259|0)<<15|r>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|i>>>11)+r|0,e[0]=n+e[0]|0,e[1]=i+e[1]|0,e[2]=r+e[2]|0,e[3]=o+e[3]|0}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,r,o,s,a,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.substring(t-64,t)));for(r=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}function s(e){var n,i="";for(n=0;n<4;n+=1)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}function a(e){var t;for(t=0;tu?new ArrayBuffer(0):(r=u-l,o=new ArrayBuffer(r),s=new Uint8Array(o),a=new Uint8Array(this,l,r),s.set(a),o)}}(),u.prototype.append=function(e){return this.appendBinary(c(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,r=this._buff.length;for(t=64;t<=r;t+=64)n(this._hash,i(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,i=this._buff,r=i.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=i.charCodeAt(t)<<(t%4<<3);return this._finish(o,r),n=a(this._hash),e&&(n=l(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var i,r,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;i=(i=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(i[2],16),o=parseInt(i[1],16)||0,e[14]=r,e[15]=o,n(this._hash,e)},u.hash=function(e,t){return u.hashBinary(c(e),t)},u.hashBinary=function(e,t){var n=a(o(e));return t?l(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,i,o,s,a,c=(i=this._buff.buffer,o=e,s=!0,(a=new Uint8Array(i.byteLength+o.byteLength)).set(new Uint8Array(i)),a.set(new Uint8Array(o),i.byteLength),s?a:a.buffer),l=c.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)n(this._hash,r(c.subarray(t-64,t)));return this._buff=t-64>2]|=i[t]<<(t%4<<3);return this._finish(o,r),n=a(this._hash),e&&(n=l(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e,t=u.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,i=e.length,r=new ArrayBuffer(i),o=new Uint8Array(r);for(n=0;n>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}(new Uint8Array(e)));return t?l(i):i},u}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setGroupingHighlight=t.setStaffHighlight=t.highlight=t.unsetGroupingHighlight=t.unsetStaffHighlight=t.unhighlight=void 0;const i=["rgb(230, 159, 0)","rgb(86, 180, 233)","rgb(0, 158, 115)","rgb(240, 228, 66)","rgb(0, 114, 178)","rgb(213, 94, 0)","rgb(204, 121, 167)"];function r(e){let t;t=e?e.querySelectorAll(":not(.selected) .highlighted"):document.querySelectorAll(":not(.selected) .highlighted"),t.forEach(e=>{if("path"!==e.tagName||e.closest(".staff").classList.contains("selected"))if(e.classList.contains("divLine")&&!e.closest(".staff").classList.contains("selected"))e.setAttribute("stroke","#000000");else{e.removeAttribute("fill");let t=e.querySelectorAll(".sylTextRect-display");if(!t.length)try{t=e.closest(".syllable").querySelectorAll(".sylTextRect-display")}catch(e){t=[]}t.forEach((function(e){e.closest(".syllable").classList.contains("selected")||e.closest(".staff").classList.contains("selected")||e.closest(".syl").classList.contains("selected")?e.style.fill="#d00":e.style.fill="blue",e.classList.remove("highlighted")}))}else e.setAttribute("stroke","#000000");e.classList.remove("highlighted")})}function o(){r()}function s(){o();Array.from(document.getElementsByClassName("highlighted")).filter(e=>!e.parentElement.classList.contains("selected")).forEach(e=>{e.setAttribute("#d00",null);let t=e.querySelectorAll(".sylTextRect-display");t.length||null!==e.closest(".syllable")&&(t=e.closest(".syllable").querySelectorAll("sylTextRect-display")),t.forEach((function(e){e.closest(".syllable").classList.contains("selected")||e.closest(".syl").classList.contains("selected")?e.style.fill="#d00":e.style.fill="blue",e.classList.remove("highlighted")})),e.classList.remove("highlighted"),e.querySelectorAll("sylTextRect-display").forEach(e=>{e.classList.remove("highlighted")})}),Array.from(document.getElementsByClassName("selected")).forEach(e=>{e.setAttribute("fill","")})}function a(e,t){const n=Array.from(e.children);for(let e=0;ee.querySelectorAll(".divLine")).forEach(e=>{n.push(e)});else{if(i.classList.contains("resizePoint")||"resizeRect"===i.id||i.classList.contains("rotatePoint"))return;if(i.classList.contains("layer"))Array.from(i.children).forEach(e=>{n.push(e)});else if(document.getElementsByClassName("highlight-selected").length&&"highlight-neume"===document.getElementsByClassName("highlight-selected")[0].id&&i.classList.contains("syllable"))Array.from(i.children).filter(e=>e.classList.contains("neume")).forEach(e=>{n.push(e)});else{i.setAttribute("fill",t);let e=i.querySelectorAll(".sylTextRect-display");if(!e.length)try{e=i.closest(".syllable").querySelectorAll(".sylTextRect-display")}catch(t){e=[]}e.forEach((function(e){e.closest(".syllable").classList.contains("selected")||e.closest(".syl").classList.contains("selected")||e.closest(".staff").classList.contains("selected")||(e.style.fill=t,e.classList.add("highlighted"))}))}}i.classList.add("highlighted")}let i;i="30px",e.querySelectorAll(".nc, .custos, .clef, .accid").forEach(e=>{e.setAttribute("stroke","black"),e.setAttribute("stroke-width",i)})}function c(){const e=Array.from(document.getElementsByClassName("staff"));for(let t=0;t{e.setAttribute("stroke","black"),e.setAttribute("stroke-width","30px")});for(let e=0;e{e.classList.add("highlighted")})}const r=n[e].querySelectorAll(".divLine");if(r)for(let e=0;e img");0===Number(t.value)?(n.setAttribute("src","/Neon/Neon-gh/assets/img/show-icon.svg"),n.parentElement.setAttribute("title","Show glyph")):(n.setAttribute("src","/Neon/Neon-gh/assets/img/hide-icon.svg"),n.parentElement.setAttribute("title","Hide glyph"));try{document.querySelectorAll("."+e).forEach(e=>{e.style.opacity=(Number(t.value)/100).toString()})}catch(e){console.warn("Unable to properly set opacity to pages")}}function c(e){const t=document.querySelector("#bgOpacityOutput");(0,r.setSettings)({imageOpacity:Number(t.value)});const n=document.querySelector("#toggle-bg-opacity > img");0===Number(t.value)?(n.setAttribute("src","/Neon/Neon-gh/assets/img/show-icon.svg"),n.parentElement.setAttribute("title","Show background image")):(n.setAttribute("src","/Neon/Neon-gh/assets/img/hide-icon.svg"),n.parentElement.setAttribute("title","Hide background image"));const i=document.querySelector("."+e);i&&(i.style.opacity=String(Number(t.value)/100))}function l(e){const t=document.getElementById("highlight-"+e),n=document.getElementById("highlight-dropdown"),o=document.getElementById("highlight-type");if((0,r.setSettings)({highlightMode:e}),n.classList.remove("is-active"),document.querySelectorAll(".highlight-selected").forEach(e=>{e.classList.remove("highlight-selected")}),"none"===e)return o.textContent=" - Off",void i.unsetGroupingHighlight();t.classList.add("highlight-selected"),o.textContent=" - "+(e[0].toUpperCase()+e.slice(1)),i.setGroupingHighlight(e)}function u(e){document.getElementById("highlight-"+e).addEventListener("click",()=>{l(e)})}function d(){document.body.removeEventListener("click",d),document.getElementById("highlight-dropdown").classList.remove("is-active")}function f(){const e=document.getElementById("highlight-dropdown");document.getElementById("highlight-button").addEventListener("click",t=>{t.stopPropagation(),e.classList.toggle("is-active"),e.classList.contains("is-active")?(document.body.addEventListener("click",d),u("staff"),u("syllable"),u("neume"),u("layerElement"),u("none")):document.body.removeEventListener("click",d)})}function h(){const{highlightMode:e}=(0,r.getSettings)();l(e)}t.setZoomControls=function(e){if(void 0===e)return;const t=document.getElementById("zoomSlider"),n=document.getElementById("zoomOutput"),{zoom:i}=(0,r.getSettings)();t.value=String(i),n.value=String(i),e.zoomTo(i/100),document.getElementById("reset-zoom").addEventListener("click",()=>{n.value="100",t.value="100",e.resetZoomAndPan()}),document.querySelector("#set-zoom-easy-edit").addEventListener("click",()=>{n.value="180",t.value="180",e.zoomTo(1.8)}),t.addEventListener("mouseup",(function(){n.value=t.value,e.zoomTo(Number(n.value)/100)})),t.disabled=!1,document.body.addEventListener("keydown",i=>{const r=parseInt(n.value);if("ArrowUp"===i.key||"ArrowDown"===i.key||"ArrowRight"===i.key||"ArrowLeft"===i.key)i.preventDefault();else if("+"===i.key){const i=Math.min(r+20,parseInt(t.getAttribute("max")));e.zoomTo(i/100),n.value=String(i),t.value=String(i)}else if("_"===i.key){const i=Math.max(r-20,parseInt(t.getAttribute("min")));e.zoomTo(i/100),n.value=String(i),t.value=String(i)}else"0"===i.key&&(n.value="100",t.value="100",e.resetZoomAndPan())})},t.setGlyphOpacityFromSlider=a,t.setBgOpacityFromSlider=c,t.getHighlightType=function(){return document.getElementById("highlight-type").textContent.slice(3).toLowerCase()},t.setHighlightOption=u,t.setHighlightControls=f,t.setHighlightSelectionControls=function(){const e=document.getElementById("highlight-selection");e.addEventListener("click",()=>{document.getElementById("highlight-dropdown").classList.remove("is-active"),document.querySelectorAll(".highlight-selected").forEach(e=>{e.classList.remove("highlight-selected")}),e.classList.add("highlight-selected"),document.getElementById("highlight-type").textContent=" - Selection",i.setGroupingHighlight("selection")})},t.updateHighlight=function(){let e;try{e=document.querySelector(".highlight-selected").id}catch(t){e=""}switch(e){case"highlight-staff":i.setGroupingHighlight("staff");break;case"highlight-syllable":i.setGroupingHighlight("syllable");break;case"highlight-neume":i.setGroupingHighlight("neume");break;case"highlight-layerElement":i.setGroupingHighlight("layerElement");break;case"highlight-selection":i.setGroupingHighlight("selection");break;default:i.unsetGroupingHighlight()}},t.loadHighlightSettings=h,t.initDisplayControls=function(e,t){!function(e){const t=document.getElementById("opacitySlider"),n=document.getElementById("opacityOutput"),{glyphOpacity:i}=(0,r.getSettings)();function s(){n.value=t.value,o=Number(t.value),a(e)}o=i,t.value=String(i),n.value=String(i);const c=document.getElementById("toggle-glyph-opacity");100==i&&c.classList.add("hide-icon"),null==c||c.addEventListener("click",()=>{let i;c.classList.contains("hide-icon")?(c.classList.remove("hide-icon"),i=0):(c.classList.add("hide-icon"),i=1),document.querySelectorAll("."+e).forEach(e=>{e.style.opacity=i.toString()}),o=Number(t.value),t.value=String(100*i),n.value=String(Math.round(100*i)),(0,r.setSettings)({glyphOpacity:100*i}),s()}),t.addEventListener("input",s),t.addEventListener("change",s),t.disabled=!1}(e),function(e){const t=document.getElementById("bgOpacitySlider"),n=document.getElementById("bgOpacityOutput"),{imageOpacity:i}=(0,r.getSettings)();function o(){n.value=t.value,s=Number(t.value),c(e)}s=i,t.value=String(i),n.value=String(i);const a=document.getElementById("toggle-bg-opacity");100==i&&a.classList.add("hide-icon"),a.addEventListener("click",()=>{let i;a.classList.contains("hide-icon")?(a.classList.remove("hide-icon"),i=0):(a.classList.add("hide-icon"),i=1),document.getElementsByClassName(e)[0].style.opacity=i.toString(),s=Number(t.value),t.value=String(100*i),n.value=String(Math.round(100*i)),(0,r.setSettings)({imageOpacity:100*i}),o()}),t.addEventListener("input",o),t.addEventListener("change",o),t.disabled=!1}(t),f(),document.getElementById("burgerMenu").addEventListener("click",()=>{document.getElementById("burgerMenu").classList.toggle("is-active"),document.getElementById("navMenu").classList.toggle("is-active")}),document.body.addEventListener("keydown",e=>{if(!e.metaKey)switch(e.key){case"q":l("staff");break;case"w":l("syllable");break;case"e":l("neume");break;case"r":l("layerElement");break;case"t":l("selection");break;case"y":l("none")}}),function(){const e=document.querySelector("#display-all-btn");e.addEventListener("click",()=>{if(e.classList.contains("selected")){e.classList.remove("selected"),e.innerHTML="Display All";const t=document.querySelectorAll(".checkbox-container > .checkbox");Array.from(t).forEach(e=>{e.checked&&e.click()})}else{e.classList.add("selected"),e.innerHTML="Hide All";const t=document.querySelectorAll(".checkbox-container > .checkbox");Array.from(t).forEach(e=>{e.checked||e.click()})}})}(),h();const n=document.getElementById("displayContents"),i=document.getElementById("toggleDisplay");document.getElementById("displayHeader").addEventListener("click",e=>{e.stopPropagation(),n.classList.contains("closed")?(n.classList.remove("closed"),n.style.padding="0.5em 0.75em",setTimeout(()=>{n.style.overflow="visible"},200),i.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(n.classList.add("closed"),n.style.overflow="hidden",setTimeout(()=>{n.style.padding="0px"},200),i.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalWindow=t.ModalWindowView=void 0;const i=n(7),r=n(33),o=n(28);var s,a;!function(e){e[e.EDIT_TEXT=0]="EDIT_TEXT",e[e.HOTKEYS=1]="HOTKEYS",e[e.VALIDATION_STATUS=2]="VALIDATION_STATUS",e[e.DOCUMENT_UPLOAD=3]="DOCUMENT_UPLOAD"}(s=t.ModalWindowView||(t.ModalWindowView={})),function(e){e[e.OPEN=0]="OPEN",e[e.CLOSED=1]="CLOSED"}(a||(a={}));t.ModalWindow=class{constructor(e){this.openEditSylTextModalWindow=function(){Array.from(document.getElementsByClassName("neon-modal-window-content")).forEach(e=>{e.classList.remove("visible")}),document.getElementById("neon-modal-window-content-edit-text").classList.add("visible"),document.getElementById("neon-modal-window-edit-text-cancel").removeEventListener("click",this.hideModalWindow),document.getElementById("neon-modal-window-edit-text-cancel").addEventListener("click",this.hideModalWindow.bind(this)),document.getElementById("neon-modal-window-edit-text-save").removeEventListener("click",this.updateSylText.bind(this)),document.getElementById("neon-modal-window-edit-text-save").addEventListener("click",this.updateSylText.bind(this)),document.getElementById("neon-modal-window-container").style.display="flex",this.focusModalWindow()},this.updateSylText=function(){const e=document.getElementById("syl_text").querySelectorAll("span.selected-to-edit")[0],t=e.textContent.replace(/\u{25CA}/u,"").trim(),n=document.getElementById("neon-modal-window-edit-text-input").value;if(null!==n&&n!==t){const t={action:"setText",param:{elementId:[...e.classList.entries()].filter(e=>"text-select"!==e[1]&&"selected-to-edit"!==e[1])[0][1],text:n}};this.neonView.edit(t,this.neonView.view.getCurrentPageURI()).then(t=>{t&&this.neonView.updateForCurrentPage().then(()=>{(0,o.updateSelectedBBox)(e,this.dragHandler,this.neonView)})})}this.hideModalWindow()},this.keydownListener=function(e){switch(e.stopImmediatePropagation(),this.modalWindowView){case s.EDIT_TEXT:"Enter"===e.key&&this.updateSylText();default:"Escape"===e.key&&this.hideModalWindow()}},this.focusModalWindow=function(){switch(this.modalWindowView){case s.EDIT_TEXT:document.getElementById("neon-modal-window-edit-text-input").select();break;default:document.getElementById("neon-modal-window").focus()}},this.neonView=e,this.modalWindowState=a.CLOSED,document.getElementById("neon-modal-window-header-close").addEventListener("click",this.hideModalWindow.bind(this)),document.getElementById("neon-modal-window").addEventListener("keydown",this.keydownListener.bind(this)),document.getElementById("neon-modal-window-container").addEventListener("click",this.focusModalWindow.bind(this))}setModalWindowView(e,t){this.modalWindowView=e,this.setModalWindowContent(t)}getModalWindowView(){return this.modalWindowView.toString()}openModalWindow(){switch(Array.from(document.getElementsByClassName("neon-modal-window-content")).forEach(e=>{e.classList.remove("visible")}),this.modalWindowView){case s.EDIT_TEXT:this.openEditSylTextModalWindow();break;case s.HOTKEYS:document.getElementById("neon-modal-window-content-hotkeys").classList.add("visible");case s.DOCUMENT_UPLOAD:default:document.getElementById("neon-modal-window-container").style.display="flex",this.focusModalWindow()}document.body.style.overflowX="hidden",document.body.style.overflowY="hidden",this.modalWindowState=a.OPEN}hideModalWindow(){switch(this.modalWindowView){case s.EDIT_TEXT:document.getElementById("syl_text").querySelectorAll("span.selected-to-edit")[0].classList.remove("selected-to-edit");default:document.getElementById("neon-modal-window-container").style.display="none",this.modalWindowView!==s.DOCUMENT_UPLOAD&&document.getElementById("container").focus()}document.body.style.overflowX="hidden",document.body.style.overflowY="scroll",this.modalWindowState=a.CLOSED}setModalWindowContent(e){switch(this.modalWindowView){case s.EDIT_TEXT:document.getElementById("neon-modal-window-content-container").innerHTML=i.editTextModal,document.getElementById("neon-modal-window-header-title").innerText="EDIT SYLLABLE TEXT";const t=/\u{25CA}/u,n=document.getElementById("syl_text").querySelectorAll("span.selected-to-edit")[0].textContent.replace(t,"").trim();document.getElementById("neon-modal-window-edit-text-input").value=n;break;case s.HOTKEYS:document.getElementById("neon-modal-window-content-container").innerHTML=i.hotkeysModal,document.getElementById("neon-modal-window-header-title").innerText="HOTKEYS";break;case s.VALIDATION_STATUS:document.getElementById("neon-modal-window-content-container").innerHTML=`
${e}
\n `,document.getElementById("neon-modal-window-header-title").innerText="ERROR LOG";break;case s.DOCUMENT_UPLOAD:document.getElementById("neon-modal-window-header-title").innerText="DOCUMENT UPLOAD",document.getElementById("neon-modal-window-content-container").innerHTML=r.uploadAreaHTML;break;default:console.error("Unknown selection type. This should not have occurred.")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(8),r=n(12),o=n(4),s=n(3);t.default=class{constructor(e,t){this.dragStartCoords=[-1,-1],this.neonView=e,this.selector=t}dragInit(){const e=i.drag().on("start",function(){this.dragStartCoords=[i.event.x,i.event.y],this.dx=0,this.dy=0,i.event.sourceEvent.target.classList.contains("staff")&&i.select(this.selector).call(e)}.bind(this)).on("drag",this.dragging.bind(this)).on("end",this.dragEnded.bind(this));i.selectAll(".selected").call(e);let t=Array.from(document.querySelectorAll(".selected"));this.noMovePrecedes=t.filter(e=>e.classList.contains("no-moving")&&e.hasAttribute("mei:precedes")),t=t.filter(e=>!e.classList.contains("no-moving")),this.selection=t.concat(Array.from(document.querySelectorAll(".resizePoint")))}dragging(){this.dx=i.event.x-this.dragStartCoords[0],this.dy=i.event.y-this.dragStartCoords[1],this.moveElements(this.selection,this.dx,this.dy);if(0===this.selection.filter(e=>e.classList.contains("syl")).length&&0===this.noMovePrecedes.length){const e=Array.from(document.querySelectorAll(".syllable.selected")).map(e=>e.querySelector(".sylTextRect-display"));this.moveElements(e,-this.dx,-this.dy)}}dragEnded(){const e=Math.abs(this.dx),t=Math.abs(this.dy);if(e<=5&&t<=5)return this.reset(),void this.dragInit();const n=this.selection.filter(e=>!e.classList.contains("resizePoint"));if(this.isCursorOutOfBounds()||this.isDragOutOfBounds(n)){this.returnElements(this.selection);const e=Array.from(document.querySelectorAll(".syllable.selected")).map(e=>e.querySelector(".sylTextRect-display"));return this.returnElements(e),this.reset(),this.dragInit(),(0,o.queueNotification)("[FAIL] Glyphs were placed out of bounds! Drag action failed.","error")}const i=[];n.forEach(e=>{const t={action:"drag",param:{elementId:"rect"===e.tagName?e.closest(".syl").id:e.id,x:this.dx,y:-this.dy}};i.push(t)});const r={action:"chain",param:i};this.neonView.edit(r,this.neonView.view.getCurrentPageURI()).then(async()=>{const e=Array.from(document.querySelectorAll(".selected")).filter(e=>!e.classList.contains("no-moving")).map(e=>e.id);await this.neonView.updateForCurrentPage(),this.endOptionsSelection(),this.reset(),await this.reselect(e),this.dragInit()})}async reselect(e){const t=e.map(e=>document.querySelector("#"+e));t.filter(e=>!e.classList.contains("syl")).forEach(async()=>await(0,s.selectAll)(t,this.neonView,this)),t.filter(e=>e.classList.contains("syl")).forEach(e=>(0,s.selectBBox)(e.querySelector(".sylTextRect-display"),this,this.neonView)),t.filter(e=>e.classList.contains("staff")).forEach(e=>(0,s.selectStaff)(e,this))}resetTo(e){this.resetToAction=e}reset(){void 0!==this.resetToAction&&i.select(this.selector).call(this.resetToAction)}endOptionsSelection(){const e=document.getElementById("moreEdit"),t=document.getElementById("extraEdit");e&&(e.innerHTML="",e.parentElement.classList.add("hidden")),t&&(t.innerHTML="",t.parentElement.classList.add("hidden"))}moveElements(e,t,n){e.filter(e=>null!==e).forEach(e=>{e.setAttribute("transform",`translate(${t},${n})`)})}returnElements(e){e.filter(e=>null!==e).forEach(e=>{e.removeAttribute("transform")})}isCursorOutOfBounds(){const e=this.dragStartCoords[0]+this.dx,t=this.dragStartCoords[1]+this.dy;return(0,r.isOutOfSVGBounds)(e,t)}isDragOutOfBounds(e){let t=document.querySelector("#displayBBox").checked?"use, rect":"use";e[0].classList.contains("staff")&&(t="path");const n=e.reduce((e,n)=>e.concat(...n.querySelectorAll(t)),[]).map(r.getGlyphBBox).reduce((e,t)=>({ulx:Math.min(e.ulx,t.ulx),uly:Math.min(e.uly,t.uly),lrx:Math.max(e.lrx,t.lrx),lry:Math.max(e.lry,t.lry)}),{ulx:Number.MAX_VALUE,uly:Number.MAX_VALUE,lrx:Number.MIN_VALUE,lry:Number.MIN_VALUE}),{ulx:i,uly:o,lrx:s,lry:a}=n;return(0,r.isOutOfSVGBounds)(i+this.dx,o+this.dy)||(0,r.isOutOfSVGBounds)(s+this.dx,a+this.dy)}}},,function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return o}));var r=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}},function(e,t,n){"use strict";function i(e,t,n){var i=n[n.length-1];e===i.element&&(n.pop(),i=n[n.length-1]);var r=i.element,o=i.index;if(Array.isArray(r))r.push(e);else if(o===t.length-2){r[t.pop()]=e}else t.push(e)}t.stringify=function(e){var t=[];t.push({obj:e});for(var n,i,r,o,s,a,c,l,u,d,f="";n=t.pop();)if(i=n.obj,f+=n.prefix||"",r=n.val||"")f+=r;else if("object"!=typeof i)f+=void 0===i?null:JSON.stringify(i);else if(null===i)f+="null";else if(Array.isArray(i)){for(t.push({val:"]"}),o=i.length-1;o>=0;o--)s=0===o?"":",",t.push({obj:i[o],prefix:s});t.push({val:"["})}else{for(c in a=[],i)i.hasOwnProperty(c)&&a.push(c);for(t.push({val:"}"}),o=a.length-1;o>=0;o--)u=i[l=a[o]],d=o>0?",":"",d+=JSON.stringify(l)+":",t.push({obj:u,prefix:d});t.push({val:"{"})}return f},t.parse=function(e){for(var t,n,r,o,s,a,c,l,u,d=[],f=[],h=0;;)if("}"!==(t=e[h++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":h+=3,i(null,d,f);break;case"t":h+=3,i(!0,d,f);break;case"f":h+=4,i(!1,d,f);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",h--;;){if(r=e[h++],!/[\d\.\-e\+]/.test(r)){h--;break}n+=r}i(parseFloat(n),d,f);break;case'"':for(o="",s=void 0,a=0;'"'!==(c=e[h++])||"\\"===s&&a%2==1;)o+=c,"\\"===(s=c)?a++:a=0;i(JSON.parse('"'+o+'"'),d,f);break;case"[":l={element:[],index:d.length},d.push(l.element),f.push(l);break;case"{":u={element:{},index:d.length},d.push(u.element),f.push(u);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===d.length)return d.pop();i(d.pop(),d,f)}}},function(e,t,n){"use strict";var i=n(20),r=n(10);t.a=function(e,t,n){var o=(e=e||{}).random||(e.rng||i.a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=o[s];return t}return Object(r.a)(o)}},function(e,t,n){"use strict";function i(e){if(16!==e.length)return"";function t(e,t){return e+t.toString(16).padStart(2,"0")}return e.slice(0,4).reduce(t,"")+"-"+e.slice(4,6).reduce(t,"")+"-"+e.slice(6,8).reduce(t,"")+"-"+e.slice(8,10).reduce(t,"")+"-"+e.slice(10).reduce(t,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.uuidv4=void 0,t.uuidv4=function(){if(void 0===window.crypto)return i(new Uint8Array(16));const e=new Uint8Array(16),t=Uint8Array.from([parseInt("01000000",2),parseInt("10000000",2),parseInt("00001111",2),parseInt("00111111",2)]);return window.crypto.getRandomValues(e),e[6]=e[6]&t[2]|t[0],e[8]=e[8]&t[3]|t[1],i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initGroupingListeners=t.endGroupingSelection=t.triggerGrouping=t.mergeStaves=t.isLinkable=t.isLinked=t.isGroupable=t.initNeonView=void 0;const i=n(7),r=n(34),o=n(4),s=n(3),a=n(13),c=n(13);let l;function u(e,t){if(Array.from(t.values()).length<2)return!1;switch(e){case"selByNeume":if(s.sharedLogicalParent(e,t))return!1;default:return!!s.areAdjacent(e,t)}}function d(e){return 2===e.length&&(e[0].getAttribute("mei:follows")==="#"+e[1].id&&e[1].getAttribute("mei:precedes")==="#"+e[0].id||e[0].getAttribute("mei:precedes")==="#"+e[1].id&&e[1].getAttribute("mei:follows")==="#"+e[0].id)}function f(e,t){switch(t.length){case 2:if("selBySyllable"!==e)return!1;if(d([t[0],t[1]]))return!0;if(s.isMultiStaveSelection(t)){const e=t[0].closest(".staff"),n=t[1].closest(".staff"),i=Array.from(e.parentElement.children),r=i.indexOf(e)e.classList.contains("syllable")),l=Array.from(a.children).filter(e=>e.classList.contains("syllable")),u=c[c.length-1],d=l[0];if(u.id===t[0].id&&d.id===t[1].id)return!0;if(u.id===t[1].id&&d.id===t[0].id)return!0}default:return!1}return!1}function h(){const e=document.querySelectorAll(".staff.selected"),t=[];e.forEach(e=>{t.push(e.id)});const n={action:"merge",param:{elementIds:t}};l.edit(n,l.view.getCurrentPageURI()).then(e=>{e?(o.queueNotification("Staff Merged","success"),a.endOptionsSelection(),l.updateForCurrentPage()):o.queueNotification("Merge Failed","error")})}function p(){const e=document.getElementById("moreEdit");e.innerHTML="",e.parentElement.classList.add("hidden"),document.body.removeEventListener("keydown",c.deleteButtonHandler),document.body.removeEventListener("keydown",g)}function m(){const e=document.getElementById("delete");e.removeEventListener("click",c.removeHandler),e.addEventListener("click",c.removeHandler),document.body.addEventListener("keydown",c.deleteButtonHandler),document.body.addEventListener("keydown",g);try{document.getElementById("mergeSyls").addEventListener("click",()=>{v("group","neume",_().filter(e=>document.getElementById(e).classList.contains("neume")))})}catch(e){}try{document.getElementById("groupNeumes").addEventListener("click",()=>{v("group","neume",b())})}catch(e){}try{document.getElementById("groupNcs").addEventListener("click",()=>{v("group","nc",b())})}catch(e){}try{document.getElementById("ungroupNeumes").addEventListener("click",()=>{v("ungroup","neume",_())})}catch(e){}try{document.getElementById("ungroupNcs").addEventListener("click",()=>{v("ungroup","nc",_())})}catch(e){}try{document.getElementById("toggle-ligature").addEventListener("click",async()=>{const e={action:"toggleLigature",param:{elementIds:b()}};l.edit(e,l.view.getCurrentPageURI()).then(e=>{e?o.queueNotification("Ligature Toggled","success"):o.queueNotification("Ligature Toggle Failed","error"),p(),l.updateForCurrentPage()})})}catch(e){}try{document.getElementById("toggle-link").addEventListener("click",()=>{y()})}catch(e){}}t.initNeonView=function(e){l=e},t.isGroupable=u,t.isLinked=d,t.isLinkable=f,t.mergeStaves=h,t.triggerGrouping=function(e){const t=document.getElementById("moreEdit");t.parentElement.classList.remove("hidden"),t.innerHTML+=i.groupingMenu[e],m()},t.endGroupingSelection=p,t.initGroupingListeners=m;const g=function(e){if("g"===e.key){const e=Array.from(document.querySelectorAll(".selected"));if(0==e.length)return;const t=s.getSelectionType();switch(t){case"selBySyllable":if(f(t,e))y();else if(u(t,e)){v("group","neume",_().filter(e=>document.getElementById(e).classList.contains("neume")))}else if(1===e.length){v("ungroup","neume",_())}break;case"selByNeume":if(u(t,e)){v("group","neume",b())}else{v("ungroup","nc",_())}break;case"selByNc":if(u(t,e)){v("group","nc",b())}else{v("ungroup","nc",_())}break;case"selByStaff":u(t,e)?h():a.triggerStaffSplitMode();break;default:return void console.error(`Can't perform grouping/ungrouping action on selection type ${t}.`)}}};function v(e,t,n){const i={action:e,param:{groupType:t,elementIds:n}};l.edit(i,l.view.getCurrentPageURI()).then(i=>{if(i?"group"===e?o.queueNotification("Grouping Success","success"):o.queueNotification("Ungrouping Success","success"):"group"===e?o.queueNotification("Grouping Failed","error"):o.queueNotification("Ungrouping Failed","error"),l.updateForCurrentPage(),"nc"===t){const e=document.getElementById(n[0]).parentElement,t=Array.from(e.children);void 0===l.info.getContour(t)&&r.groupingNotRecognized()}p()})}function y(){const e=b(),t={action:"chain",param:[]},n=new Array;if(document.getElementById(e[0]).getAttribute("mei:precedes"))n.push({action:"set",param:{elementId:e[0],attrType:"precedes",attrValue:""}}),n.push({action:"set",param:{elementId:e[1],attrType:"follows",attrValue:""}}),n.push({action:"setText",param:{elementId:e[1],text:""}});else if(document.getElementById(e[0]).getAttribute("mei:follows"))n.push({action:"set",param:{elementId:e[0],attrType:"follows",attrValue:""}}),n.push({action:"set",param:{elementId:e[1],attrType:"precedes",attrValue:""}}),n.push({action:"setText",param:{elementId:e[0],text:""}});else{const t=document.getElementById(e[0]),i=document.getElementById(e[1]),r=t.closest(".staff"),o=i.closest(".staff"),s=Array.from(r.parentElement.children).filter(e=>e.classList.contains("staff"));let a,c;s.indexOf(r){e?o.queueNotification("Toggled Syllable Link"):o.queueNotification("Failed to Toggle Syllable Link"),p(),l.updateForCurrentPage()})}function b(){const e=[];return Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push(t.id)}),e}function _(){const e=[];return Array.from(document.getElementsByClassName("selected")).forEach(t=>{if(t.classList.contains("divLine")||t.classList.contains("accid")||t.classList.contains("clef"))return;Array.from(t.children).forEach(t=>{e.push(t.id)})}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resize=void 0;const i=n(3),r=n(8),o=n(12),s=n(4),a={TopLeft:0,Top:1,TopRight:2,Right:3,BottomRight:4,Bottom:5,BottomLeft:6,Left:7};function c(e,t,n,i,r){let o;if(r>=0)o=[{x:e,y:t,name:a.TopLeft},{x:(e+n)/2,y:t+(n-e)/2*Math.sin(r),name:a.Top},{x:n,y:t+(n-e)*Math.sin(r),name:a.TopRight},{x:n,y:(t+i+(n-e)*Math.sin(r))/2,name:a.Right},{x:n,y:i,name:a.BottomRight},{x:(e+n)/2,y:i-(n-e)/2*Math.sin(r),name:a.Bottom},{x:e,y:i-(n-e)*Math.sin(r),name:a.BottomLeft},{x:e,y:(t+i-(n-e)*Math.sin(r))/2,name:a.Left}];else{const s=(n-e)*Math.tan(Math.abs(r)),c=i-t-s;o=[{x:e,y:t+s,name:a.TopLeft},{x:(e+n)/2,y:t+s/2,name:a.Top},{x:n,y:t,name:a.TopRight},{x:n,y:t+c/2,name:a.Right},{x:n,y:t+c,name:a.BottomRight},{x:(e+n)/2,y:i-s/2,name:a.Bottom},{x:e,y:i,name:a.BottomLeft},{x:e,y:i-c/2,name:a.Left}]}return o}t.resize=function(e,t,n){let l,u,d,f,h,p,m,g,v,y,b,_,w,k,S;function E(){const e=c(l,u,d,f,h),t=e.filter((e,t)=>t%2==0).map(e=>e.x+","+e.y).join(" ");document.querySelector("#resizeRect").setAttribute("points",t);const n=document.querySelector(".syl.selected > .sylTextRect-display");n&&(n.setAttribute("x",String(Math.min(l,d))),n.setAttribute("y",String(Math.min(u,f))),n.setAttribute("width",String(Math.abs(d-l))),n.setAttribute("height",String(Math.abs(f-u))));for(const t in a){const n=e[a[t]];r.select("#p-"+t).filter(".resizePoint").attr("cx",n.x).attr("cy",n.y)}let i=e[3].x,o=e[3].y;const s=i+100+","+(o+85)+" "+(i+70)+","+(o+50)+" "+(i+100)+","+(o+15)+" "+(i+130)+","+(o+50);i=e[7].x,o=e[7].y;const p=i-100+","+(o-15)+" "+(i-130)+","+(o-50)+" "+(i-100)+","+(o-85)+" "+(i-70)+","+(o-50);r.select("#rotateLeft").attr("points",p),r.select("#rotateRight").attr("points",s)}!function L(){if(null===e)return;if(e.classList.contains("syl")){const t=e.querySelector(".sylTextRect-display");if(null===t)return void console.warn("Tried to draw resize rect for a sylTextRect that doesn't exist (or isn't displaying)");l=Number(t.getAttribute("x")),u=Number(t.getAttribute("y")),d=+l+ +t.getAttribute("width"),f=+u+ +t.getAttribute("height"),h=0}if(e.classList.contains("staff")){const t=(0,i.getStaffBBox)(e);l=t.ulx,u=t.uly,d=t.lrx,f=t.lry;const n=e.querySelector("path").getAttribute("d").match(/\d+/g).map(e=>Number(e));h=Math.atan((n[3]-n[1])/(n[2]-n[0]))}let A;p=l,v=u,m=d,y=f;const x=c(l,u,d,f,h);w=x[2].x-x[0].x;const C=x.filter((e,t)=>t%2==0).map(e=>e.x+","+e.y).join(" ");r.select("#"+e.id).append("polygon").attr("points",C).attr("id","resizeRect").attr("stroke","black").attr("stroke-width",10).attr("fill","none").style("cursor","move").style("stroke-dasharray","20 10");for(const t in a){const n=x[a[t]];r.select(e.viewportElement).append("circle").attr("cx",n.x).attr("cy",n.y).attr("r",25).attr("stroke","black").attr("stroke-width",4).attr("fill","#0099ff").attr("class","resizePoint").attr("id","p-"+t)}for(const e in a)r.select("#p-"+e).filter(".resizePoint").call(r.drag().on("start",()=>{B(e)}).on("drag",q).on("end",I.bind(this)));if(e.classList.contains("staff")){let t=x[3].x,n=x[3].y;const i=t+100+","+(n+85)+" "+(t+70)+","+(n+50)+" "+(t+100)+","+(n+15)+" "+(t+130)+","+(n+50);t=x[7].x,n=x[7].y;const o=t-100+","+(n-15)+" "+(t-130)+","+(n-50)+" "+(t-100)+","+(n-85)+" "+(t-70)+","+(n-50);r.select("#"+e.id).append("polygon").attr("points",i).attr("id","rotateRight").attr("stroke","black").attr("stroke-width",7).attr("fill","#0099ff").attr("class","rotatePoint"),r.select("#"+e.id).append("polygon").attr("points",o).attr("id","rotateLeft").attr("stroke","black").attr("stroke-width",7).attr("fill","#0099ff").attr("class","rotatePoint"),r.select("#rotateLeft").call(r.drag().on("start",O).on("drag",(function(){const e=r.mouse(this)[1]-b,t=S-Math.atan(e/w);t>-.2&&t<.2&&(k=e,u=_+k,h=t,h>=0?(u=k+x.filter(e=>e.name===a.TopLeft)[0].y,f=x.filter(e=>e.name===a.BottomRight)[0].y):(u=x.filter(e=>e.name===a.TopRight)[0].y,f=k+x.filter(e=>e.name===a.BottomLeft)[0].y));E()})).on("end",N)),r.select("#rotateRight").call(r.drag().on("start",O).on("drag",(function(){const e=r.mouse(this)[1]-b,t=S+Math.atan(e/w);t>-.2&&t<.2&&(k=e,h=t,h>=0?(f=k+x.filter(e=>e.name===a.BottomRight)[0].y,u=x.filter(e=>e.name===a.TopLeft)[0].y):(u=k+x.filter(e=>e.name===a.TopRight)[0].y,f=x.filter(e=>e.name===a.BottomLeft)[0].y));E()})).on("end",N))}function B(e){A=e;const t=x.find(t=>t.name===a[e]);g=[t.x,t.y],v=u,y=f}function q(){const e=r.mouse(this);switch(a[A]){case a.TopLeft:l=e[0],u=e[1];break;case a.Top:u=e[1]-(d-l)*Math.tan(h)/2;break;case a.TopRight:d=e[0],u=e[1]-(d-l)*Math.tan(h);break;case a.Right:d=e[0],f=y+(e[0]-g[0])*Math.tan(h);break;case a.BottomRight:d=e[0],f=e[1];break;case a.Bottom:f=e[1]+(d-l)*Math.tan(h)/2;break;case a.BottomLeft:l=e[0],f=e[1]+(d-l)*Math.tan(h);break;case a.Left:l=e[0],u=v+(e[0]-g[0])*Math.tan(h);break;default:console.error("Something that wasn't a side of the rectangle was dragged. This shouldn't happen.")}E()}function I(){if((0,o.isOutOfSVGBounds)(l,u)||(0,o.isOutOfSVGBounds)(d,f))return l=p,u=v,d=m,f=y,E(),(0,s.queueNotification)("[FAIL] Glyphs were placed out of bounds! Resize action failed.","error");const a={action:"resize",param:{elementId:e.id,ulx:l,uly:u,lrx:d,lry:f}};t.edit(a,t.view.getCurrentPageURI()).then(async o=>{if(o&&await t.updateForCurrentPage(),e=document.querySelector("#"+e.id),l=void 0,u=void 0,d=void 0,f=void 0,r.selectAll(".resizePoint").remove(),r.selectAll("#resizeRect").remove(),r.selectAll(".rotatePoint").remove(),L(),e.classList.contains("syl"))(0,i.selectBBox)(e.querySelector(".sylTextRect-display"),n,this);else{(0,i.selectAll)([document.querySelector("#"+e.id)],t,n);const r=document.querySelector("moreEdit");r&&(r.innerHTML="",r.parentElement.classList.add("hidden"))}})}function O(){const e=r.event.sourceEvent.target.id;b=r.mouse(this)[1],y=f,v=u,_="rotateRight"===e?f:u,S=h}function N(){if(void 0===k&&(k=0),(0,o.isOutOfSVGBounds)(l,u)||(0,o.isOutOfSVGBounds)(d,f))return document.querySelectorAll(".resizePoint").forEach(e=>e.remove()),document.querySelectorAll("#resizeRect").forEach(e=>e.remove()),document.querySelectorAll(".rotatePoint").forEach(e=>e.remove()),e=document.getElementById(e.id),l=void 0,u=void 0,d=void 0,f=void 0,k=void 0,L(),e.classList.contains("syl")?(0,i.selectBBox)(e.querySelector(".sylTextRect-display"),n,this):(0,i.selectStaff)(e,n),(0,s.queueNotification)("[FAIL] Glyphs were placed out of bounds! Rotate action failed.","error");const a={action:"resizeRotate",param:{elementId:e.id,ulx:l,uly:u,lrx:d,lry:f,rotate:180*h/Math.PI}};t.edit(a,t.view.getCurrentPageURI()).then(async o=>{o&&await t.updateForCurrentPage(),e=document.getElementById(e.id),l=void 0,u=void 0,d=void 0,f=void 0,k=void 0,r.selectAll(".resizePoint").remove(),r.selectAll("#resizeRect").remove(),r.selectAll(".rotatePoint").remove(),L(),(0,i.selectAll)([e],t,n),e.classList.contains("syl")?(0,i.selectBBox)(e.querySelector(".sylTextRect-display"),n,this):(0,i.selectStaff)(e,n)})}}()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dragSelect=t.clickSelect=t.setSelectHelperObjects=t.setSelectStrokeWidth=void 0;const i=n(3),r=n(25),o=n(8),s=n(12);let a,c,l,u,d=7;function f(e){"Escape"===e.key&&(document.getElementsByClassName("selected").length>0&&l.infoListeners(),(0,i.unselect)())}function h(e){if("selByBBox"!==(0,i.getSelectionType)()||!document.getElementById("displayText").checked||"Enter"!==e.key)return;const t=document.querySelector(".syllable-highlighted");if(t){document.querySelector("span."+t.id).click()}}function p(e){if("selByBBox"!==(0,i.getSelectionType)()||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;const t=document.querySelector(".syllable-highlighted"),n=Array.from(document.querySelectorAll(".syllable")).filter(e=>null!==e.querySelector(".sylTextRect-display")),r=n.indexOf(t);if("ArrowLeft"===e.key&&r>0){(0,i.unselect)();const e=n[r-1].querySelector(".sylTextRect-display");(0,i.selectAll)([e],c,a)}else if("ArrowRight"===e.key&&rr.lrx||n.yr.lry)}const r=(0,i.getStaffBBox)(e);return!(t.xr.lrx&&n.x>r.lrx||t.yr.lry+Math.abs(r.lry-n.y)*Math.tan(r.rotate)&&n.y>r.lry+Math.abs(r.lry-n.y)*Math.tan(r.rotate))}function y(e){if(c&&"insert"!==c.getUserMode()&&!e.shiftKey)if("use"===this.tagName&&"selByBBox"!==(0,i.getSelectionType)()){if(null===this.closest(".selected")){let e=[this];const n=/E9B[45678]/,r=/E9B[9ABC]/;if(this.getAttribute("xlink:href").match(r)){const t=this.closest(".nc"),i=this.closest(".neume"),r=Array.from(i.children).indexOf(t),o=i.children[r-1].children[0];console.assert(o.getAttribute("xlink:href").match(n),"First glyph of ligature unexpected!"),null===o.closest(".selected")&&e.unshift(o)}else if(this.getAttribute("xlink:href").match(n)){const t=this.closest(".nc"),n=this.closest(".neume"),i=Array.from(n.children).indexOf(t),o=n.children[i+1].children[0];console.assert(o.getAttribute("xlink:href").match(r),"Second glyph of ligature unexpected!"),null===o.closest(".selected")&&e.push(o)}t()&&(e=e.concat(Array.from(document.querySelectorAll(".selected")))),(0,i.selectAll)(e,c,a),a&&a.dragInit()}else if(t()){const e={selByStaff:".staff",selByNeume:".neume",selByNc:".nc",selByLayerElement:".accid"}[document.querySelector(".sel-by .is-active").id]||".syllable",t=[this.closest(e)];let n=[];n=Array.from(document.getElementsByClassName("selected")),n=n.filter(e=>!t.includes(e)),(0,i.selectAll)(n,c,a),a&&a.dragInit()}}else if("rect"===e.target.tagName&&"selByBBox"===(0,i.getSelectionType)())if(null===this.closest(".selected")){let n=[e.target];t()&&(n=n.concat(Array.from(document.getElementsByClassName("selected"))),n=n.map(e=>"rect"==e.tagName?e:e.querySelector(".sylTextRect-Display"))),(0,i.selectAll)(n,c,a),a&&a.dragInit()}else{let e=[];if(t()){const t=[this];e=Array.from(document.getElementsByClassName("selected")),e=e.map(e=>"rect"==e.tagName?e:e.querySelector(".sylTextRect-Display")),e=e.filter(e=>!t.includes(e)),(0,i.selectAll)(e,c,a),a&&a.dragInit()}}else{if("selByStaff"!==(0,i.getSelectionType)())return void l.infoListeners();t()||(0,i.unselect)();const n=(0,s.getStaffByCoords)(e.clientX,e.clientY);if(!n)return;n.classList.contains("selected")||((0,i.selectStaff)(n,a),(0,r.resize)(n,c,a),a&&a.dragInit()),n.dispatchEvent(new MouseEvent("mousedown",{screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,view:e.view}))}function t(){return window.navigator.userAgent.match(/Mac/)?e.metaKey:e.ctrlKey}}t.setSelectStrokeWidth=function(e){d=e},t.setSelectHelperObjects=function(e,t){a=t,c=e,l=c.info,u=c.view.zoomHandler},t.clickSelect=function(e){document.querySelectorAll(e).forEach(e=>{e.removeEventListener("mousedown",y),e.addEventListener("mousedown",y)}),document.body.removeEventListener("keydown",f),document.body.addEventListener("keydown",f),document.body.removeEventListener("keydown",h),document.body.addEventListener("keydown",h),document.body.removeEventListener("keydown",p),document.body.addEventListener("keydown",p),document.getElementById("container").addEventListener("contextmenu",e=>{e.preventDefault()}),document.querySelectorAll("use,rect,#moreEdit").forEach(e=>{e.removeEventListener("click",g),e.addEventListener("click",g)})},t.dragSelect=function(e){let t=0,n=0,r=!1,s=!1;const l=o.select(e);o.selectAll(e.replace(".active-page","").trim()).on(".drag",null);const f=o.drag().on("start",(function(){if(!c)return;const e=c.getUserMode();if("use"!==o.event.sourceEvent.target.nodeName&&"insert"!==e&&"rect"!==o.event.sourceEvent.target.nodeName){if(o.event.sourceEvent.shiftKey)r=!0,void 0!==u&&u.startDrag();else if(!document.getElementById("selByStaff").classList.contains("is-active")||(h=o.mouse(this),0===Array.from(document.getElementsByClassName("staff")).filter(e=>{const t=(0,i.getStaffBBox)(e),n=t.ulx,r=t.uly,o=t.lrx,s=t.lry,a=t.rotate;return h[0]>n&&h[0]r+(h[0]-n)*Math.tan(a)&&h[1]v(e,h,p));y.forEach(e=>{if("use"===e.tagName&&e.getAttribute("xlink:href").match(/E9B[456789ABC]/)){const t=e.closest(".neume"),n=Array.from(t.children).indexOf(e.closest(".nc"));if(e.getAttribute("xlink:href").match(/E9B[45678]/)){const e=t.children[n+1].querySelector("use");y.indexOf(e)<0&&y.push(e)}else{const e=t.children[n-1].querySelector("use");y.indexOf(e)<0&&y.push(e)}}}),(0,i.selectAll)(y,c,a),a&&a.dragInit(),o.selectAll("#selectRect").remove(),s=!1}r=!1}));l.call(f),a&&a.resetTo(f)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initDisplayListener=t.initErrorLogControls=t.initErrorLog=t.recordNotification=void 0;const i=n(7),r=n(6);function o(){const e=document.querySelector("#error_log"),t=document.querySelector("#errorLogHeading"),n=t.querySelector("svg > use"),i=document.querySelector("#errorLogContents"),{displayErrLog:o}=(0,r.getSettings)();o&&e.classList.add("visible"),t.addEventListener("click",e=>{e.stopPropagation(),i.classList.contains("closed")?(i.classList.remove("closed"),i.style.padding="0.5em 0.75em",setTimeout(()=>{i.style.overflow="visible"},200),n.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(i.classList.add("closed"),i.style.overflow="hidden",setTimeout(()=>{i.style.padding="0px"},200),n.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))}),s()}function s(){const e=document.querySelector("#error_log"),t=document.querySelector("#display-single-container"),n=document.createElement("label"),i=document.createElement("input");i.classList.add("checkbox"),n.classList.add("checkbox-container","side-panel-btn"),n.textContent="Errors",i.id="display-errors",i.type="checkbox",i.checked=!1,n.appendChild(i),t.append(n);const{displayErrLog:o}=(0,r.getSettings)();o&&(i.checked=!0),i.addEventListener("click",()=>{const t=document.getElementById("display-all-btn"),n=document.getElementById("displayInfo"),o=document.getElementById("displayBBox"),s=document.getElementById("displayText"),a=document.getElementById("display-errors");i.checked?(e.classList.add("visible"),(0,r.setSettings)({displayErrLog:!0}),(null==n?void 0:n.checked)&&(null==o?void 0:o.checked)&&(null==s?void 0:s.checked)&&(null==a?void 0:a.checked)&&(t.classList.add("selected"),t.innerHTML="Hide All")):(e.classList.remove("visible"),(0,r.setSettings)({displayErrLog:!1}),t.classList.contains("selected")&&(t.classList.remove("selected"),t.innerHTML="Display All"))})}t.recordNotification=function(e){document.querySelector("#errorLogContents").prepend(function(e){const t=document.createElement("div");t.classList.add("notification-container"),t.innerHTML=`\n
\n\n
\n
${e.message}
\n
\n
\n\n
\n\n
\n \n
\n `;const n=t.querySelector(".log-remove");return n.onclick=()=>t.remove(),n.addEventListener("mouseover",()=>{n.setAttribute("src","/Neon/Neon-gh//assets/img/garbage-open.svg")}),n.addEventListener("mouseout",()=>{n.setAttribute("src","/Neon/Neon-gh//assets/img/garbage-closed.svg")}),t}(e))},t.initErrorLog=function(){document.querySelector("#error_log").innerHTML=i.errorLogsPanelContents,o()},t.initErrorLogControls=o,t.initDisplayListener=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSelectedBBox=void 0;const i=n(3),r=n(18),o=n(26),s=n(15),a=n(17);function c(){if(!document.getElementById("selByBBox").classList.contains("is-active")){(0,i.unselect)();try{document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden")}catch(e){}document.getElementById("selByBBox").classList.add("is-active");try{document.getElementById("selByNc").classList.remove("is-active"),document.getElementById("selByNeume").classList.remove("is-active"),document.getElementById("selByStaff").classList.remove("is-active"),document.getElementById("selBySyllable").classList.remove("is-active"),document.getElementById("selByLayerElement").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,s.setGroupingHighlight)("syllable")}catch(e){}}this.addBBoxListeners()}function l(e,t,n){(0,i.unselect)();const r=Array.from(e.classList).find(e=>"text-select"!==e&&"selected-to-edit"!==e);if(document.getElementById("displayBBox").checked&&document.getElementById(r)){const e=document.getElementById(r).querySelector(".sylTextRect-display");(0,i.selectBBox)(e,t,n)}}t.updateSelectedBBox=l;t.default=class{constructor(e){this.neonView=e,this.initTextEdit()}updateSelectedBBox(e){(0,i.unselect)();const t=Array.from(e.classList).find(e=>"text-select"!==e&&"selected-to-edit"!==e);if(document.getElementById("displayBBox").checked&&document.getElementById(t)){const e=document.getElementById(t).querySelector(".sylTextRect-display");(0,i.selectBBox)(e,this.dragHandler,this.neonView)}}initTextEdit(){const e=document.getElementById("syl_text").querySelectorAll("span"),t=this.neonView.modal;e.forEach(e=>{function n(){e.classList.add("selected-to-edit"),t.setModalWindowView(a.ModalWindowView.EDIT_TEXT),t.openModalWindow(),l(e,this.dragHandler,this.neonView)}e.removeEventListener("click",n),e.addEventListener("click",n)})}initSelectByBBoxButton(){if(void 0!==this.neonView.NeumeEdit){const e=document.getElementById("selByBBox");if(e)return void(e.style.display="");const t=document.getElementById("selection-mode-btns-container"),n=document.createElement("button");n.classList.add("side-panel-btn","sel-by"),n.id="selByBBox",n.textContent="BBox",t.appendChild(n),n.addEventListener("click",c.bind(this)),document.body.addEventListener("keydown",e=>{"6"===e.key&&""===document.getElementById("selByBBox").style.display&&c.bind(this)()}),this.neonView.view.addUpdateCallback(this.addBBoxListeners.bind(this))}else{const e=document.getElementById("undo").closest(".control"),t=document.createElement("p");t.classList.add("control");const n=document.createElement("button");n.classList.add("side-panel-btn","sel-by"),n.id="selByBBox",n.textContent="BBox",t.appendChild(n),e.appendChild(t),n.classList.add("is-active"),n.style.display="none",this.addBBoxListeners(),this.neonView.view.addUpdateCallback(this.addBBoxListeners.bind(this))}}addBBoxListeners(){document.getElementById("selByBBox").classList.contains("is-active")&&((0,i.unselect)(),void 0===this.neonView.NeumeEdit&&(this.dragHandler=new r.default(this.neonView,".sylTextRect-display"),(0,o.setSelectHelperObjects)(this.neonView,this.dragHandler),"SingleView"===this.neonView.view.constructor.name?((0,o.clickSelect)("#mei_output, #mei_output rect"),(0,o.dragSelect)("#svg_group")):((0,o.clickSelect)(".active-page > svg > svg, .active-page > svg > svg rect"),(0,o.dragSelect)(".active-page svg"))))}}},function(e,t,n){"use strict";n.r(t),function(e){var i,r,o=n(2),s=n.n(o),a=n(22),c=n(14),l=n.n(c),u=n(21),d=n.n(u),f=n(5),h=n.n(f),p=n(1),m=n.n(p),g=n(0),v=n.n(g);function y(e){return"$"+e}function b(e){return e.substring(1)}function _(){this._store={}}function w(e){if(this._store=new _,e&&Array.isArray(e))for(var t=0,n=e.length;tb(e))},_.prototype.delete=function(e){var t=y(e),n=t in this._store;return delete this._store[t],n},_.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,i=t.length;n=u.length)){var n=Math.min(d+6,u.length),i=u.slice(d,n);!function(n,i){n.forEach((function(n,r){var s=i+r,a=o.get(n),u=B(a[0],["atts_since","attachments"]);u.open_revs=a.map((function(e){return e.rev})),u.open_revs=u.open_revs.filter(I);var d=I;0===u.open_revs.length&&(delete u.open_revs,d=O),["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(u[e]=t[e])})),e.get(n,u,(function(e,t){var i,r,o;i=e?[{error:e}]:d(t),r=n,o=i,c[s]={id:r,docs:o},l(),f()}))}))}(i,d),d+=i.length}}f()}try{localStorage.setItem("_pouch_check_localstorage",1),q=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){q=!1}function T(){return q}function P(){v.a.call(this),this._listeners={},function(e){T()&&addEventListener("storage",(function(t){e.emit(t.key)}))}(this)}function j(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function M(e){var t=0;return e||(t=2e3),function(e,t){return e=parseInt(e,10)||0,(t=parseInt(t,10))!=t||t<=e?t=(e||1)<<1:t+=1,t>6e5&&(e=3e5,t=6e5),~~((t-e)*Math.random()+e)}(e,t)}function D(e,t){j("info","The above "+e+" is totally normal. "+t)}m()(P,v.a),P.prototype.addListener=function(e,t,n,i){if(!this._listeners[t]){var r=this,o=!1;this._listeners[t]=a,this.on(e,a)}function a(){if(r._listeners[t])if(o)o="waiting";else{o=!0;var e=B(i,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);n.changes(e).on("change",(function(e){e.seq>i.since&&!i.cancelled&&(i.since=e.seq,i.onChange(e))})).on("complete",(function(){"waiting"===o&&s()(a),o=!1})).on("error",(function(){o=!1}))}}},P.prototype.removeListener=function(e,t){t in this._listeners&&(v.a.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},P.prototype.notifyLocalWindows=function(e){T()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},P.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var R="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n0||i0||i>>1],t)<0?r=i+1:o=i;return r}(e,t,n);e.splice(i,0,t)}function Fe(e,t){for(var n,i,r=t,o=e.length;r0;){var r=n.pop(),o=r.tree1,s=r.tree2;(o[1].status||s[1].status)&&(o[1].status="available"===o[1].status||"available"===s[1].status?"available":"missing");for(var a=0;a0;){var m=p.pop();if(0!==m.diff)for(var g=m.ids[2],v=0,y=g.length;vt){n||(n={});var u=l.length-t;a={pos:c.pos+u,ids:Fe(l,u)};for(var d=0;d0&&i.emit("error",t)):i.emit("complete",n),i.removeAllListeners(),e.removeListener("destroyed",o)}));function o(){i.cancel()}n&&(i.on("complete",(function(e){n(null,e)})),i.on("error",n)),e.once("destroyed",o),t.onChange=function(e,t,n){i.isCancelled||function(e,t,n,i){try{e.emit("change",t,n,i)}catch(e){j("error",'Error in .on("change", function):',e)}}(i,e,t,n)};var s=new Promise((function(e,n){t.complete=function(t,i){t?n(t):e(i)}}));i.once("cancel",(function(){e.removeListener("destroyed",o),t.complete(null,{status:"cancelled"})})),this.then=s.then.bind(s),this.catch=s.catch.bind(s),this.then((function(e){r(null,e)}),r),e.taskqueue.isReady?i.validateChanges(t):e.taskqueue.addTask((function(e){e?t.complete(e):i.isCancelled?i.emit("cancel"):i.validateChanges(t)}))}function Je(e,t,n){var i=[{rev:e._rev}];"all_docs"===n.style&&(i=Pe(t.rev_tree).map((function(e){return{rev:e.rev}})));var r={id:t.id,changes:i,doc:e};return Ge(t,e._rev)&&(r.deleted=!0),n.conflicts&&(r.doc._conflicts=je(t),r.doc._conflicts.length||delete r.doc._conflicts),r}function Xe(e,t){return et?1:0}function Ye(e,t){return function(n,i){n||i[0]&&i[0].error?((n=n||i[0]).docId=t,e(n)):e(null,i.length?i[0]:i)}}function Qe(e,t){var n=Xe(e._id,t._id);return 0!==n?n:Xe(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}function Ze(){for(var e in v.a.call(this),Ze.prototype)"function"==typeof this[e]&&(this[e]=this[e].bind(this))}function et(){this.isReady=!1,this.failed=!1,this.queue=[]}function tt(e,t){if(!(this instanceof tt))return new tt(e,t);var n=this;if(t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=L(t),n.auto_compaction=t.auto_compaction,n.prefix=tt.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var i=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var i=tt.adapters,r=tt.preferredAdapters,o=tt.prefix,s=t.adapter;if(!s)for(var a=0;at&&a.push(e)})),Ne(o,(function(e,t,n,i,r){var o=t+"-"+n;"available"===r.status&&-1!==a.indexOf(o)&&c.push(o)})),i._doCompaction(e,c,n)}))})),Ze.prototype.compact=C("compact",(function(e,t){"function"==typeof e&&(t=e,e={});e=e||{},this._compactionQueue=this._compactionQueue||[],this._compactionQueue.push({opts:e,callback:t}),1===this._compactionQueue.length&&function e(t){var n=t._compactionQueue[0],i=n.opts,r=n.callback;t.get("_local/compaction").catch((function(){return!1})).then((function(n){n&&n.last_seq&&(i.last_seq=n.last_seq),t._compact(i,(function(n,i){n?r(n):r(null,i),s()((function(){t._compactionQueue.shift(),t._compactionQueue.length&&e(t)}))}))}))}(this)})),Ze.prototype._compact=function(e,t){var n=this,i={return_docs:!1,last_seq:e.last_seq||0},r=[];n.changes(i).on("change",(function(e){r.push(n.compactDocument(e.id,0))})).on("complete",(function(e){var i=e.last_seq;Promise.all(r).then((function(){return me(n,"_local/compaction",(function(e){return(!e.last_seq||e.last_seq0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})),Ze.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new We(this,e,t)},Ze.prototype.close=C("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})),Ze.prototype.info=C("info",(function(e){var t=this;this._info((function(n,i){if(n)return e(n);i.db_name=i.db_name||t.name,i.auto_compaction=!(!t.auto_compaction||ae(t)),i.adapter=t.adapter,e(null,i)}))})),Ze.prototype.id=C("id",(function(e){return this._id(e)})),Ze.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},Ze.prototype.bulkDocs=C("bulkDocs",(function(e,t,n){if("function"==typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(ne(V));for(var i=0;i1?t.set(e.name,n):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach((function(e){e.emit("destroyed",!0)}))}}))}(tt),tt.adapter=function(e,t,n){t.valid()&&(tt.adapters[e]=t,n&&tt.preferredAdapters.push(e))},tt.plugin=function(e){if("function"==typeof e)e(tt);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){tt.prototype[t]=e[t]}))}return this.__defaults&&(tt.__defaults=R({},this.__defaults)),tt},tt.defaults=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);n=n||{},e&&"object"==typeof e&&(e=(n=e).name,delete n.name),n=R({},t.__defaults,n),tt.call(this,e,n)}return m()(t,tt),t.preferredAdapters=tt.preferredAdapters.slice(),Object.keys(tt).forEach((function(e){e in t||(t[e]=tt[e])})),t.__defaults=R({},this.__defaults,e),t},tt.fetch=function(e,t){return it(e,t)};function st(e,t){for(var n=e,i=0,r=t.length;i0&&"\\"===e[i-1]&&("$"===o||"."===o)?n=n.substring(0,n.length-1)+o:"."===o?(t.push(n),n=""):n+=o}return t.push(n),t}var ct=["$or","$nor","$not"];function lt(e){return ct.indexOf(e)>-1}function ut(e){return Object.keys(e)[0]}function dt(e){var t={},n={$or:!0,$nor:!0};return e.forEach((function(e){Object.keys(e).forEach((function(i){var r=e[i];if("object"!=typeof r&&(r={$eq:r}),lt(i))if(r instanceof Array){if(n[i])return n[i]=!1,void(t[i]=r);var o=[];t[i].forEach((function(e){Object.keys(r).forEach((function(t){var n=r[t],i=Math.max(Object.keys(e).length,Object.keys(n).length),s=dt([e,n]);Object.keys(s).length<=i||o.push(s)}))})),t[i]=o}else t[i]=dt([r]);else{var s=t[i]=t[i]||{};Object.keys(r).forEach((function(e){var t=r[e];return"$gt"===e||"$gte"===e?function(e,t,n){if(void 0!==n.$eq)return;void 0!==n.$gte?"$gte"===e?t>n.$gte&&(n.$gte=t):t>=n.$gte&&(delete n.$gte,n.$gt=t):void 0!==n.$gt?"$gte"===e?t>n.$gt&&(delete n.$gt,n.$gte=t):t>n.$gt&&(n.$gt=t):n[e]=t}(e,t,s):"$lt"===e||"$lte"===e?function(e,t,n){if(void 0!==n.$eq)return;void 0!==n.$lte?"$lte"===e?tt?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),i=Object.keys(t),r=Math.min(n.length,i.length),o=0;oi.length?1:-1}(e,t)}function pt(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var i=0;ir?1:0)}}(t.sort);e=e.sort(i),"string"!=typeof t.sort[0]&&"desc"===(r=t.sort[0])[ut(r)]&&(e=e.reverse())}var r;if("limit"in t||"skip"in t){var o=t.skip||0,s=("limit"in t?t.limit:e.length)+o;e=e.slice(o,s)}return e}function wt(e,t,n){return n.every((function(n){var i=t[n],r=at(n),o=st(e,r);return lt(n)?function(e,t,n){if("$or"===e)return t.some((function(e){return wt(n,e,Object.keys(e))}));if("$not"===e)return!wt(n,t,Object.keys(t));return!t.find((function(e){return wt(n,e,Object.keys(e))}))}(n,i,e):kt(i,e,r,o)}))}function kt(e,t,n,i){return!e||("object"==typeof e?Object.keys(e).every((function(r){var o=e[r];if(0===r.indexOf("$"))return St(r,t,o,n,i);var s=at(r);if(void 0===i&&"object"!=typeof o&&s.length>0)return!1;var a=st(i,s);return"object"==typeof o?kt(o,t,n,a):St("$eq",t,o,s,a)})):e===i)}function St(e,t,n,i,r){if(!xt[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return xt[e](t,n,i,r)}function Et(e){return null!=e}function Lt(e){return void 0!==e}function At(e,t){return t.some((function(t){return e instanceof Array?e.some((function(e){return 0===ht(t,e)})):0===ht(t,e)}))}var xt={$elemMatch:function(e,t,n,i){return!!Array.isArray(i)&&(0!==i.length&&("object"==typeof i[0]?i.some((function(e){return wt(e,t,Object.keys(t))})):i.some((function(i){return kt(t,e,n,i)}))))},$allMatch:function(e,t,n,i){return!!Array.isArray(i)&&(0!==i.length&&("object"==typeof i[0]?i.every((function(e){return wt(e,t,Object.keys(t))})):i.every((function(i){return kt(t,e,n,i)}))))},$eq:function(e,t,n,i){return Lt(i)&&0===ht(i,t)},$gte:function(e,t,n,i){return Lt(i)&&ht(i,t)>=0},$gt:function(e,t,n,i){return Lt(i)&&ht(i,t)>0},$lte:function(e,t,n,i){return Lt(i)&&ht(i,t)<=0},$lt:function(e,t,n,i){return Lt(i)&&ht(i,t)<0},$exists:function(e,t,n,i){return t?Lt(i):!Lt(i)},$mod:function(e,t,n,i){return Et(i)&&function(e,t){return"number"==typeof e&&parseInt(e,10)===e&&e%t[0]===t[1]}(i,t)},$ne:function(e,t,n,i){return t.every((function(e){return 0!==ht(i,e)}))},$in:function(e,t,n,i){return Et(i)&&At(i,t)},$nin:function(e,t,n,i){return Et(i)&&!At(i,t)},$size:function(e,t,n,i){return Et(i)&&Array.isArray(i)&&function(e,t){return e.length===t}(i,t)},$all:function(e,t,n,i){return Array.isArray(i)&&function(e,t){return t.every((function(t){return e.some((function(e){return 0===ht(t,e)}))}))}(i,t)},$regex:function(e,t,n,i){return Et(i)&&"string"==typeof i&&t.every((function(e){return function(e,t){return new RegExp(t).test(e)}(i,e)}))},$type:function(e,t,n,i){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}}(i,t)}};function Ct(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var n="string"==typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+n+'"'))}t()}function Bt(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=le(e.view):e.filter=le(e.filter))}function qt(e,t){return t.filter&&"string"==typeof t.filter&&!t.doc_ids&&!ae(e.db)}function It(e,t){var n=t.complete;if("_view"===t.filter){if(!t.view||"string"!=typeof t.view){var i=ne(Y,"`view` filter parameter not found or invalid.");return n(i)}var r=ce(t.view);e.db.get("_design/"+r[0],(function(i,o){if(e.isCancelled)return n(null,{status:"cancelled"});if(i)return n(ie(i));var s=o&&o.views&&o.views[r[1]]&&o.views[r[1]].map;if(!s)return n(ne(U,o.views?"missing json key: "+r[1]:"missing json key: views"));t.filter=pe(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+s+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{}),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){if("object"!=typeof t)throw new Error("Selector error: expected a JSON object");var n=_t([{doc:e}],{selector:t=ft(t)},Object.keys(t));return n&&1===n.length}(e,t.selector)},e.doChanges(t);else{var o=ce(t.filter);e.db.get("_design/"+o[0],(function(i,r){if(e.isCancelled)return n(null,{status:"cancelled"});if(i)return n(ie(i));var s=r&&r.filters&&r.filters[o[1]];if(!s)return n(ne(U,r&&r.filters?"missing json key: "+o[1]:"missing json key: filters"));t.filter=pe('"use strict";\nreturn '+s+";",{}),e.doChanges(t)}))}}function Ot(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}tt.plugin((function(e){e._changesFilterPlugin={validate:Ct,normalize:Bt,shouldFilter:qt,filter:It}})),tt.version="7.3.0";var Nt=Ot(["_id","_rev","_access","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),Tt=Ot(["_access","_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function Pt(e){if(!/^\d+-/.test(e))return ne(ee);var t=e.indexOf("-"),n=e.substring(0,t),i=e.substring(t+1);return{prefix:parseInt(n,10),id:i}}function jt(e,t,n){var i,r,o;n||(n={deterministic_revs:!0});var s={status:"available"};if(e._deleted&&(s.deleted=!0),t)if(e._id||(e._id=Ie()),r=qe(e,n.deterministic_revs),e._rev){if((o=Pt(e._rev)).error)return o;e._rev_tree=[{pos:o.prefix,ids:[o.id,{status:"missing"},[[r,s,[]]]]}],i=o.prefix+1}else e._rev_tree=[{pos:1,ids:[r,s,[]]}],i=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,i=e.ids,r=[i[0],t,[]],o=1,s=i.length;o1&&!n?(a={continue:function(){if(!o.length)return r();var n,a=o[o.length-1];if(t&&t.upper)try{n=IDBKeyRange.bound(a,t.upper,!0,t.upperOpen)}catch(e){if("DataError"===e.name&&0===e.code)return r()}else n=IDBKeyRange.lowerBound(a,!0);t=n,o=null,s=null,e.getAll(t,i).onsuccess=c,e.getAllKeys(t,i).onsuccess=l}},e.getAll(t,i).onsuccess=c,e.getAllKeys(t,i).onsuccess=l):n?e.openCursor(t,"prev").onsuccess=u:e.openCursor(t).onsuccess=u}function nn(e,t,n){var i,r,o="startkey"in e&&e.startkey,s="endkey"in e&&e.endkey,a="key"in e&&e.key,c="keys"in e&&e.keys,l=e.skip||0,u="number"==typeof e.limit?e.limit:-1,d=!1!==e.inclusive_end;if(!c&&(r=(i=function(e,t,n,i,r){try{if(e&&t)return r?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return r?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return r?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(i)return IDBKeyRange.only(i)}catch(e){return{error:e}}return null}(o,s,d,a,e.descending))&&i.error)&&("DataError"!==r.name||0!==r.code))return n(ne(Z,r.name,r.message));var f=[Vt,"by-sequence",Ut];e.attachments&&f.push("attach-store");var h=Qt(t,f,"readonly");if(h.error)return n(h.error);var p=h.txn;p.oncomplete=function(){e.attachments?Xt(k,e.binary).then(A):A()},p.onabort=Ht(n);var m,g,v,y=p.objectStore(Vt),b=p.objectStore("by-sequence"),_=p.objectStore(Ut),w=b.index("_doc_id_rev"),k=[];function S(t,n){var i={id:n.id,key:n.id,value:{rev:t}};n.deleted?c&&(k.push(i),i.value.deleted=!0,i.doc=null):l--<=0&&(k.push(i),e.include_docs&&function(t,n,i){var r=t.id+"::"+i;w.get(r).onsuccess=function(i){if(n.doc=Kt(i.target.result)||{},e.conflicts){var r=je(t);r.length&&(n.doc._conflicts=r)}Jt(n.doc,e,p)}}(n,i,t))}function E(e){for(var t=0,n=e.length;t0&&(g=e.target.result[0])},b.openCursor(null,"prev").onsuccess=function(e){var t=e.target.result,n=void 0;return t&&t.key&&(n=t.key),v({target:{result:[n]}})}),r||0===u?void 0:c?function(e,t,n){var i=new Array(e.length),r=0;e.forEach((function(o,s){t.get(o).onsuccess=function(t){t.target.result?i[s]=t.target.result:i[s]={key:o,error:"not_found"},++r===e.length&&n(e,i,{})}}))}(e.keys,y,L):-1===u?function(e,t,n){if("function"!=typeof e.getAll){var i=[];e.openCursor(t).onsuccess=function(e){var t=e.target.result;t?(i.push(t.value),t.continue()):n({target:{result:i}})}}else e.getAll(t).onsuccess=n}(y,i,(function(t){var n=t.target.result;e.descending&&(n=n.reverse()),E(n)})):void tn(y,i,e.descending,u+l,L)}var rn=!1,on=[];function sn(){!rn&&on.length&&(rn=!0,on.shift()())}function an(e,t,n,o){if((e=L(e)).continuous){var s=n+":"+Ie();return Zt.addListener(n,s,t,e),Zt.notify(n),{cancel:function(){Zt.removeListener(n,s)}}}var a=e.doc_ids&&new i(e.doc_ids);e.since=e.since||0;var c=e.since,l="limit"in e?e.limit:-1;0===l&&(l=1);var u,d,f,h,p=[],m=0,g=re(e),v=new r;function y(e,t,n,i){if(n.seq!==t)return i();if(n.winningRev===e._rev)return i(n,e);var r=e._id+"::"+n.winningRev;h.get(r).onsuccess=function(e){i(n,Kt(e.target.result))}}function b(){e.complete(null,{results:p,last_seq:c})}var _=[Vt,"by-sequence"];e.attachments&&_.push("attach-store");var w=Qt(o,_,"readonly");if(w.error)return e.complete(w.error);(u=w.txn).onabort=Ht(e.complete),u.oncomplete=function(){!e.continuous&&e.attachments?Xt(p).then(b):b()},d=u.objectStore("by-sequence"),f=u.objectStore(Vt),h=d.index("_doc_id_rev"),tn(d,e.since&&!e.descending?IDBKeyRange.lowerBound(e.since,!0):null,e.descending,l,(function(t,n,i){if(i&&t.length){var r=new Array(t.length),o=new Array(t.length),s=0;n.forEach((function(n,c){!function(e,t,n){if(a&&!a.has(e._id))return n();var i=v.get(e._id);if(i)return y(e,t,i,n);f.get(e._id).onsuccess=function(r){i=Gt(r.target.result),v.set(e._id,i),y(e,t,i,n)}}(Kt(n),t[c],(function(n,a){o[c]=n,r[c]=a,++s===t.length&&function(){for(var t=[],n=0,s=r.length;nr&&(r=n),t.continue()}}()}function s(){var e=zt(o,o.winningRev,o.deleted);n.put(e).onsuccess=function(){i.continue()}}}}e._meta=null,e._remote=!1,e.type=function(){return"idb"},e._id=x((function(t){t(null,e._meta.instanceId)})),e._bulkDocs=function(n,i,o){en(t,n,i,e,r,a(o))},e._get=function(e,t,n){var i,o,s,a=t.ctx;if(!a){var c=Qt(r,[Vt,"by-sequence","attach-store"],"readonly");if(c.error)return n(c.error);a=c.txn}function l(){n(s,{doc:i,metadata:o,ctx:a})}a.objectStore(Vt).get(e).onsuccess=function(e){if(!(o=Gt(e.target.result)))return s=ne(U,"missing"),l();var n;if(t.rev)n=t.latest?function(e,t){for(var n,i=t.rev_tree.slice();n=i.pop();){var r=n.pos,o=n.ids,s=o[0],a=o[1],c=o[2],l=0===c.length,u=n.history?n.history.slice():[];if(u.push({id:s,pos:r,opts:a}),l)for(var d=0,f=u.length;d=43)},i.onerror=e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)}})).catch((function(){return!1}))}(u)),cn.then((function(e){c=e,f()})),u.oncomplete=function(){d=!0,f()},u.onabort=Ht(n)},h.onerror=function(e){var t=e.target.error&&e.target.error.message;t?-1!==t.indexOf("stored database is a higher version")&&(t=new Error('This DB was created with the newer "indexeddb" adapter, but you are trying to open it with the older "idb" adapter')):t="Failed to open indexedDB, are you in private browsing mode?",j("error",t),n(ne(Z,t))}}(n,e,t)}),t,n.constructor)}dn.valid=function(){try{return"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}};var fn={};function hn(e){var t=e.doc||e.ok,n=t&&t._attachments;n&&Object.keys(n).forEach((function(e){var t=n[e];t.data=we(t.data,t.content_type)}))}function pn(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function mn(e){return e._attachments&&Object.keys(e._attachments)?Promise.all(Object.keys(e._attachments).map((function(t){var n=e._attachments[t];if(n.data&&"string"!=typeof n.data)return new Promise((function(e){Ee(n.data,e)})).then((function(e){n.data=e}))}))):Promise.resolve()}function gn(e,t){if(function(e){if(!e.prefix)return!1;var t=he(e.prefix).protocol;return"http"===t||"https"===t}(t)){var n=t.name.substr(t.prefix.length);e=t.prefix.replace(/\/?$/,"/")+encodeURIComponent(n)}var i=he(e);(i.user||i.password)&&(i.auth={username:i.user,password:i.password});var r=i.path.replace(/(^\/|\/$)/g,"").split("/");return i.db=r.pop(),-1===i.db.indexOf("%")&&(i.db=encodeURIComponent(i.db)),i.path=r.join("/"),i}function vn(e,t){return yn(e,e.db+"/"+t)}function yn(e,t){var n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function bn(e){return"?"+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}function _n(t,n){var i=this,r=gn(t.name,t),o=vn(r,"");t=L(t);var a,c=function(e,n){if((n=n||{}).headers=n.headers||new rt,n.credentials="include",t.auth||r.auth){var i=t.auth||r.auth,o=i.username+":"+i.password,s=ve(unescape(encodeURIComponent(o)));n.headers.set("Authorization","Basic "+s)}var a=t.headers||{};return Object.keys(a).forEach((function(e){n.headers.append(e,a[e])})),function(e){var t="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==t.indexOf("msie"),i=-1!==t.indexOf("trident"),r=-1!==t.indexOf("edge"),o=!("method"in e)||"GET"===e.method;return(n||i||r)&&o}(n)&&(e+=(-1===e.indexOf("?")?"?":"&")+"_nonce="+Date.now()),(t.fetch||it)(e,n)};function l(e,t){return C(e,h()((function(e){d().then((function(){return t.apply(this,e)})).catch((function(t){e.pop()(t)}))}))).bind(i)}function u(e,t,n){var i={};return(t=t||{}).headers=t.headers||new rt,t.headers.get("Content-Type")||t.headers.set("Content-Type","application/json"),t.headers.get("Accept")||t.headers.set("Accept","application/json"),c(e,t).then((function(e){return i.ok=e.ok,i.status=e.status,e.json()})).then((function(e){if(i.data=e,!i.ok){i.data.status=i.status;var t=ie(i.data);if(n)return n(t);throw t}if(Array.isArray(i.data)&&(i.data=i.data.map((function(e){return e.error||e.missing?ie(e):e}))),!n)return i;n(null,i.data)}))}function d(){return t.skip_setup?Promise.resolve():a||((a=u(o).catch((function(e){return e&&e.status&&404===e.status?(D(404,"PouchDB is just detecting if the remote exists."),u(o,{method:"PUT"})):Promise.reject(e)})).catch((function(e){return!(!e||!e.status||412!==e.status)||Promise.reject(e)}))).catch((function(){a=null})),a)}function f(e){return e.split("/").map(encodeURIComponent).join("/")}s()((function(){n(null,i)})),i._remote=!0,i.type=function(){return"http"},i.id=l("id",(function(e){c(yn(r,"")).then((function(e){return e.json()})).catch((function(){return{}})).then((function(t){var n=t&&t.uuid?t.uuid+r.db:vn(r,"");e(null,n)}))})),i.compact=l("compact",(function(e,t){"function"==typeof e&&(t=e,e={}),e=L(e),u(vn(r,"_compact"),{method:"POST"}).then((function(){!function n(){i.info((function(i,r){r&&!r.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)}))}()}))})),i.bulkGet=C("bulkGet",(function(e,t){var n=this;function i(t){var n={};e.revs&&(n.revs=!0),e.attachments&&(n.attachments=!0),e.latest&&(n.latest=!0),u(vn(r,"_bulk_get"+bn(n)),{method:"POST",body:JSON.stringify({docs:e.docs})}).then((function(n){e.attachments&&e.binary&&n.data.results.forEach((function(e){e.docs.forEach(hn)})),t(null,n.data)})).catch(t)}function o(){var i=Math.ceil(e.docs.length/50),r=0,o=new Array(i);function s(e){return function(n,s){o[e]=s.results,++r===i&&t(null,{results:oe(o)})}}for(var a=0;at?t:a;var c=vn(r,"_changes"+bn(i)),m={signal:p.signal,method:f,body:JSON.stringify(l)};h=n,e.aborted||d().then((function(){return u(c,m,s)})).catch(s)}},g={results:[]},v=function(n,i){if(!e.aborted){var r=0;if(i&&i.results){r=i.results.length,g.last_seq=i.last_seq;var c=null,l=null;"number"==typeof i.pending&&(c=i.pending),"string"!=typeof g.last_seq&&"number"!=typeof g.last_seq||(l=g.last_seq);e.query_params,i.results=i.results.filter((function(t){a--;var n=re(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&hn(t),e.return_docs&&g.results.push(t),e.onChange(t,c,l)),n}))}else if(n)return e.aborted=!0,void e.complete(n);i&&i.last_seq&&(h=i.last_seq);var u=o&&a<=0||i&&r0?e.slice(n):e}function d(e){var t=e.value;return t&&"object"==typeof t&&t._id||e.id}function f(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){var n=t[e];t[e].data=we(n.data,n.content_type)}))}))}(t),t}}function p(e,t,n,i){var r=t[e];void 0!==r&&(i&&(r=encodeURIComponent(JSON.stringify(r))),n.push(e+"="+r))}function m(e){if(void 0!==e){var t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function g(e,t){var n=e.descending?"endkey":"startkey",i=e.descending?"startkey":"endkey";if(void 0!==e[n]&&void 0!==e[i]&&ht(e[n],e[i])>0)throw new wn("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new wn("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new wn("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach((function(t){var n=function(e){if(e){if("number"!=typeof e)return new wn('Invalid value for integer: "'+e+'"');if(e<0)return new wn('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(n)throw n}))}function v(e){return function(t){if(404===t.status)return e;throw t}}function y(e,t,n){var r="_local/doc_"+e,o={_id:r,keys:[]},s=n.get(e),a=s[0];return(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(s[1])?Promise.resolve(o):t.db.get(r).catch(v(o))).then((function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(e).then((function(t){return function(e,t){for(var n=[],r=new i,o=0,s=t.rows.length;o0&&0===ht(s.key,t)&&a.push(i),n.set(gt(a),s),t=s.key}return n}return p().then((function(){return h.finish()})).then((function(){e.seq=c}))}(e,n)}))()}function w(e,t){return Ln(b(e),(function(){return function(e,t){var i,o=e.reduceFun&&!1!==t.reduce,s=t.skip||0;void 0===t.keys||t.keys.length||(t.limit=0,delete t.keys);function a(t){return t.include_docs=!0,e.db.allDocs(t).then((function(e){return i=e.total_rows,e.rows.map((function(e){if("value"in e.doc&&"object"==typeof e.doc.value&&null!==e.doc.value){var t=Object.keys(e.doc.value).sort(),n=["id","key","value"];if(!(tn))return e.doc.value}var i=function(e){for(var t=[],n=[],i=0;;){var r=e[i++];if("\0"!==r)switch(r){case"1":t.push(null);break;case"2":t.push("1"===e[i]),i++;break;case"3":var o=vt(e,i);t.push(o.num),i+=o.length;break;case"4":for(var s="";;){var a=e[i];if("\0"===a)break;s+=a,i++}s=s.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),t.push(s);break;case"5":var c={element:[],index:t.length};t.push(c.element),n.push(c);break;case"6":var l={element:{},index:t.length};t.push(l.element),n.push(l);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+r)}else{if(1===t.length)return t.pop();yt(t,n)}}}(e.doc._id);return{key:i[0],id:i[1],value:"value"in e.doc?e.doc.value:null}}))}))}function l(a){var l;if(l=o?function(e,t,i){0===i.group_level&&delete i.group_level;var r=i.group||i.group_level,o=n(e.reduceFun),s=[],a=isNaN(i.group_level)?Number.POSITIVE_INFINITY:i.group_level;t.forEach((function(e){var t=s[s.length-1],n=r?e.key:null;if(r&&Array.isArray(n)&&(n=n.slice(0,a)),t&&0===ht(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);s.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})})),t=[];for(var l=0,d=s.length;l0)||function(e){return e._conflicts&&e._conflicts.length>0}(e.doc)||(e.doc._conflicts&&delete e.doc._conflicts,r.push(e.doc),delete n[e.id])}))}))}return Promise.resolve().then((function(){var e=Object.keys(n).filter((function(e){var t=n[e].missing;return 1===t.length&&Gn(t[0])}));if(e.length>0)return s(e)})).then((function(){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){e[n].missing.forEach((function(e){t.push({id:n,rev:e})}))})),{docs:t,revs:!0,latest:!0}}(n);if(s.docs.length)return e.bulkGet(s).then((function(n){if(i.cancelled)throw new Error("cancelled");return Promise.all(n.results.map((function(n){return Promise.all(n.docs.map((function(n){var i=n.ok;return n.error&&(o=!1),i&&i._attachments?function(e,t,n){var i=ae(t)&&!ae(e),r=Object.keys(n._attachments);return i?e.get(n._id).then((function(i){return Promise.all(r.map((function(r){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(i,n,r)?t.getAttachment(n._id,r):e.getAttachment(i._id,r)})))})).catch((function(e){if(404!==e.status)throw e;return Kn(t,n)})):Kn(t,n)}(t,e,i).then((function(e){var t=Object.keys(i._attachments);return e.forEach((function(e,n){var r=i._attachments[t[n]];delete r.stub,delete r.length,r.data=e})),i})):i})))}))).then((function(e){r=r.concat(oe(e).filter(Boolean))}))}))})).then((function(){return{ok:o,docs:r}}))}function Jn(e,t,n,i,r){return e.get(t).catch((function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||D(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:i,_id:t,history:[],replicator:"pouchdb",version:1};throw n})).then((function(o){if(!r.cancelled&&o.last_seq!==n)return o.history=(o.history||[]).filter((function(e){return e.session_id!==i})),o.history.unshift({last_seq:n,session_id:i}),o.history=o.history.slice(0,5),o.version=1,o.replicator="pouchdb",o.session_id=i,o.last_seq=n,e.put(o).catch((function(o){if(409===o.status)return Jn(e,t,n,i,r);throw o}))}))}function Xn(e,t,n,i,r){this.src=e,this.target=t,this.id=n,this.returnValue=i,this.opts=r||{}}Xn.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then((function(){return n.updateSource(e,t)}))},Xn.prototype.updateTarget=function(e,t){return this.opts.writeTargetCheckpoint?Jn(this.target,this.id,e,t,this.returnValue):Promise.resolve(!0)},Xn.prototype.updateSource=function(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return Jn(this.src,this.id,e,t,this.returnValue).catch((function(e){if(Zn(e))return n.opts.writeSourceCheckpoint=!1,!0;throw e}))}return Promise.resolve(!0)};var Yn={undefined:function(e,t){return 0===ht(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return function(e,t){if(e.session_id===t.session_id)return{last_seq:e.last_seq,history:e.history};return function e(t,n){var i=t[0],r=t.slice(1),o=n[0],s=n.slice(1);if(!i||0===n.length)return{last_seq:0,history:[]};if(Qn(i.session_id,n))return{last_seq:i.last_seq,history:t};if(Qn(o.session_id,r))return{last_seq:o.last_seq,history:s};return e(r,s)}(e.history,t.history)}(t,e).last_seq}};function Qn(e,t){var n=t[0],i=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||Qn(e,i))}function Zn(e){return"number"==typeof e.status&&4===Math.floor(e.status/100)}Xn.prototype.getCheckpoint=function(){var e=this;return e.opts&&e.opts.writeSourceCheckpoint&&!e.opts.writeTargetCheckpoint?e.src.get(e.id).then((function(e){return e.last_seq||0})).catch((function(e){if(404!==e.status)throw e;return 0})):e.target.get(e.id).then((function(t){return e.opts&&e.opts.writeTargetCheckpoint&&!e.opts.writeSourceCheckpoint?t.last_seq||0:e.src.get(e.id).then((function(e){return t.version!==e.version?0:(n=t.version?t.version.toString():"undefined")in Yn?Yn[n](t,e):0;var n}),(function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:0}).then((function(){return 0}),(function(n){return Zn(n)?(e.opts.writeSourceCheckpoint=!1,t.last_seq):0}));throw n}))})).catch((function(e){if(404!==e.status)throw e;return 0}))};function ei(e,t,n){var i=n.doc_ids?n.doc_ids.sort(ht):"",r=n.filter?n.filter.toString():"",o="",s="",a="";return n.selector&&(a=JSON.stringify(n.selector)),n.filter&&n.query_params&&(o=JSON.stringify(function(e){return Object.keys(e).sort(ht).reduce((function(t,n){return t[n]=e[n],t}),{})}(n.query_params))),n.filter&&"_view"===n.filter&&(s=n.view.toString()),Promise.all([e.id(),t.id()]).then((function(e){var t=e[0]+e[1]+r+s+o+i+a;return new Promise((function(e){Ce(t,e)}))})).then((function(e){return"_local/"+(e=e.replace(/\//g,".").replace(/\+/g,"_"))}))}function ti(e,t,n,i,r){var o,a,c,l=[],u={seq:0,changes:[],docs:[]},d=!1,f=!1,h=!1,p=0,m=n.continuous||n.live||!1,g=n.batch_size||100,v=n.batches_limit||10,y=n.style||"all_docs",b=!1,_=n.doc_ids,w=n.selector,k=[],S=Ie();r=r||{ok:!0,start_time:(new Date).toISOString(),docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var E={};function A(){return c?Promise.resolve():ei(e,t,n).then((function(r){a=r;var o={};o=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},c=new Xn(e,t,a,i,o)}))}function x(){if(k=[],0!==o.docs.length){var e=o.docs,s={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},s).then((function(t){if(i.cancelled)throw N(),new Error("cancelled");var n=Object.create(null);t.forEach((function(e){e.error&&(n[e.id]=e)}));var o=Object.keys(n).length;r.doc_write_failures+=o,r.docs_written+=e.length-o,e.forEach((function(e){var t=n[e._id];if(t){r.errors.push(t);var o=(t.name||"").toLowerCase();if("unauthorized"!==o&&"forbidden"!==o)throw t;i.emit("denied",L(t))}else k.push(e)}))}),(function(t){throw r.doc_write_failures+=e.length,t}))}}function C(){if(o.error)throw new Error("There was a problem getting docs.");r.last_seq=p=o.seq;var e=L(r);return k.length&&(e.docs=k,"number"==typeof o.pending&&(e.pending=o.pending,delete o.pending),i.emit("change",e)),d=!0,c.writeCheckpoint(o.seq,S).then((function(){if(i.emit("checkpoint",{checkpoint:o.seq}),d=!1,i.cancelled)throw N(),new Error("cancelled");o=void 0,D()})).catch((function(e){throw F(e),e}))}function B(){return Wn(e,t,o.diffs,i).then((function(e){o.error=!e.ok,e.docs.forEach((function(e){delete o.diffs[e._id],r.docs_read++,o.docs.push(e)}))}))}function q(){var e;i.cancelled||o||(0!==l.length?(o=l.shift(),i.emit("checkpoint",{start_next_batch:o.seq}),(e={},o.changes.forEach((function(t){i.emit("checkpoint",{revs_diff:t}),"_user/"!==t.id&&(e[t.id]=t.changes.map((function(e){return e.rev})))})),t.revsDiff(e).then((function(e){if(i.cancelled)throw N(),new Error("cancelled");o.diffs=e}))).then(B).then(x).then(C).then(q).catch((function(e){O("batch processing terminated with error",e)}))):I(!0))}function I(e){0!==u.changes.length?(e||f||u.changes.length>=g)&&(l.push(u),u={seq:0,changes:[],docs:[]},"pending"!==i.state&&"stopped"!==i.state||(i.state="active",i.emit("active")),q()):0!==l.length||o||((m&&E.live||f)&&(i.state="pending",i.emit("paused")),f&&N())}function O(e,t){h||(t.message||(t.message=e),r.ok=!1,r.status="aborting",l=[],u={seq:0,changes:[],docs:[]},N(t))}function N(o){if(!(h||i.cancelled&&(r.status="cancelled",d)))if(r.status=r.status||"complete",r.end_time=(new Date).toISOString(),r.last_seq=p,h=!0,o){(o=ne(o)).result=r;var s=(o.name||"").toLowerCase();"unauthorized"===s||"forbidden"===s?(i.emit("error",o),i.removeAllListeners()):function(e,t,n,i){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();if("function"!=typeof e.back_off_function&&(e.back_off_function=M),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var r=function(){e.current_back_off=0};t.once("paused",(function(){t.removeListener("active",r)})),t.once("active",r)}e.current_back_off=e.current_back_off||0,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(i,e.current_back_off)}(n,i,o,(function(){ti(e,t,n,i)}))}else i.emit("complete",r),i.removeAllListeners()}function T(e,t,r){if(i.cancelled)return N();"number"==typeof t&&(u.pending=t),re(n)(e)&&(u.seq=e.seq||r,u.changes.push(e),i.emit("checkpoint",{pending_batch:u.seq}),s()((function(){I(0===l.length&&E.live)})))}function P(e){if(b=!1,i.cancelled)return N();if(e.results.length>0)E.since=e.results[e.results.length-1].seq,D(),I(!0);else{var t=function(){m?(E.live=!0,D()):f=!0,I(!0)};o||0!==e.results.length?t():(d=!0,c.writeCheckpoint(e.last_seq,S).then((function(){d=!1,r.last_seq=p=e.last_seq,t()})).catch(F))}}function j(e){if(b=!1,i.cancelled)return N();O("changes rejected",e)}function D(){if(!b&&!f&&l.length1)for(var n=1;na)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,c=m,r=f;var v=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;u[l++]=v>>>24&255,u[l++]=v>>>16&255,u[l++]=v>>>8&255,u[l++]=255&v;var y=p/4294967296*1e4&268435455;u[l++]=y>>>8&255,u[l++]=255&y,u[l++]=y>>>24&15|16,u[l++]=y>>>16&255,u[l++]=f>>>8|128,u[l++]=255&f;for(var b=0;b<6;++b)u[l+b]=d[b];return t||Object(s.a)(u)},u=n(11);var d=function(e){if(!Object(u.a)(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};var f=function(e,t,n){function i(e,i,r,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t,n,i,r,o){return p((s=p(p(t,e),p(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function g(e,t,n,i,r,o,s){return m(t&n|~t&i,e,t,r,o,s)}function v(e,t,n,i,r,o,s){return m(t&i|n&~i,e,t,r,o,s)}function y(e,t,n,i,r,o,s){return m(t^n^i,e,t,r,o,s)}function b(e,t,n,i,r,o,s){return m(n^(t|~i),e,t,r,o,s)}var _=f("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>i%32&255,o=parseInt("0123456789abcdef".charAt(r>>>4&15)+"0123456789abcdef".charAt(15&r),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<>>32-t}var E=f("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r>>0;b=y,y=v,v=S(g,30)>>>0,g=m,m=E}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),L="00000000-0000-0000-0000-000000000000";var A=function(e){if(!Object(u.a)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadAreaHTML=void 0,t.uploadAreaHTML='
\n\n
\n
\n
Upload Files
\n
\n
\n \n
\n
\n\n
Unpaired Documents
\n\n
\n\n
\n
MEI
\n
\n
\n\n
\n
Images
\n
\n
\n\n
\n\n
\n
Make Pair
\n
\n
\n\n
\n\n
Paired Folios
\n \n
\n\n
\n
\n Upload\n
\n
\n
\n\n
\n\n \x3c!--\n
\n

Manuscripts

\n
\n
\n --\x3e\n\n
\n
'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupingNotRecognized=void 0,t.groupingNotRecognized=function(){window.confirm("Neon does not recognize this neume grouping. Would you like to create a compound neume?")||document.getElementById("undo").click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitStaffHandler=void 0;const i=n(4),r=n(3),o=n(18),s=n(12);t.SplitStaffHandler=class{constructor(e,t){this.handler=(e=>{const t=this.staff.id,n=(0,s.getSVGRelCoords)(e.clientX,e.clientY),a={action:"split",param:{elementId:t,x:n.x}};this.neonView.edit(a,this.neonView.view.getCurrentPageURI()).then(async e=>{e&&(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success"));const n=new o.default(this.neonView,".staff");this.splitDisable(),(0,r.selectAll)([document.querySelector("#"+t)],this.neonView,n);const s=document.getElementById("moreEdit");s&&(s.innerHTML="",s.parentElement.classList.add("hidden"))})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.staff=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click Where to Split")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitNeumeHandler=void 0;const i=n(4);t.SplitNeumeHandler=class{constructor(e,t){this.handler=(e=>{const t={action:"splitNeume",param:{elementId:this.neume.id,ncId:e.target.parentElement.id}};this.neonView.edit(t,this.neonView.view.getCurrentPageURI()).then(async e=>{e?(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success")):(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action failed","error")),this.splitDisable()})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.neume=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click The Beginning of The Second Neume")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t){},function(e,t,n){"use strict";(function(e){t.test=function(){return"function"==typeof e.queueMicrotask},t.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){var n=e.MutationObserver||e.WebKitMutationObserver;t.test=function(){return n},t.install=function(t){var i=0,r=new n(t),o=e.document.createTextNode("");return r.observe(o,{characterData:!0}),function(){o.data=i=++i%2}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},t.install=function(t){var n=new e.MessageChannel;return n.port1.onmessage=t,function(){n.port2.postMessage(0)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},t.install=function(t){return function(){var n=e.document.createElement("script");return n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n),t}}}).call(this,n(9))},function(e,t,n){"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitDocumentSelector=t.updateDocumentSelector=void 0;const i=n(55),r=n(57),o=n(56),s=document.querySelector("#uploaded-docs-content"),a=document.querySelector("#sample-docs-content"),c=document.querySelector("#open-doc"),l=document.querySelector("#remove-doc");let u,d,f=!1,h=!1;const p=new class{constructor(){this.prevSelection=[],this.reset()}setStart(e){this.reset(),this.start=Math.max(e,0)}setEnd(e){this.end=e}reset(){this.start=0,this.end=-1,this.prevSelection.splice(0)}getPrevSelection(){return this.prevSelection}getSelection(){let e,t;if(-1===this.end)return[];this.endn+e).filter(e=>!d[e]);return this.prevSelection=n,n}};function m(){return u.filter((e,t)=>d[t])}function g(e,t){const n=(i=t?{storage:e}:{manifest:e},Object.keys(i).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(i[e])).join("&"));var i;window.open("./editor.html?"+n,"_blank")}function v(e,t){if(null!=e)t=null!=t?t:u.indexOf(e.id);else{if(null==t)return;e=document.getElementById(u[t])}e.classList.remove("selected"),d[t]=!1}function y(){Array.from(document.querySelectorAll(".document-entry.selected")).forEach(e=>e.classList.remove("selected")),d.fill(!1)}function b(e,t){if(null!=e)t=null!=t?t:u.indexOf(e.id);else{if(null==t)return;e=document.getElementById(u[t])}e.classList.add("selected"),d[t]=!0}function _(){const e=d.lastIndexOf(!0);-1===e?(c.classList.remove("active"),l.classList.remove("active")):(c.classList.add("active"),e{const t=document.createElement("div");t.setAttribute("id",e),t.classList.add("document-entry"),t.classList.add("uploaded-doc");const n=document.createElement("div");n.classList.add("filename-text"),n.innerHTML=(0,r.formatFilename)(e,25),t.appendChild(n),s.appendChild(t)});a.innerHTML="";const t=(0,i.fetchSampleDocuments)();if(t.sort(),0===t.length){const e=document.createElement("div");e.setAttribute("id","no-sample-docs"),e.innerHTML="No Documents Uploaded",a.appendChild(e)}else t.forEach(e=>{const t=document.createElement("div");t.setAttribute("id",e),t.classList.add("document-entry");const n=document.createElement("div");n.classList.add("filename-text"),n.innerHTML=(0,r.formatFilename)(e,25),t.appendChild(n),a.appendChild(t)});u=e.concat(o.samples),d=new Array(u.length).fill(!1),u.forEach((e,t)=>{const n=document.getElementById(""+e);n.addEventListener("dblclick",k,!1),n.addEventListener("click",(function(e){f||h?f?(d[t]?(v(n,t),p.setStart(d.lastIndexOf(!0))):(b(n,t),p.setStart(t)),_()):h&&(p.getPrevSelection().forEach(e=>{v(null,e)}),p.setEnd(t),p.getSelection().forEach(e=>{b(null,e)}),_()):(y(),b(n,t),p.setStart(t),_())}),!1)})}function k(){c.classList.contains("active")&&(m().map(e=>document.getElementById(e)).forEach(e=>{!function(e){const t=!!e.classList.contains("uploaded-doc");g(e.id,t)}(e)}),p.reset(),y(),_())}function S(){if(!l.classList.contains("active"))return;const e=m(),t="Are you sure you want to delete:\n"+e.join("\n")+"\n\nThis action is irreversible.";if(window.confirm(t)){const t=e.map(e=>(0,i.deleteEntry)(e));Promise.all(t).then(()=>{w()}).catch(e=>console.debug("failed to delete files: ",e)),y(),p.reset()}_()}t.updateDocumentSelector=w;t.InitDocumentSelector=()=>{c.addEventListener("click",k),l.addEventListener("click",S),window.addEventListener("keydown",e=>{e.metaKey&&(f=!0),e.shiftKey&&(h=!0),"Escape"===e.key&&(y(),p.reset(),_())}),window.addEventListener("keyup",e=>{e.metaKey||(f=!1),e.shiftKey||(h=!1)});document.querySelector(".main-section-content").addEventListener("click",(function(e){const t=e.target.classList;["document-entry","filename-text"].some(e=>t.contains(e))||(y(),p.reset(),_())})),w()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteEntry=t.addEntry=t.createManifest=t.fetchSampleDocuments=t.fetchUploadedDocuments=void 0;const i=n(31),r=n(29),o=n(91),s=n(56),a=new r.default("Neon-User-Storage");t.fetchUploadedDocuments=async function(){return await new Promise((e,t)=>{a.allDocs({include_docs:!0}).then(t=>e(t)).catch(e=>t(e))}).then(e=>e.rows.map(e=>e.key)).catch(e=>(console.log("Could'nt fetch uploaded documents",e.message),[]))},t.fetchSampleDocuments=function(){return s.samples},t.createManifest=function(e,t,n){return new Promise(async r=>{const s=JSON.parse(JSON.stringify(o));s["@id"]=(0,i.v4)(),s.title=e,s.timestamp=(new Date).toISOString();const a=new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e(n.result)}),n.readAsDataURL(t)}),c=new Promise(e=>{const t=new FileReader;t.addEventListener("load",()=>{e(t.result)}),t.readAsDataURL(n)}),l=await a,u=await c;s.image=u,s.mei_annotations=[{id:(0,i.v4)(),type:"Annotation",body:l,target:u}],r(s)})},t.addEntry=function(e,t,n){return new Promise((i,r)=>{a.put({_id:e,kind:n?"page":"manuscript",_attachments:{manifest:{content_type:"application/ld+json",data:t}}}).then(e=>{i(!0)}).catch(t=>{window.alert(`Error Uploading Document: ${t.message}, ${e}.`),r(!1)})})},t.deleteEntry=function(e){return new Promise((t,n)=>{a.get(e).then(e=>{a.remove(e).then(e=>{t(!0)}).catch(e=>{console.log(e),n(e)})}).catch(e=>{console.log(e),n(e)})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.samples=void 0,t.samples=["CF-005","CF-009","CF-010","CF-011","CF-012","CF-013","CF-014","CF-015","CF-016","CF-017","CF-018","CF-019","CF-020","CF-024","CF-025","CF-026","CF-027","CF-028","CF-029","CF-030","CF-031","CF-032","CF-033","CF-034","CF-035","CF-036","CF-037","CF-038","CF-039","CF-040","CF-041","CF-042","CF-044","CF-045","CF-046","CF-047","CF-048","CF-049","CF-050","CF-051","CF-052","CF-053","CF-054","CF-055","CF-056","Salzinnes"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renameFile=t.formatFilename=void 0,t.formatFilename=function(e,t){const n=Math.floor(t/2),i=e.length;return i<=t?e:`${e.substring(0,n-1)}...${e.substring(i-n+2,i)}`},t.renameFile=function(e,t){const n=new RegExp(e),i=t.filter(e=>n.test(e));if(0!==i.length){const t=/\(\d+\),/g,n=i.join().concat(",").match(t);if(null!==n){const t=n.map(e=>{const t=e.substring(1,e.length-2);return Number(t)});t.sort();const i=t.indexOf(1);if(-1===i)return e+"(1)";{let n=1;for(let e=i+1;e{const r=e.name.split(".").pop();if("mei"===r){const n=c(e.name,"mei");t.appendChild(n),a.addFile(e)}else if(["png","jpg","jpeg"].includes(r)){const t=c(e.name,"image");n.appendChild(t),a.addFile(e)}else"jsonld"===r||i.push(e)}),i},t.handleMakePair=function(){const e=document.querySelector("#paired_list"),t=document.querySelector('input[name="mei_radio_group"]:checked'),n=document.querySelector('input[name="image_radio_group"]:checked');if(null===t||null===n)return;const i=t.value,r=n.value,s=i.substring(0,i.length-4),l=function(e,t,n){const i=document.querySelector("#mei_list"),r=document.querySelector("#image_list"),s=document.createElement("div");s.className="folio_item",s.setAttribute("mei",t),s.setAttribute("image",n);const l=document.createElement("div");function u(){s.remove(),a.removeFolio(e);const o=c(t,"mei");i.appendChild(o);const l=c(n,"image");r.appendChild(l)}l.classList.add("folio-filename"),l.innerHTML=(0,o.formatFilename)(e,25),s.appendChild(l);const d=document.createElement("img");return d.className="unpair_btn",d.src="/Neon/Neon-gh/assets/img/unpair-doc.svg",d.title="unpair",d.addEventListener("click",u),s.appendChild(d),s}(s,i,r);e.appendChild(l),a.addFolio(s,i,r),t.parentElement.parentElement.remove(),n.parentElement.parentElement.remove()},t.handleUploadAllDocuments=async function(){const e=await(0,s.fetchUploadedDocuments)(),t=(0,s.fetchSampleDocuments)(),n=e.concat(t),i=a.getFolios().map(async([e,t,i])=>{const r=(0,o.renameFile)(e,n);return n.push(r),await async function(e,t,n){return(0,s.createManifest)(e,t,n).then(t=>{const n=new Blob([JSON.stringify(t,null,2)],{type:"application/ld+json"});return(0,s.addEntry)(e,n,!0)})}(r,t,i)});a.clear();const r=i.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e})));return Promise.all(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){this.allFiles=new Map,this.folios=new Array}static getInstance(){return i.instance||(i.instance=new i),i.instance}addFile(e){if(this.allFiles.has(e.name)){const t={file:e,count:this.getFileCount(e.name)+1};this.allFiles.set(e.name,t)}else{const t={file:e,count:1};this.allFiles.set(e.name,t)}}getFile(e){if(this.allFiles.has(e))return this.allFiles.get(e).file}removeFile(e){const t=this.getFileCount(e);if(0!==t)if(1===t)this.allFiles.delete(e);else{const n={file:this.allFiles.get(e).file,count:t-1};this.allFiles.set(e,n)}}getFileCount(e){return this.allFiles.has(e)?this.allFiles.get(e).count:0}addFolio(e,t,n){const i={filename:e,mei_filename:t,image_filename:n};this.folios.push(i)}removeFolio(e){const t=this.folios.findIndex(t=>t.filename===e);this.folios.splice(t,1)}getFolios(){return this.folios.map(e=>{const t=e.filename,n=e.mei_filename,i=e.image_filename;return[t,this.getFile(n),this.getFile(i)]})}clear(){this.allFiles.clear(),this.folios.splice(0)}print(){console.log(this.allFiles),console.log(this.folios)}}t.default=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.fm=void 0;const o=n(54),s=n(92),a=n(59);t.fm=a.default.getInstance(),(0,o.InitDocumentSelector)(),null===(i=document.querySelector("#upload-new-doc-button"))||void 0===i||i.addEventListener("click",(function(){(0,s.InitUploadArea)()})),null===(r=document.querySelector("#home-link"))||void 0===r||r.setAttribute("href","https://ddmal.music.mcgill.ca/Neon")},function(e){e.exports=JSON.parse('{"@context":["http://www.w3.org/ns/anno.jsonld",{"schema":"http://schema.org/","title":"schema:name","timestamp":"schema:dateModified","image":{"@id":"schema:image","@type":"@id"},"mei_annotations":{"@id":"Annotation","@type":"@id","@container":"@list"}}]}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitUploadArea=void 0;const i=n(58),r=n(17),o=n(58),s=n(54);t.InitUploadArea=function(){const e=new r.ModalWindow;e.setModalWindowView(r.ModalWindowView.DOCUMENT_UPLOAD),e.openModalWindow(),document.querySelector("#make_pair").addEventListener("click",o.handleMakePair),document.querySelector("#upload_button").addEventListener("click",(async function(){const t=document.querySelector("#uploading_spinner");t.classList.add("visible"),(0,o.handleUploadAllDocuments)().then(n=>{setTimeout(async()=>{await(0,s.updateDocumentSelector)(),t.classList.remove("visible"),e.hideModalWindow()},2e3)}).catch(n=>{console.log("One or more uploads rejected: ",n),setTimeout(async()=>{await(0,s.updateDocumentSelector)(),t.classList.remove("visible"),e.hideModalWindow()},2e3)})}));const t=document.createElement("input");t.type="file",t.multiple=!0,t.addEventListener("change",(function(){const e=t.files,n=Array.from(e),r=(0,i.addNewFiles)(n);if(0!==r.length){const e=r.map(e=>e.name);window.alert("The following files are not .mei, .png, .jpeg, or .jsonld files: \n\n"+e.join("\n"))}t.value=null}));const n=document.querySelector("#initial_upload_area");n.onclick=()=>t.click(),n.ondragleave=()=>n.classList.remove("over"),n.ondragover=e=>{e.stopPropagation(),e.preventDefault(),n.classList.add("over"),e.dataTransfer.dropEffect="copy"},n.ondrop=e=>{e.stopPropagation(),e.preventDefault(),n.classList.remove("over");const t=e.dataTransfer.files,r=Array.from(t),o=(0,i.addNewFiles)(r);if(0!==o.length){const e=o.map(e=>e.name);window.alert("The following files are not .mei, .png, .jpeg, or .jsonld files: \n\n"+e.join("\n"))}}}}]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2V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1xuICAgICAgICAgICAgICAgICAgR3JvdXBpbmcudHJpZ2dlckdyb3VwaW5nKCdsaWdhdHVyZScpOyBcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgR3JvdXBpbmcudHJpZ2dlckdyb3VwaW5nKCduYycpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBTZWxlY3RPcHRpb25zLnRyaWdnZXJEZWZhdWx0QWN0aW9ucygpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICBpZiAoc2hhcmVkU2Vjb25kTGV2ZWxQYXJlbnQoZ3JvdXBzKSkge1xuICAgICAgICAgICAgR3JvdXBpbmcudHJpZ2dlckdyb3VwaW5nKCduYycpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBTZWxlY3RPcHRpb25zLnRyaWdnZXJEZWZhdWx0QWN0aW9ucygpO1xuICAgICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgJ3NlbEJ5QkJveCc6XG4gICAgICBzd2l0Y2ggKGdyb3Vwcy5sZW5ndGgpIHtcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgIHNlbGVjdEJCb3goZ3JvdXBzWzBdLCBkcmFnSGFuZGxlciwgbmVvblZpZXcpO1xuICAgICAgICAgIFNlbGVjdE9wdGlvbnMudHJpZ2dlckRlZmF1bHRBY3Rpb25zKCk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgZ3JvdXBzLmZvckVhY2goZyA9PiBzZWxlY3RCQm94KGcsIGRyYWdIYW5kbGVyLCB1bmRlZmluZWQpKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICAgIGJyZWFrO1xuICAgIGRlZmF1bHQ6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ICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8IS0tXG4gICAgICAgICAgICAgICAgICAgICogVGhlIGV4dHJhRWRpdCBwYW5lbCBpcyBhZGRlZCBmb3IgZWRpdCBvcHRpb25zIHRoYXQgaGF2ZSBkcm9wZG93biBtZW51c1xuICAgICAgICAgICAgICAgICAgICAqIExpa2UgdGhlIE5ldW1lIGFuZCBDbGVmIG1lbnVzXG4gICAgICAgICAgICAgICAgICAgICogVGhpcyBpcyBkb25lIGJlY2F1c2UgdGhlIG1vcmVFZGl0IG1lbnUgbmVlZHMgdG8gaGF2ZSBvdmVyZmxvdyBmb3IgY2FzZXMgd2hlcmUgaXQgaGFzIGxvdHMgb2YgYnV0dG9uc1xuICAgICAgICAgICAgICAgICAgICAqIEJ1dCBvdmVyZmxvdyBydWlucyBkcm9wZG93biBtZW51c1xuICAgICAgICAgICAgICAgICAgICAtLT5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGFuZWwtY29udGVudC1zdWJzZWN0aW9uIGhpZGRlblwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwibmV1bWVFZGl0XCI+PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInBhbmVsLWNvbnRlbnQtc3Vic2VjdGlvblwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidW5kb1JlZG9fY29udHJvbHNcIj48L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgPC9kaXY+YDtcblxuXG4vKipcbiAqIENvbnRlbnRzIG9mIGV4dHJhIG5jIGFjdGlvbiBtZW51LlxuICovXG5leHBvcnQgY29uc3QgbmNBY3Rpb25Db250ZW50cyA9XG4gICAgYDxsYWJlbD5DaGFuZ2UgSGVhZCBTaGFwZTo8L2xhYmVsPlxuICAgIDxkaXYgY2xhc3M9XCJkcm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GVudFwiIGlkPVwibmVvbi1tb2RhbC13aW5kb3ctY29udGVudC1ob3RrZXlzXCI+XG4gICAgICAgIDwhLS0gXCJEaXNwbGF5XCIgaG90a2V5cyAtLT5cbiAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktc3ViY2F0ZWdvcnktdGl0bGVcIj5EaXNwbGF5PC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPis8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+Wm9vbSBJbjwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPi08L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+Wm9vbSBPdXQ8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+MDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5ab29tIFJlc2V0PC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPmg8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+SGlkZSBHbHlwaDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuXG4gICAgICAgIDwhLS0gXCJFZGl0XCIgaG90a2V5cyAtLT5cbiAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktc3ViY2F0ZWdvcnktdGl0bGVcIj5FZGl0PC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5DdHJsPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+ejwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pm9yPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj7ijJg8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj56PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlVuZG88L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+Q3RybDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+ejwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pm9yPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj7ijJg8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPno8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+UmVkbzwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5xL3cvZS9yL3QveTwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgSGlnaGxpZ2h0IGJ5IFN0YWZmL1N5bGxhYmxlL05ldW1lL0xheWVyRWxlbWVudC9TZWxlY3Rpb24vT2ZmXG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPjEvMi8zLzQ8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+XG4gICAgICAgICAgICAgICAgICAgIFNlbGVjdCBieSBTeWxsYWJsZS9OZXVtZS9OZXVtZSBDb21wb25lbnQvU3RhZmZcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+U2hpZnQ8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5OdW1iZXI8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+XG4gICAgICAgICAgICAgICAgICAgIEJlZ2luIEluc2VydCBmb3IgdGhlIDxpPm50aDwvaT4gb3B0aW9uIGluIHRoZSBzZWxlY3RlZCB0YWJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cblxuICAgICAgICA8IS0tIFwiT3RoZXJcIiBob3RrZXlzIC0tPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LWNvbnRhaW5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AoeCwgeSkge1xuICAgICAgICAgICAgdmFyIGxzdyA9ICh4ICYgMHhGRkZGKSArICh5ICYgMHhGRkZGKSxcbiAgICAgICAgICAgICAgICBtc3cgPSAoeCA+PiAxNikgKyAoeSA+PiAxNikgKyAobHN3ID4+IDE2KTtcbiAgICAgICAgICAgIHJldHVybiAobXN3IDw8IDE2KSB8IChsc3cgJiAweEZGRkYpO1xuICAgICAgICB9O1xuICAgIH1cblxuICAgIC8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuXG4gICAgLyoqXG4gICAgICogQXJyYXlCdWZmZXIgc2xpY2UgcG9seWZpbGwuXG4gICAgICpcbiAgICAgKiBAc2VlIGh0dHBzOi8vZ2l0aHViLmNvbS90dGF1YmVydC9ub2RlLWFycmF5YnVmZmVyLXNsaWNlXG4gICAgICovXG5cbiAgICBpZiAodHlwZW9mIEFycmF5QnVmZmVyICE9PSAndW5kZWZpbmVkJyAmJiAhQXJyYXlCdWZmZXIucHJvdG90eXBlLnNsaWNlKSB7XG4gICAgICAgIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBmdW5jdGlvbiBjbGFtcCh2YWwsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHZhbCA9ICh2YWwgfCAwKSB8fCAwO1xuXG4gICAgICAgICAgICAgICAgaWYgKHZhbCA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWF4KHZhbCArIGxlbmd0aCwgMCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKHZhbCwgbGVuZ3RoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgQXJyYXlCdWZmZXIucHJvdG90eXBlLnNsaWNlID0gZnVuY3Rpb24gKGZyb20sIHRvKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMuYnl0ZUxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgYmVnaW4gPSBjbGFtcChmcm9tLCBsZW5ndGgpLFxuICAgICAgICAgICAgICAgICAgICBlbmQgPSBsZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgIG51bSxcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LFxuICAgICAgICAgICAgICAgICAgICB0YXJnZXRBcnJheSxcbiAgICAgICAgICAgICAgICAgICAgc291cmNlQXJyYXk7XG5cbiAgICAgICAgICAgICAgICBpZiAodG8gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBlbmQgPSBjbGFtcCh0bywgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoYmVnaW4gPiBlbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBcnJheUJ1ZmZlcigwKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBudW0gPSBlbmQgLSBiZWdpbjtcbiAgICAgICAgICAgICAgICB0YXJnZXQgPSBuZXcgQXJyYXlCdWZmZXIobnVtKTtcbiAgICAgICAgICAgICAgICB0YXJnZXRBcnJheSA9IG5ldyBVaW50OEFycmF5KHRhcmdldCk7XG5cbiAgICAgICAgICAgICAgICBzb3VyY2VBcnJheSA9IG5ldyBVaW50OEFycmF5KHRoaXMsIGJlZ2luLCBudW0pO1xuICAgICAgICAgICAgICAgIHRhcmdldEFycmF5LnNldChzb3VyY2VBcnJheSk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGFyZ2V0O1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcbiAgICB9XG5cbiAgICAvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cblxuICAgIC8qKlxuICAgICAqIEhlbHBlcnMuXG4gICAgICovXG5cbiAgICBmdW5jdGlvbiB0b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AgaWYgKHJhdykge1xuICAgICAgICAgICAgcmV0ID0gaGV4VG9CaW5hcnlTdHJpbmcocmV0KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucmVzZXQoKTtcblxuICAgICAgICByZXR1cm4gcmV0O1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXNldHMgdGhlIGludGVybmFsIHN0YXRlIG9mIHRoZSBjb21wdXRhdGlvbi5cbiAgICAgKlxuICAgICAqIEByZXR1cm4ge1NwYXJrTUQ1fSBUaGUgaW5zdGFuY2UgaXRzZWxmXG4gICAgICovXG4gICAgU3BhcmtNRDUucHJvdG90eXBlLnJlc2V0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLl9idWZmID0gJyc7XG4gICAgICAgIHRoaXMuX2xlbmd0aCA9IDA7XG4gICAgICAgIHRoaXMuX2hhc2ggPSBbMTczMjU4NDE5MywgLTI3MTczMzg3OSwgLTE3MzI1ODQxOTQsIDI3MTczMzg3OF07XG5cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGludGVybmFsIHN0YXRlIG9mIHRoZSBjb21wdXRhdGlvbi5cbiAgICAgKlxuICAgICAqIEByZXR1cm4ge09iamVjdH0gVGhlIHN0YXRlXG4gICAgICovXG4gICAgU3BhcmtNRDUucHJvdG90eXBlLmdldFN0YXRlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgYnVmZjogdGhpcy5fYnVmZixcbiAgICAgICAgICAgIGxlbmd0aDogdGhpcy5fbGVuZ3RoLFxuICAgICAgICAgICAgaGFzaDogdGhpcy5faGFzaC5zbGljZSgpXG4gICAgICAgIH07XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGludGVybmFsIHN0YXRlIG9mIHRoZSBjb21wdXRhdGlvbi5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0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pcbiAgICAgIGNhc2UgJzonOlxuICAgICAgY2FzZSAnLCc6XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnbic6XG4gICAgICAgIGkgKz0gMzsgLy8gJ3VsbCdcbiAgICAgICAgcG9wKG51bGwsIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3QnOlxuICAgICAgICBpICs9IDM7IC8vICdydWUnXG4gICAgICAgIHBvcCh0cnVlLCBzdGFjaywgbWV0YVN0YWNrKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdmJzpcbiAgICAgICAgaSArPSA0OyAvLyAnYWxzZSdcbiAgICAgICAgcG9wKGZhbHNlLCBzdGFjaywgbWV0YVN0YWNrKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICcwJzpcbiAgICAgIGNhc2UgJzEnOlxuICAgICAgY2FzZSAnMic6XG4gICAgICBjYXNlICczJzpcbiAgICAgIGNhc2UgJzQnOlxuICAgICAgY2FzZSAnNSc6XG4gICAgICBjYXNlICc2JzpcbiAgICAgIGNhc2UgJzcnOlxuICAgICAgY2FzZSAnOCc6XG4gICAgICBjYXNlICc5JzpcbiAgICAgIGNhc2UgJy0nOlxuICAgICAgICBwYXJzZWROdW0gPSAnJztcbiAgICAgICAgaS0tO1xuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgIG51bUNoYXIgPSBzdHJbaSsrXTtcbiAgICAgICAgICBpZiAoL1tcXGRcXC5cXC1lXFwrXS8udGVzdChudW1DaGFyKSkge1xuICAgICAgICAgICAgcGFyc2VkTnVtICs9IG51bUNoYXI7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBwb3AocGFyc2VGbG9hdChwYXJzZWROdW0pLCBzdGFjaywgbWV0YVN0YWNrKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdcIic6XG4gICAgICAgIHBhcnNlZFN0cmluZyA9ICcnO1xuICAgICAgICBsYXN0Q2ggPSB2b2lkIDA7XG4gICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcyA9IDA7XG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgY2ggPSBzdHJbaSsrXTtcbiAgICAgICAgICBpZiAoY2ggIT09ICdcIicgfHwgKGxhc3RDaCA9PT0gJ1xcXFwnICYmXG4gICAgICAgICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcyAlIDIgPT09IDEpKSB7XG4gICAgICAgICAgICBwYXJzZWRTdHJpbmcgKz0gY2g7XG4gICAgICAgICAgICBsYXN0Q2ggPSBjaDtcbiAgICAgICAgICAgIGlmIChsYXN0Q2ggPT09ICdcXFxcJykge1xuICAgICAgICAgICAgICBudW1Db25zZWN1dGl2ZVNsYXNoZXMrKztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcyA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBwb3AoSlNPTi5wYXJzZSgnXCInICsgcGFyc2VkU3RyaW5nICsgJ1wiJyksIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ1snOlxuICAgICAgICBhcnJheUVsZW1lbnQgPSB7IGVsZW1lbnQ6IFtdLCBpbmRleDogc3RhY2subGVuZ3RoIH07XG4gICAgICAgIHN0YWNrLnB1c2goYXJyYXlFbGVtZW50LmVsZW1lbnQpO1xuICAgICAgICBtZXRhU3RhY2sucHVzaChhcnJheUVsZW1lbnQpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3snOlxuICAgICAgICBvYmpFbGVtZW50ID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bGVjdG9yKCcuc3lsVGV4dFJlY3QtZGlzcGxheScpO1xuICAgICAgaWYgKHJlY3QgPT09IG51bGwpIHtcbiAgICAgICAgY29uc29sZS53YXJuKCdUcmllZCB0byBkcmF3IHJlc2l6ZSByZWN0IGZvciBhIHN5bFRleHRSZWN0IHRoYXQgZG9lc25cXCd0IGV4aXN0IChvciBpc25cXCd0IGRpc3BsYXlpbmcpJyk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIHVseCA9IE51bWJlcihyZWN0LmdldEF0dHJpYnV0ZSgneCcpKTtcbiAgICAgIHVseSA9IE51bWJlcihyZWN0LmdldEF0dHJpYnV0ZSgneScpKTtcbiAgICAgIGxyeCA9ICt1bHggKyArcmVjdC5nZXRBdHRyaWJ1dGUoJ3dpZHRoJyk7XG4gICAgICBscnkgPSArdWx5ICsgK3JlY3QuZ2V0QXR0cmlidXRlKCdoZWlnaHQnKTtcblxuICAgICAgcm90YXRlID0gMDtcbiAgICB9XG5cbiAgICAvLyBpZiBpdCdzIGEgc3RhZmYgdXNlIHRoZSBwYXRocyB0byBnZXQgaXQncyBib3VuZGluZ2JveFxuICAgIGlmIChlbGVtZW50LmNsYXNzTGlzdC5jb250YWlucygnc3RhZmYnKSkge1xuICAgICAgY29uc3QgYmJveCA9IGdldFN0YWZmQkJveChlbGVtZW50KTtcbiAgICAgIHVseCA9IGJib3gudWx4O1xuICAgICAgdWx5ID0gYmJveC51bHk7XG4gICAgICBscnggPSBiYm94LmxyeDtcbiAgICAgIGxyeSA9IGJib3gubHJ5O1xuXG4gICAgICBjb25zdCBjb29yZGluYXRlczogbnVtYmVyW10gPSBlbGVtZW50LnF1ZXJ5U2VsZWN0b3IoJ3BhdGgnKVxuICAgICAgICAuZ2V0QXR0cmlidXRlKCdkJylcbiAgICAgICAgLm1hdGNoKC9cXGQrL2cpXG4gICAgICAgIC5tYXAoZWxlbWVudCA9PiBOdW1iZXIoZWxlbWVudCkpO1xuICAgICAgcm90YXRlID0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TtcbiAgICAgIGQzLnNlbGVjdChlbGVtZW50LnZpZXdwb3J0RWxlbWVudCkuYXBwZW5kKCdjaXJjbGUnKVxuICAgICAgICAuYXR0cignY3gnLCBwb2ludC54KVxuICAgICAgICAuYXR0cignY3knLCBwb2ludC55KVxuICAgICAgICAuYXR0cigncicsIDI1KVxuICAgICAgICAuYXR0cignc3Ryb2tlJywgJ2JsYWNrJylcbiAgICAgICAgLmF0dHIoJ3N0cm9rZS13aWR0aCcsIDQpXG4gICAgICAgIC5hdHRyKCdmaWxsJywgJyMwMDk5ZmYnKVxuICAgICAgICAuYXR0cignY2xhc3MnLCAncmVzaXplUG9pbnQnKVxuICAgICAgICAuYXR0cignaWQnLCAncC0nICsgcG9pbnROYW1lKTtcbiAgICB9XG5cbiAgICAvLyBkbyBpdCBhcyBhIGxvb3AgaW5zdGVhZCBvZiBzZWxlY3RBbGwgc28gdGhhdCB5b3UgY2FuIGVhc2lseSBrbm93IHdoaWNoIHBvaW50IHdhc1xuICAgIGZvciAoY29uc3QgbmFtZSBpbiBQb2ludE5hbWVzKSB7XG4gICAgICBkMy5zZWxlY3QoJyNwLScgKyBuYW1lKS5maWx0ZXIoJy5yZXNpemVQb2ludCcpLmNhbGwoXG4gICAgICAgIGQzLmRyYWcoKVxuICAgICAgICAgIC5vbignc3RhcnQnLCAoKSA9PiB7IHJlc2l6ZVN0YXJ0KG5hbWUpOyB9KVxuICAgICAgICAgIC5vbignZHJhZycsIHJlc2l6ZURyYWcpXG4gICAgICAgICAgLm9uKCdlbmQnLCByZXNpemVFbmQuYmluZCh0aGlzKSkpO1xuICAgIH1cblxuICAgIGlmIChlbGVtZW50LmNsYXNzTGlzdC5jb250YWlucygnc3RhZmYnKSkge1xuICAgICAgbGV0IHggPSBwb2ludHNbM10ueDtcbiAgICAgIGxldCB5ID0gcG9pbnRzWzNdLnk7XG4gICAgICBjb25zdCBwb2ludFN0cmluZ1JpZ2h0ID0gKHggKyAxMDApICsgJywnICsgKHkgKyA4NSkgKyAnICcgK1xuICAgICAgICAoeCArIDcwKSArICcsJyArICh5ICsgNTApICsgJyAnICsgKHggKyAxMDApICsgJywnICsgKHkgKyAxNSkgKyAnICcgKyAoeCArIDEzMCkgKyAnLCcgKyAoeSArIDUwKTtcbiAgICAgIHggPSBwb2ludHNbN10ueDtcbiAgICAgIHkgPSBwb2ludHNbN10ueTtcbiAgICAgIGNvbnN0IHBvaW50U3RyaW5nTGVmdCA9ICh4IC0gMTAwKSArICcsJyArICh5IC0gMTUpICsgJyAnICtcbiAgICAgICAgKHggLSAxMzApICsgJywnICsgKHkgLSA1MCkgKyAnICcgKyAoeCAtIDEwMCkgKyAnLCcgKyAoeSAtIDg1KSArICcgJyArICh4IC0gNzApICsgJywnICsgKHkgLSA1MCk7XG5cbiAgICAgIGQzLnNlbGVjdCgnIycgKyBlbGVtZW50LmlkKS5hcHBlbmQoJ3BvbHlnb24nKVxuICAgICAgICAuYXR0cigncG9pbnRzJywgcG9pbnRTdHJpbmdSaWdodClcbiAgICAgICAgLmF0dHIoJ2lkJywgJ3JvdGF0ZVJpZ2h0JylcbiAgICAgICAgLmF0dHIoJ3N0cm9rZScsICdibGFjaycpXG4gICAgICAgIC5hdHRyKCdzdHJva2Utd2lkdGgnLCA3KVxuICAgICAgICAuYXR0cignZmlsbCcsICcjMDA5OWZmJylcbiAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ3JvdGF0ZVBvaW50Jyk7XG5cbiAgICAgIGQzLnNlbGVjdCgnIycgKyBlbGVtZW50LmlkKS5hcHBlbmQoJ3BvbHlnb24nKVxuICAgICAgICAuYXR0cigncG9pbnRzJywgcG9pbnRTdHJpbmdMZWZ0KVxuICAgICAgICAuYXR0cignaWQnLCAncm90YXRlTGVmdCcpXG4gICAgICAgIC5hdHRyKCdzdHJva2UnLCAnYmxhY2snKVxuICAgICAgICAuYXR0cignc3Ryb2tlLXdpZHRoJywgNylcbiAgICAgICAgLmF0dHIoJ2ZpbGwnLCAnIzAwOTlmZicpXG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AgICAgIHVseSA9IGN1cnJlbnRQb2ludFsxXTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBQb2ludE5hbWVzLlRvcDpcbiAgICAgICAgICB1bHkgPSBjdXJyZW50UG9pbnRbMV0gLSAobHJ4IC0gdWx4KSAqIE1hdGgudGFuKHJvdGF0ZSkgLyAyO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuVG9wUmlnaHQ6XG4gICAgICAgICAgbHJ4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIHVseSA9IGN1cnJlbnRQb2ludFsxXSAtIChscnggLSB1bHgpICogTWF0aC50YW4ocm90YXRlKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBQb2ludE5hbWVzLlJpZ2h0OlxuICAgICAgICAgIGxyeCA9IGN1cnJlbnRQb2ludFswXTtcbiAgICAgICAgICBscnkgPSBpbml0aWFsTHJ5ICsgKGN1cnJlbnRQb2ludFswXSAtIGluaXRpYWxQb2ludFswXSkgKiBNYXRoLnRhbihyb3RhdGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuQm90dG9tUmlnaHQ6XG4gICAgICAgICAgbHJ4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIGxyeSA9IGN1cnJlbnRQb2ludFsxXTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBQb2ludE5hbWVzLkJvdHRvbTpcbiAgICAgICAgICBscnkgPSBjdXJyZW50UG9pbnRbMV0gKyAobHJ4IC0gdWx4KSAqIE1hdGgudGFuKHJvdGF0ZSkgLyAyO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuQm90dG9tTGVmdDpcbiAgICAgICAgICB1bHggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgbHJ5ID0gY3VycmVudFBvaW50WzFdICsgKGxyeCAtIHV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zdCxcbiAgICAgICAgYXR0YWNobWVudHM6IG9wdHMuYXR0YWNobWVudHMsXG4gICAgICAgIGJpbmFyeTogb3B0cy5iaW5hcnlcbiAgICAgIH0sIGZ1bmN0aW9uIChlcnIsIGRvYykge1xuICAgICAgICBpZiAoIWVycikge1xuICAgICAgICAgIC8vIHVzaW5nIGxhdGVzdD10cnVlIGNhbiBwcm9kdWNlIGR1cGxpY2F0ZXNcbiAgICAgICAgICB2YXIgZXhpc3Rpbmc7XG4gICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSByZXN1bHQubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAocmVzdWx0W2ldLm9rICYmIHJlc3VsdFtpXS5vay5fcmV2ID09PSBkb2MuX3Jldikge1xuICAgICAgICAgICAgICBleGlzdGluZyA9IHRydWU7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoIWV4aXN0aW5nKSB7XG4gICAgICAgICAgICByZXN1bHQucHVzaCh7b2s6IGRvY30pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXN1bHQucHVzaCh7bWlzc2luZzogbGVhZn0pO1xuICAgICAgICB9XG4gICAgICAgIGNvdW50LS07XG4gICAgICAgIGlmICghY291bnQpIHtcbiAgICAgICAgICBjYihudWxsLCByZXN1bHQpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIGlmIChvcHRzLm9wZW5fcmV2cykge1xuICAgIGlmIChvcHRzLm9wZW5fcmV2cyA9PT0gXCJhbGxcIikge1xuICAgICAgdGhpcy5fZ2V0UmV2aXNpb25UcmVlKGlkLCBmdW5jdGlvbiAoZXJyLCByZXZfdHJlZSkge1xuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgIHJldHVybiBjYihlcnIpO1xuICAgICAgICB9XG4gICAgICAgIGxlYXZlcyA9IGNvbGxlY3RMZWF2ZXMocmV2X3RyZWUpLm1hcChmdW5jdGlvbiAobGVhZikge1xuICAgICAgICAgIHJldHVybiBsZWFmLnJldjtcbiAgICAgICAgfSk7XG4gICAgICAgIGZpbmlzaE9wZW5SZXZzKCk7XG4gICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKEFycmF5LmlzQXJyYXkob3B0cy5vcGVuX3JldnMpKSB7XG4gICAgICAgIGxlYXZlcyA9IG9wdHMub3Blbl9yZXZzO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlYXZlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIHZhciBsID0gbGVhdmVzW2ldO1xuICAgICAgICAgIC8vIGxvb2tzIGxpa2UgaXQncyB0aGUgb25seSB0aGluZyBjb3VjaGRiIGNoZWNrc1xuICAgICAgICAgIGlmICghKHR5cGVvZiAobCkgPT09IFwic3RyaW5nXCIgJiYgL15cXGQrLS8udGVzdChsKSkpIHtcbiAgICAgICAgICAgIHJldHVybiBjYihjcmVhdGVFcnJvcihJTlZBTElEX1JFVikpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmaW5pc2hPcGVuUmV2cygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGNiKGNyZWF0ZUVycm9yKFVOS05PV05fRVJST1IsICdmdW5jdGlvbl9jbGF1c2UnKSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybjsgLy8gb3Blbl9yZXZzIGRvZXMgbm90IGxpa2Ugb3RoZXIgb3B0aW9uc1xuICB9XG5cbiAgcmV0dXJuIHRoaXMuX2dldChpZCwgb3B0cywgZnVuY3Rpb24gKGVyciwgcmVzdWx0KSB7XG4gICAgaWYgKGVycikge1xuICAgICAgZXJyLmRvY0lkID0gaWQ7XG4gICAgICByZXR1cm4gY2IoZXJyKTtcbiAgIC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G9jLl9yZXZzX2luZm8gPSBwYXRoLmlkcy5tYXAoZnVuY3Rpb24gKHJldikge1xuICAgICAgICAgIHBvcy0tO1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByZXY6IHBvcyArICctJyArIHJldi5pZCxcbiAgICAgICAgICAgIHN0YXR1czogcmV2Lm9wdHMuc3RhdHVzXG4gICAgICAgICAgfTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKG9wdHMuYXR0YWNobWVudHMgJiYgZG9jLl9hdHRhY2htZW50cykge1xuICAgICAgdmFyIGF0dGFjaG1lbnRzID0gZG9jLl9hdHRhY2htZW50cztcbiAgICAgIHZhciBjb3VudCA9IE9iamVjdC5rZXlzKGF0dGFjaG1lbnRzKS5sZW5ndGg7XG4gICAgICBpZiAoY291bnQgPT09IDApIHtcbiAgICAgICAgcmV0dXJuIGNiKG51bGwsIGRvYyk7XG4gICAgICB9XG4gICAgICBPYmplY3Qua2V5cyhhdHRhY2htZW50cykuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgIHRoaXMuX2dldEF0dGFjaG1lbnQoZG9jLl9pZCwga2V5LCBhdHRhY2htZW50c1trZXldLCB7XG4gICAgICAgICAgLy8gUHJldmlvdXNseSB0aGUgcmV2aXNpb24gaGFuZGxpbmcgd2FzIGRvbmUgaW4gYWRhcHRlci5qc1xuICAgICAgICAgIC8vIGdldEF0dGFjaG1lbnQsIGhvd2V2ZXIgc2luY2UgaWRiLW5leHQgZG9lc250IHdlIG5lZWQgdG9cbiAgICAgICAgICAvLyBwYXNzIHRoZSByZXYgdGhyb3VnaFxuICAgICAgICAgIHJldjogZG9jLl9yZXYsXG4gICAgICAgICAgYmluYXJ5OiBvcHRzLmJpbmFyeSxcbiAgICAgICAgICBjdHg6IGN0eFxuICAgICAgICB9LCBmdW5jdGlvbiAoZXJyLCBkYXRhKSB7XG4gICAgICAgICAgdmFyIGF0dCA9IGRvYy5fYXR0Y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ZXBsYWNlKC9cXHUwMDAxL2csICdcXHUwMDAxXFx1MDAwMicpXG4gICAgICAgICAgLnJlcGxhY2UoL1xcdTAwMDAvZywgJ1xcdTAwMDFcXHUwMDAxJyk7XG4gICAgICAgIC8qIGVzbGludC1lbmFibGUgbm8tY29udHJvbC1yZWdleCAqL1xuICAgICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgICAgdmFyIGlzQXJyYXkgPSBBcnJheS5pc0FycmF5KGtleSk7XG4gICAgICAgIHZhciBhcnIgPSBpc0FycmF5ID8ga2V5IDogT2JqZWN0LmtleXMoa2V5KTtcbiAgICAgICAgdmFyIGkgPSAtMTtcbiAgICAgICAgdmFyIGxlbiA9IGFyci5sZW5ndGg7XG4gICAgICAgIHZhciByZXN1bHQgPSAnJztcbiAgICAgICAgaWYgKGlzQXJyYXkpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgbGVuKSB7XG4gICAgICAgICAgICByZXN1bHQgKz0gdG9JbmRleGFibGVTdHJpbmcoYXJyW2ldKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgd2hpbGUgKCsraSA8IGxlbikge1xuICAgICAgICAgICAgdmFyIG9iaktleSA9IGFycltpXTtcbiAgICAgICAgICAgIHJlc3VsdCArPSB0b0luZGV4YWJsZVN0cmluZyhvYmpLZXkpICtcbiAgICAgICAgICAgICAgICB0b0luZGV4YWJsZVN0cmluZyhrZXlbb2JqS2V5XSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuICB9XG4gIHJldHVybiAnJztcbn1cblxuLy8gY29udmVydCB0aGUgZ2l2ZW4ga2V5IHRvIGEgc3RyaW5nIHRoYXQgd291bGQgYmUgYXBwcm9wcmlhdGVcbi8vIGZvciBsZXhpY2FsIHNvcnRpbmcsIGUuZy4gd2l0aGluIGEgZGF0YWJhc2UsIHdoZXJlIHRoZVxuLy8gc29ydGluZyBpcy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l0aW9uOiBbXCJlcnJvclwiLCB7IFwiY2hlY2tMb29wc1wiOiBmYWxzZSB9XSovXG4gIHdoaWxlICh0cnVlKSB7XG4gICAgdmFyIGNvbGxhdGlvbkluZGV4ID0gc3RyW2krK107XG4gICAgaWYgKGNvbGxhdGlvbkluZGV4ID09PSAnXFx1MDAwMCcpIHtcbiAgICAgIGlmIChzdGFjay5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgcmV0dXJuIHN0YWNrLnBvcCgpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcG9wKHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgc3dpdGNoIChjb2xsYXRpb25JbmRleCkge1xuICAgICAgY2FzZSAnMSc6XG4gICAgICAgIHN0YWNrLnB1c2gobnVsbCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnMic6XG4gICAgICAgIHN0YWNrLnB1c2goc3RyW2ldID09PSAnMScpO1xuICAgICAgICBpKys7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnMyc6XG4gICAgICAgIHZhciBwYXJzZWROdW0gPSBwYXJzZU51bWJlcihzdHIsIGkpO1xuICAgICAgICBzdGFjay5wdXNoKHBhcnNlZE51bS5udW0pO1xuICAgICAgICBpICs9IHBhcnNlZE51bS5sZW5ndGg7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnNCc6XG4gICAgICAgIHZhciBwYXJzZWRTdHIgPSAnJztcbiAgICAgICAgLyplc2xpbnQgbm8tY29uc3RhbnQtY29uZGl0aW9uOiBbXCJlcnJvclwiLCB7IFwiY2hlY2tMb29wc1wiOiBmYWxzZSB9XSovXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgdmFyIGNoID0gc3RyW2ldO1xuICAgICAgICAgIGlmIChjaCA9PT0gJ1xcdTAwMDAnKSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAg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luZyxcbiAgICAgICAgLy8gd2UgbmVlZCB0byBmZXRjaCBpdCBtYW51YWxseVxuICAgICAgICB2YXIgc3RhcnQgPSBtZXRhZGF0YS5pZCArICc6Oic7XG4gICAgICAgIHZhciBlbmQgPSBtZXRhZGF0YS5pZCArICc6OlxcdWZmZmYnO1xuICAgICAgICB2YXIgcmVxID0gYnlTZXFTdG9yZS5pbmRleCgnX2RvY19pZF9yZXYnKS5vcGVuQ3Vyc29yKFxuICAgICAgICAgIElEQktleVJhbmdlLmJvdW5kKHN0YXJ0LCBlbmQpKTtcblxuICAgICAgICB2YXIgbWV0YWRhdGFTZXEgPSAwO1xuICAgICAgICByZXEub25zdWNjZXNzID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICB2YXIgY3Vyc29yID0gZS50YXJnZXQucmVzdWx0O1xuICAgICAgICAgIGlmICghY3Vyc29yKSB7XG4gICAgICAgICAgICBtZXRhZGF0YS5zZXEgPSBtZXRhZGF0YVNlcTtcbiAgICAgICAgICAgIHJldHVybiBvbkdldE1ldGFkYXRhU2VxKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBzZXEgPSBjdXJzb3IucHJpbWFyeUtleTtcbiAgICAgICAgICBpZiAoc2VxID4gbWV0YWRhdGFTZXEpIHtcbiAgICAgICAgICAgIG1ldGFkYXRhU2VxID0gc2VxO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjdXJzb3IuY29udGludWUoKTtcbiAgICAgICAgfTtcbiAgICAgIH1cblxuICAgICAgZnVuY3Rpb24gb25HZXRNZXRhZGF0YVNlcSgpIHtcbiAgICAgICAgdmFyIG1ldGFkYXRhVG9TdG9yZSA9IGVuY29kZU1ldGFkYXRhKG1ldGFkYXRhLFxuICAgICAgICAgIG1ldGFkYXRhLndpbm5pbmdSZXYsIG1ldGFkYXRhLmRlbGV0ZWQpO1xuXG4gICAgICAgIHZhciByZXEgPSBkb2NTdG9yZS5wdXQobWV0YWRhdGFUb1N0b3JlKTtcbiAgIC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YXR1cztcbiAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7XG4gICAgfSkudGhlbihmdW5jdGlvbiAoanNvbikge1xuICAgICAgcmVzdWx0LmRhdGEgPSBqc29uO1xuICAgICAgaWYgKCFyZXN1bHQub2spIHtcbiAgICAgICAgcmVzdWx0LmRhdGEuc3RhdHVzID0gcmVzdWx0LnN0YXR1cztcbiAgICAgICAgdmFyIGVyciA9IGdlbmVyYXRlRXJyb3JGcm9tUmVzcG9uc2UocmVzdWx0LmRhdGEpO1xuICAgICAgICBpZiAoY2FsbGJhY2spIHtcbiAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKEFycmF5LmlzQXJyYXkocmVzdWx0LmRhdGEpKSB7XG4gICAgICAgIHJlc3VsdC5kYXRhID0gcmVzdWx0LmRhdGEubWFwKGZ1bmN0aW9uICh2KSB7XG4gICAgICAgICAgaWYgKHYuZXJyb3IgfHwgdi5taXNzaW5nKSB7XG4gICAgICAgICAgICByZXR1cm4gZ2VuZXJhdGVFcnJvckZyb21SZXNwb25zZSh2KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHY7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAgIGNhbGxiYWNrKG51bGwsIHJlc3VsdC5kYXRhKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICB2YXIgc2V0dXBQcm9taXNlO1xuXG4gIGZ1bmN0aW9uIHNldHVwKCkge1xuICAgIGlmIChvcHRzLnNraXBfc2V0dXApIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoKTtcbiAgICB9XG5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AgICAgLy8gcmVjZWl2aW5nIGF0dGFjaG1lbnRzIGFzIGJhc2U2NC1lbmNvZGVkIHN0cmluZ3MuXG4gICAgICBmdW5jdGlvbiBmZXRjaERhdGEoZmlsZW5hbWUpIHtcbiAgICAgICAgdmFyIGF0dCA9IGF0dHNbZmlsZW5hbWVdO1xuICAgICAgICB2YXIgcGF0aCA9IGVuY29kZURvY0lkKGRvYy5faWQpICsgJy8nICsgZW5jb2RlQXR0YWNobWVudElkKGZpbGVuYW1lKSArXG4gICAgICAgICAgICAnP3Jldj0nICsgZG9jLl9yZXY7XG4gICAgICAgIHJldHVybiBvdXJGZXRjaChnZW5EQlVybChob3N0LCBwYXRoKSkudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICBpZiAoJ2J1ZmZlcicgaW4gcmVzcG9uc2UpIHtcbiAgICAgICAgICAgIHJldHVybiByZXNwb25zZS5idWZmZXIoKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIHJldHVybiByZXNwb25zZS5ibG9iKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChibG9iKSB7XG4gICAgICAgICAgaWYgKG9wdHMuYmluYXJ5KSB7XG4gICAgICAgICAgICB2YXIgdHlwZUZpZWxkRGVzY3JpcHRvciA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoYmxvYi5fX3Byb3RvX18sICd0eXBlJyk7XG4gICAgICAgICAgICBpZiAoIXR5cGVGaWVsZERlc2NyaXB0b3IgfHwgdHlwZUZpZWxkRGVzY3JpcHRvci5zZXQpIHtcbiAgICAgICAgICAgICAgYmxvYi50eXBlID0gYXR0LmNvbnRlbnRfdHlwZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBibG9iO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4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gICAgY2FsbGJhY2sobnVsbCwgYmxvYik7XG4gICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge1xuICAgICAgY2FsbGJhY2soZXJyKTtcbiAgICB9KTtcbiAgfSk7XG5cbiAgLy8gUmVtb3ZlIHRoZSBhdHRhY2htZW50IGdpdmVuIGJ5IHRoZSBpZCBhbmQgcmV2XG4gIGFwaS5yZW1vdmVBdHRhY2htZW50ID0gIGFkYXB0ZXJGdW4kJDEoJ3JlbW92ZUF0dGFjaG1lbnQnLCBmdW5jdGlvbiAoZG9jSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0YWNobWVudElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaykge1xuICAgIHZhciB1cmwgPSBnZW5EQlVybChob3N0LCBlbmNvZGVEb2NJZChkb2NJZCkgKyAnLycgK1xuICAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVBdHRhY2htZW50SWQoYXR0YWNobWVudElkKSkgKyAnP3Jldj0nICsgcmV2O1xuICAgIGZldGNoSlNPTih1cmwsIHttZXRob2Q6ICdERUxFVEUnfSwgY2FsbGJhY2spLmNhdGNoKGNhbGxiYWNrKTtcbiAgfSk7XG5cbiAgLy8gQWRkIHRoZSBhdHRhY2htZW50IGdpdmVuIGJ5IGJsb2IgYW5kIGl0cyBjb250ZW50VHlwZSBwcm9wZXJ0eVxuICAvLyB0byB0aGUgZG9jdW1lbnQgd2l0aCB0aGUgZ2l2ZW4gaWQsIHRoZSByZXZpc2lvbiBnaXZlbiBieSByZXYsIGFuZFxuICAvLyBhZGQgaXQgdG8gdGhlIGRhdGFiYXNlIGdpdmVuIGJ5IGhvc3QuXG4gIGFwaS5wdXRBdHRhY2htZW50ID0gYWRhcHRlckZ1biQkMSgncHV0QXR0YWNobWVudCcsIGZ1bmN0aW9uIChkb2NJZCwgYXR0YWNobWVudElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2LCBibG9iLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSwgY2FsbGJhY2spIHtcbiAgICBpZiAodHlwZW9mIHR5cGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIGNhbGxiYWNrID0gdHlwZTtcbiAgICAgIHR5cGUgPSBibG9iO1xuICAgICAgYmxvYiA9IHJldjtcbiAgICAgIHJldiA9IG51bGw7XG4gICAgfVxuICAgIHZhciBpZCA9IGVuY29kZURvY0lkKGRvY0lkKSArICcvJyArIGVuY29kZUF0dGFjaG1lbnRJZChhdHRhY2htZW50SWQpO1xuICAgIHZhciB1cmwgPSBnZW5EQlVybChob3N0LCBpZCk7XG4gICAgaWYgKHJldikge1xuICAgICAgdXJsICs9ICc/cmV2PScgKyByZXY7XG4gICAgfVxuXG4gICAgaWYgKHR5cGVvZiBibG9iID09PSAnc3RyaW5nJykge1xuICAgICAgLy8gaW5wdXQgaXMgYXNzdW1lZCB0byBiZSBhIGJhc2U2NCBzdHJpbmdcbiAgICAgIHZhciBiaW5hcnk7XG4gICAgICB0cnkge1xuICAgICAgICBiaW5hcnkgPSB0aGlzQXRvYihibG9iKTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICByZXR1cm4gY2FsbGJhY2soY3JlYXRlRXJyb3IoQkFEX0FSRyxcbiAgICAgICAgICAgICAgICAgICAgICAgICdBdHRhY2htZW50IGlzIG5vdCBhIHZhbGlkIGJhc2U2NCBzdHJpbmcnKSk7XG4gICAgICB9XG4gICAgICBibG9iID0gYmluYXJ5ID8gYmluU3RyaW5nVG9CbHVmZmVyKGJ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AgIGlmICh0eXBlb2YgZnVuID09PSAnc3RyaW5nJykge1xuICAgICAgdmFyIHBhcnRzID0gcGFyc2VWaWV3TmFtZShmdW4pO1xuICAgICAgcmV0dXJuIGRiLmZldGNoKCdfZGVzaWduLycgKyBwYXJ0c1swXSArICcvX3ZpZXcvJyArIHBhcnRzWzFdICsgcGFyYW1zLCB7XG4gICAgICAgIGhlYWRlcnM6IG5ldyBoKHsnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nfSksXG4gICAgICAgIG1ldGhvZDogbWV0aG9kLFxuICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeShib2R5KVxuICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgb2sgPSByZXNwb25zZS5vaztcbiAgICAgICAgc3RhdHVzID0gcmVzcG9uc2Uuc3RhdHVzO1xuICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpO1xuICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICByZXN1bHQuc3RhdHVzID0gc3RhdHVzO1xuICAgICAgICAgIHRocm93IGdlbmVyYXRlRXJyb3JGcm9tUmVzcG9uc2UocmVzdWx0KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBmYWlsIHRoZSBlbnRpcmUgcmVxdWVzdCBpZiB0aGUgcmVzdWx0IGNvbnRhaW5zIGFuIGVycm9yXG4gICAgICAgIHJlc3VsdC5yb3dzLmZvckVhY2goZnVuY3Rpb24gKHJvdykge1xuICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICAgIGlmIChyb3cudmFsdWUgJiYgcm93LnZhbHVlLmVycm9yICYmIHJvdy52YWx1ZS5lcnJvciA9PT0gXCJidWlsdGluX3JlZHVjZV9lcnJvclwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3Iocm93LnJlYXNvbik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cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBmaW5hbFJlc3VsdHM7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHR5cGVvZiBvcHRzLmtleXMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICB2YXIga2V5cyA9IG9wdHMua2V5cztcbiAgICAgIHZhciBmZXRjaFByb21pc2VzID0ga2V5cy5tYXAoZnVuY3Rpb24gKGtleSkge1xuICAgICAgICB2YXIgdmlld09wdHMgPSB7XG4gICAgICAgICAgc3RhcnRrZXkgOiB0b0luZGV4YWJsZVN0cmluZyhba2V5XSksXG4gICAgICAgICAgZW5ka2V5ICAgOiB0b0luZGV4YWJsZVN0cmluZyhba2V5LCB7fV0pXG4gICAgICAgIH07XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAob3B0cy51cGRhdGVfc2VxKSB7XG4gICAgICAgICAgdmlld09wdHMudXBkYXRlX3NlcSA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZldGNoRnJvbVZpZXcodmlld09wdHMpO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gUHJvbWlzZS5hbGwoZmV0Y2hQcm9taXNlcykudGhlbihmbGF0dGVuKS50aGVuKG9uTWFwUmVzdWx0c1JlYWR5KTtcbiAgICB9IGVsc2UgeyAvLyBub3JtYWwgcXVlcnksIG5vICdrZXlzJ1xuICAgICAgdmFyIHZpZXdPcHRzID0ge1xuICAgICAgICBkZXNjZW5kaW5nIDogb3B0cy5kZXNjZW5kaW5nXG4gICAgICB9O1xuICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICBpZiAob3B0cy51cGRhdGVfc2VxKSB7XG4gICAgICAgIHZpZXdPcHRzLnVwZGF0ZV9zZXEgPSB0cnVlO1xuICAgICAgfVxuICAgICAgdmFyIHN0YXJ0a2V5O1xuICAgICAgdmFyIGVuZGtleTtcbiAgICAgIGlmICg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ZW1wb3JhcnkgKi8gZmFsc2UsXG4gICAgICAgICAgLyogbG9jYWxEb2NOYW1lICovIGxvY2FsRG9jTmFtZSk7XG4gICAgICAgIHJldHVybiBjcmVhdGVWaWV3UHJvbWlzZS50aGVuKGZ1bmN0aW9uICh2aWV3KSB7XG4gICAgICAgICAgaWYgKG9wdHMuc3RhbGUgPT09ICdvaycgfHwgb3B0cy5zdGFsZSA9PT0gJ3VwZGF0ZV9hZnRlcicpIHtcbiAgICAgICAgICAgIGlmIChvcHRzLnN0YWxlID09PSAndXBkYXRlX2FmdGVyJykge1xuICAgICAgICAgICAgICBpbW1lZGlhdGUoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcodmlldywgdXBkYXRlVmlld09wdHMpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBxdWVyeVZpZXcodmlldywgb3B0cyk7XG4gICAgICAgICAgfSBlbHNlIHsgLy8gc3RhbGUgbm90IG9rXG4gICAgICAgICAgICByZXR1cm4gdXBkYXRlVmlldyh2aWV3LCB1cGRhdGVWaWV3T3B0cykudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgIHJldHVybiBxdWVyeVZpZXcodmlldywgb3B0cyk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgfVxuICB9XG5cbiAgZnVuY3Rpb24gYWJzdHJhY3RRdWVyeShmdW4sIG9wdHMsIGNhbGxiYWNrKSB7XG4gICAgdmFyIGRiID0gdGhpcztcbiAgICBpZiAodHlwZW9mIG9wdHMgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIGNhbGxiYWNrID0gb3B0cztcbiAgICAgIG9wdHMgPSB7fTtcbiAgICB9XG4gICAgb3B0cyA9IG9wdHMgPyBjb2VyY2VPcHRpb25zKG9wdHMpIDoge307XG5cbiAgICBpZiAodHlwZW9mIG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BVVRPX0NPTVBBQ1RJT04gaXMgc2V0LCBkb2NzIGNhbiBiZSByZXR1cm5lZCB3aGljaCBsb29rXG4gICAgICAgICAgICAvLyBsaWtlIHRoaXM6IHtcIm1pc3NpbmdcIjpcIjEtN2MzYWMyNTZiNjkzYzQ2MmFmODQ0MmY5OTJiODM2OTZcIn1cbiAgICAgICAgICAgIG9rID0gZmFsc2U7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFyZW1vdGVEb2MgfHwgIXJlbW90ZURvYy5fYXR0YWNobWVudHMpIHtcbiAgICAgICAgICAgIHJldHVybiByZW1vdGVEb2M7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGdldERvY0F0dGFjaG1lbnRzRnJvbVRhcmdldE9yU291cmNlKHRhcmdldCwgc3JjLCByZW1vdGVEb2MpXG4gICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKGF0dGFjaG1lbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmlsZW5hbWVzID0gT2JqZWN0LmtleXMocmVtb3RlRG9jLl9hdHRhY2htZW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaChmdW5jdGlvbiAoYXR0YWNobWVudCwgaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHQgPSByZW1vdGVEb2MuX2F0dGFjaG1lbnRzW2ZpbGVuYW1lc1tpXV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGF0dC5zdHViO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBhdHQubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dC5kYXRhID0gYXR0YWNobWVudDtcbiAgICAgICAgICA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gZXZlbnQuZGF0YVRyYW5zZmVyLmZpbGVzO1xuICAgIGNvbnN0IGZpbGVzID0gQXJyYXkuZnJvbShmaWxlTGlzdCk7XG4gICAgY29uc3QgcmVqZWN0RmlsZXMgPSBhZGROZXdGaWxlcyhmaWxlcyk7XG4gICAgaWYgKHJlamVjdEZpbGVzLmxlbmd0aCAhPT0gMCkge1xuICAgICAgY29uc3QgZmlsZW5hbWVzID0gcmVqZWN0RmlsZXMubWFwKGZpbGUgPT4gZmlsZS5uYW1lKTtcbiAgICAgIHdpbmRvdy5hbGVydChgVGhlIGZvbGxvd2luZyBmaWxlcyBhcmUgbm90IC5tZWksIC5wbmcsIC5qcGVnLCBvciAuanNvbmxkIGZpbGVzOiBcXG5cXG4ke2ZpbGVuYW1lcy5qb2luKCdcXG4nKX1gKTtcbiAgICB9XG4gIH07XG59Il0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file +!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}([function(e,t,n){"use strict";var i,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,r,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,i){var r,o,s,a;if(l(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=u(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=f.bind(i);return r.listener=n,i.wrapFn=r,r}function p(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=g(c,l);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var i,r,o,s=[n(37),n(38),n(39),n(40),n(41),n(42)],a=-1,c=[],l=!1;function u(){i&&r&&(i=!1,r.length?c=r.concat(c):a=-1,c.length&&d())}function d(){if(!i){l=!1,i=!0;for(var e=c.length,t=setTimeout(u);e;){for(r=c,c=[];r&&++a1)for(var n=1;ne.classList.remove("no-moving")),document.querySelectorAll(".selected").forEach(e=>{e.classList.remove("selected"),e.classList.contains("staff")?(e.removeAttribute("style"),i.unhighlight(e)):(e.removeAttribute("style"),e.style.fill=""),Array.from(e.querySelectorAll(".divLine")).forEach(e=>{e.style.stroke="",e.setAttribute("stroke-width","30px")}),Array.from(e.querySelectorAll(".neume")).forEach(e=>{e.style.fill=""}),Array.from(e.querySelectorAll(".sylTextRect-display")).forEach(e=>{e.style.fill="blue"}),e.parentElement.classList.contains("syllable-highlighted")&&(e.parentElement.style.fill="",e.parentElement.classList.add("syllable"),e.parentElement.classList.remove("syllable-highlighted"),Array.from(e.parentElement.querySelectorAll(".divLine")).forEach(e=>{e.style.stroke="",e.setAttribute("stroke-width","30px")}),Array.from(e.parentElement.querySelectorAll(".neume")).forEach(e=>{e.style.fill=""})),c.selectAll("#resizeRect").remove(),c.selectAll(".resizePoint").remove(),c.selectAll(".rotatePoint").remove()}),Array.from(document.querySelectorAll(".text-select")).forEach(e=>{e.style.color="",e.style.fontWeight="",e.classList.remove("text-select")}),document.getElementById("selByStaff").classList.contains("is-active")?a.endOptionsSelection():o.endGroupingSelection(),document.getElementById("extraEdit").innerHTML="",document.getElementById("extraEdit").parentElement.classList.add("hidden"),(0,r.updateHighlight)()}function d(e,t){e.classList.contains("selected")||(e.classList.add("selected"),i.unhighlight(e),i.highlight(e,"#d00"),a.triggerSplitActions(),o.initGroupingListeners(),t.dragInit())}function f(e,t){e.classList.contains("selected")||(e.classList.add("selected"),i.unhighlight(e),i.highlight(e,"#d00"),t.dragInit())}function h(e,t,n=!0){if(e){if(e.classList.contains("staff"))return d(e,t);if(e.classList.contains("layer"))return f(e,t);if(!e.classList.contains("selected")&&!e.classList.contains("sylTextRect")&&!e.classList.contains("sylTextRect-display")){let t;if(e.classList.add("selected"),e.style.fill="#d00",e.style.stroke=e.classList.contains("divLine")?"#d00":"black",e.querySelectorAll(".sylTextRect-display").length&&e.querySelectorAll(".sylTextRect-display").forEach(e=>{e.style.fill="#d00"}),e.querySelectorAll(".divLine").length&&e.querySelectorAll(".divLine").forEach(e=>{e.style.stroke="#d00"}),e.classList.contains("syllable")&&e.querySelectorAll(".neume").forEach(e=>{e.style.fill="#d00"}),e.classList.contains("syllable")?t=e.id:null!==e.closest(".syllable")&&(t=e.closest(".syllable").id),void 0!==t){document.querySelectorAll("span."+t).forEach(e=>{e.style.color="#d00",e.style.fontWeight="bold",e.classList.add("text-select")})}}n&&(0,r.updateHighlight)()}}async function p(e,t){const n=await t.getElementAttr(e.id,t.view.getCurrentPageURI());return Boolean(n.ligated)}function m(e,t){if(t.length<2)return!1;switch(e){case"selBySyllable":t.forEach(e=>{if(!e.classList.contains("syllable"))return!1});break;case"selByNeume":t.forEach(e=>{if(!e.classList.contains("neume"))return!1});break;case"selByStaff":t.forEach(e=>{if(!e.classList.contains("staff"))return!1});break;default:return!1}return!0}function g(e){const t=Array.from(e),n=t.pop().parentElement.parentElement;for(const e of t){if(e.parentElement.parentElement.id!==n.id)return!1}return!0}function v(e,t,n){const i=e,r=i.closest(".syl");if(!r.classList.contains("selected")){r.classList.add("selected"),i.style.fill="#d00";const o=e.closest(".syllable");o.style.fill="#d00",o.classList.add("syllable-highlighted"),o.querySelectorAll(".divLine").length&&(o.querySelectorAll(".neume").forEach(e=>{e.style.fill="#d00"}),o.querySelectorAll(".divLine").forEach(e=>{e.style.stroke="#d00"})),void 0!==n&&(0,s.resize)(r,n,t),void 0!==t&&t.dragInit();const a=e.closest(".syllable").id;if(void 0!==a){const e=document.querySelector("span."+a);e&&(e.style.color="#d00",e.style.fontWeight="bold",e.classList.add("text-select"))}}}t.getSelectionType=l,t.unselect=u,t.selectStaff=d,t.selectLayerElement=f,t.select=h,t.selectNcs=async function(e,t,n){if(!e.parentElement.classList.contains("selected")){const i=e.parentElement;if(u(),h(i),await p(i,t)){const e=i.previousSibling;if(await p(e,t))h(e);else{const e=i.nextSibling;await p(e,t)?h(e):console.warn("Error: Neither prev or next nc are ligatures")}o.triggerGrouping("ligature")}else i.classList.contains("nc")?a.triggerNcActions(i):console.warn("No action triggered!");n.dragInit()}},t.isLigature=p,t.areAdjacent=function(e,t){if(t.length<2)return!1;let n;switch(e){case"selBySyllable":n=Array.from(document.querySelectorAll(".syllable"));break;case"selByNeume":return!0;case"selByNc":n=Array.from(document.querySelectorAll(".nc"));break;case"selByStaff":n=Array.from(document.querySelectorAll(".staff"));break;default:return!1}const i=[];for(let e=0;e!(e.classList.contains("divLine")||e.classList.contains("accid")||e.classList.contains("clef")))))return!1;switch(e){case"selBySyllable":const e=t[0].closest(".staff");for(let n=0;n{const s=e.getAttribute("d").match(/\d+/g).map(e=>Number(e));void 0===o&&(o=Math.atan((s[3]-s[1])/(s[2]-s[0]))),(void 0===n||Math.min(s[1],s[3])r)&&(r=Math.max(s[1],s[3])),(void 0===i||s[2]>i)&&(i=s[2])}),{id:e.id,ulx:t,uly:n,lrx:i,lry:r,rotate:o}},t.selectBBox=v,t.selectNn=function(e){return!(e.length>0)||(e.forEach(e=>{h(e)}),!1)},t.selectAll=async function(e,t,n){const i=l();if(u(),0===e.length)return;let r,c=!1,d=!1;switch(i){case"selBySyllable":r=".syllable";break;case"selByNeume":r=".neume";break;case"selByNc":r=".nc";break;case"selByStaff":r=".staff";break;case"selByBBox":r=".sylTextRect-display";break;case"selByLayerElement":r=".clef, .custos, .accid, .divLine";break;default:return void console.error("Unknown selection type "+i)}const f=new Set;for(const t of e){let e=t.closest(r);if(null===e){if(e=t.closest(".clef, .custos, .accid, .divLine"),null===e){console.warn("Element "+t.id+" is not part of specified group and is not a clef or custos or accid or divLine.");continue}c=c||!0}else d=d||!0;f.add(e);const n=e.getAttribute("mei:follows");n&&(document.querySelector("#"+n.slice(1)).classList.add("no-moving"),f.add(document.querySelector("#"+n.slice(1))));const i=e.getAttribute("mei:precedes");i&&(document.querySelector("#"+i.slice(1)).classList.add("no-moving"),f.add(document.querySelector("#"+i.slice(1))))}f.forEach(e=>h(e,n,!1));const p=Array.from(f.values());if(!c||d)switch(i){case"selByStaff":switch(p.length){case 1:a.triggerSplitActions(),o.initGroupingListeners(),(0,s.resize)(p[0],t,n);break;default:a.triggerStaffActions(),o.initGroupingListeners()}break;case"selByLayerElement":1===f.size?a.triggerLayerElementActions(p[0]):a.triggerDefaultActions();break;case"selBySyllable":switch(p.length){case 1:a.triggerSyllableActions("singleSelect");break;case 2:o.isLinkable("selBySyllable",p)?a.triggerSyllableActions("linkableSelect"):o.isGroupable("selBySyllable",p)?a.triggerSyllableActions("multiSelect"):a.triggerSyllableActions("default");break;default:o.isGroupable("selBySyllable",p)?a.triggerSyllableActions("multiSelect"):a.triggerSyllableActions("default")}break;case"selByNeume":switch(p.length){case 1:a.triggerNeumeActions(),o.initGroupingListeners();break;default:o.isGroupable("selByNeume",p)?o.triggerGrouping("neume"):a.triggerDefaultActions()}break;case"selByNc":switch(p.length){case 1:a.triggerNcActions(p[0]);break;case 2:if(g(p)){if(p[0].parentElement===p[1].parentElement){const e=Array.from(p[0].parentElement.children);if(1===Math.abs(e.indexOf(p[0])-e.indexOf(p[1]))){let e=p[0].children[0],t=p[1].children[0],n=e.x.baseVal.value,i=t.x.baseVal.value,r=e.y.baseVal.value,s=t.y.baseVal.value;if((n>i||n===i&&rv(e,n,void 0))}break;default:console.error("Unknown selection type. This should not have occurred.")}else 1===f.size?a.triggerLayerElementActions(p[0]):"selBySyllable"==i?a.triggerDefaultSylActions():a.triggerDefaultActions()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queueNotification=t.Notification=void 0;const i=n(27),r=n(23),o=new Array(0);let s=null,a=!1;const c={default:"",warning:"⚠️ ",error:"🔴 ",success:"✅ "};class l{constructor(e,t){this.message=c[t]+e,this.displayed=!1,this.id=(0,r.uuidv4)(),this.isModeMessage=-1!==e.search("Mode"),this.timeoutID=-1,this.type=t}setTimeoutId(e){this.timeoutID=Math.max(e,-1)}display(){this.displayed=!0}getId(){return this.id}}function u(e){document.getElementById(e).remove(),null!==s&&s.getId()===e&&(s=null),o.length>0?d():0===document.querySelectorAll(".neon-notification").length&&(document.getElementById("notification-content").style.display="none",a=!1)}function d(){if(o.length>0){a=!0;const e=o.pop();!function(e){if(e.isModeMessage){if(null!==s)return window.clearTimeout(s.timeoutID),o.push(e),void u(s.getId());s=e}const t=document.getElementById("notification-content"),n=document.createElement("div");n.classList.add("neon-notification"),n.classList.add("neon-notification-"+e.type),n.id=e.getId(),n.innerHTML=e.message,t.append(n),t.style.display="",e.display()}(e),e.setTimeoutId(window.setTimeout(u,5e3,e.getId())),document.getElementById(e.getId()).addEventListener("click",()=>{window.clearTimeout(e.timeoutID),u(e.getId())})}}function f(e,t="default"){const n=new l(e,t);o.push(n),"error"!=n.type&&"warning"!=n.type||(0,i.recordNotification)(n),(!a||document.getElementById("notification-content").querySelectorAll(".neon-notification").length<3)&&d()}t.Notification=l,t.queueNotification=f,t.default={queueNotification:f}},function(e,t,n){"use strict";e.exports=function(e){return function(){var t=arguments.length;if(t){for(var n=[],i=-1;++i\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

',groupingTab:'

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

\n

\n \n

',systemTab:'

\n \n

\n

Click upper left and lower right corners of new staff.

'},t.insertControlsPanel='
\n
INSERT
\n \n \n \n
\n\t
\n \n
',t.editControlsPanel='
\n
EDIT
\n \n \n \n
\n
\n
\n
\n
Selection Mode:
\n
\n \n \n \n \n \n \n \n
\n
\n
\n\n
\n \n \n \x3c!--\n * The extraEdit panel is added for edit options that have dropdown menus\n * Like the Neume and Clef menus\n * This is done because the moreEdit menu needs to have overflow for cases where it has lots of buttons\n * But overflow ruins dropdown menus\n --\x3e\n \n
\n
\n
\n
\n
',t.ncActionContents='\n ',t.defaultNeumeActionContents='
\n \n \n
',t.neumeActionContents='\n
\n \n ',t.staffActionContents='\n \n ',t.defaultActionContents='
\n \n
',t.defaultSylActionContents='\n ',t.custosActionContents='
\n \n \n
',t.layerElementOutActionContents='
\n \n \n \n
',t.layerElementInActionContents='
\n \n \n \n
',t.accidActionContents='\n ',t.splitActionContents='
Split System:
\n
\n \n \n \n
',t.clefActionContents='\n
\n \n \n
\n ',t.divLineActionContents='\n',t.groupingMenu={nc:'
\n
\n \n \n
\n
',neume:'
\n
\n \n \n
\n
',syl:'
\n
\n \n \n \n
\n\t\t
',ligatureNc:'
\n
\n \n \n \n
\n
',ligature:'
\n
\n \n \n
\n
',splitSyllable:'
\n
\n \n \n
\n
'},t.editTextModal='
\n \n \n
\n
Cancel
\n
Save
\n
\n
',t.hotkeysModal='\n
\n \x3c!-- "Display" hotkeys --\x3e\n
\n
Display
\n
\n
\n
Shift
\n
+
\n
+
\n
\n
Zoom In
\n
\n
\n
\n
Shift
\n
+
\n
-
\n
\n
Zoom Out
\n
\n
\n
\n
0
\n
\n
Zoom Reset
\n
\n
\n
\n
h
\n
\n
Hide Glyph
\n
\n
\n\n \x3c!-- "Edit" hotkeys --\x3e\n
\n
Edit
\n
\n
\n
Ctrl
\n
+
\n
z
\n
or
\n
\n
+
\n
z
\n
\n
Undo
\n
\n
\n
\n
Ctrl
\n
+
\n
Shift
\n
+
\n
z
\n
or
\n
\n
+
\n
Shift
\n
+
\n
z
\n
\n
Redo
\n
\n
\n
\n
q/w/e/r/t/y
\n
\n
\n Highlight by Staff/Syllable/Neume/LayerElement/Selection/Off\n
\n
\n
\n
\n
1/2/3/4
\n
\n
\n Select by Syllable/Neume/Neume Component/Staff\n
\n
\n
\n
\n
Shift
\n
+
\n
Number
\n
\n
\n Begin Insert for the nth option in the selected tab\n
\n
\n
\n\n \x3c!-- "Other" hotkeys --\x3e\n
\n
Other
\n
\n
\n
s
\n
\n
Save File
\n
\n
\n
\n
Esc
\n
\n
Return to Edit Mode
\n
\n
\n
',t.syllableActionsContent='\n
\n \n \n \n \n
\n',t.errorLogsPanelContents='
\n
Error Log
\n \n \n \n
\n
'},function(e,t){e.exports=d3},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";for(var i=n(11),r=[],o=0;o<256;++o)r.push((o+256).toString(16).substr(1));t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase();if(!Object(i.a)(n))throw TypeError("Stringified UUID is invalid");return n}},function(e,t,n){"use strict";var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t.a=function(e){return"string"==typeof e&&i.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGlyphBBox=t.isOutOfSVGBounds=t.getStaffByCoords=t.getStaffIdByCoords=t.getSVGRelCoords=void 0;const i=n(3);function r(e,t){const n=new DOMPoint(e,t),i=document.querySelector(".active-page > .definition-scale").querySelector(".system"),{x:r,y:o}=n.matrixTransform(i.getScreenCTM().inverse());return{x:r,y:o}}function o(e,t){const n=Array.from(document.querySelectorAll(".staff")).map(e=>(0,i.getStaffBBox)(e)),{x:o,y:s}=r(e,t),a=n.find(e=>o<=e.lrx&&o>=e.ulx&&s<=e.lry&&s>=e.uly);return a?a.id:null}t.getSVGRelCoords=r,t.getStaffIdByCoords=o,t.getStaffByCoords=function(e,t){const n=o(e,t);return document.querySelector("#"+n)},t.isOutOfSVGBounds=function(e,t){const n=document.querySelector("#bgimg");return e<=0||e>=Number(n.getAttribute("width"))||t<=0||t>=Number(n.getAttribute("height"))},t.getGlyphBBox=function(e){const t="rect"==e.tagName?e.getBBox():e.parentNode.getBBox();return{ulx:t.x,uly:t.y,lrx:t.x+t.width,lry:t.y+t.height}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerDefaultActions=t.triggerDefaultSylActions=t.triggerSplitActions=t.triggerStaffSplitMode=t.triggerStaffActions=t.triggerLayerElementActions=t.triggerSyllableActions=t.triggerNeumeActions=t.triggerNcActions=t.addChangeStaffListener=t.moveOutsideSyllableHandler=t.insertToSyllableHandler=t.changeStaffHandler=t.removeHandler=t.endOptionsSelection=t.deleteButtonHandler=t.unsetLiquescentAnticlockwiseAction=t.unsetLiquescentClockwiseAction=t.unsetVirgaReversedAction=t.unsetVirgaAction=t.unsetInclinatumAction=t.initNeonView=void 0;const i=n(7),r=n(24),o=n(4),s=n(35),a=n(36),c=n(3);let l;function u(e){return{action:"set",param:{elementId:e,attrType:"tilt",attrValue:""}}}function d(e){return{action:"set",param:{elementId:e,attrType:"tilt",attrValue:""}}}function f(e){return{action:"set",param:{elementId:e,attrType:"tilt",attrValue:""}}}function h(e){return{action:"set",param:{elementId:e,attrType:"curve",attrValue:""}}}function p(e){return{action:"set",param:{elementId:e,attrType:"curve",attrValue:""}}}function m(e){"d"!==e.key&&"Backspace"!==e.key||(v(),e.preventDefault())}function g(){const e=document.getElementById("moreEdit"),t=document.getElementById("extraEdit");e&&(e.innerHTML="",e.parentElement.classList.add("hidden")),t&&(t.innerHTML="",t.parentElement.classList.add("hidden")),document.body.removeEventListener("keydown",m)}function v(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{t.classList.contains("syl")&&(t=t.closest(".syllable")),t.classList.contains("accid")&&(t=t.closest(".accid")),t.classList.contains("divLine")&&(t=t.closest(".divLine")),e.push({action:"remove",param:{elementId:t.id}})});const t={action:"chain",param:e};g(),l.edit(t,l.view.getCurrentPageURI()).then(()=>{l.updateForCurrentPage()})}function y(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push({action:"changeStaff",param:{elementId:t.id}})});const t={action:"chain",param:e};g(),l.edit(t,l.view.getCurrentPageURI()).then(()=>{l.updateForCurrentPage()})}function b(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push({action:"insertToSyllable",param:{elementId:t.id}})});const t={action:"chain",param:e};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Insert Success","success"):o.default.queueNotification("Insert Failed XoX","error"),g(),l.updateForCurrentPage()})}function _(){const e=[];Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push({action:"moveOutsideSyllable",param:{elementId:t.id}})});const t={action:"chain",param:e};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Move Success","success"):o.default.queueNotification("Move Failed XoX","error"),g(),l.updateForCurrentPage()})}function w(){const e=document.getElementById("delete");e&&(e.removeEventListener("click",v),e.addEventListener("click",v),document.body.addEventListener("keydown",m))}function k(){const e=document.getElementById("changeStaff");null==e||e.removeEventListener("click",y),null==e||e.addEventListener("click",y)}function S(e,t,n=!0){const i=document.getElementById(e);i&&(i.parentElement.classList.remove("hidden"),n?i.innerHTML=t:i.innerHTML+=t)}function E(e){l.edit(e,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}function L(){const e=document.querySelector(".staff.selected");if(null!==e){new s.SplitStaffHandler(l,e).startSplit(),g()}else console.error("No staff was selected!"),g()}function A(){document.querySelectorAll(".drop_select").forEach(e=>{const t=()=>{document.body.removeEventListener("click",t),e.classList.remove("is-active")};e.addEventListener("click",n=>{e.classList.toggle("is-active"),Array.from(document.querySelectorAll(".drop_select")).filter(t=>t!==e).forEach(e=>e.classList.remove("is-active")),n.stopPropagation(),e.classList.contains("is-active")?document.body.addEventListener("click",t):document.body.removeEventListener("click",t)})})}t.initNeonView=function(e){l=e,r.initNeonView(e)},t.unsetInclinatumAction=u,t.unsetVirgaAction=d,t.unsetVirgaReversedAction=f,t.unsetLiquescentClockwiseAction=h,t.unsetLiquescentAnticlockwiseAction=p,t.deleteButtonHandler=m,t.endOptionsSelection=g,t.removeHandler=v,t.changeStaffHandler=y,t.insertToSyllableHandler=b,t.moveOutsideSyllableHandler=_,t.addChangeStaffListener=k,t.triggerNcActions=function(e){g(),S("moreEdit",i.defaultActionContents),S("extraEdit",i.ncActionContents),w(),document.querySelector("#Punctum.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=f(e.id),r=h(e.id),s=p(e.id);l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#Inclinatum.dropdown-item").addEventListener("click",()=>{const t=d(e.id),n=f(e.id),i=h(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"tilt",attrValue:"se"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#Virga.dropdown-item").addEventListener("click",()=>{const t=f(e.id),n=u(e.id),i=h(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"tilt",attrValue:"s"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#VirgaReversed.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=h(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"tilt",attrValue:"n"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#LiquescentClockwise.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=f(e.id),r=p(e.id),s={action:"set",param:{elementId:e.id,attrType:"curve",attrValue:"c"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#LiquescentAnticlockwise.dropdown-item").addEventListener("click",()=>{const t=u(e.id),n=d(e.id),i=f(e.id),r=h(e.id),s={action:"set",param:{elementId:e.id,attrType:"curve",attrValue:"a"}};l.edit({action:"chain",param:[t,n,i,r,s]},l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Shape Changed","success"):o.default.queueNotification("Shape Change Failed","error"),g(),l.updateForCurrentPage()})}),A()},t.triggerNeumeActions=function(){g(),S("moreEdit",i.defaultNeumeActionContents),S("extraEdit",i.neumeActionContents),w();const e=document.querySelectorAll(".selected");function t(t){const n={action:"changeGroup",param:{elementId:e[0].id,contour:t}};l.edit(n,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Grouping Changed","success"):o.default.queueNotification("Grouping Failed","error"),g(),l.updateForCurrentPage()})}1===e.length?(document.getElementById("split-neume").addEventListener("click",()=>{const e=document.querySelector(".neume.selected");if(null!==e){new a.SplitNeumeHandler(l,e).startSplit(),g()}else console.error("No staff was selected!"),g()}),document.querySelector("#Pes.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#PesSubpunctis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Clivis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Scandicus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#ScandicusFlexus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#ScandicusSubpunctis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Climacus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#ClimacusResupinus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Torculus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#TorculusResupinus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Porrectus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#PorrectusFlexus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#PorrectusSubpunctis.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),document.querySelector("#Pressus.dropdown-item").addEventListener("click",e=>{t(l.info.getContourByValue(e.target.id))}),A()):console.warn("More than one neume selected! Cannot trigger Neume ClickSelect actions.")},t.triggerSyllableActions=function(e){g(),S("moreEdit",i.syllableActionsContent);let t="";switch(e){case"singleSelect":t+='
\n \n \n \n
';break;case"linkableSelect":t+='
\n \n \n \n
';break;case"multiSelect":t+='
\n \n \n \n
';break;case"default":t+='
\n \n \n
'}S("moreEdit",t,!0),k(),w(),r.initGroupingListeners()},t.triggerLayerElementActions=function(e){var t,n,r,s;if(g(),e.classList.contains("custos"))return S("moreEdit",i.custosActionContents),k(),void w();S("moreEdit",e.parentElement.classList.contains("syllable")?i.layerElementInActionContents:i.layerElementOutActionContents,!1),e.classList.contains("accid")?(S("extraEdit",i.accidActionContents),function(e){document.querySelector("#ChangeToFlat.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"accid",attrValue:"f"}})}),document.querySelector("#ChangeToNatural.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"accid",attrValue:"n"}})}),A()}(e)):e.classList.contains("clef")?(S("extraEdit",i.clefActionContents),function(e){document.querySelector("#increment-octave").addEventListener("click",()=>{const t={action:"displaceClefOctave",param:{elementId:e.id,direction:"above"}};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Clef octave incremented.","success"):o.default.queueNotification("Maximum octave displacement reached. Clef can only be displaced up to 3 octaves.","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#decrement-octave").addEventListener("click",()=>{const t={action:"displaceClefOctave",param:{elementId:e.id,direction:"below"}};l.edit(t,l.view.getCurrentPageURI()).then(e=>{e?o.default.queueNotification("Clef octave decremented.","success"):o.default.queueNotification("Maximum octave displacement reached. Clef can only be displaced up to 3 octaves.","error"),g(),l.updateForCurrentPage()})}),document.querySelector("#CClef.dropdown-item").addEventListener("click",()=>{E({action:"setClef",param:{elementId:e.id,shape:"C"}})}),document.querySelector("#FClef.dropdown-item").addEventListener("click",()=>{E({action:"setClef",param:{elementId:e.id,shape:"F"}})}),A()}(e)):e.classList.contains("divLine")&&(S("extraEdit",i.divLineActionContents),function(e){document.querySelector("#ChangeToMinima.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"minima"}})}),document.querySelector("#ChangeToMaior.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"maior"}})}),document.querySelector("#ChangeToMaxima.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"maxima"}})}),document.querySelector("#ChangeToFinalis.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"finalis"}})}),document.querySelector("#ChangeToCaesura.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"caesura"}})}),document.querySelector("#ChangeToVirgula.dropdown-item").addEventListener("click",()=>{E({action:"set",param:{elementId:e.id,attrType:"form",attrValue:"virgula"}})}),A()}(e)),k(),null===(t=document.getElementById("insertToSyllable"))||void 0===t||t.addEventListener("click",b),null===(n=document.getElementById("moveOutsideSyllable"))||void 0===n||n.addEventListener("click",_),w(),k(),null===(r=document.getElementById("insertToSyllable"))||void 0===r||r.addEventListener("click",b),null===(s=document.getElementById("moveOutsideSyllable"))||void 0===s||s.addEventListener("click",_)},t.triggerStaffActions=function(){g(),S("moreEdit",i.staffActionContents),w(),document.getElementById("merge-systems").addEventListener("click",()=>{r.mergeStaves()})},t.triggerStaffSplitMode=L,t.triggerSplitActions=function(){g(),S("moreEdit",i.splitActionContents),w(),document.getElementById("split-system").addEventListener("click",()=>{L()}),document.getElementById("reset-rotate").addEventListener("click",()=>{const e=document.querySelector(".staff.selected"),t=(0,c.getStaffBBox)(e),n=Math.tan(t.rotate)*(t.lrx-t.ulx);if(null!==e){const i={action:"resizeRotate",param:{elementId:e.id,ulx:t.ulx,uly:t.rotate>0?t.uly+n/2:t.uly-n/2,lrx:t.lrx,lry:t.rotate>0?t.lry-n/2:t.lry+n/2,rotate:0}};l.edit(i,l.view.getCurrentPageURI()).then(async e=>{e&&await l.updateForCurrentPage()}),g()}else console.error("No staff was selected"),g()})},t.triggerDefaultSylActions=function(){g(),S("moreEdit",i.defaultSylActionContents),w(),k()},t.triggerDefaultActions=function(){g(),S("moreEdit",i.defaultActionContents),w()}},function(e,t,n){e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],i=e[1],r=e[2],o=e[3];i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[0]-680876936|0)<<7|n>>>25)+i|0)&i|~n&r)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&i)+t[2]+606105819|0)<<17|r>>>15)+o|0)&o|~r&n)+t[3]-1044525330|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[4]-176418897|0)<<7|n>>>25)+i|0)&i|~n&r)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&i)+t[6]-1473231341|0)<<17|r>>>15)+o|0)&o|~r&n)+t[7]-45705983|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[8]+1770035416|0)<<7|n>>>25)+i|0)&i|~n&r)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&i)+t[10]-42063|0)<<17|r>>>15)+o|0)&o|~r&n)+t[11]-1990404162|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+t[12]+1804603682|0)<<7|n>>>25)+i|0)&i|~n&r)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&i)+t[14]-1502002290|0)<<17|r>>>15)+o|0)&o|~r&n)+t[15]+1236535329|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[1]-165796510|0)<<5|n>>>27)+i|0)&r|i&~r)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&i|n&~i)+t[11]+643717713|0)<<14|r>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[5]-701558691|0)<<5|n>>>27)+i|0)&r|i&~r)+t[10]+38016083|0)<<9|o>>>23)+n|0)&i|n&~i)+t[15]-660478335|0)<<14|r>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[9]+568446438|0)<<5|n>>>27)+i|0)&r|i&~r)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&i|n&~i)+t[3]-187363961|0)<<14|r>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+t[13]-1444681467|0)<<5|n>>>27)+i|0)&r|i&~r)+t[2]-51403784|0)<<9|o>>>23)+n|0)&i|n&~i)+t[7]+1735328473|0)<<14|r>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[5]-378558|0)<<4|n>>>28)+i|0)^i^r)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^i)+t[11]+1839030562|0)<<16|r>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[1]-1530992060|0)<<4|n>>>28)+i|0)^i^r)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^i)+t[7]-155497632|0)<<16|r>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[13]+681279174|0)<<4|n>>>28)+i|0)^i^r)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^i)+t[3]-722521979|0)<<16|r>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+t[9]-640364487|0)<<4|n>>>28)+i|0)^i^r)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^i)+t[15]+530742520|0)<<16|r>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|i>>>9)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[0]-198630844|0)<<6|n>>>26)+i|0)|~r))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[14]-1416354905|0)<<15|r>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[12]+1700485571|0)<<6|n>>>26)+i|0)|~r))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[10]-1051523|0)<<15|r>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[8]+1873313359|0)<<6|n>>>26)+i|0)|~r))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[6]-1560198380|0)<<15|r>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+t[4]-145523070|0)<<6|n>>>26)+i|0)|~r))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+t[2]+718787259|0)<<15|r>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|i>>>11)+r|0,e[0]=n+e[0]|0,e[1]=i+e[1]|0,e[2]=r+e[2]|0,e[3]=o+e[3]|0}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,r,o,s,a,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.substring(t-64,t)));for(r=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}function s(e){var n,i="";for(n=0;n<4;n+=1)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}function a(e){var t;for(t=0;tu?new ArrayBuffer(0):(r=u-l,o=new ArrayBuffer(r),s=new Uint8Array(o),a=new Uint8Array(this,l,r),s.set(a),o)}}(),u.prototype.append=function(e){return this.appendBinary(c(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,r=this._buff.length;for(t=64;t<=r;t+=64)n(this._hash,i(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,i=this._buff,r=i.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=i.charCodeAt(t)<<(t%4<<3);return this._finish(o,r),n=a(this._hash),e&&(n=l(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var i,r,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;i=(i=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(i[2],16),o=parseInt(i[1],16)||0,e[14]=r,e[15]=o,n(this._hash,e)},u.hash=function(e,t){return u.hashBinary(c(e),t)},u.hashBinary=function(e,t){var n=a(o(e));return t?l(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,i,o,s,a,c=(i=this._buff.buffer,o=e,s=!0,(a=new Uint8Array(i.byteLength+o.byteLength)).set(new Uint8Array(i)),a.set(new Uint8Array(o),i.byteLength),s?a:a.buffer),l=c.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)n(this._hash,r(c.subarray(t-64,t)));return this._buff=t-64>2]|=i[t]<<(t%4<<3);return this._finish(o,r),n=a(this._hash),e&&(n=l(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e,t=u.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,i=e.length,r=new ArrayBuffer(i),o=new Uint8Array(r);for(n=0;n>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}(new Uint8Array(e)));return t?l(i):i},u}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setGroupingHighlight=t.setStaffHighlight=t.highlight=t.unsetGroupingHighlight=t.unsetStaffHighlight=t.unhighlight=void 0;const i=["rgb(230, 159, 0)","rgb(86, 180, 233)","rgb(0, 158, 115)","rgb(240, 228, 66)","rgb(0, 114, 178)","rgb(213, 94, 0)","rgb(204, 121, 167)"];function r(e){let t;t=e?e.querySelectorAll(":not(.selected) .highlighted"):document.querySelectorAll(":not(.selected) .highlighted"),t.forEach(e=>{if("path"!==e.tagName||e.closest(".staff").classList.contains("selected"))if(e.classList.contains("divLine")&&!e.closest(".staff").classList.contains("selected"))e.setAttribute("stroke","#000000");else{e.removeAttribute("fill");let t=e.querySelectorAll(".sylTextRect-display");if(!t.length)try{t=e.closest(".syllable").querySelectorAll(".sylTextRect-display")}catch(e){t=[]}t.forEach((function(e){e.closest(".syllable").classList.contains("selected")||e.closest(".staff").classList.contains("selected")||e.closest(".syl").classList.contains("selected")?e.style.fill="#d00":e.style.fill="blue",e.classList.remove("highlighted")}))}else e.setAttribute("stroke","#000000");e.classList.remove("highlighted")})}function o(){r()}function s(){o();Array.from(document.getElementsByClassName("highlighted")).filter(e=>!e.parentElement.classList.contains("selected")).forEach(e=>{e.setAttribute("#d00",null);let t=e.querySelectorAll(".sylTextRect-display");t.length||null!==e.closest(".syllable")&&(t=e.closest(".syllable").querySelectorAll("sylTextRect-display")),t.forEach((function(e){e.closest(".syllable").classList.contains("selected")||e.closest(".syl").classList.contains("selected")?e.style.fill="#d00":e.style.fill="blue",e.classList.remove("highlighted")})),e.classList.remove("highlighted"),e.querySelectorAll("sylTextRect-display").forEach(e=>{e.classList.remove("highlighted")})}),Array.from(document.getElementsByClassName("selected")).forEach(e=>{e.setAttribute("fill","")})}function a(e,t){const n=Array.from(e.children);for(let e=0;ee.querySelectorAll(".divLine")).forEach(e=>{n.push(e)});else{if(i.classList.contains("resizePoint")||"resizeRect"===i.id||i.classList.contains("rotatePoint"))return;if(i.classList.contains("layer"))Array.from(i.children).forEach(e=>{n.push(e)});else if(document.getElementsByClassName("highlight-selected").length&&"highlight-neume"===document.getElementsByClassName("highlight-selected")[0].id&&i.classList.contains("syllable"))Array.from(i.children).filter(e=>e.classList.contains("neume")).forEach(e=>{n.push(e)});else{i.setAttribute("fill",t);let e=i.querySelectorAll(".sylTextRect-display");if(!e.length)try{e=i.closest(".syllable").querySelectorAll(".sylTextRect-display")}catch(t){e=[]}e.forEach((function(e){e.closest(".syllable").classList.contains("selected")||e.closest(".syl").classList.contains("selected")||e.closest(".staff").classList.contains("selected")||(e.style.fill=t,e.classList.add("highlighted"))}))}}i.classList.add("highlighted")}let i;i="30px",e.querySelectorAll(".nc, .custos, .clef, .accid").forEach(e=>{e.setAttribute("stroke","black"),e.setAttribute("stroke-width",i)})}function c(){const e=Array.from(document.getElementsByClassName("staff"));for(let t=0;t{e.setAttribute("stroke","black"),e.setAttribute("stroke-width","30px")});for(let e=0;e{e.classList.add("highlighted")})}const r=n[e].querySelectorAll(".divLine");if(r)for(let e=0;e img");0===Number(t.value)?(n.setAttribute("src","/Neon/Neon-gh/assets/img/show-icon.svg"),n.parentElement.setAttribute("title","Show glyph")):(n.setAttribute("src","/Neon/Neon-gh/assets/img/hide-icon.svg"),n.parentElement.setAttribute("title","Hide glyph"));try{document.querySelectorAll("."+e).forEach(e=>{e.style.opacity=(Number(t.value)/100).toString()})}catch(e){console.warn("Unable to properly set opacity to pages")}}function c(e){const t=document.querySelector("#bgOpacityOutput");(0,r.setSettings)({imageOpacity:Number(t.value)});const n=document.querySelector("#toggle-bg-opacity > img");0===Number(t.value)?(n.setAttribute("src","/Neon/Neon-gh/assets/img/show-icon.svg"),n.parentElement.setAttribute("title","Show background image")):(n.setAttribute("src","/Neon/Neon-gh/assets/img/hide-icon.svg"),n.parentElement.setAttribute("title","Hide background image"));const i=document.querySelector("."+e);i&&(i.style.opacity=String(Number(t.value)/100))}function l(e){const t=document.getElementById("highlight-"+e),n=document.getElementById("highlight-dropdown"),o=document.getElementById("highlight-type");if((0,r.setSettings)({highlightMode:e}),n.classList.remove("is-active"),document.querySelectorAll(".highlight-selected").forEach(e=>{e.classList.remove("highlight-selected")}),"none"===e)return o.textContent=" - Off",void i.unsetGroupingHighlight();t.classList.add("highlight-selected"),o.textContent=" - "+(e[0].toUpperCase()+e.slice(1)),i.setGroupingHighlight(e)}function u(e){document.getElementById("highlight-"+e).addEventListener("click",()=>{l(e)})}function d(){document.body.removeEventListener("click",d),document.getElementById("highlight-dropdown").classList.remove("is-active")}function f(){const e=document.getElementById("highlight-dropdown");document.getElementById("highlight-button").addEventListener("click",t=>{t.stopPropagation(),e.classList.toggle("is-active"),e.classList.contains("is-active")?(document.body.addEventListener("click",d),u("staff"),u("syllable"),u("neume"),u("layerElement"),u("none")):document.body.removeEventListener("click",d)})}function h(){const{highlightMode:e}=(0,r.getSettings)();l(e)}t.setZoomControls=function(e){if(void 0===e)return;const t=document.getElementById("zoomSlider"),n=document.getElementById("zoomOutput"),{zoom:i}=(0,r.getSettings)();t.value=String(i),n.value=String(i),e.zoomTo(i/100),document.getElementById("reset-zoom").addEventListener("click",()=>{n.value="100",t.value="100",e.resetZoomAndPan()}),document.querySelector("#set-zoom-easy-edit").addEventListener("click",()=>{n.value="180",t.value="180",e.zoomTo(1.8)}),t.addEventListener("mouseup",(function(){n.value=t.value,e.zoomTo(Number(n.value)/100)})),t.disabled=!1,document.body.addEventListener("keydown",i=>{const r=parseInt(n.value);if("ArrowUp"===i.key||"ArrowDown"===i.key||"ArrowRight"===i.key||"ArrowLeft"===i.key)i.preventDefault();else if("+"===i.key){const i=Math.min(r+20,parseInt(t.getAttribute("max")));e.zoomTo(i/100),n.value=String(i),t.value=String(i)}else if("_"===i.key){const i=Math.max(r-20,parseInt(t.getAttribute("min")));e.zoomTo(i/100),n.value=String(i),t.value=String(i)}else"0"===i.key&&(n.value="100",t.value="100",e.resetZoomAndPan())})},t.setGlyphOpacityFromSlider=a,t.setBgOpacityFromSlider=c,t.getHighlightType=function(){return document.getElementById("highlight-type").textContent.slice(3).toLowerCase()},t.setHighlightOption=u,t.setHighlightControls=f,t.setHighlightSelectionControls=function(){const e=document.getElementById("highlight-selection");e.addEventListener("click",()=>{document.getElementById("highlight-dropdown").classList.remove("is-active"),document.querySelectorAll(".highlight-selected").forEach(e=>{e.classList.remove("highlight-selected")}),e.classList.add("highlight-selected"),document.getElementById("highlight-type").textContent=" - Selection",i.setGroupingHighlight("selection")})},t.updateHighlight=function(){let e;try{e=document.querySelector(".highlight-selected").id}catch(t){e=""}switch(e){case"highlight-staff":i.setGroupingHighlight("staff");break;case"highlight-syllable":i.setGroupingHighlight("syllable");break;case"highlight-neume":i.setGroupingHighlight("neume");break;case"highlight-layerElement":i.setGroupingHighlight("layerElement");break;case"highlight-selection":i.setGroupingHighlight("selection");break;default:i.unsetGroupingHighlight()}},t.loadHighlightSettings=h,t.initDisplayControls=function(e,t){!function(e){const t=document.getElementById("opacitySlider"),n=document.getElementById("opacityOutput"),{glyphOpacity:i}=(0,r.getSettings)();function s(){n.value=t.value,o=Number(t.value),a(e)}o=i,t.value=String(i),n.value=String(i);const c=document.getElementById("toggle-glyph-opacity");100==i&&c.classList.add("hide-icon"),null==c||c.addEventListener("click",()=>{let i;c.classList.contains("hide-icon")?(c.classList.remove("hide-icon"),i=0):(c.classList.add("hide-icon"),i=1),document.querySelectorAll("."+e).forEach(e=>{e.style.opacity=i.toString()}),o=Number(t.value),t.value=String(100*i),n.value=String(Math.round(100*i)),(0,r.setSettings)({glyphOpacity:100*i}),s()}),t.addEventListener("input",s),t.addEventListener("change",s),t.disabled=!1}(e),function(e){const t=document.getElementById("bgOpacitySlider"),n=document.getElementById("bgOpacityOutput"),{imageOpacity:i}=(0,r.getSettings)();function o(){n.value=t.value,s=Number(t.value),c(e)}s=i,t.value=String(i),n.value=String(i);const a=document.getElementById("toggle-bg-opacity");100==i&&a.classList.add("hide-icon"),a.addEventListener("click",()=>{let i;a.classList.contains("hide-icon")?(a.classList.remove("hide-icon"),i=0):(a.classList.add("hide-icon"),i=1),document.getElementsByClassName(e)[0].style.opacity=i.toString(),s=Number(t.value),t.value=String(100*i),n.value=String(Math.round(100*i)),(0,r.setSettings)({imageOpacity:100*i}),o()}),t.addEventListener("input",o),t.addEventListener("change",o),t.disabled=!1}(t),f(),document.getElementById("burgerMenu").addEventListener("click",()=>{document.getElementById("burgerMenu").classList.toggle("is-active"),document.getElementById("navMenu").classList.toggle("is-active")}),document.body.addEventListener("keydown",e=>{if(!e.metaKey)switch(e.key){case"q":l("staff");break;case"w":l("syllable");break;case"e":l("neume");break;case"r":l("layerElement");break;case"t":l("selection");break;case"y":l("none")}}),function(){const e=document.querySelector("#display-all-btn");e.addEventListener("click",()=>{if(e.classList.contains("selected")){e.classList.remove("selected"),e.innerHTML="Display All";const t=document.querySelectorAll(".checkbox-container > .checkbox");Array.from(t).forEach(e=>{e.checked&&e.click()})}else{e.classList.add("selected"),e.innerHTML="Hide All";const t=document.querySelectorAll(".checkbox-container > .checkbox");Array.from(t).forEach(e=>{e.checked||e.click()})}})}(),h();const n=document.getElementById("displayContents"),i=document.getElementById("toggleDisplay");document.getElementById("displayHeader").addEventListener("click",e=>{e.stopPropagation(),n.classList.contains("closed")?(n.classList.remove("closed"),n.style.padding="0.5em 0.75em",setTimeout(()=>{n.style.overflow="visible"},200),i.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(n.classList.add("closed"),n.style.overflow="hidden",setTimeout(()=>{n.style.padding="0px"},200),i.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalWindow=t.ModalWindowView=void 0;const i=n(7),r=n(33),o=n(28);var s,a;!function(e){e[e.EDIT_TEXT=0]="EDIT_TEXT",e[e.HOTKEYS=1]="HOTKEYS",e[e.VALIDATION_STATUS=2]="VALIDATION_STATUS",e[e.DOCUMENT_UPLOAD=3]="DOCUMENT_UPLOAD"}(s=t.ModalWindowView||(t.ModalWindowView={})),function(e){e[e.OPEN=0]="OPEN",e[e.CLOSED=1]="CLOSED"}(a||(a={}));t.ModalWindow=class{constructor(e){this.openEditSylTextModalWindow=function(){Array.from(document.getElementsByClassName("neon-modal-window-content")).forEach(e=>{e.classList.remove("visible")}),document.getElementById("neon-modal-window-content-edit-text").classList.add("visible"),document.getElementById("neon-modal-window-edit-text-cancel").removeEventListener("click",this.hideModalWindow),document.getElementById("neon-modal-window-edit-text-cancel").addEventListener("click",this.hideModalWindow.bind(this)),document.getElementById("neon-modal-window-edit-text-save").removeEventListener("click",this.updateSylText.bind(this)),document.getElementById("neon-modal-window-edit-text-save").addEventListener("click",this.updateSylText.bind(this)),document.getElementById("neon-modal-window-container").style.display="flex",this.focusModalWindow()},this.updateSylText=function(){const e=document.getElementById("syl_text").querySelectorAll("span.selected-to-edit")[0],t=e.textContent.replace(/\u{25CA}/u,"").trim(),n=document.getElementById("neon-modal-window-edit-text-input").value;if(null!==n&&n!==t){const t={action:"setText",param:{elementId:[...e.classList.entries()].filter(e=>"text-select"!==e[1]&&"selected-to-edit"!==e[1])[0][1],text:n}};this.neonView.edit(t,this.neonView.view.getCurrentPageURI()).then(t=>{t&&this.neonView.updateForCurrentPage().then(()=>{(0,o.updateSelectedBBox)(e,this.dragHandler,this.neonView)})})}this.hideModalWindow()},this.keydownListener=function(e){switch(e.stopImmediatePropagation(),this.modalWindowView){case s.EDIT_TEXT:"Enter"===e.key&&this.updateSylText();default:"Escape"===e.key&&this.hideModalWindow()}},this.focusModalWindow=function(){switch(this.modalWindowView){case s.EDIT_TEXT:document.getElementById("neon-modal-window-edit-text-input").select();break;default:document.getElementById("neon-modal-window").focus()}},this.neonView=e,this.modalWindowState=a.CLOSED,document.getElementById("neon-modal-window-header-close").addEventListener("click",this.hideModalWindow.bind(this)),document.getElementById("neon-modal-window").addEventListener("keydown",this.keydownListener.bind(this)),document.getElementById("neon-modal-window-container").addEventListener("click",this.focusModalWindow.bind(this))}setModalWindowView(e,t){this.modalWindowView=e,this.setModalWindowContent(t)}getModalWindowView(){return this.modalWindowView.toString()}openModalWindow(){switch(Array.from(document.getElementsByClassName("neon-modal-window-content")).forEach(e=>{e.classList.remove("visible")}),this.modalWindowView){case s.EDIT_TEXT:this.openEditSylTextModalWindow();break;case s.HOTKEYS:document.getElementById("neon-modal-window-content-hotkeys").classList.add("visible");case s.DOCUMENT_UPLOAD:default:document.getElementById("neon-modal-window-container").style.display="flex",this.focusModalWindow()}document.body.style.overflowX="hidden",document.body.style.overflowY="hidden",this.modalWindowState=a.OPEN}hideModalWindow(){switch(this.modalWindowView){case s.EDIT_TEXT:document.getElementById("syl_text").querySelectorAll("span.selected-to-edit")[0].classList.remove("selected-to-edit");default:document.getElementById("neon-modal-window-container").style.display="none",this.modalWindowView!==s.DOCUMENT_UPLOAD&&document.getElementById("container").focus()}document.body.style.overflowX="hidden",document.body.style.overflowY="scroll",this.modalWindowState=a.CLOSED}setModalWindowContent(e){switch(this.modalWindowView){case s.EDIT_TEXT:document.getElementById("neon-modal-window-content-container").innerHTML=i.editTextModal,document.getElementById("neon-modal-window-header-title").innerText="EDIT SYLLABLE TEXT";const t=/\u{25CA}/u,n=document.getElementById("syl_text").querySelectorAll("span.selected-to-edit")[0].textContent.replace(t,"").trim();document.getElementById("neon-modal-window-edit-text-input").value=n;break;case s.HOTKEYS:document.getElementById("neon-modal-window-content-container").innerHTML=i.hotkeysModal,document.getElementById("neon-modal-window-header-title").innerText="HOTKEYS";break;case s.VALIDATION_STATUS:document.getElementById("neon-modal-window-content-container").innerHTML=`
${e}
\n `,document.getElementById("neon-modal-window-header-title").innerText="ERROR LOG";break;case s.DOCUMENT_UPLOAD:document.getElementById("neon-modal-window-header-title").innerText="DOCUMENT UPLOAD",document.getElementById("neon-modal-window-content-container").innerHTML=r.uploadAreaHTML;break;default:console.error("Unknown selection type. This should not have occurred.")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(8),r=n(12),o=n(4),s=n(3);t.default=class{constructor(e,t){this.dragStartCoords=[-1,-1],this.neonView=e,this.selector=t}dragInit(){const e=i.drag().on("start",function(){this.dragStartCoords=[i.event.x,i.event.y],this.dx=0,this.dy=0,i.event.sourceEvent.target.classList.contains("staff")&&i.select(this.selector).call(e)}.bind(this)).on("drag",this.dragging.bind(this)).on("end",this.dragEnded.bind(this));i.selectAll(".selected").call(e);let t=Array.from(document.querySelectorAll(".selected"));this.noMovePrecedes=t.filter(e=>e.classList.contains("no-moving")&&e.hasAttribute("mei:precedes")),t=t.filter(e=>!e.classList.contains("no-moving")),this.selection=t.concat(Array.from(document.querySelectorAll(".resizePoint")))}dragging(){this.dx=i.event.x-this.dragStartCoords[0],this.dy=i.event.y-this.dragStartCoords[1],this.moveElements(this.selection,this.dx,this.dy);if(0===this.selection.filter(e=>e.classList.contains("syl")).length&&0===this.noMovePrecedes.length){const e=Array.from(document.querySelectorAll(".syllable.selected")).map(e=>e.querySelector(".sylTextRect-display"));this.moveElements(e,-this.dx,-this.dy)}}dragEnded(){const e=Math.abs(this.dx),t=Math.abs(this.dy);if(e<=5&&t<=5)return this.reset(),void this.dragInit();const n=this.selection.filter(e=>!e.classList.contains("resizePoint"));if(this.isCursorOutOfBounds()||this.isDragOutOfBounds(n)){this.returnElements(this.selection);const e=Array.from(document.querySelectorAll(".syllable.selected")).map(e=>e.querySelector(".sylTextRect-display"));return this.returnElements(e),this.reset(),this.dragInit(),(0,o.queueNotification)("[FAIL] Glyphs were placed out of bounds! Drag action failed.","error")}const i=[];n.forEach(e=>{const t={action:"drag",param:{elementId:"rect"===e.tagName?e.closest(".syl").id:e.id,x:this.dx,y:-this.dy}};i.push(t)});const r={action:"chain",param:i};this.neonView.edit(r,this.neonView.view.getCurrentPageURI()).then(async()=>{const e=Array.from(document.querySelectorAll(".selected")).filter(e=>!e.classList.contains("no-moving")).map(e=>e.id);await this.neonView.updateForCurrentPage(),this.endOptionsSelection(),this.reset(),await this.reselect(e),this.dragInit()})}async reselect(e){const t=e.map(e=>document.querySelector("#"+e));t.filter(e=>!e.classList.contains("syl")).forEach(async()=>await(0,s.selectAll)(t,this.neonView,this)),t.filter(e=>e.classList.contains("syl")).forEach(e=>(0,s.selectBBox)(e.querySelector(".sylTextRect-display"),this,this.neonView)),t.filter(e=>e.classList.contains("staff")).forEach(e=>(0,s.selectStaff)(e,this))}resetTo(e){this.resetToAction=e}reset(){void 0!==this.resetToAction&&i.select(this.selector).call(this.resetToAction)}endOptionsSelection(){const e=document.getElementById("moreEdit"),t=document.getElementById("extraEdit");e&&(e.innerHTML="",e.parentElement.classList.add("hidden")),t&&(t.innerHTML="",t.parentElement.classList.add("hidden"))}moveElements(e,t,n){e.filter(e=>null!==e).forEach(e=>{e.setAttribute("transform",`translate(${t},${n})`)})}returnElements(e){e.filter(e=>null!==e).forEach(e=>{e.removeAttribute("transform")})}isCursorOutOfBounds(){const e=this.dragStartCoords[0]+this.dx,t=this.dragStartCoords[1]+this.dy;return(0,r.isOutOfSVGBounds)(e,t)}isDragOutOfBounds(e){let t=document.querySelector("#displayBBox").checked?"use, rect":"use";e[0].classList.contains("staff")&&(t="path");const n=e.reduce((e,n)=>e.concat(...n.querySelectorAll(t)),[]).map(r.getGlyphBBox).reduce((e,t)=>({ulx:Math.min(e.ulx,t.ulx),uly:Math.min(e.uly,t.uly),lrx:Math.max(e.lrx,t.lrx),lry:Math.max(e.lry,t.lry)}),{ulx:Number.MAX_VALUE,uly:Number.MAX_VALUE,lrx:Number.MIN_VALUE,lry:Number.MIN_VALUE}),{ulx:i,uly:o,lrx:s,lry:a}=n;return(0,r.isOutOfSVGBounds)(i+this.dx,o+this.dy)||(0,r.isOutOfSVGBounds)(s+this.dx,a+this.dy)}}},,function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return o}));var r=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}},function(e,t,n){"use strict";function i(e,t,n){var i=n[n.length-1];e===i.element&&(n.pop(),i=n[n.length-1]);var r=i.element,o=i.index;if(Array.isArray(r))r.push(e);else if(o===t.length-2){r[t.pop()]=e}else t.push(e)}t.stringify=function(e){var t=[];t.push({obj:e});for(var n,i,r,o,s,a,c,l,u,d,f="";n=t.pop();)if(i=n.obj,f+=n.prefix||"",r=n.val||"")f+=r;else if("object"!=typeof i)f+=void 0===i?null:JSON.stringify(i);else if(null===i)f+="null";else if(Array.isArray(i)){for(t.push({val:"]"}),o=i.length-1;o>=0;o--)s=0===o?"":",",t.push({obj:i[o],prefix:s});t.push({val:"["})}else{for(c in a=[],i)i.hasOwnProperty(c)&&a.push(c);for(t.push({val:"}"}),o=a.length-1;o>=0;o--)u=i[l=a[o]],d=o>0?",":"",d+=JSON.stringify(l)+":",t.push({obj:u,prefix:d});t.push({val:"{"})}return f},t.parse=function(e){for(var t,n,r,o,s,a,c,l,u,d=[],f=[],h=0;;)if("}"!==(t=e[h++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":h+=3,i(null,d,f);break;case"t":h+=3,i(!0,d,f);break;case"f":h+=4,i(!1,d,f);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",h--;;){if(r=e[h++],!/[\d\.\-e\+]/.test(r)){h--;break}n+=r}i(parseFloat(n),d,f);break;case'"':for(o="",s=void 0,a=0;'"'!==(c=e[h++])||"\\"===s&&a%2==1;)o+=c,"\\"===(s=c)?a++:a=0;i(JSON.parse('"'+o+'"'),d,f);break;case"[":l={element:[],index:d.length},d.push(l.element),f.push(l);break;case"{":u={element:{},index:d.length},d.push(u.element),f.push(u);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===d.length)return d.pop();i(d.pop(),d,f)}}},function(e,t,n){"use strict";var i=n(20),r=n(10);t.a=function(e,t,n){var o=(e=e||{}).random||(e.rng||i.a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=o[s];return t}return Object(r.a)(o)}},function(e,t,n){"use strict";function i(e){if(16!==e.length)return"";function t(e,t){return e+t.toString(16).padStart(2,"0")}return e.slice(0,4).reduce(t,"")+"-"+e.slice(4,6).reduce(t,"")+"-"+e.slice(6,8).reduce(t,"")+"-"+e.slice(8,10).reduce(t,"")+"-"+e.slice(10).reduce(t,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.uuidv4=void 0,t.uuidv4=function(){if(void 0===window.crypto)return i(new Uint8Array(16));const e=new Uint8Array(16),t=Uint8Array.from([parseInt("01000000",2),parseInt("10000000",2),parseInt("00001111",2),parseInt("00111111",2)]);return window.crypto.getRandomValues(e),e[6]=e[6]&t[2]|t[0],e[8]=e[8]&t[3]|t[1],i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initGroupingListeners=t.endGroupingSelection=t.triggerGrouping=t.mergeStaves=t.isLinkable=t.isLinked=t.isGroupable=t.initNeonView=void 0;const i=n(7),r=n(34),o=n(4),s=n(3),a=n(13),c=n(13);let l;function u(e,t){if(Array.from(t.values()).length<2)return!1;switch(e){case"selByNeume":if(s.sharedLogicalParent(e,t))return!1;default:return!!s.areAdjacent(e,t)}}function d(e){return 2===e.length&&(e[0].getAttribute("mei:follows")==="#"+e[1].id&&e[1].getAttribute("mei:precedes")==="#"+e[0].id||e[0].getAttribute("mei:precedes")==="#"+e[1].id&&e[1].getAttribute("mei:follows")==="#"+e[0].id)}function f(e,t){switch(t.length){case 2:if("selBySyllable"!==e)return!1;if(d([t[0],t[1]]))return!0;if(s.isMultiStaveSelection(t)){const e=t[0].closest(".staff"),n=t[1].closest(".staff"),i=Array.from(e.parentElement.children),r=i.indexOf(e)e.classList.contains("syllable")),l=Array.from(a.children).filter(e=>e.classList.contains("syllable")),u=c[c.length-1],d=l[0];if(u.id===t[0].id&&d.id===t[1].id)return!0;if(u.id===t[1].id&&d.id===t[0].id)return!0}default:return!1}return!1}function h(){const e=document.querySelectorAll(".staff.selected"),t=[];e.forEach(e=>{t.push(e.id)});const n={action:"merge",param:{elementIds:t}};l.edit(n,l.view.getCurrentPageURI()).then(e=>{e?(o.queueNotification("Staff Merged","success"),a.endOptionsSelection(),l.updateForCurrentPage()):o.queueNotification("Merge Failed","error")})}function p(){const e=document.getElementById("moreEdit");e.innerHTML="",e.parentElement.classList.add("hidden"),document.body.removeEventListener("keydown",c.deleteButtonHandler),document.body.removeEventListener("keydown",g)}function m(){const e=document.getElementById("delete");e.removeEventListener("click",c.removeHandler),e.addEventListener("click",c.removeHandler),document.body.addEventListener("keydown",c.deleteButtonHandler),document.body.addEventListener("keydown",g);try{document.getElementById("mergeSyls").addEventListener("click",()=>{v("group","neume",_().filter(e=>document.getElementById(e).classList.contains("neume")))})}catch(e){}try{document.getElementById("groupNeumes").addEventListener("click",()=>{v("group","neume",b())})}catch(e){}try{document.getElementById("groupNcs").addEventListener("click",()=>{v("group","nc",b())})}catch(e){}try{document.getElementById("ungroupNeumes").addEventListener("click",()=>{v("ungroup","neume",_())})}catch(e){}try{document.getElementById("ungroupNcs").addEventListener("click",()=>{v("ungroup","nc",_())})}catch(e){}try{document.getElementById("toggle-ligature").addEventListener("click",async()=>{const e={action:"toggleLigature",param:{elementIds:b()}};l.edit(e,l.view.getCurrentPageURI()).then(e=>{e?o.queueNotification("Ligature Toggled","success"):o.queueNotification("Ligature Toggle Failed","error"),p(),l.updateForCurrentPage()})})}catch(e){}try{document.getElementById("toggle-link").addEventListener("click",()=>{y()})}catch(e){}}t.initNeonView=function(e){l=e},t.isGroupable=u,t.isLinked=d,t.isLinkable=f,t.mergeStaves=h,t.triggerGrouping=function(e){const t=document.getElementById("moreEdit");t.parentElement.classList.remove("hidden"),t.innerHTML+=i.groupingMenu[e],m()},t.endGroupingSelection=p,t.initGroupingListeners=m;const g=function(e){if("g"===e.key){const e=Array.from(document.querySelectorAll(".selected"));if(0==e.length)return;const t=s.getSelectionType();switch(t){case"selBySyllable":if(f(t,e))y();else if(u(t,e)){v("group","neume",_().filter(e=>document.getElementById(e).classList.contains("neume")))}else if(1===e.length){v("ungroup","neume",_())}break;case"selByNeume":if(u(t,e)){v("group","neume",b())}else{v("ungroup","nc",_())}break;case"selByNc":if(u(t,e)){v("group","nc",b())}else{v("ungroup","nc",_())}break;case"selByStaff":u(t,e)?h():a.triggerStaffSplitMode();break;default:return void console.error(`Can't perform grouping/ungrouping action on selection type ${t}.`)}}};function v(e,t,n){const i={action:e,param:{groupType:t,elementIds:n}};l.edit(i,l.view.getCurrentPageURI()).then(i=>{if(i?"group"===e?o.queueNotification("Grouping Success","success"):o.queueNotification("Ungrouping Success","success"):"group"===e?o.queueNotification("Grouping Failed","error"):o.queueNotification("Ungrouping Failed","error"),l.updateForCurrentPage(),"nc"===t){const e=document.getElementById(n[0]).parentElement,t=Array.from(e.children);void 0===l.info.getContour(t)&&r.groupingNotRecognized()}p()})}function y(){const e=b(),t={action:"chain",param:[]},n=new Array;if(document.getElementById(e[0]).getAttribute("mei:precedes"))n.push({action:"set",param:{elementId:e[0],attrType:"precedes",attrValue:""}}),n.push({action:"set",param:{elementId:e[1],attrType:"follows",attrValue:""}}),n.push({action:"setText",param:{elementId:e[1],text:""}});else if(document.getElementById(e[0]).getAttribute("mei:follows"))n.push({action:"set",param:{elementId:e[0],attrType:"follows",attrValue:""}}),n.push({action:"set",param:{elementId:e[1],attrType:"precedes",attrValue:""}}),n.push({action:"setText",param:{elementId:e[0],text:""}});else{const t=document.getElementById(e[0]),i=document.getElementById(e[1]),r=t.closest(".staff"),o=i.closest(".staff"),s=Array.from(r.parentElement.children).filter(e=>e.classList.contains("staff"));let a,c;s.indexOf(r){e?o.queueNotification("Toggled Syllable Link"):o.queueNotification("Failed to Toggle Syllable Link"),p(),l.updateForCurrentPage()})}function b(){const e=[];return Array.from(document.getElementsByClassName("selected")).forEach(t=>{e.push(t.id)}),e}function _(){const e=[];return Array.from(document.getElementsByClassName("selected")).forEach(t=>{if(t.classList.contains("divLine")||t.classList.contains("accid")||t.classList.contains("clef"))return;Array.from(t.children).forEach(t=>{e.push(t.id)})}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resize=void 0;const i=n(3),r=n(8),o=n(12),s=n(4),a={TopLeft:0,Top:1,TopRight:2,Right:3,BottomRight:4,Bottom:5,BottomLeft:6,Left:7};function c(e,t,n,i,r){let o;if(r>=0)o=[{x:e,y:t,name:a.TopLeft},{x:(e+n)/2,y:t+(n-e)/2*Math.sin(r),name:a.Top},{x:n,y:t+(n-e)*Math.sin(r),name:a.TopRight},{x:n,y:(t+i+(n-e)*Math.sin(r))/2,name:a.Right},{x:n,y:i,name:a.BottomRight},{x:(e+n)/2,y:i-(n-e)/2*Math.sin(r),name:a.Bottom},{x:e,y:i-(n-e)*Math.sin(r),name:a.BottomLeft},{x:e,y:(t+i-(n-e)*Math.sin(r))/2,name:a.Left}];else{const s=(n-e)*Math.tan(Math.abs(r)),c=i-t-s;o=[{x:e,y:t+s,name:a.TopLeft},{x:(e+n)/2,y:t+s/2,name:a.Top},{x:n,y:t,name:a.TopRight},{x:n,y:t+c/2,name:a.Right},{x:n,y:t+c,name:a.BottomRight},{x:(e+n)/2,y:i-s/2,name:a.Bottom},{x:e,y:i,name:a.BottomLeft},{x:e,y:i-c/2,name:a.Left}]}return o}t.resize=function(e,t,n){let l,u,d,f,h,p,m,g,v,y,b,_,w,k,S;function E(){const e=c(l,u,d,f,h),t=e.filter((e,t)=>t%2==0).map(e=>e.x+","+e.y).join(" ");document.querySelector("#resizeRect").setAttribute("points",t);const n=document.querySelector(".syl.selected > .sylTextRect-display");n&&(n.setAttribute("x",String(Math.min(l,d))),n.setAttribute("y",String(Math.min(u,f))),n.setAttribute("width",String(Math.abs(d-l))),n.setAttribute("height",String(Math.abs(f-u))));for(const t in a){const n=e[a[t]];r.select("#p-"+t).filter(".resizePoint").attr("cx",n.x).attr("cy",n.y)}let i=e[3].x,o=e[3].y;const s=i+100+","+(o+85)+" "+(i+70)+","+(o+50)+" "+(i+100)+","+(o+15)+" "+(i+130)+","+(o+50);i=e[7].x,o=e[7].y;const p=i-100+","+(o-15)+" "+(i-130)+","+(o-50)+" "+(i-100)+","+(o-85)+" "+(i-70)+","+(o-50);r.select("#rotateLeft").attr("points",p),r.select("#rotateRight").attr("points",s)}!function L(){if(null===e)return;if(e.classList.contains("syl")){const t=e.querySelector(".sylTextRect-display");if(null===t)return void console.warn("Tried to draw resize rect for a sylTextRect that doesn't exist (or isn't displaying)");l=Number(t.getAttribute("x")),u=Number(t.getAttribute("y")),d=+l+ +t.getAttribute("width"),f=+u+ +t.getAttribute("height"),h=0}if(e.classList.contains("staff")){const t=(0,i.getStaffBBox)(e);l=t.ulx,u=t.uly,d=t.lrx,f=t.lry;const n=e.querySelector("path").getAttribute("d").match(/\d+/g).map(e=>Number(e));h=Math.atan((n[3]-n[1])/(n[2]-n[0]))}let A;p=l,v=u,m=d,y=f;const x=c(l,u,d,f,h);w=x[2].x-x[0].x;const C=x.filter((e,t)=>t%2==0).map(e=>e.x+","+e.y).join(" ");r.select("#"+e.id).append("polygon").attr("points",C).attr("id","resizeRect").attr("stroke","black").attr("stroke-width",10).attr("fill","none").style("cursor","move").style("stroke-dasharray","20 10");for(const t in a){const n=x[a[t]];r.select(e.viewportElement).append("circle").attr("cx",n.x).attr("cy",n.y).attr("r",25).attr("stroke","black").attr("stroke-width",4).attr("fill","#0099ff").attr("class","resizePoint").attr("id","p-"+t)}for(const e in a)r.select("#p-"+e).filter(".resizePoint").call(r.drag().on("start",()=>{B(e)}).on("drag",q).on("end",I.bind(this)));if(e.classList.contains("staff")){let t=x[3].x,n=x[3].y;const i=t+100+","+(n+85)+" "+(t+70)+","+(n+50)+" "+(t+100)+","+(n+15)+" "+(t+130)+","+(n+50);t=x[7].x,n=x[7].y;const o=t-100+","+(n-15)+" "+(t-130)+","+(n-50)+" "+(t-100)+","+(n-85)+" "+(t-70)+","+(n-50);r.select("#"+e.id).append("polygon").attr("points",i).attr("id","rotateRight").attr("stroke","black").attr("stroke-width",7).attr("fill","#0099ff").attr("class","rotatePoint"),r.select("#"+e.id).append("polygon").attr("points",o).attr("id","rotateLeft").attr("stroke","black").attr("stroke-width",7).attr("fill","#0099ff").attr("class","rotatePoint"),r.select("#rotateLeft").call(r.drag().on("start",O).on("drag",(function(){const e=r.mouse(this)[1]-b,t=S-Math.atan(e/w);t>-.2&&t<.2&&(k=e,u=_+k,h=t,h>=0?(u=k+x.filter(e=>e.name===a.TopLeft)[0].y,f=x.filter(e=>e.name===a.BottomRight)[0].y):(u=x.filter(e=>e.name===a.TopRight)[0].y,f=k+x.filter(e=>e.name===a.BottomLeft)[0].y));E()})).on("end",N)),r.select("#rotateRight").call(r.drag().on("start",O).on("drag",(function(){const e=r.mouse(this)[1]-b,t=S+Math.atan(e/w);t>-.2&&t<.2&&(k=e,h=t,h>=0?(f=k+x.filter(e=>e.name===a.BottomRight)[0].y,u=x.filter(e=>e.name===a.TopLeft)[0].y):(u=k+x.filter(e=>e.name===a.TopRight)[0].y,f=x.filter(e=>e.name===a.BottomLeft)[0].y));E()})).on("end",N))}function B(e){A=e;const t=x.find(t=>t.name===a[e]);g=[t.x,t.y],v=u,y=f}function q(){const e=r.mouse(this);switch(a[A]){case a.TopLeft:l=e[0],u=e[1];break;case a.Top:u=e[1]-(d-l)*Math.tan(h)/2;break;case a.TopRight:d=e[0],u=e[1]-(d-l)*Math.tan(h);break;case a.Right:d=e[0],f=y+(e[0]-g[0])*Math.tan(h);break;case a.BottomRight:d=e[0],f=e[1];break;case a.Bottom:f=e[1]+(d-l)*Math.tan(h)/2;break;case a.BottomLeft:l=e[0],f=e[1]+(d-l)*Math.tan(h);break;case a.Left:l=e[0],u=v+(e[0]-g[0])*Math.tan(h);break;default:console.error("Something that wasn't a side of the rectangle was dragged. This shouldn't happen.")}E()}function I(){if((0,o.isOutOfSVGBounds)(l,u)||(0,o.isOutOfSVGBounds)(d,f))return l=p,u=v,d=m,f=y,E(),(0,s.queueNotification)("[FAIL] Glyphs were placed out of bounds! Resize action failed.","error");const a={action:"resize",param:{elementId:e.id,ulx:l,uly:u,lrx:d,lry:f}};t.edit(a,t.view.getCurrentPageURI()).then(async o=>{if(o&&await t.updateForCurrentPage(),e=document.querySelector("#"+e.id),l=void 0,u=void 0,d=void 0,f=void 0,r.selectAll(".resizePoint").remove(),r.selectAll("#resizeRect").remove(),r.selectAll(".rotatePoint").remove(),L(),e.classList.contains("syl"))(0,i.selectBBox)(e.querySelector(".sylTextRect-display"),n,this);else{(0,i.selectAll)([document.querySelector("#"+e.id)],t,n);const r=document.querySelector("moreEdit");r&&(r.innerHTML="",r.parentElement.classList.add("hidden"))}})}function O(){const e=r.event.sourceEvent.target.id;b=r.mouse(this)[1],y=f,v=u,_="rotateRight"===e?f:u,S=h}function N(){if(void 0===k&&(k=0),(0,o.isOutOfSVGBounds)(l,u)||(0,o.isOutOfSVGBounds)(d,f))return document.querySelectorAll(".resizePoint").forEach(e=>e.remove()),document.querySelectorAll("#resizeRect").forEach(e=>e.remove()),document.querySelectorAll(".rotatePoint").forEach(e=>e.remove()),e=document.getElementById(e.id),l=void 0,u=void 0,d=void 0,f=void 0,k=void 0,L(),e.classList.contains("syl")?(0,i.selectBBox)(e.querySelector(".sylTextRect-display"),n,this):(0,i.selectStaff)(e,n),(0,s.queueNotification)("[FAIL] Glyphs were placed out of bounds! Rotate action failed.","error");const a={action:"resizeRotate",param:{elementId:e.id,ulx:l,uly:u,lrx:d,lry:f,rotate:180*h/Math.PI}};t.edit(a,t.view.getCurrentPageURI()).then(async o=>{o&&await t.updateForCurrentPage(),e=document.getElementById(e.id),l=void 0,u=void 0,d=void 0,f=void 0,k=void 0,r.selectAll(".resizePoint").remove(),r.selectAll("#resizeRect").remove(),r.selectAll(".rotatePoint").remove(),L(),(0,i.selectAll)([e],t,n),e.classList.contains("syl")?(0,i.selectBBox)(e.querySelector(".sylTextRect-display"),n,this):(0,i.selectStaff)(e,n)})}}()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dragSelect=t.clickSelect=t.setSelectHelperObjects=t.setSelectStrokeWidth=void 0;const i=n(3),r=n(25),o=n(8),s=n(12);let a,c,l,u,d=7;function f(e){"Escape"===e.key&&(document.getElementsByClassName("selected").length>0&&l.infoListeners(),(0,i.unselect)())}function h(e){if("selByBBox"!==(0,i.getSelectionType)()||!document.getElementById("displayText").checked||"Enter"!==e.key)return;const t=document.querySelector(".syllable-highlighted");if(t){document.querySelector("span."+t.id).click()}}function p(e){if("selByBBox"!==(0,i.getSelectionType)()||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;const t=document.querySelector(".syllable-highlighted"),n=Array.from(document.querySelectorAll(".syllable")).filter(e=>null!==e.querySelector(".sylTextRect-display")),r=n.indexOf(t);if("ArrowLeft"===e.key&&r>0){(0,i.unselect)();const e=n[r-1].querySelector(".sylTextRect-display");(0,i.selectAll)([e],c,a)}else if("ArrowRight"===e.key&&rr.lrx||n.yr.lry)}const r=(0,i.getStaffBBox)(e);return!(t.xr.lrx&&n.x>r.lrx||t.yr.lry+Math.abs(r.lry-n.y)*Math.tan(r.rotate)&&n.y>r.lry+Math.abs(r.lry-n.y)*Math.tan(r.rotate))}function y(e){if(c&&"insert"!==c.getUserMode()&&!e.shiftKey)if("use"===this.tagName&&"selByBBox"!==(0,i.getSelectionType)()){if(null===this.closest(".selected")){let e=[this];const n=/E9B[45678]/,r=/E9B[9ABC]/;if(this.getAttribute("xlink:href").match(r)){const t=this.closest(".nc"),i=this.closest(".neume"),r=Array.from(i.children).indexOf(t),o=i.children[r-1].children[0];console.assert(o.getAttribute("xlink:href").match(n),"First glyph of ligature unexpected!"),null===o.closest(".selected")&&e.unshift(o)}else if(this.getAttribute("xlink:href").match(n)){const t=this.closest(".nc"),n=this.closest(".neume"),i=Array.from(n.children).indexOf(t),o=n.children[i+1].children[0];console.assert(o.getAttribute("xlink:href").match(r),"Second glyph of ligature unexpected!"),null===o.closest(".selected")&&e.push(o)}t()&&(e=e.concat(Array.from(document.querySelectorAll(".selected")))),(0,i.selectAll)(e,c,a),a&&a.dragInit()}else if(t()){const e={selByStaff:".staff",selByNeume:".neume",selByNc:".nc",selByLayerElement:".accid"}[document.querySelector(".sel-by .is-active").id]||".syllable",t=[this.closest(e)];let n=[];n=Array.from(document.getElementsByClassName("selected")),n=n.filter(e=>!t.includes(e)),(0,i.selectAll)(n,c,a),a&&a.dragInit()}}else if("rect"===e.target.tagName&&"selByBBox"===(0,i.getSelectionType)())if(null===this.closest(".selected")){let n=[e.target];t()&&(n=n.concat(Array.from(document.getElementsByClassName("selected"))),n=n.map(e=>"rect"==e.tagName?e:e.querySelector(".sylTextRect-Display"))),(0,i.selectAll)(n,c,a),a&&a.dragInit()}else{let e=[];if(t()){const t=[this];e=Array.from(document.getElementsByClassName("selected")),e=e.map(e=>"rect"==e.tagName?e:e.querySelector(".sylTextRect-Display")),e=e.filter(e=>!t.includes(e)),(0,i.selectAll)(e,c,a),a&&a.dragInit()}}else{if("selByStaff"!==(0,i.getSelectionType)())return void l.infoListeners();t()||(0,i.unselect)();const n=(0,s.getStaffByCoords)(e.clientX,e.clientY);if(!n)return;n.classList.contains("selected")||((0,i.selectStaff)(n,a),(0,r.resize)(n,c,a),a&&a.dragInit()),n.dispatchEvent(new MouseEvent("mousedown",{screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,view:e.view}))}function t(){return window.navigator.userAgent.match(/Mac/)?e.metaKey:e.ctrlKey}}t.setSelectStrokeWidth=function(e){d=e},t.setSelectHelperObjects=function(e,t){a=t,c=e,l=c.info,u=c.view.zoomHandler},t.clickSelect=function(e){document.querySelectorAll(e).forEach(e=>{e.removeEventListener("mousedown",y),e.addEventListener("mousedown",y)}),document.body.removeEventListener("keydown",f),document.body.addEventListener("keydown",f),document.body.removeEventListener("keydown",h),document.body.addEventListener("keydown",h),document.body.removeEventListener("keydown",p),document.body.addEventListener("keydown",p),document.getElementById("container").addEventListener("contextmenu",e=>{e.preventDefault()}),document.querySelectorAll("use,rect,#moreEdit").forEach(e=>{e.removeEventListener("click",g),e.addEventListener("click",g)})},t.dragSelect=function(e){let t=0,n=0,r=!1,s=!1;const l=o.select(e);o.selectAll(e.replace(".active-page","").trim()).on(".drag",null);const f=o.drag().on("start",(function(){if(!c)return;const e=c.getUserMode();if("use"!==o.event.sourceEvent.target.nodeName&&"insert"!==e&&"rect"!==o.event.sourceEvent.target.nodeName){if(o.event.sourceEvent.shiftKey)r=!0,void 0!==u&&u.startDrag();else if(!document.getElementById("selByStaff").classList.contains("is-active")||(h=o.mouse(this),0===Array.from(document.getElementsByClassName("staff")).filter(e=>{const t=(0,i.getStaffBBox)(e),n=t.ulx,r=t.uly,o=t.lrx,s=t.lry,a=t.rotate;return h[0]>n&&h[0]r+(h[0]-n)*Math.tan(a)&&h[1]v(e,h,p));y.forEach(e=>{if("use"===e.tagName&&e.getAttribute("xlink:href").match(/E9B[456789ABC]/)){const t=e.closest(".neume"),n=Array.from(t.children).indexOf(e.closest(".nc"));if(e.getAttribute("xlink:href").match(/E9B[45678]/)){const e=t.children[n+1].querySelector("use");y.indexOf(e)<0&&y.push(e)}else{const e=t.children[n-1].querySelector("use");y.indexOf(e)<0&&y.push(e)}}}),(0,i.selectAll)(y,c,a),a&&a.dragInit(),o.selectAll("#selectRect").remove(),s=!1}r=!1}));l.call(f),a&&a.resetTo(f)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initDisplayListener=t.initErrorLogControls=t.initErrorLog=t.recordNotification=void 0;const i=n(7),r=n(6);function o(){const e=document.querySelector("#error_log"),t=document.querySelector("#errorLogHeading"),n=t.querySelector("svg > use"),i=document.querySelector("#errorLogContents"),{displayErrLog:o}=(0,r.getSettings)();o&&e.classList.add("visible"),t.addEventListener("click",e=>{e.stopPropagation(),i.classList.contains("closed")?(i.classList.remove("closed"),i.style.padding="0.5em 0.75em",setTimeout(()=>{i.style.overflow="visible"},200),n.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(i.classList.add("closed"),i.style.overflow="hidden",setTimeout(()=>{i.style.padding="0px"},200),n.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))}),s()}function s(){const e=document.querySelector("#error_log"),t=document.querySelector("#display-single-container"),n=document.createElement("label"),i=document.createElement("input");i.classList.add("checkbox"),n.classList.add("checkbox-container","side-panel-btn"),n.textContent="Errors",i.id="display-errors",i.type="checkbox",i.checked=!1,n.appendChild(i),t.append(n);const{displayErrLog:o}=(0,r.getSettings)();o&&(i.checked=!0),i.addEventListener("click",()=>{const t=document.getElementById("display-all-btn"),n=document.getElementById("displayInfo"),o=document.getElementById("displayBBox"),s=document.getElementById("displayText"),a=document.getElementById("display-errors");i.checked?(e.classList.add("visible"),(0,r.setSettings)({displayErrLog:!0}),(null==n?void 0:n.checked)&&(null==o?void 0:o.checked)&&(null==s?void 0:s.checked)&&(null==a?void 0:a.checked)&&(t.classList.add("selected"),t.innerHTML="Hide All")):(e.classList.remove("visible"),(0,r.setSettings)({displayErrLog:!1}),t.classList.contains("selected")&&(t.classList.remove("selected"),t.innerHTML="Display All"))})}t.recordNotification=function(e){document.querySelector("#errorLogContents").prepend(function(e){const t=document.createElement("div");t.classList.add("notification-container"),t.innerHTML=`\n
\n\n
\n
${e.message}
\n
\n
\n\n
\n\n
\n \n
\n `;const n=t.querySelector(".log-remove");return n.onclick=()=>t.remove(),n.addEventListener("mouseover",()=>{n.setAttribute("src","/Neon/Neon-gh//assets/img/garbage-open.svg")}),n.addEventListener("mouseout",()=>{n.setAttribute("src","/Neon/Neon-gh//assets/img/garbage-closed.svg")}),t}(e))},t.initErrorLog=function(){document.querySelector("#error_log").innerHTML=i.errorLogsPanelContents,o()},t.initErrorLogControls=o,t.initDisplayListener=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSelectedBBox=void 0;const i=n(3),r=n(18),o=n(26),s=n(15),a=n(17);function c(){if(!document.getElementById("selByBBox").classList.contains("is-active")){(0,i.unselect)();try{document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden")}catch(e){}document.getElementById("selByBBox").classList.add("is-active");try{document.getElementById("selByNc").classList.remove("is-active"),document.getElementById("selByNeume").classList.remove("is-active"),document.getElementById("selByStaff").classList.remove("is-active"),document.getElementById("selBySyllable").classList.remove("is-active"),document.getElementById("selByLayerElement").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,s.setGroupingHighlight)("syllable")}catch(e){}}this.addBBoxListeners()}function l(e,t,n){(0,i.unselect)();const r=Array.from(e.classList).find(e=>"text-select"!==e&&"selected-to-edit"!==e);if(document.getElementById("displayBBox").checked&&document.getElementById(r)){const e=document.getElementById(r).querySelector(".sylTextRect-display");(0,i.selectBBox)(e,t,n)}}t.updateSelectedBBox=l;t.default=class{constructor(e){this.neonView=e,this.initTextEdit()}updateSelectedBBox(e){(0,i.unselect)();const t=Array.from(e.classList).find(e=>"text-select"!==e&&"selected-to-edit"!==e);if(document.getElementById("displayBBox").checked&&document.getElementById(t)){const e=document.getElementById(t).querySelector(".sylTextRect-display");(0,i.selectBBox)(e,this.dragHandler,this.neonView)}}initTextEdit(){const e=document.getElementById("syl_text").querySelectorAll("span"),t=this.neonView.modal;e.forEach(e=>{function n(){e.classList.add("selected-to-edit"),t.setModalWindowView(a.ModalWindowView.EDIT_TEXT),t.openModalWindow(),l(e,this.dragHandler,this.neonView)}e.removeEventListener("click",n),e.addEventListener("click",n)})}initSelectByBBoxButton(){if(void 0!==this.neonView.NeumeEdit){const e=document.getElementById("selByBBox");if(e)return void(e.style.display="");const t=document.getElementById("selection-mode-btns-container"),n=document.createElement("button");n.classList.add("side-panel-btn","sel-by"),n.id="selByBBox",n.textContent="BBox",t.appendChild(n),n.addEventListener("click",c.bind(this)),document.body.addEventListener("keydown",e=>{"6"===e.key&&""===document.getElementById("selByBBox").style.display&&c.bind(this)()}),this.neonView.view.addUpdateCallback(this.addBBoxListeners.bind(this))}else{const e=document.getElementById("undo").closest(".control"),t=document.createElement("p");t.classList.add("control");const n=document.createElement("button");n.classList.add("side-panel-btn","sel-by"),n.id="selByBBox",n.textContent="BBox",t.appendChild(n),e.appendChild(t),n.classList.add("is-active"),n.style.display="none",this.addBBoxListeners(),this.neonView.view.addUpdateCallback(this.addBBoxListeners.bind(this))}}addBBoxListeners(){document.getElementById("selByBBox").classList.contains("is-active")&&((0,i.unselect)(),void 0===this.neonView.NeumeEdit&&(this.dragHandler=new r.default(this.neonView,".sylTextRect-display"),(0,o.setSelectHelperObjects)(this.neonView,this.dragHandler),"SingleView"===this.neonView.view.constructor.name?((0,o.clickSelect)("#mei_output, #mei_output rect"),(0,o.dragSelect)("#svg_group")):((0,o.clickSelect)(".active-page > svg > svg, .active-page > svg > svg rect"),(0,o.dragSelect)(".active-page svg"))))}}},function(e,t,n){"use strict";n.r(t),function(e){var i,r,o=n(2),s=n.n(o),a=n(22),c=n(14),l=n.n(c),u=n(21),d=n.n(u),f=n(5),h=n.n(f),p=n(1),m=n.n(p),g=n(0),v=n.n(g);function y(e){return"$"+e}function b(e){return e.substring(1)}function _(){this._store={}}function w(e){if(this._store=new _,e&&Array.isArray(e))for(var t=0,n=e.length;tb(e))},_.prototype.delete=function(e){var t=y(e),n=t in this._store;return delete this._store[t],n},_.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,i=t.length;n=u.length)){var n=Math.min(d+6,u.length),i=u.slice(d,n);!function(n,i){n.forEach((function(n,r){var s=i+r,a=o.get(n),u=B(a[0],["atts_since","attachments"]);u.open_revs=a.map((function(e){return e.rev})),u.open_revs=u.open_revs.filter(I);var d=I;0===u.open_revs.length&&(delete u.open_revs,d=O),["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(u[e]=t[e])})),e.get(n,u,(function(e,t){var i,r,o;i=e?[{error:e}]:d(t),r=n,o=i,c[s]={id:r,docs:o},l(),f()}))}))}(i,d),d+=i.length}}f()}try{localStorage.setItem("_pouch_check_localstorage",1),q=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){q=!1}function T(){return q}function P(){v.a.call(this),this._listeners={},function(e){T()&&addEventListener("storage",(function(t){e.emit(t.key)}))}(this)}function j(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function M(e){var t=0;return e||(t=2e3),function(e,t){return e=parseInt(e,10)||0,(t=parseInt(t,10))!=t||t<=e?t=(e||1)<<1:t+=1,t>6e5&&(e=3e5,t=6e5),~~((t-e)*Math.random()+e)}(e,t)}function D(e,t){j("info","The above "+e+" is totally normal. "+t)}m()(P,v.a),P.prototype.addListener=function(e,t,n,i){if(!this._listeners[t]){var r=this,o=!1;this._listeners[t]=a,this.on(e,a)}function a(){if(r._listeners[t])if(o)o="waiting";else{o=!0;var e=B(i,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);n.changes(e).on("change",(function(e){e.seq>i.since&&!i.cancelled&&(i.since=e.seq,i.onChange(e))})).on("complete",(function(){"waiting"===o&&s()(a),o=!1})).on("error",(function(){o=!1}))}}},P.prototype.removeListener=function(e,t){t in this._listeners&&(v.a.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},P.prototype.notifyLocalWindows=function(e){T()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},P.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var R="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n0||i0||i>>1],t)<0?r=i+1:o=i;return r}(e,t,n);e.splice(i,0,t)}function Fe(e,t){for(var n,i,r=t,o=e.length;r0;){var r=n.pop(),o=r.tree1,s=r.tree2;(o[1].status||s[1].status)&&(o[1].status="available"===o[1].status||"available"===s[1].status?"available":"missing");for(var a=0;a0;){var m=p.pop();if(0!==m.diff)for(var g=m.ids[2],v=0,y=g.length;vt){n||(n={});var u=l.length-t;a={pos:c.pos+u,ids:Fe(l,u)};for(var d=0;d0&&i.emit("error",t)):i.emit("complete",n),i.removeAllListeners(),e.removeListener("destroyed",o)}));function o(){i.cancel()}n&&(i.on("complete",(function(e){n(null,e)})),i.on("error",n)),e.once("destroyed",o),t.onChange=function(e,t,n){i.isCancelled||function(e,t,n,i){try{e.emit("change",t,n,i)}catch(e){j("error",'Error in .on("change", function):',e)}}(i,e,t,n)};var s=new Promise((function(e,n){t.complete=function(t,i){t?n(t):e(i)}}));i.once("cancel",(function(){e.removeListener("destroyed",o),t.complete(null,{status:"cancelled"})})),this.then=s.then.bind(s),this.catch=s.catch.bind(s),this.then((function(e){r(null,e)}),r),e.taskqueue.isReady?i.validateChanges(t):e.taskqueue.addTask((function(e){e?t.complete(e):i.isCancelled?i.emit("cancel"):i.validateChanges(t)}))}function Je(e,t,n){var i=[{rev:e._rev}];"all_docs"===n.style&&(i=Pe(t.rev_tree).map((function(e){return{rev:e.rev}})));var r={id:t.id,changes:i,doc:e};return Ge(t,e._rev)&&(r.deleted=!0),n.conflicts&&(r.doc._conflicts=je(t),r.doc._conflicts.length||delete r.doc._conflicts),r}function Xe(e,t){return et?1:0}function Ye(e,t){return function(n,i){n||i[0]&&i[0].error?((n=n||i[0]).docId=t,e(n)):e(null,i.length?i[0]:i)}}function Qe(e,t){var n=Xe(e._id,t._id);return 0!==n?n:Xe(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}function Ze(){for(var e in v.a.call(this),Ze.prototype)"function"==typeof this[e]&&(this[e]=this[e].bind(this))}function et(){this.isReady=!1,this.failed=!1,this.queue=[]}function tt(e,t){if(!(this instanceof tt))return new tt(e,t);var n=this;if(t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=L(t),n.auto_compaction=t.auto_compaction,n.prefix=tt.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var i=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var i=tt.adapters,r=tt.preferredAdapters,o=tt.prefix,s=t.adapter;if(!s)for(var a=0;at&&a.push(e)})),Ne(o,(function(e,t,n,i,r){var o=t+"-"+n;"available"===r.status&&-1!==a.indexOf(o)&&c.push(o)})),i._doCompaction(e,c,n)}))})),Ze.prototype.compact=C("compact",(function(e,t){"function"==typeof e&&(t=e,e={});e=e||{},this._compactionQueue=this._compactionQueue||[],this._compactionQueue.push({opts:e,callback:t}),1===this._compactionQueue.length&&function e(t){var n=t._compactionQueue[0],i=n.opts,r=n.callback;t.get("_local/compaction").catch((function(){return!1})).then((function(n){n&&n.last_seq&&(i.last_seq=n.last_seq),t._compact(i,(function(n,i){n?r(n):r(null,i),s()((function(){t._compactionQueue.shift(),t._compactionQueue.length&&e(t)}))}))}))}(this)})),Ze.prototype._compact=function(e,t){var n=this,i={return_docs:!1,last_seq:e.last_seq||0},r=[];n.changes(i).on("change",(function(e){r.push(n.compactDocument(e.id,0))})).on("complete",(function(e){var i=e.last_seq;Promise.all(r).then((function(){return me(n,"_local/compaction",(function(e){return(!e.last_seq||e.last_seq0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})),Ze.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new We(this,e,t)},Ze.prototype.close=C("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})),Ze.prototype.info=C("info",(function(e){var t=this;this._info((function(n,i){if(n)return e(n);i.db_name=i.db_name||t.name,i.auto_compaction=!(!t.auto_compaction||ae(t)),i.adapter=t.adapter,e(null,i)}))})),Ze.prototype.id=C("id",(function(e){return this._id(e)})),Ze.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},Ze.prototype.bulkDocs=C("bulkDocs",(function(e,t,n){if("function"==typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(ne(V));for(var i=0;i1?t.set(e.name,n):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach((function(e){e.emit("destroyed",!0)}))}}))}(tt),tt.adapter=function(e,t,n){t.valid()&&(tt.adapters[e]=t,n&&tt.preferredAdapters.push(e))},tt.plugin=function(e){if("function"==typeof e)e(tt);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){tt.prototype[t]=e[t]}))}return this.__defaults&&(tt.__defaults=R({},this.__defaults)),tt},tt.defaults=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);n=n||{},e&&"object"==typeof e&&(e=(n=e).name,delete n.name),n=R({},t.__defaults,n),tt.call(this,e,n)}return m()(t,tt),t.preferredAdapters=tt.preferredAdapters.slice(),Object.keys(tt).forEach((function(e){e in t||(t[e]=tt[e])})),t.__defaults=R({},this.__defaults,e),t},tt.fetch=function(e,t){return it(e,t)};function st(e,t){for(var n=e,i=0,r=t.length;i0&&"\\"===e[i-1]&&("$"===o||"."===o)?n=n.substring(0,n.length-1)+o:"."===o?(t.push(n),n=""):n+=o}return t.push(n),t}var ct=["$or","$nor","$not"];function lt(e){return ct.indexOf(e)>-1}function ut(e){return Object.keys(e)[0]}function dt(e){var t={},n={$or:!0,$nor:!0};return e.forEach((function(e){Object.keys(e).forEach((function(i){var r=e[i];if("object"!=typeof r&&(r={$eq:r}),lt(i))if(r instanceof Array){if(n[i])return n[i]=!1,void(t[i]=r);var o=[];t[i].forEach((function(e){Object.keys(r).forEach((function(t){var n=r[t],i=Math.max(Object.keys(e).length,Object.keys(n).length),s=dt([e,n]);Object.keys(s).length<=i||o.push(s)}))})),t[i]=o}else t[i]=dt([r]);else{var s=t[i]=t[i]||{};Object.keys(r).forEach((function(e){var t=r[e];return"$gt"===e||"$gte"===e?function(e,t,n){if(void 0!==n.$eq)return;void 0!==n.$gte?"$gte"===e?t>n.$gte&&(n.$gte=t):t>=n.$gte&&(delete n.$gte,n.$gt=t):void 0!==n.$gt?"$gte"===e?t>n.$gt&&(delete n.$gt,n.$gte=t):t>n.$gt&&(n.$gt=t):n[e]=t}(e,t,s):"$lt"===e||"$lte"===e?function(e,t,n){if(void 0!==n.$eq)return;void 0!==n.$lte?"$lte"===e?tt?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),i=Object.keys(t),r=Math.min(n.length,i.length),o=0;oi.length?1:-1}(e,t)}function pt(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var i=0;ir?1:0)}}(t.sort);e=e.sort(i),"string"!=typeof t.sort[0]&&"desc"===(r=t.sort[0])[ut(r)]&&(e=e.reverse())}var r;if("limit"in t||"skip"in t){var o=t.skip||0,s=("limit"in t?t.limit:e.length)+o;e=e.slice(o,s)}return e}function wt(e,t,n){return n.every((function(n){var i=t[n],r=at(n),o=st(e,r);return lt(n)?function(e,t,n){if("$or"===e)return t.some((function(e){return wt(n,e,Object.keys(e))}));if("$not"===e)return!wt(n,t,Object.keys(t));return!t.find((function(e){return wt(n,e,Object.keys(e))}))}(n,i,e):kt(i,e,r,o)}))}function kt(e,t,n,i){return!e||("object"==typeof e?Object.keys(e).every((function(r){var o=e[r];if(0===r.indexOf("$"))return St(r,t,o,n,i);var s=at(r);if(void 0===i&&"object"!=typeof o&&s.length>0)return!1;var a=st(i,s);return"object"==typeof o?kt(o,t,n,a):St("$eq",t,o,s,a)})):e===i)}function St(e,t,n,i,r){if(!xt[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return xt[e](t,n,i,r)}function Et(e){return null!=e}function Lt(e){return void 0!==e}function At(e,t){return t.some((function(t){return e instanceof Array?e.some((function(e){return 0===ht(t,e)})):0===ht(t,e)}))}var xt={$elemMatch:function(e,t,n,i){return!!Array.isArray(i)&&(0!==i.length&&("object"==typeof i[0]?i.some((function(e){return wt(e,t,Object.keys(t))})):i.some((function(i){return kt(t,e,n,i)}))))},$allMatch:function(e,t,n,i){return!!Array.isArray(i)&&(0!==i.length&&("object"==typeof i[0]?i.every((function(e){return wt(e,t,Object.keys(t))})):i.every((function(i){return kt(t,e,n,i)}))))},$eq:function(e,t,n,i){return Lt(i)&&0===ht(i,t)},$gte:function(e,t,n,i){return Lt(i)&&ht(i,t)>=0},$gt:function(e,t,n,i){return Lt(i)&&ht(i,t)>0},$lte:function(e,t,n,i){return Lt(i)&&ht(i,t)<=0},$lt:function(e,t,n,i){return Lt(i)&&ht(i,t)<0},$exists:function(e,t,n,i){return t?Lt(i):!Lt(i)},$mod:function(e,t,n,i){return Et(i)&&function(e,t){return"number"==typeof e&&parseInt(e,10)===e&&e%t[0]===t[1]}(i,t)},$ne:function(e,t,n,i){return t.every((function(e){return 0!==ht(i,e)}))},$in:function(e,t,n,i){return Et(i)&&At(i,t)},$nin:function(e,t,n,i){return Et(i)&&!At(i,t)},$size:function(e,t,n,i){return Et(i)&&Array.isArray(i)&&function(e,t){return e.length===t}(i,t)},$all:function(e,t,n,i){return Array.isArray(i)&&function(e,t){return t.every((function(t){return e.some((function(e){return 0===ht(t,e)}))}))}(i,t)},$regex:function(e,t,n,i){return Et(i)&&"string"==typeof i&&t.every((function(e){return function(e,t){return new RegExp(t).test(e)}(i,e)}))},$type:function(e,t,n,i){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}}(i,t)}};function Ct(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var n="string"==typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+n+'"'))}t()}function Bt(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=le(e.view):e.filter=le(e.filter))}function qt(e,t){return t.filter&&"string"==typeof t.filter&&!t.doc_ids&&!ae(e.db)}function It(e,t){var n=t.complete;if("_view"===t.filter){if(!t.view||"string"!=typeof t.view){var i=ne(Y,"`view` filter parameter not found or invalid.");return n(i)}var r=ce(t.view);e.db.get("_design/"+r[0],(function(i,o){if(e.isCancelled)return n(null,{status:"cancelled"});if(i)return n(ie(i));var s=o&&o.views&&o.views[r[1]]&&o.views[r[1]].map;if(!s)return n(ne(U,o.views?"missing json key: "+r[1]:"missing json key: views"));t.filter=pe(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+s+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{}),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){if("object"!=typeof t)throw new Error("Selector error: expected a JSON object");var n=_t([{doc:e}],{selector:t=ft(t)},Object.keys(t));return n&&1===n.length}(e,t.selector)},e.doChanges(t);else{var o=ce(t.filter);e.db.get("_design/"+o[0],(function(i,r){if(e.isCancelled)return n(null,{status:"cancelled"});if(i)return n(ie(i));var s=r&&r.filters&&r.filters[o[1]];if(!s)return n(ne(U,r&&r.filters?"missing json key: "+o[1]:"missing json key: filters"));t.filter=pe('"use strict";\nreturn '+s+";",{}),e.doChanges(t)}))}}function Ot(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}tt.plugin((function(e){e._changesFilterPlugin={validate:Ct,normalize:Bt,shouldFilter:qt,filter:It}})),tt.version="7.3.0";var Nt=Ot(["_id","_rev","_access","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),Tt=Ot(["_access","_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function Pt(e){if(!/^\d+-/.test(e))return ne(ee);var t=e.indexOf("-"),n=e.substring(0,t),i=e.substring(t+1);return{prefix:parseInt(n,10),id:i}}function jt(e,t,n){var i,r,o;n||(n={deterministic_revs:!0});var s={status:"available"};if(e._deleted&&(s.deleted=!0),t)if(e._id||(e._id=Ie()),r=qe(e,n.deterministic_revs),e._rev){if((o=Pt(e._rev)).error)return o;e._rev_tree=[{pos:o.prefix,ids:[o.id,{status:"missing"},[[r,s,[]]]]}],i=o.prefix+1}else e._rev_tree=[{pos:1,ids:[r,s,[]]}],i=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,i=e.ids,r=[i[0],t,[]],o=1,s=i.length;o1&&!n?(a={continue:function(){if(!o.length)return r();var n,a=o[o.length-1];if(t&&t.upper)try{n=IDBKeyRange.bound(a,t.upper,!0,t.upperOpen)}catch(e){if("DataError"===e.name&&0===e.code)return r()}else n=IDBKeyRange.lowerBound(a,!0);t=n,o=null,s=null,e.getAll(t,i).onsuccess=c,e.getAllKeys(t,i).onsuccess=l}},e.getAll(t,i).onsuccess=c,e.getAllKeys(t,i).onsuccess=l):n?e.openCursor(t,"prev").onsuccess=u:e.openCursor(t).onsuccess=u}function nn(e,t,n){var i,r,o="startkey"in e&&e.startkey,s="endkey"in e&&e.endkey,a="key"in e&&e.key,c="keys"in e&&e.keys,l=e.skip||0,u="number"==typeof e.limit?e.limit:-1,d=!1!==e.inclusive_end;if(!c&&(r=(i=function(e,t,n,i,r){try{if(e&&t)return r?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return r?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return r?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(i)return IDBKeyRange.only(i)}catch(e){return{error:e}}return null}(o,s,d,a,e.descending))&&i.error)&&("DataError"!==r.name||0!==r.code))return n(ne(Z,r.name,r.message));var f=[Vt,"by-sequence",Ut];e.attachments&&f.push("attach-store");var h=Qt(t,f,"readonly");if(h.error)return n(h.error);var p=h.txn;p.oncomplete=function(){e.attachments?Xt(k,e.binary).then(A):A()},p.onabort=Ht(n);var m,g,v,y=p.objectStore(Vt),b=p.objectStore("by-sequence"),_=p.objectStore(Ut),w=b.index("_doc_id_rev"),k=[];function S(t,n){var i={id:n.id,key:n.id,value:{rev:t}};n.deleted?c&&(k.push(i),i.value.deleted=!0,i.doc=null):l--<=0&&(k.push(i),e.include_docs&&function(t,n,i){var r=t.id+"::"+i;w.get(r).onsuccess=function(i){if(n.doc=Kt(i.target.result)||{},e.conflicts){var r=je(t);r.length&&(n.doc._conflicts=r)}Jt(n.doc,e,p)}}(n,i,t))}function E(e){for(var t=0,n=e.length;t0&&(g=e.target.result[0])},b.openCursor(null,"prev").onsuccess=function(e){var t=e.target.result,n=void 0;return t&&t.key&&(n=t.key),v({target:{result:[n]}})}),r||0===u?void 0:c?function(e,t,n){var i=new Array(e.length),r=0;e.forEach((function(o,s){t.get(o).onsuccess=function(t){t.target.result?i[s]=t.target.result:i[s]={key:o,error:"not_found"},++r===e.length&&n(e,i,{})}}))}(e.keys,y,L):-1===u?function(e,t,n){if("function"!=typeof e.getAll){var i=[];e.openCursor(t).onsuccess=function(e){var t=e.target.result;t?(i.push(t.value),t.continue()):n({target:{result:i}})}}else e.getAll(t).onsuccess=n}(y,i,(function(t){var n=t.target.result;e.descending&&(n=n.reverse()),E(n)})):void tn(y,i,e.descending,u+l,L)}var rn=!1,on=[];function sn(){!rn&&on.length&&(rn=!0,on.shift()())}function an(e,t,n,o){if((e=L(e)).continuous){var s=n+":"+Ie();return Zt.addListener(n,s,t,e),Zt.notify(n),{cancel:function(){Zt.removeListener(n,s)}}}var a=e.doc_ids&&new i(e.doc_ids);e.since=e.since||0;var c=e.since,l="limit"in e?e.limit:-1;0===l&&(l=1);var u,d,f,h,p=[],m=0,g=re(e),v=new r;function y(e,t,n,i){if(n.seq!==t)return i();if(n.winningRev===e._rev)return i(n,e);var r=e._id+"::"+n.winningRev;h.get(r).onsuccess=function(e){i(n,Kt(e.target.result))}}function b(){e.complete(null,{results:p,last_seq:c})}var _=[Vt,"by-sequence"];e.attachments&&_.push("attach-store");var w=Qt(o,_,"readonly");if(w.error)return e.complete(w.error);(u=w.txn).onabort=Ht(e.complete),u.oncomplete=function(){!e.continuous&&e.attachments?Xt(p).then(b):b()},d=u.objectStore("by-sequence"),f=u.objectStore(Vt),h=d.index("_doc_id_rev"),tn(d,e.since&&!e.descending?IDBKeyRange.lowerBound(e.since,!0):null,e.descending,l,(function(t,n,i){if(i&&t.length){var r=new Array(t.length),o=new Array(t.length),s=0;n.forEach((function(n,c){!function(e,t,n){if(a&&!a.has(e._id))return n();var i=v.get(e._id);if(i)return y(e,t,i,n);f.get(e._id).onsuccess=function(r){i=Gt(r.target.result),v.set(e._id,i),y(e,t,i,n)}}(Kt(n),t[c],(function(n,a){o[c]=n,r[c]=a,++s===t.length&&function(){for(var t=[],n=0,s=r.length;nr&&(r=n),t.continue()}}()}function s(){var e=zt(o,o.winningRev,o.deleted);n.put(e).onsuccess=function(){i.continue()}}}}e._meta=null,e._remote=!1,e.type=function(){return"idb"},e._id=x((function(t){t(null,e._meta.instanceId)})),e._bulkDocs=function(n,i,o){en(t,n,i,e,r,a(o))},e._get=function(e,t,n){var i,o,s,a=t.ctx;if(!a){var c=Qt(r,[Vt,"by-sequence","attach-store"],"readonly");if(c.error)return n(c.error);a=c.txn}function l(){n(s,{doc:i,metadata:o,ctx:a})}a.objectStore(Vt).get(e).onsuccess=function(e){if(!(o=Gt(e.target.result)))return s=ne(U,"missing"),l();var n;if(t.rev)n=t.latest?function(e,t){for(var n,i=t.rev_tree.slice();n=i.pop();){var r=n.pos,o=n.ids,s=o[0],a=o[1],c=o[2],l=0===c.length,u=n.history?n.history.slice():[];if(u.push({id:s,pos:r,opts:a}),l)for(var d=0,f=u.length;d=43)},i.onerror=e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)}})).catch((function(){return!1}))}(u)),cn.then((function(e){c=e,f()})),u.oncomplete=function(){d=!0,f()},u.onabort=Ht(n)},h.onerror=function(e){var t=e.target.error&&e.target.error.message;t?-1!==t.indexOf("stored database is a higher version")&&(t=new Error('This DB was created with the newer "indexeddb" adapter, but you are trying to open it with the older "idb" adapter')):t="Failed to open indexedDB, are you in private browsing mode?",j("error",t),n(ne(Z,t))}}(n,e,t)}),t,n.constructor)}dn.valid=function(){try{return"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}};var fn={};function hn(e){var t=e.doc||e.ok,n=t&&t._attachments;n&&Object.keys(n).forEach((function(e){var t=n[e];t.data=we(t.data,t.content_type)}))}function pn(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function mn(e){return e._attachments&&Object.keys(e._attachments)?Promise.all(Object.keys(e._attachments).map((function(t){var n=e._attachments[t];if(n.data&&"string"!=typeof n.data)return new Promise((function(e){Ee(n.data,e)})).then((function(e){n.data=e}))}))):Promise.resolve()}function gn(e,t){if(function(e){if(!e.prefix)return!1;var t=he(e.prefix).protocol;return"http"===t||"https"===t}(t)){var n=t.name.substr(t.prefix.length);e=t.prefix.replace(/\/?$/,"/")+encodeURIComponent(n)}var i=he(e);(i.user||i.password)&&(i.auth={username:i.user,password:i.password});var r=i.path.replace(/(^\/|\/$)/g,"").split("/");return i.db=r.pop(),-1===i.db.indexOf("%")&&(i.db=encodeURIComponent(i.db)),i.path=r.join("/"),i}function vn(e,t){return yn(e,e.db+"/"+t)}function yn(e,t){var n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function bn(e){return"?"+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}function _n(t,n){var i=this,r=gn(t.name,t),o=vn(r,"");t=L(t);var a,c=function(e,n){if((n=n||{}).headers=n.headers||new rt,n.credentials="include",t.auth||r.auth){var i=t.auth||r.auth,o=i.username+":"+i.password,s=ve(unescape(encodeURIComponent(o)));n.headers.set("Authorization","Basic "+s)}var a=t.headers||{};return Object.keys(a).forEach((function(e){n.headers.append(e,a[e])})),function(e){var t="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==t.indexOf("msie"),i=-1!==t.indexOf("trident"),r=-1!==t.indexOf("edge"),o=!("method"in e)||"GET"===e.method;return(n||i||r)&&o}(n)&&(e+=(-1===e.indexOf("?")?"?":"&")+"_nonce="+Date.now()),(t.fetch||it)(e,n)};function l(e,t){return C(e,h()((function(e){d().then((function(){return t.apply(this,e)})).catch((function(t){e.pop()(t)}))}))).bind(i)}function u(e,t,n){var i={};return(t=t||{}).headers=t.headers||new rt,t.headers.get("Content-Type")||t.headers.set("Content-Type","application/json"),t.headers.get("Accept")||t.headers.set("Accept","application/json"),c(e,t).then((function(e){return i.ok=e.ok,i.status=e.status,e.json()})).then((function(e){if(i.data=e,!i.ok){i.data.status=i.status;var t=ie(i.data);if(n)return n(t);throw t}if(Array.isArray(i.data)&&(i.data=i.data.map((function(e){return e.error||e.missing?ie(e):e}))),!n)return i;n(null,i.data)}))}function d(){return t.skip_setup?Promise.resolve():a||((a=u(o).catch((function(e){return e&&e.status&&404===e.status?(D(404,"PouchDB is just detecting if the remote exists."),u(o,{method:"PUT"})):Promise.reject(e)})).catch((function(e){return!(!e||!e.status||412!==e.status)||Promise.reject(e)}))).catch((function(){a=null})),a)}function f(e){return e.split("/").map(encodeURIComponent).join("/")}s()((function(){n(null,i)})),i._remote=!0,i.type=function(){return"http"},i.id=l("id",(function(e){c(yn(r,"")).then((function(e){return e.json()})).catch((function(){return{}})).then((function(t){var n=t&&t.uuid?t.uuid+r.db:vn(r,"");e(null,n)}))})),i.compact=l("compact",(function(e,t){"function"==typeof e&&(t=e,e={}),e=L(e),u(vn(r,"_compact"),{method:"POST"}).then((function(){!function n(){i.info((function(i,r){r&&!r.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)}))}()}))})),i.bulkGet=C("bulkGet",(function(e,t){var n=this;function i(t){var n={};e.revs&&(n.revs=!0),e.attachments&&(n.attachments=!0),e.latest&&(n.latest=!0),u(vn(r,"_bulk_get"+bn(n)),{method:"POST",body:JSON.stringify({docs:e.docs})}).then((function(n){e.attachments&&e.binary&&n.data.results.forEach((function(e){e.docs.forEach(hn)})),t(null,n.data)})).catch(t)}function o(){var i=Math.ceil(e.docs.length/50),r=0,o=new Array(i);function s(e){return function(n,s){o[e]=s.results,++r===i&&t(null,{results:oe(o)})}}for(var a=0;at?t:a;var c=vn(r,"_changes"+bn(i)),m={signal:p.signal,method:f,body:JSON.stringify(l)};h=n,e.aborted||d().then((function(){return u(c,m,s)})).catch(s)}},g={results:[]},v=function(n,i){if(!e.aborted){var r=0;if(i&&i.results){r=i.results.length,g.last_seq=i.last_seq;var c=null,l=null;"number"==typeof i.pending&&(c=i.pending),"string"!=typeof g.last_seq&&"number"!=typeof g.last_seq||(l=g.last_seq);e.query_params,i.results=i.results.filter((function(t){a--;var n=re(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&hn(t),e.return_docs&&g.results.push(t),e.onChange(t,c,l)),n}))}else if(n)return e.aborted=!0,void e.complete(n);i&&i.last_seq&&(h=i.last_seq);var u=o&&a<=0||i&&r0?e.slice(n):e}function d(e){var t=e.value;return t&&"object"==typeof t&&t._id||e.id}function f(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){var n=t[e];t[e].data=we(n.data,n.content_type)}))}))}(t),t}}function p(e,t,n,i){var r=t[e];void 0!==r&&(i&&(r=encodeURIComponent(JSON.stringify(r))),n.push(e+"="+r))}function m(e){if(void 0!==e){var t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function g(e,t){var n=e.descending?"endkey":"startkey",i=e.descending?"startkey":"endkey";if(void 0!==e[n]&&void 0!==e[i]&&ht(e[n],e[i])>0)throw new wn("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new wn("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new wn("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach((function(t){var n=function(e){if(e){if("number"!=typeof e)return new wn('Invalid value for integer: "'+e+'"');if(e<0)return new wn('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(n)throw n}))}function v(e){return function(t){if(404===t.status)return e;throw t}}function y(e,t,n){var r="_local/doc_"+e,o={_id:r,keys:[]},s=n.get(e),a=s[0];return(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(s[1])?Promise.resolve(o):t.db.get(r).catch(v(o))).then((function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(e).then((function(t){return function(e,t){for(var n=[],r=new i,o=0,s=t.rows.length;o0&&0===ht(s.key,t)&&a.push(i),n.set(gt(a),s),t=s.key}return n}return p().then((function(){return h.finish()})).then((function(){e.seq=c}))}(e,n)}))()}function w(e,t){return Ln(b(e),(function(){return function(e,t){var i,o=e.reduceFun&&!1!==t.reduce,s=t.skip||0;void 0===t.keys||t.keys.length||(t.limit=0,delete t.keys);function a(t){return t.include_docs=!0,e.db.allDocs(t).then((function(e){return i=e.total_rows,e.rows.map((function(e){if("value"in e.doc&&"object"==typeof e.doc.value&&null!==e.doc.value){var t=Object.keys(e.doc.value).sort(),n=["id","key","value"];if(!(tn))return e.doc.value}var i=function(e){for(var t=[],n=[],i=0;;){var r=e[i++];if("\0"!==r)switch(r){case"1":t.push(null);break;case"2":t.push("1"===e[i]),i++;break;case"3":var o=vt(e,i);t.push(o.num),i+=o.length;break;case"4":for(var s="";;){var a=e[i];if("\0"===a)break;s+=a,i++}s=s.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),t.push(s);break;case"5":var c={element:[],index:t.length};t.push(c.element),n.push(c);break;case"6":var l={element:{},index:t.length};t.push(l.element),n.push(l);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+r)}else{if(1===t.length)return t.pop();yt(t,n)}}}(e.doc._id);return{key:i[0],id:i[1],value:"value"in e.doc?e.doc.value:null}}))}))}function l(a){var l;if(l=o?function(e,t,i){0===i.group_level&&delete i.group_level;var r=i.group||i.group_level,o=n(e.reduceFun),s=[],a=isNaN(i.group_level)?Number.POSITIVE_INFINITY:i.group_level;t.forEach((function(e){var t=s[s.length-1],n=r?e.key:null;if(r&&Array.isArray(n)&&(n=n.slice(0,a)),t&&0===ht(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);s.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})})),t=[];for(var l=0,d=s.length;l0)||function(e){return e._conflicts&&e._conflicts.length>0}(e.doc)||(e.doc._conflicts&&delete e.doc._conflicts,r.push(e.doc),delete n[e.id])}))}))}return Promise.resolve().then((function(){var e=Object.keys(n).filter((function(e){var t=n[e].missing;return 1===t.length&&Gn(t[0])}));if(e.length>0)return s(e)})).then((function(){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){e[n].missing.forEach((function(e){t.push({id:n,rev:e})}))})),{docs:t,revs:!0,latest:!0}}(n);if(s.docs.length)return e.bulkGet(s).then((function(n){if(i.cancelled)throw new Error("cancelled");return Promise.all(n.results.map((function(n){return Promise.all(n.docs.map((function(n){var i=n.ok;return n.error&&(o=!1),i&&i._attachments?function(e,t,n){var i=ae(t)&&!ae(e),r=Object.keys(n._attachments);return i?e.get(n._id).then((function(i){return Promise.all(r.map((function(r){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(i,n,r)?t.getAttachment(n._id,r):e.getAttachment(i._id,r)})))})).catch((function(e){if(404!==e.status)throw e;return Kn(t,n)})):Kn(t,n)}(t,e,i).then((function(e){var t=Object.keys(i._attachments);return e.forEach((function(e,n){var r=i._attachments[t[n]];delete r.stub,delete r.length,r.data=e})),i})):i})))}))).then((function(e){r=r.concat(oe(e).filter(Boolean))}))}))})).then((function(){return{ok:o,docs:r}}))}function Jn(e,t,n,i,r){return e.get(t).catch((function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||D(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:i,_id:t,history:[],replicator:"pouchdb",version:1};throw n})).then((function(o){if(!r.cancelled&&o.last_seq!==n)return o.history=(o.history||[]).filter((function(e){return e.session_id!==i})),o.history.unshift({last_seq:n,session_id:i}),o.history=o.history.slice(0,5),o.version=1,o.replicator="pouchdb",o.session_id=i,o.last_seq=n,e.put(o).catch((function(o){if(409===o.status)return Jn(e,t,n,i,r);throw o}))}))}function Xn(e,t,n,i,r){this.src=e,this.target=t,this.id=n,this.returnValue=i,this.opts=r||{}}Xn.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then((function(){return n.updateSource(e,t)}))},Xn.prototype.updateTarget=function(e,t){return this.opts.writeTargetCheckpoint?Jn(this.target,this.id,e,t,this.returnValue):Promise.resolve(!0)},Xn.prototype.updateSource=function(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return Jn(this.src,this.id,e,t,this.returnValue).catch((function(e){if(Zn(e))return n.opts.writeSourceCheckpoint=!1,!0;throw e}))}return Promise.resolve(!0)};var Yn={undefined:function(e,t){return 0===ht(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return function(e,t){if(e.session_id===t.session_id)return{last_seq:e.last_seq,history:e.history};return function e(t,n){var i=t[0],r=t.slice(1),o=n[0],s=n.slice(1);if(!i||0===n.length)return{last_seq:0,history:[]};if(Qn(i.session_id,n))return{last_seq:i.last_seq,history:t};if(Qn(o.session_id,r))return{last_seq:o.last_seq,history:s};return e(r,s)}(e.history,t.history)}(t,e).last_seq}};function Qn(e,t){var n=t[0],i=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||Qn(e,i))}function Zn(e){return"number"==typeof e.status&&4===Math.floor(e.status/100)}Xn.prototype.getCheckpoint=function(){var e=this;return e.opts&&e.opts.writeSourceCheckpoint&&!e.opts.writeTargetCheckpoint?e.src.get(e.id).then((function(e){return e.last_seq||0})).catch((function(e){if(404!==e.status)throw e;return 0})):e.target.get(e.id).then((function(t){return e.opts&&e.opts.writeTargetCheckpoint&&!e.opts.writeSourceCheckpoint?t.last_seq||0:e.src.get(e.id).then((function(e){return t.version!==e.version?0:(n=t.version?t.version.toString():"undefined")in Yn?Yn[n](t,e):0;var n}),(function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:0}).then((function(){return 0}),(function(n){return Zn(n)?(e.opts.writeSourceCheckpoint=!1,t.last_seq):0}));throw n}))})).catch((function(e){if(404!==e.status)throw e;return 0}))};function ei(e,t,n){var i=n.doc_ids?n.doc_ids.sort(ht):"",r=n.filter?n.filter.toString():"",o="",s="",a="";return n.selector&&(a=JSON.stringify(n.selector)),n.filter&&n.query_params&&(o=JSON.stringify(function(e){return Object.keys(e).sort(ht).reduce((function(t,n){return t[n]=e[n],t}),{})}(n.query_params))),n.filter&&"_view"===n.filter&&(s=n.view.toString()),Promise.all([e.id(),t.id()]).then((function(e){var t=e[0]+e[1]+r+s+o+i+a;return new Promise((function(e){Ce(t,e)}))})).then((function(e){return"_local/"+(e=e.replace(/\//g,".").replace(/\+/g,"_"))}))}function ti(e,t,n,i,r){var o,a,c,l=[],u={seq:0,changes:[],docs:[]},d=!1,f=!1,h=!1,p=0,m=n.continuous||n.live||!1,g=n.batch_size||100,v=n.batches_limit||10,y=n.style||"all_docs",b=!1,_=n.doc_ids,w=n.selector,k=[],S=Ie();r=r||{ok:!0,start_time:(new Date).toISOString(),docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var E={};function A(){return c?Promise.resolve():ei(e,t,n).then((function(r){a=r;var o={};o=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},c=new Xn(e,t,a,i,o)}))}function x(){if(k=[],0!==o.docs.length){var e=o.docs,s={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},s).then((function(t){if(i.cancelled)throw N(),new Error("cancelled");var n=Object.create(null);t.forEach((function(e){e.error&&(n[e.id]=e)}));var o=Object.keys(n).length;r.doc_write_failures+=o,r.docs_written+=e.length-o,e.forEach((function(e){var t=n[e._id];if(t){r.errors.push(t);var o=(t.name||"").toLowerCase();if("unauthorized"!==o&&"forbidden"!==o)throw t;i.emit("denied",L(t))}else k.push(e)}))}),(function(t){throw r.doc_write_failures+=e.length,t}))}}function C(){if(o.error)throw new Error("There was a problem getting docs.");r.last_seq=p=o.seq;var e=L(r);return k.length&&(e.docs=k,"number"==typeof o.pending&&(e.pending=o.pending,delete o.pending),i.emit("change",e)),d=!0,c.writeCheckpoint(o.seq,S).then((function(){if(i.emit("checkpoint",{checkpoint:o.seq}),d=!1,i.cancelled)throw N(),new Error("cancelled");o=void 0,D()})).catch((function(e){throw F(e),e}))}function B(){return Wn(e,t,o.diffs,i).then((function(e){o.error=!e.ok,e.docs.forEach((function(e){delete o.diffs[e._id],r.docs_read++,o.docs.push(e)}))}))}function q(){var e;i.cancelled||o||(0!==l.length?(o=l.shift(),i.emit("checkpoint",{start_next_batch:o.seq}),(e={},o.changes.forEach((function(t){i.emit("checkpoint",{revs_diff:t}),"_user/"!==t.id&&(e[t.id]=t.changes.map((function(e){return e.rev})))})),t.revsDiff(e).then((function(e){if(i.cancelled)throw N(),new Error("cancelled");o.diffs=e}))).then(B).then(x).then(C).then(q).catch((function(e){O("batch processing terminated with error",e)}))):I(!0))}function I(e){0!==u.changes.length?(e||f||u.changes.length>=g)&&(l.push(u),u={seq:0,changes:[],docs:[]},"pending"!==i.state&&"stopped"!==i.state||(i.state="active",i.emit("active")),q()):0!==l.length||o||((m&&E.live||f)&&(i.state="pending",i.emit("paused")),f&&N())}function O(e,t){h||(t.message||(t.message=e),r.ok=!1,r.status="aborting",l=[],u={seq:0,changes:[],docs:[]},N(t))}function N(o){if(!(h||i.cancelled&&(r.status="cancelled",d)))if(r.status=r.status||"complete",r.end_time=(new Date).toISOString(),r.last_seq=p,h=!0,o){(o=ne(o)).result=r;var s=(o.name||"").toLowerCase();"unauthorized"===s||"forbidden"===s?(i.emit("error",o),i.removeAllListeners()):function(e,t,n,i){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();if("function"!=typeof e.back_off_function&&(e.back_off_function=M),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var r=function(){e.current_back_off=0};t.once("paused",(function(){t.removeListener("active",r)})),t.once("active",r)}e.current_back_off=e.current_back_off||0,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(i,e.current_back_off)}(n,i,o,(function(){ti(e,t,n,i)}))}else i.emit("complete",r),i.removeAllListeners()}function T(e,t,r){if(i.cancelled)return N();"number"==typeof t&&(u.pending=t),re(n)(e)&&(u.seq=e.seq||r,u.changes.push(e),i.emit("checkpoint",{pending_batch:u.seq}),s()((function(){I(0===l.length&&E.live)})))}function P(e){if(b=!1,i.cancelled)return N();if(e.results.length>0)E.since=e.results[e.results.length-1].seq,D(),I(!0);else{var t=function(){m?(E.live=!0,D()):f=!0,I(!0)};o||0!==e.results.length?t():(d=!0,c.writeCheckpoint(e.last_seq,S).then((function(){d=!1,r.last_seq=p=e.last_seq,t()})).catch(F))}}function j(e){if(b=!1,i.cancelled)return N();O("changes rejected",e)}function D(){if(!b&&!f&&l.length1)for(var n=1;na)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,c=m,r=f;var v=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;u[l++]=v>>>24&255,u[l++]=v>>>16&255,u[l++]=v>>>8&255,u[l++]=255&v;var y=p/4294967296*1e4&268435455;u[l++]=y>>>8&255,u[l++]=255&y,u[l++]=y>>>24&15|16,u[l++]=y>>>16&255,u[l++]=f>>>8|128,u[l++]=255&f;for(var b=0;b<6;++b)u[l+b]=d[b];return t||Object(s.a)(u)},u=n(11);var d=function(e){if(!Object(u.a)(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};var f=function(e,t,n){function i(e,i,r,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t,n,i,r,o){return p((s=p(p(t,e),p(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function g(e,t,n,i,r,o,s){return m(t&n|~t&i,e,t,r,o,s)}function v(e,t,n,i,r,o,s){return m(t&i|n&~i,e,t,r,o,s)}function y(e,t,n,i,r,o,s){return m(t^n^i,e,t,r,o,s)}function b(e,t,n,i,r,o,s){return m(n^(t|~i),e,t,r,o,s)}var _=f("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>i%32&255,o=parseInt("0123456789abcdef".charAt(r>>>4&15)+"0123456789abcdef".charAt(15&r),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[i/8])<>>32-t}var E=f("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r>>0;b=y,y=v,v=S(g,30)>>>0,g=m,m=E}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),L="00000000-0000-0000-0000-000000000000";var A=function(e){if(!Object(u.a)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadAreaHTML=void 0,t.uploadAreaHTML='
\n\n
\n
\n
Upload Files
\n
\n
\n \n
\n
\n\n
Unpaired Documents
\n\n
\n\n
\n
MEI
\n
\n
Name
\n
\n
\n
\n
\n\n
\n
Images
\n
\n
Name
\n
\n
\n
\n
\n\n
\n\n
\n
Make Pair
\n
\n
\n\n
\n\n
Paired Folios
\n
\n
Name
\n
\n
\n
\n\n
\n
\n Upload\n
\n
\n
\n\n
\n\n \x3c!--\n
\n

Manuscripts

\n
\n
\n --\x3e\n\n
\n
'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupingNotRecognized=void 0,t.groupingNotRecognized=function(){window.confirm("Neon does not recognize this neume grouping. Would you like to create a compound neume?")||document.getElementById("undo").click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitStaffHandler=void 0;const i=n(4),r=n(3),o=n(18),s=n(12);t.SplitStaffHandler=class{constructor(e,t){this.handler=(e=>{const t=this.staff.id,n=(0,s.getSVGRelCoords)(e.clientX,e.clientY),a={action:"split",param:{elementId:t,x:n.x}};this.neonView.edit(a,this.neonView.view.getCurrentPageURI()).then(async e=>{e&&(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success"));const n=new o.default(this.neonView,".staff");this.splitDisable(),(0,r.selectAll)([document.querySelector("#"+t)],this.neonView,n);const s=document.getElementById("moreEdit");s&&(s.innerHTML="",s.parentElement.classList.add("hidden"))})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.staff=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click Where to Split")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitNeumeHandler=void 0;const i=n(4);t.SplitNeumeHandler=class{constructor(e,t){this.handler=(e=>{const t={action:"splitNeume",param:{elementId:this.neume.id,ncId:e.target.parentElement.id}};this.neonView.edit(t,this.neonView.view.getCurrentPageURI()).then(async e=>{e?(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success")):(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action failed","error")),this.splitDisable()})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.neume=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click The Beginning of The Second Neume")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t){},function(e,t,n){"use strict";(function(e){t.test=function(){return"function"==typeof e.queueMicrotask},t.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){var n=e.MutationObserver||e.WebKitMutationObserver;t.test=function(){return n},t.install=function(t){var i=0,r=new n(t),o=e.document.createTextNode("");return r.observe(o,{characterData:!0}),function(){o.data=i=++i%2}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},t.install=function(t){var n=new e.MessageChannel;return n.port1.onmessage=t,function(){n.port2.postMessage(0)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},t.install=function(t){return function(){var n=e.document.createElement("script");return n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n),t}}}).call(this,n(9))},function(e,t,n){"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitDocumentSelector=t.updateDocumentSelector=void 0;const i=n(55),r=n(57),o=n(56),s=document.querySelector("#uploaded-docs-content"),a=document.querySelector("#sample-docs-content"),c=document.querySelector("#open-doc"),l=document.querySelector("#remove-doc");let u,d,f=!1,h=!1;const p=new class{constructor(){this.prevSelection=[],this.reset()}setStart(e){this.reset(),this.start=Math.max(e,0)}setEnd(e){this.end=e}reset(){this.start=0,this.end=-1,this.prevSelection.splice(0)}getPrevSelection(){return this.prevSelection}getSelection(){let e,t;if(-1===this.end)return[];this.endn+e).filter(e=>!d[e]);return this.prevSelection=n,n}};function m(){return u.filter((e,t)=>d[t])}function g(e,t){const n=(i=t?{storage:e}:{manifest:e},Object.keys(i).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(i[e])).join("&"));var i;window.open("./editor.html?"+n,"_blank")}function v(e,t){if(null!=e)t=null!=t?t:u.indexOf(e.id);else{if(null==t)return;e=document.getElementById(u[t])}e.classList.remove("selected"),d[t]=!1}function y(){Array.from(document.querySelectorAll(".document-entry.selected")).forEach(e=>e.classList.remove("selected")),d.fill(!1)}function b(e,t){if(null!=e)t=null!=t?t:u.indexOf(e.id);else{if(null==t)return;e=document.getElementById(u[t])}e.classList.add("selected"),d[t]=!0}function _(){const e=d.lastIndexOf(!0);-1===e?(c.classList.remove("active"),l.classList.remove("active")):(c.classList.add("active"),e{const t=document.createElement("div");t.setAttribute("id",e),t.classList.add("document-entry"),t.classList.add("uploaded-doc");const n=document.createElement("div");n.classList.add("filename-text"),n.innerHTML=(0,r.formatFilename)(e,25),t.appendChild(n),s.appendChild(t)});a.innerHTML="";const t=(0,i.fetchSampleDocuments)();if(t.sort(),0===t.length){const e=document.createElement("div");e.setAttribute("id","no-sample-docs"),e.innerHTML="No Documents Uploaded",a.appendChild(e)}else t.forEach(e=>{const t=document.createElement("div");t.setAttribute("id",e),t.classList.add("document-entry");const n=document.createElement("div");n.classList.add("filename-text"),n.innerHTML=(0,r.formatFilename)(e,25),t.appendChild(n),a.appendChild(t)});u=e.concat(o.samples),d=new Array(u.length).fill(!1),u.forEach((e,t)=>{const n=document.getElementById(""+e);n.addEventListener("dblclick",k,!1),n.addEventListener("click",(function(e){f||h?f?(d[t]?(v(n,t),p.setStart(d.lastIndexOf(!0))):(b(n,t),p.setStart(t)),_()):h&&(p.getPrevSelection().forEach(e=>{v(null,e)}),p.setEnd(t),p.getSelection().forEach(e=>{b(null,e)}),_()):(y(),b(n,t),p.setStart(t),_())}),!1)})}function k(){c.classList.contains("active")&&(m().map(e=>document.getElementById(e)).forEach(e=>{!function(e){const t=!!e.classList.contains("uploaded-doc");g(e.id,t)}(e)}),p.reset(),y(),_())}function S(){if(!l.classList.contains("active"))return;const e=m(),t="Are you sure you want to delete:\n"+e.join("\n")+"\n\nThis action is irreversible.";if(window.confirm(t)){const t=e.map(e=>(0,i.deleteEntry)(e));Promise.all(t).then(()=>{w()}).catch(e=>console.debug("failed to delete files: ",e)),y(),p.reset()}_()}t.updateDocumentSelector=w;t.InitDocumentSelector=()=>{c.addEventListener("click",k),l.addEventListener("click",S),window.addEventListener("keydown",e=>{e.metaKey&&(f=!0),e.shiftKey&&(h=!0),"Escape"===e.key&&(y(),p.reset(),_())}),window.addEventListener("keyup",e=>{e.metaKey||(f=!1),e.shiftKey||(h=!1)});document.querySelector(".main-section-content").addEventListener("click",(function(e){const t=e.target.classList;["document-entry","filename-text"].some(e=>t.contains(e))||(y(),p.reset(),_())})),w()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteEntry=t.addEntry=t.createManifest=t.fetchSampleDocuments=t.fetchUploadedDocuments=void 0;const i=n(31),r=n(29),o=n(91),s=n(56),a=new r.default("Neon-User-Storage");t.fetchUploadedDocuments=async function(){return await new Promise((e,t)=>{a.allDocs({include_docs:!0}).then(t=>e(t)).catch(e=>t(e))}).then(e=>e.rows.map(e=>e.key)).catch(e=>(console.log("Could'nt fetch uploaded documents",e.message),[]))},t.fetchSampleDocuments=function(){return s.samples},t.createManifest=function(e,t,n){return new Promise(async r=>{const s=JSON.parse(JSON.stringify(o));s["@id"]=(0,i.v4)(),s.title=e,s.timestamp=(new Date).toISOString();const a=new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e(n.result)}),n.readAsDataURL(t)}),c=new Promise(e=>{const t=new FileReader;t.addEventListener("load",()=>{e(t.result)}),t.readAsDataURL(n)}),l=await a,u=await c;s.image=u,s.mei_annotations=[{id:(0,i.v4)(),type:"Annotation",body:l,target:u}],r(s)})},t.addEntry=function(e,t,n){return new Promise((i,r)=>{a.put({_id:e,kind:n?"page":"manuscript",_attachments:{manifest:{content_type:"application/ld+json",data:t}}}).then(e=>{i(!0)}).catch(t=>{window.alert(`Error Uploading Document: ${t.message}, ${e}.`),r(!1)})})},t.deleteEntry=function(e){return new Promise((t,n)=>{a.get(e).then(e=>{a.remove(e).then(e=>{t(!0)}).catch(e=>{console.log(e),n(e)})}).catch(e=>{console.log(e),n(e)})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.samples=void 0,t.samples=["CF-005","CF-009","CF-010","CF-011","CF-012","CF-013","CF-014","CF-015","CF-016","CF-017","CF-018","CF-019","CF-020","CF-024","CF-025","CF-026","CF-027","CF-028","CF-029","CF-030","CF-031","CF-032","CF-033","CF-034","CF-035","CF-036","CF-037","CF-038","CF-039","CF-040","CF-041","CF-042","CF-044","CF-045","CF-046","CF-047","CF-048","CF-049","CF-050","CF-051","CF-052","CF-053","CF-054","CF-055","CF-056","Salzinnes"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renameFile=t.formatFilename=void 0,t.formatFilename=function(e,t){const n=Math.floor(t/2),i=e.length;return i<=t?e:`${e.substring(0,n-1)}...${e.substring(i-n+2,i)}`},t.renameFile=function(e,t){const n=new RegExp(e),i=t.filter(e=>n.test(e));if(0!==i.length){const t=/\(\d+\),/g,n=i.join().concat(",").match(t);if(null!==n){const t=n.map(e=>{const t=e.substring(1,e.length-2);return Number(t)});t.sort();const i=t.indexOf(1);if(-1===i)return e+"(1)";{let n=1;for(let e=i+1;e{const r=e.name.split(".").pop();if("mei"===r){const n=c(e.name,"mei");t.appendChild(n),a.addFile(e)}else if(["png","jpg","jpeg"].includes(r)){const t=c(e.name,"image");n.appendChild(t),a.addFile(e)}else"jsonld"===r||i.push(e)}),i},t.handleMakePair=function(){const e=document.querySelector("#paired_list"),t=document.querySelector('input[name="mei_radio_group"]:checked'),n=document.querySelector('input[name="image_radio_group"]:checked');if(null===t||null===n)return;const i=t.value,r=n.value,s=i.substring(0,i.length-4),l=function(e,t,n){const i=document.querySelector("#mei_list"),r=document.querySelector("#image_list"),s=document.createElement("div");s.className="folio_item",s.setAttribute("mei",t),s.setAttribute("image",n);const l=document.createElement("div");function u(){s.remove(),a.removeFolio(e);const o=c(t,"mei");i.appendChild(o);const l=c(n,"image");r.appendChild(l)}l.classList.add("folio-filename"),l.innerHTML=(0,o.formatFilename)(e,25),s.appendChild(l);const d=document.createElement("img");return d.className="unpair_btn",d.src="/Neon/Neon-gh/assets/img/unpair-doc.svg",d.title="unpair",d.addEventListener("click",u),s.appendChild(d),s}(s,i,r);e.appendChild(l),a.addFolio(s,i,r),t.parentElement.parentElement.remove(),n.parentElement.parentElement.remove()},t.handleUploadAllDocuments=async function(){const e=await(0,s.fetchUploadedDocuments)(),t=(0,s.fetchSampleDocuments)(),n=e.concat(t),i=a.getFolios().map(async([e,t,i])=>{const r=(0,o.renameFile)(e,n);return n.push(r),await async function(e,t,n){return(0,s.createManifest)(e,t,n).then(t=>{const n=new Blob([JSON.stringify(t,null,2)],{type:"application/ld+json"});return(0,s.addEntry)(e,n,!0)})}(r,t,i)});a.clear();const r=i.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e})));return Promise.all(r)},t.sortFileByName=async function(e){const t=e.parentElement.nextElementSibling,n=Array.from(t.children);let i=e.classList.contains("arrow-up");i?(e.classList.remove("arrow-up"),e.classList.add("arrow-down"),e.innerHTML="⋁"):(e.classList.remove("arrow-down"),e.classList.add("arrow-up"),e.innerHTML="⋀"),i=!i,n.sort((e,t)=>{const n=e.textContent.trim(),r=t.textContent.trim();return i?n.localeCompare(r):r.localeCompare(n)}),n.forEach(e=>{t.appendChild(e)}),e.setAttribute("style","color: black")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){this.allFiles=new Map,this.folios=new Array}static getInstance(){return i.instance||(i.instance=new i),i.instance}addFile(e){if(this.allFiles.has(e.name)){const t={file:e,count:this.getFileCount(e.name)+1};this.allFiles.set(e.name,t)}else{const t={file:e,count:1};this.allFiles.set(e.name,t)}}getFile(e){if(this.allFiles.has(e))return this.allFiles.get(e).file}removeFile(e){const t=this.getFileCount(e);if(0!==t)if(1===t)this.allFiles.delete(e);else{const n={file:this.allFiles.get(e).file,count:t-1};this.allFiles.set(e,n)}}getFileCount(e){return this.allFiles.has(e)?this.allFiles.get(e).count:0}addFolio(e,t,n){const i={filename:e,mei_filename:t,image_filename:n};this.folios.push(i)}removeFolio(e){const t=this.folios.findIndex(t=>t.filename===e);this.folios.splice(t,1)}getFolios(){return this.folios.map(e=>{const t=e.filename,n=e.mei_filename,i=e.image_filename;return[t,this.getFile(n),this.getFile(i)]})}clear(){this.allFiles.clear(),this.folios.splice(0)}print(){console.log(this.allFiles),console.log(this.folios)}}t.default=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.fm=void 0;const o=n(54),s=n(92),a=n(59);t.fm=a.default.getInstance(),(0,o.InitDocumentSelector)(),null===(i=document.querySelector("#upload-new-doc-button"))||void 0===i||i.addEventListener("click",(function(){(0,s.InitUploadArea)()})),null===(r=document.querySelector("#home-link"))||void 0===r||r.setAttribute("href","https://ddmal.music.mcgill.ca/Neon")},function(e){e.exports=JSON.parse('{"@context":["http://www.w3.org/ns/anno.jsonld",{"schema":"http://schema.org/","title":"schema:name","timestamp":"schema:dateModified","image":{"@id":"schema:image","@type":"@id"},"mei_annotations":{"@id":"Annotation","@type":"@id","@container":"@list"}}]}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitUploadArea=void 0;const i=n(58),r=n(17),o=n(58),s=n(54);t.InitUploadArea=function(){const e=new r.ModalWindow;e.setModalWindowView(r.ModalWindowView.DOCUMENT_UPLOAD),e.openModalWindow(),document.querySelector("#make_pair").addEventListener("click",o.handleMakePair),document.querySelector("#upload_button").addEventListener("click",(async function(){const t=document.querySelector("#uploading_spinner");t.classList.add("visible"),(0,o.handleUploadAllDocuments)().then(n=>{setTimeout(async()=>{await(0,s.updateDocumentSelector)(),t.classList.remove("visible"),e.hideModalWindow()},2e3)}).catch(n=>{console.log("One or more uploads rejected: ",n),setTimeout(async()=>{await(0,s.updateDocumentSelector)(),t.classList.remove("visible"),e.hideModalWindow()},2e3)})}));const t=document.createElement("input");t.type="file",t.multiple=!0,t.addEventListener("change",(function(){const e=t.files,n=Array.from(e),r=(0,i.addNewFiles)(n);if(0!==r.length){const e=r.map(e=>e.name);window.alert("The following files are not .mei, .png, .jpeg, or .jsonld files: \n\n"+e.join("\n"))}t.value=null}));const n=document.querySelector("#initial_upload_area");n.onclick=()=>t.click(),n.ondragleave=()=>n.classList.remove("over"),n.ondragover=e=>{e.stopPropagation(),e.preventDefault(),n.classList.add("over"),e.dataTransfer.dropEffect="copy"},n.ondrop=e=>{e.stopPropagation(),e.preventDefault(),n.classList.remove("over");const t=e.dataTransfer.files,r=Array.from(t),o=(0,i.addNewFiles)(r);if(0!==o.length){const e=o.map(e=>e.name);window.alert("The following files are not .mei, .png, .jpeg, or .jsonld files: \n\n"+e.join("\n"))}},document.querySelectorAll(".sort_name").forEach(e=>{e.addEventListener("click",()=>(0,o.sortFileByName)(e))})}}]); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2V2ZW50cy9ldmVudHMuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2luaGVyaXRzL2luaGVyaXRzX2Jyb3dzZXIuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2ltbWVkaWF0ZS9saWIvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3V0aWxzL1NlbGVjdFRvb2xzLnRzIiwid2VicGFjazovLy8uL3NyYy91dGlscy9Ob3RpZmljYXRpb24udHMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2FyZ3NhcnJheS9pbmRleC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvdXRpbHMvTG9jYWxTZXR0aW5ncy50cyIsIndlYnBhY2s6Ly8vLi9zcmMvU3F1YXJlRWRpdC9Db250ZW50cy50cyIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJkM1wiIiwid2VicGFjazovLy8od2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL3V1aWQvZGlzdC9lc20tYnJvd3Nlci9zdHJpbmdpZnkuanMiLCJ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gZm9yIChpID0gbGlzdC5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgIGlmIChsaXN0W2ldID09PSBsaXN0ZW5lciB8fCBsaXN0W2ldLmxpc3RlbmVyID09PSBsaXN0ZW5lcikge1xuICAgICAgICAgICAgb3JpZ2luYWxMaXN0ZW5lciA9IGxpc3RbaV0ubGlzdGVuZXI7XG4gICAgICAgICAgICBwb3NpdGlvbiA9IGk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocG9zaXRpb24gPCAwKVxuICAgICAgICAgIHJldHVybiB0aGlzO1xuXG4gICAgICAgIGlmIChwb3NpdGlvbiA9PT0gMClcbiAgICAgICAgICBsaXN0LnNoaWZ0KCk7XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIHNwbGljZU9uZShsaXN0LCBwb3NpdGlvbik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobGlzdC5sZW5ndGggPT09IDEpXG4gICAgICAgICAgZXZlbnRzW3R5cGVdID0gbGlzdFswXTtcblxuICAgICAgICBpZiAoZXZlbnRzLnJlbW92ZUxpc3RlbmVyICE9PSB1bmRlZmluZWQpXG4gICAgICAgICAgdGhpcy5lbWl0KCdyZW1vdmVMaXN0ZW5lcicsIHR5cGUsIG9yaWdpbmFsTGlzdGVuZXIgfHwgbGlzdGVuZXIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuXG5FdmVudEVtaXR0ZXIucHJvdG90eXBlLm9mZiA9IEV2ZW50RW1pdHRlci5wcm90b3R5cGUucmVtb3ZlTGlzdGVuZXI7XG5cbkV2ZW50RW1pdHRlci5wcm90b3R5cGUucmVtb3ZlQWxsTGlzdGVuZXJzID1cbiAgICBmdW5jdGlvbiByZW1vdmVBbGxMaXN0ZW5lcnModHlwZSkge1xuICAgICAgdmFyIGxpc3RlbmVycywgZXZlbnRzLCBpO1xuXG4gICAgICBldmVudHMgPSB0aGlzLl9ldmVudHM7XG4gICAgICBpZiAoZXZlbnRzID09PSB1bmRlZmluZWQpXG4gICAgICAgIHJldHVybiB0aGlzO1xuXG4gICAgICAvLyBub3QgbGlzdGVuaW5nIGZvciByZW1vdmVMaXN0ZW5lciwgbm8gbmVlZCB0byBlbWl0XG4gICAgICBpZiAoZXZlbnRzLnJlbW92ZUxpc3RlbmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICB0aGlzLl9ldmVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgICAgIHRoaXMuX2V2ZW50c0NvdW50ID0gMDtcbiAgICAgICAgfSBlbHNlIGlmIChldmVudHNbdHlwZV0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmICgtLXRoaXMuX2V2ZW50c0NvdW50ID09PSAwKVxuICAgICAgICAgICAgdGhpcy5fZXZlbnRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgICAgICBlbHNlXG4gICAgICAgICAgICBkZWxldGUgZXZlbnRzW3R5cGVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuXG4gICAgICAvLyBlbWl0IHJlbW92ZUxpc3RlbmVyIGZvciBhbGwgbGlzdGVuZXJzIG9uIGFsbCBldmVudHNcbiAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoZXZlbnRzKTtcbiAgICAgICAgdmFyIGtleTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGtleXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICBrZXkgPSBrZXlzW2ldO1xuICAgICAgICAgIGlmIChrZXkgPT09ICdyZW1vdmVMaXN0ZW5lcicpIGNvbnRpbnVlO1xuICAgICAgICAgIHRoaXMucmVtb3ZlQWxsTGl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ICAgICBcbiAgICAgICAgICAgICAgICAvLyBDaGVjayB0aGF0IHNlY29uZCBuZXVtZSBjb21wb25lbnQgaXMgbG93ZXIgdGhhbiBmaXJzdC5cbiAgICAgICAgICAgICAgICAvLyBOb3RlIHRoYXQgdGhlIG9yZGVyIGluIHRoZSBsaXN0IG1heSBub3QgYmUgdGhlIHNhbWUgYXMgdGhlXG4gICAgICAgICAgICAgICAgLy8gb3JkZXIgYnkgeC1wb3NpdGlvbi5cbiAgICAgICAgICAgICAgICBsZXQgZmlyc3ROQyA9IChncm91cHNbMF0uY2hpbGRyZW5bMF0gYXMgU1ZHVXNlRWxlbWVudCk7XG4gICAgICAgICAgICAgICAgbGV0IHNlY29uZE5DID0gKGdyb3Vwc1sxXS5jaGlsZHJlblswXSBhcyBTVkdVc2VFbGVtZW50KTtcblxuICAgICAgICAgICAgICAgIGxldCBmaXJzdE5DWCAgPSBmaXJzdE5DLnguYmFzZVZhbC52YWx1ZTtcbiAgICAgICAgICAgICAgICBsZXQgc2Vjb25kTkNYID0gc2Vjb25kTkMueC5iYXNlVmFsLnZhbHVlO1xuICAgICAgICAgICAgICAgIGxldCBmaXJzdE5DWSAgPSBmaXJzdE5DLnkuYmFzZVZhbC52YWx1ZTtcbiAgICAgICAgICAgICAgICBsZXQgc2Vjb25kTkNZID0gc2Vjb25kTkMueS5iYXNlVmFsLnZhbHVlO1xuXG4gICAgICAgICAgICAgICAgLy8gb3JkZXIgbmMncyBieSB4IGNvb3JkIChsZWZ0IHRvIHJpZ2h0KVxuICAgICAgICAgICAgICAgIGlmICggKGZpcnN0TkNYID4gc2Vjb25kTkNYKSBcbiAgICAgICAgICAgICAgICAgIHx8IChmaXJzdE5DWCA9PT0gc2Vjb25kTkNYICYmIGZpcnN0TkNZIDwgc2Vjb25kTkNZKSkge1xuICAgICAgICAgICAgICAgICAgW2ZpcnN0TkMsIHNlY29uZE5DXSA9IFtzZWNvbmROQywgZmlyc3ROQ107XG4gICAgICAgICAgICAgICAgICBbZm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bnMtY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInBhbmVsLWNvbnRlbnQtc3Vic2VjdGlvbiBoaWRkZW5cIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cIm1vcmVFZGl0XCI+PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInBhbmVsLWNvbnRlbnQtc3Vic2VjdGlvbiBoaWRkZW5cIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cImV4dHJhRWRpdFwiPjwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8IS0tXG4gICAgICAgICAgICAgICAgICAgICogVGhlIGV4dHJhRWRpdCBwYW5lbCBpcyBhZGRlZCBmb3IgZWRpdCBvcHRpb25zIHRoYXQgaGF2ZSBkcm9wZG93biBtZW51c1xuICAgICAgICAgICAgICAgICAgICAqIExpa2UgdGhlIE5ldW1lIGFuZCBDbGVmIG1lbnVzXG4gICAgICAgICAgICAgICAgICAgICogVGhpcyBpcyBkb25lIGJlY2F1c2UgdGhlIG1vcmVFZGl0IG1lbnUgbmVlZHMgdG8gaGF2ZSBvdmVyZmxvdyBmb3IgY2FzZXMgd2hlcmUgaXQgaGFzIGxvdHMgb2YgYnV0dG9uc1xuICAgICAgICAgICAgICAgICAgICAqIEJ1dCBvdmVyZmxvdyBydWlucyBkcm9wZG93biBtZW51c1xuICAgICAgICAgICAgICAgICAgICAtLT5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGFuZWwtY29udGVudC1zdWJzZWN0aW9uIGhpZGRlblwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwibmV1bWVFZGl0XCI+PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInBhbmVsLWNvbnRlbnQt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PC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPi08L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+Wm9vbSBPdXQ8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+MDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5ab29tIFJlc2V0PC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPmg8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+SGlkZSBHbHlwaDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuXG4gICAgICAgIDwhLS0gXCJFZGl0XCIgaG90a2V5cyAtLT5cbiAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktc3ViY2F0ZWdvcnktdGl0bGVcIj5FZGl0PC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5DdHJsPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+ejwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pm9yPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj7ijJg8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj56PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlVuZG88L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+Q3RybDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+ejwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pm9yPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj7ijJg8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPno8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+UmVkbzwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5xL3cvZS9yL3QveTwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgSGlnaGxpZ2h0IGJ5IFN0YWZmL1N5bGxhYmxlL05ldW1lL0xheWVyRWxlbWVudC9TZWxlY3Rpb24vT2ZmXG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPjEvMi8zLzQ8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+XG4gICAgICAgICAgICAgICAgICAgIFNlbGVjdCBieSBTeWxsYWJsZS9OZXVtZS9OZXVtZSBDb21wb25lbnQvU3RhZmZcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+U2hpZnQ8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5OdW1iZXI8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+XG4gICAgICAgICAgICAgICAgICAgIEJlZ2luIEluc2VydCBmb3IgdGhlIDxpPm50aDwvaT4gb3B0aW9uIGluIHRoZSBzZWxlY3RlZCB0YWJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cblxuICAgICAgICA8IS0tIFwiT3RoZXJcIiBob3RrZXlzIC0tPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS10aXRsZVwiPk90aGVyPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5zPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlNhdmUgRmlsZTwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5Fc2M8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRl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IGNvbnN0IHBvaW50cyA9IGdldFN0YWZmQkJveChzdGFmZiBhcyBTVkdHRWxlbWVudCk7XG4gICAgICBjb25zdCB5X2NoYW5nZSA9IE1hdGgudGFuKHBvaW50cy5yb3RhdGUpKihwb2ludHMubHJ4IC0gcG9pbnRzLnVseCk7XG4gICAgICBpZiAoc3RhZmYgIT09IG51bGwpIHtcbiAgICAgICAgY29uc3QgZWRpdG9yQWN0aW9uOiBFZGl0b3JBY3Rpb24gPSB7XG4gICAgICAgICAgYWN0aW9uOiAncmVzaXplUm90YXRlJyxcbiAgICAgICAgICBwYXJhbToge1xuICAgICAgICAgICAgZWxlbWVudElkOiBzdGFmZi5pZCxcbiAgICAgICAgICAgIHVseDogcG9pbnRzLnVseCxcbiAgICAgICAgICAgIHVseTogcG9pbnRzLnJvdGF0ZSA+IDAgPyBwb2ludHMudWx5ICsgeV9jaGFuZ2UvMiA6IHBvaW50cy51bHkgLSB5X2NoYW5nZS8yLFxuICAgICAgICAgICAgbHJ4OiBwb2ludHMubHJ4LFxuICAgICAgICAgICAgbHJ5OiBwb2ludHMucm90YXRlID4gMCA/IHBvaW50cy5scnkgLSB5X2NoYW5nZS8yIDogcG9pbnRzLmxyeSArIHlfY2hhbmdlLzIsXG4gICAgICAgICAgICByb3RhdGU6IDBcbiAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIG5lb25WaWV3LmVkaXQoZWRpdG9yQWN0aW9uLCBuZW9uVmlldy52aWV3LmdldEN1cnJlbnRQYWdlVVJJKCkpLnRoZW4oYXN5bmMgKHJlc3VsdCkgPT4ge1xuICAgICAgICAgIGlmIChyZXN1bHQpIHtcbiAgICAgICAgICAgIGF3YWl0IG5lb25WaWV3LnVwZGF0ZUZvckN1cnJlbnRQYWdlKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgZW5kT3B0aW9uc1NlbGVjdGlvbigpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29uc29sZS5lcnJvc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wO1xuXG4gICAgICAgICAgICAgICAgaWYgKHZhbCA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWF4KHZhbCArIGxlbmd0aCwgMCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKHZhbCwgbGVuZ3RoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgQXJyYXlCdWZmZXIucHJvdG90eXBlLnNsaWNlID0gZnVuY3Rpb24gKGZyb20sIHRvKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMuYnl0ZUxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgYmVnaW4gPSBjbGFtcChmcm9tLCBsZW5ndGgpLFxuICAgICAgICAgICAgICAgICAgICBlbmQgPSBsZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgIG51bSxcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LFxuICAgICAgICAgICAgICAgICAgICB0YXJnZXRBcnJheSxcbiAgICAgICAgICAgICAgICAgICAgc291cmNlQXJyYXk7XG5cbiAgICAgICAgICAgICAgICBpZiAodG8gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBlbmQgPSBjbGFtcCh0bywgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoYmVnaW4gPiBlbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBcnJheUJ1ZmZlcigwKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBudW0gPSBlbmQgLSBiZWdpbjtcbiAgICAgICAgICAgICAgICB0YXJnZXQgPSBuZXcgQXJyYXlCdWZmZXIobnVtKTtcbiAgICAgICAgICAgICAgICB0YXJnZXRBcnJheSA9IG5ldyBVaW50OEFycmF5KHRhcmdldCk7XG5cbiAgICAgICAgICAgICAgICBzb3VyY2VB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ZW9mIGNvbGxhdGlvbkluZGV4ID09PSAndW5kZWZpbmVkJykge1xuICAgICAgaWYgKHN0YWNrLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICByZXR1cm4gc3RhY2sucG9wKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwb3Aoc3RhY2sucG9wKCksIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgc3dpdGNoIChjb2xsYXRpb25JbmRleCkge1xuICAgICAgY2FzZSAnICc6XG4gICAgICBjYXNlICdcXHQnOlxuICAgICAgY2FzZSAnXFxuJzpcbiAgICAgIGNhc2UgJzonOlxuICAgICAgY2FzZSAnLCc6XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnbic6XG4gICAgICAgIGkgKz0gMzsgLy8gJ3VsbCdcbiAgICAgICAgcG9wKG51bGwsIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3QnOlxuICAgICAgICBpICs9IDM7IC8vICdydWUnXG4gICAgICAgIHBvcCh0cnVlLCBzdGFjaywgbWV0YVN0YWNrKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdmJzpcbiAgICAgICAgaSArPSA0OyAvLyAnYWxzZSdcbiAgICAgICAgcG9wKGZhbHNlLCBzdGFjaywgbWV0YVN0YWNrKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICcwJzpcbiAgICAgIGNhc2UgJzEnOlxuICAgICAgY2FzZSAnMic6XG4gICAgICBjYXNlICczJzpcbiAgICAgIGNhc2UgJzQnOlxuICAgICAgY2FzZSAnNSc6XG4gICAgICBjYXNlICc2JzpcbiAgICAgIGNhc2UgJzcnOlxuICAgICAgY2FzZSAnOCc6XG4gICAgICBjYXNlICc5JzpcbiAgICAgIGNhc2UgJy0nOlxuICAgICAgICBwYXJzZWROdW0gPSAnJztcbiAgICAgICAgaS0tO1xuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgIG51bUNoYXIgPSBzdHJbaSsrXTtcbiAgICAgICAgICBpZiAoL1tcXGRcXC5cXC1lXFwrXS8udGVzdChudW1DaGFyKSkge1xuICAgICAgICAgICAgcGFyc2VkTnVtICs9IG51bUNoYXI7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBwb3AocGFyc2VGbG9hdChwYXJzZWROdW0pLCBzdGFjaywgbWV0YVN0YWNrKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdcIic6XG4gICAgICAgIHBhcnNlZFN0cmluZyA9ICcnO1xuICAgICAgICBsYXN0Q2ggPSB2b2lkIDA7XG4gICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcyA9IDA7XG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgY2ggPSBzdHJbaSsrXTtcbiAgICAgICAgICBpZiAoY2ggIT09ICdcIicgfHwgKGxhc3RDaCA9PT0gJ1xcXFwnICYmXG4gICAgICAgICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcyAlIDIgPT09IDEpKSB7XG4gICAgICAgICAgICBwYXJzZWRTdHJpbmcgKz0gY2g7XG4gICAgICAgICAgICBsYXN0Q2ggPSBjaDtcbiAgICAgICAgICAgIGlmIChsYXN0Q2ggPT09ICdcXFxcJykge1xuICAgICAgICAgICAgICBudW1Db25zZWN1dGl2ZVNsYXNoZXMrKztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcyA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBwb3AoSlNPTi5wYXJzZSg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JlY3QnKVxuICAgICAgLmF0dHIoJ3N0cm9rZScsICdibGFjaycpXG4gICAgICAuYXR0cignc3Ryb2tlLXdpZHRoJywgMTApXG4gICAgICAuYXR0cignZmlsbCcsICdub25lJylcbiAgICAgIC5zdHlsZSgnY3Vyc29yJywgJ21vdmUnKVxuICAgICAgLnN0eWxlKCdzdHJva2UtZGFzaGFycmF5JywgJzIwIDEwJyk7XG5cbiAgICBmb3IgKGNvbnN0IHBvaW50TmFtZSBpbiBQb2ludE5hbWVzKSB7XG4gICAgICBjb25zdCBwb2ludDogUG9pbnQgPSBwb2ludHNbUG9pbnROYW1lc1twb2ludE5hbWVdXTtcbiAgICAgIGQzLnNlbGVjdChlbGVtZW50LnZpZXdwb3J0RWxlbWVudCkuYXBwZW5kKCdjaXJjbGUnKVxuICAgICAgICAuYXR0cignY3gnLCBwb2ludC54KVxuICAgICAgICAuYXR0cignY3knLCBwb2ludC55KVxuICAgICAgICAuYXR0cigncicsIDI1KVxuICAgICAgICAuYXR0cignc3Ryb2tlJywgJ2JsYWNrJylcbiAgICAgICAgLmF0dHIoJ3N0cm9rZS13aWR0aCcsIDQpXG4gICAgICAgIC5hdHRyKCdmaWxsJywgJyMwMDk5ZmYnKVxuICAgICAgICAuYXR0cignY2xhc3MnLCAncmVzaXplUG9pbnQnKVxuICAgICAgICAuYXR0cignaWQnLCAncC0nICsgcG9pbnROYW1lKTtcbiAgICB9XG5cbiAgICAvLyBkbyBpdCBhcyBhIGxvb3AgaW5zdGVhZCBvZiBzZWxlY3RBbGwgc28gdGhhdCB5b3UgY2FuIGVhc2lseSBrbm93IHdoaWNoIHBvaW50IHdhc1xuICAgIGZvciAoY29uc3QgbmFtZSBpbiBQb2ludE5hbWVzKSB7XG4gICAgICBkMy5zZWxlY3QoJyNwLScgKyBuYW1lKS5maWx0ZXIoJy5yZXNpemVQb2ludCcpLmNhbGwoXG4gICAgICAgIGQzLmRyYWcoKVxuICAgICAgICAgIC5vbignc3RhcnQnLCAoKSA9PiB7IHJlc2l6ZVN0YXJ0KG5hbWUpOyB9KVxuICAgICAgICAgIC5vbignZHJhZycsIHJlc2l6ZURyYWcpXG4gICAgICAgICAgLm9uKCdlbmQnLCByZXNpemVFbmQuYmluZCh0aGlzKSkpO1xuICAgIH1cblxuICAgIGlmIChlbGVtZW50LmNsYXNzTGlzdC5jb250YWlucygnc3RhZmYnKSkge1xuICAgICAgbGV0IHggPSBwb2ludHNbM10ueDtcbiAgICAgIGxldCB5ID0gcG9pbnRzWzNdLnk7XG4gICAgICBjb25zdCBwb2ludFN0cmluZ1JpZ2h0ID0gKHggKyAxMDApICsgJywnICsgKHkgKyA4NSkgKyAnICcgK1xuICAgICAgICAoeCArIDcwKSArICcsJyArICh5ICsgNTApICsgJyAnICsgKHggKyAxMDApICsgJywnICsgKHkgKyAxNSkgKyAnICcgKyAoeCArIDEzMCkgKyAnLCcgKyAoeSArIDUwKTtcbiAgICAgIHggPSBwb2ludHNbN10ueDtcbiAgICAgIHkgPSBwb2ludHNbN10ueTtcbiAgICAgIGNvbnN0IHBvaW50U3RyaW5nTGVmdCA9ICh4IC0gMTAwKSArICcsJyArICh5IC0gMTUpICsgJyAnICtcbiAgICAgICAgKHggLSAxMzApICsgJywnICsgKHkgLSA1MCkgKyAnICcgKyAoeCAtIDEwMCkgKyAnLCcgKyAoeSAtIDg1KSArICcgJyArICh4IC0gNzApICsgJywnICsgKHkgLSA1MCk7XG5cbiAgICAgIGQzLnNlbGVjdCgnIycgKyBlbGVtZW50LmlkKS5hcHBlbmQoJ3BvbHlnb24nKVxuICAgICAgICAuYXR0cigncG9pbnRzJywgcG9pbnRTdHJpbmdSaWdodClcbiAgICAgICAgLmF0dHIoJ2lkJywgJ3JvdGF0ZVJpZ2h0JylcbiAgICAgICAgLmF0dHIoJ3N0cm9rZScsICdibGFjaycpXG4gICAgICAgIC5hdHRyKCdzdHJva2Utd2lkdGgnLCA3KVxuICAgICAgICAuYXR0cignZmlsbCcsICcjMDA5OWZmJylcbiAgICA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9IFtwb2ludC54LCBwb2ludC55XTtcbiAgICAgIGluaXRpYWxVbHkgPSB1bHk7XG4gICAgICBpbml0aWFsTHJ5ID0gbHJ5O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHJlc2l6ZURyYWcgKCk6IHZvaWQge1xuICAgICAgY29uc3QgY3VycmVudFBvaW50ID0gZDMubW91c2UodGhpcyk7XG4gICAgICBzd2l0Y2ggKFBvaW50TmFtZXNbd2hpY2hQb2ludF0pIHtcbiAgICAgICAgY2FzZSBQb2ludE5hbWVzLlRvcExlZnQ6XG4gICAgICAgICAgdWx4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIHVseSA9IGN1cnJlbnRQb2ludFsxXTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBQb2ludE5hbWVzLlRvcDpcbiAgICAgICAgICB1bHkgPSBjdXJyZW50UG9pbnRbMV0gLSAobHJ4IC0gdWx4KSAqIE1hdGgudGFuKHJvdGF0ZSkgLyAyO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuVG9wUmlnaHQ6XG4gICAgICAgICAgbHJ4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIHVseSA9IGN1cnJlbnRQb2ludFsxXSAtIChscnggLSB1bHgpICogTWF0aC50YW4ocm90YXRlKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBQb2ludE5hbWVzLlJpZ2h0OlxuICAgICAgICAgIGxyeCA9IGN1cnJlbnRQb2ludFswXTtcbiAgICAgICAgICBscnkgPSBpbml0aWFsTHJ5ICsgKGN1cnJlbnRQb2ludFswXSAtIGluaXRpYWxQb2ludFswXSkgKiBNYXRoLnRhbihyb3RhdGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuQm90dG9tUmlnaHQ6XG4gICAgICAgICAgbHJ4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIGx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aDtcbiAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICBpZiAoIWNvdW50KSB7XG4gICAgICByZXR1cm4gY2IobnVsbCwgcmVzdWx0KTtcbiAgICB9XG5cbiAgICAvLyBvcmRlciB3aXRoIG9wZW5fcmV2cyBpcyB1bnNwZWNpZmllZFxuICAgIGxlYXZlcy5mb3JFYWNoKGZ1bmN0aW9uIChsZWFmKSB7XG4gICAgICBzZWxmLmdldChpZCwge1xuICAgICAgICByZXY6IGxlYWYsXG4gICAgICAgIHJldnM6IG9wdHMucmV2cyxcbiAgICAgICAgbGF0ZXN0OiBvcHRzLmxhdGVzdCxcbiAgICAgICAgYXR0YWNobWVudHM6IG9wdHMuYXR0YWNobWVudHMsXG4gICAgICAgIGJpbmFyeTogb3B0cy5iaW5hcnlcbiAgICAgIH0sIGZ1bmN0aW9uIChlcnIsIGRvYykge1xuICAgICAgICBpZiAoIWVycikge1xuICAgICAgICAgIC8vIHVzaW5nIGxhdGVzdD10cnVlIGNhbiBwcm9kdWNlIGR1cGxpY2F0ZXNcbiAgICAgICAgICB2YXIgZXhpc3Rpbmc7XG4gICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSByZXN1bHQubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAocmVzdWx0W2ldLm9rICYmIHJlc3VsdFtpXS5vay5fcmV2ID09PSBkb2MuX3Jldikge1xuICAgICAgICAgICAgICBleGlzdGluZyA9IHRydWU7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoIWV4aXN0aW5nKSB7XG4gICAgICAgICAgICByZXN1bHQucHVzaCh7b2s6IGRvY30pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXN1bHQucHVzaCh7bWlzc2luZzogbGVhZn0pO1xuICAgICAgICB9XG4gICAgICAgIGNvdW50LS07XG4gICAgICAgIGlmICghY291bnQpIHtcbiAgICAgICAgICBjYihudWxsLCByZXN1bHQpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIGlmIChvcHRzLm9wZW5fcmV2cykge1xuICAgIGlmIChvcHRzLm9wZW5fcmV2cyA9PT0gXCJhbGxcIikge1xuICAgICAgdGhpcy5fZ2V0UmV2aXNpb25UcmVlKGlkLCBmdW5jdGlvbiAoZXJyLCByZXZfdHJlZSkge1xuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgIHJldHVybiBjYihlcnIpO1xuICAgICAgICB9XG4gICAgICAgIGxlYXZlcyA9IGNvbGxlY3RMZWF2ZXMocmV2X3RyZWUpLm1hcChmdW5jdGlvbiAobGVhZikge1xuICAgICAgICAgIHJldHVybiBsZWFmLnJldjtcbiAgICAgICAgfSk7XG4gICAgICAgIGZpbmlzaE9wZW5SZXZzKCk7XG4gICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKEFycmF5LmlzQXJyYXkob3B0cy5vcGVuX3JldnMpKSB7XG4gICAgICAgIGxlYXZlcyA9IG9wdHMub3Blbl9yZXZzO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlYXZlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIHZhciBsID0gbGVhdmVzW2ldO1xuICAgICAgICAgIC8vIGxvb2tzIGxpa2UgaXQncyB0aGUgb25seSB0aGluZyBjb3VjaGRiIGNoZWNrc1xuICAgICAgICAgIGlmICghKHR5cGVvZiAobCkgPT09IFwic3RyaW5nXCIgJiYgL15cXGQrLS8udGVzdChsKSkpIHtcbiAgICAgICAgICAgIHJldHVybiBjYihjcmVhdGVFcnJvcihJTlZBTElEX1JFVikpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmaW5pc2hPcGVuUmV2cygpO1xuICAgICAgfSBlb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7XG4gICAgICAgIGRvYy5fcmV2aXNpb25zID0ge1xuICAgICAgICAgIHN0YXJ0OiAocGF0aC5wb3MgKyBwYXRoLmlkcy5sZW5ndGgpIC0gMSxcbiAgICAgICAgICBpZHM6IHBhdGguaWRzLm1hcChmdW5jdGlvbiAocmV2KSB7XG4gICAgICAgICAgICByZXR1cm4gcmV2LmlkO1xuICAgICAgICAgIH0pXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgICBpZiAob3B0cy5yZXZzX2luZm8pIHtcbiAgICAgICAgdmFyIHBvcyA9ICBwYXRoLnBvcyArIHBhdGguaWRzLmxlbmd0aDtcbiAgICAgICAgZG9jLl9yZXZzX2luZm8gPSBwYXRoLmlkcy5tYXAoZnVuY3Rpb24gKHJldikge1xuICAgICAgICAgIHBvcy0tO1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByZXY6IHBvcyArICctJyArIHJldi5pZCxcbiAgICAgICAgICAgIHN0YXR1czogcmV2Lm9wdHMuc3RhdHVzXG4gICAgICAgICAgfTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKG9wdHMuYXR0YWNobWVudHMgJiYgZG9jLl9hdHRhY2htZW50cykge1xuICAgICAgdmFyIGF0dGFjaG1lbnRzID0gZG9jLl9hdHRhY2htZW50cztcbiAgICAgIHZhciBjb3VudCA9IE9iamVjdC5rZXlzKGF0dGFjaG1lbnRzKS5sZW5ndGg7XG4gICAgICBpZiAoY291bnQgPT09IDApIHtcbiAgICAgICAgcmV0dXJuIGNiKG51bGwsIGRvYyk7XG4gICAgICB9XG4gICAgICBPYmplY3Qua2V5cyhhdHRhY2htZW50cykuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgIHRoaXMuX2dldEF0dGFjaG1lbnQoZG9jLl9pZCwga2V5LCBhdHRhY2htZW50c1trZXldLCB7XG4gICAgICAgICAgLy8gUHJldmlvdXNseSB0aGUgcmV2aXNpb24gaGFuZGxpbm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hhdCBrZXkgZG9lcyBub3QgY29udGFpbiBcXHUwMDAwXG4gICAgICAgIC8vIERvIG9yZGVyLXByZXNlcnZpbmcgcmVwbGFjZW1lbnRzOlxuICAgICAgICAvLyAwIC0+IDEsIDFcbiAgICAgICAgLy8gMSAtPiAxLCAyXG4gICAgICAgIC8vIDIgLT4gMiwgMlxuICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBuby1jb250cm9sLXJlZ2V4ICovXG4gICAgICAgIHJldHVybiBrZXlcbiAgICAgICAgICAucmVwbGFjZSgvXFx1MDAwMi9nLCAnXFx1MDAwMlxcdTAwMDInKVxuICAgICAgICAgIC5yZXBsYWNlKC9cXHUwMDAxL2csICdcXHUwMDAxXFx1MDAwMicpXG4gICAgICAgICAgLnJlcGxhY2UoL1xcdTAwMDAvZywgJ1xcdTAwMDFcXHUwMDAxJyk7XG4gICAgICAgIC8qIGVzbGludC1lbmFibGUgbm8tY29udHJvbC1yZWdleCAqL1xuICAgICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgICAgdmFyIGlzQXJyYXkgPSBBcnJheS5pc0FycmF5KGtleSk7XG4gICAgICAgIHZhciBhcnIgPSBpc0FycmF5ID8ga2V5IDogT2JqZWN0LmtleXMoa2V5KTtcbiAgICAgICAgdmFyIGkgPSAtMTtcbiAgICAgICAgdmFyIGxlbiA9IGFyci5sZW5ndGg7XG4gICAgICAgIHZhciByZXN1bHQgPSAnJztcbiAgICAgICAgaWYgKGlzQXJyYXkpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgbGVuKSB7XG4gICAgICAgICAgICByZXN1bHQgKz0gdG9JbmRleGFibGVTdHJpbmcoYXJyW2ldKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgd2hpbGUgKCsraSA8IGxlbikge1xuICAgICAgICAgICAgdmFyIG9iaktleSA9IGFycltpXTtcbiAgICAgICAgICAgIHJlc3VsdCArPSB0b0luZGV4YWJsZVN0cmluZyhvY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ocmV2SW5mby5lcnJvcikge1xuICAgICAgICByZXR1cm4gcmV2SW5mbztcbiAgICAgIH1cbiAgICAgIGRvYy5fcmV2X3RyZWUgPSBbe1xuICAgICAgICBwb3M6IHJldkluZm8ucHJlZml4LFxuICAgICAgICBpZHM6IFtyZXZJbmZvLmlkLCB7c3RhdHVzOiAnbWlzc2luZyd9LCBbW25ld1JldklkLCBvcHRzLCBbXV1dXVxuICAgICAgfV07XG4gICAgICBuUmV2TnVtID0gcmV2SW5mby5wcmVmaXggKyAxO1xuICAgIH0gZWxzZSB7XG4gICAgICBkb2MuX3Jldl90cmVlID0gW3tcbiAgICAgICAgcG9zOiAxLFxuICAgICAgICBpZHMgOiBbbmV3UmV2SWQsIG9wdHMsIFtdXVxuICAgICAgfV07XG4gICAgICBuUmV2TnVtID0gMTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgaWYgKGRvYy5fcmV2aXNpb25zKSB7XG4gICAgICBkb2MuX3Jldl90cmVlID0gbWFrZVJldlRyZWVGcm9tUmV2aXNpb25zKGRvYy5fcmV2aXNpb25zLCBvcHRzKTtcbiAgICAgIG5SZXZOdW0gPSBkb2MuX3JldmlzaW9ucy5zdGFydDtcbiAgICAgIG5ld1JldklkID0gZG9jLl9yZXZpc2lvbnMuaWRzWzBdO1xuICAgIH1cbiAgICBpZiAoIWRvYy5fcmV2X3RyZWUpIHtcbiAgICAgIHJldkluZm8gPSBwYXJzZVJldmlzaW9uSW5mbyhkb2MuX3Jldik7XG4gICAgICBpZiAocmV2SW5mby5lcnJvcikge1xuICAgICAgICByZXR1cm4gcmV2SW5mbztcbiAgICAgIH1cbiAgICAgIG5SZXZOdW0gPSByZXZJbmZvLnByZWZpeDtcbiAgICAgIG5ld1JldklkID0gcmV2SW5mby5pZDtcbiAgICAgIGRvYy5fcmV2X3RyZWUgPSBbe1xuICAgICAgICBwb3M6IG5SZXZOdW0sXG4gICAgICAgIGlkczogW25ld1JldklkLCBvcHRzLCBbXV1cbiAgICAgIH1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REIgU2VydmVyIGRvZXNuJ3QuXG4gICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgICBpZiAocmVzICYmICFyZXMuY29tcGFjdF9ydW5uaW5nKSB7XG4gICAgICAgICAgICBjYWxsYmFjayhudWxsLCB7b2s6IHRydWV9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2V0VGltZW91dChwaW5nLCBvcHRzLmludGVydmFsIHx8IDIwMCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIC8vIFBpbmcgdGhlIGh0dHAgaWYgaXQncyBmaW5pc2hlZCBjb21wYWN0aW9uXG4gICAgICBwaW5nKCk7XG4gICAgfSk7XG4gIH0pO1xuXG4gIGFwaS5idWxrR2V0ID0gYWRhcHRlckZ1bignYnVsa0dldCcsIGZ1bmN0aW9uIChvcHRzLCBjYWxsYmFjaykge1xuICAgIHZhciBzZWxmID0gdGhpcztcblxuICAgIGZ1bmN0aW9uIGRvQnVsa0dldChjYikge1xuICAgICAgdmFyIHBhcmFtcyA9IHt9O1xuICAgICAgaWYgKG9wdHMucmV2cykge1xuICAgICAgICBwYXJhbXMucmV2cyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAob3B0cy5hdHRhY2htZW50cykge1xuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICBwYXJhbXMuYXR0YWNobWVudHMgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKG9wdHMubGF0ZXN0KSB7XG4gICAgICAgIHBhcmFtcy5sYXRlc3QgPSB0cnVlO1xuICAgICAgfVxuICAgICAgZmV0Y2hKU09OKGdlbkRCVXJsKGhvc3QsICdfYnVsa19nZXQnICsgcGFyYW1zVG9TdHIocGFyYW1zKSksIHtcbiAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHsgZG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SBlbHNlIHtcbiAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgIHJldHVybiByZXNwb25zZS5ibG9iKCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KS50aGVuKGZ1bmN0aW9uIChibG9iKSB7XG4gICAgICAvLyBUT0RPOiBhbHNvIHJlbW92ZVxuICAgICAgaWYgKHR5cGVvZiBwcm9jZXNzICE9PSAndW5kZWZpbmVkJyAmJiAhcHJvY2Vzcy5icm93c2VyKSB7XG4gICAgICAgIGJsb2IudHlwZSA9IGNvbnRlbnRUeXBlO1xuICAgICAgfVxuICAgICAgY2FsbGJhY2sobnVsbCwgYmxvYik7XG4gICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge1xuICAgICAgY2FsbGJhY2soZXJyKTtcbiAgICB9KTtcbiAgfSk7XG5cbiAgLy8gUmVtb3ZlIHRoZSBhdHRhY2htZW50IGdpdmVuIGJ5IHRoZSBpZCBhbmQgcmV2XG4gIGFwaS5yZW1vdmVBdHRhY2htZW50ID0gIGFkYXB0ZXJGdW4kJDEoJ3JlbW92ZUF0dGFjaG1lbnQnLCBmdW5jdGlvbiAoZG9jSWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0YWNobWVudElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaykge1xuICAgIHZhciB1cmwgPSBnZW5EQlVybChob3N0LCBlbmNvZGVEb2NJZChkb2NJZCkgKyAnLycgK1xuICAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVBdHRhY2htZW50SWQoYXR0YWNobWVudElkKSkgKyAnP3Jldj0nICsgcmV2O1xuICAgIGZldGNoSlNPTih1cmwsIHttZXRob2Q6ICdERUxFVEUnfSwgY2FsbGJhY2spLmNhdGNoKGNhbGxiYWNrKTtcbiAgfSk7XG5cbiAgLy8gQWRkIHRoZSBhdHRhY2htZW50IGdpdmVuIGJ5IGJsb2IgYW5kIGl0cyBjb250ZW50VHlwZSBwcm9wZXJ0eVxuICAvLyB0byB0aGUgZG9jdW1lbnQgd2l0aCB0aGUgZ2l2ZW4gaWQsIHRoZSByZXZpc2lvbiBnaXZlbiBieSByZXYsIGFuZFxuICAvLyBhZGQgaXQgdG8gdGhlIGRhdGFiYXNlIGdpdmVuIGJ5IGhvc3QuXG4gIGFwaS5wdXRBdHRhY2htZW50ID0gYWRhcHRlckZ1biQkMSgncHV0QXR0YWNobWVudCcsIGZ1bmN0aW9uIChkb2NJZCwgYXR0YWNobWVudElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2LCBibG9iLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSwgY2FsbGJhY2spIHtcbiAgICBpZiAodHlwZW9mIHR5cGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIGNhbGxiYWNrID0gdHlwZTtcbiAgICAgIHR5cGUgPSBibG9iO1xuICAgICAgYmxvYiA9IHJldjtcbiAgICAgIHJldiA9IG51bGw7XG4gICAgfVxuICAgIHZhciBpZCA9IGVuY29kZURvY0lkKGRvY0lkKSArICcvJyArIGVuY29kZUF0dGFjaG1lbnRJZChhdHRhY2htZW50SWQpO1xuICAgIHZhciB1cmwgPSBnZW5EQlVybChob3N0LCBpZCk7XG4gICAgaWYgKHJldikge1xuICAgICAgdXJsICs9ICc/cmV2PScgKyByZXY7XG4gICAgfVxuXG4gICAgaWYgKHR5cGVvZiBibG9iID09PSAnc3RyaW5nJykge1xuICAgICAgLy8gaW5wdXQgaXMgYXNzdW1lZCB0by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UE9TVCc7XG4gICAgICAgIGlmICh0eXBlb2YgZnVuID09PSAnc3RyaW5nJykge1xuICAgICAgICAgIGJvZHkgPSB7a2V5czogb3B0cy5rZXlzfTtcbiAgICAgICAgfSBlbHNlIHsgLy8gZnVuIGlzIHttYXAgOiBtYXBmdW59LCBzbyBhcHBlbmQgdG8gdGhpc1xuICAgICAgICAgIGZ1bi5rZXlzID0gb3B0cy5rZXlzO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gV2UgYXJlIHJlZmVyZW5jaW5nIGEgcXVlcnkgZGVmaW5lZCBpbiB0aGUgZGVzaWduIGRvY1xuICAgIGlmICh0eXBlb2YgZnVuID09PSAnc3RyaW5nJykge1xuICAgICAgdmFyIHBhcnRzID0gcGFyc2VWaWV3TmFtZShmdW4pO1xuICAgICAgcmV0dXJuIGRiLmZldGNoKCdfZGVzaWduLycgKyBwYXJ0c1swXSArICcvX3ZpZXcvJyArIHBhcnRzWzFdICsgcGFyYW1zLCB7XG4gICAgICAgIGhlYWRlcnM6IG5ldyBoKHsnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nfSksXG4gICAgICAgIG1ldGhvZDogbWV0aG9kLFxuICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeShib2R5KVxuICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgb2sgPSByZXNwb25zZS5vaztcbiAgICAgICAgc3RhdHVzID0gcmVzcG9uc2Uuc3RhdHVzO1xuICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpO1xuICAgICAgfSkudGhlbihmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICByZXN1bHQuc3RhdHVzID0gc3RhdHVzO1xuICAgICAgICAgIHRocm93IGdlbmVyYXRlRXJyb3JGcm9tUmVzcG9uc2UocmVzdWx0KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBmY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mRvYyk7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcm93cy5mb3JFYWNoKGZ1bmN0aW9uIChyb3cpIHtcbiAgICAgICAgICAgIHZhciBkb2NJZCA9IHJvd1RvRG9jSWQocm93KTtcbiAgICAgICAgICAgIHZhciBkb2MgPSBkb2NJZHNUb0RvY3MuZ2V0KGRvY0lkKTtcbiAgICAgICAgICAgIGlmIChkb2MpIHtcbiAgICAgICAgICAgICAgcm93LmRvYyA9IGRvYztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gZmluYWxSZXN1bHRzO1xuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBmaW5hbFJlc3VsdHM7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHR5cGVvZiBvcHRzLmtleXMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICB2YXIga2V5cyA9IG9wdHMua2V5cztcbiAgICAgIHZhciBmZXRjaFByb21pc2VzID0ga2V5cy5tYXAoZnVuY3Rpb24gKGtleSkge1xuICAgICAgICB2YXIgdmlld09wdHMgPSB7XG4gICAgICAgICAgc3RhcnRrZXkgOiB0b0luZGV4YWJsZVN0cmluZyhba2V5XSksXG4gICAgICAgICAgZW5ka2V5ICAgOiB0b0luZGV4YWJsZVN0cmluZyhba2V5LCB7fV0pXG4gICAgICAgIH07XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAob3B0cy51cGRhdGVfc2VxKSB7XG4gICAgICAgICAgdmlld09wdHMudXBkYXRlX3NlcSA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZldGNoRnJvbVZpZXcodmlld09wdHMpO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gUHJvbWlzZS5hbGwoZmV0Y2hQcm9taXNlcykudGhlbihmbGF0dGVuKS50aGVuKG9uTWFwUmVzdWx0c1JlYWR5K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ZhbGlkYXRvcihkb2MsIHZpZXdOYW1lKTtcbiAgICAgICAgY2hlY2tRdWVyeVBhcnNlRXJyb3Iob3B0cywgZnVuKTtcblxuICAgICAgICB2YXIgY3JlYXRlVmlld1Byb21pc2UgPSBjcmVhdGVWaWV3KFxuICAgICAgICAgIC8qIHNvdXJjZURCICovIGRiLFxuICAgICAgICAgIC8qIHZpZXdOYW1lICovIGZ1bGxWaWV3TmFtZSxcbiAgICAgICAgICAvKiBtYXBGdW4gKi8gZnVuLm1hcCxcbiAgICAgICAgICAvKiByZWR1Y2VGdW4gKi8gZnVuLnJlZHVjZSxcbiAgICAgICAgICAvKiB0ZW1wb3JhcnkgKi8gZmFsc2UsXG4gICAgICAgICAgLyogbG9jYWxEb2NOYW1lICovIGxvY2FsRG9jTmFtZSk7XG4gICAgICAgIHJldHVybiBjcmVhdGVWaWV3UHJvbWlzZS50aGVuKGZ1bmN0aW9uICh2aWV3KSB7XG4gICAgICAgICAgaWYgKG9wdHMuc3RhbGUgPT09ICdvaycgfHwgb3B0cy5zdGFsZSA9PT0gJ3VwZGF0ZV9hZnRlcicpIHtcbiAgICAgICAgICAgIGlmIChvcHRzLnN0YWxlID09PSAndXBkYXRlX2FmdGVyJykge1xuICAgICAgICAgICAgICBpbW1lZGlhdGUoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcodmlldywgdXBkYXRlVmlld09wdHMpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBxdWVyeVZpZXcodmlldywgb3B0cyk7XG4gICAgICAgICAgfSBlbHNlIHsgLy8gc3RhbGUgbm90IG9rXG4gICAgICAgICAgICByZXR1cm4gdXBkYXRlVmlldyh2aWV3LCB1cGRhdGVWaWV3T3B0cykudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgIHJldHVybiBxdWVyeVZpZXcodmlldywgb3B0cyk7XG4gICAgICAgICAgICB9KTt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aHJvdyBuZXcgRXJyb3IoJ2NhbmNlbGxlZCcpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIFByb21pc2UuYWxsKGJ1bGtHZXRSZXNwb25zZS5yZXN1bHRzLm1hcChmdW5jdGlvbiAoYnVsa0dldEluZm8pIHtcbiAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKGJ1bGtHZXRJbmZvLmRvY3MubWFwKGZ1bmN0aW9uIChkb2MpIHtcbiAgICAgICAgICB2YXIgcmVtb3RlRG9jID0gZG9jLm9rO1xuXG4gICAgICAgICAgaWYgKGRvYy5lcnJvcikge1xuICAgICAgICAgICAgLy8gd2hlbiBBVVRPX0NPTVBBQ1RJT04gaXMgc2V0LCBkb2NzIGNhbiBiZSByZXR1cm5lZCB3aGljaCBsb29rXG4gICAgICAgICAgICAvLyBsaWtlIHRoaXM6IHtcIm1pc3NpbmdcIjpcIjEtN2MzYWMyNTZiNjkzYzQ2MmFmODQ0MmY5OTJiODM2OTZcIn1cbiAgICAgICAgICAgIG9rID0gZmFsc2U7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFyZW1vdGVEb2MgfHwgIXJlbW90ZURvYy5fYXR0YWNobWVudHMpIHtcbiAgICAgICAgICAgIHJldHVybiByZW1vdGVEb2M7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGdldERvY0F0dGFjaG1lbnRzRnJvbVRhcmdldE9yU291cmNlKHRhcmdldCwgc3JjLCByZW1vdGVEb2MpXG4gICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKGF0dGFjaG1lbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmlsZW5hbWVzID0gT2JqZWN0LmtleXMocmVtb3RlRG9jLl9hdHRhY2htZW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaChmdW5jdGlvbiAoYXR0YWNobWVudCwgaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHQgPSByZW1vdGVEb2MuX2F0dGFjaG1lbnRzW2ZpbGVuYW1lc1tpXV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGF0dC5zdHViO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBhdHQubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dC5kYXRhID0gYXR0YWNobWVudDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlbW90ZURvYztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KSk7XG4gICAgICB9KSlcblxuICAgICAgLnRoZW4oZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgcmVzdWx0RG9jcyA9IHJlc3VsdERvY3MuY29uY2F0KGZsYXR0ZW4ocmVzdWx0cykuZmlsdGVyKEJvb2xlYW4pKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgZnVuY3Rpb24gaGFzQXR0YWNobWVudHMoZG9jKSB7XG4gICAgcmV0dXJuIGRvYy5fYXR0YWNobWVudHMgJiYgT2JqZWN0LmtleXMoZG9jLl9hdHRhY2htZW50cykubGVuZ3RoID4gMDtcbiAgfVxuXG4gIGZ1bmN0aW9uIGhhc0NvbmZsaWN0cyhkb2MpIHtcbiAgICByZXR1cm4gZG9jLl9jb25mbGljdHMgJiYgZG9jLl9jb25mbGljdHMubGVuZ3RoID4gMDtcbiAgfVxuXG4gIGZ1bmN0aW9uIGZldGNoUmV2aXNpb25PbmVEb2NzKGlkcykge1xuICAgIC8vIE9wdGltaXphdGlvbjogZmV0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XG4gICAgaWYgKGRyYWluaW5nKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgdmFyIHRpbWVvdXQgPSBydW5UaW1lb3V0KGNsZWFuVXBOZXh0VGljayk7XG4gICAgZHJhaW5pbmcgPSB0cnVlO1xuXG4gICAgdmFyIGxlbiA9IHF1ZXVlLmxlbmd0aDtcbiAgICB3aGlsZShsZW4pIHtcbiAgICAgICAgY3VycmVudFF1ZXVlID0gcXVldWU7XG4gICAgICAgIHF1ZXVlID0gW107XG4gICAgICAgIHdoaWxlICgrK3F1ZXVlSW5kZXggPCBsZW4pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50UXVldWUpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50UXVldWVbcXVldWVJbmRleF0ucnVuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcXVldWVJbmRleCA9IC0xO1xuICAgICAgICBsZW4gPSBxdWV1ZS5sZW5ndGg7XG4gICAgfVxuICAgIGN1cnJlbnRRdWV1ZSA9IG51bGw7XG4gICAgZHJhaW5pbmcgPSBmYWxzZTtcbiAgICBydW5DbGVhclRpbWVvdXQodGltZW91dCk7XG59XG5cbnByb2Nlc3MubmV4dFRpY2sgPSBmdW5jdGlvbiAoZnVuKSB7XG4gICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpO1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgYXJnc1tpIC0gMV0gPSBhcmd1bWVudHNbaV07XG4gICAgICAgIH1cbiAgICB9XG4gICAgcXVldWUucHVzaChuZXcgSXRlbShmdW4sIGFyZ3MpKTtcbiAgICBpZiAocXVldWUubGVuZ3RoID09PSAxICYmICFkcmFpbmluZykge1xuICAgICAgICBydW5UaW1lb3V0KGRy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1vdmUoJ292ZXInKTtcbiAgICBjb25zdCBmaWxlTGlzdCA9IGV2ZW50LmRhdGFUcmFuc2Zlci5maWxlcztcbiAgICBjb25zdCBmaWxlcyA9IEFycmF5LmZyb20oZmlsZUxpc3QpO1xuICAgIGNvbnN0IHJlamVjdEZpbGVzID0gYWRkTmV3RmlsZXMoZmlsZXMpO1xuICAgIGlmIChyZWplY3RGaWxlcy5sZW5ndGggIT09IDApIHtcbiAgICAgIGNvbnN0IGZpbGVuYW1lcyA9IHJlamVjdEZpbGVzLm1hcChmaWxlID0+IGZpbGUubmFtZSk7XG4gICAgICB3aW5kb3cuYWxlcnQoYFRoZSBmb2xsb3dpbmcgZmlsZXMgYXJlIG5vdCAubWVpLCAucG5nLCAuanBlZywgb3IgLmpzb25sZCBmaWxlczogXFxuXFxuJHtmaWxlbmFtZXMuam9pbignXFxuJyl9YCk7XG4gICAgfVxuICB9O1xuXG4gIC8vIExpc3RlbmVyIGZvciBzb3J0aW5nIGZpbGUvZm9saW9cbiAgY29uc3Qgc29ydEJ5TmFtZUJ0bnMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuc29ydF9uYW1lJyk7XG4gIHNvcnRCeU5hbWVCdG5zLmZvckVhY2goc29ydEJ5TmFtZUJ0biA9PiB7XG4gICAgc29ydEJ5TmFtZUJ0bi5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsICgpID0+IHNvcnRGaWxlQnlOYW1lKHNvcnRCeU5hbWVCdG4pKTtcbiAgfSk7XG59Il0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/Neon-gh/editor.js b/Neon-gh/editor.js index f84478740..ca7071ac6 100644 --- a/Neon-gh/editor.js +++ b/Neon-gh/editor.js @@ -6,7 +6,7 @@ * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var s="Expected a function",o="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",v="[object Number]",m="[object Object]",y="[object RegExp]",b="[object Set]",w="[object String]",_="[object Symbol]",E="[object WeakMap]",S="[object ArrayBuffer]",x="[object DataView]",L="[object Float32Array]",k="[object Float64Array]",A="[object Int8Array]",C="[object Int16Array]",I="[object Int32Array]",P="[object Uint8Array]",O="[object Uint16Array]",B="[object Uint32Array]",T=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,D=RegExp(q.source),F=RegExp(j.source),R=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U=/^\w*$/,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,G=RegExp(Z.source),W=/^\s+/,K=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ie=/\w*$/,re=/^[-+]0x[0-9a-f]+$/i,se=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",ge="["+fe+"]",ve="["+he+"]",me="\\d+",ye="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+fe+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",Se="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ke="(?:"+be+"|"+we+")",Ae="(?:"+Le+"|"+we+")",Ce="(?:"+ve+"|"+_e+")"+"?",Ie="[\\ufe0e\\ufe0f]?"+Ce+("(?:\\u200d(?:"+[Ee,Se,xe].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*"),Pe="(?:"+[ye,Se,xe].join("|")+")"+Ie,Oe="(?:"+[Ee+ve+"?",ve,Se,xe,pe].join("|")+")",Be=RegExp("['’]","g"),Te=RegExp(ve,"g"),Ne=RegExp(_e+"(?="+_e+")|"+Oe+Ie,"g"),Me=RegExp([Le+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ge,Le,"$"].join("|")+")",Ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ge,Le+ke,"$"].join("|")+")",Le+"?"+ke+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Le+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Pe].join("|"),"g"),qe=RegExp("[\\u200d\\ud800-\\udfff"+he+"\\ufe0e\\ufe0f]"),je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,De=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,Re={};Re[L]=Re[k]=Re[A]=Re[C]=Re[I]=Re[P]=Re["[object Uint8ClampedArray]"]=Re[O]=Re[B]=!0,Re[c]=Re[l]=Re[S]=Re[u]=Re[x]=Re[d]=Re[h]=Re[f]=Re[g]=Re[v]=Re[m]=Re[y]=Re[b]=Re[w]=Re[E]=!1;var Ve={};Ve[c]=Ve[l]=Ve[S]=Ve[x]=Ve[u]=Ve[d]=Ve[L]=Ve[k]=Ve[A]=Ve[C]=Ve[I]=Ve[g]=Ve[v]=Ve[m]=Ve[y]=Ve[b]=Ve[w]=Ve[_]=Ve[P]=Ve["[object Uint8ClampedArray]"]=Ve[O]=Ve[B]=!0,Ve[h]=Ve[f]=Ve[E]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,Ue=parseInt,$e="object"==typeof e&&e&&e.Object===Object&&e,Ze="object"==typeof self&&self&&self.Object===Object&&self,Ge=$e||Ze||Function("return this")(),We=t&&!t.nodeType&&t,Ke=We&&"object"==typeof i&&i&&!i.nodeType&&i,Ye=Ke&&Ke.exports===We,Xe=Ye&&$e.process,Je=function(){try{var e=Ke&&Ke.require&&Ke.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Qe=Je&&Je.isArrayBuffer,et=Je&&Je.isDate,tt=Je&&Je.isMap,nt=Je&&Je.isRegExp,it=Je&&Je.isSet,rt=Je&&Je.isTypedArray;function st(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r-1}function ht(e,t,n){for(var i=-1,r=null==e?0:e.length;++i-1;);return n}function Mt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var jt=kt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Dt=kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ft(e){return"\\"+ze[e]}function Rt(e){return qe.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Ht(e,t){for(var n=-1,i=e.length,r=0,s=[];++n",""":'"',"'":"'"});var Yt=function e(t){var n,i=(t=null==t?Ge:Yt.defaults(Ge.Object(),t,Yt.pick(Ge,De))).Array,r=t.Date,K=t.Error,he=t.Function,fe=t.Math,pe=t.Object,ge=t.RegExp,ve=t.String,me=t.TypeError,ye=i.prototype,be=he.prototype,we=pe.prototype,_e=t["__core-js_shared__"],Ee=be.toString,Se=we.hasOwnProperty,xe=0,Le=(n=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=we.toString,Ae=Ee.call(pe),Ce=Ge._,Ie=ge("^"+Ee.call(Se).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=Ye?t.Buffer:void 0,Oe=t.Symbol,Ne=t.Uint8Array,qe=Pe?Pe.allocUnsafe:void 0,ze=zt(pe.getPrototypeOf,pe),$e=pe.create,Ze=we.propertyIsEnumerable,We=ye.splice,Ke=Oe?Oe.isConcatSpreadable:void 0,Xe=Oe?Oe.iterator:void 0,Je=Oe?Oe.toStringTag:void 0,yt=function(){try{var e=es(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),kt=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,Xt=r&&r.now!==Ge.Date.now&&r.now,Jt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Qt=fe.ceil,en=fe.floor,tn=pe.getOwnPropertySymbols,nn=Pe?Pe.isBuffer:void 0,rn=t.isFinite,sn=ye.join,on=zt(pe.keys,pe),an=fe.max,cn=fe.min,ln=r.now,un=t.parseInt,dn=fe.random,hn=ye.reverse,fn=es(t,"DataView"),pn=es(t,"Map"),gn=es(t,"Promise"),vn=es(t,"Set"),mn=es(t,"WeakMap"),yn=es(pe,"create"),bn=mn&&new mn,wn={},_n=As(fn),En=As(pn),Sn=As(gn),xn=As(vn),Ln=As(mn),kn=Oe?Oe.prototype:void 0,An=kn?kn.valueOf:void 0,Cn=kn?kn.toString:void 0;function In(e){if($o(e)&&!No(e)&&!(e instanceof Tn)){if(e instanceof Bn)return e;if(Se.call(e,"__wrapped__"))return Cs(e)}return new Bn(e)}var Pn=function(){function e(){}return function(t){if(!Uo(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function On(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Tn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Xn(e,t,n,i,r,s){var o,a=1&t,l=2&t,h=4&t;if(n&&(o=r?n(e,i,r,s):n(e)),void 0!==o)return o;if(!Uo(e))return e;var E=No(e);if(E){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Se.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!a)return yr(e,o)}else{var T=is(e),N=T==f||T==p;if(Do(e))return hr(e,a);if(T==m||T==c||N&&!r){if(o=l||N?{}:ss(e),!a)return l?function(e,t){return br(e,ns(e),t)}(e,function(e,t){return e&&br(t,Ea(t),e)}(o,e)):function(e,t){return br(e,ts(e),t)}(e,Gn(o,e))}else{if(!Ve[T])return r?e:{};o=function(e,t,n){var i=e.constructor;switch(t){case S:return fr(e);case u:case d:return new i(+e);case x:return function(e,t){var n=t?fr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case k:case A:case C:case I:case P:case"[object Uint8ClampedArray]":case O:case B:return pr(e,n);case g:return new i;case v:case w:return new i(e);case y:return function(e){var t=new e.constructor(e.source,ie.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new i;case _:return r=e,An?pe(An.call(r)):{}}var r}(e,T,a)}}s||(s=new Dn);var M=s.get(e);if(M)return M;s.set(e,o),Yo(e)?e.forEach((function(i){o.add(Xn(i,t,n,i,e,s))})):Zo(e)&&e.forEach((function(i,r){o.set(r,Xn(i,t,n,r,e,s))}));var q=E?void 0:(h?l?Gr:Zr:l?Ea:_a)(e);return at(q||e,(function(i,r){q&&(i=e[r=i]),Un(o,r,Xn(i,t,n,r,e,s))})),o}function Jn(e,t,n){var i=n.length;if(null==e)return!i;for(e=pe(e);i--;){var r=n[i],s=t[r],o=e[r];if(void 0===o&&!(r in e)||!s(o))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new me(s);return ws((function(){e.apply(void 0,n)}),t)}function ei(e,t,n,i){var r=-1,s=dt,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=ft(t,Ot(n))),i?(s=ht,o=!1):t.length>=200&&(s=Tt,o=!1,t=new jn(t));e:for(;++r-1},Mn.prototype.set=function(e,t){var n=this.__data__,i=$n(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(pn||Mn),string:new Nn}},qn.prototype.delete=function(e){var t=Jr(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return Jr(this,e).get(e)},qn.prototype.has=function(e){return Jr(this,e).has(e)},qn.prototype.set=function(e,t){var n=Jr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},jn.prototype.add=jn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jn.prototype.has=function(e){return this.__data__.has(e)},Dn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Dn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Dn.prototype.get=function(e){return this.__data__.get(e)},Dn.prototype.has=function(e){return this.__data__.has(e)},Dn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var i=n.__data__;if(!pn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(i)}return n.set(e,t),this.size=n.size,this};var ti=Er(li),ni=Er(ui,!0);function ii(e,t){var n=!0;return ti(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function ri(e,t,n){for(var i=-1,r=e.length;++i0&&n(a)?t>1?oi(a,t-1,n,i,r):pt(r,a):i||(r[r.length]=a)}return r}var ai=Sr(),ci=Sr(!0);function li(e,t){return e&&ai(e,t,_a)}function ui(e,t){return e&&ci(e,t,_a)}function di(e,t){return ut(t,(function(t){return Vo(e[t])}))}function hi(e,t){for(var n=0,i=(t=cr(t,e)).length;null!=e&&nt}function vi(e,t){return null!=e&&Se.call(e,t)}function mi(e,t){return null!=e&&t in pe(e)}function yi(e,t,n){for(var r=n?ht:dt,s=e[0].length,o=e.length,a=o,c=i(o),l=1/0,u=[];a--;){var d=e[a];a&&t&&(d=ft(d,Ot(t))),l=cn(d.length,l),c[a]=!n&&(t||s>=120&&d.length>=120)?new jn(a&&d):void 0}d=e[0];var h=-1,f=c[0];e:for(;++h=a)return c;var l=n[i];return c*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Ni(e,t,n){for(var i=-1,r=t.length,s={};++i-1;)a!==e&&We.call(a,c,1),We.call(e,c,1);return e}function qi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;as(r)?We.call(e,r,1):er(e,r)}}return e}function ji(e,t){return e+en(dn()*(t-e+1))}function Di(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Fi(e,t){return _s(gs(e,t,Ga),e+"")}function Ri(e){return Rn(Pa(e))}function Vi(e,t){var n=Pa(e);return xs(n,Yn(t,0,n.length))}function zi(e,t,n,i){if(!Uo(e))return e;for(var r=-1,s=(t=cr(t,e)).length,o=s-1,a=e;null!=a&&++rs?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r>>1,o=e[s];null!==o&&!Jo(o)&&(n?o<=t:o=200){var l=t?null:Dr(e);if(l)return Ut(l);o=!1,r=Tt,c=new jn}else c=t?[]:a;e:for(;++i=i?e:Zi(e,t,n)}var dr=kt||function(e){return Ge.clearTimeout(e)};function hr(e,t){if(t)return e.slice();var n=e.length,i=qe?qe(n):new e.constructor(n);return e.copy(i),i}function fr(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function pr(e,t){var n=t?fr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function gr(e,t){if(e!==t){var n=void 0!==e,i=null===e,r=e==e,s=Jo(e),o=void 0!==t,a=null===t,c=t==t,l=Jo(t);if(!a&&!l&&!s&&e>t||s&&o&&c&&!a&&!l||i&&o&&c||!n&&c||!r)return 1;if(!i&&!s&&!l&&e1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(r--,s):void 0,o&&cs(n[0],n[1],o)&&(s=r<3?void 0:s,r=1),t=pe(t);++i-1?r[s?t[o]:o]:void 0}}function Cr(e){return $r((function(t){var n=t.length,i=n,r=Bn.prototype.thru;for(e&&t.reverse();i--;){var o=t[i];if("function"!=typeof o)throw new me(s);if(r&&!a&&"wrapper"==Kr(o))var a=new Bn([],!0)}for(i=a?i:n;++i1&&b.reverse(),d&&la))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=2&n?new jn:void 0;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return at(a,(function(n){var i="_."+n[0];t&n[1]&&!dt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(J):[]}(i),n)))}function Ss(e){var t=0,n=0;return function(){var i=ln(),r=16-(i-n);if(n=i,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function xs(e,t){var n=-1,i=e.length,r=i-1;for(t=void 0===t?i:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ws(e,n)}));function to(e){var t=In(e);return t.__chain__=!0,t}function no(e,t){return t(e)}var io=$r((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,r=function(t){return Kn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Tn&&as(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:no,args:[r],thisArg:void 0}),new Bn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(r)}));var ro=wr((function(e,t,n){Se.call(e,n)?++e[n]:Wn(e,n,1)}));var so=Ar(Bs),oo=Ar(Ts);function ao(e,t){return(No(e)?at:ti)(e,Xr(t,3))}function co(e,t){return(No(e)?ct:ni)(e,Xr(t,3))}var lo=wr((function(e,t,n){Se.call(e,n)?e[n].push(t):Wn(e,n,[t])}));var uo=Fi((function(e,t,n){var r=-1,s="function"==typeof t,o=qo(e)?i(e.length):[];return ti(e,(function(e){o[++r]=s?st(t,e,n):bi(e,t,n)})),o})),ho=wr((function(e,t,n){Wn(e,n,t)}));function fo(e,t){return(No(e)?ft:Ci)(e,Xr(t,3))}var po=wr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var go=Fi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&cs(e,t[0],t[1])?t=[]:n>2&&cs(t[0],t[1],t[2])&&(t=[t[0]]),Ti(e,oi(t,1),[])})),vo=Xt||function(){return Ge.Date.now()};function mo(e,t,n){return t=n?void 0:t,Rr(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function yo(e,t){var n;if("function"!=typeof t)throw new me(s);return e=ra(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var bo=Fi((function(e,t,n){var i=1;if(n.length){var r=Ht(n,Yr(bo));i|=32}return Rr(e,i,t,n,r)})),wo=Fi((function(e,t,n){var i=3;if(n.length){var r=Ht(n,Yr(wo));i|=32}return Rr(t,i,e,n,r)}));function _o(e,t,n){var i,r,o,a,c,l,u=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new me(s);function p(t){var n=i,s=r;return i=r=void 0,u=t,a=e.apply(s,n)}function g(e){return u=e,c=ws(m,t),d?p(e):a}function v(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function m(){var e=vo();if(v(e))return y(e);c=ws(m,function(e){var n=t-(e-l);return h?cn(n,o-(e-u)):n}(e))}function y(e){return c=void 0,f&&i?p(e):(i=r=void 0,a)}function b(){var e=vo(),n=v(e);if(i=arguments,r=this,l=e,n){if(void 0===c)return g(l);if(h)return dr(c),c=ws(m,t),p(l)}return void 0===c&&(c=ws(m,t)),a}return t=oa(t)||0,Uo(n)&&(d=!!n.leading,o=(h="maxWait"in n)?an(oa(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==c&&dr(c),u=0,i=l=r=c=void 0},b.flush=function(){return void 0===c?a:y(vo())},b}var Eo=Fi((function(e,t){return Qn(e,1,t)})),So=Fi((function(e,t,n){return Qn(e,oa(t)||0,n)}));function xo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new me(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(xo.Cache||qn),n}function Lo(e){if("function"!=typeof e)throw new me(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}xo.Cache=qn;var ko=lr((function(e,t){var n=(t=1==t.length&&No(t[0])?ft(t[0],Ot(Xr())):ft(oi(t,1),Ot(Xr()))).length;return Fi((function(i){for(var r=-1,s=cn(i.length,n);++r=t})),To=wi(function(){return arguments}())?wi:function(e){return $o(e)&&Se.call(e,"callee")&&!Ze.call(e,"callee")},No=i.isArray,Mo=Qe?Ot(Qe):function(e){return $o(e)&&pi(e)==S};function qo(e){return null!=e&&Ho(e.length)&&!Vo(e)}function jo(e){return $o(e)&&qo(e)}var Do=nn||oc,Fo=et?Ot(et):function(e){return $o(e)&&pi(e)==d};function Ro(e){if(!$o(e))return!1;var t=pi(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Wo(e)}function Vo(e){if(!Uo(e))return!1;var t=pi(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function zo(e){return"number"==typeof e&&e==ra(e)}function Ho(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Uo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $o(e){return null!=e&&"object"==typeof e}var Zo=tt?Ot(tt):function(e){return $o(e)&&is(e)==g};function Go(e){return"number"==typeof e||$o(e)&&pi(e)==v}function Wo(e){if(!$o(e)||pi(e)!=m)return!1;var t=ze(e);if(null===t)return!0;var n=Se.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==Ae}var Ko=nt?Ot(nt):function(e){return $o(e)&&pi(e)==y};var Yo=it?Ot(it):function(e){return $o(e)&&is(e)==b};function Xo(e){return"string"==typeof e||!No(e)&&$o(e)&&pi(e)==w}function Jo(e){return"symbol"==typeof e||$o(e)&&pi(e)==_}var Qo=rt?Ot(rt):function(e){return $o(e)&&Ho(e.length)&&!!Re[pi(e)]};var ea=Mr(Ai),ta=Mr((function(e,t){return e<=t}));function na(e){if(!e)return[];if(qo(e))return Xo(e)?Gt(e):yr(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=is(e);return(t==g?Vt:t==b?Ut:Pa)(e)}function ia(e){return e?(e=oa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ra(e){var t=ia(e),n=t%1;return t==t?n?t-n:t:0}function sa(e){return e?Yn(ra(e),0,4294967295):0}function oa(e){if("number"==typeof e)return e;if(Jo(e))return NaN;if(Uo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Uo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pt(e);var n=se.test(e);return n||ae.test(e)?Ue(e.slice(2),n?2:8):re.test(e)?NaN:+e}function aa(e){return br(e,Ea(e))}function ca(e){return null==e?"":Ji(e)}var la=_r((function(e,t){if(hs(t)||qo(t))br(t,_a(t),e);else for(var n in t)Se.call(t,n)&&Un(e,n,t[n])})),ua=_r((function(e,t){br(t,Ea(t),e)})),da=_r((function(e,t,n,i){br(t,Ea(t),e,i)})),ha=_r((function(e,t,n,i){br(t,_a(t),e,i)})),fa=$r(Kn);var pa=Fi((function(e,t){e=pe(e);var n=-1,i=t.length,r=i>2?t[2]:void 0;for(r&&cs(t[0],t[1],r)&&(i=1);++n1),t})),br(e,Gr(e),n),i&&(n=Xn(n,7,Hr));for(var r=t.length;r--;)er(n,t[r]);return n}));var ka=$r((function(e,t){return null==e?{}:function(e,t){return Ni(e,t,(function(t,n){return ma(e,n)}))}(e,t)}));function Aa(e,t){if(null==e)return{};var n=ft(Gr(e),(function(e){return[e]}));return t=Xr(t),Ni(e,n,(function(e,n){return t(e,n[0])}))}var Ca=Fr(_a),Ia=Fr(Ea);function Pa(e){return null==e?[]:Bt(e,_a(e))}var Oa=Lr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ba(t):t)}));function Ba(e){return Ra(ca(e).toLowerCase())}function Ta(e){return(e=ca(e))&&e.replace(le,jt).replace(Te,"")}var Na=Lr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ma=Lr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qa=xr("toLowerCase");var ja=Lr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Da=Lr((function(e,t,n){return e+(n?" ":"")+Ra(t)}));var Fa=Lr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ra=xr("toUpperCase");function Va(e,t,n){return e=ca(e),void 0===(t=n?void 0:t)?function(e){return je.test(e)}(e)?function(e){return e.match(Me)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var za=Fi((function(e,t){try{return st(e,void 0,t)}catch(e){return Ro(e)?e:new K(e)}})),Ha=$r((function(e,t){return at(t,(function(t){t=ks(t),Wn(e,t,bo(e[t],e))})),e}));function Ua(e){return function(){return e}}var $a=Cr(),Za=Cr(!0);function Ga(e){return e}function Wa(e){return xi("function"==typeof e?e:Xn(e,1))}var Ka=Fi((function(e,t){return function(n){return bi(n,e,t)}})),Ya=Fi((function(e,t){return function(n){return bi(e,n,t)}}));function Xa(e,t,n){var i=_a(t),r=di(t,i);null!=n||Uo(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=di(t,_a(t)));var s=!(Uo(n)&&"chain"in n&&!n.chain),o=Vo(e);return at(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=yr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,pt([this.value()],arguments))})})),e}function Ja(){}var Qa=Br(ft),ec=Br(lt),tc=Br(mt);function nc(e){return ls(e)?Lt(ks(e)):function(e){return function(t){return hi(t,e)}}(e)}var ic=Nr(),rc=Nr(!0);function sc(){return[]}function oc(){return!1}var ac=Or((function(e,t){return e+t}),0),cc=jr("ceil"),lc=Or((function(e,t){return e/t}),1),uc=jr("floor");var dc,hc=Or((function(e,t){return e*t}),1),fc=jr("round"),pc=Or((function(e,t){return e-t}),0);return In.after=function(e,t){if("function"!=typeof t)throw new me(s);return e=ra(e),function(){if(--e<1)return t.apply(this,arguments)}},In.ary=mo,In.assign=la,In.assignIn=ua,In.assignInWith=da,In.assignWith=ha,In.at=fa,In.before=yo,In.bind=bo,In.bindAll=Ha,In.bindKey=wo,In.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return No(e)?e:[e]},In.chain=to,In.chunk=function(e,t,n){t=(n?cs(e,t,n):void 0===t)?1:an(ra(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var s=0,o=0,a=i(Qt(r/t));sr?0:r+n),(i=void 0===i||i>r?r:ra(i))<0&&(i+=r),i=n>i?0:sa(i);n>>0)?(e=ca(e))&&("string"==typeof t||null!=t&&!Ko(t))&&!(t=Ji(t))&&Rt(e)?ur(Gt(e),0,n):e.split(t,n):[]},In.spread=function(e,t){if("function"!=typeof e)throw new me(s);return t=null==t?0:an(ra(t),0),Fi((function(n){var i=n[t],r=ur(n,0,t);return i&&pt(r,i),st(e,this,r)}))},In.tail=function(e){var t=null==e?0:e.length;return t?Zi(e,1,t):[]},In.take=function(e,t,n){return e&&e.length?Zi(e,0,(t=n||void 0===t?1:ra(t))<0?0:t):[]},In.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Zi(e,(t=i-(t=n||void 0===t?1:ra(t)))<0?0:t,i):[]},In.takeRightWhile=function(e,t){return e&&e.length?nr(e,Xr(t,3),!1,!0):[]},In.takeWhile=function(e,t){return e&&e.length?nr(e,Xr(t,3)):[]},In.tap=function(e,t){return t(e),e},In.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new me(s);return Uo(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),_o(e,t,{leading:i,maxWait:t,trailing:r})},In.thru=no,In.toArray=na,In.toPairs=Ca,In.toPairsIn=Ia,In.toPath=function(e){return No(e)?ft(e,ks):Jo(e)?[e]:yr(Ls(ca(e)))},In.toPlainObject=aa,In.transform=function(e,t,n){var i=No(e),r=i||Do(e)||Qo(e);if(t=Xr(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:Uo(e)&&Vo(s)?Pn(ze(e)):{}}return(r?at:li)(e,(function(e,i,r){return t(n,e,i,r)})),n},In.unary=function(e){return mo(e,1)},In.union=Us,In.unionBy=$s,In.unionWith=Zs,In.uniq=function(e){return e&&e.length?Qi(e):[]},In.uniqBy=function(e,t){return e&&e.length?Qi(e,Xr(t,2)):[]},In.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qi(e,void 0,t):[]},In.unset=function(e,t){return null==e||er(e,t)},In.unzip=Gs,In.unzipWith=Ws,In.update=function(e,t,n){return null==e?e:tr(e,t,ar(n))},In.updateWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:tr(e,t,ar(n),i)},In.values=Pa,In.valuesIn=function(e){return null==e?[]:Bt(e,Ea(e))},In.without=Ks,In.words=Va,In.wrap=function(e,t){return Ao(ar(t),e)},In.xor=Ys,In.xorBy=Xs,In.xorWith=Js,In.zip=Qs,In.zipObject=function(e,t){return sr(e||[],t||[],Un)},In.zipObjectDeep=function(e,t){return sr(e||[],t||[],zi)},In.zipWith=eo,In.entries=Ca,In.entriesIn=Ia,In.extend=ua,In.extendWith=da,Xa(In,In),In.add=ac,In.attempt=za,In.camelCase=Oa,In.capitalize=Ba,In.ceil=cc,In.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==t&&(t=(t=oa(t))==t?t:0),Yn(oa(e),t,n)},In.clone=function(e){return Xn(e,4)},In.cloneDeep=function(e){return Xn(e,5)},In.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},In.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},In.conformsTo=function(e,t){return null==t||Jn(e,t,_a(t))},In.deburr=Ta,In.defaultTo=function(e,t){return null==e||e!=e?t:e},In.divide=lc,In.endsWith=function(e,t,n){e=ca(e),t=Ji(t);var i=e.length,r=n=void 0===n?i:Yn(ra(n),0,i);return(n-=t.length)>=0&&e.slice(n,r)==t},In.eq=Po,In.escape=function(e){return(e=ca(e))&&F.test(e)?e.replace(j,Dt):e},In.escapeRegExp=function(e){return(e=ca(e))&&G.test(e)?e.replace(Z,"\\$&"):e},In.every=function(e,t,n){var i=No(e)?lt:ii;return n&&cs(e,t,n)&&(t=void 0),i(e,Xr(t,3))},In.find=so,In.findIndex=Bs,In.findKey=function(e,t){return bt(e,Xr(t,3),li)},In.findLast=oo,In.findLastIndex=Ts,In.findLastKey=function(e,t){return bt(e,Xr(t,3),ui)},In.floor=uc,In.forEach=ao,In.forEachRight=co,In.forIn=function(e,t){return null==e?e:ai(e,Xr(t,3),Ea)},In.forInRight=function(e,t){return null==e?e:ci(e,Xr(t,3),Ea)},In.forOwn=function(e,t){return e&&li(e,Xr(t,3))},In.forOwnRight=function(e,t){return e&&ui(e,Xr(t,3))},In.get=va,In.gt=Oo,In.gte=Bo,In.has=function(e,t){return null!=e&&rs(e,t,vi)},In.hasIn=ma,In.head=Ms,In.identity=Ga,In.includes=function(e,t,n,i){e=qo(e)?e:Pa(e),n=n&&!i?ra(n):0;var r=e.length;return n<0&&(n=an(r+n,0)),Xo(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&_t(e,t,n)>-1},In.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ra(n);return r<0&&(r=an(i+r,0)),_t(e,t,r)},In.inRange=function(e,t,n){return t=ia(t),void 0===n?(n=t,t=0):n=ia(n),function(e,t,n){return e>=cn(t,n)&&e=-9007199254740991&&e<=9007199254740991},In.isSet=Yo,In.isString=Xo,In.isSymbol=Jo,In.isTypedArray=Qo,In.isUndefined=function(e){return void 0===e},In.isWeakMap=function(e){return $o(e)&&is(e)==E},In.isWeakSet=function(e){return $o(e)&&"[object WeakSet]"==pi(e)},In.join=function(e,t){return null==e?"":sn.call(e,t)},In.kebabCase=Na,In.last=Fs,In.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=i;return void 0!==n&&(r=(r=ra(n))<0?an(i+r,0):cn(r,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,r):wt(e,St,r,!0)},In.lowerCase=Ma,In.lowerFirst=qa,In.lt=ea,In.lte=ta,In.max=function(e){return e&&e.length?ri(e,Ga,gi):void 0},In.maxBy=function(e,t){return e&&e.length?ri(e,Xr(t,2),gi):void 0},In.mean=function(e){return xt(e,Ga)},In.meanBy=function(e,t){return xt(e,Xr(t,2))},In.min=function(e){return e&&e.length?ri(e,Ga,Ai):void 0},In.minBy=function(e,t){return e&&e.length?ri(e,Xr(t,2),Ai):void 0},In.stubArray=sc,In.stubFalse=oc,In.stubObject=function(){return{}},In.stubString=function(){return""},In.stubTrue=function(){return!0},In.multiply=hc,In.nth=function(e,t){return e&&e.length?Bi(e,ra(t)):void 0},In.noConflict=function(){return Ge._===this&&(Ge._=Ce),this},In.noop=Ja,In.now=vo,In.pad=function(e,t,n){e=ca(e);var i=(t=ra(t))?Zt(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Tr(en(r),n)+e+Tr(Qt(r),n)},In.padEnd=function(e,t,n){e=ca(e);var i=(t=ra(t))?Zt(e):0;return t&&it){var i=e;e=t,t=i}if(n||e%1||t%1){var r=dn();return cn(e+r*(t-e+He("1e-"+((r+"").length-1))),t)}return ji(e,t)},In.reduce=function(e,t,n){var i=No(e)?gt:At,r=arguments.length<3;return i(e,Xr(t,4),n,r,ti)},In.reduceRight=function(e,t,n){var i=No(e)?vt:At,r=arguments.length<3;return i(e,Xr(t,4),n,r,ni)},In.repeat=function(e,t,n){return t=(n?cs(e,t,n):void 0===t)?1:ra(t),Di(ca(e),t)},In.replace=function(){var e=arguments,t=ca(e[0]);return e.length<3?t:t.replace(e[1],e[2])},In.result=function(e,t,n){var i=-1,r=(t=cr(t,e)).length;for(r||(r=1,e=void 0);++i9007199254740991)return[];var n=4294967295,i=cn(e,4294967295);e-=4294967295;for(var r=It(i,t=Xr(t));++n=s)return e;var a=n-Zt(i);if(a<1)return i;var c=o?ur(o,0,a).join(""):e.slice(0,a);if(void 0===r)return c+i;if(o&&(a+=c.length-a),Ko(r)){if(e.slice(a).search(r)){var l,u=c;for(r.global||(r=ge(r.source,ca(ie.exec(r))+"g")),r.lastIndex=0;l=r.exec(u);)var d=l.index;c=c.slice(0,void 0===d?a:d)}}else if(e.indexOf(Ji(r),a)!=a){var h=c.lastIndexOf(r);h>-1&&(c=c.slice(0,h))}return c+i},In.unescape=function(e){return(e=ca(e))&&D.test(e)?e.replace(q,Kt):e},In.uniqueId=function(e){var t=++xe;return ca(e)+t},In.upperCase=Fa,In.upperFirst=Ra,In.each=ao,In.eachRight=co,In.first=Ms,Xa(In,(dc={},li(In,(function(e,t){Se.call(In.prototype,t)||(dc[t]=e)})),dc),{chain:!1}),In.VERSION="4.17.21",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){In[e].placeholder=In})),at(["drop","take"],(function(e,t){Tn.prototype[e]=function(n){n=void 0===n?1:an(ra(n),0);var i=this.__filtered__&&!t?new Tn(this):this.clone();return i.__filtered__?i.__takeCount__=cn(n,i.__takeCount__):i.__views__.push({size:cn(n,4294967295),type:e+(i.__dir__<0?"Right":"")}),i},Tn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Tn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xr(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Tn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Tn.prototype[e]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Ga)},Tn.prototype.find=function(e){return this.filter(e).head()},Tn.prototype.findLast=function(e){return this.reverse().find(e)},Tn.prototype.invokeMap=Fi((function(e,t){return"function"==typeof e?new Tn(this):this.map((function(n){return bi(n,e,t)}))})),Tn.prototype.reject=function(e){return this.filter(Lo(Xr(e)))},Tn.prototype.slice=function(e,t){e=ra(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Tn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ra(t))<0?n.dropRight(-t):n.take(t-e)),n)},Tn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},li(Tn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),r=In[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);r&&(In.prototype[t]=function(){var t=this.__wrapped__,o=i?[1]:arguments,a=t instanceof Tn,c=o[0],l=a||No(t),u=function(e){var t=r.apply(In,pt([e],o));return i&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(a=l=!1);var d=this.__chain__,h=!!this.__actions__.length,f=s&&!d,p=a&&!h;if(!s&&l){t=p?t:new Tn(this);var g=e.apply(t,o);return g.__actions__.push({func:no,args:[u],thisArg:void 0}),new Bn(g,d)}return f&&p?e.apply(this,o):(g=this.thru(u),f?i?g.value()[0]:g.value():g)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);In.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(No(r)?r:[],e)}return this[n]((function(n){return t.apply(No(n)?n:[],e)}))}})),li(Tn.prototype,(function(e,t){var n=In[t];if(n){var i=n.name+"";Se.call(wn,i)||(wn[i]=[]),wn[i].push({name:t,func:n})}})),wn[Ir(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var e=new Tn(this.__wrapped__);return e.__actions__=yr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yr(this.__views__),e},Tn.prototype.reverse=function(){if(this.__filtered__){var e=new Tn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Tn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=No(e),i=t<0,r=n?e.length:0,s=function(e,t,n){var i=-1,r=n.length;for(;++i=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},In.prototype.plant=function(e){for(var t,n=this;n instanceof On;){var i=Cs(n);i.__index__=0,i.__values__=void 0,t?r.__wrapped__=i:t=i;var r=i;n=n.__wrapped__}return r.__wrapped__=e,t},In.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Tn){var t=e;return this.__actions__.length&&(t=new Tn(this)),(t=t.reverse()).__actions__.push({func:no,args:[Hs],thisArg:void 0}),new Bn(t,this.__chain__)}return this.thru(Hs)},In.prototype.toJSON=In.prototype.valueOf=In.prototype.value=function(){return ir(this.__wrapped__,this.__actions__)},In.prototype.first=In.prototype.head,Xe&&(In.prototype[Xe]=function(){return this}),In}();Ge._=Yt,void 0===(r=function(){return Yt}.call(t,n,t,i))||(i.exports=r)}).call(this)}).call(this,n(9),n(48)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadAreaHTML=void 0,t.uploadAreaHTML='
\n\n
\n
\n
Upload Files
\n
\n
\n \n
\n
\n\n
Unpaired Documents
\n\n
\n\n
\n
MEI
\n
\n
\n\n
\n
Images
\n
\n
\n\n
\n\n
\n
Make Pair
\n
\n
\n\n
\n\n
Paired Folios
\n \n
\n\n
\n
\n Upload\n
\n
\n
\n\n
\n\n \x3c!--\n
\n

Manuscripts

\n
\n
\n --\x3e\n\n
\n
'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupingNotRecognized=void 0,t.groupingNotRecognized=function(){window.confirm("Neon does not recognize this neume grouping. Would you like to create a compound neume?")||document.getElementById("undo").click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitStaffHandler=void 0;const i=n(4),r=n(3),s=n(18),o=n(12);t.SplitStaffHandler=class{constructor(e,t){this.handler=(e=>{const t=this.staff.id,n=(0,o.getSVGRelCoords)(e.clientX,e.clientY),a={action:"split",param:{elementId:t,x:n.x}};this.neonView.edit(a,this.neonView.view.getCurrentPageURI()).then(async e=>{e&&(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success"));const n=new s.default(this.neonView,".staff");this.splitDisable(),(0,r.selectAll)([document.querySelector("#"+t)],this.neonView,n);const o=document.getElementById("moreEdit");o&&(o.innerHTML="",o.parentElement.classList.add("hidden"))})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.staff=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click Where to Split")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitNeumeHandler=void 0;const i=n(4);t.SplitNeumeHandler=class{constructor(e,t){this.handler=(e=>{const t={action:"splitNeume",param:{elementId:this.neume.id,ncId:e.target.parentElement.id}};this.neonView.edit(t,this.neonView.view.getCurrentPageURI()).then(async e=>{e?(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success")):(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action failed","error")),this.splitDisable()})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.neume=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click The Beginning of The Second Neume")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t){},function(e,t,n){"use strict";(function(e){t.test=function(){return"function"==typeof e.queueMicrotask},t.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){var n=e.MutationObserver||e.WebKitMutationObserver;t.test=function(){return n},t.install=function(t){var i=0,r=new n(t),s=e.document.createTextNode("");return r.observe(s,{characterData:!0}),function(){s.data=i=++i%2}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},t.install=function(t){var n=new e.MessageChannel;return n.port1.onmessage=t,function(){n.port2.postMessage(0)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},t.install=function(t){return function(){var n=e.document.createElement("script");return n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n),t}}}).call(this,n(9))},function(e,t,n){"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},function(e,t,n){"use strict";var i=n(71),r=n(72);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){r.isString(e)&&(e=b(e));return e instanceof s?e.format():s.prototype.format.call(e)},t.Url=s;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(73);function b(e,t,n){if(e&&r.isObject(e)&&e instanceof s)return e;var i=new s;return i.parse(e,t,n),i}s.prototype.parse=function(e,t,n){if(!r.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var s=e.indexOf("?"),a=-1!==s&&s127?T+="x":T+=B[N];if(!T.match(f)){var q=P.slice(0,A),j=P.slice(A+1),D=B.match(p);D&&(q.push(D[1]),j.unshift(D[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=q.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",R=this.hostname||"";this.host=R+F,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[E])for(A=0,O=u.length;A0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=e.search,n.query=e.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var L=S.slice(-1)[0],k=(n.host||e.host||S.length>1)&&("."===L||".."===L)||""===L,A=0,C=S.length;C>=0;C--)"."===(L=S[C])?S.splice(C,1):".."===L?(S.splice(C,1),A++):A&&(S.splice(C,1),A--);if(!_&&!E)for(;A--;A)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),k&&"/"!==S.join("/").substr(-1)&&S.push("");var I,P=""===S[0]||S[0]&&"/"===S[0].charAt(0);x&&(n.hostname=n.host=P?"":S.length?S.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(_=_||n.host&&S.length)&&!P&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},s.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";var i=n(43),r=n(19);function s(e,t){this.id=e,this.ref=t}e.exports.SchemaScanResult=s,e.exports.scan=function(e,t){function n(e,t){if(t&&"object"==typeof t)if(t.$ref){var s=i.resolve(e,t.$ref);l[s]=l[s]?l[s]+1:0}else{var u=t.$id||t.id,d=u?i.resolve(e,u):e;if(d){if(d.indexOf("#")<0&&(d+="#"),c[d]){if(!r.deepCompareStrict(c[d],t))throw new Error("Schema <"+d+"> already exists with different definition");return c[d]}c[d]=t,"#"==d[d.length-1]&&(c[d.substring(0,d.length-1)]=t)}o(d+"/items",Array.isArray(t.items)?t.items:[t.items]),o(d+"/extends",Array.isArray(t.extends)?t.extends:[t.extends]),n(d+"/additionalItems",t.additionalItems),a(d+"/properties",t.properties),n(d+"/additionalProperties",t.additionalProperties),a(d+"/definitions",t.definitions),a(d+"/patternProperties",t.patternProperties),a(d+"/dependencies",t.dependencies),o(d+"/disallow",t.disallow),o(d+"/allOf",t.allOf),o(d+"/anyOf",t.anyOf),o(d+"/oneOf",t.oneOf),n(d+"/not",t.not)}}function o(e,t){if(Array.isArray(t))for(var i=0;it.length?t.length:e.length);i++)n.push([e[i],t[i]]);return n},t.convertStaffToSb=function(e){const t=new DOMParser,n=new XMLSerializer,i=t.parseFromString(e,"text/xml"),s=i.documentElement;for(const e of s.getElementsByTagName("section")){const t=i.createElementNS("http://www.music-encoding.org/ns/mei","staff"),n=i.createElementNS("http://www.music-encoding.org/ns/mei","layer");t.setAttribute("n","1"),n.setAttribute("n","1"),t.appendChild(n);const r=Array.from(e.getElementsByTagName("staff"));for(const e of r){const t=e.getElementsByTagName("layer")[0],r=i.createElementNS("http://www.music-encoding.org/ns/mei","sb");r.setAttribute("n",e.getAttribute("n")),r.setAttribute("facs",e.getAttribute("facs")),r.setAttribute("xml:id",e.getAttribute("xml:id"));let s=void 0;for(null!==n.lastElementChild&&"custos"===n.lastElementChild.tagName&&(s=n.removeChild(n.lastElementChild)),void 0!==s&&n.appendChild(s),n.appendChild(r);null!==t.firstElementChild;)n.appendChild(t.firstElementChild);e.remove()}e.appendChild(t)}return r.xml(n.serializeToString(i))},t.getSyllableText=a,t.convertSbToStaff=function(e){const t=(new DOMParser).parseFromString(e,"text/xml"),n=t.documentElement,c=Array.from(n.getElementsByTagName("neume"));for(const e of c)if(0===e.getElementsByTagName("nc").length){const t=e.getAttribute("xml:id");s.queueNotification("This file contains a neume without neume component!
ID: "+t,"warning")}const l=Array.from(n.getElementsByTagName("syllable"));for(const e of l)if(0===e.getElementsByTagName("neume").length){const t=e.getAttribute("xml:id");s.queueNotification("This file contains a syllable without neume!
ID: "+t,"warning")}for(const e of n.getElementsByTagName("section")){const n=Array.from(e.getElementsByTagName("staff"));for(const r of n){const n=r.getElementsByTagName("layer")[0],s=Array.from(n.getElementsByTagName("sb"));for(const e of s)if("layer"!==e.parentElement.tagName){const n=e.parentElement;let r=!1,s=!1;const o=Array.from(n.children),a=o.indexOf(e);for(const e of n.getElementsByTagName("neume")){const t=o.indexOf(e);ta&&(s=!0)}if(!r&&s)n.insertAdjacentElement("beforebegin",e);else if(r&&!s)n.insertAdjacentElement("afterend",e);else if(r&&s){const r=t.createElementNS("http://www.music-encoding.org/ns/mei","syllable");r.setAttribute("xml:id","m-"+(0,i.uuidv4)()),r.setAttribute("follows","#"+n.getAttribute("xml:id")),n.setAttribute("precedes","#"+r.getAttribute("xml:id"));const s=o.indexOf(e);for(const e of o){o.indexOf(e)>s&&r.appendChild(e)}n.insertAdjacentElement("afterend",e),e.insertAdjacentElement("afterend",r);for(const e of n.getElementsByTagName("custos"))n.insertAdjacentElement("afterend",e);for(const e of r.getElementsByTagName("clef"))r.insertAdjacentElement("beforebegin",e)}else console.warn("NONE BEHIND NONE AHEAD"),console.debug(n)}const a=Array.from(n.getElementsByTagName("sb"));for(let s=0;ss+1?a[s+1]:void 0,u=t.createElementNS("http://www.music-encoding.org/ns/mei","staff");o(c,u);const d=t.createElementNS("http://www.music-encoding.org/ns/mei","layer");d.setAttribute("n","1"),d.setAttribute("xml:id","m-"+(0,i.uuidv4)()),u.appendChild(d);const h=Array.from(n.children),f=h.slice(h.indexOf(c)+1,h.indexOf(l));for(const e of f)d.appendChild(e);e.insertBefore(u,r)}r.remove()}}const u=Array.from(n.getElementsByTagName("syllable"));for(const e of n.querySelectorAll("syllable")){for(const t of e.querySelectorAll("clef"))e.insertAdjacentElement("beforebegin",t);for(const t of e.querySelectorAll("custos"))e.insertAdjacentElement("afterend",t);const t=u.indexOf(e);if(e.hasAttribute("precedes")&&e.hasAttribute("follows")){const t=e.getAttribute("xml:id");s.queueNotification("This file contains a syllable that has both @precedes and @follows!
ID: "+t,"error")}else if(e.hasAttribute("precedes")){const n=e.getAttribute("precedes").replace("#","");let i;const r=u.find((e,t)=>e.getAttribute("xml:id")===n&&(i=t,!0));if(!r){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`Missing the 2nd part of the toggle-linked syllable (${t})
ID: ${n}`,"error");continue}if(!r.hasAttribute("follows")){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`The 2nd part of the toggle-linked syllable (${t}) does not link to any syllable
ID: ${n}`,"error");continue}if(r.getAttribute("follows")!="#"+e.getAttribute("xml:id")){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`The 2nd part of the toggle-linked syllable (${t}) links to the wrong syllable
ID: ${n}`,"error");continue}if(i!==t+1){const n=[a(e),...u.slice(t+1,i).map(e=>a(e))].join(" - "),r=e.getAttribute("xml:id");s.queueNotification(`Unexpected syllable(s) inside toggle-linked syllable: ${n}
ID: ${r}`,"error")}}else if(e.hasAttribute("follows")){const t=e.getAttribute("follows").replace("#",""),n=u.find(e=>e.getAttribute("xml:id")===t);if(!n){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`Missing the 1st part of the toggle-linked syllable (${t})
ID: ${n}`,"error");continue}if(!n.hasAttribute("precedes")){const t=a(n),i=e.getAttribute("xml:id");s.queueNotification(`The 1st part of the toggle-linked syllable (${t}) does not link to any syllable
ID: ${i}`,"error");continue}if(n.getAttribute("precedes")!="#"+e.getAttribute("xml:id")){const t=a(n),i=e.getAttribute("xml:id");s.queueNotification(`The 1st part of the toggle-linked syllable (${t}) links to the wrong syllable
ID: ${i}`,"error")}}}const d=new XMLSerializer;return r.xml(d.serializeToString(t))},t.checkOutOfBoundsGlyphs=function(e){const t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=Array.from(t.querySelectorAll("zone")),i=t.querySelector("surface"),r=Number(i.getAttribute("lrx")),o=Number(i.getAttribute("lry"));n.some(e=>["ulx","uly","lrx","lry"].some(t=>function(e,t){const n=Number(e.getAttribute(t));return n<0||n>("lrx"==t||"ulx"==t?r:o)}(e,t)))&&s.queueNotification("This folio contains glyph(s) placed out-of-bounds!","warning")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blankPage=t.sendForValidation=t.init=void 0;const i=n(17),r=fetch("/Neon/Neon-gh/assets/mei-all.rng");let s,o,a;function c(e){const t=e.data;if(null===t){a.textContent="VALID",a.style.color="#4bc14b";for(const e of a.children)e.remove()}else{let e="";t.forEach(t=>{e+=t+"\n"}),a.textContent="",a.style.color="red";const n=document.createElement("div");n.textContent="INVALID",n.style.cursor="pointer",a.appendChild(n),n.addEventListener("click",l.bind(this,e))}}function l(e){this.modal.setModalWindowView(i.ModalWindowView.VALIDATION_STATUS,e),this.modal.openModalWindow()}t.init=async function(e){const t=document.getElementById("file-status");if(null!==t){const n=document.createElement("div");n.textContent="MEI Status:",n.id="validation_status_title";const i=document.createElement("span");i.id="validation_status",i.textContent="unknown",t.appendChild(n),t.appendChild(i),a=document.getElementById("validation_status"),s=new Worker("/Neon/Neon-gh/workers/Worker.js"),s.onmessage=c.bind(e)}},t.sendForValidation=async function(e){if(void 0!==a){if(void 0===o){const e=await r;o=await e.text()}a.textContent="checking...",a.style.color="gray",s.postMessage({mei:e,schema:o})}},t.blankPage=function(){for(const e of a.children)e.remove();a.textContent="No MEI",a.style.color="color:gray"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenUnsavedChanges=t.setSavedStatus=void 0;let i=!0;t.setSavedStatus=function(e=!1){i=e,function(){const e=document.querySelector("#file-saved"),t=i?"/Neon/Neon-gh/assets/img/saved-icon.svg":"/Neon/Neon-gh/assets/img/unsaved-icon.svg";e.setAttribute("src",t)}()},t.listenUnsavedChanges=function(){window.onbeforeunload=e=>{if(!i)return e.preventDefault(),"You have unsaved changes!"}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(i){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))}),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(82)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(30))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSelectionButtons=t.initInsertEditControls=t.bindInsertTabs=void 0;const i=n(7),r=n(15),s=n(3),o=n(6);function a(e,t){document.getElementById(e).classList.add("is-active"),document.getElementById(e).classList.contains("insertel")&&t.insertActive(e)}function c(e){document.querySelectorAll(e).forEach(e=>{e.classList.remove("is-active"),e.classList.remove("unfocused")})}t.bindInsertTabs=function(e){const t=Array.from(document.getElementsByClassName("insertTab")).map(e=>e.id);document.body.addEventListener("keydown",e=>{if(e.code.match(/^Digit\d$/)&&e.shiftKey)try{const t=Number(e.code[e.code.length-1])-1,n=document.getElementsByClassName("insertel");n[t].click()}catch(e){console.debug(e)}}),t.forEach(t=>{document.getElementById(t).addEventListener("click",()=>{c(".insertTab"),a(t,e),document.getElementById("insert_data").innerHTML=i.insertTabHtml[t],function(e){const t=Array.from(document.getElementsByClassName("insertel"));t.map(e=>e.id).forEach(t=>{document.getElementById(t).addEventListener("click",()=>{c(".insertel"),a(t,e)})})}(e),c(".insertel");a(document.getElementsByClassName("insertel")[0].id,e)})})},t.initInsertEditControls=function(){const e=document.getElementById("insert_controls"),t=document.getElementById("insertMenu"),n=t.querySelector(".panel-heading-title"),i=document.getElementById("insertContents"),r=t.querySelector("svg > use"),s=document.getElementById("edit_controls"),o=document.getElementById("editMenu"),a=o.querySelector(".panel-heading-title"),c=document.getElementById("editContents"),l=o.querySelector("svg > use");e.addEventListener("click",()=>{a.classList.remove("focused"),n.classList.add("focused"),document.querySelector(".insertel.is-active").click(),s.querySelector(".side-panel-btn.sel-by.is-active").classList.add("unfocused"),e.querySelector(".side-panel-btn.insertel.is-active").classList.remove("unfocused")}),s.addEventListener("click",()=>{n.classList.remove("focused"),a.classList.add("focused"),e.querySelector(".side-panel-btn.insertel.is-active").classList.add("unfocused"),s.querySelector(".side-panel-btn.sel-by.is-active").classList.remove("unfocused")}),t.addEventListener("click",e=>{e.stopPropagation(),i.classList.contains("closed")?(i.classList.remove("closed"),i.style.padding="0.5em 0.75em",setTimeout(()=>{i.style.overflow="visible"},200),r.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(i.classList.add("closed"),i.style.overflow="hidden",setTimeout(()=>{i.style.padding="0px"},200),r.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))}),o.addEventListener("click",e=>{e.stopPropagation(),c.classList.contains("closed")?(c.classList.remove("closed"),c.style.padding="0.5em 0.75em",setTimeout(()=>{c.style.overflow="visible"},200),l.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(c.classList.add("closed"),c.style.overflow="hidden",setTimeout(()=>{c.style.padding="0px"},200),l.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))})},t.initSelectionButtons=function(){const e=document.getElementById("selBySyllable"),t=document.getElementById("selByNeume"),n=document.getElementById("selByNc"),i=document.getElementById("selByStaff"),a=document.getElementById("selByLayerElement");e.addEventListener("click",(function(){if(!e.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selBySyllable"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),e.classList.add("is-active"),t.classList.remove("is-active"),n.classList.remove("is-active"),i.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("syllable")}catch(e){}}})),t.addEventListener("click",(function(){if(!t.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByNeume"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),t.classList.add("is-active"),n.classList.remove("is-active"),e.classList.remove("is-active"),i.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("neume")}catch(e){}}})),n.addEventListener("click",(function(){if(!n.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByNc"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),n.classList.add("is-active"),t.classList.remove("is-active"),e.classList.remove("is-active"),i.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("neume")}catch(e){}}})),i.addEventListener("click",(function(){if(!i.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByStaff"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),i.classList.add("is-active"),t.classList.remove("is-active"),n.classList.remove("is-active"),e.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("staff")}catch(e){}}})),a.addEventListener("click",(function(){if(!a.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByLayerElement"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),a.classList.add("is-active"),t.classList.remove("is-active"),n.classList.remove("is-active"),i.classList.remove("is-active"),e.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("layerElement")}catch(e){}}})),document.body.addEventListener("keydown",r=>{"1"===r.key&&e.click(),"2"===r.key&&t.click(),"3"===r.key&&n.click(),"4"===r.key&&i.click(),"5"===r.key&&a.click()})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(8),r=n(12),s=n(4);t.default=class{constructor(e,t){this.firstClick=!0,this.insertDisabled=function(){this.type="",this.removeInsertClickHandlers(),document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetInsertHandler),document.body.removeEventListener("click",this.clickawayHandler),this.firstClick=!0;try{document.getElementById("returnToEditMode").remove()}catch(e){}const e=document.getElementById("insert_controls"),t=document.getElementById("insertMenu").querySelector(".panel-heading-title"),n=document.getElementById("edit_controls"),i=document.getElementById("editMenu").querySelector(".panel-heading-title");t.classList.remove("focused"),i.classList.add("focused"),e.querySelector(".side-panel-btn.insertel.is-active").classList.add("unfocused"),n.querySelector(".side-panel-btn.sel-by.is-active").classList.remove("unfocused")}.bind(this),this.clickawayHandler=function(e){const t=e.target;null===t.closest(".active-page")&&null===t.closest("#insert_controls")&&null===t.closest("#svg_group")&&(this.insertDisabled(),document.body.removeEventListener("keydown",this.staffHandler),document.body.removeEventListener("keydown",this.handler))}.bind(this),this.resetInsertHandler=function(e){"Shift"===e.key&&document.querySelector(this.selector).addEventListener("click","staff"===this.type?this.staffHandler:this.handler)}.bind(this),this.keydownListener=function(e){"Escape"===e.key?(this.insertDisabled(),document.body.removeEventListener("keydown",this.staffHandler),document.body.removeEventListener("keydown",this.handler)):"Shift"===e.key&&this.removeInsertClickHandlers()}.bind(this),this.handler=function(e){e.stopPropagation();const t=(0,r.getSVGRelCoords)(e.clientX,e.clientY);if((0,r.isOutOfSVGBounds)(t.x,t.y))return(0,s.queueNotification)("[FAIL] Glyph was placed out of bounds! Insertion failed.","error");const n={action:"insert",param:{elementType:this.type,staffId:"auto",ulx:t.x,uly:t.y}};null!==this.attributes&&(n.param.attributes=this.attributes,"F"===this.attributes.shape&&(n.param.ulx-=50)),this.neonView.edit(n,this.neonView.view.getCurrentPageURI()).then(()=>this.neonView.updateForCurrentPage()).then(()=>{document.querySelector(this.selector).addEventListener("click",this.handler)})}.bind(this),this.staffHandler=function(e){const t=(0,r.getSVGRelCoords)(e.clientX,e.clientY);if((0,r.isOutOfSVGBounds)(t.x,t.y))return(0,s.queueNotification)("Staff cannot be placed out of bounds!","error");const n=document.querySelector(".active-page > .definition-scale");if(this.firstClick)this.coord=t,i.select(n).append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",10).attr("id","staff-circle").attr("fill","green"),this.firstClick=!1;else{let e,n;t.x{this.neonView.updateForCurrentPage(),this.firstClick=!0})}}.bind(this),this.removeInsertClickHandlers=function(){try{document.querySelector(this.selector).removeEventListener("click",this.staffHandler),document.querySelector(this.selector).removeEventListener("click",this.handler)}catch(e){}}.bind(this),this.neonView=e,this.selector=t}insertActive(e){const t=this.isInsertMode();switch(e){case"punctum":this.type="nc",this.attributes=null;break;case"diamond":this.type="nc",this.attributes={tilt:"se"};break;case"virga":this.type="nc",this.attributes={tilt:"s"};break;case"liquescentA":this.type="nc",this.attributes={curve:"a"};break;case"liquescentC":this.type="nc",this.attributes={curve:"c"};break;case"virgaReversed":this.type="nc",this.attributes={tilt:"n"};break;case"pes":case"clivis":case"scandicus":case"climacus":case"torculus":case"porrectus":case"pressus":const t=this.neonView.info.getContourByValue(e.charAt(0).toUpperCase()+e.slice(1));this.type="grouping",this.attributes={contour:t};break;case"cClef":case"fClef":this.type="clef",this.attributes={shape:e.charAt(0).toUpperCase()};break;case"custos":this.type="custos",this.attributes=null;break;case"divLineMaxima":this.type="divLine",this.attributes={form:"maxima"};break;case"staff":this.type="staff",this.attributes=null;break;case"flat":this.type="accid",this.attributes={accid:"f"};break;case"natural":this.type="accid",this.attributes={accid:"n"};break;default:return this.type="",this.attributes=null,void console.error("Invalid button for insertion: "+e+".")}this.removeInsertClickHandlers();try{"staff"===this.type?document.querySelector(this.selector).addEventListener("click",this.staffHandler):document.querySelector(this.selector).addEventListener("click",this.handler)}catch(e){}if(document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetInsertHandler),!t){const e=document.createElement("button");e.id="returnToEditMode",e.classList.add("side-panel-btn"),e.innerHTML="Return to Edit Mode",document.getElementById("redo").parentNode.appendChild(e),e.addEventListener("click",this.insertDisabled)}document.getElementById("editContents").addEventListener("click",this.clickawayHandler)}isInsertMode(){return""!==this.type}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.undoRedoPanel=t.navbarFinalize=t.navbarDropdownMEIActionsMenu=t.navbarDropdownFileMenu=void 0,t.navbarDropdownFileMenu=document.createElement("div"),t.navbarDropdownFileMenu.classList.add("navbar-item","has-dropdown","is-hoverable");const i=document.createElement("div");i.classList.add("navbar-btn"),i.innerHTML="
File
";const r=document.createElement("div");r.classList.add("navbar-dropdown"),r.id="navbar-dropdown-options";[["save","Save"],["export","Save and Export to File"],["getmei","Download MEI"]].forEach(e=>{const t=document.createElement("div");t.id=e[0],t.classList.add("navbar-dropdown-item"),t.textContent=e[1],r.appendChild(t)}),t.navbarDropdownFileMenu.appendChild(i),t.navbarDropdownFileMenu.appendChild(r),t.navbarDropdownMEIActionsMenu=document.createElement("div"),t.navbarDropdownMEIActionsMenu.classList.add("navbar-item","has-dropdown","is-hoverable");const s=document.createElement("div");s.classList.add("navbar-btn"),s.innerHTML="
MEI Actions
";const o=document.createElement("div");o.classList.add("navbar-dropdown"),o.id="navbar-dropdown-options";[["remove-empty-syls","Remove Empty Syllables"],["remove-empty-neumes","Remove Empty Neumes"],["revert","Revert"]].forEach(e=>{const t=document.createElement("div");t.id=e[0],t.classList.add("navbar-dropdown-item"),t.textContent=e[1],o.appendChild(t)}),t.navbarDropdownMEIActionsMenu.appendChild(s),t.navbarDropdownMEIActionsMenu.appendChild(o),t.navbarFinalize=' Finalize MEI ',t.undoRedoPanel='\n '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initUndoRedoPanel=t.initNavbar=void 0;const i=n(4),r=n(45);t.initNavbar=function(e){const t=document.querySelectorAll(".navbar-item.has-dropdown.is-hoverable");Array.from(t).forEach(e=>{e.addEventListener("mouseover",()=>{})}),document.getElementById("save").addEventListener("click",()=>{e.save().then(()=>{i.queueNotification("Saved","success")})}),document.body.addEventListener("keydown",t=>{"s"===t.key&&e.save().then(()=>{i.queueNotification("Saved","success")})}),document.getElementById("export").addEventListener("click",()=>{e.export().then(t=>{const n=document.createElement("a");n.href=t,n.download=e.name+".jsonld",document.body.appendChild(n),n.click(),n.remove(),i.queueNotification("Saved","success")})}),document.getElementById("getmei").addEventListener("click",()=>{const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(t=>{const n="data:application/mei+xml;base64,"+window.btoa((0,r.convertStaffToSb)(t));document.getElementById("getmei").setAttribute("href",n),document.getElementById("getmei").setAttribute("download",e.view.getPageName()+".mei")})}),document.getElementById("remove-empty-syls").addEventListener("click",(function(){const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(n=>{const r=(new DOMParser).parseFromString(n,"text/xml").documentElement,s=Array.from(r.getElementsByTagName("syllable"));let o=!1;const a=[];for(const e of s)if(0===e.getElementsByTagName("neume").length){const t={action:"remove",param:{elementId:e.getAttribute("xml:id")}};a.push(t),o=!0}if(o){const n={action:"chain",param:a};e.edit(n,t).then(t=>{t?(e.updateForCurrentPage(),i.queueNotification("Removed empty Syllables","success")):i.queueNotification("Failed to remove empty Syllables","error")})}else i.queueNotification("No empty syllables found","warning")})})),document.getElementById("remove-empty-neumes").addEventListener("click",(function(){const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(n=>{const r=(new DOMParser).parseFromString(n,"text/xml").documentElement,s=Array.from(r.getElementsByTagName("neume"));let o=!1;const a=[];for(const e of s)if(0===e.getElementsByTagName("nc").length){const t={action:"remove",param:{elementId:e.getAttribute("xml:id")}};a.push(t),o=!0}if(o){const n={action:"chain",param:a};e.edit(n,t).then(t=>{t?(e.updateForCurrentPage(),i.queueNotification("Removed empty Neumes","success")):i.queueNotification("Failed to remove empty Neumes","error")})}else i.queueNotification("No empty Neumes found","warning")})})),document.getElementById("remove-out-of-bounds-glyphs").addEventListener("click",(function(){const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(n=>{const r=(new DOMParser).parseFromString(n,"text/xml").documentElement,s=r.querySelector("surface"),o=Number(s.getAttribute("lrx")),a=Number(s.getAttribute("lry"));const c=Array.from(r.querySelectorAll("zone")).filter(e=>["ulx","uly","lrx","lry"].some(t=>function(e,t){const n=Number(e.getAttribute(t));return n<0||n>("lrx"==t||"ulx"==t?o:a)}(e,t))),l=new Map(c.map(e=>[e.getAttribute("xml:id"),e])),u=Array.from(r.querySelectorAll("nc, divLine, clef, accid")).filter(e=>{if(e.hasAttribute("facs")){const t=e.getAttribute("facs").slice(1);return l.has(t)}return!1});if(0===u.length)return i.queueNotification("There are no out-of-bound glyphs to remove.","warning");const d={action:"chain",param:u.map(e=>({action:"remove",param:{elementId:e.getAttribute("xml:id")}}))};e.edit(d,t).then(t=>{t?(e.updateForCurrentPage(),i.queueNotification("Successfully removed out-of-bounds syllables.","success")):i.queueNotification("Failed to remove out-of-bound syllables.","error")})})})),document.getElementById("revert").addEventListener("click",(function(){window.confirm("Reverting will cause all changes to be lost. Press OK to continue.")&&e.deleteDb().then(()=>{window.location.reload()})}))},t.initUndoRedoPanel=function(e){function t(){e.undo().then(t=>{t?e.updateForCurrentPage():(i.queueNotification("There is nothing left to undo."),console.warn("Failed to undo action"))})}function n(){e.redo().then(t=>{t?e.updateForCurrentPage():(i.queueNotification("There is nothing left to redo."),console.warn("Failed to redo action"))})}document.getElementById("undo").addEventListener("click",t),document.body.addEventListener("keydown",e=>{"z"===e.key&&(e.ctrlKey||e.metaKey)&&t()}),document.getElementById("redo").addEventListener("click",n),document.body.addEventListener("keydown",e=>{("Z"===e.key||"z"===e.key&&e.shiftKey)&&(e.ctrlKey||e.metaKey)&&n()})}},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(62),r=n(78),s=n(79),o=n(84),a=n(86),c=n(87),l=n(88),u=n(89),d=n(28),h=n(29),f=g("manifest"),p=g("storage");if(f){const e=`./samples/manifests/${f}.jsonld`;window.fetch(e).then(e=>{if(e.ok)return e.text();throw new Error(e.statusText)}).then(async e=>{let t;try{t=JSON.parse(e)}catch(t){return console.error(t),void console.debug(e)}let n;n=(await new Promise((e,n)=>{window.fetch(t.image).then(t=>{e(t.headers.get("Content-Type"))}).catch(e=>{n(e)})})).match(/image\/*/)?{manifest:t,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:o.default,NeumeEdit:c.default}:{manifest:t,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:s.default,NeumeEdit:a.default};new i.default(n).start()})}else{new h.default("Neon-User-Storage").getAttachment(p,"manifest").then(e=>new window.Response(e).json()).then(async e=>{let t;t=(await new Promise((t,n)=>{window.fetch(e.image).then(e=>{t(e.headers.get("Content-Type"))}).catch(e=>{n(e)})})).match(/image\/*/)?{manifest:e,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:o.default,NeumeEdit:c.default}:{manifest:e,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:s.default,NeumeEdit:a.default};new i.default(t).start()})}function g(e){let t;return window.location.search.substr(1).split("&").forEach(n=>{const i=n.split("=");i[0]===e&&(t=decodeURIComponent(i[1]))}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(63),r=n(46),s=n(66),o=n(77),a=n(17),c=n(27),l=n(47),u=n(6);t.default=class{constructor(e){(0,s.parseManifest)(e.manifest)||console.error("Unable to parse the manifest"),this.params=e,this.manifest=e.manifest}setupEdit(e){void 0!==e.NeumeEdit&&(this.NeumeEdit=new e.NeumeEdit(this)),void 0!==e.TextView&&(this.textView=new e.TextView(this),void 0!==e.TextEdit&&(this.TextEdit=new e.TextEdit(this)))}start(){(0,o.default)(this).then(()=>(this.localSettings=new u.default(this.manifest["@id"]),this.view=new this.params.View(this,this.params.Display,this.manifest.image),this.name=this.manifest.title,this.core=new i.default(this.manifest),this.info=new this.params.Info(this),this.modal=new a.ModalWindow(this),r.init(this),(0,c.initErrorLog)(),(0,l.listenUnsavedChanges)(),this.setupEdit(this.params),this.core.initDb())).then(()=>this.updateForCurrentPage(!0)).then(()=>{this.view.onSVGLoad()})}updateForCurrentPage(e=!1){const t=this.view.getCurrentPage();return this.view.changePage(t,e)}redo(){return(0,l.setSavedStatus)(!1),this.core.redo(this.view.getCurrentPageURI())}undo(){return(0,l.setSavedStatus)(!1),this.core.undo(this.view.getCurrentPageURI())}getUserMode(){return void 0!==this.NeumeEdit?this.NeumeEdit.getUserMode():void 0!==this.TextEdit?"edit":"viewer"}edit(e,t){return this.core.edit(e,t)}getElementAttr(e,t){return this.core.getElementAttr(e,t)}export(){return new Promise((e,t)=>{this.core.updateDatabase().then(()=>{this.manifest.mei_annotations=this.core.getAnnotations(),this.manifest.timestamp=(new Date).toISOString();const t=new window.Blob([JSON.stringify(this.manifest,null,2)],{type:"application/ld+json"}),n=new FileReader;n.addEventListener("load",()=>{e(n.result)}),n.readAsDataURL(t)}).catch(e=>{t(e)})})}save(){return(0,l.setSavedStatus)(!0),this.core.updateDatabase()}deleteDb(){return this.core.deleteDb()}getPageURI(e){return void 0===e&&(e=this.view.getCurrentPageURI()),new Promise(t=>{this.core.getMEI(e).then(e=>{t("data:application/mei+xml;charset=utf-8,"+encodeURIComponent(e))})})}getPageMEI(e){return this.core.getMEI(e)}getPageSVG(e){return this.core.getSVG(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(45),r=n(46),s=n(65),o=n(23),a=n(29),c=n(47);t.default=class{constructor(e){this.verovioWrapper=new s.default,this.undoStacks=new Map,this.redoStacks=new Map,this.neonCache=new Map,this.parser=new DOMParser,this.db=new a.default("Neon"),this.blankPages=[],this.manifest=e,this.annotations=e.mei_annotations,this.lastPageLoaded=""}getAnnotations(){return this.annotations}async initDb(e=!1){return await new Promise((t,n)=>{this.db.get(this.manifest["@id"]).catch(e=>{if("not_found"===e.name){const e={_id:this.manifest["@id"],timestamp:this.manifest.timestamp,image:this.manifest.image,title:this.manifest.title,annotations:[]};return this.annotations.forEach(t=>{e.annotations.push(t.id)}),e}return console.error(e),n(e)}).then(async i=>{const r=/(.+[-+\u2212]\d\d)(\d\d)$/;if(new Date(i.timestamp).getTime()>(r.test(this.manifest.timestamp)?new Date(this.manifest.timestamp.replace(r,"$1:$2")).getTime():new Date(this.manifest.timestamp).getTime())&&!e){this.annotations=[];const e=i.annotations.map(e=>new Promise(t=>{this.db.get(e).then(e=>{this.annotations.push({id:e._id,type:"Annotation",body:e.body,target:e.target}),t("")}).catch(e=>{console.error(e),t("")})}));return await Promise.all(e),t(!1)}for(const e of this.annotations)await this.db.get(e.id).catch(t=>"not_found"===t.name?{_id:e.id}:(console.error(t),n(t))).then(t=>(t.body=e.body,t.target=e.target,this.db.put(t))).catch(e=>{n(e),console.error(e)});return this.db.put(i)}).then(()=>t(!0)).catch(e=>{n(e),console.error(e)})})}loadPage(e){return new Promise((t,n)=>{if(this.lastPageLoaded===e&&this.neonCache.has(e))t(this.neonCache.get(e));else if(this.neonCache.has(e))this.loadData(e,this.neonCache.get(e).mei).then(()=>{t(this.neonCache.get(e))});else if(this.blankPages.includes(e)){r.blankPage();const t=new Error("No MEI file for page "+e);t.name="missing_mei",n(t)}else{const s=this.annotations.find(t=>t.target===e);s?window.fetch(s.body).then(e=>{if(e.ok)return e.text();throw new Error(e.statusText)}).then(n=>{n.match(//)&&(n=(0,i.convertSbToStaff)(n)),(0,i.checkOutOfBoundsGlyphs)(n),this.loadData(e,n).then(()=>{t(this.neonCache.get(e))})}).catch(e=>{n(e)}):(r.blankPage(),this.blankPages.push(e))}})}loadData(e,t,n=!1){return r.sendForValidation(t),this.lastPageLoaded=e,new Promise(i=>{const r={id:(0,o.uuidv4)(),action:"renderData",mei:t};this.verovioWrapper.addEventListener("message",function s(o){if(o.data.id===r.id){const r=this.parser.parseFromString(o.data.svg,"image/svg+xml").documentElement;this.neonCache.set(e,{svg:r,mei:t,dirty:n}),o.target.removeEventListener("message",s),i()}}.bind(this)),this.verovioWrapper.postMessage(r)})}getSVG(e){return new Promise((t,n)=>{this.loadPage(e).then(e=>{t(e.svg)}).catch(e=>{n(e)})})}getMEI(e){return new Promise((t,n)=>{this.loadPage(e).then(e=>{t(e.mei)}).catch(e=>{n(e)})})}getElementAttr(e,t){return new Promise(n=>{this.loadPage(t).then(()=>{const t={id:(0,o.uuidv4)(),action:"getElementAttr",elementId:e};this.verovioWrapper.addEventListener("message",(function e(i){i.data.id===t.id&&(i.target.removeEventListener("message",e),n(i.data.attributes))})),this.verovioWrapper.postMessage(t)})})}edit(e,t){let n;return n=this.lastPageLoaded===t?Promise.resolve(this.neonCache.get(t)):this.loadPage(t),new Promise(i=>{n.then(n=>{n.svg=null;const r=n.mei,s={id:(0,o.uuidv4)(),action:"edit",editorAction:e};this.verovioWrapper.addEventListener("message",function e(n){if(n.data.id===s.id){if(n.data.result){this.undoStacks.has(t)||this.undoStacks.set(t,[]);const e=this.undoStacks.get(t);e.push(r)>10&&this.undoStacks.set(t,e.slice(1)),this.redoStacks.set(t,[])}n.target.removeEventListener("message",e),this.updateCache(t,!0).then(()=>{i(n.data.result)}),(0,c.setSavedStatus)(!1)}}.bind(this)),this.verovioWrapper.postMessage(s)})})}updateCache(e,t){return new Promise(n=>{let i,s;const a=new Promise(e=>{const t={id:(0,o.uuidv4)(),action:"getMEI"};this.verovioWrapper.addEventListener("message",(function n(s){s.data.id===t.id&&(i=s.data.mei,s.target.removeEventListener("message",n),r.sendForValidation(i),e(""))})),this.verovioWrapper.postMessage(t)}),c=new Promise(e=>{const t={id:(0,o.uuidv4)(),action:"renderToSVG"};this.verovioWrapper.addEventListener("message",(function n(i){i.data.id===t.id&&(s=i.data.svg,i.target.removeEventListener("message",n),e(""))})),this.verovioWrapper.postMessage(t)});a.then(()=>c).then(()=>{const r=this.parser.parseFromString(s,"image/svg+xml").documentElement;this.neonCache.set(e,{mei:i,svg:r,dirty:t}),n()})})}info(e){let t;return t=this.lastPageLoaded===e?Promise.resolve():this.loadPage(e),new Promise(e=>{t.then(()=>{const t={id:(0,o.uuidv4)(),action:"editInfo"};this.verovioWrapper.addEventListener("message",(function n(i){i.data.id===t.id&&(i.target.removeEventListener("message",n),e(i.data.info))})),this.verovioWrapper.postMessage(t)})})}undo(e){return new Promise(async t=>{if(!this.undoStacks.has(e))return t(!1);const n=this.undoStacks.get(e).pop();if(!n)return t(!1);const i=await this.getMEI(e);return this.redoStacks.get(e).push(i),await this.loadData(e,n,!0),t(!0)})}redo(e){return new Promise(async t=>{if(!this.redoStacks.has(e))return t(!1);const n=this.redoStacks.get(e).pop();if(!n)return t(!1);const i=await this.getMEI(e);return this.undoStacks.get(e).push(i),await this.loadData(e,n,!0),t(!0)})}async updateDatabase(){let e=!1;for(const t of this.neonCache){const n=t[0],i=t[1];if(i.dirty){e=!0;const t=this.annotations.findIndex(e=>e.target===n);let r;this.annotations[t].body.match(/^data:/)?r="data:application/mei+xml;base64,"+window.btoa(i.mei):await window.fetch(this.annotations[t].body,{method:"PUT",headers:{"Content-Type":"application/mei+xml"},body:i.mei}).then(e=>{r=e.ok?this.annotations[t].body:"data:application/mei+xml;base64,"+window.btoa(i.mei)}).catch(e=>{console.error(e),console.warn("Falling back to data URI"),r="data:application/mei+xml;base64,"+window.btoa(i.mei)}),this.annotations[t].body=r,await this.db.get(this.annotations[t].id).then(e=>(e.body=r,this.db.put(e))).then(()=>{i.dirty=!1}).catch(e=>{console.error(e)})}}e&&await this.db.get(this.manifest["@id"]).then(e=>(e.timestamp=(new Date).toISOString(),this.db.put(e))).catch(e=>{console.error(e)})}async deleteDb(){const e=await this.db.get(this.manifest["@id"]).then(e=>e.annotations);e.push(this.manifest["@id"]);const t=e.map(e=>new Promise(t=>{this.db.get(e).then(e=>this.db.remove(e)).then(()=>t())}));return Promise.all(t)}}},function(e,t){ + */(function(){var s="Expected a function",o="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",v="[object Number]",m="[object Object]",y="[object RegExp]",b="[object Set]",w="[object String]",_="[object Symbol]",E="[object WeakMap]",S="[object ArrayBuffer]",x="[object DataView]",L="[object Float32Array]",k="[object Float64Array]",A="[object Int8Array]",C="[object Int16Array]",I="[object Int32Array]",P="[object Uint8Array]",O="[object Uint16Array]",B="[object Uint32Array]",T=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,D=RegExp(q.source),F=RegExp(j.source),R=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U=/^\w*$/,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,G=RegExp(Z.source),W=/^\s+/,K=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ie=/\w*$/,re=/^[-+]0x[0-9a-f]+$/i,se=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",ge="["+fe+"]",ve="["+he+"]",me="\\d+",ye="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+fe+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",Se="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ke="(?:"+be+"|"+we+")",Ae="(?:"+Le+"|"+we+")",Ce="(?:"+ve+"|"+_e+")"+"?",Ie="[\\ufe0e\\ufe0f]?"+Ce+("(?:\\u200d(?:"+[Ee,Se,xe].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*"),Pe="(?:"+[ye,Se,xe].join("|")+")"+Ie,Oe="(?:"+[Ee+ve+"?",ve,Se,xe,pe].join("|")+")",Be=RegExp("['’]","g"),Te=RegExp(ve,"g"),Ne=RegExp(_e+"(?="+_e+")|"+Oe+Ie,"g"),Me=RegExp([Le+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ge,Le,"$"].join("|")+")",Ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ge,Le+ke,"$"].join("|")+")",Le+"?"+ke+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Le+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Pe].join("|"),"g"),qe=RegExp("[\\u200d\\ud800-\\udfff"+he+"\\ufe0e\\ufe0f]"),je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,De=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,Re={};Re[L]=Re[k]=Re[A]=Re[C]=Re[I]=Re[P]=Re["[object Uint8ClampedArray]"]=Re[O]=Re[B]=!0,Re[c]=Re[l]=Re[S]=Re[u]=Re[x]=Re[d]=Re[h]=Re[f]=Re[g]=Re[v]=Re[m]=Re[y]=Re[b]=Re[w]=Re[E]=!1;var Ve={};Ve[c]=Ve[l]=Ve[S]=Ve[x]=Ve[u]=Ve[d]=Ve[L]=Ve[k]=Ve[A]=Ve[C]=Ve[I]=Ve[g]=Ve[v]=Ve[m]=Ve[y]=Ve[b]=Ve[w]=Ve[_]=Ve[P]=Ve["[object Uint8ClampedArray]"]=Ve[O]=Ve[B]=!0,Ve[h]=Ve[f]=Ve[E]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,Ue=parseInt,$e="object"==typeof e&&e&&e.Object===Object&&e,Ze="object"==typeof self&&self&&self.Object===Object&&self,Ge=$e||Ze||Function("return this")(),We=t&&!t.nodeType&&t,Ke=We&&"object"==typeof i&&i&&!i.nodeType&&i,Ye=Ke&&Ke.exports===We,Xe=Ye&&$e.process,Je=function(){try{var e=Ke&&Ke.require&&Ke.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Qe=Je&&Je.isArrayBuffer,et=Je&&Je.isDate,tt=Je&&Je.isMap,nt=Je&&Je.isRegExp,it=Je&&Je.isSet,rt=Je&&Je.isTypedArray;function st(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r-1}function ht(e,t,n){for(var i=-1,r=null==e?0:e.length;++i-1;);return n}function Mt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var jt=kt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Dt=kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ft(e){return"\\"+ze[e]}function Rt(e){return qe.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Ht(e,t){for(var n=-1,i=e.length,r=0,s=[];++n",""":'"',"'":"'"});var Yt=function e(t){var n,i=(t=null==t?Ge:Yt.defaults(Ge.Object(),t,Yt.pick(Ge,De))).Array,r=t.Date,K=t.Error,he=t.Function,fe=t.Math,pe=t.Object,ge=t.RegExp,ve=t.String,me=t.TypeError,ye=i.prototype,be=he.prototype,we=pe.prototype,_e=t["__core-js_shared__"],Ee=be.toString,Se=we.hasOwnProperty,xe=0,Le=(n=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ke=we.toString,Ae=Ee.call(pe),Ce=Ge._,Ie=ge("^"+Ee.call(Se).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=Ye?t.Buffer:void 0,Oe=t.Symbol,Ne=t.Uint8Array,qe=Pe?Pe.allocUnsafe:void 0,ze=zt(pe.getPrototypeOf,pe),$e=pe.create,Ze=we.propertyIsEnumerable,We=ye.splice,Ke=Oe?Oe.isConcatSpreadable:void 0,Xe=Oe?Oe.iterator:void 0,Je=Oe?Oe.toStringTag:void 0,yt=function(){try{var e=es(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),kt=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,Xt=r&&r.now!==Ge.Date.now&&r.now,Jt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Qt=fe.ceil,en=fe.floor,tn=pe.getOwnPropertySymbols,nn=Pe?Pe.isBuffer:void 0,rn=t.isFinite,sn=ye.join,on=zt(pe.keys,pe),an=fe.max,cn=fe.min,ln=r.now,un=t.parseInt,dn=fe.random,hn=ye.reverse,fn=es(t,"DataView"),pn=es(t,"Map"),gn=es(t,"Promise"),vn=es(t,"Set"),mn=es(t,"WeakMap"),yn=es(pe,"create"),bn=mn&&new mn,wn={},_n=As(fn),En=As(pn),Sn=As(gn),xn=As(vn),Ln=As(mn),kn=Oe?Oe.prototype:void 0,An=kn?kn.valueOf:void 0,Cn=kn?kn.toString:void 0;function In(e){if($o(e)&&!No(e)&&!(e instanceof Tn)){if(e instanceof Bn)return e;if(Se.call(e,"__wrapped__"))return Cs(e)}return new Bn(e)}var Pn=function(){function e(){}return function(t){if(!Uo(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function On(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Tn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Xn(e,t,n,i,r,s){var o,a=1&t,l=2&t,h=4&t;if(n&&(o=r?n(e,i,r,s):n(e)),void 0!==o)return o;if(!Uo(e))return e;var E=No(e);if(E){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Se.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!a)return yr(e,o)}else{var T=is(e),N=T==f||T==p;if(Do(e))return hr(e,a);if(T==m||T==c||N&&!r){if(o=l||N?{}:ss(e),!a)return l?function(e,t){return br(e,ns(e),t)}(e,function(e,t){return e&&br(t,Ea(t),e)}(o,e)):function(e,t){return br(e,ts(e),t)}(e,Gn(o,e))}else{if(!Ve[T])return r?e:{};o=function(e,t,n){var i=e.constructor;switch(t){case S:return fr(e);case u:case d:return new i(+e);case x:return function(e,t){var n=t?fr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case k:case A:case C:case I:case P:case"[object Uint8ClampedArray]":case O:case B:return pr(e,n);case g:return new i;case v:case w:return new i(e);case y:return function(e){var t=new e.constructor(e.source,ie.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new i;case _:return r=e,An?pe(An.call(r)):{}}var r}(e,T,a)}}s||(s=new Dn);var M=s.get(e);if(M)return M;s.set(e,o),Yo(e)?e.forEach((function(i){o.add(Xn(i,t,n,i,e,s))})):Zo(e)&&e.forEach((function(i,r){o.set(r,Xn(i,t,n,r,e,s))}));var q=E?void 0:(h?l?Gr:Zr:l?Ea:_a)(e);return at(q||e,(function(i,r){q&&(i=e[r=i]),Un(o,r,Xn(i,t,n,r,e,s))})),o}function Jn(e,t,n){var i=n.length;if(null==e)return!i;for(e=pe(e);i--;){var r=n[i],s=t[r],o=e[r];if(void 0===o&&!(r in e)||!s(o))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new me(s);return ws((function(){e.apply(void 0,n)}),t)}function ei(e,t,n,i){var r=-1,s=dt,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=ft(t,Ot(n))),i?(s=ht,o=!1):t.length>=200&&(s=Tt,o=!1,t=new jn(t));e:for(;++r-1},Mn.prototype.set=function(e,t){var n=this.__data__,i=$n(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(pn||Mn),string:new Nn}},qn.prototype.delete=function(e){var t=Jr(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return Jr(this,e).get(e)},qn.prototype.has=function(e){return Jr(this,e).has(e)},qn.prototype.set=function(e,t){var n=Jr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},jn.prototype.add=jn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jn.prototype.has=function(e){return this.__data__.has(e)},Dn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Dn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Dn.prototype.get=function(e){return this.__data__.get(e)},Dn.prototype.has=function(e){return this.__data__.has(e)},Dn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var i=n.__data__;if(!pn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(i)}return n.set(e,t),this.size=n.size,this};var ti=Er(li),ni=Er(ui,!0);function ii(e,t){var n=!0;return ti(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function ri(e,t,n){for(var i=-1,r=e.length;++i0&&n(a)?t>1?oi(a,t-1,n,i,r):pt(r,a):i||(r[r.length]=a)}return r}var ai=Sr(),ci=Sr(!0);function li(e,t){return e&&ai(e,t,_a)}function ui(e,t){return e&&ci(e,t,_a)}function di(e,t){return ut(t,(function(t){return Vo(e[t])}))}function hi(e,t){for(var n=0,i=(t=cr(t,e)).length;null!=e&&nt}function vi(e,t){return null!=e&&Se.call(e,t)}function mi(e,t){return null!=e&&t in pe(e)}function yi(e,t,n){for(var r=n?ht:dt,s=e[0].length,o=e.length,a=o,c=i(o),l=1/0,u=[];a--;){var d=e[a];a&&t&&(d=ft(d,Ot(t))),l=cn(d.length,l),c[a]=!n&&(t||s>=120&&d.length>=120)?new jn(a&&d):void 0}d=e[0];var h=-1,f=c[0];e:for(;++h=a)return c;var l=n[i];return c*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Ni(e,t,n){for(var i=-1,r=t.length,s={};++i-1;)a!==e&&We.call(a,c,1),We.call(e,c,1);return e}function qi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;as(r)?We.call(e,r,1):er(e,r)}}return e}function ji(e,t){return e+en(dn()*(t-e+1))}function Di(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Fi(e,t){return _s(gs(e,t,Ga),e+"")}function Ri(e){return Rn(Pa(e))}function Vi(e,t){var n=Pa(e);return xs(n,Yn(t,0,n.length))}function zi(e,t,n,i){if(!Uo(e))return e;for(var r=-1,s=(t=cr(t,e)).length,o=s-1,a=e;null!=a&&++rs?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r>>1,o=e[s];null!==o&&!Jo(o)&&(n?o<=t:o=200){var l=t?null:Dr(e);if(l)return Ut(l);o=!1,r=Tt,c=new jn}else c=t?[]:a;e:for(;++i=i?e:Zi(e,t,n)}var dr=kt||function(e){return Ge.clearTimeout(e)};function hr(e,t){if(t)return e.slice();var n=e.length,i=qe?qe(n):new e.constructor(n);return e.copy(i),i}function fr(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function pr(e,t){var n=t?fr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function gr(e,t){if(e!==t){var n=void 0!==e,i=null===e,r=e==e,s=Jo(e),o=void 0!==t,a=null===t,c=t==t,l=Jo(t);if(!a&&!l&&!s&&e>t||s&&o&&c&&!a&&!l||i&&o&&c||!n&&c||!r)return 1;if(!i&&!s&&!l&&e1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(r--,s):void 0,o&&cs(n[0],n[1],o)&&(s=r<3?void 0:s,r=1),t=pe(t);++i-1?r[s?t[o]:o]:void 0}}function Cr(e){return $r((function(t){var n=t.length,i=n,r=Bn.prototype.thru;for(e&&t.reverse();i--;){var o=t[i];if("function"!=typeof o)throw new me(s);if(r&&!a&&"wrapper"==Kr(o))var a=new Bn([],!0)}for(i=a?i:n;++i1&&b.reverse(),d&&la))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=2&n?new jn:void 0;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return at(a,(function(n){var i="_."+n[0];t&n[1]&&!dt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(J):[]}(i),n)))}function Ss(e){var t=0,n=0;return function(){var i=ln(),r=16-(i-n);if(n=i,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function xs(e,t){var n=-1,i=e.length,r=i-1;for(t=void 0===t?i:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ws(e,n)}));function to(e){var t=In(e);return t.__chain__=!0,t}function no(e,t){return t(e)}var io=$r((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,r=function(t){return Kn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Tn&&as(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:no,args:[r],thisArg:void 0}),new Bn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(r)}));var ro=wr((function(e,t,n){Se.call(e,n)?++e[n]:Wn(e,n,1)}));var so=Ar(Bs),oo=Ar(Ts);function ao(e,t){return(No(e)?at:ti)(e,Xr(t,3))}function co(e,t){return(No(e)?ct:ni)(e,Xr(t,3))}var lo=wr((function(e,t,n){Se.call(e,n)?e[n].push(t):Wn(e,n,[t])}));var uo=Fi((function(e,t,n){var r=-1,s="function"==typeof t,o=qo(e)?i(e.length):[];return ti(e,(function(e){o[++r]=s?st(t,e,n):bi(e,t,n)})),o})),ho=wr((function(e,t,n){Wn(e,n,t)}));function fo(e,t){return(No(e)?ft:Ci)(e,Xr(t,3))}var po=wr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var go=Fi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&cs(e,t[0],t[1])?t=[]:n>2&&cs(t[0],t[1],t[2])&&(t=[t[0]]),Ti(e,oi(t,1),[])})),vo=Xt||function(){return Ge.Date.now()};function mo(e,t,n){return t=n?void 0:t,Rr(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function yo(e,t){var n;if("function"!=typeof t)throw new me(s);return e=ra(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var bo=Fi((function(e,t,n){var i=1;if(n.length){var r=Ht(n,Yr(bo));i|=32}return Rr(e,i,t,n,r)})),wo=Fi((function(e,t,n){var i=3;if(n.length){var r=Ht(n,Yr(wo));i|=32}return Rr(t,i,e,n,r)}));function _o(e,t,n){var i,r,o,a,c,l,u=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new me(s);function p(t){var n=i,s=r;return i=r=void 0,u=t,a=e.apply(s,n)}function g(e){return u=e,c=ws(m,t),d?p(e):a}function v(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function m(){var e=vo();if(v(e))return y(e);c=ws(m,function(e){var n=t-(e-l);return h?cn(n,o-(e-u)):n}(e))}function y(e){return c=void 0,f&&i?p(e):(i=r=void 0,a)}function b(){var e=vo(),n=v(e);if(i=arguments,r=this,l=e,n){if(void 0===c)return g(l);if(h)return dr(c),c=ws(m,t),p(l)}return void 0===c&&(c=ws(m,t)),a}return t=oa(t)||0,Uo(n)&&(d=!!n.leading,o=(h="maxWait"in n)?an(oa(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==c&&dr(c),u=0,i=l=r=c=void 0},b.flush=function(){return void 0===c?a:y(vo())},b}var Eo=Fi((function(e,t){return Qn(e,1,t)})),So=Fi((function(e,t,n){return Qn(e,oa(t)||0,n)}));function xo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new me(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(xo.Cache||qn),n}function Lo(e){if("function"!=typeof e)throw new me(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}xo.Cache=qn;var ko=lr((function(e,t){var n=(t=1==t.length&&No(t[0])?ft(t[0],Ot(Xr())):ft(oi(t,1),Ot(Xr()))).length;return Fi((function(i){for(var r=-1,s=cn(i.length,n);++r=t})),To=wi(function(){return arguments}())?wi:function(e){return $o(e)&&Se.call(e,"callee")&&!Ze.call(e,"callee")},No=i.isArray,Mo=Qe?Ot(Qe):function(e){return $o(e)&&pi(e)==S};function qo(e){return null!=e&&Ho(e.length)&&!Vo(e)}function jo(e){return $o(e)&&qo(e)}var Do=nn||oc,Fo=et?Ot(et):function(e){return $o(e)&&pi(e)==d};function Ro(e){if(!$o(e))return!1;var t=pi(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Wo(e)}function Vo(e){if(!Uo(e))return!1;var t=pi(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function zo(e){return"number"==typeof e&&e==ra(e)}function Ho(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Uo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $o(e){return null!=e&&"object"==typeof e}var Zo=tt?Ot(tt):function(e){return $o(e)&&is(e)==g};function Go(e){return"number"==typeof e||$o(e)&&pi(e)==v}function Wo(e){if(!$o(e)||pi(e)!=m)return!1;var t=ze(e);if(null===t)return!0;var n=Se.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==Ae}var Ko=nt?Ot(nt):function(e){return $o(e)&&pi(e)==y};var Yo=it?Ot(it):function(e){return $o(e)&&is(e)==b};function Xo(e){return"string"==typeof e||!No(e)&&$o(e)&&pi(e)==w}function Jo(e){return"symbol"==typeof e||$o(e)&&pi(e)==_}var Qo=rt?Ot(rt):function(e){return $o(e)&&Ho(e.length)&&!!Re[pi(e)]};var ea=Mr(Ai),ta=Mr((function(e,t){return e<=t}));function na(e){if(!e)return[];if(qo(e))return Xo(e)?Gt(e):yr(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=is(e);return(t==g?Vt:t==b?Ut:Pa)(e)}function ia(e){return e?(e=oa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ra(e){var t=ia(e),n=t%1;return t==t?n?t-n:t:0}function sa(e){return e?Yn(ra(e),0,4294967295):0}function oa(e){if("number"==typeof e)return e;if(Jo(e))return NaN;if(Uo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Uo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pt(e);var n=se.test(e);return n||ae.test(e)?Ue(e.slice(2),n?2:8):re.test(e)?NaN:+e}function aa(e){return br(e,Ea(e))}function ca(e){return null==e?"":Ji(e)}var la=_r((function(e,t){if(hs(t)||qo(t))br(t,_a(t),e);else for(var n in t)Se.call(t,n)&&Un(e,n,t[n])})),ua=_r((function(e,t){br(t,Ea(t),e)})),da=_r((function(e,t,n,i){br(t,Ea(t),e,i)})),ha=_r((function(e,t,n,i){br(t,_a(t),e,i)})),fa=$r(Kn);var pa=Fi((function(e,t){e=pe(e);var n=-1,i=t.length,r=i>2?t[2]:void 0;for(r&&cs(t[0],t[1],r)&&(i=1);++n1),t})),br(e,Gr(e),n),i&&(n=Xn(n,7,Hr));for(var r=t.length;r--;)er(n,t[r]);return n}));var ka=$r((function(e,t){return null==e?{}:function(e,t){return Ni(e,t,(function(t,n){return ma(e,n)}))}(e,t)}));function Aa(e,t){if(null==e)return{};var n=ft(Gr(e),(function(e){return[e]}));return t=Xr(t),Ni(e,n,(function(e,n){return t(e,n[0])}))}var Ca=Fr(_a),Ia=Fr(Ea);function Pa(e){return null==e?[]:Bt(e,_a(e))}var Oa=Lr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ba(t):t)}));function Ba(e){return Ra(ca(e).toLowerCase())}function Ta(e){return(e=ca(e))&&e.replace(le,jt).replace(Te,"")}var Na=Lr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ma=Lr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qa=xr("toLowerCase");var ja=Lr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Da=Lr((function(e,t,n){return e+(n?" ":"")+Ra(t)}));var Fa=Lr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ra=xr("toUpperCase");function Va(e,t,n){return e=ca(e),void 0===(t=n?void 0:t)?function(e){return je.test(e)}(e)?function(e){return e.match(Me)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var za=Fi((function(e,t){try{return st(e,void 0,t)}catch(e){return Ro(e)?e:new K(e)}})),Ha=$r((function(e,t){return at(t,(function(t){t=ks(t),Wn(e,t,bo(e[t],e))})),e}));function Ua(e){return function(){return e}}var $a=Cr(),Za=Cr(!0);function Ga(e){return e}function Wa(e){return xi("function"==typeof e?e:Xn(e,1))}var Ka=Fi((function(e,t){return function(n){return bi(n,e,t)}})),Ya=Fi((function(e,t){return function(n){return bi(e,n,t)}}));function Xa(e,t,n){var i=_a(t),r=di(t,i);null!=n||Uo(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=di(t,_a(t)));var s=!(Uo(n)&&"chain"in n&&!n.chain),o=Vo(e);return at(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=yr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,pt([this.value()],arguments))})})),e}function Ja(){}var Qa=Br(ft),ec=Br(lt),tc=Br(mt);function nc(e){return ls(e)?Lt(ks(e)):function(e){return function(t){return hi(t,e)}}(e)}var ic=Nr(),rc=Nr(!0);function sc(){return[]}function oc(){return!1}var ac=Or((function(e,t){return e+t}),0),cc=jr("ceil"),lc=Or((function(e,t){return e/t}),1),uc=jr("floor");var dc,hc=Or((function(e,t){return e*t}),1),fc=jr("round"),pc=Or((function(e,t){return e-t}),0);return In.after=function(e,t){if("function"!=typeof t)throw new me(s);return e=ra(e),function(){if(--e<1)return t.apply(this,arguments)}},In.ary=mo,In.assign=la,In.assignIn=ua,In.assignInWith=da,In.assignWith=ha,In.at=fa,In.before=yo,In.bind=bo,In.bindAll=Ha,In.bindKey=wo,In.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return No(e)?e:[e]},In.chain=to,In.chunk=function(e,t,n){t=(n?cs(e,t,n):void 0===t)?1:an(ra(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var s=0,o=0,a=i(Qt(r/t));sr?0:r+n),(i=void 0===i||i>r?r:ra(i))<0&&(i+=r),i=n>i?0:sa(i);n>>0)?(e=ca(e))&&("string"==typeof t||null!=t&&!Ko(t))&&!(t=Ji(t))&&Rt(e)?ur(Gt(e),0,n):e.split(t,n):[]},In.spread=function(e,t){if("function"!=typeof e)throw new me(s);return t=null==t?0:an(ra(t),0),Fi((function(n){var i=n[t],r=ur(n,0,t);return i&&pt(r,i),st(e,this,r)}))},In.tail=function(e){var t=null==e?0:e.length;return t?Zi(e,1,t):[]},In.take=function(e,t,n){return e&&e.length?Zi(e,0,(t=n||void 0===t?1:ra(t))<0?0:t):[]},In.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Zi(e,(t=i-(t=n||void 0===t?1:ra(t)))<0?0:t,i):[]},In.takeRightWhile=function(e,t){return e&&e.length?nr(e,Xr(t,3),!1,!0):[]},In.takeWhile=function(e,t){return e&&e.length?nr(e,Xr(t,3)):[]},In.tap=function(e,t){return t(e),e},In.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new me(s);return Uo(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),_o(e,t,{leading:i,maxWait:t,trailing:r})},In.thru=no,In.toArray=na,In.toPairs=Ca,In.toPairsIn=Ia,In.toPath=function(e){return No(e)?ft(e,ks):Jo(e)?[e]:yr(Ls(ca(e)))},In.toPlainObject=aa,In.transform=function(e,t,n){var i=No(e),r=i||Do(e)||Qo(e);if(t=Xr(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:Uo(e)&&Vo(s)?Pn(ze(e)):{}}return(r?at:li)(e,(function(e,i,r){return t(n,e,i,r)})),n},In.unary=function(e){return mo(e,1)},In.union=Us,In.unionBy=$s,In.unionWith=Zs,In.uniq=function(e){return e&&e.length?Qi(e):[]},In.uniqBy=function(e,t){return e&&e.length?Qi(e,Xr(t,2)):[]},In.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qi(e,void 0,t):[]},In.unset=function(e,t){return null==e||er(e,t)},In.unzip=Gs,In.unzipWith=Ws,In.update=function(e,t,n){return null==e?e:tr(e,t,ar(n))},In.updateWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:tr(e,t,ar(n),i)},In.values=Pa,In.valuesIn=function(e){return null==e?[]:Bt(e,Ea(e))},In.without=Ks,In.words=Va,In.wrap=function(e,t){return Ao(ar(t),e)},In.xor=Ys,In.xorBy=Xs,In.xorWith=Js,In.zip=Qs,In.zipObject=function(e,t){return sr(e||[],t||[],Un)},In.zipObjectDeep=function(e,t){return sr(e||[],t||[],zi)},In.zipWith=eo,In.entries=Ca,In.entriesIn=Ia,In.extend=ua,In.extendWith=da,Xa(In,In),In.add=ac,In.attempt=za,In.camelCase=Oa,In.capitalize=Ba,In.ceil=cc,In.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==t&&(t=(t=oa(t))==t?t:0),Yn(oa(e),t,n)},In.clone=function(e){return Xn(e,4)},In.cloneDeep=function(e){return Xn(e,5)},In.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},In.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},In.conformsTo=function(e,t){return null==t||Jn(e,t,_a(t))},In.deburr=Ta,In.defaultTo=function(e,t){return null==e||e!=e?t:e},In.divide=lc,In.endsWith=function(e,t,n){e=ca(e),t=Ji(t);var i=e.length,r=n=void 0===n?i:Yn(ra(n),0,i);return(n-=t.length)>=0&&e.slice(n,r)==t},In.eq=Po,In.escape=function(e){return(e=ca(e))&&F.test(e)?e.replace(j,Dt):e},In.escapeRegExp=function(e){return(e=ca(e))&&G.test(e)?e.replace(Z,"\\$&"):e},In.every=function(e,t,n){var i=No(e)?lt:ii;return n&&cs(e,t,n)&&(t=void 0),i(e,Xr(t,3))},In.find=so,In.findIndex=Bs,In.findKey=function(e,t){return bt(e,Xr(t,3),li)},In.findLast=oo,In.findLastIndex=Ts,In.findLastKey=function(e,t){return bt(e,Xr(t,3),ui)},In.floor=uc,In.forEach=ao,In.forEachRight=co,In.forIn=function(e,t){return null==e?e:ai(e,Xr(t,3),Ea)},In.forInRight=function(e,t){return null==e?e:ci(e,Xr(t,3),Ea)},In.forOwn=function(e,t){return e&&li(e,Xr(t,3))},In.forOwnRight=function(e,t){return e&&ui(e,Xr(t,3))},In.get=va,In.gt=Oo,In.gte=Bo,In.has=function(e,t){return null!=e&&rs(e,t,vi)},In.hasIn=ma,In.head=Ms,In.identity=Ga,In.includes=function(e,t,n,i){e=qo(e)?e:Pa(e),n=n&&!i?ra(n):0;var r=e.length;return n<0&&(n=an(r+n,0)),Xo(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&_t(e,t,n)>-1},In.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ra(n);return r<0&&(r=an(i+r,0)),_t(e,t,r)},In.inRange=function(e,t,n){return t=ia(t),void 0===n?(n=t,t=0):n=ia(n),function(e,t,n){return e>=cn(t,n)&&e=-9007199254740991&&e<=9007199254740991},In.isSet=Yo,In.isString=Xo,In.isSymbol=Jo,In.isTypedArray=Qo,In.isUndefined=function(e){return void 0===e},In.isWeakMap=function(e){return $o(e)&&is(e)==E},In.isWeakSet=function(e){return $o(e)&&"[object WeakSet]"==pi(e)},In.join=function(e,t){return null==e?"":sn.call(e,t)},In.kebabCase=Na,In.last=Fs,In.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=i;return void 0!==n&&(r=(r=ra(n))<0?an(i+r,0):cn(r,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,r):wt(e,St,r,!0)},In.lowerCase=Ma,In.lowerFirst=qa,In.lt=ea,In.lte=ta,In.max=function(e){return e&&e.length?ri(e,Ga,gi):void 0},In.maxBy=function(e,t){return e&&e.length?ri(e,Xr(t,2),gi):void 0},In.mean=function(e){return xt(e,Ga)},In.meanBy=function(e,t){return xt(e,Xr(t,2))},In.min=function(e){return e&&e.length?ri(e,Ga,Ai):void 0},In.minBy=function(e,t){return e&&e.length?ri(e,Xr(t,2),Ai):void 0},In.stubArray=sc,In.stubFalse=oc,In.stubObject=function(){return{}},In.stubString=function(){return""},In.stubTrue=function(){return!0},In.multiply=hc,In.nth=function(e,t){return e&&e.length?Bi(e,ra(t)):void 0},In.noConflict=function(){return Ge._===this&&(Ge._=Ce),this},In.noop=Ja,In.now=vo,In.pad=function(e,t,n){e=ca(e);var i=(t=ra(t))?Zt(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Tr(en(r),n)+e+Tr(Qt(r),n)},In.padEnd=function(e,t,n){e=ca(e);var i=(t=ra(t))?Zt(e):0;return t&&it){var i=e;e=t,t=i}if(n||e%1||t%1){var r=dn();return cn(e+r*(t-e+He("1e-"+((r+"").length-1))),t)}return ji(e,t)},In.reduce=function(e,t,n){var i=No(e)?gt:At,r=arguments.length<3;return i(e,Xr(t,4),n,r,ti)},In.reduceRight=function(e,t,n){var i=No(e)?vt:At,r=arguments.length<3;return i(e,Xr(t,4),n,r,ni)},In.repeat=function(e,t,n){return t=(n?cs(e,t,n):void 0===t)?1:ra(t),Di(ca(e),t)},In.replace=function(){var e=arguments,t=ca(e[0]);return e.length<3?t:t.replace(e[1],e[2])},In.result=function(e,t,n){var i=-1,r=(t=cr(t,e)).length;for(r||(r=1,e=void 0);++i9007199254740991)return[];var n=4294967295,i=cn(e,4294967295);e-=4294967295;for(var r=It(i,t=Xr(t));++n=s)return e;var a=n-Zt(i);if(a<1)return i;var c=o?ur(o,0,a).join(""):e.slice(0,a);if(void 0===r)return c+i;if(o&&(a+=c.length-a),Ko(r)){if(e.slice(a).search(r)){var l,u=c;for(r.global||(r=ge(r.source,ca(ie.exec(r))+"g")),r.lastIndex=0;l=r.exec(u);)var d=l.index;c=c.slice(0,void 0===d?a:d)}}else if(e.indexOf(Ji(r),a)!=a){var h=c.lastIndexOf(r);h>-1&&(c=c.slice(0,h))}return c+i},In.unescape=function(e){return(e=ca(e))&&D.test(e)?e.replace(q,Kt):e},In.uniqueId=function(e){var t=++xe;return ca(e)+t},In.upperCase=Fa,In.upperFirst=Ra,In.each=ao,In.eachRight=co,In.first=Ms,Xa(In,(dc={},li(In,(function(e,t){Se.call(In.prototype,t)||(dc[t]=e)})),dc),{chain:!1}),In.VERSION="4.17.21",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){In[e].placeholder=In})),at(["drop","take"],(function(e,t){Tn.prototype[e]=function(n){n=void 0===n?1:an(ra(n),0);var i=this.__filtered__&&!t?new Tn(this):this.clone();return i.__filtered__?i.__takeCount__=cn(n,i.__takeCount__):i.__views__.push({size:cn(n,4294967295),type:e+(i.__dir__<0?"Right":"")}),i},Tn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Tn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xr(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Tn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Tn.prototype[e]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Ga)},Tn.prototype.find=function(e){return this.filter(e).head()},Tn.prototype.findLast=function(e){return this.reverse().find(e)},Tn.prototype.invokeMap=Fi((function(e,t){return"function"==typeof e?new Tn(this):this.map((function(n){return bi(n,e,t)}))})),Tn.prototype.reject=function(e){return this.filter(Lo(Xr(e)))},Tn.prototype.slice=function(e,t){e=ra(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Tn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ra(t))<0?n.dropRight(-t):n.take(t-e)),n)},Tn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},li(Tn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),r=In[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);r&&(In.prototype[t]=function(){var t=this.__wrapped__,o=i?[1]:arguments,a=t instanceof Tn,c=o[0],l=a||No(t),u=function(e){var t=r.apply(In,pt([e],o));return i&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(a=l=!1);var d=this.__chain__,h=!!this.__actions__.length,f=s&&!d,p=a&&!h;if(!s&&l){t=p?t:new Tn(this);var g=e.apply(t,o);return g.__actions__.push({func:no,args:[u],thisArg:void 0}),new Bn(g,d)}return f&&p?e.apply(this,o):(g=this.thru(u),f?i?g.value()[0]:g.value():g)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);In.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(No(r)?r:[],e)}return this[n]((function(n){return t.apply(No(n)?n:[],e)}))}})),li(Tn.prototype,(function(e,t){var n=In[t];if(n){var i=n.name+"";Se.call(wn,i)||(wn[i]=[]),wn[i].push({name:t,func:n})}})),wn[Ir(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var e=new Tn(this.__wrapped__);return e.__actions__=yr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yr(this.__views__),e},Tn.prototype.reverse=function(){if(this.__filtered__){var e=new Tn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Tn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=No(e),i=t<0,r=n?e.length:0,s=function(e,t,n){var i=-1,r=n.length;for(;++i=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},In.prototype.plant=function(e){for(var t,n=this;n instanceof On;){var i=Cs(n);i.__index__=0,i.__values__=void 0,t?r.__wrapped__=i:t=i;var r=i;n=n.__wrapped__}return r.__wrapped__=e,t},In.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Tn){var t=e;return this.__actions__.length&&(t=new Tn(this)),(t=t.reverse()).__actions__.push({func:no,args:[Hs],thisArg:void 0}),new Bn(t,this.__chain__)}return this.thru(Hs)},In.prototype.toJSON=In.prototype.valueOf=In.prototype.value=function(){return ir(this.__wrapped__,this.__actions__)},In.prototype.first=In.prototype.head,Xe&&(In.prototype[Xe]=function(){return this}),In}();Ge._=Yt,void 0===(r=function(){return Yt}.call(t,n,t,i))||(i.exports=r)}).call(this)}).call(this,n(9),n(48)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadAreaHTML=void 0,t.uploadAreaHTML='
\n\n
\n
\n
Upload Files
\n
\n
\n \n
\n
\n\n
Unpaired Documents
\n\n
\n\n
\n
MEI
\n
\n
Name
\n
\n
\n
\n
\n\n
\n
Images
\n
\n
Name
\n
\n
\n
\n
\n\n
\n\n
\n
Make Pair
\n
\n
\n\n
\n\n
Paired Folios
\n
\n
Name
\n
\n
\n
\n\n
\n
\n Upload\n
\n
\n
\n\n
\n\n \x3c!--\n
\n

Manuscripts

\n
\n
\n --\x3e\n\n
\n
'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupingNotRecognized=void 0,t.groupingNotRecognized=function(){window.confirm("Neon does not recognize this neume grouping. Would you like to create a compound neume?")||document.getElementById("undo").click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitStaffHandler=void 0;const i=n(4),r=n(3),s=n(18),o=n(12);t.SplitStaffHandler=class{constructor(e,t){this.handler=(e=>{const t=this.staff.id,n=(0,o.getSVGRelCoords)(e.clientX,e.clientY),a={action:"split",param:{elementId:t,x:n.x}};this.neonView.edit(a,this.neonView.view.getCurrentPageURI()).then(async e=>{e&&(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success"));const n=new s.default(this.neonView,".staff");this.splitDisable(),(0,r.selectAll)([document.querySelector("#"+t)],this.neonView,n);const o=document.getElementById("moreEdit");o&&(o.innerHTML="",o.parentElement.classList.add("hidden"))})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.staff=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click Where to Split")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitNeumeHandler=void 0;const i=n(4);t.SplitNeumeHandler=class{constructor(e,t){this.handler=(e=>{const t={action:"splitNeume",param:{elementId:this.neume.id,ncId:e.target.parentElement.id}};this.neonView.edit(t,this.neonView.view.getCurrentPageURI()).then(async e=>{e?(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action successful","success")):(await this.neonView.updateForCurrentPage(),i.queueNotification("Split action failed","error")),this.splitDisable()})}).bind(this),this.keydownListener=(e=>{"Escape"===e.key?this.splitDisable():"Shift"===e.key&&document.body.removeEventListener("click",this.handler,{capture:!0})}).bind(this),this.clickawayHandler=(e=>{null===e.target.closest(".active-page")&&(this.splitDisable(),document.body.removeEventListener("click",this.handler,{capture:!0}))}).bind(this),this.resetHandler=(e=>{"Shift"===e.key&&document.body.addEventListener("click",this.handler,{capture:!0})}).bind(this),this.neonView=e,this.neume=t}startSplit(){this.splitDisable(),document.body.addEventListener("click",this.handler,{capture:!0}),document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetHandler),document.body.addEventListener("click",this.clickawayHandler),i.queueNotification("Click The Beginning of The Second Neume")}splitDisable(){document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetHandler),document.body.removeEventListener("click",this.clickawayHandler),document.body.removeEventListener("click",this.handler,{capture:!0})}}},function(e,t){},function(e,t,n){"use strict";(function(e){t.test=function(){return"function"==typeof e.queueMicrotask},t.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){var n=e.MutationObserver||e.WebKitMutationObserver;t.test=function(){return n},t.install=function(t){var i=0,r=new n(t),s=e.document.createTextNode("");return r.observe(s,{characterData:!0}),function(){s.data=i=++i%2}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},t.install=function(t){var n=new e.MessageChannel;return n.port1.onmessage=t,function(){n.port2.postMessage(0)}}}).call(this,n(9))},function(e,t,n){"use strict";(function(e){t.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},t.install=function(t){return function(){var n=e.document.createElement("script");return n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n),t}}}).call(this,n(9))},function(e,t,n){"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},function(e,t,n){"use strict";var i=n(71),r=n(72);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){r.isString(e)&&(e=b(e));return e instanceof s?e.format():s.prototype.format.call(e)},t.Url=s;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(73);function b(e,t,n){if(e&&r.isObject(e)&&e instanceof s)return e;var i=new s;return i.parse(e,t,n),i}s.prototype.parse=function(e,t,n){if(!r.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var s=e.indexOf("?"),a=-1!==s&&s127?T+="x":T+=B[N];if(!T.match(f)){var q=P.slice(0,A),j=P.slice(A+1),D=B.match(p);D&&(q.push(D[1]),j.unshift(D[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=q.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",R=this.hostname||"";this.host=R+F,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[E])for(A=0,O=u.length;A0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=e.search,n.query=e.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var L=S.slice(-1)[0],k=(n.host||e.host||S.length>1)&&("."===L||".."===L)||""===L,A=0,C=S.length;C>=0;C--)"."===(L=S[C])?S.splice(C,1):".."===L?(S.splice(C,1),A++):A&&(S.splice(C,1),A--);if(!_&&!E)for(;A--;A)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),k&&"/"!==S.join("/").substr(-1)&&S.push("");var I,P=""===S[0]||S[0]&&"/"===S[0].charAt(0);x&&(n.hostname=n.host=P?"":S.length?S.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(_=_||n.host&&S.length)&&!P&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},s.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";var i=n(43),r=n(19);function s(e,t){this.id=e,this.ref=t}e.exports.SchemaScanResult=s,e.exports.scan=function(e,t){function n(e,t){if(t&&"object"==typeof t)if(t.$ref){var s=i.resolve(e,t.$ref);l[s]=l[s]?l[s]+1:0}else{var u=t.$id||t.id,d=u?i.resolve(e,u):e;if(d){if(d.indexOf("#")<0&&(d+="#"),c[d]){if(!r.deepCompareStrict(c[d],t))throw new Error("Schema <"+d+"> already exists with different definition");return c[d]}c[d]=t,"#"==d[d.length-1]&&(c[d.substring(0,d.length-1)]=t)}o(d+"/items",Array.isArray(t.items)?t.items:[t.items]),o(d+"/extends",Array.isArray(t.extends)?t.extends:[t.extends]),n(d+"/additionalItems",t.additionalItems),a(d+"/properties",t.properties),n(d+"/additionalProperties",t.additionalProperties),a(d+"/definitions",t.definitions),a(d+"/patternProperties",t.patternProperties),a(d+"/dependencies",t.dependencies),o(d+"/disallow",t.disallow),o(d+"/allOf",t.allOf),o(d+"/anyOf",t.anyOf),o(d+"/oneOf",t.oneOf),n(d+"/not",t.not)}}function o(e,t){if(Array.isArray(t))for(var i=0;it.length?t.length:e.length);i++)n.push([e[i],t[i]]);return n},t.convertStaffToSb=function(e){const t=new DOMParser,n=new XMLSerializer,i=t.parseFromString(e,"text/xml"),s=i.documentElement;for(const e of s.getElementsByTagName("section")){const t=i.createElementNS("http://www.music-encoding.org/ns/mei","staff"),n=i.createElementNS("http://www.music-encoding.org/ns/mei","layer");t.setAttribute("n","1"),n.setAttribute("n","1"),t.appendChild(n);const r=Array.from(e.getElementsByTagName("staff"));for(const e of r){const t=e.getElementsByTagName("layer")[0],r=i.createElementNS("http://www.music-encoding.org/ns/mei","sb");r.setAttribute("n",e.getAttribute("n")),r.setAttribute("facs",e.getAttribute("facs")),r.setAttribute("xml:id",e.getAttribute("xml:id"));let s=void 0;for(null!==n.lastElementChild&&"custos"===n.lastElementChild.tagName&&(s=n.removeChild(n.lastElementChild)),void 0!==s&&n.appendChild(s),n.appendChild(r);null!==t.firstElementChild;)n.appendChild(t.firstElementChild);e.remove()}e.appendChild(t)}return r.xml(n.serializeToString(i))},t.getSyllableText=a,t.convertSbToStaff=function(e){const t=(new DOMParser).parseFromString(e,"text/xml"),n=t.documentElement,c=Array.from(n.getElementsByTagName("neume"));for(const e of c)if(0===e.getElementsByTagName("nc").length){const t=e.getAttribute("xml:id");s.queueNotification("This file contains a neume without neume component!
ID: "+t,"warning")}const l=Array.from(n.getElementsByTagName("syllable"));for(const e of l)if(0===e.getElementsByTagName("neume").length){const t=e.getAttribute("xml:id");s.queueNotification("This file contains a syllable without neume!
ID: "+t,"warning")}for(const e of n.getElementsByTagName("section")){const n=Array.from(e.getElementsByTagName("staff"));for(const r of n){const n=r.getElementsByTagName("layer")[0],s=Array.from(n.getElementsByTagName("sb"));for(const e of s)if("layer"!==e.parentElement.tagName){const n=e.parentElement;let r=!1,s=!1;const o=Array.from(n.children),a=o.indexOf(e);for(const e of n.getElementsByTagName("neume")){const t=o.indexOf(e);ta&&(s=!0)}if(!r&&s)n.insertAdjacentElement("beforebegin",e);else if(r&&!s)n.insertAdjacentElement("afterend",e);else if(r&&s){const r=t.createElementNS("http://www.music-encoding.org/ns/mei","syllable");r.setAttribute("xml:id","m-"+(0,i.uuidv4)()),r.setAttribute("follows","#"+n.getAttribute("xml:id")),n.setAttribute("precedes","#"+r.getAttribute("xml:id"));const s=o.indexOf(e);for(const e of o){o.indexOf(e)>s&&r.appendChild(e)}n.insertAdjacentElement("afterend",e),e.insertAdjacentElement("afterend",r);for(const e of n.getElementsByTagName("custos"))n.insertAdjacentElement("afterend",e);for(const e of r.getElementsByTagName("clef"))r.insertAdjacentElement("beforebegin",e)}else console.warn("NONE BEHIND NONE AHEAD"),console.debug(n)}const a=Array.from(n.getElementsByTagName("sb"));for(let s=0;ss+1?a[s+1]:void 0,u=t.createElementNS("http://www.music-encoding.org/ns/mei","staff");o(c,u);const d=t.createElementNS("http://www.music-encoding.org/ns/mei","layer");d.setAttribute("n","1"),d.setAttribute("xml:id","m-"+(0,i.uuidv4)()),u.appendChild(d);const h=Array.from(n.children),f=h.slice(h.indexOf(c)+1,h.indexOf(l));for(const e of f)d.appendChild(e);e.insertBefore(u,r)}r.remove()}}const u=Array.from(n.getElementsByTagName("syllable"));for(const e of n.querySelectorAll("syllable")){for(const t of e.querySelectorAll("clef"))e.insertAdjacentElement("beforebegin",t);for(const t of e.querySelectorAll("custos"))e.insertAdjacentElement("afterend",t);const t=u.indexOf(e);if(e.hasAttribute("precedes")&&e.hasAttribute("follows")){const t=e.getAttribute("xml:id");s.queueNotification("This file contains a syllable that has both @precedes and @follows!
ID: "+t,"error")}else if(e.hasAttribute("precedes")){const n=e.getAttribute("precedes").replace("#","");let i;const r=u.find((e,t)=>e.getAttribute("xml:id")===n&&(i=t,!0));if(!r){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`Missing the 2nd part of the toggle-linked syllable (${t})
ID: ${n}`,"error");continue}if(!r.hasAttribute("follows")){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`The 2nd part of the toggle-linked syllable (${t}) does not link to any syllable
ID: ${n}`,"error");continue}if(r.getAttribute("follows")!="#"+e.getAttribute("xml:id")){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`The 2nd part of the toggle-linked syllable (${t}) links to the wrong syllable
ID: ${n}`,"error");continue}if(i!==t+1){const n=[a(e),...u.slice(t+1,i).map(e=>a(e))].join(" - "),r=e.getAttribute("xml:id");s.queueNotification(`Unexpected syllable(s) inside toggle-linked syllable: ${n}
ID: ${r}`,"error")}}else if(e.hasAttribute("follows")){const t=e.getAttribute("follows").replace("#",""),n=u.find(e=>e.getAttribute("xml:id")===t);if(!n){const t=a(e),n=e.getAttribute("xml:id");s.queueNotification(`Missing the 1st part of the toggle-linked syllable (${t})
ID: ${n}`,"error");continue}if(!n.hasAttribute("precedes")){const t=a(n),i=e.getAttribute("xml:id");s.queueNotification(`The 1st part of the toggle-linked syllable (${t}) does not link to any syllable
ID: ${i}`,"error");continue}if(n.getAttribute("precedes")!="#"+e.getAttribute("xml:id")){const t=a(n),i=e.getAttribute("xml:id");s.queueNotification(`The 1st part of the toggle-linked syllable (${t}) links to the wrong syllable
ID: ${i}`,"error")}}}const d=new XMLSerializer;return r.xml(d.serializeToString(t))},t.checkOutOfBoundsGlyphs=function(e){const t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=Array.from(t.querySelectorAll("zone")),i=t.querySelector("surface"),r=Number(i.getAttribute("lrx")),o=Number(i.getAttribute("lry"));n.some(e=>["ulx","uly","lrx","lry"].some(t=>function(e,t){const n=Number(e.getAttribute(t));return n<0||n>("lrx"==t||"ulx"==t?r:o)}(e,t)))&&s.queueNotification("This folio contains glyph(s) placed out-of-bounds!","warning")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blankPage=t.sendForValidation=t.init=void 0;const i=n(17),r=fetch("/Neon/Neon-gh/assets/mei-all.rng");let s,o,a;function c(e){const t=e.data;if(null===t){a.textContent="VALID",a.style.color="#4bc14b";for(const e of a.children)e.remove()}else{let e="";t.forEach(t=>{e+=t+"\n"}),a.textContent="",a.style.color="red";const n=document.createElement("div");n.textContent="INVALID",n.style.cursor="pointer",a.appendChild(n),n.addEventListener("click",l.bind(this,e))}}function l(e){this.modal.setModalWindowView(i.ModalWindowView.VALIDATION_STATUS,e),this.modal.openModalWindow()}t.init=async function(e){const t=document.getElementById("file-status");if(null!==t){const n=document.createElement("div");n.textContent="MEI Status:",n.id="validation_status_title";const i=document.createElement("span");i.id="validation_status",i.textContent="unknown",t.appendChild(n),t.appendChild(i),a=document.getElementById("validation_status"),s=new Worker("/Neon/Neon-gh/workers/Worker.js"),s.onmessage=c.bind(e)}},t.sendForValidation=async function(e){if(void 0!==a){if(void 0===o){const e=await r;o=await e.text()}a.textContent="checking...",a.style.color="gray",s.postMessage({mei:e,schema:o})}},t.blankPage=function(){for(const e of a.children)e.remove();a.textContent="No MEI",a.style.color="color:gray"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenUnsavedChanges=t.setSavedStatus=void 0;let i=!0;t.setSavedStatus=function(e=!1){i=e,function(){const e=document.querySelector("#file-saved"),t=i?"/Neon/Neon-gh/assets/img/saved-icon.svg":"/Neon/Neon-gh/assets/img/unsaved-icon.svg";e.setAttribute("src",t)}()},t.listenUnsavedChanges=function(){window.onbeforeunload=e=>{if(!i)return e.preventDefault(),"You have unsaved changes!"}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(i){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))}),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(82)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(30))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSelectionButtons=t.initInsertEditControls=t.bindInsertTabs=void 0;const i=n(7),r=n(15),s=n(3),o=n(6);function a(e,t){document.getElementById(e).classList.add("is-active"),document.getElementById(e).classList.contains("insertel")&&t.insertActive(e)}function c(e){document.querySelectorAll(e).forEach(e=>{e.classList.remove("is-active"),e.classList.remove("unfocused")})}t.bindInsertTabs=function(e){const t=Array.from(document.getElementsByClassName("insertTab")).map(e=>e.id);document.body.addEventListener("keydown",e=>{if(e.code.match(/^Digit\d$/)&&e.shiftKey)try{const t=Number(e.code[e.code.length-1])-1,n=document.getElementsByClassName("insertel");n[t].click()}catch(e){console.debug(e)}}),t.forEach(t=>{document.getElementById(t).addEventListener("click",()=>{c(".insertTab"),a(t,e),document.getElementById("insert_data").innerHTML=i.insertTabHtml[t],function(e){const t=Array.from(document.getElementsByClassName("insertel"));t.map(e=>e.id).forEach(t=>{document.getElementById(t).addEventListener("click",()=>{c(".insertel"),a(t,e)})})}(e),c(".insertel");a(document.getElementsByClassName("insertel")[0].id,e)})})},t.initInsertEditControls=function(){const e=document.getElementById("insert_controls"),t=document.getElementById("insertMenu"),n=t.querySelector(".panel-heading-title"),i=document.getElementById("insertContents"),r=t.querySelector("svg > use"),s=document.getElementById("edit_controls"),o=document.getElementById("editMenu"),a=o.querySelector(".panel-heading-title"),c=document.getElementById("editContents"),l=o.querySelector("svg > use");e.addEventListener("click",()=>{a.classList.remove("focused"),n.classList.add("focused"),document.querySelector(".insertel.is-active").click(),s.querySelector(".side-panel-btn.sel-by.is-active").classList.add("unfocused"),e.querySelector(".side-panel-btn.insertel.is-active").classList.remove("unfocused")}),s.addEventListener("click",()=>{n.classList.remove("focused"),a.classList.add("focused"),e.querySelector(".side-panel-btn.insertel.is-active").classList.add("unfocused"),s.querySelector(".side-panel-btn.sel-by.is-active").classList.remove("unfocused")}),t.addEventListener("click",e=>{e.stopPropagation(),i.classList.contains("closed")?(i.classList.remove("closed"),i.style.padding="0.5em 0.75em",setTimeout(()=>{i.style.overflow="visible"},200),r.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(i.classList.add("closed"),i.style.overflow="hidden",setTimeout(()=>{i.style.padding="0px"},200),r.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))}),o.addEventListener("click",e=>{e.stopPropagation(),c.classList.contains("closed")?(c.classList.remove("closed"),c.style.padding="0.5em 0.75em",setTimeout(()=>{c.style.overflow="visible"},200),l.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-down")):(c.classList.add("closed"),c.style.overflow="hidden",setTimeout(()=>{c.style.padding="0px"},200),l.setAttribute("xlink:href","/Neon/Neon-gh/assets/img/icons.svg#dropdown-side"))})},t.initSelectionButtons=function(){const e=document.getElementById("selBySyllable"),t=document.getElementById("selByNeume"),n=document.getElementById("selByNc"),i=document.getElementById("selByStaff"),a=document.getElementById("selByLayerElement");e.addEventListener("click",(function(){if(!e.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selBySyllable"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),e.classList.add("is-active"),t.classList.remove("is-active"),n.classList.remove("is-active"),i.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("syllable")}catch(e){}}})),t.addEventListener("click",(function(){if(!t.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByNeume"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),t.classList.add("is-active"),n.classList.remove("is-active"),e.classList.remove("is-active"),i.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("neume")}catch(e){}}})),n.addEventListener("click",(function(){if(!n.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByNc"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),n.classList.add("is-active"),t.classList.remove("is-active"),e.classList.remove("is-active"),i.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("neume")}catch(e){}}})),i.addEventListener("click",(function(){if(!i.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByStaff"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),i.classList.add("is-active"),t.classList.remove("is-active"),n.classList.remove("is-active"),e.classList.remove("is-active"),a.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("staff")}catch(e){}}})),a.addEventListener("click",(function(){if(!a.classList.contains("is-active")){(0,o.setSettings)({selectionMode:"selByLayerElement"}),(0,s.unselect)(),document.getElementById("moreEdit").innerHTML="",document.getElementById("extraEdit").innerHTML="",document.getElementById("moreEdit").parentElement.classList.add("hidden"),document.getElementById("extraEdit").parentElement.classList.add("hidden"),a.classList.add("is-active"),t.classList.remove("is-active"),n.classList.remove("is-active"),i.classList.remove("is-active"),e.classList.remove("is-active");try{document.getElementById("selByBBox").classList.remove("is-active")}catch(e){}try{"highlight-selection"===document.querySelector(".highlight-selected").id&&(0,r.setGroupingHighlight)("layerElement")}catch(e){}}})),document.body.addEventListener("keydown",r=>{"1"===r.key&&e.click(),"2"===r.key&&t.click(),"3"===r.key&&n.click(),"4"===r.key&&i.click(),"5"===r.key&&a.click()})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(8),r=n(12),s=n(4);t.default=class{constructor(e,t){this.firstClick=!0,this.insertDisabled=function(){this.type="",this.removeInsertClickHandlers(),document.body.removeEventListener("keydown",this.keydownListener),document.body.removeEventListener("keyup",this.resetInsertHandler),document.body.removeEventListener("click",this.clickawayHandler),this.firstClick=!0;try{document.getElementById("returnToEditMode").remove()}catch(e){}const e=document.getElementById("insert_controls"),t=document.getElementById("insertMenu").querySelector(".panel-heading-title"),n=document.getElementById("edit_controls"),i=document.getElementById("editMenu").querySelector(".panel-heading-title");t.classList.remove("focused"),i.classList.add("focused"),e.querySelector(".side-panel-btn.insertel.is-active").classList.add("unfocused"),n.querySelector(".side-panel-btn.sel-by.is-active").classList.remove("unfocused")}.bind(this),this.clickawayHandler=function(e){const t=e.target;null===t.closest(".active-page")&&null===t.closest("#insert_controls")&&null===t.closest("#svg_group")&&(this.insertDisabled(),document.body.removeEventListener("keydown",this.staffHandler),document.body.removeEventListener("keydown",this.handler))}.bind(this),this.resetInsertHandler=function(e){"Shift"===e.key&&document.querySelector(this.selector).addEventListener("click","staff"===this.type?this.staffHandler:this.handler)}.bind(this),this.keydownListener=function(e){"Escape"===e.key?(this.insertDisabled(),document.body.removeEventListener("keydown",this.staffHandler),document.body.removeEventListener("keydown",this.handler)):"Shift"===e.key&&this.removeInsertClickHandlers()}.bind(this),this.handler=function(e){e.stopPropagation();const t=(0,r.getSVGRelCoords)(e.clientX,e.clientY);if((0,r.isOutOfSVGBounds)(t.x,t.y))return(0,s.queueNotification)("[FAIL] Glyph was placed out of bounds! Insertion failed.","error");const n={action:"insert",param:{elementType:this.type,staffId:"auto",ulx:t.x,uly:t.y}};null!==this.attributes&&(n.param.attributes=this.attributes,"F"===this.attributes.shape&&(n.param.ulx-=50)),this.neonView.edit(n,this.neonView.view.getCurrentPageURI()).then(()=>this.neonView.updateForCurrentPage()).then(()=>{document.querySelector(this.selector).addEventListener("click",this.handler)})}.bind(this),this.staffHandler=function(e){const t=(0,r.getSVGRelCoords)(e.clientX,e.clientY);if((0,r.isOutOfSVGBounds)(t.x,t.y))return(0,s.queueNotification)("Staff cannot be placed out of bounds!","error");const n=document.querySelector(".active-page > .definition-scale");if(this.firstClick)this.coord=t,i.select(n).append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",10).attr("id","staff-circle").attr("fill","green"),this.firstClick=!1;else{let e,n;t.x{this.neonView.updateForCurrentPage(),this.firstClick=!0})}}.bind(this),this.removeInsertClickHandlers=function(){try{document.querySelector(this.selector).removeEventListener("click",this.staffHandler),document.querySelector(this.selector).removeEventListener("click",this.handler)}catch(e){}}.bind(this),this.neonView=e,this.selector=t}insertActive(e){const t=this.isInsertMode();switch(e){case"punctum":this.type="nc",this.attributes=null;break;case"diamond":this.type="nc",this.attributes={tilt:"se"};break;case"virga":this.type="nc",this.attributes={tilt:"s"};break;case"liquescentA":this.type="nc",this.attributes={curve:"a"};break;case"liquescentC":this.type="nc",this.attributes={curve:"c"};break;case"virgaReversed":this.type="nc",this.attributes={tilt:"n"};break;case"pes":case"clivis":case"scandicus":case"climacus":case"torculus":case"porrectus":case"pressus":const t=this.neonView.info.getContourByValue(e.charAt(0).toUpperCase()+e.slice(1));this.type="grouping",this.attributes={contour:t};break;case"cClef":case"fClef":this.type="clef",this.attributes={shape:e.charAt(0).toUpperCase()};break;case"custos":this.type="custos",this.attributes=null;break;case"divLineMaxima":this.type="divLine",this.attributes={form:"maxima"};break;case"staff":this.type="staff",this.attributes=null;break;case"flat":this.type="accid",this.attributes={accid:"f"};break;case"natural":this.type="accid",this.attributes={accid:"n"};break;default:return this.type="",this.attributes=null,void console.error("Invalid button for insertion: "+e+".")}this.removeInsertClickHandlers();try{"staff"===this.type?document.querySelector(this.selector).addEventListener("click",this.staffHandler):document.querySelector(this.selector).addEventListener("click",this.handler)}catch(e){}if(document.body.addEventListener("keydown",this.keydownListener),document.body.addEventListener("keyup",this.resetInsertHandler),!t){const e=document.createElement("button");e.id="returnToEditMode",e.classList.add("side-panel-btn"),e.innerHTML="Return to Edit Mode",document.getElementById("redo").parentNode.appendChild(e),e.addEventListener("click",this.insertDisabled)}document.getElementById("editContents").addEventListener("click",this.clickawayHandler)}isInsertMode(){return""!==this.type}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.undoRedoPanel=t.navbarFinalize=t.navbarDropdownMEIActionsMenu=t.navbarDropdownFileMenu=void 0,t.navbarDropdownFileMenu=document.createElement("div"),t.navbarDropdownFileMenu.classList.add("navbar-item","has-dropdown","is-hoverable");const i=document.createElement("div");i.classList.add("navbar-btn"),i.innerHTML="
File
";const r=document.createElement("div");r.classList.add("navbar-dropdown"),r.id="navbar-dropdown-options";[["save","Save"],["export","Save and Export to File"],["getmei","Download MEI"]].forEach(e=>{const t=document.createElement("div");t.id=e[0],t.classList.add("navbar-dropdown-item"),t.textContent=e[1],r.appendChild(t)}),t.navbarDropdownFileMenu.appendChild(i),t.navbarDropdownFileMenu.appendChild(r),t.navbarDropdownMEIActionsMenu=document.createElement("div"),t.navbarDropdownMEIActionsMenu.classList.add("navbar-item","has-dropdown","is-hoverable");const s=document.createElement("div");s.classList.add("navbar-btn"),s.innerHTML="
MEI Actions
";const o=document.createElement("div");o.classList.add("navbar-dropdown"),o.id="navbar-dropdown-options";[["remove-empty-syls","Remove Empty Syllables"],["remove-empty-neumes","Remove Empty Neumes"],["revert","Revert"]].forEach(e=>{const t=document.createElement("div");t.id=e[0],t.classList.add("navbar-dropdown-item"),t.textContent=e[1],o.appendChild(t)}),t.navbarDropdownMEIActionsMenu.appendChild(s),t.navbarDropdownMEIActionsMenu.appendChild(o),t.navbarFinalize=' Finalize MEI ',t.undoRedoPanel='\n '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initUndoRedoPanel=t.initNavbar=void 0;const i=n(4),r=n(45);t.initNavbar=function(e){const t=document.querySelectorAll(".navbar-item.has-dropdown.is-hoverable");Array.from(t).forEach(e=>{e.addEventListener("mouseover",()=>{})}),document.getElementById("save").addEventListener("click",()=>{e.save().then(()=>{i.queueNotification("Saved","success")})}),document.body.addEventListener("keydown",t=>{"s"===t.key&&e.save().then(()=>{i.queueNotification("Saved","success")})}),document.getElementById("export").addEventListener("click",()=>{e.export().then(t=>{const n=document.createElement("a");n.href=t,n.download=e.name+".jsonld",document.body.appendChild(n),n.click(),n.remove(),i.queueNotification("Saved","success")})}),document.getElementById("getmei").addEventListener("click",()=>{const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(t=>{const n="data:application/mei+xml;base64,"+window.btoa((0,r.convertStaffToSb)(t));document.getElementById("getmei").setAttribute("href",n),document.getElementById("getmei").setAttribute("download",e.view.getPageName()+".mei")})}),document.getElementById("remove-empty-syls").addEventListener("click",(function(){const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(n=>{const r=(new DOMParser).parseFromString(n,"text/xml").documentElement,s=Array.from(r.getElementsByTagName("syllable"));let o=!1;const a=[];for(const e of s)if(0===e.getElementsByTagName("neume").length){const t={action:"remove",param:{elementId:e.getAttribute("xml:id")}};a.push(t),o=!0}if(o){const n={action:"chain",param:a};e.edit(n,t).then(t=>{t?(e.updateForCurrentPage(),i.queueNotification("Removed empty Syllables","success")):i.queueNotification("Failed to remove empty Syllables","error")})}else i.queueNotification("No empty syllables found","warning")})})),document.getElementById("remove-empty-neumes").addEventListener("click",(function(){const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(n=>{const r=(new DOMParser).parseFromString(n,"text/xml").documentElement,s=Array.from(r.getElementsByTagName("neume"));let o=!1;const a=[];for(const e of s)if(0===e.getElementsByTagName("nc").length){const t={action:"remove",param:{elementId:e.getAttribute("xml:id")}};a.push(t),o=!0}if(o){const n={action:"chain",param:a};e.edit(n,t).then(t=>{t?(e.updateForCurrentPage(),i.queueNotification("Removed empty Neumes","success")):i.queueNotification("Failed to remove empty Neumes","error")})}else i.queueNotification("No empty Neumes found","warning")})})),document.getElementById("remove-out-of-bounds-glyphs").addEventListener("click",(function(){const t=e.view.getCurrentPageURI();e.getPageMEI(t).then(n=>{const r=(new DOMParser).parseFromString(n,"text/xml").documentElement,s=r.querySelector("surface"),o=Number(s.getAttribute("lrx")),a=Number(s.getAttribute("lry"));const c=Array.from(r.querySelectorAll("zone")).filter(e=>["ulx","uly","lrx","lry"].some(t=>function(e,t){const n=Number(e.getAttribute(t));return n<0||n>("lrx"==t||"ulx"==t?o:a)}(e,t))),l=new Map(c.map(e=>[e.getAttribute("xml:id"),e])),u=Array.from(r.querySelectorAll("nc, divLine, clef, accid")).filter(e=>{if(e.hasAttribute("facs")){const t=e.getAttribute("facs").slice(1);return l.has(t)}return!1});if(0===u.length)return i.queueNotification("There are no out-of-bound glyphs to remove.","warning");const d={action:"chain",param:u.map(e=>({action:"remove",param:{elementId:e.getAttribute("xml:id")}}))};e.edit(d,t).then(t=>{t?(e.updateForCurrentPage(),i.queueNotification("Successfully removed out-of-bounds syllables.","success")):i.queueNotification("Failed to remove out-of-bound syllables.","error")})})})),document.getElementById("revert").addEventListener("click",(function(){window.confirm("Reverting will cause all changes to be lost. Press OK to continue.")&&e.deleteDb().then(()=>{window.location.reload()})}))},t.initUndoRedoPanel=function(e){function t(){e.undo().then(t=>{t?e.updateForCurrentPage():(i.queueNotification("There is nothing left to undo."),console.warn("Failed to undo action"))})}function n(){e.redo().then(t=>{t?e.updateForCurrentPage():(i.queueNotification("There is nothing left to redo."),console.warn("Failed to redo action"))})}document.getElementById("undo").addEventListener("click",t),document.body.addEventListener("keydown",e=>{"z"===e.key&&(e.ctrlKey||e.metaKey)&&t()}),document.getElementById("redo").addEventListener("click",n),document.body.addEventListener("keydown",e=>{("Z"===e.key||"z"===e.key&&e.shiftKey)&&(e.ctrlKey||e.metaKey)&&n()})}},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(62),r=n(78),s=n(79),o=n(84),a=n(86),c=n(87),l=n(88),u=n(89),d=n(28),h=n(29),f=g("manifest"),p=g("storage");if(f){const e=`./samples/manifests/${f}.jsonld`;window.fetch(e).then(e=>{if(e.ok)return e.text();throw new Error(e.statusText)}).then(async e=>{let t;try{t=JSON.parse(e)}catch(t){return console.error(t),void console.debug(e)}let n;n=(await new Promise((e,n)=>{window.fetch(t.image).then(t=>{e(t.headers.get("Content-Type"))}).catch(e=>{n(e)})})).match(/image\/*/)?{manifest:t,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:o.default,NeumeEdit:c.default}:{manifest:t,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:s.default,NeumeEdit:a.default};new i.default(n).start()})}else{new h.default("Neon-User-Storage").getAttachment(p,"manifest").then(e=>new window.Response(e).json()).then(async e=>{let t;t=(await new Promise((t,n)=>{window.fetch(e.image).then(e=>{t(e.headers.get("Content-Type"))}).catch(e=>{n(e)})})).match(/image\/*/)?{manifest:e,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:o.default,NeumeEdit:c.default}:{manifest:e,Display:r.default,Info:l.default,TextView:u.default,TextEdit:d.default,View:s.default,NeumeEdit:a.default};new i.default(t).start()})}function g(e){let t;return window.location.search.substr(1).split("&").forEach(n=>{const i=n.split("=");i[0]===e&&(t=decodeURIComponent(i[1]))}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(63),r=n(46),s=n(66),o=n(77),a=n(17),c=n(27),l=n(47),u=n(6);t.default=class{constructor(e){(0,s.parseManifest)(e.manifest)||console.error("Unable to parse the manifest"),this.params=e,this.manifest=e.manifest}setupEdit(e){void 0!==e.NeumeEdit&&(this.NeumeEdit=new e.NeumeEdit(this)),void 0!==e.TextView&&(this.textView=new e.TextView(this),void 0!==e.TextEdit&&(this.TextEdit=new e.TextEdit(this)))}start(){(0,o.default)(this).then(()=>(this.localSettings=new u.default(this.manifest["@id"]),this.view=new this.params.View(this,this.params.Display,this.manifest.image),this.name=this.manifest.title,this.core=new i.default(this.manifest),this.info=new this.params.Info(this),this.modal=new a.ModalWindow(this),r.init(this),(0,c.initErrorLog)(),(0,l.listenUnsavedChanges)(),this.setupEdit(this.params),this.core.initDb())).then(()=>this.updateForCurrentPage(!0)).then(()=>{this.view.onSVGLoad()})}updateForCurrentPage(e=!1){const t=this.view.getCurrentPage();return this.view.changePage(t,e)}redo(){return(0,l.setSavedStatus)(!1),this.core.redo(this.view.getCurrentPageURI())}undo(){return(0,l.setSavedStatus)(!1),this.core.undo(this.view.getCurrentPageURI())}getUserMode(){return void 0!==this.NeumeEdit?this.NeumeEdit.getUserMode():void 0!==this.TextEdit?"edit":"viewer"}edit(e,t){return this.core.edit(e,t)}getElementAttr(e,t){return this.core.getElementAttr(e,t)}export(){return new Promise((e,t)=>{this.core.updateDatabase().then(()=>{this.manifest.mei_annotations=this.core.getAnnotations(),this.manifest.timestamp=(new Date).toISOString();const t=new window.Blob([JSON.stringify(this.manifest,null,2)],{type:"application/ld+json"}),n=new FileReader;n.addEventListener("load",()=>{e(n.result)}),n.readAsDataURL(t)}).catch(e=>{t(e)})})}save(){return(0,l.setSavedStatus)(!0),this.core.updateDatabase()}deleteDb(){return this.core.deleteDb()}getPageURI(e){return void 0===e&&(e=this.view.getCurrentPageURI()),new Promise(t=>{this.core.getMEI(e).then(e=>{t("data:application/mei+xml;charset=utf-8,"+encodeURIComponent(e))})})}getPageMEI(e){return this.core.getMEI(e)}getPageSVG(e){return this.core.getSVG(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(45),r=n(46),s=n(65),o=n(23),a=n(29),c=n(47);t.default=class{constructor(e){this.verovioWrapper=new s.default,this.undoStacks=new Map,this.redoStacks=new Map,this.neonCache=new Map,this.parser=new DOMParser,this.db=new a.default("Neon"),this.blankPages=[],this.manifest=e,this.annotations=e.mei_annotations,this.lastPageLoaded=""}getAnnotations(){return this.annotations}async initDb(e=!1){return await new Promise((t,n)=>{this.db.get(this.manifest["@id"]).catch(e=>{if("not_found"===e.name){const e={_id:this.manifest["@id"],timestamp:this.manifest.timestamp,image:this.manifest.image,title:this.manifest.title,annotations:[]};return this.annotations.forEach(t=>{e.annotations.push(t.id)}),e}return console.error(e),n(e)}).then(async i=>{const r=/(.+[-+\u2212]\d\d)(\d\d)$/;if(new Date(i.timestamp).getTime()>(r.test(this.manifest.timestamp)?new Date(this.manifest.timestamp.replace(r,"$1:$2")).getTime():new Date(this.manifest.timestamp).getTime())&&!e){this.annotations=[];const e=i.annotations.map(e=>new Promise(t=>{this.db.get(e).then(e=>{this.annotations.push({id:e._id,type:"Annotation",body:e.body,target:e.target}),t("")}).catch(e=>{console.error(e),t("")})}));return await Promise.all(e),t(!1)}for(const e of this.annotations)await this.db.get(e.id).catch(t=>"not_found"===t.name?{_id:e.id}:(console.error(t),n(t))).then(t=>(t.body=e.body,t.target=e.target,this.db.put(t))).catch(e=>{n(e),console.error(e)});return this.db.put(i)}).then(()=>t(!0)).catch(e=>{n(e),console.error(e)})})}loadPage(e){return new Promise((t,n)=>{if(this.lastPageLoaded===e&&this.neonCache.has(e))t(this.neonCache.get(e));else if(this.neonCache.has(e))this.loadData(e,this.neonCache.get(e).mei).then(()=>{t(this.neonCache.get(e))});else if(this.blankPages.includes(e)){r.blankPage();const t=new Error("No MEI file for page "+e);t.name="missing_mei",n(t)}else{const s=this.annotations.find(t=>t.target===e);s?window.fetch(s.body).then(e=>{if(e.ok)return e.text();throw new Error(e.statusText)}).then(n=>{n.match(//)&&(n=(0,i.convertSbToStaff)(n)),(0,i.checkOutOfBoundsGlyphs)(n),this.loadData(e,n).then(()=>{t(this.neonCache.get(e))})}).catch(e=>{n(e)}):(r.blankPage(),this.blankPages.push(e))}})}loadData(e,t,n=!1){return r.sendForValidation(t),this.lastPageLoaded=e,new Promise(i=>{const r={id:(0,o.uuidv4)(),action:"renderData",mei:t};this.verovioWrapper.addEventListener("message",function s(o){if(o.data.id===r.id){const r=this.parser.parseFromString(o.data.svg,"image/svg+xml").documentElement;this.neonCache.set(e,{svg:r,mei:t,dirty:n}),o.target.removeEventListener("message",s),i()}}.bind(this)),this.verovioWrapper.postMessage(r)})}getSVG(e){return new Promise((t,n)=>{this.loadPage(e).then(e=>{t(e.svg)}).catch(e=>{n(e)})})}getMEI(e){return new Promise((t,n)=>{this.loadPage(e).then(e=>{t(e.mei)}).catch(e=>{n(e)})})}getElementAttr(e,t){return new Promise(n=>{this.loadPage(t).then(()=>{const t={id:(0,o.uuidv4)(),action:"getElementAttr",elementId:e};this.verovioWrapper.addEventListener("message",(function e(i){i.data.id===t.id&&(i.target.removeEventListener("message",e),n(i.data.attributes))})),this.verovioWrapper.postMessage(t)})})}edit(e,t){let n;return n=this.lastPageLoaded===t?Promise.resolve(this.neonCache.get(t)):this.loadPage(t),new Promise(i=>{n.then(n=>{n.svg=null;const r=n.mei,s={id:(0,o.uuidv4)(),action:"edit",editorAction:e};this.verovioWrapper.addEventListener("message",function e(n){if(n.data.id===s.id){if(n.data.result){this.undoStacks.has(t)||this.undoStacks.set(t,[]);const e=this.undoStacks.get(t);e.push(r)>10&&this.undoStacks.set(t,e.slice(1)),this.redoStacks.set(t,[])}n.target.removeEventListener("message",e),this.updateCache(t,!0).then(()=>{i(n.data.result)}),(0,c.setSavedStatus)(!1)}}.bind(this)),this.verovioWrapper.postMessage(s)})})}updateCache(e,t){return new Promise(n=>{let i,s;const a=new Promise(e=>{const t={id:(0,o.uuidv4)(),action:"getMEI"};this.verovioWrapper.addEventListener("message",(function n(s){s.data.id===t.id&&(i=s.data.mei,s.target.removeEventListener("message",n),r.sendForValidation(i),e(""))})),this.verovioWrapper.postMessage(t)}),c=new Promise(e=>{const t={id:(0,o.uuidv4)(),action:"renderToSVG"};this.verovioWrapper.addEventListener("message",(function n(i){i.data.id===t.id&&(s=i.data.svg,i.target.removeEventListener("message",n),e(""))})),this.verovioWrapper.postMessage(t)});a.then(()=>c).then(()=>{const r=this.parser.parseFromString(s,"image/svg+xml").documentElement;this.neonCache.set(e,{mei:i,svg:r,dirty:t}),n()})})}info(e){let t;return t=this.lastPageLoaded===e?Promise.resolve():this.loadPage(e),new Promise(e=>{t.then(()=>{const t={id:(0,o.uuidv4)(),action:"editInfo"};this.verovioWrapper.addEventListener("message",(function n(i){i.data.id===t.id&&(i.target.removeEventListener("message",n),e(i.data.info))})),this.verovioWrapper.postMessage(t)})})}undo(e){return new Promise(async t=>{if(!this.undoStacks.has(e))return t(!1);const n=this.undoStacks.get(e).pop();if(!n)return t(!1);const i=await this.getMEI(e);return this.redoStacks.get(e).push(i),await this.loadData(e,n,!0),t(!0)})}redo(e){return new Promise(async t=>{if(!this.redoStacks.has(e))return t(!1);const n=this.redoStacks.get(e).pop();if(!n)return t(!1);const i=await this.getMEI(e);return this.undoStacks.get(e).push(i),await this.loadData(e,n,!0),t(!0)})}async updateDatabase(){let e=!1;for(const t of this.neonCache){const n=t[0],i=t[1];if(i.dirty){e=!0;const t=this.annotations.findIndex(e=>e.target===n);let r;this.annotations[t].body.match(/^data:/)?r="data:application/mei+xml;base64,"+window.btoa(i.mei):await window.fetch(this.annotations[t].body,{method:"PUT",headers:{"Content-Type":"application/mei+xml"},body:i.mei}).then(e=>{r=e.ok?this.annotations[t].body:"data:application/mei+xml;base64,"+window.btoa(i.mei)}).catch(e=>{console.error(e),console.warn("Falling back to data URI"),r="data:application/mei+xml;base64,"+window.btoa(i.mei)}),this.annotations[t].body=r,await this.db.get(this.annotations[t].id).then(e=>(e.body=r,this.db.put(e))).then(()=>{i.dirty=!1}).catch(e=>{console.error(e)})}}e&&await this.db.get(this.manifest["@id"]).then(e=>(e.timestamp=(new Date).toISOString(),this.db.put(e))).catch(e=>{console.error(e)})}async deleteDb(){const e=await this.db.get(this.manifest["@id"]).then(e=>e.annotations);e.push(this.manifest["@id"]);const t=e.map(e=>new Promise(t=>{this.db.get(e).then(e=>this.db.remove(e)).then(()=>t())}));return Promise.all(t)}}},function(e,t){ /** * vkBeautify - javascript plugin to pretty-print or minify text in XML, JSON, CSS and SQL formats. * @@ -60,4 +60,4 @@ function n(e){var t=" ";if(isNaN(parseInt(e)))t=e;else switch(e){case 1:t=" " * @license MIT, see http://github.com/asvd/dragscroll * @copyright 2015 asvd */r=[t],void 0===(s="function"==typeof(i=function(e){var t,n,i=window,r=document,s=[],o=function(e,o){for(e=0;e{if("%%"===n)return"%";o++;const s=t.formatters[r];if("function"==typeof s){const t=e[o];n=s.call(i,t),e.splice(o,1),o--}return n}),t.formatArgs.call(i,e);(i.log||t.log).apply(i,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=i,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==t.namespaces&&(r=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*s;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*i;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=s)return o(e,t,s,"day");if(t>=r)return o(e,t,r,"hour");if(t>=i)return o(e,t,i,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=s)return Math.round(e/s)+"d";if(t>=r)return Math.round(e/r)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(16),r=n(85),s=n(8),o=n(6);t.default=class{constructor(e,t,n){this.neonView=e,this.container=document.getElementById("container"),this.updateCallbacks=new Array(0),this.group=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.group.id="svg_group",this.group.setAttribute("height",window.innerHeight.toString()),this.group.setAttribute("width","100%"),this.bg=document.createElementNS("http://www.w3.org/2000/svg","image"),this.bg.id="bgimg",this.bg.classList.add("background"),this.bg.setAttribute("x","0"),this.bg.setAttribute("y","0");const i=new FileReader;fetch(n).then(e=>{if(e.ok)return i.addEventListener("load",()=>{this.bg.setAttributeNS("http://www.w3.org/1999/xlink","href",i.result.toString());const e=this.bg.getBBox();if(!this.group.hasAttribute("viewBox")){let{viewBox:t}=(0,o.getSettings)();t||(t="0 0 "+e.width.toString()+" "+e.height.toString()),this.group.setAttribute("viewBox",t)}}),e.blob()}).then(e=>{i.readAsDataURL(e)}),this.svg=document.createElementNS("http://www.w3.org/svg","svg"),this.svg.id="mei_output",this.svg.classList.add("neon-container","active-page"),this.group.appendChild(this.bg),this.group.appendChild(this.svg),this.container.appendChild(this.group),this.zoomHandler=new r.default,this.displayPanel=new t(this,"neon-container","background",this.zoomHandler),this.pageURI=n,document.getElementById("loading").style.display="none"}onSVGLoad(){this.setViewEventHandlers(),this.displayPanel.setDisplayListeners()}updateSVG(e){this.group.replaceChild(e,this.svg),this.svg=e,this.svg.id="mei_output",this.svg.classList.add("neon-container","active-page");const t=parseInt(this.svg.getAttribute("height")),n=parseInt(this.svg.getAttribute("width"));this.bg.setAttribute("height",t.toString()),this.bg.setAttribute("width",n.toString());const{viewBox:r}=(0,o.getSettings)();r?this.group.setAttribute("viewBox",r):this.group.setAttribute("viewBox","0 0 "+n+" "+t),(0,i.updateHighlight)(),this.resetTransformations(),this.updateCallbacks.forEach(e=>e())}async changePage(e,t){const n=await this.neonView.getPageSVG(this.getCurrentPageURI());this.updateSVG(n)}addUpdateCallback(e){this.updateCallbacks.push(e)}removeUpdateCallback(e){const t=this.updateCallbacks.findIndex(t=>t===e);-1!==t&&this.updateCallbacks.splice(t,1)}resetTransformations(){this.displayPanel.zoomHandler.restoreTransformation(),(0,i.setGlyphOpacityFromSlider)(),(0,i.setBgOpacityFromSlider)()}getCurrentPage(){return 0}getCurrentPageURI(){return this.pageURI}setViewEventHandlers(){document.body.addEventListener("keydown",e=>{switch(e.key){case"Shift":s.select("#svg_group").on(".drag",null),s.select("#svg_group").call(s.drag().on("start",this.displayPanel.zoomHandler.startDrag.bind(this.displayPanel.zoomHandler)).on("drag",this.displayPanel.zoomHandler.dragging.bind(this.displayPanel.zoomHandler)));break;case"h":document.getElementById("mei_output").setAttribute("visibility","hidden")}}),document.body.addEventListener("keyup",e=>{switch(e.key){case"Shift":s.select("#svg_group").on(".drag",null),"viewer"!==this.neonView.getUserMode()&&this.neonView.NeumeEdit.setSelectListeners();break;case"h":document.getElementById("mei_output").setAttribute("visibility","visible")}}),s.select("#container").on("touchstart",()=>{2===s.event.touches.length&&(this.displayPanel.zoomHandler.startDrag(),s.select("#container").on("touchmove",this.displayPanel.zoomHandler.dragging.bind(this.displayPanel.zoomHandler)),s.select("#container").on("touchend",()=>{s.select("#container").on("touchmove",null)}))}),s.select("#container").on("wheel",this.displayPanel.zoomHandler.scrollZoom.bind(this.displayPanel.zoomHandler),!1),window.onresize=()=>{const e=window.innerHeight,t=document.getElementById("container");e>Number(t.getAttribute("height"))&&t.setAttribute("height",e.toString())}}getPageName(){return this.neonView.name}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ZoomHandler=t.ViewBox=void 0;const i=n(8),r=n(6);class s{constructor(e,t){this.minX=0,this.minY=0,this.width=e,this.height=t,this.imageWidth=e,this.imageHeight=t}set(e,t,n,i){this.minX=e,this.minY=t,this.width=n,this.height=i}get(){return this.minX.toString()+" "+this.minY.toString()+" "+this.width+" "+this.height}zoomTo(e){const t=this.imageHeight/e,n=this.imageWidth/e;this.width=n,this.height=t}getZoom(){return this.imageWidth/this.width}translate(e,t){this.minX+=e,this.minY+=t}}t.ViewBox=s;class o{resetZoomAndPan(e=!0){const t=document.getElementById("bgimg");this.viewBox=new s(parseInt(t.getAttribute("width")),parseInt(t.getAttribute("height"))),e&&(this.updateSVGViewBox(),(0,r.setSettings)({zoom:100}))}zoomTo(e){this.setViewBox(),this.viewBox.zoomTo(e),this.updateSVGViewBox(),(0,r.setSettings)({zoom:Math.floor(100*e)})}translate(e,t){this.setViewBox(),this.viewBox.translate(e,t),this.updateSVGViewBox()}restoreTransformation(){void 0===this.viewBox?this.resetZoomAndPan(!1):this.updateSVGViewBox()}setViewBox(){if(void 0===this.viewBox){const e=document.getElementById("bgimg");this.viewBox=new s(parseInt(e.getAttribute("width")),parseInt(e.getAttribute("height")))}const e=document.getElementById("svg_group").getAttribute("viewBox").split(" ");this.viewBox.set(parseInt(e[0]),parseInt(e[1]),parseInt(e[2]),parseInt(e[3]))}updateSVGViewBox(){const e=this.viewBox.get();document.getElementById("svg_group").setAttribute("viewBox",e),(0,r.setSettings)({viewBox:e})}startDrag(){const e=document.getElementById("svg_group");this.dragCoordinates=e.createSVGPoint(),"touchstart"===i.event.type?(this.dragCoordinates.x=i.event.touches[0].screenX,this.dragCoordinates.y=i.event.touches[0].screenY):(this.dragCoordinates.x=i.event.x,this.dragCoordinates.y=i.event.y),this.matrix=e.getScreenCTM().inverse()}dragging(){const e=document.getElementById("svg_group"),t=e.createSVGPoint();"touchmove"===i.event.type?(t.x=i.event.touches[0].screenX,t.y=i.event.touches[0].screenY):"wheel"===i.event.type&&!1===i.event.shiftKey?(void 0===this.matrix&&(this.matrix=e.getScreenCTM().inverse()),void 0===this.dragCoordinates&&(this.dragCoordinates=e.createSVGPoint()),this.dragCoordinates.x=i.event.x,this.dragCoordinates.y=i.event.y,t.x=this.dragCoordinates.x-i.event.deltaX,t.y=this.dragCoordinates.y-i.event.deltaY,i.event.preventDefault()):(t.x=i.event.x,t.y=i.event.y);const n=t.matrixTransform(this.matrix),r=this.dragCoordinates.matrixTransform(this.matrix);this.translate(-n.x+r.x,-n.y+r.y),this.dragCoordinates=t}scrollZoom(){if("wheel"!==i.event.type)return;if(!i.event.shiftKey)return void this.dragging();const e=document.getElementById("zoomSlider");this.setViewBox();let t=this.viewBox.getZoom()-i.event.deltaX/100;tparseInt(e.getAttribute("max"))/100&&(t=4),this.zoomTo(t),e.value=(100*t).toString(),document.getElementById("zoomOutput").value=String(Math.round(100*t))}}t.ZoomHandler=o,t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(50),r=n(26),s=n(51),o=n(13),a=n(16),c=n(18),l=n(7),u=n(52),d=n(6);t.default=class{constructor(e){this.neonView=e,this.initEditMode()}initEditMode(){document.getElementById("insert_controls").innerHTML+=l.insertControlsPanel,document.getElementById("edit_controls").innerHTML+=l.editControlsPanel,document.getElementById("undoRedo_controls").innerHTML=u.undoRedoPanel,this.dragHandler=new c.default(this.neonView,".active-page > svg"),this.insertHandler=new s.default(this.neonView,".active-page > svg"),(0,i.bindInsertTabs)(this.insertHandler),document.getElementById("primitiveTab").click(),r.setSelectHelperObjects(this.neonView,this.dragHandler),this.setSelectListeners(),o.initNeonView(this.neonView),(0,i.initInsertEditControls)(),r.setSelectStrokeWidth(1),(0,i.initSelectionButtons)(),(0,a.setHighlightSelectionControls)(),this.neonView.view.addUpdateCallback(this.setSelectListeners.bind(this)),document.getElementById("edit_controls").click();const{selectionMode:e}=(0,d.getSettings)();document.getElementById(e).click()}getUserMode(){return void 0!==this.insertHandler?this.insertHandler.isInsertMode()?"insert":"edit":"viewer"}setSelectListeners(){r.clickSelect(".active-page > svg > svg, .active-page > svg > svg use, .active-page > svg > svg rect"),r.dragSelect(".active-page svg")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(50),r=n(16),s=n(53),o=n(26),a=n(51),c=n(13),l=n(18),u=n(7),d=n(52),h=n(53),f=n(6);t.default=class{constructor(e){this.neonView=e,this.initEditMode()}initEditMode(){(0,h.initNavbar)(this.neonView),document.getElementById("insert_controls").innerHTML+=u.insertControlsPanel,document.getElementById("edit_controls").innerHTML+=u.editControlsPanel,document.getElementById("undoRedo_controls").innerHTML=d.undoRedoPanel,this.dragHandler=new l.default(this.neonView,"#svg_group"),this.insertHandler=new a.default(this.neonView,"#svg_group"),(0,i.bindInsertTabs)(this.insertHandler),document.getElementById("primitiveTab").click(),o.setSelectHelperObjects(this.neonView,this.dragHandler),this.setSelectListeners(),c.initNeonView(this.neonView),(0,i.initInsertEditControls)(),(0,i.initSelectionButtons)(),(0,s.initUndoRedoPanel)(this.neonView),(0,r.setHighlightOption)("selection"),this.neonView.view.addUpdateCallback(this.setSelectListeners.bind(this));const{selectionMode:e}=(0,f.getSettings)();document.getElementById(e).click()}getUserMode(){return void 0!==this.insertHandler?this.insertHandler.isInsertMode()?"insert":"edit":"viewer"}setSelectListeners(){o.clickSelect("#svg_group, #svg_group use, #svg_group rect"),o.dragSelect("#svg_group")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(6),r=new Map([["","Punctum"],["u","Pes"],["d","Clivis"],["uu","Scandicus"],["ud","Torculus"],["du","Porrectus"],["s","Distropha"],["ss","Tristopha"],["sd","Pressus"],["dd","Climacus"],["ddu","ClimacusResupinus"],["udu","TorculusResupinus"],["dud","PorrectusFlexus"],["udd","PesSubpunctis"],["uud","ScandicusFlexus"],["uudd","ScandicusSubpunctis"],["dudd","PorrectusSubpunctis"]]);function s(){const e=document.getElementById("neume_info"),t=document.getElementById("display-all-btn"),n=document.getElementById("displayInfo"),r=document.getElementById("displayBBox"),s=document.getElementById("displayText"),o=document.getElementById("display-errors");(0,i.setSettings)({displayInfo:n.checked}),n.checked?(e.setAttribute("style",""),(null==n?void 0:n.checked)&&(null==r?void 0:r.checked)&&(null==s?void 0:s.checked)&&(null==o?void 0:o.checked)&&(t.classList.add("selected"),t.innerHTML="Hide All")):(e.setAttribute("style","display: none"),t.classList.contains("selected")&&(t.classList.remove("selected"),t.innerHTML="Display All"))}function o(){document.getElementById("neume_info").innerHTML='
\n
Element Info
\n
Hover over any element to see its metadata
\n
',document.getElementById("neume_info").setAttribute("style","display: none"),function(){const{displayInfo:e}=(0,i.getSettings)();document.querySelector("#displayInfo").checked=e}(),s(),document.getElementById("displayInfo").addEventListener("click",s)}t.default=class{constructor(e){this.neonView=e;const t=document.getElementById("display-single-container"),n=document.createElement("label");n.classList.add("checkbox-container","side-panel-btn"),n.textContent="Info";const i=document.createElement("input");i.id="displayInfo",i.classList.add("checkbox"),i.type="checkbox",i.checked=!1,n.appendChild(i),t.prepend(n),this.neonView.view.addUpdateCallback(this.resetInfoListeners.bind(this)),o(),this.resetInfoListeners()}infoListeners(){try{document.getElementsByClassName("active-page")[0].querySelectorAll(".neume,.custos,.clef,.accid,.divLine").forEach(e=>{e.addEventListener("mouseover",this.updateInfo.bind(this))})}catch(e){}}stopListeners(){document.querySelectorAll(".neume,.custos,.clef,.accid,.divLine").forEach(e=>{e.removeEventListener("mouseover",this.updateInfo.bind(this))})}resetInfoListeners(){this.stopListeners(),this.infoListeners()}async updateInfo(e){const t=e.currentTarget.id;if(""===t)return Array.from(document.getElementById("neume_info").children).forEach(e=>{e.remove()}),void console.log("No id!");const n=document.getElementById(t),i=n.getAttribute("class").match(/neume|nc|clef|custos|staff|liquescent|accid|divLine/)[0];let r,s="";switch(i){case"neume":{const e=n.querySelectorAll(".nc");if(1===e.length){const t=await this.neonView.getElementAttr(e[0].id,this.neonView.view.getCurrentPageURI());if("a"===t.curve||"c"===t.curve){let t=await this.getPitches(e);t=t.trim().toUpperCase(),s="Shape: Liquescent\r\nPitch(es): "+t;break}}let t=await this.getContour(e);if(1===e.length){const t=await this.neonView.getElementAttr(e[0].id,this.neonView.view.getCurrentPageURI());if("s"===t.tilt){let t=await this.getPitches(e);t=t.trim().toUpperCase(),s="Shape: Virga \r\nPitch(es): "+t;break}if("n"===t.tilt){let t=await this.getPitches(e);t=t.trim().toUpperCase(),s="Shape: Reversed Virga \r\nPitch(es): "+t;break}}if("Clivis"===t){(await this.neonView.getElementAttr(e[0].id,this.neonView.view.getCurrentPageURI())).ligated&&(t="Ligature")}let i=await this.getPitches(e);i=i.trim().toUpperCase(),s="Shape: "+(void 0===t?"Compound":t)+"\r\nPitch(es): "+i;break}case"custos":r=await this.neonView.getElementAttr(t,this.neonView.view.getCurrentPageURI()),s+="Pitch: "+r.pname.toUpperCase()+r.oct;break;case"accid":{r=await this.neonView.getElementAttr(t,this.neonView.view.getCurrentPageURI());let e="";"F"==r.accid.toUpperCase()?e="Flat":"N"==r.accid.toUpperCase()&&(e="Natural"),s+="Accid Type: "+e;break}case"clef":{const e=await this.neonView.getElementAttr(t,this.neonView.view.getCurrentPageURI());if(e["dis.place"]&&void 0!==e.dis){s+="Octave Displacement: "+((e,t)=>("above"===e?"+":"-")+String(Math.floor(Number(t)/7)))(e["dis.place"],e.dis)+"\r\n"}else s+="Octave Displacement: None\r\n";s+="Shape: "+e.shape+"\r\nLine: "+e.line;break}case"divLine":r=await this.neonView.getElementAttr(t,this.neonView.view.getCurrentPageURI()),s+="DivLine Type: "+r.form;break;default:s+="nothing"}s=`Type: ${i}\n${s}`,this.updateInfoModule(s)}async getPitches(e){let t="";for(const n of e){const e=await this.neonView.getElementAttr(n.id,this.neonView.view.getCurrentPageURI());t+=e.pname+e.oct+" "}return t}async getContour(e){let t="",n=null;for(const i of e){const e=await this.neonView.getElementAttr(i.id,this.neonView.view.getCurrentPageURI());null!==n&&(n.oct>e.oct?t+="d":n.octthis.pitchNameToNum(e.pname)?t+="d":t+="s"),n=e}return void 0===r.get(t)&&console.warn("Unknown contour: "+t),r.get(t)}updateInfoModule(e){document.getElementsByClassName("info-bubble-body")[0].innerText=e,document.getElementById("displayInfo").checked&&(document.getElementsByClassName("info-bubble-container")[0].style.display="")}pitchNameToNum(e){switch(e){case"c":return 1;case"d":return 2;case"e":return 3;case"f":return 4;case"g":return 5;case"a":return 6;case"b":return 7;default:console.log("Unknown pitch name")}}getContourByValue(e){for(const[t,n]of r.entries())if(n===e)return t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=n(4),r=n(3),s=n(16),o=n(6);t.default=class{constructor(e){this.neonView=e,this.notificationSent=!1;const t=document.getElementById("display-single-container"),n=document.createElement("label"),i=document.createElement("label"),r=document.createElement("input"),s=document.createElement("input");r.classList.add("checkbox"),s.classList.add("checkbox"),n.classList.add("checkbox-container","side-panel-btn"),i.classList.add("checkbox-container","side-panel-btn"),n.textContent="Text",i.textContent="BBoxes",r.id="displayText",r.type="checkbox",s.id="displayBBox",s.type="checkbox",r.checked=!1,s.checked=!1,n.appendChild(r),i.appendChild(s),t.prepend(i),t.prepend(n),this.loadSettings(),this.setTextViewControls(),this.neonView.view.addUpdateCallback(this.updateTextViewVisibility.bind(this)),this.neonView.view.addUpdateCallback(this.updateBBoxViewVisibility.bind(this))}setTextViewControls(){this.updateTextViewVisibility(),this.updateBBoxViewVisibility(),document.getElementById("displayText").addEventListener("click",function(){this.updateTextViewVisibility()}.bind(this)),document.getElementById("displayBBox").addEventListener("click",function(){this.updateBBoxViewVisibility()}.bind(this))}loadSettings(){const{displayText:e,displayBBox:t}=(0,o.getSettings)();document.querySelector("#displayText").checked=e,document.querySelector("#displayBBox").checked=t}updateBBoxViewVisibility(){var e;const t=document.getElementById("display-all-btn"),n=document.getElementById("displayInfo"),i=document.getElementById("displayBBox"),a=document.getElementById("displayText"),c=document.getElementById("display-errors");if((0,o.setSettings)({displayBBox:i.checked}),i.checked)document.querySelectorAll(".sylTextRect").forEach(e=>{e.classList.add("sylTextRect-display"),e.classList.remove("sylTextRect")}),document.querySelectorAll(".syl.selected .sylTextRect-display").forEach(e=>{e.style.fill="red"}),"viewer"!==this.neonView.getUserMode()&&void 0!==this.neonView.TextEdit&&this.neonView.TextEdit.initSelectByBBoxButton(),(null==n?void 0:n.checked)&&(null==i?void 0:i.checked)&&(null==a?void 0:a.checked)&&(null==c?void 0:c.checked)&&(t.classList.add("selected"),t.innerHTML="Hide All");else{(null===(e=document.getElementById("selByBBox"))||void 0===e?void 0:e.classList.contains("is-active"))&&((0,r.unselect)(),document.getElementById("selByBBox").classList.remove("is-active"),document.getElementById("selBySyllable").classList.add("is-active")),document.querySelectorAll(".sylTextRect-display").forEach(e=>{e.classList.add("sylTextRect"),e.classList.remove("sylTextRect-display")}),document.querySelectorAll(".syl.selected .sylTextRect").forEach(e=>{e.style.fill="none"});try{document.getElementById("selByBBox").style.display="none"}catch(e){}t.classList.contains("selected")&&(t.classList.remove("selected"),t.innerHTML="Display All")}(0,s.updateHighlight)()}updateTextViewVisibility(){const e=document.getElementById("display-all-btn"),t=document.getElementById("displayInfo"),n=document.getElementById("displayBBox"),i=document.getElementById("displayText"),r=document.getElementById("display-errors");if((0,o.setSettings)({displayText:i.checked}),i.checked){const s=document.getElementById("syl_text");s.style.display="",s.innerHTML=`
\n
Syllables on this page
\n
${this.getSylText()}
\n
`;s.querySelectorAll("span").forEach(e=>{const t=document.getElementById(e.classList[0]),n=t.querySelector(".syl"),i=n.querySelector("text"),r=n.querySelector("rect");0===i.classList.length&&i.classList.add("text"),e.addEventListener("mouseover",()=>{t.classList.contains("syllable-highlighted")||(t.classList.add("selected"),t.querySelectorAll(".neume").forEach(e=>{e.classList.add("selected")}),null!==r&&(r.style.fill="#d00"))}),e.addEventListener("mouseleave",()=>{t.classList.contains("syllable-highlighted")||(t.classList.remove("selected"),t.querySelectorAll(".neume").forEach(e=>{e.classList.remove("selected")}),null!==r&&("rgb(0, 0, 0)"!==t.style.fill?r.style.fill=t.getAttribute("fill"):r.style.fill="blue"))})}),"viewer"!==this.neonView.getUserMode()&&void 0!==this.neonView.TextEdit&&this.neonView.TextEdit.initTextEdit(),(null==t?void 0:t.checked)&&(null==n?void 0:n.checked)&&(null==i?void 0:i.checked)&&(null==r?void 0:r.checked)&&(e.classList.add("selected"),e.innerHTML="Hide All")}else document.getElementById("syl_text").style.display="none",e.classList.contains("selected")&&(e.classList.remove("selected"),e.innerHTML="Display All")}getSylText(){let e="";return document.querySelectorAll(".active-page .syllable").forEach(t=>{if(null!==t.querySelector(".syl")){const n=t.querySelector(".syl");e+=``,""===n.textContent.trim()?e+="◊ ":Array.from(n.children[0].children[0].children).forEach(t=>{e+=""!==t.textContent?t.textContent:"◊ "}),e+=" "}}),this.notificationSent||(i.queueNotification("Blank syllables are represented by ◊!"),this.notificationSent=!0),e.replace(/\ue551/g,"-")}}},,,,function(e,t,n){"use strict";n.r(t);n(80),n(81);function i(e){const t=document.createElement(e),n=Array.prototype.slice.call(arguments,1);for(;n.length;){r(t,n.shift())}return t}function r(e,t){if(null!=t)if("object"!=typeof t&&"function"!=typeof t)e.appendChild(document.createTextNode(t));else if(t instanceof window.Node)e.appendChild(t);else if(t instanceof Array){const n=t.length;for(let i=0;i0;let s=i.length;for(;s--;)if(i[s]===e[1])return this._cache[n][r].splice(s,1),!0}return!1}unsubscribeAll(e){if(e){const t=Object.keys(this._cache);let n,i=t.length;for(;i--;)n=t[i],void 0!==this._cache[n][e]&&delete this._cache[n][e]}else this._cache={}}}};var d={onDoubleClick:function(e,t){e.addEventListener("dblclick",(function(e){e.ctrlKey||t(e,p(e.currentTarget,e))}));const n=f(500);e.addEventListener("contextmenu",(function(e){e.preventDefault(),e.ctrlKey&&(n.isTriggered()?(n.reset(),t(e,p(e.currentTarget,e))):n.trigger())}))},onPinch:function(e,t){let n=0;e.addEventListener("touchstart",(function(e){e.preventDefault(),2===e.originalEvent.touches.length&&(n=h(e.originalEvent.touches[0].clientX,e.originalEvent.touches[0].clientY,e.originalEvent.touches[1].clientX,e.originalEvent.touches[1].clientY))})),e.addEventListener("touchmove",(function(e){if(e.preventDefault(),2===e.originalEvent.touches.length){const i=e.originalEvent.touches,r=h(i[0].clientX,i[0].clientY,i[1].clientX,i[1].clientY),s=r-n;if(Math.abs(s)>0){const s={pageX:(i[0].clientX+i[1].clientX)/2,pageY:(i[0].clientY+i[1].clientY)/2};t(e,p(e.currentTarget,s),n,r)}}}))},onDoubleTap:function(e,t){const n=f(250);let i=null;e.addEventListener("touchend",e=>{if(e.preventDefault(),n.isTriggered()){n.reset();const r={pageX:e.originalEvent.changedTouches[0].clientX,pageY:e.originalEvent.changedTouches[0].clientY};h(i.pageX,i.pageY,r.pageX,r.pageY)<50&&t(e,p(e.currentTarget,r)),i=null}else i={pageX:e.originalEvent.changedTouches[0].clientX,pageY:e.originalEvent.changedTouches[0].clientY},n.trigger()})}};function h(e,t,n,i){return Math.sqrt((n-e)*(n-e)+(i-t)*(i-t))}function f(e){let t=!1,n=null;return{trigger(){t=!0,i(),n=setTimeout((function(){t=!1,n=null}),e)},isTriggered:()=>t,reset(){t=!1,i()}};function i(){null!==n&&(clearTimeout(n),n=null)}}function p(e,t){const n=e.getBoundingClientRect();return{left:t.pageX-n.left,top:t.pageY-n.top}}var g=n(32);class v{constructor(e,t){this.page=e,this._viewerCore=t,this._innerElement=this._viewerCore.getSettings().innerElement,this._pageToolsElem=null,this.labelWidth=0}mount(){null===this._pageToolsElem&&(this._buttons=this._initializePageToolButtons(),this._pageToolsElem=i("div",{class:"diva-page-tools-wrapper"},i("div",{class:"diva-page-tools"},this._buttons)),this._pageLabelsElem=i("div",{class:"diva-page-labels-wrapper"},i("div",{class:"diva-page-labels"},this._viewerCore.settings.manifest.pages[this.page].l))),this.refresh(),this._innerElement.appendChild(this._pageToolsElem),this._innerElement.appendChild(this._pageLabelsElem)}_initializePageToolButtons(){const e=this._viewerCore.getSettings(),t=this._viewerCore.getPublicInstance(),n=this.page;return this._viewerCore.getPageTools().map(i=>{const r=i.pageToolsIcon.cloneNode(!0);return r.addEventListener("click",r=>{i.handleClick.call(i,r,e,t,n)},!1),r.addEventListener("touchend",r=>{r.preventDefault(),i.handleClick.call(i,r,e,t,n)},!1),r})}unmount(){this._innerElement.removeChild(this._pageToolsElem),this._innerElement.removeChild(this._pageLabelsElem)}refresh(){const e=this._viewerCore.getPageRegion(this.page,{includePadding:!0,incorporateViewport:!0});let t=window.getComputedStyle(this._innerElement,null).getPropertyValue("margin-left");this._pageToolsElem.style.top=e.top+"px",this._pageToolsElem.style.left=e.left-parseInt(t)+"px",this._pageLabelsElem.style.top=e.top+"px",this._pageLabelsElem.style.left=e.right-parseInt(t)-this.labelWidth-5+"px"}}class m{constructor(e){if(this._viewerCore=e,this._viewerState=e.getInternalState(),this._overlays=[],this._viewerCore.getPageTools().length){const t=e.getSettings().numPages;for(let n=0;n{const n=t.getPageDimensions(e),s=t.getPageOffset(e,{includePadding:!0}),o=s.left+n.width/2,a=s.top+n.height/2,c=Math.max(Math.abs(r-o)-n.width/2,0),l=Math.max(Math.abs(i-a)-n.height/2,0);return-(c*c+l*l)});return null!=s?s:null}(e,this._viewerCore.getCurrentLayout(),this._viewerCore.getViewport());let i=this._viewerState.viewport.intersectionTolerance;this._viewerState.viewport.intersectionTolerance=0;let r=e.filter(e=>this._viewerState.renderer.isPageVisible(e));this._viewerState.viewport.intersectionTolerance=i,null!==n&&this._viewerCore.setCurrentPages(n,r),null!==t&&this._viewerCore.publish("ViewerDidJump",t),this._handleZoomLevelChange()}_handleZoomLevelChange(){const e=this._viewerState,t=e.options.zoomLevel;e.oldZoomLevel!==t&&e.oldZoomLevel>=0&&(e.oldZoomLevel{this._viewerCore.removePageOverlay(e)},this)}}class y{constructor(e){this._viewerCore=e}onDoubleClick(e,t){const n=this._viewerCore.getPagePositionAtViewportOffset(t),i=this._viewerCore.getCurrentLayout(),r=this._viewerCore.getViewport(),s=i.getPageToViewportCenterOffset(n.anchorPage,r);this._viewerCore.reload({inGrid:!1,goDirectlyTo:n.anchorPage,horizontalOffset:s.x+n.offset.left,verticalOffset:s.y+n.offset.top})}onPinch(){this._viewerCore.reload({inGrid:!1})}onViewWillLoad(){}onViewDidLoad(){}onViewDidUpdate(e,t){if(0===e.length)return;let n=this._viewerCore.viewerState.viewport.intersectionTolerance;this._viewerCore.viewerState.viewport.intersectionTolerance=0;let i=e.filter(e=>this._viewerCore.viewerState.renderer.isPageVisible(e));if(this._viewerCore.viewerState.viewport.intersectionTolerance=n,null!==t)return void this._viewerCore.setCurrentPages(t,i);const r=this._viewerCore.getCurrentLayout(),s=[];e.forEach(e=>{const t=r.getPageInfo(e).group;0!==s.length&&t===s[s.length-1]||s.push(t)});const o=this._viewerCore.getViewport();let a;a=1===s.length||s[0].region.top>=o.top?s[0]:s[1].region.bottom<=o.bottom?s[1]:function(e,t){const n=t.top+t.height/2;return Object(g.maxBy)(e,e=>{const t=e.region.top+e.dimensions.height/2;return-Math.abs(n-t)})}(s,o);const c=this._viewerCore.getSettings().activePageIndex;a.pages.some(e=>e.index===c)||this._viewerCore.setCurrentPages(a.pages[0].index,i)}destroy(){}}class b{constructor(){this._pages={},this._renderedPages=[],this._renderedPageMap={}}addOverlay(e){(this._pages[e.page]||(this._pages[e.page]=[])).push(e),this._renderedPageMap[e.page]&&e.mount()}removeOverlay(e){const t=e.page,n=this._pages[t];if(!n)return;const i=n.indexOf(e);-1!==i&&(this._renderedPageMap[t]&&n[i].unmount(),n.splice(i,1),0===n.length&&delete this._pages[t])}updateOverlays(e){const t=this._renderedPages,n={};e.map(e=>{n[e]=!0,this._renderedPageMap[e]||(this._renderedPageMap[e]=!0,this._invokeOnOverlays(e,e=>{e.mount()}))}),t.map(e=>{n[e]?this._invokeOnOverlays(e,e=>{e.refresh()}):(delete this._renderedPageMap[e],this._invokeOnOverlays(e,e=>{e.unmount()}))}),this._renderedPages=e}_invokeOnOverlays(e,t){const n=this._pages[e];n&&n.map(e=>t(e))}}class w{constructor(e,t){this._rows=e,this._cols=t,this._map=new Array(e).fill(null).map(()=>new Array(t).fill(!1))}isLoaded(e,t){return e>=this._rows||t>=this._cols||this._map[e][t]}set(e,t,n){this._map[e][t]=n}}class _{constructor(e){this._levels=e;const t=this._urlsToTiles={};e.forEach(e=>{e.tiles.forEach(n=>{t[n.url]={zoomLevel:e.zoomLevel,row:n.row,col:n.col}})}),this.clear()}clear(){const e=this._loadedByLevel={};this._levels.forEach(t=>{e[t.zoomLevel]=new w(t.rows,t.cols)})}getTiles(e){const t=[],n=this._levels[0].zoomLevel,i=new w(this._levels[0].rows,this._levels[0].cols);let r;if(null===e)r=0;else{const t=Math.ceil(e);r=function(e,t){const n=e.length;for(let i=0;ie.zoomLevel<=t)}this._levels.slice(0,r+1).reverse().concat(this._levels.slice(r+1)).forEach(e=>{const r=this._loadedByLevel[e.zoomLevel];let s=e.tiles.filter(e=>r.isLoaded(e.row,e.col));const o=Math.pow(2,n-e.zoomLevel);s=s.filter(e=>{let t=!1;const n=e.row*o,r=e.col*o;for(let e=0;e{s.push.apply(s,e)}),s}updateFromCache(e){this.clear(),this._levels.forEach(t=>{const n=this._loadedByLevel[t.zoomLevel];t.tiles.forEach(t=>{e.has(t.url)&&n.set(t.row,t.col,!0)})},this)}updateWithLoadedUrls(e){e.forEach(e=>{const t=this._urlsToTiles[e];this._loadedByLevel[t.zoomLevel].set(t.row,t.col,!0)},this)}}class E{constructor(e,t){const n=function(e,t){const n=null===t?e.pageLayouts:function(e,t){const n=Math.pow(2,t-e.maxZoomLevel);return e.pageLayouts.map(e=>({dimensions:x(e.dimensions,n),pages:e.pages.map(e=>({index:e.index,groupOffset:{top:Math.floor(e.groupOffset.top*n),left:Math.floor(e.groupOffset.left*n)},dimensions:x(e.dimensions,n)}))}))}(e,t),i=function(e,t){let n,i;const r=e.padding.document;e.verticallyOriented?(n="width",i=r.left+r.right):(n="height",i=r.top+r.bottom);return i+t.reduce((e,t)=>Math.max(t.dimensions[n],e),0)}(e,n);let r=e.verticallyOriented?e.padding.document.top:e.padding.document.left;const s=[],o={top:e.padding.page.top,left:e.padding.page.left};let a,c;n.forEach((t,n)=>{let a,c;e.verticallyOriented?(a=r,c=(i-t.dimensions.width)/2):(a=(i-t.dimensions.height)/2,c=r);const l={top:a,bottom:a+o.top+t.dimensions.height,left:c,right:c+o.left+t.dimensions.width};s.push({index:n,dimensions:t.dimensions,pages:t.pages,region:l,padding:o}),r=e.verticallyOriented?l.bottom:l.right}),e.verticallyOriented?(a=r+o.top,c=i):(a=i,c=r+o.left);return{dimensions:{height:a,width:c},pageGroups:s}}(e,t);this.dimensions=n.dimensions,this.pageGroups=n.pageGroups,this._pageLookup=function(e){const t={};return e.forEach(e=>{e.pages.forEach(n=>{t[n.index]={index:n.index,group:e,dimensions:n.dimensions,groupOffset:n.groupOffset}})}),t}(n.pageGroups)}getPageInfo(e){return this._pageLookup[e]||null}getPageDimensions(e){if(!this._pageLookup||!this._pageLookup[e])return null;const t=S(this._pageLookup[e]);return{height:t.bottom-t.top,width:t.right-t.left}}getPageOffset(e,t){const n=this.getPageRegion(e,t);return n?{top:n.top,left:n.left}:null}getPageRegion(e,t){const n=this._pageLookup[e];if(!n)return null;const i=S(n),r=n.group.padding;return t&&t.includePadding?{top:i.top+r.top,left:i.left+r.left,bottom:i.bottom,right:i.right}:{top:i.top,left:i.left,bottom:i.bottom+r.top,right:i.right}}getPageToViewportCenterOffset(e,t){const n=t.left,i=t.right-t.left,r=this.getPageOffset(e),s=n-r.left+parseInt(i/2,10),o=t.top,a=t.bottom-t.top;return{x:s,y:o-r.top+parseInt(a/2,10)}}}function S(e){const t=e.groupOffset.top+e.group.region.top,n=t+e.dimensions.height,i=e.groupOffset.left+e.group.region.left;return{top:t,bottom:n,left:i,right:i+e.dimensions.width}}function x(e,t){return{height:Math.floor(e.height*t),width:Math.floor(e.width*t)}}const L=n(49)("diva:ImageCache");class k{constructor(e){e=e||{maxKeys:100},this.maxKeys=e.maxKeys||100,this._held={},this._urls={},this._lru=[]}get(e){const t=this._urls[e];return t?t.img:null}has(e){return!!this._urls[e]}put(e,t){let n=this._urls[e];n?(n.img=t,this._promote(n)):(n={img:t,url:e},this._urls[e]=n,this._tryEvict(1),this._lru.unshift(n))}_promote(e){const t=this._lru.indexOf(e);this._lru.splice(t,1),this._lru.unshift(e)}_tryEvict(e){const t=this.maxKeys-e;if(this._lru.length<=t)return;let n=this._lru.length-1;for(;;){const e=this._lru[n];if(!this._held[e.url]&&(L("Evicting image %s",e.url),this._lru.splice(n,1),delete this._urls[e.url],this._lru.length<=t))break;if(0===n){L.enabled&&L("Cache overfull by %s (all entries are being held)",this._lru.length-t);break}n--}}acquire(e){this._held[e]=(this._held[e]||0)+1,this._promote(this._urls[e])}release(e){this._held[e]>1?this._held[e]--:delete this._held[e],this._tryEvict(0)}}class A{constructor(e){this._url=e.url,this._callback=e.load,this._errorCallback=e.error,this.timeoutTime=e.timeoutTime||0,this._aborted=this._complete=!1,this._crossOrigin=e.settings.imageCrossOrigin,this.timeout=setTimeout(()=>{this._image=new Image,this._image.crossOrigin=this._crossOrigin,this._image.onload=this._handleLoad.bind(this),this._image.onerror=this._handleError.bind(this),this._image.src=e.url},this.timeoutTime)}abort(){clearTimeout(this.timeout),this._image&&(this._image.onload=this._image.onerror=null,this._image.src=""),this._aborted=!0}_handleLoad(){this._aborted?console.error("ImageRequestHandler invoked on cancelled request for "+this._url):this._complete?console.error("ImageRequestHandler invoked on completed request for "+this._url):(this._complete=!0,this._callback(this._image))}_handleError(){this._errorCallback(this._image)}}var C={animate:function(e){const t=e.duration,n=e.parameters,i=e.onUpdate,r=e.onEnd,s=I(),o=s+t,a={},c={},l=Object.keys(n);l.forEach(e=>{const t=n[e];a[e]=function(e,t,n){return i=>e+(t-e)*n(i)}(t.from,t.to,t.easing||P)});let u=requestAnimationFrame((function e(){const n=I();(function(e){l.forEach(t=>{c[t]=a[t](e)})})(Math.min((n-s)/t,1)),i(c),nperformance.now():()=>Date.now();class O{constructor(e,t){this._viewport=e.viewport,this._outerElement=e.outerElement,this._documentElement=e.innerElement,this._settings=e.settings,this._hooks=t||{},this._canvas=i("canvas",{class:"diva-viewer-canvas"}),this._ctx=this._canvas.getContext("2d"),this.layout=null,this._sourceResolver=null,this._renderedPages=null,this._config=null,this._zoomLevel=null,this._compositeImages=null,this._renderedTiles=null,this._animation=null,this._cache=new k,this._pendingRequests={}}static getCompatibilityErrors(){return"undefined"!=typeof HTMLCanvasElement?null:["Your browser lacks support for the ",i("pre","canvas")," element. Please upgrade your browser."]}load(e,t,n){if(this._clearAnimation(),this._hooks.onViewWillLoad&&this._hooks.onViewWillLoad(),this._sourceResolver=n,this._config=e,this._compositeImages={},this._setLayoutToZoomLevel(t.zoomLevel),!this.layout.getPageInfo(t.anchorPage))throw new Error("invalid page: "+t.anchorPage);this._canvas.width===this._viewport.width&&this._canvas.height===this._viewport.height||(this._canvas.width=this._viewport.width,this._canvas.height=this._viewport.height),this.goto(t.anchorPage,t.verticalOffset,t.horizontalOffset),this._canvas.parentNode!==this._outerElement&&this._outerElement.insertBefore(this._canvas,this._outerElement.firstChild),this._hooks.onViewDidLoad&&this._hooks.onViewDidLoad()}_setViewportPosition(e){if(e.zoomLevel!==this._zoomLevel){if(null===this._zoomLevel)throw new TypeError("The current view is not zoomable");if(null===e.zoomLevel)throw new TypeError("The current view requires a zoom level");this._setLayoutToZoomLevel(e.zoomLevel)}this._goto(e.anchorPage,e.verticalOffset,e.horizontalOffset)}_setLayoutToZoomLevel(e){this.layout=new E(this._config,e),this._zoomLevel=e,s(this._documentElement,{style:{height:this.layout.dimensions.height+"px",width:this.layout.dimensions.width+"px"}}),this._viewport.setInnerDimensions(this.layout.dimensions)}adjust(){this._clearAnimation(),this._render(),this._hooks.onViewDidUpdate&&this._hooks.onViewDidUpdate(this._renderedPages.slice(),null)}_render(){const e=[];this.layout.pageGroups.forEach(t=>{if(!this._viewport.intersectsRegion(t.region))return;const n=t.pages.filter((function(e){return this.isPageVisible(e.index)}),this).map(e=>e.index);e.push.apply(e,n)},this),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._paintOutline(e),e.forEach(e=>{if(!this._compositeImages[e]){const t=this.layout.getPageInfo(e),n=this._sourceResolver.getAllZoomLevelsForPage(t),i=new _(n);i.updateFromCache(this._cache),this._compositeImages[e]=i}},this),this._initiateTileRequests(e);const t=T(this._renderedPages||[],e);t.removed.forEach(e=>{delete this._compositeImages[e]},this),this._renderedPages=e,this._paint(),this._hooks.onPageWillLoad&&t.added.forEach(e=>{this._hooks.onPageWillLoad(e)},this)}_paint(){const e=[];this._renderedPages.forEach(t=>{this._compositeImages[t].getTiles(this._zoomLevel).forEach(n=>{const i=B(n,this._zoomLevel);this._isTileVisible(t,i)&&(e.push(n.url),this._drawTile(t,i,this._cache.get(n.url)))})});const t=this._cache,n=T(this._renderedTiles||[],e);n.added.forEach(e=>{t.acquire(e)}),n.removed.forEach(e=>{t.release(e)}),n.removed&&this._renderedPages.forEach(e=>{this._compositeImages[e].updateFromCache(this._cache)},this),this._renderedTiles=e}_paintOutline(e){e.forEach(e=>{let t=this.layout.getPageInfo(e),n=this._getImageOffset(e),i=Math.max(0,(this._viewport.width-this.layout.dimensions.width)/2),r=Math.max(0,(this._viewport.height-this.layout.dimensions.height)/2),s=n.left-this._viewport.left+i,o=n.top-this._viewport.top+r,a=s<0?-s:0,c=o<0?-o:0,l=Math.max(0,s),u=Math.max(0,o),d=t.dimensions.width-a,h=t.dimensions.height-c;this._ctx.strokeStyle="#AAA",this._ctx.strokeRect(l+.5,u+.5,d,h)})}_initiateTileRequests(e){const t={},n=(e,n)=>{const i=this._compositeImages[n];t[e.url]=new A({url:e.url,timeoutTime:250,settings:this._settings,load:t=>{delete this._pendingRequests[e.url],this._cache.put(e.url,t),i===this._compositeImages[n]?(i.updateWithLoadedUrls([e.url]),this._isTileForSourceVisible(n,e)&&this._paint()):this._isTileForSourceVisible(n,e)&&this._paint()},error:()=>{delete this._pendingRequests[e.url]}})};for(let i=0;i{this._setViewportPosition(t(e)),this._hooks.onZoomLevelWillChange(e.zoomLevel),n&&n()},onEnd:t=>{e.onEnd&&e.onEnd(t),this._hooks.onViewDidUpdate&&!t.interrupted&&this._hooks.onViewDidUpdate(this._renderedPages.slice(),null)}})}_clearAnimation(){this._animation&&(this._animation.cancel(),this._animation=null)}isPageVisible(e){if(!this.layout)return!1;return!!this.layout.getPageInfo(e)&&this._viewport.intersectsRegion(this.layout.getPageRegion(e))}getRenderedPages(){return this._renderedPages.slice()}destroy(){this._clearAnimation(),Object.keys(this._pendingRequests).forEach(e=>{const t=this._pendingRequests[e];delete this._pendingRequests[e],t.abort()},this),this._canvas.parentNode.removeChild(this._canvas)}}function B(e,t){let n;return n=null===t?1:Math.pow(2,t-e.zoomLevel),{sourceZoomLevel:e.zoomLevel,scaleRatio:n,row:e.row,col:e.col,dimensions:{width:e.dimensions.width*n,height:e.dimensions.height*n},offset:{left:e.offset.left*n,top:e.offset.top*n},url:e.url}}function T(e,t){if(e===t)return{added:[],removed:[]};const n=e.filter(e=>-1===t.indexOf(e));return{added:t.filter(t=>-1===e.indexOf(t)),removed:n}}function N(e,t){const n=t.getMaxPageDimensions(e);return{width:Math.floor(n.width),height:Math.floor(n.height)}}function M(e){return function(e){const t=e.manifest,n=[];let i=null,r=[];const s=()=>{for(let e=0,t=r.length;e{const c={index:a,dimensions:N(a,t),paged:!t.paged||o.paged};(e.showNonPagedPages||c.paged)&&(c.paged?0===a||o.facingPages?(n.push([c]),s()):null===i?i=c:(n.push([i,c]),i=null,s()):r.push(c))}),null!==i&&(n.push([i]),s());return n}(e).map(t=>function(e,t){const n=e.verticallyOriented;if(2===t.length)return function(e,t,n){const i=e.dimensions,r=t.dimensions,s=Math.max(i.height,r.height);let o,a,c;if(n){const e=Math.max(i.width,r.width);o=2*e,a=e-i.width,c=e}else o=i.width+r.width,a=0,c=i.width;return{dimensions:{height:s,width:o},pages:[{index:e.index,dimensions:i,groupOffset:{top:0,left:a}},{index:t.index,dimensions:r,groupOffset:{top:0,left:c}}]}}(t[0],t[1],n);const i=t[0],r=i.dimensions;let s;s=i.paged?0===i.index&&n?r.width:0:n?r.width/2:0;const o=n&&!e.manifest.pages[i.index].facingPages;return{dimensions:{height:r.height,width:o?2*r.width:r.width},pages:[{index:i.index,groupOffset:{top:0,left:s},dimensions:r}]}}(e,t))}function q(e){const t=e.viewport.width,n=e.manifest,i=e.pagesPerRow,r=e.fixedHeightGrid,s=e.fixedPadding,o=e.showNonPagedPages,a=(t-s*(i+1))/i,c=a,l=r?s+n.minRatio*a:s+n.maxRatio*a,u=[];let d=[];const h={height:l,width:t};return n.pages.forEach((e,t)=>{if(!o&&n.paged&&!e.paged)return;const a=(e=>{const t=e.d[e.d.length-1],n=t.h/t.w;let i,o;return r?(i=(l-s)/n,o=l-s):(i=c,o=i*n),{width:Math.round(i),height:Math.round(o)}})(e);let f=Math.floor(d.length*(s+c)+s);r&&(f+=(c-a.width)/2),d.push({index:t,dimensions:a,groupOffset:{top:0,left:f}}),d.length===i&&(u.push({dimensions:h,pages:d}),d=[])}),d.length>0&&u.push({dimensions:h,pages:d}),u}function j(e){if(e.inGrid)return q(D(e,["manifest","viewport","pagesPerRow","fixedHeightGrid","fixedPadding","showNonPagedPages"]));{const t=D(e,["manifest","verticallyOriented","showNonPagedPages"]);return e.inBookLayout?M(t):function(e){const t=e.manifest,n=[];return t.pages.forEach((i,r)=>{if(!e.showNonPagedPages&&t.paged&&!i.paged)return;const s=N(r,t);n.push({dimensions:s,pages:[{index:r,groupOffset:{top:0,left:0},dimensions:s}]})}),n}(t)}}function D(e,t){const n={};return t.forEach((function(t){n[t]=e[t]})),n}function F(e){const t={};return e.forEach(e=>{!function(e,t){Object.keys(t).forEach(n=>{Object.defineProperty(e,n,{get:()=>t[n],set:()=>{throw new TypeError("Cannot set settings."+n)}})})}(t,e)}),t}class R{constructor(e){this.whitelistedKeys=e.whitelistedKeys||[],this.additionalProperties=e.additionalProperties||[],this.validations=e.validations}isValid(e,t,n){let i=null;if(this.validations.some((t,n)=>t.key===e&&(i=n,!0)),null===i)return!0;const r={};r[e]=t;const s=V(n,r,this);return!this._runValidation(i,t,s)}validate(e){this._validateOptions({},e)}getValidatedOptions(e,t){const n=Object.assign({},t);return this._validateOptions(e,n),n}_validateOptions(e,t){const n=V(e,t,this);this._applyValidations(t,n)}_applyValidations(e,t){this.validations.forEach((n,i)=>{if(!e.hasOwnProperty(n.key))return;const r=e[n.key],s=this._runValidation(i,r,t);s&&(s.warningSuppressed||function(e,t,n){console.warn("Invalid value for "+e+": "+t+". Using "+n+" instead.")}(n.key,r,s.value),e[n.key]=s.value)},this)}_runValidation(e,t,n){const i=this.validations[e];n.index=e;let r=!1;const s={suppressWarning:()=>{r=!0}},o=i.validate(t,n.proxy,s);return void 0===o||o===t?null:{value:o,warningSuppressed:r}}}function V(e,t,n){const i={proxy:{},index:null},r=z.bind(null,e,t),s={};return n.whitelistedKeys.forEach(e=>{s[e]={get:r.bind(null,e)}}),n.additionalProperties.forEach(e=>{s[e.key]={get:e.get}}),n.validations.forEach((e,t)=>{s[e.key]={get:()=>{if(t=n}hasHorizontalOverlap(e){const t=this.left-this.intersectionTolerance,n=this.right+this.intersectionTolerance;return Z(e.left,t,n)||Z(e.right,t,n)||e.left<=t&&e.right>=n}invalidate(){this._width=this.outer.clientWidth,this._height=this.outer.clientHeight,this._top=this.outer.scrollTop,this._left=this.outer.scrollLeft}setInnerDimensions(e){this._innerDimensions=e,e&&(this._top=G(this._top,0,e.height-this._height),this._left=G(this._left,0,e.width-this._width))}}function U(e,t){const n="_"+e,i="scroll"+e.charAt(0).toUpperCase()+e.slice(1);return{get:function(){return this[n]},set:function(e){let r;if(this._innerDimensions){r=G(e,0,this._innerDimensions[t]-this[t])}else r=W(e,0);this[n]=this.outer[i]=r}}}function $(e){return{get:function(){return this["_"+e]}}}function Z(e,t,n){return e>=t&&e<=n}function G(e,t,n){return W(function(e,t){return Math.min(e,t)}(e,n),t)}function W(e,t){return Math.max(e,t)}Object.defineProperties(H.prototype,{top:U("top","height"),left:U("left","width"),width:$("width"),height:$("height"),bottom:{get:function(){return this._top+this._height}},right:{get:function(){return this._left+this._width}}});const K=n(49)("diva:ViewerCore");function Y(){return Y.counter++}Y.counter=1;const X=[{key:"goDirectlyTo",validate:(e,t)=>{if(e<0||e>=t.manifest.pages.length)return 0}},{key:"minPagesPerRow",validate:e=>Math.max(2,e)},{key:"maxPagesPerRow",validate:(e,t)=>Math.max(e,t.minPagesPerRow)},{key:"pagesPerRow",validate:(e,t)=>{if(et.maxPagesPerRow)return t.maxPagesPerRow}},{key:"maxZoomLevel",validate:(e,t,n)=>{if(n.suppressWarning(),e<0||e>t.manifest.maxZoom)return t.manifest.maxZoom}},{key:"minZoomLevel",validate:(e,t,n)=>e>t.manifest.maxZoom?(n.suppressWarning(),0):e<0||e>t.maxZoomLevel?0:void 0},{key:"zoomLevel",validate:(e,t,n)=>e>t.manifest.maxZoom?(n.suppressWarning(),0):et.maxZoomLevel?t.minZoomLevel:void 0}];class J{constructor(e,t,n){this.parentObject=e,this.publicInstance=n,this.viewerState={currentPageIndices:[0],activePageIndex:0,horizontalOffset:0,horizontalPadding:0,ID:null,initialKeyScroll:!1,initialSpaceScroll:!1,innerElement:null,innerObject:{},isActiveDiva:!0,isScrollable:!0,isZooming:!1,loaded:!1,manifest:null,mobileWebkit:!1,numPages:0,oldZoomLevel:-1,options:t,outerElement:null,outerObject:{},pageOverlays:new b,pageTools:[],parentObject:this.parentObject,pendingManifestRequest:null,pluginInstances:[],renderer:null,resizeTimer:-1,scrollbarWidth:0,selector:"",throbberTimeoutID:-1,toolbar:null,verticalOffset:0,verticalPadding:0,viewHandler:null,viewport:null,viewportElement:null,viewportObject:null,zoomDuration:400},this.settings=F([t,this.viewerState]);const r=Y();this.viewerState.ID="diva-"+r+"-",this.viewerState.selector=this.settings.ID,Object.defineProperties(this.settings,{panelHeight:{get:()=>this.viewerState.viewport.height},panelWidth:{get:()=>this.viewerState.viewport.width}}),this.optionsValidator=new R({additionalProperties:[{key:"manifest",get:()=>this.viewerState.manifest}],validations:X}),this.viewerState.scrollbarWidth=function(){let e=document.createElement("p");e.style.width="100%",e.style.height="200px";let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);let n=e.offsetWidth;t.style.overflow="scroll";let i=e.offsetWidth;return n===i&&(i=t.clientWidth),document.body.removeChild(t),n-i}(),this.viewerState.mobileWebkit=void 0!==window.orientation,null===t.hashParamSuffix&&(t.hashParamSuffix=1===r?"":r+"");const s=i("div",this.elemAttrs("inner",{class:"diva-inner"})),o=i("div",this.elemAttrs("viewport"),s),a=i("div",this.elemAttrs("outer"),o,i("div",this.elemAttrs("throbber"),[i("div",{class:"cube cube1"}),i("div",{class:"cube cube2"}),i("div",{class:"cube cube3"}),i("div",{class:"cube cube4"}),i("div",{class:"cube cube5"}),i("div",{class:"cube cube6"}),i("div",{class:"cube cube7"}),i("div",{class:"cube cube8"}),i("div",{class:"cube cube9"})]));this.viewerState.innerElement=s,this.viewerState.viewportElement=o,this.viewerState.outerElement=a,this.viewerState.innerObject=s,this.viewerState.viewportObject=o,this.viewerState.outerObject=a,this.settings.parentObject.append(a),this.viewerState.viewport=new H(this.viewerState.viewportElement,{intersectionTolerance:this.settings.viewportMargin}),this.boundScrollFunction=this.scrollFunction.bind(this),this.boundEscapeListener=this.escapeListener.bind(this),this.initPlugins(),this.handleEvents(),this.showThrobber()}isValidOption(e,t){return this.optionsValidator.isValid(e,t,this.viewerState.options)}elemAttrs(e,t){const n={id:this.settings.ID+e,class:"diva-"+e};return t?Object.assign(n,t):n}getPageData(e,t){return this.settings.manifest.pages[e].d[this.settings.zoomLevel][t]}clearViewer(){this.viewerState.viewport.top=0,clearTimeout(this.viewerState.resizeTimer)}hasChangedOption(e,t){return t in e&&e[t]!==this.settings[t]}escapeListener(e){27===e.keyCode&&this.publicInstance.leaveFullscreenMode()}reloadViewer(e){const t=[];if(e=this.optionsValidator.getValidatedOptions(this.settings,e),this.hasChangedOption(e,"zoomLevel")&&(this.viewerState.oldZoomLevel=this.settings.zoomLevel,this.viewerState.options.zoomLevel=e.zoomLevel,t.push(["ZoomLevelDidChange",e.zoomLevel])),this.hasChangedOption(e,"pagesPerRow")&&(this.viewerState.options.pagesPerRow=e.pagesPerRow,t.push(["GridRowNumberDidChange",e.pagesPerRow])),this.hasChangedOption(e,"verticallyOriented")&&(this.viewerState.options.verticallyOriented=e.verticallyOriented),this.hasChangedOption(e,"showNonPagedPages")&&(this.viewerState.options.showNonPagedPages=e.showNonPagedPages),"goDirectlyTo"in e?(this.viewerState.options.goDirectlyTo=e.goDirectlyTo,"verticalOffset"in e&&(this.viewerState.verticalOffset=e.verticalOffset),"horizontalOffset"in e&&(this.viewerState.horizontalOffset=e.horizontalOffset)):this.viewerState.options.goDirectlyTo=this.settings.activePageIndex,(this.hasChangedOption(e,"inGrid")||this.hasChangedOption(e,"inBookLayout"))&&("inGrid"in e&&(this.viewerState.options.inGrid=e.inGrid),"inBookLayout"in e&&(this.viewerState.options.inBookLayout=e.inBookLayout),t.push(["ViewDidSwitch",this.settings.inGrid])),this.hasChangedOption(e,"inFullscreen")&&(this.viewerState.options.inFullscreen=e.inFullscreen,this.prepareModeChange(e),t.push(["ModeDidSwitch",this.settings.inFullscreen])),this.clearViewer(),this.updateViewHandlerAndRendering(),this.viewerState.renderer){const e={pageLayouts:j(this.settings),padding:this.getPadding(),maxZoomLevel:this.settings.inGrid?null:this.viewerState.manifest.maxZoom,verticallyOriented:this.settings.verticallyOriented||this.settings.inGrid},t={zoomLevel:this.settings.inGrid?null:this.settings.zoomLevel,anchorPage:this.settings.goDirectlyTo,verticalOffset:this.viewerState.verticalOffset,horizontalOffset:this.viewerState.horizontalOffset},n=this.getCurrentSourceProvider();if(K.enabled){const t=Object.keys(e).filter((function(e){return"pageLayouts"!==e&&"padding"!==e})).map((function(t){const n=e[t];return t+": "+JSON.stringify(n)})).join(", ");K("reload with %s",t)}this.viewerState.renderer.load(e,t,n)}return t.forEach(e=>{this.publish.apply(this,e)}),!0}prepareModeChange(e){const t=e.inFullscreen?"add":"remove";this.viewerState.outerObject.classList[t]("diva-fullscreen"),document.body.classList[t]("diva-hide-scrollbar"),this.settings.parentObject.classList[t]("diva-full-width");const n=this.settings.panelHeight,i=this.settings.panelWidth;if(this.viewerState.viewport.invalidate(),!this.viewerState.loaded&&!this.settings.inGrid&&!("verticalOffset"in e)){const e=this.settings.panelHeight,t=this.settings.panelWidth;this.viewerState.verticalOffset+=(n-e)/2,this.viewerState.horizontalOffset+=(i-t)/2}e.inFullscreen?document.addEventListener("keyup",this.boundEscapeListener):document.removeEventListener("keyup",this.boundEscapeListener)}updateViewHandlerAndRendering(){const e=this.settings.inGrid?y:m;!this.viewerState.viewHandler||this.viewerState.viewHandler instanceof e||(this.viewerState.viewHandler.destroy(),this.viewerState.viewHandler=null),this.viewerState.viewHandler||(this.viewerState.viewHandler=new e(this)),this.viewerState.renderer||this.initializeRenderer()}initializeRenderer(){const e=O.getCompatibilityErrors();if(e)this.showError(e);else{const e={viewport:this.viewerState.viewport,outerElement:this.viewerState.outerElement,innerElement:this.viewerState.innerElement,settings:this.settings},t={onViewWillLoad:()=>{this.viewerState.viewHandler.onViewWillLoad()},onViewDidLoad:()=>{this.updatePageOverlays(),this.viewerState.viewHandler.onViewDidLoad()},onViewDidUpdate:(e,t)=>{this.updatePageOverlays(),this.viewerState.viewHandler.onViewDidUpdate(e,t)},onViewDidTransition:()=>{this.updatePageOverlays()},onPageWillLoad:e=>{this.publish("PageWillLoad",e)},onZoomLevelWillChange:e=>{this.publish("ZoomLevelWillChange",e)}};this.viewerState.renderer=new O(e,t)}}getCurrentSourceProvider(){if(this.settings.inGrid){const e={getAllZoomLevelsForPage:t=>[e.getBestZoomLevelForPage(t)],getBestZoomLevelForPage:e=>({zoomLevel:1,rows:1,cols:1,tiles:[{url:this.settings.manifest.getPageImageURL(e.index,{width:e.dimensions.width}),zoomLevel:1,row:0,col:0,dimensions:e.dimensions,offset:{top:0,left:0}}]})};return e}const e={width:this.settings.tileWidth,height:this.settings.tileHeight};return{getBestZoomLevelForPage:t=>this.settings.manifest.getPageImageTiles(t.index,Math.ceil(this.settings.zoomLevel),e),getAllZoomLevelsForPage:t=>{const n=[],i=this.viewerState.manifest.maxZoom;for(let r=0;r<=i;r++)n.push(this.settings.manifest.getPageImageTiles(t.index,r,e));return n.reverse(),n}}}getPadding(){let e,t,n,i;return this.settings.inGrid?(n=this.settings.fixedPadding,e=t=i=0):(e=this.settings.verticallyOriented?this.viewerState.verticalPadding:0,t=this.settings.verticallyOriented?0:this.viewerState.horizontalPadding,n=this.settings.verticallyOriented?0:this.viewerState.verticalPadding,i=this.settings.verticallyOriented?this.viewerState.horizontalPadding:0),{document:{top:n,bottom:n,left:i,right:i},page:{top:e,bottom:0,left:t,right:0}}}updatePageOverlays(){this.viewerState.pageOverlays.updateOverlays(this.viewerState.renderer.getRenderedPages())}handleZoom(e,t){if(!this.isValidOption("zoomLevel",e))return!1;if(this.viewerState.viewportObject.removeEventListener("scroll",this.boundScrollFunction),!t){const e=this.viewerState.viewport,n=this.viewerState.renderer.layout.getPageRegion(this.settings.activePageIndex);t={anchorPage:this.settings.activePageIndex,offset:{left:e.width/2-(n.left-e.left),top:e.height/2-(n.top-e.top)}}}const n=this.viewerState.renderer.layout.getPageRegion(t.anchorPage),i=n.left+t.offset.left-(this.settings.viewport.left+this.settings.viewport.width/2),r=n.top+t.offset.top-(this.settings.viewport.top+this.settings.viewport.height/2),s=(e,n)=>{const s=Math.pow(2,e-n),o=t.offset.left*s-i,a=t.offset.top*s-r;return{zoomLevel:e,anchorPage:t.anchorPage,verticalOffset:a,horizontalOffset:o}};this.viewerState.options.zoomLevel=e;let o=this.viewerState.oldZoomLevel;this.viewerState.oldZoomLevel=this.settings.zoomLevel;const a=s(e,o);this.viewerState.options.goDirectlyTo=a.anchorPage,this.viewerState.verticalOffset=a.verticalOffset,this.viewerState.horizontalOffset=a.horizontalOffset,this.viewerState.renderer.transitionViewportPosition({duration:this.settings.zoomDuration,parameters:{zoomLevel:{from:o,to:e}},getPosition:e=>s(e.zoomLevel,o),onEnd:t=>{this.viewerState.viewportObject.addEventListener("scroll",this.boundScrollFunction),t.interrupted&&(this.viewerState.oldZoomLevel=e)}});let c=document.getElementById(this.settings.selector+"zoom-in-button"),l=document.getElementById(this.settings.selector+"zoom-out-button");return c.disabled=!0,l.disabled=!0,setTimeout(()=>{c.disabled=!1,l.disabled=!1},this.settings.zoomDuration),this.publish("ZoomLevelDidChange",e),!0}getYOffset(e,t){let n=void 0===e?this.settings.activePageIndex:e;return"center"===t||"centre"===t?parseInt(this.getPageData(n,"h")/2,10):"bottom"===t?parseInt(this.getPageData(n,"h")-this.settings.panelHeight/2,10):parseInt(this.settings.panelHeight/2,10)}getXOffset(e,t){let n=void 0===e?this.settings.activePageIndex:e;return"left"===t?parseInt(this.settings.panelWidth/2,10):"right"===t?parseInt(this.getPageData(n,"w")-this.settings.panelWidth/2,10):parseInt(this.getPageData(n,"w")/2,10)}updatePanelSize(){return this.viewerState.viewport.invalidate(),this.viewerState.renderer&&(this.updateOffsets(),this.viewerState.renderer.goto(this.settings.activePageIndex,this.viewerState.verticalOffset,this.viewerState.horizontalOffset)),!0}updateOffsets(){const e=this.viewerState.renderer.layout.getPageToViewportCenterOffset(this.settings.activePageIndex,this.viewerState.viewport);e&&(this.viewerState.horizontalOffset=e.x,this.viewerState.verticalOffset=e.y)}bindMouseEvents(){this.viewerState.viewportObject.classList.add("dragscroll"),d.onDoubleClick(this.viewerState.viewportObject,(e,t)=>{K("Double click at %s, %s",t.left,t.top),this.viewerState.viewHandler.onDoubleClick(e,t)})}onResize(){this.updatePanelSize(),clearTimeout(this.viewerState.resizeTimer),this.viewerState.resizeTimer=setTimeout(()=>{const e=this.viewerState.renderer.layout.getPageToViewportCenterOffset(this.settings.activePageIndex,this.viewerState.viewport);e?this.reloadViewer({goDirectlyTo:this.settings.activePageIndex,verticalOffset:e.y,horizontalOffset:e.x}):this.reloadViewer({goDirectlyTo:this.settings.activePageIndex})},200)}bindTouchEvents(){this.settings.blockMobileMove&&document.body.addEventListener("touchmove",e=>(e.originalEvent.preventDefault(),!1)),d.onPinch(this.viewerState.viewportObject,(function(e,t,n,i){K("Pinch %s at %s, %s",i-n,t.left,t.top),this.viewerState.viewHandler.onPinch(e,t,n,i)})),d.onDoubleTap(this.viewerState.viewportObject,(function(e,t){K("Double tap at %s, %s",t.left,t.top),this.viewerState.viewHandler.onDoubleClick(e,t)}))}scrollFunction(){const e=this.viewerState.viewport.top,t=this.viewerState.viewport.left;let n;this.viewerState.viewport.invalidate();const i=this.viewerState.viewport.top,r=this.viewerState.viewport.left;n=this.settings.verticallyOriented||this.settings.inGrid?i-e:r-t,this.viewerState.renderer.adjust();const s=this.settings.verticallyOriented||this.settings.inGrid?i:r;this.publish("ViewerDidScroll",s),n>0?this.publish("ViewerDidScrollDown",s):n<0&&this.publish("ViewerDidScrollUp",s),this.updateOffsets()}handleEvents(){this.viewerState.innerObject.addEventListener("mousedown",()=>{this.viewerState.innerObject.classList.add("diva-grabbing")}),this.viewerState.innerObject.addEventListener("mouseup",()=>{this.viewerState.innerObject.classList.remove("diva-grabbing")}),this.bindMouseEvents(),this.viewerState.viewportObject.addEventListener("scroll",this.boundScrollFunction);document.addEventListener("keydown.diva",e=>{if(!this.viewerState.isActiveDiva)return!0;if(this.settings.enableSpaceScroll&&!e.shiftKey&&32===e.keyCode||this.settings.enableKeyScroll&&34===e.keyCode)return this.viewerState.viewport.top+=this.settings.panelHeight,!1;if(this.settings.enableSpaceScroll||32!==e.keyCode||e.preventDefault(),this.settings.enableKeyScroll){if(e.shiftKey||e.ctrlKey||e.metaKey)return!0;switch(e.keyCode){case 33:return this.viewerState.viewport.top-=this.settings.panelHeight,!1;case 38:return this.viewerState.viewport.top-=this.settings.arrowScrollAmount,!1;case 40:return this.viewerState.viewport.top+=this.settings.arrowScrollAmount,!1;case 37:return this.viewerState.viewport.left-=this.settings.arrowScrollAmount,!1;case 39:return this.viewerState.viewport.left+=this.settings.arrowScrollAmount,!1;case 36:return this.viewerState.viewport.top=0,!1;case 35:return this.settings.verticallyOriented?this.viewerState.viewport.top=1/0:this.viewerState.viewport.left=1/0,!1;default:return!0}}return!0}),u.Events.subscribe("ViewerDidTerminate",(function(){document.removeEventListener("keydown.diva")}),this.settings.ID),window.addEventListener("resize",this.onResize.bind(this),!1),u.Events.subscribe("ViewerDidTerminate",(function(){window.removeEventListener("resize",this.onResize,!1)}),this.settings.ID),"onorientationchange"in window&&(window.addEventListener("orientationchange",this.onResize,!1),u.Events.subscribe("ViewerDidTerminate",(function(){window.removeEventListener("orientationchange",this.onResize,!1)}),this.settings.ID)),u.Events.subscribe("PanelSizeDidChange",this.updatePanelSize,this.settings.ID),u.Events.subscribe("ViewerDidTerminate",()=>{this.viewerState.renderer&&this.viewerState.renderer.destroy(),clearTimeout(this.viewerState.resizeTimer)},this.settings.ID)}initPlugins(){if(!this.settings.hasOwnProperty("plugins"))return null;this.viewerState.pluginInstances=this.settings.plugins.map(e=>{const t=new e(this);return t.isPageTool&&this.viewerState.pageTools.push(t),t})}showThrobber(){this.hideThrobber(),this.viewerState.throbberTimeoutID=setTimeout(()=>{let e=document.getElementById(this.settings.selector+"throbber");e&&(e.style.display="block")},this.settings.throbberTimeout)}hideThrobber(){clearTimeout(this.viewerState.throbberTimeoutID);let e=document.getElementById(this.settings.selector+"throbber");e&&(e.style.display="none")}showError(e){const t=i("div",this.elemAttrs("error"),[i("button",this.elemAttrs("error-close",{"aria-label":"Close dialog"})),i("p",i("strong","Error")),i("div",e)]);this.viewerState.outerObject.appendChild(t),document.getElementById(this.settings.selector+"error-close").addEventListener("click",()=>{t.parentNode.removeChild(t)})}setManifest(e,t){if(this.viewerState.manifest=e,this.hideThrobber(),this.viewerState.numPages=this.settings.manifest.pages.length,this.optionsValidator.validate(this.viewerState.options),this.publish("NumberOfPagesDidChange",this.settings.numPages),this.settings.adaptivePadding>0){const e=Math.floor((this.settings.minZoomLevel+this.settings.maxZoomLevel)/2);this.viewerState.horizontalPadding=parseInt(this.settings.manifest.getAverageWidth(e)*this.settings.adaptivePadding,10),this.viewerState.verticalPadding=parseInt(this.settings.manifest.getAverageHeight(e)*this.settings.adaptivePadding,10)}else this.viewerState.horizontalPadding=this.settings.fixedPadding,this.viewerState.verticalPadding=this.settings.fixedPadding;let n,r;this.viewerState.pageTools.length&&(this.viewerState.verticalPadding=Math.max(40,this.viewerState.verticalPadding)),this.settings.manifest.paged&&(this.viewerState.options.inBookLayout=!0),this.publish("ObjectDidLoad",this.settings),this.updatePanelSize();let s=!1,o=!1;if(null==t.goDirectlyTo?(t.goDirectlyTo=this.settings.goDirectlyTo,n=r=!0):(n=null==t.horizontalOffset||isNaN(t.horizontalOffset),r=null==t.verticalOffset||isNaN(t.verticalOffset)),n&&(0===t.goDirectlyTo&&this.settings.inBookLayout&&this.settings.verticallyOriented?t.horizontalOffset=this.viewerState.horizontalPadding:(o=!0,t.horizontalOffset=this.getXOffset(t.goDirectlyTo,"center"))),r&&(s=!0,t.verticalOffset=this.getYOffset(t.goDirectlyTo,"top")),this.reloadViewer(t),this.updatePanelSize(),this.settings.enableAutoTitle){let e=document.getElementById(this.settings.selector+"title");e?e.innerHTML=this.settings.manifest.itemTitle:this.settings.parentObject.insertBefore(i("div",this.elemAttrs("title"),[this.settings.manifest.itemTitle]),this.settings.parentObject.firstChild)}this.settings.verticallyOriented?this.viewerState.innerElement.style.minWidth=this.settings.panelWidth+"px":this.viewerState.innerElement.style.minHeight=this.settings.panelHeight+"px",(s||o)&&(s&&(this.viewerState.verticalOffset=this.getYOffset(this.settings.activePageIndex,"top")),o&&(this.viewerState.horizontalOffset=this.getXOffset(this.settings.activePageIndex,"center")),this.viewerState.renderer.goto(this.settings.activePageIndex,this.viewerState.verticalOffset,this.viewerState.horizontalOffset)),this.viewerState.loaded=!0,this.publish("ViewerDidLoad",this.settings)}publish(e){const t=Array.prototype.slice.call(arguments,1);u.Events.publish(e,t,this.publicInstance)}getSettings(){return this.settings}getInternalState(){return this.viewerState}getPublicInstance(){return this.publicInstance}getPageTools(){return this.viewerState.pageTools}getCurrentLayout(){return this.viewerState.renderer?this.viewerState.renderer.layout:null}getViewport(){const e=this.viewerState.viewport;return{top:e.top,left:e.left,bottom:e.bottom,right:e.right,width:e.width,height:e.height}}addPageOverlay(e){this.viewerState.pageOverlays.addOverlay(e)}removePageOverlay(e){this.viewerState.pageOverlays.removeOverlay(e)}getPageRegion(e,t){const n=this.viewerState.renderer.layout,i=n.getPageRegion(e,t);if(t&&t.incorporateViewport){const e=this.settings.verticallyOriented?"width":"height";if(this.viewerState.viewport[e]>n.dimensions[e]){const t=(this.viewerState.viewport[e]-n.dimensions[e])/2;return this.settings.verticallyOriented?{top:i.top,bottom:i.bottom,left:i.left+t,right:i.right+t}:{top:i.top+t,bottom:i.bottom+t,left:i.left,right:i.right}}}return i}getPagePositionAtViewportOffset(e){const t=e.left+this.viewerState.viewport.left,n=e.top+this.viewerState.viewport.top,i=this.viewerState.renderer.getRenderedPages(),r=i.length;for(let e=0;e=t&&s.top<=n&&s.bottom>=n)return{anchorPage:r,offset:{left:t-s.left,top:n-s.top}}}const s=this.viewerState.renderer.layout.getPageRegion(this.settings.activePageIndex);return{anchorPage:this.settings.activePageIndex,offset:{left:t-s.left,top:n-s.top}}}setCurrentPages(e,t){!function(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n0&&this.publish("VisiblePageHasAlternateViews",e)):this.viewerState.activePageIndex!==e&&(this.viewerState.activePageIndex=e,this.publish("ActivePageDidChange",e))}getPageName(e){return this.viewerState.manifest.pages[e].f}reload(e){this.reloadViewer(e)}zoom(e,t){return this.handleZoom(e,t)}enableScrollable(){this.viewerState.isScrollable||(this.bindMouseEvents(),this.enableDragScrollable(),this.viewerState.options.enableKeyScroll=this.viewerState.initialKeyScroll,this.viewerState.options.enableSpaceScroll=this.viewerState.initialSpaceScroll,this.viewerState.viewportElement.style.overflow="auto",this.viewerState.isScrollable=!0)}enableDragScrollable(){this.viewerState.viewportObject.hasAttribute("nochilddrag")&&this.viewerState.viewportObject.removeAttribute("nochilddrag")}disableScrollable(){this.viewerState.isScrollable&&(this.disableDragScrollable(),this.viewerState.outerObject.dblclick=null,this.viewerState.outerObject.contextmenu=null,this.viewerState.viewportElement.style.overflow="hidden",this.viewerState.initialKeyScroll=this.settings.enableKeyScroll,this.viewerState.initialSpaceScroll=this.settings.enableSpaceScroll,this.viewerState.options.enableKeyScroll=!1,this.viewerState.options.enableSpaceScroll=!1,this.viewerState.isScrollable=!1)}disableDragScrollable(){this.viewerState.viewportObject.hasAttribute("nochilddrag")||this.viewerState.viewportObject.setAttribute("nochilddrag","")}clear(){this.clearViewer()}setPendingManifestRequest(e){this.viewerState.pendingManifestRequest=e}destroy(){this.publish("ViewerWillTerminate",this.settings),this.settings.pendingManifestRequest&&this.settings.pendingManifestRequest.abort(),document.body.removeClass("diva-hide-scrollbar"),this.settings.parentObject.parent().empty().removeData("diva"),this.settings.parentObject.parent().removeAttr("style").removeAttr("class"),this.publish("ViewerDidTerminate",this.settings),u.Events.unsubscribeAll(this.settings.ID)}}function Q(e){let t,n=e.label,i="object"==typeof n?n[Object.keys(n)[0]][0]:n,r=e.value;return t=Array.isArray(r)?r.map(e=>e[Object.keys(e)[0]]):"object"==typeof r?r[Object.keys(r)[0]]:r,Array.isArray(t)&&(t=t.join(", ")),{label:i,value:t}}const ee=(e,t)=>{const n=Math.max(e,t);return n<128?0:Math.ceil(Math.log((n+1)/257)/Math.log(2))},te=(e,t)=>e/Math.pow(2,t),ne=(e,t)=>e.map(e=>{const n=e.width,i=e.height,r=re(e),s="/"!==r.url.slice(-1)?r.url+"/":r.url,o=new Array(t+1);for(let e=0;e"http://iiif.io/api/presentation/2/context.json"===e||Array.isArray(e)&&e.includes("http://iiif.io/api/presentation/2/context.json")?2:Array.isArray(e)&&e.includes("http://iiif.io/api/presentation/3/context.json")?3:2)(t),i=e.sequences?e.sequences[0]:null,r=i?i.canvases:e.items,s=r.length,o=new Array(r.length);let a,c,l,u,d,h,f,p,g,v,m,y,b,w,_,E,S,x=[],L=100,k=0,A=100;for(let e=0;e1.1?"default":"native";return encodeURI(r.url+"full/"+i+"/0/"+s+".jpg")}getTileImageURL(e,t,n){const i=e.pages[t];let r,s;r=n.row===n.rowCount-1?i.d[n.zoomLevel].h-(n.rowCount-1)*n.tileDimensions.height:n.tileDimensions.height,s=n.col===n.colCount-1?i.d[n.zoomLevel].w-(n.colCount-1)*n.tileDimensions.width:n.tileDimensions.width;const o=Math.pow(2,e.maxZoom-n.zoomLevel);let a=n.col*n.tileDimensions.width*o,c=n.row*n.tileDimensions.height*o;i.hasOwnProperty("xoffset")&&(a+=i.xoffset,c+=i.yoffset);const l=[a,c,s*o,r*o].join(","),u=i.api>1.1?"default":"native";return encodeURI(i.url+l+"/"+s+","+r+"/0/"+u+".jpg")}}class oe{constructor(e,t){this.pages=e.pgs,this.maxZoom=e.max_zoom,this.maxRatio=e.dims.max_ratio,this.minRatio=e.dims.min_ratio,this.itemTitle=e.item_title,this.metadata=e.metadata,this.paged=!!e.paged,this._maxWidths=e.dims.max_w,this._maxHeights=e.dims.max_h,this._averageWidths=e.dims.a_wid,this._averageHeights=e.dims.a_hei,this._totalHeights=e.dims.t_hei,this._totalWidths=e.dims.t_wid,this._urlAdapter=t}static fromIIIF(e){const t=ie(e);return new oe(t,new se)}isPageValid(e,t){return!(!t&&this.paged&&!this.pages[e].paged)&&(e>=0&&e{this.viewer.setZoomLevel(this.settings.zoomLevel-1)},e),this.createButton("zoom-in-button","Zoom In",()=>{this.viewer.setZoomLevel(this.settings.zoomLevel+1)},t),this.createLabel("diva-zoom-label","zoom-label","Zoom level: ","zoom-level",this.settings.zoomLevel+1)],r=function(){document.getElementById(this.settings.ID+"zoom-level").textContent=this.settings.zoomLevel+1};return this._subscribe("ZoomLevelDidChange",r),this._subscribe("ViewerDidLoad",r),i("div",{id:this.settings.ID+"zoom-controls",style:"display: none"},n)}createGridControls(){let e=this._createGridMoreIcon(),t=this._createGridFewerIcon(),n=[this.createButton("grid-out-button","Fewer",()=>{this.viewer.setGridPagesPerRow(this.settings.pagesPerRow-1)},t),this.createButton("grid-in-button","More",()=>{this.viewer.setGridPagesPerRow(this.settings.pagesPerRow+1)},e),this.createLabel("diva-grid-label","grid-label","Pages per row: ","pages-per-row",this.settings.pagesPerRow)];return this._subscribe("GridRowNumberDidChange",(function(){document.getElementById(this.settings.ID+"pages-per-row").textContent=this.settings.pagesPerRow})),i("div",{id:this.settings.ID+"grid-controls",style:"display:none"},n)}createPageLabel(){const e=i("span",{id:this.settings.ID+"current-page"}),t=()=>{let t=this.viewer.getCurrentPageIndices(),n=t[0],i=t[t.length-1],r=this.settings.manifest.pages[n].l,s=this.settings.manifest.pages[i].l;n!==i?this.settings.enableIndexAsLabel?e.textContent=n+" - "+i:e.textContent=r+" - "+s:this.settings.enableIndexAsLabel?e.textContent=n:e.textContent=r};return this._subscribe("VisiblePageDidChange",t),this._subscribe("ViewerDidLoad",t),this._subscribe("ViewDidSwitch",t),i("span",{class:"diva-page-label diva-label"},e)}createGotoPageForm(){const e=i("input",{id:this.settings.ID+"goto-page-input",class:"diva-input diva-goto-page-input",autocomplete:"off",type:"text","aria-label":"Page Input"}),t=i("input",{id:this.settings.ID+"goto-page-submit",class:"diva-button diva-button-text",type:"submit",value:"Go"}),n=i("div",{id:this.settings.ID+"input-suggestions",class:"diva-input-suggestions"}),r=i("form",{id:this.settings.ID+"goto-page",class:"diva-goto-form"},e,t,n);var s,o,a;return r.addEventListener("submit",t=>{t.preventDefault();const i=e.value;if(this.settings.onGotoSubmit&&"function"==typeof this.settings.onGotoSubmit){const e=this.settings.onGotoSubmit(i);this.viewer.gotoPageByIndex(e)||window.alert("No page could be found with that label or page number")}else this.viewer.gotoPageByLabel(i)||window.alert("No page could be found with that label or page number");return n.style.display="none",!1}),["input","focus"].forEach(t=>{e.addEventListener(t,()=>{n.innerHTML="";const t=e.value;let r=0;if(this.settings.enableGotoSuggestions&&t){const e=this.settings.manifest.pages;for(let s=0,o=e.length;s-1){const t=i("div",{class:"diva-input-suggestion"},e[s].l);n.appendChild(t),r++}r>0&&(n.style.display="block")}else n.style.display="none"})}),e.addEventListener("keydown",t=>{let n;if(13===t.keyCode){const t=document.getElementsByClassName("active")[0];void 0!==t&&(e.value=t.innerText)}if(38===t.keyCode){n=document.getElementsByClassName("active")[0];const e=n?n.previousSibling:void 0;if(void 0!==e)n.classList.remove("active"),null!==e&&e.classList.add("active");else{let e=document.getElementsByClassName("diva-input-suggestion").length-1;document.getElementsByClassName("diva-input-suggestion")[e].classList.add("active")}}else if(40===t.keyCode){n=document.getElementsByClassName("active")[0];const e=n?n.nextSibling:void 0;void 0!==e?(n.classList.remove("active"),null!==e&&e.classList.add("active")):document.getElementsByClassName("diva-input-suggestion")[0].classList.add("active")}}),s="mousedown",o=".diva-input-suggestion",a=function(){e.value=this.textContent,n.style.display="none";let t=new Event("submit",{cancelable:!0});r.dispatchEvent(t)},n.addEventListener(s,(function(e){for(var t=e.target;t&&t!==this;)t.matches(o)&&a.call(t,e),t=t.parentNode})),e.addEventListener("blur",()=>{n.style.display="none"}),r}createViewMenu(){const e=i("div",this._elemAttrs("view-options")),t=this._createGridViewIcon(),n=this._createBookViewIcon(),r=this._createPageViewIcon(),s=this.createButton("view-icon","Change view",()=>{e.style.display="none"===e.style.display?"block":"none"}),o=t=>{this.viewer.changeView(t),e.style.display="none"},a=()=>{this.settings.inGrid?(s.appendChild(t),s.className="diva-grid-icon diva-view-icon diva-button"):this.settings.inBookLayout?(s.appendChild(n),s.className="diva-book-icon diva-view-icon diva-button"):(s.appendChild(r),s.className="diva-document-icon diva-view-icon diva-button");const i=document.createDocumentFragment();for((this.settings.inGrid||this.settings.inBookLayout)&&i.appendChild(this.createButton("document-icon","Document View",o.bind(null,"document"),r)),!this.settings.inGrid&&this.settings.inBookLayout||i.appendChild(this.createButton("book-icon","Book View",o.bind(null,"book"),n)),this.settings.inGrid||i.appendChild(this.createButton("grid-icon","Grid View",o.bind(null,"grid"),t));e.firstChild;)e.removeChild(e.firstChild);e.appendChild(i)};return document.addEventListener("mouseup",t=>{e!==t.target&&(e.style.display="none")}),this._subscribe("ViewDidSwitch",a),this._subscribe("ObjectDidLoad",a),i("div",this._elemAttrs("view-menu"),s,e)}createFullscreenButton(){let e=this._createFullscreenIcon();return this.createButton("fullscreen-icon","Toggle fullscreen mode",()=>{this.viewer.toggleFullscreenMode()},e)}toggleZoomGridControls(){this.settings.inGrid?(document.getElementById(this.settings.ID+"zoom-controls").style.display="none",document.getElementById(this.settings.ID+"grid-controls").style.display="block"):(document.getElementById(this.settings.ID+"zoom-controls").style.display="block",document.getElementById(this.settings.ID+"grid-controls").style.display="none")}render(){this._subscribe("ViewDidSwitch",this.toggleZoomGridControls),this._subscribe("ObjectDidLoad",this.toggleZoomGridControls);let e=[this.createZoomButtons(),this.createGridControls()],t=[this.createPageLabel(),this.createViewMenu()];this.settings.enableFullscreen&&t.push(this.createFullscreenButton()),this.settings.enableGotoPage&&t.splice(1,0,this.createGotoPageForm());let n=this.viewer.viewerState.pluginInstances;for(let i=0,s=n.length;i{let t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttributeNS(null,"d",e),n.appendChild(t)}),t.appendChild(n),t}_createZoomOutIcon(){return this._createToolbarIcon(["M19.5,23c-0.275,0-0.5-0.225-0.5-0.5v-1c0-0.275,0.225-0.5,0.5-0.5h7c0.275,0,0.5,0.225,0.5,0.5v1c0,0.275-0.225,0.5-0.5,0.5H19.5z","M37.219,34.257l-2.213,2.212c-0.202,0.202-0.534,0.202-0.736,0l-6.098-6.099c-1.537,0.993-3.362,1.577-5.323,1.577c-5.431,0-9.849-4.418-9.849-9.849c0-5.431,4.418-9.849,9.849-9.849c5.431,0,9.849,4.418,9.849,9.849c0,1.961-0.584,3.786-1.576,5.323l6.098,6.098C37.422,33.722,37.422,34.054,37.219,34.257z M29.568,22.099c0-3.706-3.014-6.72-6.72-6.72c-3.706,0-6.72,3.014-6.72,6.72c0,3.706,3.014,6.72,6.72,6.72C26.555,28.818,29.568,25.805,29.568,22.099z"])}_createZoomInIcon(){return this._createToolbarIcon(["M37.469,34.257l-2.213,2.212c-0.202,0.202-0.534,0.202-0.736,0l-6.098-6.099c-1.537,0.993-3.362,1.577-5.323,1.577c-5.431,0-9.849-4.418-9.849-9.849c0-5.431,4.418-9.849,9.849-9.849c5.431,0,9.849,4.418,9.849,9.849c0,1.961-0.584,3.786-1.576,5.323l6.098,6.098C37.672,33.722,37.672,34.054,37.469,34.257z M29.818,22.099c0-3.706-3.014-6.72-6.72-6.72c-3.706,0-6.72,3.014-6.72,6.72c0,3.706,3.014,6.72,6.72,6.72C26.805,28.818,29.818,25.805,29.818,22.099z M26.5,21H24v-2.5c0-0.275-0.225-0.5-0.5-0.5h-1c-0.275,0-0.5,0.225-0.5,0.5V21h-2.5c-0.275,0-0.5,0.225-0.5,0.5v1c0,0.275,0.225,0.5,0.5,0.5H22v2.5c0,0.275,0.225,0.5,0.5,0.5h1c0.275,0,0.5-0.225,0.5-0.5V23h2.5c0.275,0,0.5-0.225,0.5-0.5v-1C27,21.225,26.775,21,26.5,21z"])}_createGridMoreIcon(){return this._createToolbarIcon(["M29.5,35c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H29.5z M21.5,35c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H21.5z M13.5,35c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H13.5z M29.5,27c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H29.5z M21.5,27c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H21.5z M13.5,27c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H13.5z M29.5,19c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H29.5z M21.5,19c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H21.5z M13.5,19c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H13.5z"])}_createGridFewerIcon(){return this._createToolbarIcon(["M25.5,35c-0.275,0-0.5-0.225-0.5-0.5v-9c0-0.275,0.225-0.5,0.5-0.5h9c0.275,0,0.5,0.225,0.5,0.5v9c0,0.275-0.225,0.5-0.5,0.5H25.5z M22.5,35c0.275,0,0.5-0.225,0.5-0.5v-9c0-0.275-0.225-0.5-0.5-0.5h-9c-0.275,0-0.5,0.225-0.5,0.5v9c0,0.275,0.225,0.5,0.5,0.5H22.5z M34.5,23c0.275,0,0.5-0.225,0.5-0.5v-9c0-0.275-0.225-0.5-0.5-0.5h-9c-0.275,0-0.5,0.225-0.5,0.5v9c0,0.275,0.225,0.5,0.5,0.5H34.5z M22.5,23c0.275,0,0.5-0.225,0.5-0.5v-9c0-0.275-0.225-0.5-0.5-0.5h-9c-0.275,0-0.5,0.225-0.5,0.5v9c0,0.275,0.225,0.5,0.5,0.5H22.5z"])}_createGridViewIcon(){return this._createToolbarIcon(["M29.5,35c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H29.5z M21.5,35c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H21.5z M13.5,35c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H13.5z M29.5,27c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H29.5z M21.5,27c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H21.5z M13.5,27c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H13.5z M29.5,19c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H29.5z M21.5,19c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H21.5z M13.5,19c-0.275,0-0.5-0.225-0.5-0.5v-5c0-0.275,0.225-0.5,0.5-0.5h5c0.275,0,0.5,0.225,0.5,0.5v5c0,0.275-0.225,0.5-0.5,0.5H13.5z"])}_createBookViewIcon(){return this._createToolbarIcon(["M35,16.8v-1.323c0,0-2.292-1.328-5.74-1.328c-3.448,0-5.26,1.25-5.26,1.25s-1.813-1.25-5.26-1.25c-3.448,0-5.74,1.328-5.74,1.328V16.8l-1,0.531v0.021v15.687c0,0,4.531-1.578,6.999-1.578c2.468,0,5.001,0.885,5.001,0.885s2.532-0.885,5-0.885c0.306,0,0.643,0.024,1,0.066v4.325l1.531-2.016L33,35.852v-3.72c2,0.43,3,0.906,3,0.906V17.352v-0.021L35,16.8z M23,29.03c-1-0.292-2.584-0.679-3.981-0.679c-2.246,0-3.019,0.404-4.019,0.699V16.634c0,0,1.125-0.699,4.019-0.699c1.694,0,2.981,0.417,3.981,1.126V29.03z M33,29.051c-1-0.295-1.773-0.699-4.02-0.699c-1.396,0-2.981,0.387-3.98,0.679V17.06c1-0.709,2.286-1.126,3.98-1.126c2.895,0,4.02,0.699,4.02,0.699V29.051z"])}_createPageViewIcon(){return this._createToolbarIcon(["M29.425,29h4.47L29,33.934v-4.47C29,29.19,29.151,29,29.425,29z M34,14.563V28h-5.569C28.157,28,28,28.196,28,28.47V34H14.497C14.223,34,14,33.71,14,33.437V14.563C14,14.29,14.223,14,14.497,14h18.9C33.672,14,34,14.29,34,14.563z M25.497,26.497C25.497,26.223,25.275,26,25,26h-7c-0.275,0-0.497,0.223-0.497,0.497v1.006C17.503,27.777,17.725,28,18,28h7c0.275,0,0.497-0.223,0.497-0.497V26.497z M30.497,22.497C30.497,22.223,30.275,22,30,22H18c-0.275,0-0.497,0.223-0.497,0.497v1.006C17.503,23.777,17.725,24,18,24h12c0.275,0,0.497-0.223,0.497-0.497V22.497z M30.497,18.497C30.497,18.223,30.275,18,30,18H18c-0.275,0-0.497,0.223-0.497,0.497v1.006C17.503,19.777,17.725,20,18,20h12c0.275,0,0.497-0.223,0.497-0.497V18.497z"])}_createFullscreenIcon(){return this._createToolbarIcon(["M35,12H13c-0.55,0-1,0.45-1,1v22c0,0.55,0.45,1,1,1h22c0.55,0,1-0.45,1-1V13C36,12.45,35.55,12,35,12z M34,34H14V14h20V34z","M17,21.75v-4.5c0-0.138,0.112-0.25,0.25-0.25h4.5c0.138,0,0.17,0.08,0.073,0.177l-1.616,1.616l1.823,1.823c0.097,0.097,0.097,0.256,0,0.354l-1.061,1.06c-0.097,0.097-0.256,0.097-0.354,0l-1.823-1.823l-1.616,1.616C17.08,21.92,17,21.888,17,21.75z M20.97,25.97c-0.097-0.097-0.256-0.097-0.354,0l-1.823,1.823l-1.616-1.616C17.08,26.08,17,26.112,17,26.25v4.5c0,0.138,0.112,0.25,0.25,0.25h4.5c0.138,0,0.17-0.08,0.073-0.177l-1.616-1.616l1.823-1.823c0.097-0.097,0.097-0.256,0-0.354L20.97,25.97z M30.75,17h-4.5c-0.138,0-0.17,0.08-0.073,0.177l1.616,1.616l-1.823,1.823c-0.097,0.097-0.097,0.256,0,0.354l1.061,1.06c0.097,0.097,0.256,0.097,0.354,0l1.823-1.823l1.616,1.616C30.92,21.92,31,21.888,31,21.75v-4.5C31,17.112,30.888,17,30.75,17z M30.823,26.177l-1.616,1.616l-1.823-1.823c-0.097-0.097-0.256-0.097-0.354,0l-1.061,1.06c-0.097,0.097-0.097,0.256,0,0.354l1.823,1.823l-1.616,1.616C26.08,30.92,26.112,31,26.25,31h4.5c0.138,0,0.25-0.112,0.25-0.25v-4.5C31,26.112,30.92,26.08,30.823,26.177z M26,22.5c0-0.275-0.225-0.5-0.5-0.5h-3c-0.275,0-0.5,0.225-0.5,0.5v3c0,0.275,0.225,0.5,0.5,0.5h3c0.275,0,0.5-0.225,0.5-0.5V22.5z"])}}var le={get:ue,update:function(e,t){const n=ue(e),i=window.location.hash;if(n!==t)if("string"==typeof n){const r=i.indexOf("&"+e+"=")>0?i.indexOf("&"+e+"="):i.indexOf("#"+e+"="),s=r+e.length+2+n.length,o=0===r?"#":"&";window.location.replace(i.substring(0,r)+o+e+"="+t+i.substring(s))}else 0===i.length?window.location.replace("#"+e+"="+t):window.location.replace(i+"&"+e+"="+t)}};function ue(e){const t=window.location.hash;if(""!==t){let n=t.indexOf("&"+e+"=")>0?t.indexOf("&"+e+"="):t.indexOf("#"+e+"=");if(n>=0){n+=e.length+2;const i=t.indexOf("&",n);return i>n?decodeURIComponent(t.substring(n,i)):i<0?decodeURIComponent(t.substring(n)):""}return!1}return!1}class de{constructor(e,t){if(!(e instanceof HTMLElement)&&(this.element=document.getElementById(e),null===this.element))throw new a;if(!t.objectData)throw new l("You must supply either a URL or a literal object to the `objectData` key.");this.options=Object.assign({adaptivePadding:.05,arrowScrollAmount:40,blockMobileMove:!1,objectData:"",enableAutoTitle:!0,enableFilename:!0,enableFullscreen:!0,enableGotoPage:!0,enableGotoSuggestions:!0,enableGridIcon:!0,enableGridControls:"buttons",enableImageTitles:!0,enableIndexAsLabel:!1,enableKeyScroll:!0,enableLinkIcon:!0,enableNonPagedVisibilityIcon:!0,enableSpaceScroll:!1,enableToolbar:!0,enableZoomControls:"buttons",fillParentHeight:!0,fixedPadding:10,fixedHeightGrid:!0,goDirectlyTo:0,hashParamSuffix:null,imageCrossOrigin:"anonymous",inFullscreen:!1,inBookLayout:!1,inGrid:!1,maxPagesPerRow:8,maxZoomLevel:-1,minPagesPerRow:2,minZoomLevel:0,onGotoSubmit:null,pageAliases:{},pageAliasFunction:function(){return!1},pageLoadTimeout:200,pagesPerRow:5,requestHeaders:{Accept:"application/json"},showNonPagedPages:!1,throbberTimeout:100,tileHeight:256,tileWidth:256,toolbarParentObject:null,verticallyOriented:!0,viewportMargin:200,zoomLevel:2},t);const n=i("div",{class:"diva-wrapper"+(this.options.fillParentHeight?" diva-wrapper-flexbox":"")});this.element.appendChild(n),this.options.toolbarParentObject=this.options.toolbarParentObject||n;const r=new J(n,this.options,this);this.viewerState=r.getInternalState(),this.settings=r.getSettings(),this.toolbar=this.settings.enableToolbar?new ce(this):null,n.id=this.settings.ID+"wrapper",this.divaState={viewerCore:r,toolbar:this.toolbar};let s=u.Events.subscribe("ObjectDidLoad",()=>{null!==this.toolbar&&this.toolbar.render(),u.Events.unsubscribe(s)});this.hashState=this._getHashParamState(),this._loadOrFetchObjectData()}_loadOrFetchObjectData(){if("object"==typeof this.settings.objectData)setTimeout(()=>{this._loadObjectData(this.settings.objectData,this.hashState)},0);else{const e=fetch(this.settings.objectData,{headers:this.settings.requestHeaders}).then(e=>{if(!e.ok){u.Events.publish("ManifestFetchError",[e],this),this._ajaxError(e);let t=new Error(e.statusText);throw t.response=e,t}return e.json()}).then(e=>{this._loadObjectData(e,this.hashState)});this.divaState.viewerCore.setPendingManifestRequest(e)}}_showError(e){this.divaState.viewerCore.showError(e)}_ajaxError(e){const t=["Invalid objectData setting. Error code: "+e.status+" "+e.statusText];if(0===this.settings.objectData.lastIndexOf("http",0)){const e=this.settings.objectData.replace(/https?:\/\//i,"").split(/[/?#]/)[0];window.location.hostname!==e&&t.push(i("p","Attempted to access cross-origin data without CORS."),i("p","You may need to update your server configuration to support CORS. For help, see the ",i("a",{href:"https://github.com/DDMAL/diva.js/wiki/Installation#a-note-about-cross-site-requests",target:"_blank"},"cross-site request documentation.")))}this._showError(t)}_loadObjectData(e,t){let n;if(!e.hasOwnProperty("@context")&&(-1===e["@context"].indexOf("iiif")||-1===e["@context"].indexOf("shared-canvas")))throw new c("This does not appear to be a IIIF Manifest.");u.Events.publish("ManifestDidLoad",[e],this),n=oe.fromIIIF(e);const i=t?this._getLoadOptionsForState(t,n):{};this.divaState.viewerCore.setManifest(n,i)}_getHashParamState(){const e={};return["f","v","z","n","i","p","y","x"].forEach(t=>{const n=le.get(t+this.settings.hashParamSuffix);!1!==n&&(e[t]=n)}),"true"===e.f?e.f=!0:"false"===e.f&&(e.f=!1),["z","n","p","x","y"].forEach(t=>{t in e&&(e[t]=parseInt(e[t],10))}),e}_getLoadOptionsForState(e,t){t=t||this.settings.manifest;const n="v"in e?this._getViewState(e.v):{};"f"in e&&(n.inFullscreen=e.f),"z"in e&&(n.zoomLevel=e.z),"n"in e&&(n.pagesPerRow=e.n);let i=this._getPageIndexForManifest(t,e.i);if(i>=0&&i=0&&io)return-1;if(ts)return-1;const a=document.getElementsByClassName("diva-page");let c=a.length;for(;c--;){const n=a[c],i=n.getBoundingClientRect();if(!(ei.right)&&!(ti.bottom))return n.getAttribute("data-index")}return-1}_reloadViewer(e){return this.divaState.viewerCore.reload(e)}_getCurrentURL(){return location.protocol+"//"+location.host+location.pathname+location.search+"#"+this._getURLHash()}activate(){this.viewerState.isActiveDiva=!0}changeObject(e){this.viewerState.loaded=!1,this.divaState.viewerCore.clear(),this.viewerState.renderer&&this.viewerState.renderer.destroy(),this.viewerState.options.objectData=e,this._loadOrFetchObjectData()}changeView(e){this._changeView(e)}deactivate(){this.viewerState.isActiveDiva=!1}destroy(){this.divaState.viewerCore.destroy()}disableScrollable(){this.divaState.viewerCore.disableScrollable()}enableScrollable(){this.divaState.viewerCore.enableScrollable()}disableDragScrollable(){this.divaState.viewerCore.disableDragScrollable()}enableDragScrollable(){this.divaState.viewerCore.enableDragScrollable()}enterFullscreenMode(){return!this.settings.inFullscreen&&(this._toggleFullscreen(),!0)}enterGridView(){return!this.settings.inGrid&&(this._changeView("grid"),!0)}getAllPageURIs(){return this.settings.manifest.pages.map(e=>e.f)}getCurrentCanvas(){return this.settings.manifest.pages[this.settings.activePageIndex].canvas}getCurrentPageDimensionsAtCurrentZoomLevel(){return this.getPageDimensionsAtCurrentZoomLevel(this.settings.activePageIndex)}getCurrentPageFilename(){return console.warn("This method will be deprecated in the next version of Diva. Please use getCurrentPageURI instead."),this.settings.manifest.pages[this.settings.activePageIndex].f}getCurrentPageIndices(){return this.settings.currentPageIndices}getActivePageIndex(){return this.settings.activePageIndex}getCurrentPageOffset(){return this.getPageOffset(this.settings.activePageIndex)}getCurrentPageURI(){return this.settings.manifest.pages[this.settings.activePageIndex].f}getCurrentURL(){return this._getCurrentURL()}getFilenames(){return console.warn("This will be removed in the next version of Diva. Use getAllPageURIs instead."),this.settings.manifest.pages.map(e=>e.f)}getGridPagesPerRow(){return this.settings.pagesPerRow}getInstanceId(){return this.settings.ID}getInstanceSelector(){return this.divaState.viewerCore.selector}getItemTitle(){return this.settings.manifest.itemTitle}getMaxZoomLevel(){return this.settings.maxZoomLevel}getMaxZoomLevelForPage(e){return!!this._checkLoaded()&&this.settings.manifest.pages[e].m}getMinZoomLevel(){return this.settings.minZoomLevel}getNumberOfPages(){return!!this._checkLoaded()&&this.settings.numPages}getOtherImages(e){return this.settings.manifest.pages[e].otherImages}getPageDimensions(e){return this._checkLoaded()?this.divaState.viewerCore.getCurrentLayout().getPageDimensions(e):null}getPageDimensionsAtCurrentZoomLevel(e){let t=parseInt(e,10);if(!this._isPageIndexValid(t))throw new Error("Invalid Page Index");return this.divaState.viewerCore.getCurrentLayout().getPageDimensions(t)}getPageDimensionsAtZoomLevel(e,t){if(!this._checkLoaded())return!1;t>this.settings.maxZoomLevel&&(t=this.settings.maxZoomLevel);const n=this.settings.manifest.pages[parseInt(e,10)].d[parseInt(t,10)];return{width:n.w,height:n.h}}getPageImageURL(e,t){return this.settings.manifest.getPageImageURL(e,t)}getPageIndexForPageXYValues(e,t){return this._getPageIndexForPageXYValues(e,t)}getPageOffset(e,t){const n=this.divaState.viewerCore.getPageRegion(e,t);return{top:n.top,left:n.left}}getSettings(){return this.settings}getState(){return this._getState()}getZoomLevel(){return this.settings.zoomLevel}gotoPageByIndex(e,t,n){return this._gotoPageByIndex(e,t,n)}gotoPageByLabel(e,t,n){const i=this.settings.manifest.pages;let r=e.toLowerCase();for(let e=0,s=i.length;e-1)return this._gotoPageByIndex(e,t,n);const s=parseInt(e,10)-1;return this._gotoPageByIndex(s,t,n)}gotoPageByName(e,t,n){console.warn("This method will be removed in the next version of Diva.js. Use gotoPageByURI instead.");const i=this._getPageIndex(e);return this._gotoPageByIndex(i,t,n)}gotoPageByURI(e,t,n){const i=this._getPageIndex(e);return this._gotoPageByIndex(i,t,n)}hasOtherImages(e){return!0===this.settings.manifest.pages[e].otherImages}hideNonPagedPages(){this._reloadViewer({showNonPagedPages:!1})}isInFullscreen(){return this.settings.inFullscreen}isPageIndexValid(e){return this._isPageIndexValid(e)}isPageInViewport(e){return this.viewerState.renderer.isPageVisible(e)}isReady(){return this.viewerState.loaded}isRegionInViewport(e,t,n,i,r){const s=this.divaState.viewerCore.getCurrentLayout();if(!s)return!1;const o=s.getPageOffset(e),a=o.top+n,c=o.left+t;return this.viewerState.viewport.intersectsRegion({top:a,bottom:a+r,left:c,right:c+i})}isVerticallyOriented(){return this.settings.verticallyOriented}leaveFullscreenMode(){return!!this.settings.inFullscreen&&(this._toggleFullscreen(),!0)}leaveGridView(){return!!this.settings.inGrid&&(this._reloadViewer({inGrid:!1}),!0)}setGridPagesPerRow(e){return!!this.divaState.viewerCore.isValidOption("pagesPerRow",e)&&this._reloadViewer({inGrid:!0,pagesPerRow:e})}setState(e){this._reloadViewer(this._getLoadOptionsForState(e))}setZoomLevel(e){return this.settings.inGrid&&this._reloadViewer({inGrid:!1}),this.divaState.viewerCore.zoom(e)}showNonPagedPages(){this._reloadViewer({showNonPagedPages:!0})}toggleFullscreenMode(){this._toggleFullscreen()}toggleNonPagedPagesVisibility(){this._reloadViewer({showNonPagedPages:!this.settings.showNonPagedPages})}toggleOrientation(){return this._togglePageLayoutOrientation()}translateFromMaxZoomLevel(e){const t=this.settings.maxZoomLevel-this.settings.zoomLevel;return e/Math.pow(2,t)}translateToMaxZoomLevel(e){const t=this.settings.maxZoomLevel-this.settings.zoomLevel;return 0===t?e:e*Math.pow(2,t)}zoomIn(){return this.setZoomLevel(this.settings.zoomLevel+1)}zoomOut(){return this.setZoomLevel(this.settings.zoomLevel-1)}}de.Events=u.Events;var he;t.default=de;"undefined"!=typeof window&&((he=window).Diva=he.Diva||de)}]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2V2ZW50cy9ldmVudHMuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL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kNZXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBpZiBzdGFja2VkIG5jJ3MvbGlnYXR1cmUgKGlkZW50aWNhbCB4KSwgb3IgZGVzY2VuZGluZyBuYydzICh5IGRlc2NlbmRzKVxuICAgICAgICAgICAgICAgIGlmIChmaXJzdE5DWCA9PT0gc2Vjb25kTkNYIHx8IGZpcnN0TkNZIDwgc2Vjb25kTkNZKSB7XG4gICAgICAgICAgICAgICAgICBHcm91cGluZy50cmlnZ2VyR3JvdXBpbmcoJ2xpZ2F0dXJlJyk7IFxuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBHcm91cGluZy50cmlnZ2VyR3JvdXBpbmcoJ25jJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIFNlbGVjdE9wdGlvbnMudHJpZ2dlckRlZmF1bHRBY3Rpb25zKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIGlmIChzaGFyZWRTZWNvbmRMZXZlbFBhcmVudChncm91cHMpKSB7XG4gICAgICAgICAgICBHcm91cGluZy50cmlnZ2VyR3JvdXBpbmcoJ25jJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIFNlbGVjdE9wdGlvbnMudHJpZ2dlckRlZmF1bHRBY3Rpb25zKCk7XG4gICAgICAgICAgfVxuICAgICAgfVxuICAgICAgYnJlYWs7XG4gICAgY2FzZSAnc2VsQnlCQm94JzpcbiAgICAgIHN3aXRjaCAoZ3JvdXBzLmxlbmd0aCkge1xuICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgc2VsZWN0QkJveChncm91cHNbMF0sIGRyYWdIYW5kbGVyLCBuZW9uVmlldyk7XG4gICAgICAgICAgU2VsZWN0T3B0aW9ucy50cmlnZ2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Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGFuZWwtY29udGVudC1zdWJzZWN0aW9uIGhpZGRlblwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwiZXh0cmFFZGl0XCI+PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDwhLS1cbiAgICAgICAgICAgICAgICAgICAgKiBUaGUgZXh0cmFFZGl0IHBhbmVsIGlzIGFkZGVkIGZvciBlZGl0IG9wdGlvbnMgdGhhdCBoYXZlIGRyb3Bkb3duIG1lbnVzXG4gICAgICAgICAgICAgICAgICAgICogTGlrZSB0aGUgTmV1bWUgYW5kIENsZWYgbWVudXNcbiAgICAgICAgICAgICAgICAgICAgKiBUaGlzIGlzIGRvbmUgYmVjYXVzZSB0aGUgbW9yZUVkaXQgbWVudSBuZWVkcyB0byBoYXZlIG92ZXJmbG93IGZvciBjYXNlcyB3aGVyZSBpdCBoYXMgbG90cyBvZiBidXR0b25zXG4gICAgICAgICAgICAgICAgICAgICogQnV0IG92ZXJmbG93IHJ1aW5zIGRyb3Bkb3duIG1lbnVzXG4gICAgICAgICAgICAgICAgICAgIC0tPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwYW5lbC1jb250ZW50LXN1YnNlY3Rpb24gaGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJuZXVtZUVkaXRcIj48L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGFuZWwtY29udGVudC1zdWJzZWN0aW9uXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ1bmRvUmVkb19jb250cm9sc1wiPjwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpd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GV4dC1zYXZlXCI+U2F2ZTwvZGl2PiAgICAgICAgXG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PmA7XG5cblxuLyoqXG4gKiBIVE1MIGZvciBIb3RrZXlzIG1vZGFsIHdpbmRvd1xuICovXG5leHBvcnQgY29uc3QgaG90a2V5c01vZGFsID0gYFxuICAgIDxkaXYgY2xhc3M9XCJuZW9uLW1vZGFsLXdpbmRvdy1jb250ZW50XCIgaWQ9XCJuZW9uLW1vZGFsLXdpbmRvdy1jb250ZW50LWhvdGtleXNcIj5cbiAgICAgICAgPCEtLSBcIkRpc3BsYXlcIiBob3RrZXlzIC0tPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS10aXRsZVwiPkRpc3BsYXk8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+KzwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5ab29tIEluPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+LTwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5ab29tIE91dDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj4wPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlpvb20gUmVzZXQ8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+aDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5IaWRlIEdseXBoPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgPCEtLSBcIkVkaXRcIiBob3RrZXlzIC0tPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS10aXRsZVwiPkVkaXQ8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPkN0cmw8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj56PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+b3I8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPuKMmDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPno8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+VW5kbzwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5DdHJsPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+U2hpZnQ8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj56PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+b3I8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPuKMmDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+ejwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5SZWRvPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPnEvdy9lL3IvdC95PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlxuICAgICAgICAgICAgICAgICAgICBIaWdobGlnaHQgYnkgU3RhZmYvU3lsbGFibGUvTmV1bWUvTGF5ZXJFbGVtZW50L1NlbGVjdGlvbi9PZmZcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+MS8yLzMvNDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgU2VsZWN0IGJ5IFN5bGxhYmxlL05ldW1lL05ldW1lIENvbXBvbmVudC9TdGFmZlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPk51bWJlcjwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgQmVnaW4gSW5zZXJ0IGZvciB0aGUgPGk+bnRoPC9pPiBvcHRpb24gaW4gdGhlIHNlbGVjdGVkIHRhYlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuXG4gICAgICAgIDwhLS0gXCJPdGhlclwiIGhvdGtleXMgLS0+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktc3ViY2F0ZWdvcnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LXRpdGxlXCI+T3RoZXI8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPnM8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+U2F2ZSBGaWxlPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPkVzYzwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5SZXR1cm4gdG8gRWRpdCBNb2RlPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgPC9kaXY+YDtcblxuZXhwb3J0IGNvbnN0IHN5bGxhYmxlQWN0aW9uc0Nv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AgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMTY7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgIHRhaWxbaV0gPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gQmV3YXJlIHRoYXQgdGhlIGZpbmFsIGxlbmd0aCBtaWdodCBub3QgZml0IGluIDMyIGJpdHMgc28gd2UgdGFrZSBjYXJlIG9mIHRoYXRcbiAgICAgICAgdG1wID0gbiAqIDg7XG4gICAgICAgIHRtcCA9IHRtcC50b1N0cmluZygxNikubWF0Y2goLyguKj8pKC57MCw4fSkkLyk7XG4gICAgICAgIGxvID0gcGFyc2VJbnQodG1wWzJdLCAxNik7XG4gICAgICAgIGhpID0gcGFyc2VJbnQodG1wWzFdLCAxNikgfHwgMDtcblxuICAgICAgICB0YWlsWzE0XSA9IGxvO1xuICAgICAgICB0YWlsWzE1XSA9IGhpO1xuXG4gICAgICAgIG1kNWN5Y2xlKHN0YXRlLCB0YWlsKTtcbiAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIG1kNTFfYXJyYXkoYSkge1xuICAgICAgICB2YXIgbiA9IGEubGVuZ3RoLFxuICAgICAgICAgICAgc3RhdGUgPSBbMTczMjU4NDE5MywgLTI3MTczMzg3OSwgLTE3MzI1ODQxOTQsIDI3MTczMzg3OF0sXG4gICAgICAgICAgICBpLFxuICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgdGFpbCxcbiAgICAgICAgICAgIHRtcCxcbiAgICAgICAgICAgIGxvLFxuICAgICAgICAgICAgaGk7XG5cbiAgICAgICAgZm9yIChpID0gNjQ7IGkgPD0gbjsgaSArPSA2NCkge1xuICAgICAgICAgICAgbWQ1Y3ljbGUoc3RhdGUsIG1kNWJsa19hcnJheShhLnN1YmFycmF5KGkgLSA2NCwgaSkpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIE5vdCBzdXJlIGlmIGl0IGl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AgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gdGhpcy5ieXRlTGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBiZWdpbiA9IGNsYW1wKGZyb20sIGxlbmd0aCksXG4gICAgICAgICAgICAgICAgICAgIGVuZCA9IGxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgbnVtLFxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQsXG4gICAgICAgICAgICAgICAgICAgIHRhcmdldEFycmF5LFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2VBcnJheTtcblxuICAgICAgICAgICAgICAgIGlmICh0byAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGVuZCA9IGNsYW1wKHRvLCBsZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChiZWdpbiA+IGVuZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFycmF5QnVmZmVyKDApO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG51bSA9IGVuZCAtIGJlZ2luO1xuICAgICAgICAgICAgICAgIHRhcmdldCA9IG5ldyBBcnJheUJ1ZmZlcihudW0pO1xuICAgICAgICAgICAgICAgIHRhcmdldEFycmF5ID0gbmV3IFVpbnQ4QXJyYXkodGFyZ2V0KTtcblxuICAgICAgICAgICAgICAgIHNvdXJjZUFycmF5ID0gbmV3IFVpbnQ4QXJyYXkodGhpcywgYmVnaW4sIG51bSk7XG4gICAgICAgICAgICAgICAgdGFyZ2V0QXJyYXkuc2V0KHNvdXJjZUFycmF5KTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9KSgpO1xuICAgIH1cblxuICAgIC8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuXG4gICAgLyoqXG4gICAgICogSGV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iAgICB2YWwgPSBuZXh0LnZhbCB8fCAnJztcbiAgICByZXMgKz0gcHJlZml4O1xuICAgIGlmICh2YWwpIHtcbiAgICAgIHJlcyArPSB2YWw7XG4gICAgfSBlbHNlIGlmICh0eXBlb2Ygb2JqICE9PSAnb2JqZWN0Jykge1xuICAgICAgcmVzICs9IHR5cGVvZiBvYmogPT09ICd1bmRlZmluZWQnID8gbnVsbCA6IEpTT04uc3RyaW5naWZ5KG9iaik7XG4gICAgfSBlbHNlIGlmIChvYmogPT09IG51bGwpIHtcbiAgICAgIHJlcyArPSAnbnVsbCc7XG4gICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHtcbiAgICAgIHF1ZXVlLnB1c2goe3ZhbDogJ10nfSk7XG4gICAgICBmb3IgKGkgPSBvYmoubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgYXJyYXlQcmVmaXggPSBpID09PSAwID8gJycgOiAnLCc7XG4gICAgICAgIHF1ZXVlLnB1c2goe29iajogb2JqW2ldLCBwcmVmaXg6IGFycmF5UHJlZml4fSk7XG4gICAgICB9XG4gICAgICBxdWV1ZS5wdXNoKHt2YWw6ICdbJ30pO1xuICAgIH0gZWxzZSB7IC8vIG9iamVjdFxuICAgICAga2V5cyA9IFtdO1xuICAgICAgZm9yIChrIGluIG9iaikge1xuICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAga2V5cy5wdXNoKGspO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBxdWV1ZS5wdXNoKHt2YWw6ICd9J30pO1xuICAgICAgZm9yIChpID0ga2V5cy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICBrZXkgPSBrZXlzW2ldO1xuICAgICAgICB2YWx1ZSA9IG9ialtrZXldO1xuICAgICAgICBvYmpQcmVmaXggPSAoaSA+IDAgPyAnLCcgOiAnJyk7XG4gICAgICAgIG9ialByZWZpeCArPSBKU09O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gICAgICBjYXNlICduJzpcbiAgICAgICAgaSArPSAzOyAvLyAndWxsJ1xuICAgICAgICBwb3AobnVsbCwgc3RhY2ssIG1ldGFTdGFjayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAndCc6XG4gICAgICAgIGkgKz0gMzsgLy8gJ3J1ZSdcbiAgICAgICAgcG9wKHRydWUsIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2YnOlxuICAgICAgICBpICs9IDQ7IC8vICdhbHNlJ1xuICAgICAgICBwb3AoZmFsc2UsIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJzAnOlxuICAgICAgY2FzZSAnMSc6XG4gICAgICBjYXNlICcyJzpcbiAgICAgIGNhc2UgJzMnOlxuICAgICAgY2FzZSAnNCc6XG4gICAgICBjYXNlICc1JzpcbiAgICAgIGNhc2UgJzYnOlxuICAgICAgY2FzZSAnNyc6XG4gICAgICBjYXNlICc4JzpcbiAgICAgIGNhc2UgJzknOlxuICAgICAgY2FzZSAnLSc6XG4gICAgICAgIHBhcnNlZE51bSA9ICcnO1xuICAgICAgICBpLS07XG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgbnVtQ2hhciA9IHN0cltpKytdO1xuICAgICAgICAgIGlmICgvW1xcZFxcLlxcLWVcXCtdLy50ZXN0KG51bUNoYXIpKSB7XG4gICAgICAgICAgICBwYXJzZWROdW0gKz0gbnVtQ2hhcjtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHBvcChwYXJzZUZsb2F0KHBhcnNlZE51bSksIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ1wiJzpcbiAgICAgICAgcGFyc2VkU3RyaW5nID0gJyc7XG4gICAgICAgIGxhc3RDaCA9IHZvaWQgMDtcbiAgICAgICAgbnVtQ29uc2VjdXRpdmVTbGFzaGVzID0gMDtcbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICBjaCA9IHN0cltpKytdO1xuICAgICAgICAgIGlmIChjaCAhPT0gJ1wiJyB8fCAobGFzdENoID09PSAnXFxcXCcgJiZcbiAgICAgICAgICAgICAgbnVtQ29uc2VjdXRpdmVTbGFzaGVzICUgMiA9PT0gMSkpIHtcbiAgICAgICAgICAgIHBhcnNlZFN0cmluZyArPSBjaDtcbiAgICAgICAgICAgIGxhc3RDaCA9IGNoO1xuICAgICAgICAgICAgaWYgKGxhc3RDaCA9PT0gJ1xcXFwnKSB7XG4gICAgICAgICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcysrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbnVtQ29uc2VjdXRpdmVTbGFzaGVzID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHBvcChKU09OLnBhcnNlKCdcIicgKyBwYXJzZWRTdHJpbmcgKyAnXCInKSwgc3RhY2ssIG1ldGFTdGFjayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnWyc6XG4gICAgICAgIGFycmF5RWxlbWVudCA9IHsgZWxlbWVudDogW10sIGluZGV4OiBzdGFjay5sZW5ndGggfTtcbiAgICAgICAgc3RhY2sucHVzaChhcnJheUVsZW1lbnQuZWxlbWVudCk7XG4gICAgICAgIG1ldGFTdGFjay5wdXNoKGFycmF5RWxlbWVudCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAneyc6XG4gICAgICAgIG9iakVsZW1lbnQgPSB7IGVsZW1lbnQ6IHt9LCBpbmRleDogc3RhY2subGVuZ3RoIH07XG4gICAgICAgIHN0YW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AoeSArIDE1KSArICcgJyArICh4ICsgMTMwKSArICcsJyArICh5ICsgNTApO1xuICAgICAgeCA9IHBvaW50c1s3XS54O1xuICAgICAgeSA9IHBvaW50c1s3XS55O1xuICAgICAgY29uc3QgcG9pbnRTdHJpbmdMZWZ0ID0gKHggLSAxMDApICsgJywnICsgKHkgLSAxNSkgKyAnICcgK1xuICAgICAgICAoeCAtIDEzMCkgKyAnLCcgKyAoeSAtIDUwKSArICcgJyArICh4IC0gMTAwKSArICcsJyArICh5IC0gODUpICsgJyAnICsgKHggLSA3MCkgKyAnLCcgKyAoeSAtIDUwKTtcblxuICAgICAgZDMuc2VsZWN0KCcjJyArIGVsZW1lbnQuaWQpLmFwcGVuZCgncG9seWdvbicpXG4gICAgICAgIC5hdHRyKCdwb2ludHMnLCBwb2ludFN0cmluZ1JpZ2h0KVxuICAgICAgICAuYXR0cignaWQnLCAncm90YXRlUmlnaHQnKVxuICAgICAgICAuYXR0cignc3Ryb2tlJywgJ2JsYWNrJylcbiAgICAgICAgLmF0dHIoJ3N0cm9rZS13aWR0aCcsIDcpXG4gICAgICAgIC5hdHRyKCdmaWxsJywgJyMwMDk5ZmYnKVxuICAgICAgICAuYXR0cignY2xhc3MnLCAncm90YXRlUG9pbnQnKTtcblxuICAgICAgZDMuc2VsZWN0KCcjJyArIGVsZW1lbnQuaWQpLmFwcGVuZCgncG9seWdvbicpXG4gICAgICAgIC5hdHRyKCdwb2ludHMnLCBwb2ludFN0cmluZ0xlZnQpXG4gICAgICAgIC5hdHRyKCdpZCcsICdyb3RhdGVMZWZ0JylcbiAgICAgICAgLmF0dHIoJ3N0cm9rZScsICdibGFjaycpXG4gICAgICAgIC5hdHRyKCdzdHJva2Utd2lkdGgnLCA3KVxuICAgICAgICAuYXR0cignZmlsbCcsICcjMDA5OWZmJylcbiAgICAgICAgLmF0dHIoJ2NsYXNzJywgJ3JvdGF0ZVBvaW50Jyk7XG5cbiAgICAgIGQzLnNlbGVjdCgnI3JvdGF0ZUxlZnQnKS5jYWxsKFxuICAgICAgICBkMy5kcmFnKClcbiAgICAgICAgICAub24oJ3N0YXJ0Jywgcm90YXRlU3RhcnQpXG4gICAgICAgICAgLm9uKCdkcmFnJywgcm90YXRlRHJhZ0xlZnQpXG4gICAgICAgICAgLm9uKCdlbmQnLCByb3RhdGVFbmQpKTtcblxuICAgICAgZDMuc2VsZWN0KCcjcm90YXRlUmlnaHQnKS5jYWxsKFxuICAgICAgICBkMy5kcmFnKClcbiAgICAgICAgICAub24oJ3N0YXJ0Jywgcm90YXRlU3RhcnQpXG4gICAgICAgICAgLm9uKCdkcmFnJywgcm90YXRlRHJhZ1JpZ2h0KVxuICAgICAgICAgIC5vbignZW5kJywgcm90YXRlRW5kKSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcmVzaXplU3RhcnQgKG5hbWU6IHN0cmluZyk6IHZvaWQge1xuICAgICAgd2hpY2hQb2ludCA9IG5hbWU7XG4gICAgICBjb25zdCBwb2ludCA9IHBvaW50cy5maW5kKHBvaW50ID0+IHBvaW50Lm5hbWUgPT09IFBvaW50TmFtZXNbbmFtZV0pO1xuICAgICAgaW5pdGlhbFBvaW50ID0gW3BvaW50LngsIHBvaW50LnldO1xuICAgICAgaW5pdGlhbFVseSA9IHVseTtcbiAgICAgIGluaXRpYWxMcnkgPSBscnk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcmVzaXplRHJhZyAoKTogdm9pZCB7XG4gICAgICBjb25zdCBjdXJyZW50UG9pbnQgPSBkMy5tb3VzZSh0aGlzKTtcbiAgICAgIHN3aXRjaCAoUG9pbnROYW1lc1t3aGljaFBvaW50XSkge1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuVG9wTGVmdDpcbiAgICAgICAgICB1bHggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgdWx5ID0gY3VycmVudFBvaW50WzFdO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuVG9wOlxuICAgICAgICAgIHVseSA9IGN1cnJlbnRQb2ludFsxXSAtIChscnggLSB1bHgpICogTWF0aC50YW4ocm90YXRlKSAvIDI7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5Ub3BSaWdodDpcbiAgICAgICAgICBscnggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgdWx5ID0gY3VycmVudFBvaW50WzFdIC0gKGxyeCAtIHVseCkgKiBNYXRoLnRhbihyb3RhdGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuUmlnaHQ6XG4gICAgICAgICAgbHJ4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIGxyeSA9IGluaXRpYWxMcnkgKyAoY3VycmVudFBvaW50WzBdIC0gaW5pdGlhbFBvaW50WzBdKSAqIE1hdGgudGFuKHJvdGF0ZSk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5Cb3R0b21SaWdodDpcbiAgICAgICAgICBscnggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgbHJ5ID0gY3VycmVudFBvaW50WzFdO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuQm90dG9tOlxuICAgICAgICAgIGxyeSA9IGN1cnJlbnRQb2ludFsxXSArIChscnggLSB1bHgpICogTWF0aC50YW4ocm90YXRlKSAvIDI7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5Cb3R0b21MZWZ0OlxuICAgICAgICAgIHVseCA9IGN1cnJlbnRQb2ludFswXTtcbiAgICAgICAgICBscnkgPSBjdXJyZW50UG9pbnRbMV0gKyAobHJ4IC0gdWx4KSAqIE1hdGgudGFuKHJvdGF0ZSk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5MZWZ0OlxuICAgICAgICAgI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N1bHRbaV0ub2sgJiYgcmVzdWx0W2ldLm9rLl9yZXYgPT09IGRvYy5fcmV2KSB7XG4gICAgICAgICAgICAgIGV4aXN0aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghZXhpc3RpbmcpIHtcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKHtvazogZG9jfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlc3VsdC5wdXNoKHttaXNzaW5nOiBsZWFmfSk7XG4gICAgICAgIH1cbiAgICAgICAgY291bnQtLTtcbiAgICAgICAgaWYgKCFjb3VudCkge1xuICAgICAgICAgIGNiKG51bGwsIHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgaWYgKG9wdHMub3Blbl9yZXZzKSB7XG4gICAgaWYgKG9wdHMub3Blbl9yZXZzID09PSBcImFsbFwiKSB7XG4gICAgICB0aGlzLl9nZXRSZXZpc2lvblRyZWUoaWQsIGZ1bmN0aW9uIChlcnIsIHJldl90cmVlKSB7XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIGNiKGVycik7XG4gICAgICAgIH1cbiAgICAgICAgbGVhdmVzID0gY29sbGVjdExlYXZlcyhyZXZfdHJlZSkubWFwKGZ1bmN0aW9uIChsZWFmKSB7XG4gICAgICAgICAgcmV0dXJuIGxlYWYucmV2O1xuICAgICAgICB9KTtcbiAgICAgICAgZmluaXNoT3BlblJldnMoKTtcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRzLm9wZW5fcmV2cykpIHtcbiAgICAgICAgbGVhdmVzID0gb3B0cy5vcGVuX3JldnM7XG4gICAgICAgIGZvciA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QgPSBpZDtcbiAgICAgICAgcmV0dXJuIGNiKGVycik7XG4gICAgICB9XG5cbiAgICAgIHZhciBpbmRleE9mUmV2ID0gcGF0aC5pZHMubWFwKGZ1bmN0aW9uICh4KSB7IHJldHVybiB4LmlkOyB9KVxuICAgICAgICAuaW5kZXhPZihkb2MuX3Jldi5zcGxpdCgnLScpWzFdKSArIDE7XG4gICAgICB2YXIgaG93TWFueSA9IHBhdGguaWRzLmxlbmd0aCAtIGluZGV4T2ZSZXY7XG4gICAgICBwYXRoLmlkcy5zcGxpY2UoaW5kZXhPZlJldiwgaG93TWFueSk7XG4gICAgICBwYXRoLmlkcy5yZXZlcnNlKCk7XG5cbiAgICAgIGlmIChvcHRzLnJldnMpIHtcbiAgICAgICAgZG9jLl9yZXZpc2lvbnMgPSB7XG4gICAgICAgICAgc3RhcnQ6IChwYXRoLnBvcyArIHBhdGguaWRzLmxlbmd0aCkgLSAxLFxuICAgICAgICAgIGlkczogcGF0aC5pZHMubWFwKGZ1bmN0aW9uIChyZXYpIHtcbiAgICAgICAgICAgIHJldHVybiByZXYuaWQ7XG4gICAgICAgICAgfSlcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIGlmIChvcHRzLnJldnNfaW5mbykge1xuICAgICAgICB2YXIgcG9zID0gIHBhdGgucG9zICsgcGF0aC5pZHMubGVuZ3RoO1xuICAgICAgICBkb2MuX3JldnNfaW5mbyA9IHBhdGguaWRzLm1hcChmdW5jdGlvbiAocmV2KSB7XG4gICAgICAgICAgcG9zLS07XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJldjogcG9zICsgJy0nICsgcmV2LmlkLFxuICAgICAgICAgICAgc3RhdHVzOiByZXYub3B0cy5zdGF0dXNcbiAgICAgICAgICB9O1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAob3B0cy5hdHRhY2htZW50cyAmJiBkb2MuX2F0dGFjaG1lbnRzKSB7XG4gICAgICB2YXIgYXR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Nhc2UgJ3VuZGVmaW5lZCc6XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICBjYXNlICdudW1iZXInOlxuICAgICAgaWYgKGtleSA9PT0gSW5maW5pdHkgfHwga2V5ID09PSAtSW5maW5pdHkgfHwgaXNOYU4oa2V5KSkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBrZXk7XG4gICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgIHZhciBvcmlnS2V5ID0ga2V5O1xuICAgICAgaWYgKEFycmF5LmlzQXJyYXkoa2V5KSkge1xuICAgICAgICB2YXIgbGVuID0ga2V5Lmxlbmd0aDtcbiAgICAgICAga2V5ID0gbmV3IEFycmF5KGxlbik7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICBrZXlbaV0gPSBub3JtYWxpemVLZXkob3JpZ0tleVtpXSk7XG4gICAgICAgIH1cbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICB9IGVsc2UgaWYgKGtleSBpbnN0YW5jZW9mIERhdGUpIHtcbiAgICAgICAgcmV0dXJuIGtleS50b0pTT04oKTtcbiAgICAgIH0gZWxzZSBpZiAoa2V5ICE9PSBudWxsKSB7IC8vIGdlbmVyaWMgb2JqZWN0XG4gICAgICAgIGtleSA9IHt9O1xuICAgICAgICBmb3IgKHZhciBrIGluIG9yaWdLZXkpIHtcbiAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9yaWdLZXksIGspKSB7XG4gICAgICAgICAgICB2YXIgdmFsID0gb3JpZ0tleVtrXTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBrZXlba10gPSBub3JtYWxpemVLZXkodmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAg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gIHZhciBkb2NJZFJldiA9IGRvY0lkICsgXCI6OlwiICsgcmV2O1xuICAgICAgICAgIC8vIHJlbW92ZSBhbGwgc2VxIGVudHJpZXNcbiAgICAgICAgICAvLyBhc3NvY2lhdGVkIHdpdGggdGhpcyBkb2NJZFxuICAgICAgICAgIHZhciBzdGFydCA9IGRvY0lkICsgXCI6OlwiO1xuICAgICAgICAgIHZhciBlbmQgPSBkb2NJZCArIFwiOjp+XCI7XG4gICAgICAgICAgdmFyIGluZGV4ID0gc2VxU3RvcmUuaW5kZXgoJ19kb2NfaWRfcmV2Jyk7XG4gICAgICAgICAgdmFyIHJhbmdlID0gSURCS2V5UmFuZ2UuYm91bmQoc3RhcnQsIGVuZCwgZmFsc2UsIGZhbHNlKTtcbiAgICAgICAgICB2YXIgc2VxQ3Vyc29yID0gaW5kZXgub3BlbkN1cnNvcihyYW5nZSk7XG4gICAgICAgICAgc2VxQ3Vyc29yLm9uc3VjY2VzcyA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICBzZXFDdXJzb3IgPSBlLnRhcmdldC5yZXN1bHQ7XG4gICAgICAgICAgICBpZiAoIXNlcUN1cnNvcikge1xuICAgICAgICAgICAgICAvLyBkb25lXG4gICAgICAgICAgICAgIGRvY1N0b3JlLmRlbGV0ZShjdXJzb3IucHJpbWFyeUtleSk7XG4gICAgICAgICAgICAgIGN1cnNvci5jb250aW51ZSgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdmFyIGRhdGEgPSBzZXFDdXJzb3IudmFsdWU7XG4gICAgICAgICAgICAgIGlmIChkYXRhLl9kb2NfaWRfcmV2ID09PSBkb2NJZFJldikge1xuICAgICAgICAgICAgICAgIGxvY2FsU3RvcmUucHV0KGRhdGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHNlcVN0b3JlLmRlbGV0ZShzZXFDdXJzb3IucHJpbWFyeUtleSk7XG4gICAgICAgICAgICAgIHNlcUN1cnNvci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2lkX3JldicpLm9wZW5DdXJzb3IoXG4gICAgICAgICAgSURCS2V5UmFuZ2UuYm91bmQoc3RhcnQsIGVuZCkpO1xuXG4gICAgICAgIHZhciBtZXRhZGF0YVNlcSA9IDA7XG4gICAgICAgIHJlcS5vbnN1Y2Nlc3MgPSBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgIHZhciBjdXJzb3IgPSBlLnRhcmdldC5yZXN1bHQ7XG4gICAgICAgICAgaWYgKCFjdXJzb3IpIHtcbiAgICAgICAgICAgIG1ldGFkYXRhLnNlcSA9IG1ldGFkYXRhU2VxO1xuICAgICAgICAgICAgcmV0dXJuIG9uR2V0TWV0YWRhdGFTZXEoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIHNlcSA9IGN1cnNvci5wcmltYXJ5S2V5O1xuICAgICAgICAgIGlmIChzZXEgPiBtZXRhZGF0YVNlcSkge1xuICAgICAgICAgICAgbWV0YWRhdGFTZXEgPSBzZXE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGN1cnNvci5jb250aW51ZSgpO1xuICAgICAgICB9O1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBvbkdldE1ldGFkYXRhU2VxKCkge1xuICAgICAgICB2YXIgbWV0YWRhdGFUb1N0b3JlID0gZW5jb2RlTWV0YWRhdGEobWV0YWRhdGEsXG4gICAgICAgICAgbWV0YWRhdGEud2lubmluZ1JldiwgbWV0YWRhdGEuZGVsZXRlZCk7XG5cbiAgICAgICAgdmFyIHJlcSA9IGRvY1N0b3JlLnB1dChtZXRhZGF0YVRvU3RvcmUpO1xuICAgICAgICByZXEub25zdWNjZXNzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGN1cnNvci5jb250aW51ZSgpO1xuICAgICAgICB9O1xuICAgICAgfVxuXG4gICAgICBpZiAobWV0YWRhdGEuc2VxKSB7XG4gICAgICAgIHJldHVybiBvbkdldE1ldGFkYXRhU2VxKCk7XG4gICAgICB9XG5cbiAgICAgIGZldGNo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ID0gZW5jb2RlRG9jSWQoZG9jLl9pZCkgKyAnLycgKyBlbmNvZGVBdHRhY2htZW50SWQoZmlsZW5hbWUpICtcbiAgICAgICAgICAgICc/cmV2PScgKyBkb2MuX3JldjtcbiAgICAgICAgcmV0dXJuIG91ckZldGNoKGdlbkRCVXJsKGhvc3QsIHBhdGgpKS50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgIGlmICgnYnVmZmVyJyBpbiByZXNwb25zZSkge1xuICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmJ1ZmZlcigpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmJsb2IoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGJsb2IpIHtcbiAgICAgICAgICBpZiAob3B0cy5iaW5hcnkpIHtcbiAgICAgICAgICAgIHZhciB0eXBlRmllbGREZXNjcmlwdG9yID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihibG9iLl9fcHJvdG9fXywgJ3R5cGUnKTtcbiAgICAgICAgICAgIGlmICghdHlwZUZpZWxkRGVzY3JpcHRvciB8fCB0eXBlRmllbGREZXNjcmlwdG9yLnNldCkge1xuICAgICAgICAgICAgICBibG9iLnR5cGUgPSBhdHQuY29udGVudF90eXBlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGJsb2I7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgYmxvYlRvQmFzZTY0KGJsb2IsIHJlc29sdmUpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgZGVsZXRlIGF0dC5zd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ZCByZXZcbiAgYXBpLnJlbW92ZUF0dGFjaG1lbnQgPSAgYWRhcHRlckZ1biQkMSgncmVtb3ZlQXR0YWNobWVudCcsIGZ1bmN0aW9uIChkb2NJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50SWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKSB7XG4gICAgdmFyIHVybCA9IGdlbkRCVXJsKGhvc3QsIGVuY29kZURvY0lkKGRvY0lkKSArICcvJyArXG4gICAgICAgICAgICAgICAgICAgICAgIGVuY29kZUF0dGFjaG1lbnRJZChhdHRhY2htZW50SWQpKSArICc/cmV2PScgKyByZXY7XG4gICAgZmV0Y2hKU09OKHVybCwge21ldGhvZDogJ0RFTEVURSd9LCBjYWxsYmFjaykuY2F0Y2goY2FsbGJhY2spO1xuICB9KTtcblxuICAvLyBBZGQgdGhlIGF0dGFjaG1lbnQgZ2l2ZW4gYnkgYmxvYiBhbmQgaXRzIGNvbnRlbnRUeXBlIHByb3BlcnR5XG4gIC8vIHRvIHRoZSBkb2N1bWVudCB3aXRoIHRoZSBnaXZlbiBpZCwgdGhlIHJldmlzaW9uIGdpdmVuIGJ5IHJldiwgYW5kXG4gIC8vIGFkZCBpdCB0byB0aGUgZGF0YWJhc2UgZ2l2ZW4gYnkgaG9zdC5cbiAgYXBpLnB1dEF0dGFjaG1lbnQgPSBhZGFwdGVyRnVuJCQxKCdwdXRBdHRhY2htZW50JywgZnVuY3Rpb24gKGRvY0lkLCBhdHRhY2htZW50SWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXYsIGJsb2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PSByZXMucGVuZGluZztcbiAgICAgICAgfVxuICAgICAgICBpZiAodHlwZW9mIHJlc3VsdHMubGFzdF9zZXEgPT09ICdzdHJpbmcnIHx8IHR5cGVvZiByZXN1bHRzLmxhc3Rfc2VxID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIGxhc3RTZXEgPSByZXN1bHRzLmxhc3Rfc2VxO1xuICAgICAgICB9XG4gICAgICAgIC8vIEZvciBlYWNoIGNoYW5nZVxuICAgICAgICB2YXIgcmVxID0ge307XG4gICAgICAgIHJlcS5xdWVyeSA9IG9wdHMucXVlcnlfcGFyYW1zO1xuICAgICAgICByZXMucmVzdWx0cyA9IHJlcy5yZXN1bHRzLmZpbHRlcihmdW5jdGlvbiAoYykge1xuICAgICAgICAgIGxlZnRUb0ZldGNoLS07XG4gICAgICAgICAgdmFyIHJldCA9IGZpbHRlckNoYW5nZShvcHRzKShjKTtcbiAgICAgICAgICBpZiAocmV0KSB7XG4gICAgICAgICAgICBpZiAob3B0cy5pbmNsdWRlX2RvY3MgJiYgb3B0cy5hdHRhY2htZW50cyAmJiBvcHRzLmJpbmFyeSkge1xuICAgICAgICAgICAgICByZWFkQXR0YWNobWVudHNBc0Jsb2JPckJ1ZmZlcihjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChvcHRzLnJldHVybl9kb2NzKSB7XG4gICAgICAgICAgICAgIHJlc3VsdHMucmVzdWx0cy5wdXNoKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgb3B0cy5vbkNoYW5nZShjLCBwZW5kaW5nLCBsYXN0U2VxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2UgaWYgKGVycikge1xuICAgICAgICAvLyBJbiBjYXNlIG9mIGFuIGVycm9yLCBzdG9wIGxpc3RlbmluZyBmb3IgY2hhbmdlcyBhbmQgY2FsbFxuICAgICAgICAvLyBvcHRzLmNvbXBsZXRlX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hbXMsIHtcbiAgICAgICAgaGVhZGVyczogbmV3IGgoeydDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbid9KSxcbiAgICAgICAgbWV0aG9kOiBtZXRob2QsXG4gICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KGJvZHkpXG4gICAgICB9KS50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICBvayA9IHJlc3BvbnNlLm9rO1xuICAgICAgICBzdGF0dXMgPSByZXNwb25zZS5zdGF0dXM7XG4gICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7XG4gICAgICB9KS50aGVuKGZ1bmN0aW9uIChyZXN1bHQpIHtcbiAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgIHJlc3VsdC5zdGF0dXMgPSBzdGF0dXM7XG4gICAgICAgICAgdGhyb3cgZ2VuZXJhdGVFcnJvckZyb21SZXNwb25zZShyZXN1bHQpO1xuICAgICAgICB9XG4gICAgICAgIC8vIGZhaWwgdGhlIGVudGlyZSByZXF1ZXN0IGlmIHRoZSByZXN1bHQgY29udGFpbnMgYW4gZXJyb3JcbiAgICAgICAgcmVzdWx0LnJvd3MuZm9yRWFjaChmdW5jdGlvbiAocm93KSB7XG4gICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgaWYgKHJvdy52YWx1ZSAmJiByb3cudmFsdWUuZXJyb3IgJiYgcm93LnZhbHVlLmVycm9yID09PSBcImJ1aWx0aW5fcmVkdWNlX2Vycm9yXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihyb3cucmVhc29uKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfSkudGhlbihwb3N0cHJvY2Vzc0F0dGFjaG1lbnRzKG9wdHMpKTtcbiAgICB9XG5cbiAgICAvLyBXZSBhcmUgdXNpbmcgYSB0ZW1wb3JhcnkgdmlldywgdGV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ICAgICAgICAgICBpZDogcGFyc2VkS2V5QW5kRG9jSWRbMV0sXG4gICAgICAgICAgICB2YWx1ZTogKCd2YWx1ZScgaW4gcmVzdWx0LmRvYyA/IHJlc3VsdC5kb2MudmFsdWUgOiBudWxsKVxuICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gb25NYXBSZXN1bHRzUmVhZHkocm93cykge1xuICAgICAgdmFyIGZpbmFsUmVzdWx0cztcbiAgICAgIGlmIChzaG91bGRSZWR1Y2UpIHtcbiAgICAgICAgZmluYWxSZXN1bHRzID0gcmVkdWNlVmlldyh2aWV3LCByb3dzLCBvcHRzKTtcbiAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG9wdHMua2V5cyA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgZmluYWxSZXN1bHRzID0ge1xuICAgICAgICAgIHRvdGFsX3Jvd3M6IHRvdGFsUm93cyxcbiAgICAgICAgICBvZmZzZXQ6IHNraXAsXG4gICAgICAgICAgcm93czogcm93c1xuICAgICAgICB9O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gc3VwcG9ydCBsaW1pdCwgc2tpcCBmb3Iga2V5cyBxdWVyeVxuICAgICAgICBmaW5hbFJlc3VsdHMgPSB7XG4gICAgICAgICAgdG90YWxfcm93czogdG90YWxSb3dzLFxuICAgICAgICAgIG9mZnNldDogc2tpcCxcbiAgICAgICAgICByb3dzOiBzbGljZVJlc3VsdHMocm93cyxvcHRzLmxpbWl0LG9wdHMuc2tpcClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgaWYgKG9wdHMudXBkYXRlX3NlcSkge1xuICAgICAgICBmaW5hbFJlc3VsdHMudXBkYXRlX3NlcSA9IHZpZXcuc2VxO1xuICAgICAgfVxuICAgICAgaWYgKG9wdHMuaW5jbHVkZV9kb2NzKSB7XG4gICAgICAgIHZhciBkb2NJZHMgPSB1bmlxKHJvd3MubWFwKHJvd1RvRG9jSWQpKTtcblxuICAgICAgICByZXR1cm4gdmlldy5zb3VyY2VEQi5hbGxEb2NzKHtcbiAgICAgICAgICBrZXlzOiBkb2NJZHMsXG4gICAgICAgICAgaW5jbHVkZV9kb2NzOiB0cnVlLFxuICAgICAgICAgIGNvbmZsaWN0czogb3B0cy5jb25mbGljdHMsXG4gICAgICAgICAgYXR0YWNobWVudHM6IG9wdHMuYXR0YWNobWVudHMsXG4gICAgICAgICAgYmluYXJ5OiBvcHRzLmJpbmFyeVxuICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChhbGxEb2NzUmVzKSB7XG4gICAgICAgICAgdmFyIGRvY0lkc1RvRG9jcyA9IG5ldyBFeHBvcnRlZE1hcCgpO1xuICAgICAgICAgIGFsbERvY3NSZXMucm93cy5mb3JFYWNoKGZ1bmN0aW9uIChyb3cpIHtcbiAgICAgICAgICAgIGRvY0lkc1RvRG9jcy5zZXQocm93LmlkLCByb3cuZG9jKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByb3dzLmZvckVhY2goZnVuY3Rpb24gKHJvdykge1xuICAgICAgICAgICAgdmFyIGRvY0lkID0gcm93VG9Eb2NJZChyb3cpO1xuICAgICAgICAgICAgdmFyIGRvYyA9IGRvY0lkc1RvRG9jcy5nZXQoZG9jSWQpO1xuICAgICAgICAgICAgaWYgKGRvYykge1xuICAgICAgICAgICAgICByb3cuZG9jID0gZG9jO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBmaW5hbFJlc3VsdHM7XG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGZpbmFsUmVzdWx0cztcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIG9wdHMua2V5cyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgIHZhciBrZXlzID0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pczoge1wibWlzc2luZ1wiOlwiMS03YzNhYzI1NmI2OTNjNDYyYWY4NDQyZjk5MmI4MzY5NlwifVxuICAgICAgICAgICAgb2sgPSBmYWxzZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIXJlbW90ZURvYyB8fCAhcmVtb3RlRG9jLl9hdHRhY2htZW50cykge1xuICAgICAgICAgICAgcmV0dXJuIHJlbW90ZURvYztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZ2V0RG9jQXR0YWNobWVudHNGcm9tVGFyZ2V0T3JTb3VyY2UodGFyZ2V0LCBzcmMsIHJlbW90ZURvYylcbiAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoYXR0YWNobWVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmaWxlbmFtZXMgPSBPYmplY3Qua2V5cyhyZW1vdGVEb2MuX2F0dGFjaG1lbnRzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dGFjaG1lbnRzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5mb3JFYWNoKGZ1bmN0aW9uIChhdHRhY2htZW50LCBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGF0dCA9IHJlbW90ZURvYy5fYXR0YWNobWVudHNbZmlsZW5hbWVzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgYXR0LnN0dWI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGF0dC5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0LmRhdGEgPSBhdHRhY2htZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVtb3RlRG9jO1x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dGluZ3NcbiAgICAgICAqIEB0eXBlIHtSZWdFeHB9XG4gICAgICAgKi9cbiAgICAgICdldmFsdWF0ZSc6IHJlRXZhbHVhdGUsXG5cbiAgICAgIC8qKlxuICAgICAgICogVXNlZCB0byBkZXRlY3QgYGRhdGFgIHByb3BlcnR5IHZhbHVlcyB0byBpbmplY3QuXG4gICAgICAgKlxuICAgICAgICogQG1lbWJlck9mIF8udGVtcGxhdGVTZXR0aW5nc1xuICAgICAgICogQHR5cGUge1JlZ0V4cH1cbiAgICAgICAqL1xuICAgICAgJ2ludGVycG9sYXRlJzogcmVJbnRlcnBvbGF0ZSxcblxuICAgICAgLyoqXG4gICAgICAgKiBVc2VkIHRvIHJlZmVyZW5jZSB0aGUgZGF0YSBvYmplY3QgaW4gdGhlIHRlbXBsYXRlIHRleHQuXG4gICAgICAgKlxuICAgICAgICogQG1lbWJlck9mIF8udGVtcGxhdGVTZXR0aW5nc1xuICAgICAgICogQHR5cGUge3N0cmluZ31cbiAgICAgICAqL1xuICAgICAgJ3ZhcmlhYmxlJzogJycsXG5cbiAgICAgIC8qKlxuICAgICAgICogVXNlZCB0byBpbXBvcnQgdmFyaWFibGVzIGludG8gdGhlIGNvbXBpbGVkIHRlbXBsYXRlLlxuICAgICAgICpcbiAgICAgICAqIEBtZW1iZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3NcbiAgICAgICAqIEB0eXBlIHtPYmplY3R9XG4gICAgICAgKi9cbiAgICAgICdpbXBvcnRzJzoge1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBBIHJlZmVyZW5jZSB0byB0aGUgYGxvZGFzaGAgZnVuY3Rpb24uXG4gICAgICAgICAqXG4gICAgICAgICAqIEBtZW1iZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3MuaW1wb3J0c1xuICAgICAgICAgKiBAdHlwZSB7RnVuY3Rpb259XG4gICAgICAgICAqL1xuICAgICAgICAnXyc6IGxvZGFzaFxuICAgICAgfVxuICAgIH07XG5cbiAgIC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XlzWzBdO1xuXG4gICAgICB2YXIgaW5kZXggPSAtMSxcbiAgICAgICAgICBzZWVuID0gY2FjaGVzWzBdO1xuXG4gICAgICBvdXRlcjpcbiAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoICYmIHJlc3VsdC5sZW5ndGggPCBtYXhMZW5ndGgpIHtcbiAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdLFxuICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlO1xuXG4gICAgICAgIHZhbHVlID0gKGNvbXBhcmF0b3IgfHwgdmFsdWUgIT09IDApID8gdmFsdWUgOiAwO1xuICAgICAgICBpZiAoIShzZWVuXG4gICAgICAgICAgICAgID8gY2FjaGVIYXMoc2VlbiwgY29tcHV0ZWQpXG4gICAgICAgICAgICAgIDogaW5jbHVkZXMocmVzdWx0LCBjb21wdXRlZCwgY29tcGFyYXRvcilcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICBvdGhJbmRleCA9IG90aExlbmd0aDtcbiAgICAgICAgICB3aGlsZSAoLS1vdGhJbmRleCkge1xuICAgICAgICAgICAgdmFyIGNhY2hlID0gY2FjaGVzW290aEluZGV4XTtcbiAgICAgICAgICAgIGlmICghKGNhY2hlXG4gICAgICAgICAgICAgICAgICA/IGNhY2hlSGFzKGNhY2hlLCBjb21wdXRlZClcbiAgICAgICAgICAgICAgICAgIDogaW5jbHVkZXMoYXJyYXlzW290aEluZGV4XSwgY29tcHV0ZWQsIGNvbXBhcmF0b3IpKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNlZW4pIHtcbiAgICAgICAgICAgIHNlZW4ucHVzaChjb21wdXRlZCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHV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xuICAgICAgICBpZiAoIWlzQnVmZmVyKG90aGVyKSkge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBvYmpJc0FyciA9IHRydWU7XG4gICAgICAgIG9iaklzT2JqID0gZmFsc2U7XG4gICAgICB9XG4gICAgICBpZiAoaXNTYW1lVGFnICYmICFvYmpJc09iaikge1xuICAgICAgICBzdGFjayB8fCAoc3RhY2sgPSBuZXcgU3RhY2spO1xuICAgICAgICByZXR1cm4gKG9iaklzQXJyIHx8IGlzVHlwZWRBcnJheShvYmplY3QpKVxuICAgICAgICAgID8gZXF1YWxBcnJheXMob2JqZWN0LCBvdGhlciwgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjaylcbiAgICAgICAgICA6IGVxdWFsQnlUYWcob2JqZWN0LCBvdGhlciwgb2JqVGFnLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKTtcbiAgICAgIH1cbiAgICAgIGlmICghKGJpdG1hc2sgJiBDT01QQVJFX1BBUlRJQUxfRkxBRykpIHtcbiAgICAgICAgdmFyIG9iaklzV3JhcHBlZCA9IG9iaklzT2JqICYmIGhhc093blByb3BlcnR5LmNhbGwob2JqZWN0LCAnX193cmFwcGVkX18nKSxcbiAgICAgICAgICAgIG90aElzV3JhcHBlZCA9IG90aElzT2JqICYmIGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsICdfX3dyYXBwZWRfXycpO1xuXG4gICAgICAgIGlmIChvYmpJc1dyYXBwZWQgfHwgb3RoSXNXcmFwcGVkKSB7XG4gICAgICAgICAgdmFyIG9ialVud3JhcHBlZCA9IG9iaklzV3JhcHBlZCA/IG9iamVjdC52YWx1ZSgpIDogb2JqZWN0LFxuICAgICAgICAgICAgICBvdGhVbndyYXBwZWQgPSBvdGhJc1dyYXBwZWQgPyBvdGhlci52YWx1ZSgpIDogb3RoZXI7XG5cbiAgICAgICAgICBzdGFjayB8fCAoc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gICAgICB9XG4gICAgICB9XG4gICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTtcbiAgICAgICAgdmFyIGtleSA9IGRhdGFbMF0sXG4gICAgICAgICAgICBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLFxuICAgICAgICAgICAgc3JjVmFsdWUgPSBkYXRhWzFdO1xuXG4gICAgICAgIGlmIChub0N1c3RvbWl6ZXIgJiYgZGF0YVsyXSkge1xuICAgICAgICAgIGlmIChvYmpWYWx1ZSA9PT0gdW5kZWZpbmVkICYmICEoa2V5IGluIG9iamVjdCkpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHN0YWNrID0gbmV3IFN0YWNrO1xuICAgICAgICAgIGlmIChjdXN0b21pemVyKSB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gY3VzdG9taXplcihvYmpWYWx1ZSwgc3JjVmFsdWUsIGtleSwgb2JqZWN0LCBzb3VyY2UsIHN0YWNrKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCEocmVzdWx0ID09PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICA/IGJhc2VJc0VxdWFsKHNyY1ZhbHVlLCBvYmpWYWx1ZSwgQ09NUEFSRV9QQVJUSUFMX0ZMQUcgfCBDT01QQVJFX1VOT1JERVJFRF9GTEFHLCBjdXN0b21pemVyLCBzdGFjaylcbiAgICAgICAgICAgICAgICA6IHJlc3VsdFxuICAgICAgICAgICAgICApKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5pc05hdGl2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1cm5zIGBhcnJheWAuXG4gICAgICovXG4gICAgZnVuY3Rpb24gYmFzZVB1bGxBdChhcnJheSwgaW5kZXhlcykge1xuICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID8gaW5kZXhlcy5sZW5ndGggOiAwLFxuICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHdoaWxlIChsZW5ndGgtLSkge1xuICAgICAgICB2YXIgaW5kZXggPSBpbmRleGVzW2xlbmd0aF07XG4gICAgICAgIGlmIChsZW5ndGggPT0gbGFzdEluZGV4IHx8IGluZGV4ICE9PSBwcmV2aW91cykge1xuICAgICAgICAgIHZhciBwcmV2aW91cyA9IGluZGV4O1xuICAgICAgICAgIGlmIChpc0luZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgc3BsaWNlLmNhbGwoYXJyYXksIGluZGV4LCAxKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYmFzZVVuc2V0KGFycmF5LCBpbmRleCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gYXJyYXk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ucmFuZG9tYCB3aXRob3V0IHN1cHBvcnQgZm9yIHJldHVybmluZ1xuICAgICAqIGZsb2F0aW5nLXBvaW50IG51bWJlcnMuXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSBsb3dlciBUaGUgbG93ZXIgYm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IHVwcGVyIFRoZSB1cHBlciBib3VuZC5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByYW5kb20gbnVtYmVyLlxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGJhc2VSYW5kb20obG93ZXIsIHVwcGVyKSB7XG4gICAgICByZ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ShodHRwczovL21kbi5pby9yb3VuZCNFeGFtcGxlcykgZm9yIG1vcmUgZGV0YWlscy5cbiAgICAgICAgICB2YXIgcGFpciA9ICh0b1N0cmluZyhudW1iZXIpICsgJ2UnKS5zcGxpdCgnZScpLFxuICAgICAgICAgICAgICB2YWx1ZSA9IGZ1bmMocGFpclswXSArICdlJyArICgrcGFpclsxXSArIHByZWNpc2lvbikpO1xuXG4gICAgICAgICAgcGFpciA9ICh0b1N0cmluZyh2YWx1ZSkgKyAnZScpLnNwbGl0KCdlJyk7XG4gICAgICAgICAgcmV0dXJuICsocGFpclswXSArICdlJyArICgrcGFpclsxXSAtIHByZWNpc2lvbikpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jKG51bWJlcik7XG4gICAgICB9O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBzZXQgb2JqZWN0IG9mIGB2YWx1ZXNgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge0FycmF5fSB2YWx1ZXMgVGhlIHZhbHVlcyB0byBhZGQgdG8gdGhlIHNldC5cbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgc2V0LlxuICAgICAqL1xuICAgIHZhciBjcmVhdGVTZXQgPSAhKFNldCAmJiAoMSAvIHNldFRvQXJyYXkobmV3IFNldChbLC0wXSkpWzFdKSA9PSBJTkZJTklUWSkgPyBub29wIDogZnVuY3Rpb24odmFsdWVzKSB7XG4gICAgICByZXR1cm4gbmV3IFNldCh2YWx1ZXMpO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGVzIGEgYF8udG9QYWlyc2Agb3IgYF8udG9QYWlyc0luYCBmdW5jdGlvbi5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtIHtGdW5jdGlvbn0ga2V5c0Z1bmMgVGhlIGZ1bmN0aW9uIHRvIGdldCB0aGUga2V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0aWVzLlxuICAgICAgd2hpbGUgKCsraW5kZXggPCBhcnJMZW5ndGgpIHtcbiAgICAgICAgdmFyIGFyclZhbHVlID0gYXJyYXlbaW5kZXhdLFxuICAgICAgICAgICAgb3RoVmFsdWUgPSBvdGhlcltpbmRleF07XG5cbiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICB2YXIgY29tcGFyZWQgPSBpc1BhcnRpYWxcbiAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgYXJyVmFsdWUsIGluZGV4LCBvdGhlciwgYXJyYXksIHN0YWNrKVxuICAgICAgICAgICAgOiBjdXN0b21pemVyKGFyclZhbHVlLCBvdGhWYWx1ZSwgaW5kZXgsIGFycmF5LCBvdGhlciwgc3RhY2spO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb21wYXJlZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgaWYgKGNvbXBhcmVkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgaWYgKHNlZW4pIHtcbiAgICAgICAgICBpZiAoIWFycmF5U29tZShvdGhlciwgZnVuY3Rpb24ob3RoVmFsdWUsIG90aEluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFjYWNoZUhhcyhzZWVuLCBvdGhJbmRleCkgJiZcbiAgICAgICAgICAgICAgICAgICAgKGFyclZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gc2Vlbi5wdXNoKG90aEluZGV4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pKSB7XG4gICAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICghKFxuICAgICAgICAgICAgICBhcnJWYWx1ZSA9PT0gb3RoVmFsdWUgfHxcbiAgICAgICAgICAgICAgICBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaylcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgc3RhY2tbJ2RlbGV0ZSddKGFycmF5KTtcbiAgICAgIHN0YWNrWydkZWxldGUnXShvdGhlcik7XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEEgc3BlY2lhbGl6ZWQgdmVyc2lvbiBvZiBgYmFzZUlzRXF1YWxEZWVwYCBmb3IgY29tcGFyaW5nIG9iamVjdHMgb2ZcbiAgICAgKiB0aGUgc2FtZSBgdG9TdHJpbmdUYWdgLlxuICAgICAqXG4gICAgICogKipOb3RlOioqIFRoaXMgZnVuY3Rpb24gb25seSBzdXBwb3J0cyBjb21wYXJpbmcgdmFsdWVzIHdpdGggdGFncyBvZlxuICAgICAqIGBCb29sZWFuYCwgYERhdGVgLCBgRXJyb3JgLCBgTnVtYmVyYCwgYFJlZ0V4cGAsIG9yIGBTdHJpbmdgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gY29tcGFyZS5cbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb3RoZXIgVGhlIG90aGVyIG9iamVjdCB0byBjb21wYXJlLl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9zdHJpbmdcbiAgICAgICAgICAvLyBmb3IgbW9yZSBkZXRhaWxzLlxuICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gKG90aGVyICsgJycpO1xuXG4gICAgICAgIGNhc2UgbWFwVGFnOlxuICAgICAgICAgIHZhciBjb252ZXJ0ID0gbWFwVG9BcnJheTtcblxuICAgICAgICBjYXNlIHNldFRhZzpcbiAgICAgICAgICB2YXIgaXNQYXJ0aWFsID0gYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHO1xuICAgICAgICAgIGNvbnZlcnQgfHwgKGNvbnZlcnQgPSBzZXRUb0FycmF5KTtcblxuICAgICAgICAgIGlmIChvYmplY3Quc2l6ZSAhPSBvdGhlci5zaXplICYmICFpc1BhcnRpYWwpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQXNzdW1lIGN5Y2xpYyB2YWx1ZXMgYXJlIGVxdWFsLlxuICAgICAgICAgIHZhciBzdGFja2VkID0gc3RhY2suZ2V0KG9iamVjdCk7XG4gICAgICAgICAgaWYgKHN0YWNrZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyO1xuICAgICAgICAgIH1cbiAgICAgICAgICBiaXRtYXNrIHw9IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUc7XG5cbiAgICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIG9iamVjdHMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7XG4gICAgICAgICAgdmFyIHJlc3VsdCA9IGVxdWFsQXJyYXlzKGNvbnZlcnQob2JqZWN0KSwgY29udmVydChvdGhlciksIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spO1xuICAgICAgICAgIHN0YWNrWydkZWxldGUnXShvYmplY3QpO1xuICAg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EhPVF9TUEFOIC0gKHN0YW1wIC0gbGFzdENhbGxlZCk7XG5cbiAgICAgICAgbGFzdENhbGxlZCA9IHN0YW1wO1xuICAgICAgICBpZiAocmVtYWluaW5nID4gMCkge1xuICAgICAgICAgIGlmICgrK2NvdW50ID49IEhPVF9DT1VOVCkge1xuICAgICAgICAgICAgcmV0dXJuIGFyZ3VtZW50c1swXTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY291bnQgPSAwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jLmFwcGx5KHVuZGVmaW5lZCwgYXJndW1lbnRzKTtcbiAgICAgIH07XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLnNodWZmbGVgIHdoaWNoIG11dGF0ZXMgYW5kIHNldHMgdGhlIHNpemUgb2YgYGFycmF5YC5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHNodWZmbGUuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtzaXplPWFycmF5Lmxlbmd0aF0gVGhlIHNpemUgb2YgYGFycmF5YC5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzaHVmZmxlU2VsZihhcnJheSwgc2l6ZSkge1xuICAgICAgdmFyIGluZGV4ID0gLTEsXG4gICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLFxuICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHNpemUgPSBzaXplID09PSB1bmRlZmluZWQgPyBsZW5ndGggOiBzaXplO1xuICAgICAgd2hpbGUgKCsraW5kZXggPCBzaXplKSB7XG4gICAgICAgIHZhciByYW5kID0gYmFzZVJhbmRvbShpbmRleCwgbGFz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LCAnYWdlJzogMzYgfVxuICAgICAqXG4gICAgICogLy8gQSBzZXF1ZW5jZSB3aXRoIGV4cGxpY2l0IGNoYWluaW5nLlxuICAgICAqIF8odXNlcnMpXG4gICAgICogICAuY2hhaW4oKVxuICAgICAqICAgLmhlYWQoKVxuICAgICAqICAgLnBpY2soJ3VzZXInKVxuICAgICAqICAgLnZhbHVlKCk7XG4gICAgICogLy8gPT4geyAndXNlcic6ICdiYXJuZXknIH1cbiAgICAgKi9cbiAgICBmdW5jdGlvbiB3cmFwcGVyQ2hhaW4oKSB7XG4gICAgICByZXR1cm4gY2hhaW4odGhpcyk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogRXhlY3V0ZXMgdGhlIGNoYWluIHNlcXVlbmNlIGFuZCByZXR1cm5zIHRoZSB3cmFwcGVkIHJlc3VsdC5cbiAgICAgKlxuICAgICAqIEBuYW1lIGNvbW1pdFxuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDMuMi4wXG4gICAgICogQGNhdGVnb3J5IFNlcVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMl07XG4gICAgICogdmFyIHdyYXBwZWQgPSBfKGFycmF5KS5wdXNoKDMpO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFsxLCAyXVxuICAgICAqXG4gICAgICogd3JhcHBlZCA9IHdyYXBwZWQuY29tbWl0KCk7XG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFsxLCAyLCAzXVxuICAgICAqXG4gICAgICogd3JhcHBlZC5sYXN0KCk7XG4gICAgICogLy8gPT4gM1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC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4gICAgICAgIGlmICh0aW1lcklkICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXJJZCk7XG4gICAgICAgIH1cbiAgICAgICAgbGFzdEludm9rZVRpbWUgPSAwO1xuICAgICAgICBsYXN0QXJncyA9IGxhc3RDYWxsVGltZSA9IGxhc3RUaGlzID0gdGltZXJJZCA9IHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgZnVuY3Rpb24gZmx1c2goKSB7XG4gICAgICAgIHJldHVybiB0aW1lcklkID09PSB1bmRlZmluZWQgPyByZXN1bHQgOiB0cmFpbGluZ0VkZ2Uobm93KCkpO1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBkZWJvdW5jZWQoKSB7XG4gICAgICAgIHZhciB0aW1lID0gbm93KCksXG4gICAgICAgICAgICBpc0ludm9raW5nID0gc2hvdWxkSW52b2tlKHRpbWUpO1xuXG4gICAgICAgIGxhc3RBcmdzID0gYXJndW1lbnRzO1xuICAgICAgICBsYXN0VGhpcyA9IHRoaXM7XG4gICAgICAgIGxhc3RDYWxsVGltZSA9IHRpbWU7XG5cbiAgICAgICAgaWYgKGlzSW52b2tpbmcpIHtcbiAgICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXR1cm4gbGVhZGluZ0VkZ2UobGFzdENhbGxUaW1lKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG1heGluZykge1xuICAgICAgICAgICAgLy8gSGFuZGxlIGludm9jYXRpb25zIGluIGEgdGlnaHQgbG9vcC5cbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcklkKTtcbiAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgd2FpdCk7XG4gICAgICAgICAgICByZXR1cm4gaW52b2tlRnVuYyhsYXN0Q2FsbFRpbWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuIC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4gICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gaW5zcGVjdC5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGNhc3QgYXJyYXkuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIF8uY2FzdEFycmF5KDEpO1xuICAgICAqIC8vID0+IFsxXVxuICAgICAqXG4gICAgICogXy5jYXN0QXJyYXkoeyAnYSc6IDEgfSk7XG4gICAgICogLy8gPT4gW3sgJ2EnOiAxIH1dXG4gICAgICpcbiAgICAgKiBfLmNhc3RBcnJheSgnYWJjJyk7XG4gICAgICogLy8gPT4gWydhYmMnXVxuICAgICAqXG4gICAgICogXy5jYXN0QXJyYXkobnVsbCk7XG4gICAgICogLy8gPT4gW251bGxdXG4gICAgICpcbiAgICAgKiBfLmNhc3RBcnJheSh1bmRlZmluZWQpO1xuICAgICAqIC8vID0+IFt1bmRlZmluZWRdXG4gICAgICpcbiAgICAgKiBfLmNhc3RBcnJheSgpO1xuICAgICAqIC8vID0+IFtdXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgM107XG4gICAgICogY29uc29sZS5sb2coXy5jYXN0QXJyYXkoYXJyYXkpID09PSBhcnJheSk7XG4gICAgICogLy8gPT4gdHJ1ZVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGNhc3RBcnJheSgpIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICB2YXIgdmFsdWUgPSBhcmd1bWVudHNbMF07XG4gICAgICByZXR1cm4gaXNBcnJheSh2YWx1ZSkgPyB2YWx1ZSA6IFt2YWx1ZV07XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhIHNoYWxsb3cgY2xvbmUgb2YgYHZhbHVlYC5cbiAgICAgKlxuICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZC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5mdW5jdGlvbnNJblxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBmdW5jdGlvbiBGb28oKSB7XG4gICAgICogICB0aGlzLmEgPSBfLmNvbnN0YW50KCdhJyk7XG4gICAgICogICB0aGlzLmIgPSBfLmNvbnN0YW50KCdiJyk7XG4gICAgICogfVxuICAgICAqXG4gICAgICogRm9vLnByb3RvdHlwZS5jID0gXy5jb25zdGFudCgnYycpO1xuICAgICAqXG4gICAgICogXy5mdW5jdGlvbnMobmV3IEZvbyk7XG4gICAgICogLy8gPT4gWydhJywgJ2InXVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGZ1bmN0aW9ucyhvYmplY3QpIHtcbiAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbCA/IFtdIDogYmFzZUZ1bmN0aW9ucyhvYmplY3QsIGtleXMob2JqZWN0KSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiBmdW5jdGlvbiBwcm9wZXJ0eSBuYW1lcyBmcm9tIG93biBhbmQgaW5oZXJpdGVkXG4gICAgICogZW51bWVyYWJsZSBwcm9wZXJ0aWVzIG9mIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMC4wXG4gICAgICogQGNhdGVnb3J5IE9iamVjdFxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBpbnNwZWN0LlxuICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgZnVuY3Rpb24gbmFtZXMuXG4gICAgICogQHNlZSBfLmZ1bmN0aW9uc1xuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBmdW5jdGlvbiBGb28oKSB7XG4gICAgICogICB0aGlzLmEgPSBfLmNvbnN0YW50KCdhJyk7XG4gICAgICogICB0aGlzLmIgPSBfLmNvbnN0Y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dGlvbmFsIGFyZ3VtZW50cyBhcmUgcHJvdmlkZWQgdG8gdGhlIGludm9rZWQgbWV0aG9kLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDMuNy4wXG4gICAgICogQGNhdGVnb3J5IFV0aWxcbiAgICAgKiBAcGFyYW0ge0FycmF5fHN0cmluZ30gcGF0aCBUaGUgcGF0aCBvZiB0aGUgbWV0aG9kIHRvIGludm9rZS5cbiAgICAgKiBAcGFyYW0gey4uLip9IFthcmdzXSBUaGUgYXJndW1lbnRzIHRvIGludm9rZSB0aGUgbWV0aG9kIHdpdGguXG4gICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgaW52b2tlciBmdW5jdGlvbi5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIG9iamVjdHMgPSBbXG4gICAgICogICB7ICdhJzogeyAnYic6IF8uY29uc3RhbnQoMikgfSB9LFxuICAgICAqICAgeyAnYSc6IHsgJ2InOiBfLmNvbnN0YW50KDEpIH0gfVxuICAgICAqIF07XG4gICAgICpcbiAgICAgKiBfLm1hcChvYmplY3RzLCBfLm1ldGhvZCgnYS5iJykpO1xuICAgICAqIC8vID0+IFsyLCAxXVxuICAgICAqXG4gICAgICogXy5tYXAob2JqZWN0cywgXy5tZXRob2QoWydhJywgJ2InXSkpO1xuICAgICAqIC8vID0+IFsyLCAxXVxuICAgICAqL1xuICAgIHZhciBtZXRob2QgPSBiYXNlUmVzdChmdW5jdGlvbihwYXRoLCBhcmdzKSB7XG4gICAgICByZXR1cm4gZnVuY3Rpb24ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiBiYXNlSW52b2tlKG9iamVjdCwgcGF0aCwgYXJncyk7XG4gICAgICB9O1xuICAgIH0pO1xuXG4gICAgLyoqXG4gICAgICogVGhlIG9wcG9zaXRlIG9mIGBfLm1ldGhvZGA7IHRoaXMgbWV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XG4gICAgICogXy5tdWx0aXBseSg2LCA0KTtcbiAgICAgKiAvLyA9PiAyNFxuICAgICAqL1xuICAgIHZhciBtdWx0aXBseSA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24obXVsdGlwbGllciwgbXVsdGlwbGljYW5kKSB7XG4gICAgICByZXR1cm4gbXVsdGlwbGllciAqIG11bHRpcGxpY2FuZDtcbiAgICB9LCAxKTtcblxuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGBudW1iZXJgIHJvdW5kZWQgdG8gYHByZWNpc2lvbmAuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgMy4xMC4wXG4gICAgICogQGNhdGVnb3J5IE1hdGhcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gcm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtwcmVjaXNpb249MF0gVGhlIHByZWNpc2lvbiB0byByb3VuZCB0by5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByb3VuZGVkIG51bWJlci5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy5yb3VuZCg0LjAwNik7XG4gICAgICogLy8gPT4gNFxuICAgICAqXG4gICAgICogXy5yb3VuZCg0LjAwNiwgMik7XG4gICAgICogLy8gPT4gNC4wMVxuICAgICAqXG4gICAgICogXy5yb3VuZCg0MDYwLCAtMik7XG4gICAgICogLy8gPT4gNDEwMFxuICAgICAqL1xuICAgIHZhciByb3VuZCA9IGNyZWF0ZVJvdW5kKCdyb3VuZCcpO1xuXG4gICAgLyoqXG4gICAgICogU3VidHJhY3QgdHdvIG51bWJlcnMuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgNC4wLjBcbiAgICAgKiBAY2F0ZWdvcnkg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gICAgICAgICAgICBpZiAocGFydC5jaGFyQ29kZUF0KGopID4gMTI3KSB7XG4gICAgICAgICAgICAgIC8vIHdlIHJlcGxhY2Ugbm9uLUFTQ0lJIGNoYXIgd2l0aCBhIHRlbXBvcmFyeSBwbGFjZWhvbGRlclxuICAgICAgICAgICAgICAvLyB3ZSBuZWVkIHRoaXMgdG8gbWFrZSBzdXJlIHNpemUgb2YgaG9zdG5hbWUgaXMgbm90XG4gICAgICAgICAgICAgIC8vIGJyb2tlbiBieSByZXBsYWNpbmcgbm9uLUFTQ0lJIGJ5IG5vdGhpbmdcbiAgICAgICAgICAgICAgbmV3cGFydCArPSAneCc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBuZXdwYXJ0ICs9IHBhcnRbal07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vIHdlIHRlc3QgYWdhaW4gd2l0aCBBU0NJSSBjaGFyIG9ubHlcbiAgICAgICAgICBpZiAoIW5ld3BhcnQubWF0Y2goaG9zdG5hbWVQYXJ0UGF0dGVybikpIHtcbiAgICAgICAgICAgIHZhciB2YWxpZFBhcnRzID0gaG9zdHBhcnRzLnNsaWNlKDAsIGkpO1xuICAgICAgICAgICAgdmFyIG5vdEhvc3QgPSBob3N0cGFydHMuc2xpY2UoaSArIDEpO1xuICAgICAgICAgICAgdmFyIGJpdCA9IHBhcnQubWF0Y2goaG9zdG5hbWVQYXJ0U3RhcnQpO1xuICAgICAgICAgICAgaWYgKGJpdCkge1xuICAgICAgICAgICAgICB2YWxpZFBhcnRzLnB1c2goYml0WzFdKTtcbiAgICAgICAgICAgICAgbm90SG9zdC51bnNoaWZ0KGJpdFsyXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobm90SG9zdC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgcmVzdCA9ICcvJyArIG5vdEhvc3Quam9pbignLicpICsgcmVzdDtcbiAgICAgICAgICAgIH1cbiAgICAgIC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jYXNlICdwcmVzc3VzJzpcbiAgICAgICAgY29uc3QgY29udG91ciA9IHRoaXMubmVvblZpZXcuaW5mby5nZXRDb250b3VyQnlWYWx1ZShcbiAgICAgICAgICBidXR0b25JZC5jaGFyQXQoMCkudG9VcHBlckNhc2UoKSArIGJ1dHRvbklkLnNsaWNlKDEpXG4gICAgICAgICk7XG4gICAgICAgIHRoaXMudHlwZSA9ICdncm91cGluZyc7XG4gICAgICAgIHRoaXMuYXR0cmlidXRlcyA9IHsgY29udG91cjogY29udG91ciB9O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2NDbGVmJzpcbiAgICAgIGNhc2UgJ2ZDbGVmJzpcbiAgICAgICAgdGhpcy50eXBlID0gJ2NsZWYnO1xuICAgICAgICB0aGlzLmF0dHJpYnV0ZXMgPSB7IHNoYXBlOiBidXR0b25JZC5jaGFyQXQoMCkudG9VcHBlckNhc2UoKSB9O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2N1c3Rvcyc6XG4gICAgICAgIHRoaXMudHlwZSA9ICdjdXN0b3MnO1xuICAgICAgICB0aGlzLmF0dHJpYnV0ZXMgPSBudWxsO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2RpdkxpbmVNYXhpbWEnOlxuICAgICAgICB0aGlzLnR5cGUgPSAnZGl2TGluZSc7XG4gICAgICAgIHRoaXMuYXR0cmlidXRlcyA9IHsgZm9ybTogJ21heGltYScgfTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdzdGFmZic6XG4gICAgICAgIHRoaXMudHlwZSA9ICdzdGFmZic7XG4gICAgICAgIHRoaXMuYXR0cmlidXRlcyA9IG51bGw7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnZmxhdCc6XG4gICAgICAgIHRoaXMudHlwZSA9ICdhY2NpZCc7XG4gICAgICAgIHRoaXMuYXR0cmlidXRlcyA9IHsgYWNjaWQ6ICdmJyB9O1xuICAgICAgICBicmVhaztcb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vbi1zY2FsZScpO1xuXG4gICAgaWYgKHRoaXMuZmlyc3RDbGljaykge1xuICAgICAgdGhpcy5jb29yZCA9IGN1cnNvcjtcbiAgICAgIGQzLnNlbGVjdChjb250YWluZXIpLmFwcGVuZCgnY2lyY2xlJykuYXR0cignY3gnLCBjdXJzb3IueClcbiAgICAgICAgLmF0dHIoJ2N5JywgY3Vyc29yLnkpXG4gICAgICAgIC5hdHRyKCdyJywgMTApXG4gICAgICAgIC5hdHRyKCdpZCcsICdzdGFmZi1jaXJjbGUnKVxuICAgICAgICAuYXR0cignZmlsbCcsICdncmVlbicpO1xuICAgICAgdGhpcy5maXJzdENsaWNrID0gZmFsc2U7XG4gICAgfSBlbHNlIHtcbiAgICAgIGxldCB1bDogUG9pbnQsIGxyOiBQb2ludDtcbiAgICAgIGlmIChjdXJzb3IueCA8IHRoaXMuY29vcmQueCB8fCBjdXJzb3IueSA8IHRoaXMuY29vcmQueSkgeyAvLyBzZWNvbmQgcG9pbnQgaXMgbm90IGxyXG4gICAgICAgIHVsID0gY3Vyc29yO1xuICAgICAgICBsciA9IHRoaXMuY29vcmQ7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB1bCA9IHRoaXMuY29vcmQ7XG4gICAgICAgIGxyID0gY3Vyc29yO1xuICAgICAgfVxuICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3N0YWZmLWNpcmNsZScpLnJlbW92ZSgpO1xuICAgICAgY29uc3QgYWN0aW9uOiBFZGl0b3JBY3Rpb24gPSB7XG4gICAgICAgIGFjdGlvbjogJ2luc2VydCcsXG4gICAgICAgIHBhcmFtOiB7XG4gICAgICAgICAgZWxlbWVudFR5cGU6ICdzdGFmZicsXG4gICAgICAgICAgc3RhZmZJZDogJ2F1dG8nLFxuICAgICAgICAgIHVseDogdWwueCxcbiAgICAgICAgICB1bHk6IHVsLnksXG4gICAgICAgICAgbHJ4OiBsci54LFxuICAgICAgICAgIGxyeTogbHIueVxuICAgICAgICB9XG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AgICAgICAgY29uc3QgbWFuVGltZSA9ICh0aW1lWm9uZVJlZ2V4cC50ZXN0KHRoaXMubWFuaWZlc3QudGltZXN0YW1wKSkgP1xuICAgICAgICAgIChuZXcgRGF0ZSh0aGlzLm1hbmlmZXN0LnRpbWVzdGFtcC5yZXBsYWNlKHRpbWVab25lUmVnZXhwLCAnJDE6JDInKSkpLmdldFRpbWUoKVxuICAgICAgICAgIDogKG5ldyBEYXRlKHRoaXMubWFuaWZlc3QudGltZXN0YW1wKSkuZ2V0VGltZSgpO1xuICAgICAgICBpZiAoZG9jVGltZSA+IG1hblRpbWUpIHtcbiAgICAgICAgICBpZiAoIWZvcmNlKSB7XG4gICAgICAgICAgICAvLyBGaWxsIGFubm90YXRpb25zIGxpc3Qgd2l0aCBkYiBhbm5vdGF0aW9uc1xuICAgICAgICAgICAgdGhpcy5hbm5vdGF0aW9ucyA9IFtdO1xuICAgICAgICAgICAgY29uc3QgcHJvbWlzZXMgPSBkb2MuYW5ub3RhdGlvbnMubWFwKChpZDogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5kYi5nZXQoaWQpLnRoZW4oKGFubm90YXRpb246IERiQW5ub3RhdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgdGhpcy5hbm5vdGF0aW9ucy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGFubm90YXRpb24uX2lkLFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnQW5ub3RhdGlvbicsXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IGFubm90YXRpb24uYm9keSxcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0OiBhbm5vdGF0aW9uLnRhcmdldFxuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICByZXMoJycpO1xuICAgICAgICAgICAgICAgIH0pLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgICAgICAgICAgICByZXMoJycpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgYXdhaXQgUHJvbWlzZS5hbGwocHJvbWlzZXMpO1xuICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUoZmFsc2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmb3IgKGNvbnN0IGFubm90YXRpb24gb2YgdGhpcy5hbm5vdGF0aW9ucykge1xuICAgICAgICAgIC8vIEFkZCBhbm5vdGF0aW9ucyB0byBkYXRhYmFzZVxuICAgICAgICAgIGF3YWl0IHRoaXMuZGIuZ2V0KGFubm90YXRpb24uaWQpLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICBpZiAoZXJyLm5hbWUgPT09ICdub3RfZm91bmQnKSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgX2lkOiBhbm5vdGF0aW9uLmlkXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgICAgICAgIHJldHVybiByZWplY3QoZXJyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KS50aGVuKChuZXdBbm5vdGF0aW9uOiBEYkFubm90YXRpb24pID0+IHtcbiAgICAgICAgICAgIG5ld0Fubm90YXRpb24uYm9keSA9IGFubm90YXRpb24uYm9keTtcbiAgICAgICAgICAgIG5ld0Fubm90YXRpb24udGFyZ2V0ID0gYW5ub3RhdGlvbi50YXJnZXQ7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kYi5wdXQobmV3QW5ub3RhdGlvbik7XG4gICAgICAgICAgfSkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICAgIHJlamVjdChlcnIpO1xuICAgICAgIC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Wx0KSB7XG4gICAgICAgICAgICAgIGlmICghdGhpcy51bmRvU3RhY2tzLmhhcyhwYWdlVVJJKSkge1xuICAgICAgICAgICAgICAgIHRoaXMudW5kb1N0YWNrcy5zZXQocGFnZVVSSSwgW10pO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgLy8gQWRkIHRvIHVuZG8gc3RhY2s6XG4gICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgYm90dG9tbW9zdCBNRUkgc3RyaW5nIG9uIHRoZSBzdGFja1xuICAgICAgICAgICAgICAvLyBpZiB0aGUgc3RhY2sgaXMgPiAxMCBzdHJpbmdzXG4gICAgICAgICAgICAgIGNvbnN0IHVuZG9TdGFjayA9IHRoaXMudW5kb1N0YWNrcy5nZXQocGFnZVVSSSk7XG4gICAgICAgICAgICAgIGNvbnN0IGxlbiA9IHVuZG9TdGFjay5wdXNoKGN1cnJlbnRNRUkpO1xuXG4gICAgICAgICAgICAgIGlmIChsZW4gPiAxMClcbiAgICAgICAgICAgICAgICB0aGlzLnVuZG9TdGFja3Muc2V0KHBhZ2VVUkksIHVuZG9TdGFjay5zbGljZSgxKSk7XG5cbiAgICAgICAgICAgICAgLy8gQ2xlYXIgcmVkbyBzdGFjazpcbiAgICAgICAgICAgICAgdGhpcy5yZWRvU3RhY2tzLnNldChwYWdlVVJJLCBbXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBldnQudGFyZ2V0LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCBoYW5kbGUpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVDYWNoZShwYWdlVVJJLCB0cnVlKS50aGVuKCgpID0+IHsgcmVzb2x2ZShldnQuZGF0YS5yZXN1bHQpOyB9KTtcbiAgICAgICAgICAgIHNldFNhdmVkU3RhdHVzKGZhbHNlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy52ZXJvdmlvV3JhcHBlci5hZGRFdmVudExp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XCIgc3VwcG9ydFxuICAgIHZhciBfZXh0ZW5kID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIGZvciAodmFyIGk9MTsgaTxhcmd1bWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBhcmd1bWVudHNbaV0pIHtcbiAgICAgICAgICAgICAgICBpZiAoYXJndW1lbnRzW2ldLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJndW1lbnRzWzBdW2tleV0gPSBhcmd1bWVudHNbaV1ba2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGFyZ3VtZW50c1swXTtcbiAgICB9O1xuXG4gICAgdmFyIFZhbmlsbGFLaW5ldGljID0gZnVuY3Rpb24oZWxlbWVudCwgc2V0dGluZ3MpIHtcbiAgICAgICAgdGhpcy5zZXR0aW5ncyA9IF9leHRlbmQoe30sIFZhbmlsbGFLaW5ldGljLkRFRkFVTFRTLCBzZXR0aW5ncyk7XG4gICAgICAgIHRoaXMuZWwgICAgICAgPSBlbGVtZW50O1xuICAgICAgICB0aGlzLkFDVElWRV9DTEFTUyA9IFwia2luZXRpYy1hY3RpdmVcIjtcblxuICAgICAgICB0aGlzLl9pbml0RWxlbWVudHMoKTtcblxuICAgICAgICB0aGlzLmVsLl9WYW5pbGxhS2luZXRpYyA9IHRoaXM7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG5cbiAgICBWYW5pbGxhS2luZXRpYy5ERUZBVUxUUyA9IHtcbiAgICAgICAgY3Vyc29yOiAnbW92ZScsXG4gICAgICAgIGRlY2VsZXJhdGU6IHRydWUsXG4gICAgICAgIHRyaWdnZXJIYXJkd2FyZTogZmFsc2UsXG4gICAgICAgIHRocmVzaG9sZDogMCxcbiAgICAgICAgeTogdHJ1ZSxcbiAgICAgICAgeDogdHJ1ZSxcbiAgICAgICAgc2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lcihcIm1vdXNldXBcIiwgdGhpcy5kb2N1bWVudFJlc2V0SGFuZGxlciwgZmFsc2UpO1xuICAgICAgICBodG1sLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCB0aGlzLmRvY3VtZW50UmVzZXRIYW5kbGVyLCBmYWxzZSk7XG5cbiAgICAgICAgdGhpcy5faW5pdEV2ZW50cygpO1xuXG4gICAgICAgIHRoaXMuZWwuc3R5bGUuY3Vyc29yID0gdGhpcy5zZXR0aW5ncy5jdXJzb3I7XG5cbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MudHJpZ2dlckhhcmR3YXJlKSB7XG4gICAgICAgICAgICB2YXIgcHJlZml4ZXMgPSBbJycsICctbXMtJywgJy13ZWJraXQtJywgJy1tb3otJ107XG4gICAgICAgICAgICB2YXIgc3R5bGVzID0ge1xuICAgICAgICAgICAgICAgICd0cmFuc2Zvcm0nOiAndHJhbnNsYXRlM2QoMCwwLDApJyxcbiAgICAgICAgICAgICAgICAncGVyc3BlY3RpdmUnOiAnMTAwMCcsIC8vIFRPRE8gaXMgdGhpcyBldmVuIHZhbGlkPyBpcyB0aGlzIGV2ZW4gbmVlZGVkP1xuICAgICAgICAgICAgICAgICdiYWNrZmFjZS12aXNpYmlsaXR5JzogJ2hpZGRlbidcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBmb3IgKHZhciBpPTA7IGk8cHJlZml4ZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJlZml4ID0gcHJlZml4ZXNbaV07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIHN0eWxlcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3R5bGVzLmhhc093blByb3BlcnR5KGtleSkpe1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lbC5zdHlsZVtwcmVmaXgra2V5XSA9IHN0eWxlc1trZXldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIFZhbmlsbGFLaW5ldGljLnByb3RvdHlwZS5faW5pdEV2ZW50cyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZXZlbnRzID0ge1xuICAgICAgICAgICAgdG91Y2hTdGFydDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgICAgIHZhciB0b3VjaDtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fdXNlVGFyZ2V0KGUudGFyZ2V0LCBlKSkge1xuICAgICAgICAgICAgICAgICAgICB0b3VjaCA9IGUub3JpZ2luYWxFdmVudC50b3VjaGVzWzBdO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLnRocmVzaG9sZCA9IHNlbGYuX3RocmVzaG9sZChlLnRhcmdldCwgZSk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3N0YXJ0KHRvdWNoLmNsaWVudFgsIHRvdWNoLmNsaWVudFkpO1xuICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB0b3VjaE1vdmU6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgdG91Y2g7XG4gICAgICAgICAgICAgICAgaWYgKHNlbGYubW91c2VEb3duKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvdWNoID0gZS5vcmlnaW5hbEV2ZW50LnRvdWNoZXNbMF07XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2lucHV0bW92ZSh0b3VjaC5jbGllbnRYLCB0b3VjaC5jbGllbnRZKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUucHJldmVudERlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnB1dERvd246IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fdXNlVGFyZ2V0KGUudGFyZ2V0LCBlKSkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLnRocmVzaG9sZCA9IHNlbGYuX3RocmVzaG9sZChlLnRhcmdldCwgZSk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3N0YXJ0KGUuY2xpZW50WCwgZS5jbGllbnRZKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5lbGVtZW50Rm9jdXNlZCA9IGUudGFyZ2V0O1xuICAgICAgICAgICAgICAgICAgICBpZiAoZS50YXJnZXQubm9kZU5hbWUgPT09IFwiSU1HXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnB1dEVuZDogZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgICAgIGlmIChzZWxmLl91c2VUYXJnZXQoZS50YXJnZXQsIGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2VuZCgpO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVsZW1lbnRGb2N1c2VkID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUucHJldmVudERlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnB1dE1vdmU6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5tb3VzZURvd24pIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5wdXRtb3ZlKGUuY2xpZW50WCwgZS5jbGllbnRZKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUucHJldmVudERlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY3JvbGw6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNlbGYuc2V0dGluZ3MubW92ZWQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zZXR0aW5ncy5tb3ZlZC5jYWxsKHNlbGYsIHNlbGYuc2V0dGluZ3MpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZS5wcmV2ZW50RGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlucHV0Q2xpY2s6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoTWF0aC5hYnMoc2VsZi52ZWxvY2l0eSkgPiAwIHx8IE1hdGguYWJzKHNlbGYudmVsb2NpdHlZKSA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZS5zdG9wUHJvcGFnYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkcmFnU3RhcnQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fdXNlVGFyZ2V0KGUudGFyZ2V0LCBlKSAmJiBzZWxmLmVsZW1lbnRGb2N1c2VkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLnByZXZlbnREZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGUuc3RvcFByb3BhZ2F0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2VsZWN0U3RhcnQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHNlbGYuc2V0dGluZ3Muc2VsZWN0U3RhcnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYuc2V0dGluZ3Muc2VsZWN0U3RhcnQuYXBwbHkoc2VsZiwgYXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2VsZi5fdXNlVGFyZ2V0KGUudGFyZ2V0LCBlKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZS5wcmV2ZW50RGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLnN0b3BQcm9wYWdhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuX2F0dGFjaExpc3RlbmVycygpO1xuICAgIH07XG5cbiAgICBWYW5pbGxhS2luZXRpYy5wcm90b3R5cGUuX2lucHV0bW92ZSA9IGZ1bmN0aW9uKGNsaWVudFgsIGNsaWVudFkpIHtcbiAgICAgICAgaWYgKCF0aGlzLmxhc3RNb3ZlIHx8IG5ldyBEYXRlKCkgPiBuZXcgRGF0ZSh0aGlzLmxhc3RNb3ZlLmdldFRpbWUoKSArIHRoaXMudGhyb3R0bGVUaW1lb3V0KSkge1xuICAgICAgICAgICAgdGhpcy5sYXN0TW92ZSA9IG5ldyBEYXRlKCk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLm1vdXNlRG93biAmJiAodGhpcy54cG9zIHx8IHRoaXMueXBvcykpIHtcbiAgICAgICAgICAgICAgICB2YXIgbW92ZWRYID0gKGNsaWVudFggLSB0aGlzLnhwb3MpO1xuICAgICAgICAgICAgICAgIHZhciBtb3ZlZFkgPSAoY2xpZW50WSAtIHRoaXMueXBvcyk7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuaW52ZXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIG1vdmVkWCAqPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgbW92ZWRZICo9IC0xO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodGhpcy50aHJlc2hvbGQ+MCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbW92ZWQgPSBNYXRoLnNxcnQobW92ZWRYKm1vdmVkWCArIG1vdmVkWSptb3ZlZFkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy50aHJlc2hvbGQ+bW92ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGhyZXNob2xkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5lbGVtZW50Rm9jdXNlZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnRGb2N1c2VkLmJsdXIoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50Rm9jdXNlZCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLnNldHRpbmdzLmRlY2VsZXJhdGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB0aGlzLnZlbG9jaXR5ID0gdGhpcy52ZWxvY2l0eVkgPSAwO1xuXG4gICAgICAgICAgICAgICAgdmFyIHNjcm9sbExlZnQgPSB0aGlzLnNjcm9sbExlZnQoKTtcbiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID0gdGhpcy5zY3JvbGxUb3AoKTtcblxuICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsTGVmdCh0aGlzLnNldHRpbmdzLnggPyBzY3JvbGxMZWZ0IC0gbW92ZWRYIDogc2Nyb2xsTGVmdCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxUb3AodGhpcy5zZXR0aW5ncy55ID8gc2Nyb2xsVG9wIC0gbW92ZWRZIDogc2Nyb2xsVG9wKTtcblxuICAgICAgICAgICAgICAgIHRoaXMucHJldlhQb3MgPSB0aGlzLnhwb3M7XG4gICAgICAgICAgICAgICAgdGhpcy5wcmV2WVBvcyA9IHRoaXMueXBvcztcbiAgICAgICAg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Ch0aGlzLCBzZXR0aW5ncyk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoTWF0aC5hYnModGhpcy52ZWxvY2l0eSkgPiAwIHx8IE1hdGguYWJzKHRoaXMudmVsb2NpdHlZKSA+IDApe1xuICAgICAgICAgICAgaWYgKCF0aGlzLm1vdmluZykge1xuICAgICAgICAgICAgICAgIHRoaXMubW92aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAvLyB0aWNrIGZvciBuZXh0IG1vdmVtZW50XG4gICAgICAgICAgICAgICAgX3JhZihmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5tb3ZpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fbW92ZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgc2VsZi5zdG9wKCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgVmFuaWxsYUtpbmV0aWMucHJvdG90eXBlLl9nZXRTY3JvbGxlciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAvLyBGSVhNRSB3ZSBtYXkgd2FudCB0byBub3JtYWxpemUgYmVoYXZpb3VyIGFjcm9zcyBicm93c2VycyBhcyBpbiBvcmlnaW5hbCBqUXVlcnkua2luZXRpY1xuICAgICAgICAvLyBjdXJyZW50bHkgdGhpcyB3b24ndCB3b3JrIGNvcnJlY3RseSBvbiBhbGwgYnJ3b3NlcnMgd2hlbiBhdHRhY2hlZCB0byBodG1sIG9yIGJvZHkgZWxlbWVudFxuICAgICAgICByZXR1cm4gdGhpcy5lbDtcbiAgICB9O1xuXG4gICAgVmFuaWxsYUtpbmV0aWMucHJvdG90eXBlLnNjcm9sbExlZnQgPSBmdW5jdGlvbihsZWZ0KSB7XG4gICAgICAgIHZhciBzY3JvbGxlciA9IHRoaXMuX2dldFNjcm9sbGVyKCk7XG4gICAgICAgIG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AgKGZ1bmN0aW9uIChlbCwgbGFzdENsaWVudFgsIGxhc3RDbGllbnRZLCBwdXNoZWQsIHNjcm9sbGVyLCBjb250KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIChjb250ID0gZWwuY29udGFpbmVyIHx8IGVsKVthZGRFdmVudExpc3RlbmVyXShcbiAgICAgICAgICAgICAgICAgICAgbW91c2Vkb3duLFxuICAgICAgICAgICAgICAgICAgICBjb250Lm1kID0gZnVuY3Rpb24gKGUpXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZWwuaGFzQXR0cmlidXRlKCdub2NoaWxkZHJhZycpIHx8IF9kb2N1bWVudC5lbGVtZW50RnJvbVBvaW50KGUucGFnZVgsIGUucGFnZVkpID09PSBjb250KVxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1c2hlZCA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENsaWVudFggPSBlLmNsaWVudFg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENsaWVudFkgPSBlLmNsaWVudFk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIDBcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgX3dpbmRvd1thZGRFdmVudExpc3RlbmVyXShtb3VzZXVwLCBjb250Lm11ID0gZnVuY3Rpb24gKClcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHVzaGVkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG5cbiAgICAgICAgICAgICAgICBfd2luZG93W2FkZEV2ZW50TGlzdGVuZXJdKG1vdXNlbW92ZSwgY29udC5tbSA9IGZ1bmN0aW9uIChlKVxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHVzaGVkKVxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzY3JvbGxlciA9IGVsLnNjcm9sbGVyIHx8IGVsKS5zY3JvbGxMZWZ0IC09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1Njcm9sbFggPSAoLWxhc3RDbGllbnRYICsgKGxhc3RDbGllbnRYID0gZS5jbGllbnRYKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2Nyb2xsZXIuc2Nyb2xsVG9wIC09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1Njcm9sbFkgPSAoLWxhc3RDbGllbnRZICsgKGxhc3RDbGllbnRZID0gZS5jbGllbnRZKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVsID09PSBfZG9jdW1lbnQuYm9keSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzY3JvbGxlciA9IF9kb2N1bWVudC5kb2N1bWVudEVsZW1lbnQpLnNjcm9sbExlZnQgLT0gbmV3U2Nyb2xsWDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2Nyb2xsZXIuc2Nyb2xsVG9wIC09IG5ld1Njcm9sbFk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCAwKTtcbiAgICAgICAgICAgIH0pKGRyYWdnZWRbaSsrXSk7XG4gICAgICAgIH1cbiAgICAgICAgLyoganNoaW50IGlnbm9yZTplbmQgKi9cbiAgICB9O1xuXG4gICAgaWYgKF9kb2N1bWVudC5yZWFkeVN0YXRlID09PSAnY29tcGxldGUnKVxuICAgIHtcbiAgICAgICAgcmVzZXQoKTtcbiAgICB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ICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoY29udG91ciA9PT0gJ0NsaXZpcycpIHtcbiAgICAgICAgICBjb25zdCBhdHRyOiBBdHRyaWJ1dGVzID0gYXdhaXQgdGhpcy5uZW9uVmlldy5nZXRFbGVtZW50QXR0cihuY3NbMF0uaWQsIHRoaXMubmVvblZpZXcudmlldy5nZXRDdXJyZW50UGFnZVVSSSgpKTtcbiAgICAgICAgICBpZiAoYXR0ci5saWdhdGVkKSB7XG4gICAgICAgICAgICBjb250b3VyID0gJ0xpZ2F0dXJlJztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHBpdGNoZXMgPSBhd2FpdCB0aGlzLmdldFBpdGNoZXMobmNzKTtcblxuICAgICAgICBwaXRjaGVzID0gcGl0Y2hlcy50cmltKCkudG9VcHBlckNhc2UoKTtcbiAgICAgICAgYm9keSA9ICdTaGFwZTogJyArIChjb250b3VyID09PSB1bmRlZmluZWQgPyAnQ29tcG91bmQnIDogY29udG91cikgKyAnXFxyXFxuJyArXG4gICAgICAgICAgICAgICAgJ1BpdGNoKGVzKTogJyArIHBpdGNoZXM7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgY2FzZSAnY3VzdG9zJzoge1xuICAgICAgICBhdHRyaWJ1dGVzID0gYXdhaXQgdGhpcy5uZW9uVmlldy5nZXRFbGVtZW50QXR0cihpZCwgdGhpcy5uZW9uVmlldy52aWV3LmdldEN1cnJlbnRQYWdlVVJJKCkpO1xuICAgICAgICBib2R5ICs9ICdQaXRjaDogJyArIChhdHRyaWJ1dGVzWydwbmFtZSddKS50b1VwcGVyQ2FzZSgpICsgYXR0cmlidXRlc1snb2N0J107XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgY2FzZSAnYWNjaWQnOiB7XG4gICAgICAgIGF0dHJpYnV0ZXMgPSBhd2FpdCB0aGlzLm5lb25WaWV3LmdldEVsZW1lbnRBdHRyKGlkLCB0aGl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AoY29uc3QgbmMgb2YgbmNzKSB7XG4gICAgICBjb25zdCBhdHRyaWJ1dGVzOiBBdHRyaWJ1dGVzID0gYXdhaXQgdGhpcy5uZW9uVmlldy5nZXRFbGVtZW50QXR0cihuYy5pZCwgdGhpcy5uZW9uVmlldy52aWV3LmdldEN1cnJlbnRQYWdlVVJJKCkpO1xuICAgICAgaWYgKHByZXZpb3VzICE9PSBudWxsKSB7XG4gICAgICAgIGlmIChwcmV2aW91c1snb2N0J10gPiBhdHRyaWJ1dGVzWydvY3QnXSkge1xuICAgICAgICAgIGNvbnRvdXIgKz0gJ2QnO1xuICAgICAgICB9IGVsc2UgaWYgKHByZXZpb3VzWydvY3QnXSA8IGF0dHJpYnV0ZXNbJ29jdCddKSB7XG4gICAgICAgICAgY29udG91ciArPSAndSc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKHRoaXMucGl0Y2hOYW1lVG9OdW0ocHJldmlvdXNbJ3BuYW1lJ10pIDwgdGhpcy5waXRjaE5hbWVUb051bShhdHRyaWJ1dGVzWydwbmFtZSddKSkge1xuICAgICAgICAgICAgY29udG91ciArPSAndSc7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnBpdGNoTmFtZVRvTnVtKHByZXZpb3VzWydwbmFtZSddKSA+IHRoaXMucGl0Y2hOYW1lVG9OdW0oYXR0cmlidXRlc1sncG5hbWUnXSkpIHtcbiAgICAgICAgICAgIGNvbnRvdXIgKz0gJ2QnO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb250b3VyICs9ICdzJztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHByZXZpb3VzID0gYXR0cmlidXRlcztcbiAgICB9XG4gICAgaWYgKG5ldW1lR3JvdXBzLmdldChjb250b3VyKSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICBjb25zb2xlLndhcm4oJ1Vua25vd24gY29udG91cjogJyArIGNvbnRvdXIpO1xuICAg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XS5hcHBseShzY29wZSB8fCBudWxsLCBhcmdzIHx8IFtdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChzY29wZSAmJiB0eXBlb2Ygc2NvcGUuZ2V0SW5zdGFuY2VJZCAhPT0gJ3VuZGVmaW5lZCcpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgLy8gZ2V0IHB1Ymxpc2hlciBpbnN0YW5jZSBJRCBmcm9tIHNjb3BlIGFyZywgY29tcGFyZSwgYW5kIGV4ZWN1dGUgaWYgbWF0Y2hcbiAgICAgICAgICAgICAgICBjb25zdCBpbnN0YW5jZUlEID0gc2NvcGUuZ2V0SW5zdGFuY2VJZCgpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NhY2hlW3RvcGljXVtpbnN0YW5jZUlEXSlcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRoaXNUb3BpY0luc3RhbmNlID0gdGhpcy5fY2FjaGVbdG9waWNdW2luc3RhbmNlSURdO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzY29wZWRDb3VudCA9IHRoaXNUb3BpY0luc3RhbmNlLmxlbmd0aDtcblxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqPTA7IGogPCBzY29wZWRDb3VudDsgaisrKVxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzVG9waWNJbnN0YW5jZVtqXS5hcHBseShzY29wZSwgYXJncyB8fCBbXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBkaXZhLkV2ZW50cy5zdWJzY3JpYmVcbiAgICAgKiBlLmcuOiBkaXZhLkV2ZW50cy5zdWJzY3JpYmUoXCJQYWdlRGlkTG9hZFwiLCBoaWdobGlnaHQsIHNldHRpbmdzLklEKVxuICAgICAqXG4gICAgICogQGNsYXNzIEV2ZW50c1xuICAgICAqIEBtZXRob2Qgc3Vic2NyaWJlXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IHRvcGljXG4gICAgICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2tcbiAgICAgKiBAcGFyYW0ge3N0cmluZz19IGluc3RhbmNlSUQgIE9wdGlvbmFsIC0gU3RyaW5nIHJlcHJlc2VudGluZyB0aGUgSUQgb2YgYSBEaXZhIGluc3RhbmNlOyBpZiBwcm92aWRlZCxcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrIG9ubHkgZmlyZXMgZm9yIGV2ZW50cyBwdWJsaXNoZWQgZnJvbSB0aGF0IGluc3RhbmNlLlxuICAgICAqIEByZXR1cm4gRXZlbnQgaGFuZGxlciB7QXJyYXl9XG4gICAgICovXG4gICAgc3Vic2NyaWJlKHRvcGljLCBjYWxsYmFjaywgaW5zdGFuY2VJRClcbiAgICB7XG4gICAgICAgIGlmICghdGhpcy5fY2FjaGVbdG9waWNdKVxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLl9jYWNoZVt0b3BpY10gPSB7fTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2VJRCA9PT0gJ3N0cmluZycpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5fY2FjaGVbdG9waWNdW2luc3RhbmNlSURdKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlW3RvcGljXVtpbnN0YW5jZUlEXSA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLl9jYWNoZVt0b3BpY11baW5zdGFuY2VJRF0ucHVzaChjYWxsYmFjayk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICBpZiA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yA/IGhhbmRsZVsyXSA6ICdnbG9iYWwnO1xuXG4gICAgICAgICAgICB0b3BpY0FycmF5ID0gdGhpcy5fY2FjaGVbdF1baW5zdGFuY2VJRF07XG5cbiAgICAgICAgICAgIGlmICghdG9waWNBcnJheSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjb21wbGV0ZWx5KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9jYWNoZVt0XVtpbnN0YW5jZUlEXTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9waWNBcnJheS5sZW5ndGggPiAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQgaSA9IHRvcGljQXJyYXkubGVuZ3RoO1xuXG4gICAgICAgICAgICB3aGlsZSAoaS0tKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlmICh0b3BpY0FycmF5W2ldID09PSBoYW5kbGVbMV0pXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZVt0XVtpbnN0YW5jZUlEXS5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBkaXZhLkV2ZW50cy51bnN1YnNjcmliZUFsbFxuICAgICAqIGUuZy46IGRpdmEuRXZlbnRzLnVuc3Vic2NyaWJlQWxsKCdnbG9iYWwnKTtcbiAgICAgKlxuICAgICAqIEBjbGFzcyBFdmVudHNcbiAgICAgKiBAcGFyYW0ge3N0cmluZz19IGluc3RhbmNlSUQgT3B0aW9uYWwgLSBpbnN0YW5jZSBJRCB0byByZW1vdmUgc3Vic2NyaWJlcnMgZnJvbSBvciAnZ2xvYmFsJyAoaWYgb21pdHRlZCxcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnNjcmliZXJzIGluIGFsbCBzY29wZXMgcmVtb3ZlZClcbiAgICAgKiBAbWV0aG9kIHVuc3Vic2NyaWJlQWxsXG4gICAgICovXG4gICAgdW5zdWJzY3JpYmVBbGwoaW5zdGFuY2VJRClcbiAgICB7XG4gICAgICAgIGlmIChpbnN0YW5jZUlEKVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCB0b3BpY3MgPSBPYmplY3Qua2V5cyh0aGlzLl9jYWNoZSk7XG4gICAgICAgICAgICBsZXQgaSA9IHRvcGljcy5sZW5ndGg7XG4gICAgICAgICAgICBsZXQgdG9waWM7XG5cbiAgICAgICAgICAgIHdoaWxlIChpLS0pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9waWMgPSB0b3BpY3NbaV07XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRoaXMuX2NhY2hlW3RvcGljXVtpbnN0YW5jZUlEXSAhPT0gJ3VuZGVmaW5lZCcpXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fY2FjaGVbdG9waWNdW2luc3RhbmNlSURdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRoaXMuX2NhY2hlID0ge307XG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBsZXQgRXZlbnRzID0gbmV3IERpdmFFdmVudHMoKTtcbiIsImV4cG9ydCBkZWZhdWx0IHtcbiAgICBvbkRvdWJsZUNsaWNrLFxuICAgIG9uUGluY2gsXG4gICAgb25Eb3VibGVUYXBcbn07XG5cbmNvbnN0IERPVUJMRV9DTElDS19USU1FT1VUID0gNTAwO1xuY29uc3QgRE9VQkxFX1RBUF9ESVNUQU5DRV9USFJFU0hPTEQgPSA1MDtcbmNvbnN0IERPVUJMRV9UQVBfVElNRU9VVCA9IDI1MDtcblxuZnVuY3Rpb24gb25Eb3VibGVDbGljayhlbGVtLCBjYWxsYmFjaylcbntcbiAgICBlbGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2RibGNsaWNrJywgZnVuY3Rpb24gKGV2ZW50KVxuICAgIHtcbiAgICAgICAgaWYgKCFldmVudC5jdHJsS2V5KVxuICAgICAgICB7XG4gICAgICAgICAgICBjYWxsYmFjayhldmVudCwgZ2V0UmVsYXRpdmVPZmZzZXQoZXZlbnQuY3VycmVudFRhcmdldCwgZXZlbnQpKTtcbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgLy8gSGFuZGxlIHRoZSBjb250cm9sIGtleSBmb3IgbWFjcyAoaW4gY29uanVuY3Rpb24gd2l0aCBkb3VibGUtY2xpY2tpbmcpXG4gICAgLy8gRklYTUU6IERvZXMgYSBjbGljayBnZXQgaGFuZGxlZCB3aXRoIGN0cmwgcHJlc3NlZCBvbiBub24tTWFjcz9cbiAgICBjb25zdCB0cmFja2VyID0gY3JlYXRlRG91YmxlRXZlbnRUcmFja2VyKERPVUJMRV9DTElDS19USU1FT1VUKTtcblxuICAgIGVsZW0uYWRkRXZlbnRMaXN0ZW5lcignY29udGV4dG1lbnUnLCBmdW5jdGlvbiAoZXZlbnQpXG4gICAge1xuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgIGlmIChldmVudC5jdHJsS2V5KVxuICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHJhY2tlci5pc1RyaWdnZXJlZCgpKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRyYWNrZXIucmVzZXQoKTtcbiAgICAgICAgICAgICAgICBjYWxsYmFjayhldmVudCwgZ2V0UmVsYXRpdmVPZmZzZXQoZXZlbnQuY3VycmVudFRhcmdldCwgZXZlbnQpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0cmFja2VyLnRyaWdnZXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xufVxuXG5mdW5jdGlvbiBvblBpbmNoKGVsZW0sIGNhbGxiYWNrKVxue1xuICAgIGxldCBzdGFydERpc3RhbmNlID0gMDtcblxuICAgIGVsZW0uYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIGZ1bmN0aW9uIChldmVudClcbiAgICB7XG4gICAgICAgIC8vIFByZXZlbnQgbW91c2UgZXZlbnQgZnJvbSBmaXJpbmdcbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICBpZiAoZXZlbnQub3JpZ2luYWxFdmVudC50b3VjaGVzLmxlbmd0aCA9PT0gMilcbiAgICAgICAge1xuICAgICAgICAgICAgc3RhcnREaXN0YW5jZSA9IGRpc3RhbmNlKFxuICAgICAgICAgICAgICAgIGV2ZW50Lm9yaWdpbmFsRXZlbnQudG91Y2hlc1swXS5jbGllbnRYLFxuICAgICAgICAgICAgICAgIGV2ZW50Lm9yaWdpbmFsRXZlbnQudG91Y2hlc1swXS5jbGllbnRZLFxuICAgICAgICAgICAgICAgIGV2ZW50Lm9yaWdpbmFsRXZlbnQudG91Y2hlc1sxXS5jbGllbnRYLFxuICAgICAgICAgICAgICAgIGV2ZW50Lm9yaWdpbmFsRXZlbnQudG91Y2hlc1sxXS5jbGllbnRZXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICBlbGVtLmFkZEV2ZW50TGlzdGVuZXIoJ3RvdWNobW92ZScsIGZ1bmN0aW9uKGV2ZW50KVxuICAgIHtcbiAgICAgICAgLy8gUHJldmVudCBtb3VzZSBldmVudCBmcm9tIGZpcmluZ1xuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgIGlmIChldmVudC5vcmlnaW5hbEV2ZW50LnRvdWNoZXMubGVuZ3RoID09PSAyKVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCB0b3VjaGVzID0gZXZlbnQub3JpZ2luYWxFdmVudC50b3VjaGVzO1xuXG4gICAgICAgICAgICBjb25zdCBtb3ZlRGlzdGFuY2UgPSBkaXN0YW5jZShcbiAgICAgICAgICAgICAgICB0b3VjaGVzWzBdLmNsaWVudFgsXG4gICAgICAgICAgICAgICAgdG91Y2hlc1swXS5jbGllbnRZLFxuICAgICAgICAgICAgICAgIHRvdWNoZXNbMV0uY2xpZW50WCxcbiAgICAgICAgICAgICAgICB0b3VjaGVzWzFdLmNsaWVudFlcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIGNvbnN0IHpvb21EZWx0YSA9IG1vdmVEaXN0YW5jZSAtIHN0YXJ0RGlzdGFuY2U7XG5cbiAgICAgICAgICAgIGlmIChNYXRoLmFicyh6b29tRGVsdGEpID4gMClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCB0b3VjaENlbnRlciA9IHtcbiAgICAgICAgICAgICAgICAgICAgcGFnZVg6ICh0b3VjaGVzWzBdLmNsaWVudFggKyB0b3VjaGVzWzFdLmNsaWVudFgpIC8gMixcbiAgICAgICAgICAgICAgICAgICAgcGFnZVk6ICh0b3VjaGVzWzBdLmNsaWVudFkgKyB0b3VjaGVzWzFdLmNsaWVudFkpIC8gMlxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICBjYWxsYmFjayhldmVudCwgZ2V0UmVsYXRpdmVPZmZzZXQoZXZlbnQuY3VycmVudFRhcmdldCwgdG91Y2hDZW50ZXIpLCBzdGFydERpc3RhbmNlLCBtb3ZlRGlzdGFuY2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIG9uRG91YmxlVGFwKGVsZW0sIGNhbGxiYWNrKVxue1xuICAgIGN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UcmFja2VyKHRpbWVvdXREdXJhdGlvbilcbntcbiAgICBsZXQgdHJpZ2dlcmVkID0gZmFsc2U7XG4gICAgbGV0IHRpbWVvdXRJZCA9IG51bGw7XG5cbiAgICByZXR1cm4ge1xuICAgICAgICB0cmlnZ2VyKClcbiAgICAgICAge1xuICAgICAgICAgICAgdHJpZ2dlcmVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHJlc2V0VGltZW91dCgpO1xuICAgICAgICAgICAgdGltZW91dElkID0gc2V0VGltZW91dChmdW5jdGlvbiAoKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRyaWdnZXJlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHRpbWVvdXRJZCA9IG51bGw7XG4gICAgICAgICAgICB9LCB0aW1lb3V0RHVyYXRpb24pO1xuICAgICAgICB9LFxuICAgICAgICBpc1RyaWdnZXJlZCgpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJldHVybiB0cmlnZ2VyZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIHJlc2V0KClcbiAgICAgICAge1xuICAgICAgICAgICAgdHJpZ2dlcmVkID0gZmFsc2U7XG4gICAgICAgICAgICByZXNldFRpbWVvdXQoKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBmdW5jdGlvbiByZXNldFRpbWVvdXQoKVxuICAgIHtcbiAgICAgICAgaWYgKHRpbWVvdXRJZCAhPT0gbnVsbClcbiAgICAgICAge1xuICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7XG4gICAgICAgICAgICB0aW1lb3V0SWQgPSBudWxsO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5mdW5jdGlvbiBnZXRSZWxhdGl2ZU9mZnNldChlbGVtLCBwYWdlQ29vcmRzKVxue1xuICAgIGNvbnN0IGJvdW5kcyA9IGVsZW0uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG5cbiAgICByZXR1cm4ge1xuICAgICAgICBsZWZ0O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uICAgIHVwZGF0ZU92ZXJsYXlzIChyZW5kZXJlZFBhZ2VzKVxuICAgIHtcbiAgICAgICAgY29uc3QgcHJldmlvdXNseVJlbmRlcmVkID0gdGhpcy5fcmVuZGVyZWRQYWdlcztcbiAgICAgICAgY29uc3QgbmV3UmVuZGVyZWRNYXAgPSB7fTtcblxuICAgICAgICByZW5kZXJlZFBhZ2VzLm1hcCggKHBhZ2VJbmRleCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgbmV3UmVuZGVyZWRNYXBbcGFnZUluZGV4XSA9IHRydWU7XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5fcmVuZGVyZWRQYWdlTWFwW3BhZ2VJbmRleF0pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5fcmVuZGVyZWRQYWdlTWFwW3BhZ2VJbmRleF0gPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5faW52b2tlT25PdmVybGF5cyhwYWdlSW5kZXgsIG92ZXJsYXkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXkubW91bnQoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgcHJldmlvdXNseVJlbmRlcmVkLm1hcCggKHBhZ2VJbmRleCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKG5ld1JlbmRlcmVkTWFwW3BhZ2VJbmRleF0pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5faW52b2tlT25PdmVybGF5cyhwYWdlSW5kZXgsIChvdmVybGF5KSA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheS5yZWZyZXNoKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZG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lsZXMuZm9yRWFjaCh0aWxlID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdXJsc1RvVGlsZXNbdGlsZS51cmxdID0ge1xuICAgICAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IGxldmVsLnpvb21MZXZlbCxcbiAgICAgICAgICAgICAgICAgICAgcm93OiB0aWxlLnJvdyxcbiAgICAgICAgICAgICAgICAgICAgY29sOiB0aWxlLmNvbFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5jbGVhcigpO1xuICAgIH1cblxuICAgIGNsZWFyICgpXG4gICAge1xuICAgICAgICBjb25zdCBsb2FkZWRCeUxldmVsID0gdGhpcy5fbG9hZGVkQnlMZXZlbCA9IHt9O1xuXG4gICAgICAgIHRoaXMuX2xldmVscy5mb3JFYWNoKGxldmVsID0+IHtcbiAgICAgICAgICAgIGxvYWRlZEJ5TGV2ZWxbbGV2ZWwuem9vbUxldmVsXSA9IG5ldyBUaWxlQ292ZXJhZ2VNYXAobGV2ZWwucm93cywgbGV2ZWwuY29scyk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGdldFRpbGVzIChiYXNlWm9vbUxldmVsKVxuICAgIHtcbiAgICAgICAgY29uc3QgdG9SZW5kZXJCeUxldmVsID0gW107XG4gICAgICAgIGNvbnN0IGhpZ2hlc3Rab29tTGV2ZWwgPSB0aGlzLl9sZXZlbHNbMF0uem9vbUxldmVsO1xuICAgICAgICBjb25zdCBjb3ZlcmVkID0gbmV3IFRpbGVDb3ZlcmFnZU1hcCh0aGlzLl9sZXZlbHNbMF0ucm93cywgdGhpcy5fbGV2ZWxzWzBdLmNvbHMpO1xuXG4gICAgICAgIGxldCBiZXN0TGV2ZWxJbmRleDtcblxuICAgICAgICAvLyBEZWZhdWx0IHRvIHRoZSBsb3dlc3Qgem9vbSBsZXZlbFxuICAgICAgICBpZiAoYmFzZVpvb21MZXZlbCA9P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AgICAgICAgICAgICAgICAgIGlmICghY292ZXJlZC5pc0xvYWRlZChoaWdoUmVzUm93ICsgaSwgaGlnaFJlc0NvbCArIGopKVxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzTmVlZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3ZlcmVkLnNldChoaWdoUmVzUm93ICsgaSwgaGlnaFJlc0NvbCArIGosIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIGlzTmVlZGVkO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHRvUmVuZGVyQnlMZXZlbC5wdXNoKGFkZGl0aW9uYWxUaWxlcyk7XG4gICAgICAgIH0sIHRoaXMpO1xuXG4gICAgICAgIC8vIExlc3MtcHJlZmVycmVkIHRpbGVzIHNob3VsZCBjb21lIGZpcnN0XG4gICAgICAgIHRvUmVuZGVyQnlMZXZlbC5yZXZlcnNlKCk7XG5cbiAgICAgICAgY29uc3QgdGlsZXMgPSBbXTtcblxuICAgICAgICB0b1JlbmRlckJ5TGV2ZWwuZm9yRWFjaChieUxldmVsID0+IHtcbiAgICAgICAgICAgIHRpbGVzLnB1c2guYXBwbHkodGlsZXMsIGJ5TGV2ZWwpO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gdGlsZXM7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVXBkYXRlIHRoZSBjb21wb3NpdGUgaW1hZ2UgdG8gdGFrZSBpbnRvIGFjY291bnQgYWxsIHRoZSBVUkxzXG4gICAgICogbG9hZGVkIGluIGFuIGltYWdlIGNhY2hlLlxuICAgICAqXG4gICAgICogQHBhcmFtIGNhY2hlIHtJbWFnZUNhY2hlfVxuICAgICAqL1xuICAgIHVwZGF0ZUZyb21DYWNo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oOiB3aWR0aFxuICAgICAgICB9LFxuICAgICAgICBwYWdlR3JvdXBzOiBwYWdlR3JvdXBzXG4gICAgfTtcbn1cblxuZnVuY3Rpb24gZ2V0U2NhbGVkUGFnZUxheW91dHMgKGNvbmZpZywgem9vbUxldmVsKVxue1xuICAgIGNvbnN0IHNjYWxlUmF0aW8gPSBNYXRoLnBvdygyLCB6b29tTGV2ZWwgLSBjb25maWcubWF4Wm9vbUxldmVsKTtcblxuICAgIHJldHVybiBjb25maWcucGFnZUxheW91dHMubWFwKGdyb3VwID0+ICh7XG4gICAgICAgIGRpbWVuc2lvbnM6IHNjYWxlRGltZW5zaW9ucyhncm91cC5kaW1lbnNpb25zLCBzY2FsZVJhdGlvKSxcblxuICAgICAgICBwYWdlczogZ3JvdXAucGFnZXMubWFwKHBhZ2UgPT4gKHtcbiAgICAgICAgICAgIGluZGV4OiBwYWdlLmluZGV4LFxuXG4gICAgICAgICAgICBncm91cE9mZnNldDoge1xuICAgICAgICAgICAgICAgIHRvcDogTWF0aC5mbG9vcihwYWdlLmdyb3VwT2Zmc2V0LnRvcCAqIHNjYWxlUmF0aW8pLFxuICAgICAgICAgICAgICAgIGxlZnQ6IE1hdGguZmxvb3IocGFnZS5ncm91cE9mZnNldC5sZWZ0ICogc2NhbGVSYXRpbylcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGRpbWVuc2lvbnM6IHNjYWxlRGltZW5zaW9ucyhwYWdlLmRpbWVuc2lvbnMsIHNjYWxlUmF0aW8pXG4gICAgICAgIH0pKVxuICAgIH0pKTtcbn1cblxuZnVuY3Rpb24gc2NhbGVEaW1lbnNpb25zIChkaW1lbnNpb25zLCBzY2FsZVJhdGlvKVxue1xuICAgIHJldHVybiB7XG4gICAgICAgIGhlaWdodDogTWF0aC5mbG9vcihkaW1lbnNpb25zLmhlaWdodCAqIHNjYWxlUmF0aW8pLFxuICAgICAgICB3aWR0aDogTWF0aC5mbG9vcihkaW1lbnNpb25zLndpZHRoICogc2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mljaWVudC5cbiAqL1xuY29uc3QgREVGQVVMVF9NQVhfS0VZUyA9IDEwMDtcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgSW1hZ2VDYWNoZVxue1xuICAgIGNvbnN0cnVjdG9yIChvcHRpb25zKVxuICAgIHtcbiAgICAgICAgb3B0aW9ucyA9IG9wdGlvbnMgfHwgeyBtYXhLZXlzOiBERUZBVUxUX01BWF9LRVlTIH07XG4gICAgICAgIHRoaXMubWF4S2V5cyA9IG9wdGlvbnMubWF4S2V5cyB8fCBERUZBVUxUX01BWF9LRVlTO1xuXG4gICAgICAgIHRoaXMuX2hlbGQgPSB7fTtcbiAgICAgICAgdGhpcy5fdXJscyA9IHt9O1xuICAgICAgICB0aGlzLl9scnUgPSBbXTtcbiAgICB9XG5cbiAgICBnZXQgKHVybClcbiAgICB7XG4gICAgICAgIGNvbnN0IHJlY29yZCA9IHRoaXMuX3VybHNbdXJsXTtcbiAgICAgICAgcmV0dXJuIHJlY29yZCA/IHJlY29yZC5pbWcgOiBudWxsO1xuICAgIH1cblxuICAgIGhhcyAodXJsKVxuICAgIHtcbiAgICAgICAgcmV0dXJuICEhdGhpcy5fdXJsc1t1cmxdO1xuICAgIH1cblxuICAgIHB1dCAodXJsLCBpbWcpXG4gICAge1xuICAgICAgICBsZXQgcmVjb3JkID0gdGhpcy5fdXJsc1t1cmxdO1xuICAgICAgICBpZiAocmVjb3JkKVxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBGSVhNRTogRG9lcyB0aGlzIG1ha2Ugc2Vuc2UgZm9yIHRoaXMgdXNlIGNhc2U/XG4gICAgICAgICAgICByZWNvcmQuaW1nID0gaW1nO1xuICAgICAgICAgICAgdGhpcy5fcHJvbW90ZShyZWNvcmQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgcmVjb3JkID0ge1xuICAgICAgICAgICAgICAgIGltZzogaW1nLFxuICAgICAgICAgICAgICAgIHVybDogdXJsXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLl91cmxzW3VybF0gPSByZWNvcmQ7XG4gICAgICAgICAgICB0aGlzLl90cnlFdmljdCgxKTtcbiAgICAgICAgICAgIHRoaXMuX2xydS51bnNoaWZ0KHJlY29yZCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBfcHJvbW90ZSAocmVjb3JkKVxuICAgIHtcbiAgICAgICAgY29uc3QgaW5kZXggPSB0aGlzLl9scnUuaW5kZXhPZihyZWNvcmQpO1xuICAgICAgICB0aGlzLl9scnUuc3BsaWNlKGluZGV4LCAxKTtcbiAgICAgICAgdGhpcy5fbHJ1LnVuc2hpZnQocmVjb3JkKTtcbiAgICB9XG5cbiAgICBfdHJ5RXZpY3QgKGV4dHJhQ2FwYWNpdHkpXG4gICAge1xuICAgICAgICBjb25zdCBhbGxvd2VkRW50cnlDb3VudCA9IHRoaXMubWF4S2V5cyAtIGV4dHJhQ2FwYWNpdHk7XG5cbiAgICAgICAgaWYgKHRoaXMuX2xydS5sZW5ndGggPD0gYWxsb3dlZEVudHJ5Q291bnQpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgbGV0IGV2aWN0aW9uSW5kZXggPSB0aGlzLl9scnUubGVuZ3RoIC0gMTtcblxuICAgICAgICBmb3IgKDs7KVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCB0YXJnZXQgPSB0aGlzLl9scnVbZXZpY3Rpb25JbmRleF07XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5faGVsZFt0YXJnZXQudXJsXSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBkZWJ1ZygnRXZpY3RpbmcgaW1hZ2UgJXMnLCB0YXJnZXQudXJsKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9scnUuc3BsaWNlKGV2aWN0aW9uSW5kZXgsIDEpO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl91cmxzW3RhcmdldC51cmxdO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2xydS5sZW5ndGggPD0gYWxsb3dlZEVudHJ5Q291bnQpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXZpY3Rpb25JbmRleCA9PT0gMClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgICAgICAgIGRlYnVnLmVuYWJsZWQgJiYgZGVidWcoJ0NhY2hlIG92ZXJmdWxsIGJ5ICVzIChhbGwgZW50cmllcyBhcmUgYmVpbmcgaGVsZCknLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9scnUubGVuZ3RoIC0gYWxsb3dlZEVudHJ5Q291bnQpO1xuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV2aWN0aW9uSW5kZXgtLTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFjcXVpcmUgKHVybClcbiAgICB7XG4gICAgICAgIHRoaXMuX2hlbGRbdXJsXSA9ICh0aGlzLl9oZWxkW3VybF0gfHwgMCkgKyAxO1xuICAgICAgICB0aGlzLl9wcm9tb3RlKHRoaXMuX3VybHNbdXJsXSk7XG4gICAgfVxuXG4gICAgcmVsZWFzZSAodXJsKVxuICAgIHtcbiAgICAgICAgY29uc3QgY291bnQgPSB0aGlzLl9oZWxkW3VybF07XG5cbiAgICAgICAgaWYgKGNvdW50ID4gMSlcbiAgICAgICAgICAgIHRoaXMuX2hlbGRbdXJsXS0tO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICBkZWxldGUgdGhpcy5faGVsZFt1cmxdO1xuXG4gICAgICAgIHRoaXMuX3RyeUV2aWN0KDApO1xuICAgIH1cbn1cbiIsIi8qKlxuICogSGFuZGxlciBmb3IgdGhlIHJlcXVlc3QgZm9yIGFuIGltYWdlIHRpbGVcbiAq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FuY2VsKClcbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKHJlcXVlc3RJZCAhPT0gbnVsbClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjYW5jZWxBbmltYXRpb25GcmFtZShyZXF1ZXN0SWQpO1xuICAgICAgICAgICAgICAgIGhhbmRsZUFuaW1hdGlvbkNvbXBsZXRpb24oe1xuICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHRlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIGZ1bmN0aW9uIHVwZGF0ZSgpXG4gICAge1xuICAgICAgICBjb25zdCBjdXJyZW50ID0gbm93KCk7XG4gICAgICAgIGNvbnN0IGVsYXBzZWQgPSBNYXRoLm1pbigoY3VycmVudCAtIHN0YXJ0KSAvIGR1cmF0aW9uTXMsIDEpO1xuXG4gICAgICAgIHVwZGF0ZVZhbHVlcyhlbGFwc2VkKTtcbiAgICAgICAgb25VcGRhdGUodmFsdWVzKTtcblxuICAgICAgICBpZiAoY3VycmVudCA8IGVuZClcbiAgICAgICAge1xuICAgICAgICAgICAgcmVxdWVzdElkID0gcmVxdWVzdEFuaW1hdGlvbkZyYW1lKHVwZGF0ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICBoYW5kbGVBbmltYXRpb25Db21wbGV0aW9uKHtcbiAgICAgICAgICAgICAgICBpbnRlcnJ1cHRlZDogZmFsc2VcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gdXBkYXRlVmFsdWVzKGVsYXBzZWQpXG4gICAge1xuICAgICAgICBwYXJhbUtleXMuZm9yRWFjaChrZXkgPT4ge1xuICAgICAgICAgICAgdmFsdWVzW2tleV0gPSB0d2VlbkZuc1trZXldKGVsYXBzZWQpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB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nRhbE9mZnNldCk7XG5cbiAgICAgICAgaWYgKHRoaXMuX2NhbnZhcy5wYXJlbnROb2RlICE9PSB0aGlzLl9vdXRlckVsZW1lbnQpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRoaXMuX291dGVyRWxlbWVudC5pbnNlcnRCZWZvcmUodGhpcy5fY2FudmFzLCB0aGlzLl9vdXRlckVsZW1lbnQuZmlyc3RDaGlsZCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5faG9va3Mub25WaWV3RGlkTG9hZClcbiAgICAgICAge1xuICAgICAgICAgICAgdGhpcy5faG9va3Mub25WaWV3RGlkTG9hZCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgX3NldFZpZXdwb3J0UG9zaXRpb24gKHZpZXdwb3J0UG9zaXRpb24pXG4gICAge1xuICAgICAgICBpZiAodmlld3BvcnRQb3NpdGlvbi56b29tTGV2ZWwgIT09IHRoaXMuX3pvb21MZXZlbClcbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKHRoaXMuX3pvb21MZXZlbCA9PT0gbnVsbClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdUaGUgY3VycmVudCB2aWV3IGlzIG5vdCB6b29tYWJsZScpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodmlld3BvcnRQb3NpdGlvbi56b29tTGV2ZWwgPT09IG51bGwpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignVGhlIGN1cnJlbnQgdmlldyByZXF1aXJlcyBhIHpvb20gbGV2ZWwnKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5fc2V0TGF5b3V0VG9ab29tTGV2ZWwodmlld3BvcnRQb3NpdGlvbi56b29tTGV2ZWwpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5fZ290byh2aWV3cG9ydFBvc2l0aW9uLmFuY2hvclBhZ2UsIHZpZXdwb3J0UG9zaXRpb24udmVydGljYWxPZmZzZXQsIHZpZXdwb3J0UG9zaXRpb24uaG9yaXpvbnRhbE9mZnNldCk7XG4gICAgfVxuXG4gICAgX3NldExheW91dFRvWm9vbUxldmVsICh6b29tTGV2ZWwpXG4gICAge1xuICAgICAgICB0aGlzLmxheW91dCA9IG5ldyBEb2N1bWVudExheW91dCh0aGlzLl9jb25maWcsIHpvb21MZXZlbCk7XG4gICAgICAgIHRoaXMuX3pvb21MZXZlbCA9IHpvb21MZXZlbDtcblxuICAgICAgICBzZXRBdHRyaWJ1dGVzKHRoaXMuX2RvY3VtZW50RWxlbWVudCwge1xuICAgICAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IHRoaXMubGF5b3V0LmRpbWVuc2lvbnMuaGVpZ2h0ICsgJ3B4JyxcbiAgICAgICAgICAgICAgICB3aWR0aDogdGhpcy5sYXlvdXQuZGltZW5zaW9ucy53aWR0aCArICdweCdcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5fdmlld3BvcnQuc2V0SW5uZXJEaW1lbnNpb25zKHRoaXMubGF5b3V0LmRpbWVuc2lvbnMpO1xuICAgIH1cblxuICAgIGFkanVzdCAoKVxuICAgIHtcbiAgICAgICAgdGhpcy5fY2xlYXJBbmltYXRpb24oKTtcblxuICAgICAgICB0aGlzLl9yZW5kZXIoKTtcblxuICAgICAgICBpZiAodGhpcy5faG9va3Mub25WaWV3RGlkVXBkYXRlKVxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLl9ob29rcy5vblZpZXdEaWRVcGRhdGUodGhpcy5fcmVuZGVyZWRQYWdlcy5zbGljZSgpLCBudWxsKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIF9yZW5kZXIgKClcbiAgICB7XG4gICAgICAgIGNvbnN0IG5ld1JlbmRlcmVkUGFnZXMgPSBbXTtcbiAgICAgICAgdGhpcy5sYXlvdXQucGFnZUdyb3Vwcy5mb3JFYWNoKChncm91cCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKCF0aGlzLl92aWV3cG9ydC5pbnRlcnNlY3RzUmVnaW9uKGdyb3VwLnJlZ2lvbikpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB2aXNpYmxlUGFnZXMgPSBncm91cC5wYWdlc1xuICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKHBhZ2UpXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5pc1BhZ2VWaXNpYmxlKHBhZ2UuaW5kZXgpO1xuICAgICAgICAgICAgICAgIH0sIHRoaXMpXG4gICAgICAgICAgICAgICAgLm1hcChwYWdlID0+IHBhZ2UuaW5kZXgpO1xuXG4gICAgICAgICAgICBuZXdSZW5kZXJlZFBhZ2VzLnB1c2guYXBwbHkobmV3UmVuZGVyZWRQYWdlcywgdmlzaWJsZVBhZ2VzKTtcbiAgICAgICAgfSwgdGhpcyk7XG5cbiAgICAgICAgdGhpcy5fY3R4LmNsZWFyUmVjdCgwLCAwLCB0aGlzLl9jYW52YXMud2lkdGgsIHRoaXMuX2NhbnZhcy5oZWlnaHQpO1xuICAgICAgICB0aGlzLl9wYWludE91dGxpbmUobmV3UmVuZGVyZWRQYWdlcyk7XG5cbiAgICAgICAgbmV3UmVuZGVyZWRQYWdlcy5mb3JFYWNoKChwYWdlSW5kZXgpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5fY29tcG9zaXRlSW1hZ2VzW3BhZ2VJbmRleF0pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3QgcGFnZSA9IHRoaXMubGF5b3V0LmdldFBhZ2VJbmZvKHBhZ2VJbmRleCk7XG4gICAgICAgICAgICAgICAgY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gICAgICAgfSwgdGhpcyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBfcGFpbnQgKClcbiAgICB7XG4gICAgICAgIGNvbnN0IHJlbmRlcmVkVGlsZXMgPSBbXTtcblxuICAgICAgICB0aGlzLl9yZW5kZXJlZFBhZ2VzLmZvckVhY2goIChwYWdlSW5kZXgpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIHRoaXMuX2NvbXBvc2l0ZUltYWdlc1twYWdlSW5kZXhdLmdldFRpbGVzKHRoaXMuX3pvb21MZXZlbCkuZm9yRWFjaCgoc291cmNlKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNvbnN0IHNjYWxlZCA9IGdldFNjYWxlZFRpbGVSZWNvcmQoc291cmNlLCB0aGlzLl96b29tTGV2ZWwpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzVGlsZVZpc2libGUocGFnZUluZGV4LCBzY2FsZWQpKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyZWRUaWxlcy5wdXNoKHNvdXJjZS51cmwpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9kcmF3VGlsZShwYWdlSW5kZXgsIHNjYWxlZCwgdGhpcy5fY2FjaGUuZ2V0KHNvdXJjZS51cmwpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgY2FjaGUgPSB0aGlzLl9jYWNoZTtcblxuICAgICAgICBjb25zdCBjaGFuZ2VzID0gZmluZENoYW5nZXModGhpcy5fcmVuZGVyZWRUaWxlcyB8fCBbXSwgcmVuZGVyZWRUaWxlcyk7XG5cbiAgICAgICAgY2hhbmdlcy5hZGRlZC5mb3JFYWNoKHVybCA9PlxuICAgICAgICB7XG4gICAgICAgICAgICBjYWNoZS5hY3F1aXJlKHVybCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNoYW5nZXM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gaW4gdGhpcyBvYmplY3QgYXJlIGtlcHQgYWxpdmUsIHNpbmNlIGFsbCBvdGhlcnMgYXJlIG5vdCB2aXNpYmxlIGluIHRoZSB2aWV3cG9ydFxuICAgICAgICBjb25zdCBuZXdQZW5kaW5nUmVxdWVzdHMgPSB7fTtcblxuICAgICAgICAvLyBVc2VkIGxhdGVyIGFzIGEgY2xvc3VyZSB0byBpbml0aWF0ZSB0aGUgaW1hZ2UgcmVxdWVzdHMgd2l0aCB0aGUgcmlnaHQgc291cmNlIGFuZCBwYWdlSW5kZXhcbiAgICAgICAgY29uc3QgaW5pdGlhdGVSZXF1ZXN0ID0gKHNvdXJjZSwgcGFnZUluZGV4KSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCBjb21wb3NpdGUgPSB0aGlzLl9jb21wb3NpdGVJbWFnZXNbcGFnZUluZGV4XTtcblxuICAgICAgICAgICAgbmV3UGVuZGluZ1JlcXVlc3RzW3NvdXJjZS51cmxdID0gbmV3IEltYWdlUmVxdWVzdEhhbmRsZXIoe1xuICAgICAgICAgICAgICAgIHVybDogc291cmNlLnVybCxcbiAgICAgICAgICAgICAgICB0aW1lb3V0VGltZTogUkVRVUVTVF9ERUJPVU5DRV9JTlRFUlZBTCxcbiAgICAgICAgICAgICAgICBzZXR0aW5nczogdGhpcy5fc2V0dGluZ3MsXG4gICAgICAgICAgICAgICAgbG9hZDogaW1nID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fcGVuZGluZ1JlcXVlc3RzW3NvdXJjZS51cmxdO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZS5wdXQoc291cmNlLnVybCwgaW1nKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBBd2t3YXJkIHdheSB0byBjaGVjayBmb3IgdXBkYXRlc1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tcG9zaXRlID09PSB0aGlzLl9jb21wb3NpdGVJbWFnZXNbcGFnZUluZGV4XSlcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9zaXRlLnVwZGF0ZVdpdGhMb2FkZWRVcmxzKFtzb3VyY2UudXJsXSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc1RpbGVGb3JTb3VyY2VWaXNpYmxlKHBhZ2VJbmRleCwgc291cmNlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYWludCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2lzVGlsZUZvclNvdXJjZVZpc2libGUocGFnZUluZGV4LCBzb3VyY2UpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3BhaW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGVycm9yOiAoKSA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogQ291bGQgbWFrZSBhIGxpbWl0ZWQgbnVtYmVyIG9mIHJldHJpZXMsIGV0Yy5cbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuX3BlbmRpbmdSZXF1ZXN0c1tzb3VyY2UudXJsXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBhZ2VzLmxlbmd0aDsgaSsrKVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCBwYWdlSW5kZXggPSBwYWdlc1tpXTtcbiAgICAgICAgICAgIGNvbnN0IHRpbGVzID0gdGhpcy5fc291cmNlUmVzb2x2ZXIuZ2V0QmVzdFpvb21MZXZlbEZvclBhZ2UodGhpcy5sYXlvdXQuZ2V0UGFnZUluZm8ocGFnZUluZGV4KSkudGlsZXM7XG5cbiAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgdGlsZXMubGVuZ3RoOyBqKyspXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gdGlsZXNbal07XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NhY2hlLmhhcyhzb3VyY2UudXJsKSB8fCAhdGhpcy5faXNUaWxlRm9yU291cmNlVmlzaWJsZShwYWdlSW5kZXgsIHNvdXJjZSkpXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBEb24ndCBjcmVhdGUgYSBuZXcgcmVxdWVzdCBpZiB0aGUgdGlsZSBpcyBhbHJlYWR5IGJlaW5nIGxvYWRlZFxuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9wZW5kaW5nUmVxdWVzdHNbc291cmNlLnVybF0pXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBuZXdQZW5kaW5nUmVxdWVzdHNbc291cmNlLnVybF0gPSB0aGlzLl9wZW5kaW5nUmVxdWVzdHNbc291cmNlLnVybF07XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9wZW5kaW5nUmVxdWVzdHNbc291cmNlLnVybF07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFVzZSBhIGNsb3N1cmUgc2luY2UgdGhlIGxvYWQgYW5kIGVycm9yIG1ldGhvZHMgYXJlIGdvaW5nIHRvIGJlIGNhbGxlZCBsYXRlciBhbmRcbiAgICAgICAgICAgICAgICAvLyB3ZSBuZWVkIH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ICAgdGhpcy5fdmlld3BvcnQudG9wID0gdG9wO1xuICAgICAgICB0aGlzLl92aWV3cG9ydC5sZWZ0ID0gbGVmdDtcblxuICAgICAgICB0aGlzLl9yZW5kZXIoKTtcbiAgICB9XG5cbiAgICB0cmFuc2l0aW9uVmlld3BvcnRQb3NpdGlvbiAob3B0aW9ucylcbiAgICB7XG4gICAgICAgIHRoaXMuX2NsZWFyQW5pbWF0aW9uKCk7XG5cbiAgICAgICAgY29uc3QgZ2V0UG9zaXRpb24gPSBvcHRpb25zLmdldFBvc2l0aW9uO1xuICAgICAgICBjb25zdCBvblZpZXdEaWRUcmFuc2l0aW9uID0gdGhpcy5faG9va3Mub25WaWV3RGlkVHJhbnNpdGlvbjtcblxuICAgICAgICB0aGlzLl9hbmltYXRpb24gPSBJbnRlcnBvbGF0ZUFuaW1hdGlvbi5hbmltYXRlKHtcbiAgICAgICAgICAgIGR1cmF0aW9uOiBvcHRpb25zLmR1cmF0aW9uLFxuICAgICAgICAgICAgcGFyYW1ldGVyczogb3B0aW9ucy5wYXJhbWV0ZXJzLFxuICAgICAgICAgICAgb25VcGRhdGU6ICh2YWx1ZXMpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2V0Vmlld3BvcnRQb3NpdGlvbihnZXRQb3NpdGlvbih2YWx1ZXMpKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9ob29rcy5vblpvb21MZXZlbFdpbGxDaGFuZ2UodmFsdWVzLnpvb21MZXZlbCk7XG5cbiAgICAgICAgICAgICAgICBpZiAob25WaWV3RGlkVHJhbnNpdGlvbilcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG9uVmlld0RpZFRyYW5zaXRpb24oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb25FbmQ6IChpbmZvKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLm9uRW5kKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVuZChpbmZvKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5faG9va3Mub25WaWV3RGlkVXBkYXRlICYmICFpbmZvLmludGVycnVwdGVkKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5faG9va3Mub25WaWV3RGlkVXBkYXRlKHRoaXMuX3JlbmRlcmVkUGFnZXMuc2xpY2UoKSwgbnVsbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBfY2xlYXJBbmltYXRpb24gKClcbiAgICB7XG4gICAgICAgIGlmICh0aGlzLl9hbmltYXRpb24pXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvbi5jYW5jZWwoKTtcbiAgICAgICAgICAgIHRoaXMuX2FuaW1hdGlvbiA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpc1BhZ2VWaXNpYmxlIChwYWdlSW5kZXgpXG4gICAge1xuICAgICAgICBpZiAoIXRoaXMubGF5b3V0KVxuICAgICAgICB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYWdlID0gdGhpcy5sYXlvdXQuZ2V0UGFnZUluZm8ocGFnZUluZGV4KTtcblxuICAgICAgICBpZiAoIXBhZ2UpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLl92aWV3cG9ydC5pbnRlcnNlY3RzUmVnaW9uKHRoaXMubGF5b3V0LmdldFBhZ2VSZWdpb24ocGFnZUluZGV4KSk7XG4gICAgfVxuXG4gICAgZ2V0UmVuZGVyZWRQYWdlcyAoKVxuICAgIHtcbiAgIC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ZnREaW1zLndpZHRoO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICAgIGRpbWVuc2lvbnM6IHtcbiAgICAgICAgICAgIGhlaWdodDogaGVpZ2h0LFxuICAgICAgICAgICAgd2lkdGg6IHdpZHRoXG4gICAgICAgIH0sXG4gICAgICAgIHBhZ2VzOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaW5kZXg6IGxlZnRQYWdlLmluZGV4LFxuICAgICAgICAgICAgICAgIGRpbWVuc2lvbnM6IGxlZnREaW1zLFxuICAgICAgICAgICAgICAgIGdyb3VwT2Zmc2V0OiB7XG4gICAgICAgICAgICAgICAgICAgIHRvcDogMCxcbiAgICAgICAgICAgICAgICAgICAgbGVmdDogZmlyc3RMZWZ0T2Zmc2V0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpbmRleDogcmlnaHRQYWdlLmluZGV4LFxuICAgICAgICAgICAgICAgIGRpbWVuc2lvbnM6IHJpZ2h0RGltcyxcbiAgICAgICAgICAgICAgICBncm91cE9mZnNldDoge1xuICAgICAgICAgICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICAgICAgICAgIGxlZnQ6IHNlY29uZExlZnRPZmZzZXRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIF1cbiAgICB9O1xufVxuIiwiXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBnZXRHcmlkTGF5b3V0R3JvdXBzICh2aWV3ZXJDb25maWcpXG57XG4gICAgY29uc3Qgdmlld3BvcnRXaWR0aCA9IHZpZXdlckNvbmZpZy52aWV3cG9ydC53aWR0aDtcbiAgICBjb25zdCBtYW5pZmVzdCA9IHZpZXdlckNvbmZpZy5tYW5pZmVzdDtcbiAgICBjb25zdCBwYWdlc1BlclJvdyA9IHZpZXdlckNvbmZpZy5wYWdlc1BlclJvdztcbiAgICBjb25zdCBma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AgICAgaWYgKCF2aWV3ZXJDb25maWcuc2hvd05vblBhZ2VkUGFnZXMgJiYgbWFuaWZlc3QucGFnZWQgJiYgIXBhZ2UucGFnZWQpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgY29uc3QgcGFnZURpbXMgPSBnZXRQYWdlRGltZW5zaW9ucyhpbmRleCwgbWFuaWZlc3QpO1xuXG4gICAgICAgIHBhZ2VzLnB1c2goe1xuICAgICAgICAgICAgZGltZW5zaW9uczogcGFnZURpbXMsXG4gICAgICAgICAgICBwYWdlczogW3tcbiAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXG4gICAgICAgICAgICAgICAgZ3JvdXBPZmZzZXQ6IHsgdG9wOiAwLCBsZWZ0OiAwIH0sXG4gICAgICAgICAgICAgICAgZGltZW5zaW9uczogcGFnZURpbXNcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIHBhZ2VzO1xufVxuIiwiXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBjcmVhdGVTZXR0aW5nc1ZpZXcoc291cmNlcylcbntcbiAgICBjb25zdCBvYmogPSB7fTtcblxuICAgIHNvdXJjZXMuZm9yRWFjaCggKHNvdXJjZSkgPT5cbiAgICB7XG4gICAgICAgIHJlZ2lzdGVyTWl4aW4ob2JqLCBzb3VyY2UpO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIG9iajtcbn1cblxuZnVuY3Rpb24gcmVnaXN0ZXJNaXhpbihvYmosIG1peGluKVxue1xuICAgIE9iamVjdC5rZXlzKG1peGluKS5mb3JFYWNoKCAoa2V5KSA9PlxuICAgIHtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KG9iaiwga2V5LCB7XG4gICAgICAgICAgICBnZXQ6ICgpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1peGluW2tleV07XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2V0OiAoKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IE1ha2UgZXZlcnl0aGluZyBzdHJpY3QgbW9kZSBzbyB0aGlzIGlzbid0IG5lZWRlZFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0Nhbm5vdCBzZXQgc2V0dGluZ3MuJyArIGtleSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0pO1xufVxuIiwiZXhwb3J0IGRlZmF1bHQgY2xhc3MgVmFsaWRhdGlvblJ1bm5lclxue1xuICAgIGNvbnN0cnVjdG9yIChvcHRpb25zKVxuICAgIHtcbiAgICAgICAgdGhpcy53aGl0ZWxpc3RlZEtleXMgPSBvcHRpb25zLndoaXRlbGlzdGVkS2V5cyB8fCBbXTtcbiAgICAgICAgdGhpcy5hZGRpdGlvbmFsUHJvcGVydGllcyA9IG9wdGlvbnMuYWRkaXRpb25hbFByb3BlcnRpZXMgfHwgW107XG4gICAgICAgIHRoaXMudmFsaWRhdGlvbnMgPSBvcHRpb25zLnZhbGlkYXRpb25zO1xuICAgIH1cblxuICAgIGlzVmFsaWQgKGtleSwgdmFsdWUsIHNldHRpbmdzKVxuICAgIHtcbiAgICAgICAgLy8gR2V0IHRoZSB2YWxpZGF0aW9uIGluZGV4XG4gICAgICAgIGxldCB2YWxpZGF0aW9uSW5kZXggPSBudWxsO1xuXG4gICAgICAgIHRoaXMudmFsaWRhdGlvbnMuc29tZSgodmFsaWRhdGlvbiwgaW5kZXgpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICh2YWxpZGF0aW9uLmtleSAhPT0ga2V5KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsaWRhdGlvbkluZGV4ID0gaW5kZXg7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSk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bHlWYWxpZGF0aW9ucyAob3B0aW9ucywgcHJveGllcilcbiAgICB7XG4gICAgICAgIHRoaXMudmFsaWRhdGlvbnMuZm9yRWFjaCgodmFsaWRhdGlvbiwgaW5kZXgpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICghb3B0aW9ucy5oYXNPd25Qcm9wZXJ0eSh2YWxpZGF0aW9uLmtleSkpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCBpbnB1dCA9IG9wdGlvbnNbdmFsaWRhdGlvbi5rZXldO1xuICAgICAgICAgICAgY29uc3QgY29ycmVjdGVkID0gdGhpcy5fcnVuVmFsaWRhdGlvbihpbmRleCwgaW5wdXQsIHByb3hpZXIpO1xuXG4gICAgICAgICAgICBpZiAoY29ycmVjdGVkKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlmICghY29ycmVjdGVkLndhcm5pbmdTdXBwcmVzc2VkKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZW1pdFdhcm5pbmcodmFsaWRhdGlvbi5rZXksIGlucHV0LCBjb3JyZWN0ZWQudmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG9wdGlvbnNbdmFsaWRhdGlvbi5rZXldID0gY29ycmVjdGVkLnZhbHVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCB0aGlzKTtcbiAgICB9XG5cbiAgICBfcnVuVmFsaWRhdGlvbiAoaW5kZXgsIGlucHV0LCBwcm94aWVyKVxuICAgIHtcbiAgICAgICAgY29uc3QgdmFsaWRhdGlvbiA9IHRoaXMudmFsaWRhdGlvbnNbaW5kZXhdO1xuXG4gICAgICAgIHByb3hpZXIuaW5kZXggPSBpbmRleDtcblxuICAgICAgICBsZXQgd2FybmluZ1N1cHByZXNzZWQgPSBmYWxzZTtcbiAgICAgICAgY29uc3QgY29uZ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RlU2V0dGluZ3NQcm94aWVyIChzZXR0aW5ncywgb3B0aW9ucywgcnVubmVyKVxue1xuICAgIGNvbnN0IHByb3hpZXIgPSB7XG4gICAgICAgIHByb3h5OiB7fSxcbiAgICAgICAgaW5kZXg6IG51bGxcbiAgICB9O1xuXG4gICAgY29uc3QgbG9va3VwID0gbG9va3VwVmFsdWUuYmluZChudWxsLCBzZXR0aW5ncywgb3B0aW9ucyk7XG5cbiAgICBjb25zdCBwcm9wZXJ0aWVzID0ge307XG5cbiAgICBydW5uZXIud2hpdGVsaXN0ZWRLZXlzLmZvckVhY2goKHdoaXRlbGlzdGVkKSA9PlxuICAgIHtcbiAgICAgICAgcHJvcGVydGllc1t3aGl0ZWxpc3RlZF0gPSB7XG4gICAgICAgICAgICBnZXQ6IGxvb2t1cC5iaW5kKG51bGwsIHdoaXRlbGlzdGVkKVxuICAgICAgICB9O1xuICAgIH0pO1xuXG4gICAgcnVubmVyLmFkZGl0aW9uYWxQcm9wZXJ0aWVzLmZvckVhY2goKGFkZGl0aW9uYWwpID0+XG4gICAge1xuICAgICAgICBwcm9wZXJ0aWVzW2FkZGl0aW9uYWwua2V5XSA9IHtcbiAgICAgICAgICAgIGdldDogYWRkaXRpb25hbC5nZXRcbiAgICAgICAgfTtcbiAgICB9KTtcblxuICAgIHJ1bm5lci52YWxpZGF0aW9ucy5mb3JFYWNoKCAodmFsaWRhdGlvbiwgdmFsaWRhdGlvbkluZGV4KSA9PlxuICAgIHtcbiAgICAgICAgcHJvcGVydGllc1t2YWxpZGF0aW9uLmtleV0gPSB7XG4gICAgICAgICAgICBnZXQ6ICgpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWYgKHZhbGlkYXRpb25JbmRleCA8IHByb3hpZXIuaW5kZXgpXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbG9va3VwKHZhbGlkYXRpb24ua2V5KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgIC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GtleTogJ21heFpvb21MZXZlbCcsXG4gICAgICAgIHZhbGlkYXRlOiAodmFsdWUsIHNldHRpbmdzLCBjb25maWcpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIC8vIENoYW5naW5nIHRoaXMgdmFsdWUgaXNuJ3QgcmVhbGx5IGFuIGVycm9yLCBpdCBqdXN0IGRlcGVuZHMgb24gdGhlXG4gICAgICAgICAgICAvLyBzb3VyY2UgbWFuaWZlc3RcbiAgICAgICAgICAgIGNvbmZpZy5zdXBwcmVzc1dhcm5pbmcoKTtcblxuICAgICAgICAgICAgaWYgKHZhbHVlIDwgMCB8fCB2YWx1ZSA+IHNldHRpbmdzLm1hbmlmZXN0Lm1heFpvb20pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNldHRpbmdzLm1hbmlmZXN0Lm1heFpvb207XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiAnbWluWm9vbUxldmVsJyxcbiAgICAgICAgdmFsaWRhdGU6ICh2YWx1ZSwgc2V0dGluZ3MsIGNvbmZpZykgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgLy8gQ2hhbmdlcyBiYXNlZCBvbiB0aGUgbWFuaWZlc3QgdmFsdWUgc2hvdWxkbid0IHRyaWdnZXIgYVxuICAgICAgICAgICAgLy8gd2FybmluZ1xuICAgICAgICAgICAgaWYgKHZhbHVlID4gc2V0dGluZ3MubWFuaWZlc3QubWF4Wm9vbSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25maWcuc3VwcHJlc3NXYXJuaW5nKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh2YWx1ZSA8IDAgfHwgdmFsdWUgPiBzZXR0aW5ncy5tYXhab29tTGV2ZWwpXG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHtcbiAgICAgICAga2V5OiAnem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dGUgYW4gSUQgdGhhdCBjYW4gYmUgdXNlZCBhcyBhIHByZWZpeCBmb3IgYWxsIHRoZSBvdGhlciBJRHNcbiAgICAgICAgY29uc3QgaWROdW1iZXIgPSBnZW5lcmF0ZUlkKCk7XG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUuSUQgPSAnZGl2YS0nICsgaWROdW1iZXIgKyAnLSc7XG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUuc2VsZWN0b3IgPSB0aGlzLnNldHRpbmdzLklEO1xuXG4gICAgICAgIC8vIEFsaWFzZXMgZm9yIGNvbXBhdGliaWxpdHlcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXModGhpcy5zZXR0aW5ncywge1xuICAgICAgICAgICAgLy8gSGVpZ2h0IG9mIHRoZSBkb2N1bWVudCB2aWV3ZXIgcGFuZVxuICAgICAgICAgICAgcGFuZWxIZWlnaHQ6IHtcbiAgICAgICAgICAgICAgICBnZXQ6ICgpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIFdpZHRoIG9mIHRoZSBkb2N1bWVudCB2aWV3ZXIgcGFuZVxuICAgICAgICAgICAgcGFuZWxXaWR0aDoge1xuICAgICAgICAgICAgICAgIGdldDogKCkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LndpZHRoO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5vcHRpb25zVmFsaWRhdG9yID0gbmV3IFZhbGlkYXRpb25SdW5uZXIoe1xuICAgICAgICAgICAgYWRkaXRpb25hbFByb3BlcnRpZXM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGtleTogJ21hbmlmZXN0JyxcbiAgICAgICAgICAgICAgICAgICAgZ2V0OiAoKSA9PlxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy52aWV3ZXJTdGF0ZS5tYW5pZmVzdDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF0sXG5cbiAgICAgICAgICAgIHZhbGlkYXRpb25zOiBvcHRpb25zVmFsaWRhdGlvbnNcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS5zY3JvbGxiYXJXaWR0aCA9IGdldFNjcm9sbGJhcldpZHRoKCk7XG5cbiAgICAgICAgLy8gSWYgd2luZG93Lm9yaWVudGF0aW9uIGlzIGRlZmluZWQsIHRoZW4gaXQncyBwcm9iYWJseSBtb2JpbGVXZWJraXRcbiAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS5tb2JpbGVXZWJraXQgPSB3aW5kb3cub3JpZW50YXRpb24gIT09IHVuZGVmaW5lZDtcblxuICAgICAgICBpZiAob3B0aW9ucy5oYXNoUGFyYW1TdWZmaXggPT09IG51bGwpXG4gICAgICAgIHtcbiAgICAgICAgICAgIC8vIE9taXQgdGhlIHN1ZmZpeCBmcm9tIHRoZSBmaXJzdCBpbnN0YW5jZVxuICAgICAgICAgICAgaWYgKGlkTnVtYmVyID09PSAxKVxuICAgICAgICAgICAgICAgIG9wdGlvbnMuaGFzaFBhcmFtU3VmZml4ID0gJyc7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgb3B0aW9ucy5oYXNoUGFyYW1TdWZmaXggPSBpZE51bWJlciArICcnO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ3JlYXRlIHRoZSBpbm5lciBhbmQgb3V0ZXIgcGFuZWxzXG4gICAgICAgIGNvbnN0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gICAgIHZlcnRpY2FsT2Zmc2V0OiB0aGlzLnZpZXdlclN0YXRlLnZlcnRpY2FsT2Zmc2V0LFxuICAgICAgICAgICAgICAgIGhvcml6b250YWxPZmZzZXQ6IHRoaXMudmlld2VyU3RhdGUuaG9yaXpvbnRhbE9mZnNldFxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgY29uc3Qgc291cmNlUHJvdmlkZXIgPSB0aGlzLmdldEN1cnJlbnRTb3VyY2VQcm92aWRlcigpO1xuXG4gICAgICAgICAgICBpZiAoZGVidWcuZW5hYmxlZClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZXJpYWxpemVkID0gT2JqZWN0LmtleXMocmVuZGVyZXJDb25maWcpXG4gICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKGtleSlcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVG9vIGxvbmdcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBrZXkgIT09ICdwYWdlTGF5b3V0cycgJiYga2V5ICE9PSAncGFkZGluZyc7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGtleSlcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSByZW5kZXJlckNvbmZpZ1trZXldO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGtleSArICc6ICcgKyBKU09OLnN0cmluZ2lmeSh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCcsICcpO1xuXG4gICAgICAgICAgICAgICAgZGVidWcoJ3JlbG9hZCB3aXRoICVzJywgc2VyaWFsaXplZCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUucmVuZGV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G4gICAge1xuICAgICAgICBjb25zdCBjb21wYXRFcnJvcnMgPSBSZW5kZXJlci5nZXRDb21wYXRpYmlsaXR5RXJyb3JzKCk7XG5cbiAgICAgICAgaWYgKGNvbXBhdEVycm9ycylcbiAgICAgICAge1xuICAgICAgICAgICAgdGhpcy5zaG93RXJyb3IoY29tcGF0RXJyb3JzKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSB7XG4gICAgICAgICAgICAgICAgdmlld3BvcnQ6IHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQsXG4gICAgICAgICAgICAgICAgb3V0ZXJFbGVtZW50OiB0aGlzLnZpZXdlclN0YXRlLm91dGVyRWxlbWVudCxcbiAgICAgICAgICAgICAgICBpbm5lckVsZW1lbnQ6IHRoaXMudmlld2VyU3RhdGUuaW5uZXJFbGVtZW50LFxuICAgICAgICAgICAgICAgIHNldHRpbmdzOiB0aGlzLnNldHRpbmdzXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjb25zdCBob29rcyA9IHtcbiAgICAgICAgICAgICAgICBvblZpZXdXaWxsTG9hZDogKCkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld0hhbmRsZXIub25WaWV3V2lsbExvYWQoKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9uVmlld0RpZExvYWQ6ICgpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVBhZ2VPdmVybGF5cygpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdIYW5kbGVyLm9uVmlld0RpZExvYWQoKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9uVmlld0RpZFVwZGF0ZTogKHBhZ2VzLCB0YXJnZXRQYWdlKSA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVQYWdlT3ZlcmxheXMoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3SGFuZGxlci5vblZpZXdEaWRVcGRhdGUocGFnZXMsIHRhcmdldFBhZ2UpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb25WaWV3RGlkVHJhbnNpdGlvbjogKCkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlUGFnZU92ZXJsYXlzKCk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBvblBhZ2VXaWxsTG9hZDogKHBhZ2VJbmRleCkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHVibGlzaCgnUGFnZVdpbGxMb2FkJywgcGFnZUluZGV4KTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9uWm9vbUxldmVsV2lsbENoYW5nZTogKHpvb21MZXZlbCkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHVibGlzaCgnWm9vbUxldmVsV2lsbENoYW5nZScsIHpvb21MZXZlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS5yZW5kZXJlciA9IG5ldyBSZW5kZXJlcihvcHRpb25zLCBob29rcyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRDdXJyZW50U291cmNlUHJvdmlkZXIgKClcbiAgICB7XG4gICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmluR3JpZClcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgZ3JpZFNvdXJjZVByb3ZpZGVyID0ge1xuICAgICAgICAgICAgICAgIGdldEFsbFpvb21MZXZlbHNGb3JQYWdlOiAocGFnZSkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbZ3JpZFNvdXJjZVByb3ZpZGVyLmdldEJlc3Rab29tTGV2ZWxGb3JQYWdlKHBhZ2UpXTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdldEJlc3Rab29tTGV2ZWxGb3JQYWdlOiAocGFnZSkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHVybCA9IHRoaXMuc2V0dGluZ3MubWFuaWZlc3QuZ2V0UGFnZUltYWdlVVJMKHBhZ2UuaW5kZXgsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBwYWdlLmRpbWVuc2lvbnMud2lkdGhcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHpvb21MZXZlbDogMSwgLy8gRklYTUVcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvd3M6IDEsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xzOiAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGlsZXM6IFt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbUxldmVsOiAxLCAvLyBGSVhNRVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdzogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2w6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGltZW5zaW9uczogcGFnZS5kaW1lbnNpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHJldHVybiBncmlkU291cmNlUHJvdmlkZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0aWxlRGltZW5zaW9ucyA9IHtcbiAgICAgICAgICAgIHdpZHRoOiB0aGlzLnNldHRpbmdzLnRpbGVXaWR0aCxcbiAgICAgICAgICAgIGhlaWdodDogdGhpcy5zZXR0aW5ncy50aWxlSGVpZ2h0XG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGdldEJlc3Rab29tTGV2ZWxGb3JQYWdlOiAocGFnZSkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zZXR0aW5ncy5tYW5pZmVzdC5nZXRQYWdlSW1hZ2VUaWxlcyhwYWdlLmluZGV4LCBNYXRoLmNlaWwodGhpcy5zZXR0aW5ncy56b29tTGV2ZWwpLCB0aWxlRGltZW5zaW9ucyk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2V0QWxsWm9vbUxldmVsc0ZvclBhZ2U6IChwYWdlKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxldmVscyA9IFtdO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxldmVsQ291bnQgPSB0aGlzLnZpZXdlclN0YXRlLm1hbmlmZXN0Lm1heFpvb207XG5cbiAgICAgICAgICAgICAgICBmb3IgKGxldCBsZXZlbD0wOyBsZXZlbCA8PSBsZXZlbENvdW50OyBsZXZlbCsrKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbGV2ZWxzLnB1c2godGhpcy5zZXR0aW5ncy5tYW5pZmVzdC5nZXRQYWdlSW1hZ2VUaWxlcyhwYWdlLmluZGV4LCBsZXZlbCwgdGlsZURpbWVuc2lvbnMpKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBsZXZlbHMucmV2ZXJzZSgpO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIGxldmVscztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBnZXRQYWRkaW5nICgpXG4gICAge1xuICAgICAgICBsZXQgdG9wUGFkZGluZywgbGVmdFBhZGRpbmc7XG4gICAgICAgIGxldCBkb2NWUGFkZGluZywgZG9jSFBhZGRpbmc7XG5cbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuaW5HcmlkKVxuICAgICAgICB7XG4gICAgICAgICAgICBkb2NWUGFkZGluZyA9IHRoaXMuc2V0dGluZ3MuZml4ZWRQYWRkaW5nO1xuICAgICAgICAgICAgdG9wUGFkZGluZyA9IGxlZnRQYWRkaW5nID0gZG9jSFBhZGRpbmcgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgdG9wUGFkZGluZyA9IHRoaXMuc2V0dGluZ3MudmVydGljYWxseU9yaWVudGVkID8gdGhpcy52aWV3ZXJTdGF0ZS52ZXJ0aWNhbFBhZGRpbmcgOiAwO1xuICAgICAgICAgICAgbGVmdFBhZGRpbmcgPSB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZCA/IDAgOiB0aGlzLnZpZXdlclN0YXRlLmhvcml6b250YWxQYWRkaW5nO1xuXG4gICAgICAgICAgICBkb2NWUGFkZGluZyA9IHRoaXMuc2V0dGluZ3MudmVydGljYWxseU9yaWVudGVkID8gMCA6IHRoaXMudmlld2VyU3RhdGUudmVydGljYWxQYWRkaW5nO1xuICAgICAgICAgICAgZG9jSFBhZGRpbmcgPSB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZCA/IHRoaXMudmlld2VyU3RhdGUuaG9yaXpvbnRhbFBhZGRpbmcgOiAwO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGRvY3VtZW50OiB7XG4gICAgICAgICAgICAgICAgdG9wOiBkb2NWUGFkZGluZyxcbiAgICAgICAgICAgICAgICBib3R0b206IGRvY1ZQYWRkaW5nLFxuICAgICAgICAgICAgICAgIGxlZnQ6IGRvY0hQYWRkaW5nLFxuICAgICAgICAgICAgICAgIHJpZ2h0OiBkb2NIUGFkZGluZ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhZ2U6IHtcbiAgICAgICAgICAgICAgICB0b3A6IHRvcFBhZGRpbmcsXG4gICAgICAgICAgICAgICAgYm90dG9tOiAwLFxuICAgICAgICAgICAgICAgIGxlZnQ6IGxlZnRQYWRkaW5nLFxuICAgICAgICAgICAgICAgIHJpZ2h0OiAwXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgdXBkYXRlUGFnZU92ZXJsYXlzICgpXG4gICAge1xuICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnBhZ2VPdmVybGF5cy51cGRhdGVPdmVybGF5cyhcbiAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUucmVuZGVyZXIuZ2V0UmVuZGVyZWRQYWdlcygpXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLy8gQ2FsbGVkIHRvIGhhbmRsZSBhbnkgem9vbSBsZXZlbFxuICAgIGhhbmRsZVpvb20gKG5ld1pvb21MZXZlbCwgZm9jYWxQb2ludClcbiAgICB7XG4gICAgICAgIC8vIElmIHRoZSB6b29tIGxldmVsIHByb3ZpZGVkIGlzIGludmFsaWQsIHJldHVybiBmYWxzZVxuICAgICAgICBpZiAoIXRoaXMuaXNWYWxpZE9wdGlvbignem9vbUxldmVsJywgbmV3Wm9vbUxldmVsKSlcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcblxuICAgICAg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bi52ZXJ0aWNhbE9mZnNldDtcbiAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS5ob3Jpem9udGFsT2Zmc2V0ID0gZW5kUG9zaXRpb24uaG9yaXpvbnRhbE9mZnNldDtcblxuICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnJlbmRlcmVyLnRyYW5zaXRpb25WaWV3cG9ydFBvc2l0aW9uKHtcbiAgICAgICAgICAgIGR1cmF0aW9uOiB0aGlzLnNldHRpbmdzLnpvb21EdXJhdGlvbixcbiAgICAgICAgICAgIHBhcmFtZXRlcnM6IHtcbiAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgZnJvbTogaW5pdGlhbFpvb21MZXZlbCxcbiAgICAgICAgICAgICAgICAgICAgdG86IG5ld1pvb21MZXZlbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBnZXRQb3NpdGlvbjogKHBhcmFtZXRlcnMpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFBvc2l0aW9uRm9yWm9vbUxldmVsKHBhcmFtZXRlcnMuem9vbUxldmVsLCBpbml0aWFsWm9vbUxldmVsKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbkVuZDogKGluZm8pID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydE9iamVjdC5hZGRFdmVudExpc3RlbmVyKCdzY3JvbGwnLCB0aGlzLmJvdW5kU2Nyb2xsRnVuY3Rpb24pO1xuXG4gICAgICAgICAgICAgICAgaWYgKGluZm8uaW50ZXJydXB0ZWQpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUub2xkWm9vbUxldmVsID0gbmV3Wm9vbUxldmVsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICAvLyBEZWFjdGl2YXRlI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AgZ29EaXJlY3RseVRvOiB0aGlzLnNldHRpbmdzLmFjdGl2ZVBhZ2VJbmRleCxcbiAgICAgICAgICAgICAgICAgICAgdmVydGljYWxPZmZzZXQ6IHBhZ2VPZmZzZXQueSxcbiAgICAgICAgICAgICAgICAgICAgaG9yaXpvbnRhbE9mZnNldDogcGFnZU9mZnNldC54XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZWxvYWRWaWV3ZXIoe1xuICAgICAgICAgICAgICAgICAgICBnb0RpcmVjdGx5VG86IHRoaXMuc2V0dGluZ3MuYWN0aXZlUGFnZUluZGV4XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIDIwMCk7XG4gICAgfVxuXG4gICAgLy8gQmluZCB0b3VjaCBhbmQgb3JpZW50YXRpb24gY2hhbmdlIGV2ZW50c1xuICAgIGJpbmRUb3VjaEV2ZW50cyAoKVxuICAgIHtcbiAgICAgICAgLy8gQmxvY2sgdGhlIHVzZXIgZnJvbSBtb3ZpbmcgdGhlIHdpbmRvdyBvbmx5IGlmIGl0J3Mgbm90IGludGVncmF0ZWRcbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuYmxvY2tNb2JpbGVNb3ZlKVxuICAgICAgICB7XG4gICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFkZEV2ZW50TGlzdGVuZXIoJ3RvdWNobW92ZScsIChldmVudCkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlID0gZXZlbnQub3JpZ2luYWxFdmVudDtcbiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFRvdWNoIGV2ZW50cyBmb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ycm93S2V5ID0gNDAsIGxlZnRBcnJvd0tleSA9IDM3LCByaWdodEFycm93S2V5ID0gMzksIHNwYWNlS2V5ID0gMzIsIHBhZ2VVcEtleSA9IDMzLCBwYWdlRG93bktleSA9IDM0LCBob21lS2V5ID0gMzYsIGVuZEtleSA9IDM1O1xuXG4gICAgICAgIC8vIENhdGNoIHRoZSBrZXkgcHJlc3NlcyBpbiBkb2N1bWVudFxuICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duLmRpdmEnLCAoZXZlbnQpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICghdGhpcy52aWV3ZXJTdGF0ZS5pc0FjdGl2ZURpdmEpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG5cbiAgICAgICAgICAgIC8vIFNwYWNlIG9yIHBhZ2UgZG93biAtIGdvIHRvIHRoZSBuZXh0IHBhZ2VcbiAgICAgICAgICAgIGlmICgodGhpcy5zZXR0aW5ncy5lbmFibGVTcGFjZVNjcm9sbCAmJiAhZXZlbnQuc2hpZnRLZXkgJiYgZXZlbnQua2V5Q29kZSA9PT0gc3BhY2VLZXkpIHx8ICh0aGlzLnNldHRpbmdzLmVuYWJsZUtleVNjcm9sbCAmJiBldmVudC5rZXlDb2RlID09PSBwYWdlRG93bktleSkpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC50b3AgKz0gdGhpcy5zZXR0aW5ncy5wYW5lbEhlaWdodDtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICghdGhpcy5zZXR0aW5ncy5lbmFibGVTcGFjZVNjcm9sbCAmJiBldmVudC5rZXlDb2RlID09PSBzcGFjZUtleSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5lbmFibGVLZXlTY3JvbGwpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgLy8gRG9uJ3Qgc3RlYWwga2V5Ym9hcmQgc2hvcnRjdXRzIChtZXRhS2V5ID0gY29tbWFuZCBbT1MgWF0sIHN1cGVyIFtXaW4vTGludXhdKVxuICAgICAgICAgICAgICAgIGlmIChldmVudC5zaGlmdEtleSB8fCBldmVudC5jdHJsS2V5IHx8IGV2ZW50Lm1ldGFLZXkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuXG4gICAgICAgICAgICAgICAgc3dpdGNoIChldmVudC5rZXlDb2RlKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBwYWdlVXBLZXk6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBQYWdlIHVwIC0gZ28gdG8gdGhlIHByZXZpb3VzIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQudG9wIC09IHRoaXMuc2V0dGluZ3MucGFuZWxIZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSB1cEFycm93S2V5OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXAgYXJyb3cgLSBzY3JvbGwgdXBcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQudG9wIC09IHRoaXMuc2V0dGluZ3MuYXJyb3dTY3JvbGxBbW91bnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSBkb3duQXJyb3dLZXk6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBEb3duIGFycm93IC0gc2Nyb2xsIGRvd25cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQudG9wICs9IHRoaXMuc2V0dGluZ3MuYXJyb3dTY3JvbGxBbW91bnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSBsZWZ0QXJyb3dLZXk6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBMZWZ0IGFycm93IC0gc2Nyb2xsIGxlZnRcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQubGVmdCAtPSB0aGlzLnNldHRpbmdzLmFycm93U2Nyb2xsQW1vdW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgcmlnaHRBcnJvd0tleTpcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJpZ2h0IGFycm93IC0gc2Nyb2xsIHJpZ2h0XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LmxlZnQgKz0gdGhpcy5zZXR0aW5ncy5hcnJvd1Njcm9sbEFtb3VudDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIGhvbWVLZXk6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBIb21lIGtleSAtIGdvIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGRvY3VtZW50XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LnRvcCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSBlbmRLZXk6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBFbmQga2V5IC0gZ28gdG8gdGhlIGVuZCBvZiB0aGUgZG9jdW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENvdW50IG9uIHRoZSB2aWV3cG9ydCBjb29yZGluYXRlIHZhbHVlIGJlaW5nIG5vcm1hbGl6ZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LnRvcCA9IEluZmluaXR5O1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQubGVmdCA9IEluZmluaXR5O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9KTtcblxuICAgICAgICBkaXZhLkV2ZW50cy5zdWJzY3JpYmUoJ1ZpZXdlckRpZFRlcm1pbmF0ZScsIGZ1bmN0aW9uKClcbiAgICAgICAge1xuICAgICAgICAgICAgZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcigna2V5ZG93bi5kaXZhJyk7XG4gICAgICAgIH0sIHRoaXMuc2V0dGluZ3MuSUQpO1xuXG4gICAgICAgIC8vIHRoaXMuYmluZFRvdWNoRXZlbnRzKCk7XG5cbiAgICAgICAgLy8gSGFuZGxlIHdpbmRvdyByZXNpemluZyBldmVudHNcbiAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ3Jlc2l6ZScsIHRoaXMub25SZXNpemUuYmluZCh0aGlzKSwgZmFsc2UpO1xuXG4gICAgICAgI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LnZpZXdlclN0YXRlLnJlbmRlcmVyKVxuICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUucmVuZGVyZXIuZGVzdHJveSgpO1xuXG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy52aWV3ZXJTdGF0ZS5yZXNpemVUaW1lcik7XG4gICAgICAgIH0sIHRoaXMuc2V0dGluZ3MuSUQpO1xuICAgIH1cblxuICAgIGluaXRQbHVnaW5zICgpXG4gICAge1xuICAgICAgICBpZiAoIXRoaXMuc2V0dGluZ3MuaGFzT3duUHJvcGVydHkoJ3BsdWdpbnMnKSlcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuXG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUucGx1Z2luSW5zdGFuY2VzID0gdGhpcy5zZXR0aW5ncy5wbHVnaW5zLm1hcCggKHBsdWdpbikgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgcCA9IG5ldyBwbHVnaW4odGhpcyk7XG5cbiAgICAgICAgICAgIGlmIChwLmlzUGFnZVRvb2wpXG4gICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS5wYWdlVG9vbHMucHVzaChwKTtcblxuICAgICAgICAgICAgcmV0dXJuIHA7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHNob3dUaHJvYmJlciAoKVxuICAgIHtcbiAgICAgICAgdGhpcy5oaWRlVGhyb2JiZXIoKTtcblxuICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnRocm9iYmVyVGltZW91dElEID0gc2V0VGltZW91dCggKCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgbGV0IHRoYiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuc2V0dGluZ3Muc2VsZWN0b3IgKyAndGhyb2JiZXInKTtcbiAgICAgICAgICAgIGlmICh0aGIpIHRoYi5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJztcbiAgICAgICAgfSwgdGhpcy5zZXR0aW5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cy5nZXRYT2Zmc2V0KGxvYWRPcHRpb25zLmdvRGlyZWN0bHlUbywgXCJjZW50ZXJcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobmVlZHNZQ29vcmQpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGFuY2hvcmVkVmVydGljYWxseSA9IHRydWU7XG4gICAgICAgICAgICBsb2FkT3B0aW9ucy52ZXJ0aWNhbE9mZnNldCA9IHRoaXMuZ2V0WU9mZnNldChsb2FkT3B0aW9ucy5nb0RpcmVjdGx5VG8sIFwidG9wXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5yZWxvYWRWaWV3ZXIobG9hZE9wdGlvbnMpO1xuXG4gICAgICAgIC8vcHJlcCBkaW1lbnNpb25zIG9uZSBsYXN0IHRpbWUgbm93IHRoYXQgcGFnZXMgaGF2ZSBsb2FkZWRcbiAgICAgICAgdGhpcy51cGRhdGVQYW5lbFNpemUoKTtcblxuICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5lbmFibGVBdXRvVGl0bGUpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGxldCB0aXRsZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuc2V0dGluZ3Muc2VsZWN0b3IgKyAndGl0bGUnKTtcblxuICAgICAgICAgICAgaWYgKHRpdGxlKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRpdGxlLmlubmVySFRNTCA9IHRoaXMuc2V0dGluZ3MubWFuaWZlc3QuaXRlbVRpdGxlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MucGFyZW50T2JqZWN0Lmluc2VydEJlZm9yZShcbiAgICAgICAgICAgICAgICAgICAgZWx0KCdkaXYnLCB0aGlzLmVsZW1BdHRycygndGl0bGUnKSwgW3RoaXMuc2V0dGluZ3MubWFuaWZlc3Qua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dGggYSBtb3JlIHJlc3RyaWN0ZWQgdmlldyBvZiB3aGF0ZXZlciBuZWVkc1xuICAgIC8vIGJlIGV4cG9zZWQgdGhyb3VnaCBzZXR0aW5ncyBmb3IgYmFja3dhcmRzIGNvbXBhdFxuICAgIGdldEludGVybmFsU3RhdGUgKClcbiAgICB7XG4gICAgICAgIHJldHVybiB0aGlzLnZpZXdlclN0YXRlO1xuICAgIH1cblxuICAgIGdldFB1YmxpY0luc3RhbmNlICgpXG4gICAge1xuICAgICAgICByZXR1cm4gdGhpcy5wdWJsaWNJbnN0YW5jZTtcbiAgICB9XG5cbiAgICBnZXRQYWdlVG9vbHMgKClcbiAgICB7XG4gICAgICAgIHJldHVybiB0aGlzLnZpZXdlclN0YXRlLnBhZ2VUb29scztcbiAgICB9XG5cbiAgICBnZXRDdXJyZW50TGF5b3V0ICgpXG4gICAge1xuICAgICAgICByZXR1cm4gdGhpcy52aWV3ZXJTdGF0ZS5yZW5kZXJlciA/IHRoaXMudmlld2VyU3RhdGUucmVuZGVyZXIubGF5b3V0IDogbnVsbDtcbiAgICB9XG5cbiAgICAvKiogR2V0IGEgY29weSBvZiB0aGUgY3VycmVudCB2aWV3cG9ydCBkaW1lbnNpb25zICovXG4gICAgZ2V0Vmlld3BvcnQgKClcbiAgICB7XG4gICAgICAgIGNvbnN0IHZpZXdwb3J0ID0gdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydDtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdG9wOiB2aWV3cG9ydC50b3AsXG4gICAgICAgICAgICBsZWZ0OiB2aWV3cG9ydC5sZWZ0LFxuICAgICAgICAgICAgYm90dG9tOiB2aWV3cG9ydC5ib3R0b20sXG4gICAgICAgICAgICByaWdodDogdmlld3BvcnQucmlnaHQsXG5cbiAgICAgICAgICAgIHdpZHRoOiB2aWV3cG9ydC53aWR0aCxcbiAgICAgICAgICAgIGhlaWdodDogdmlld3BvcnQuaGVpZ2h0XG4gICAgICAgIH07X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GVkKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogcmVnaW9uLnRvcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvdHRvbTogcmVnaW9uLmJvdHRvbSxcblxuICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogcmVnaW9uLmxlZnQgKyBkb2NPZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICByaWdodDogcmVnaW9uLnJpZ2h0ICsgZG9jT2Zmc2V0XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3A6IHJlZ2lvbi50b3AgKyBkb2NPZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICBib3R0b206IHJlZ2lvbi5ib3R0b20gKyBkb2NPZmZzZXQsXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IHJlZ2lvbi5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IHJlZ2lvbi5yaWdodFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZWdpb247XG4gICAgfVxuXG4gICAgZ2V0UGFnZVBvc2l0aW9uQXRWaWV3cG9ydE9mZnNldCAoY29vcmRzKVxuICAgIHtcbiAgICAgICAgY29uc3QgZG9jQ29vcmRzID0ge1xuICAgICAgICAgICAgbGVmdDogY29vcmRzLmxlZnQgKyB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LmxlZnQsXG4gICAgICAgICAgICB0b3A6IGNvb3Jkcy50b3AgKyB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LnRvcFxuICAgICAgICB9O1xuXG4gICAgICAgIGNvbnN0IHJlbmRlcmVkUGFnZXMgPSB0aGlzLnZpZXdlclN0YXRlLnJlbmRlcmVyLmdldFJlbmRlcmVkUGFnZXMoKTtcbiAgICAgICAgY29uc3QgcGFnZUNvdW50ID0gcmVuZGVyZWRQYWdlcy5sZW5ndGg7XG5cbiAgICAgICAgLy8gRmluZCB0aGUgcGFnZSBvbiB3aGljaCB0aGUgY29vcmRzIG9jY3VyXG4gICAgICAgIGZvciAobGV0IGk9MDsgaSA8IHBhZ2VDb3VudDsgaSsrKVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCBwYWdlSW5kZXggPSByZW5kZXJlZFBhZ2VzW2ldO1xuICAgICAgICAgICAgY29uc3QgcmVnaW9uID0gdGhpcy52aWV3ZXJTdGF0ZS5yZW5kZXJlci5sYXlvdXQuZ2V0UGFnZVJlZ2lvbihwYWdlSW5kZXgpO1xuXG4gICAgICAgICAgICBpZiAocmVnaW9uLmxlZnQgPD0gZG9jQ29vcmRzLmxlZnQgJiYgcmVnaW9uLnJpZ2h0ID49IGRvY0Nvb3Jkcy5sZWZ0ICYmXG4gICAgICAgICAgICAgICAgcmVnaW9uLnRvcCA8PSBkb2NDb29yZHMudG9wICYmIHJlZ2lvbi5ib3R0b20gPj0gZG9jQ29vcmRzLnRvcClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBhbmNob3JQYWdlOiBwYWdlSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogZG9jQ29vcmRzLmxlZnQgLSByZWdpb24ubGVmdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogZG9jQ29vcmRzLnRvcCAtIHJlZ2lvbi50b3BcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICA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xpc2goXCJBY3RpdmVQYWdlRGlkQ2hhbmdlXCIsIGFjdGl2ZVBhZ2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gYXJyYXlzRXF1YWwgKGEsIGIpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmIChhLmxlbmd0aCAhPT0gYi5sZW5ndGgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gYS5sZW5ndGg7IGkgPCBsZW47IGkrKylcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZiAoYVtpXSAhPT0gYltpXSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRQYWdlTmFtZSAocGFnZUluZGV4KVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmlld2VyU3RhdGUubWFuaWZlc3QucGFnZXNbcGFnZUluZGV4XS5mO1xuICAgIH1cblxuICAgIHJlbG9hZCAobmV3T3B0aW9ucylcbiAgICB7XG4gICAgICAgIHRoaXMucmVsb2FkVmlld2VyKG5ld09wdGlvbnMpO1xuICAgIH1cblxuICAgIHpvb20gKHpvb21MZXZlbCwgZm9jYWxQb2ludClcbiAgICB7XG4gICAgICAgIHJldHVybiB0aGlzLmhhbmRsZVpvb20oem9vbUxldmVsLCBmb2NhbFBvaW50KTtcbiAgICB9XG5cbiAgICBlbmFibGVTY3JvbGxhYmxlICgpXG4gICAge1xuICAgICAgICBpZiAoIXRoaXMudmlld2VyU3RhdGUuaXNTY3JvbGxhYmxlKVxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLmJpbmRNb3VzZUV2ZW50cygpO1xuICAgICAgICAgICAgdGhpcy5lbmFibGVEcmFnU2Nyb2xsYWJsZSgpO1xuICAgICAgICAg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W1zW2pdID0ge1xuICAgICAgICAgICAgICAgIGg6IE1hdGguZmxvb3IoaW5jb3Jwb3JhdGVab29tKGgsIGxvd2VzdE1heFpvb20gLSBqKSksXG4gICAgICAgICAgICAgICAgdzogTWF0aC5mbG9vcihpbmNvcnBvcmF0ZVpvb20odywgbG93ZXN0TWF4Wm9vbSAtIGopKVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmOiBpbmZvLnVybCxcbiAgICAgICAgICAgIHVybDogdXJsLFxuICAgICAgICAgICAgaWw6IGl0bS5sYWJlbCB8fCBcIlwiLFxuICAgICAgICAgICAgZDogZGltc1xuICAgICAgICB9O1xuICAgIH0pO1xufTtcblxuY29uc3QgZ2V0SUlJRlByZXNlbnRhdGlvblZlcnNpb24gPSAoY29udGV4dCkgPT5cbntcbiAgICBpZiAoY29udGV4dCA9PT0gXCJodHRwOi8vaWlpZi5pby9hcGkvcHJlc2VudGF0aW9uLzIvY29udGV4dC5qc29uXCIpXG4gICAgICAgIHJldHVybiAyO1xuICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoY29udGV4dCkgJiYgY29udGV4dC5pbmNsdWRlcyhcImh0dHA6Ly9paWlmLmlvL2FwaS9wcmVzZW50YXRpb24vMi9jb250ZXh0Lmpzb25cIikpXG4gICAgICAgIHJldHVybiAyO1xuICAgIGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoY29udGV4dCkgJiYgY29udGV4dC5pbmNsdWRlcyhcImh0dHA6Ly9paWlmLmlvL2FwaS9wcmVzZW50YXRpb24vMy9jb250ZXh0Lmpzb25cIikpXG4gICAgICAgIHJldHVybiAzO1xuICAgIGVsc2VcbiAgICAgICAgcmV0dXJuIDI7IC8vIEFzc3VtZSBhIHYyIG1hbmlmZXN0LlxufTtcblxuLyoqXG4gKiBQYXJzZXMgYW4gSUlJRiBQcmVzZW50YXRpb24gQVBJIE1hbmlmZXN0IGFuZCBjb252ZX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yBBcnJheShjYW52YXNlcy5sZW5ndGgpO1xuXG4gICAgbGV0IHRoaXNDYW52YXMsIFxuICAgICAgICB0aGlzUmVzb3VyY2UsIFxuICAgICAgICB0aGlzSW1hZ2UsXG4gICAgICAgIHNlY29uZGFyeUltYWdlcyxcbiAgICAgICAgb3RoZXJJbWFnZXMgPSBbXSxcbiAgICAgICAgY29udGV4dCwgXG4gICAgICAgIHVybCwgXG4gICAgICAgIGluZm8sIFxuICAgICAgICBpbWFnZUFQSVZlcnNpb24sIFxuICAgICAgICB3aWR0aCwgXG4gICAgICAgIGhlaWdodCwgXG4gICAgICAgIG1heFpvb20sIFxuICAgICAgICBjYW52YXMsIFxuICAgICAgICBsYWJlbCwgXG4gICAgICAgIGltYWdlTGFiZWwsIFxuICAgICAgICB6b29tRGltZW5zaW9ucywgXG4gICAgICAgIHdpZHRoQXRDdXJyZW50Wm9vbUxldmVsLCBcbiAgICAgICAgaGVpZ2h0QXRDdXJyZW50Wm9vbUxldmVsO1xuXG4gICAgbGV0IGxvd2VzdE1heFpvb20gPSAxMDA7XG4gICAgbGV0IG1heFJhdGlvID0gMDtcbiAgICBsZXQgbWluUmF0aW8gPSAxMDA7XG5cbiAgICAvLyBxdWlja2x5IGRldGVybWluZSB0aGUgbG93ZXN0IHBvc3NpYmxlIG1heCB6b29tIGxldmVsIChpLmUuLCB0aGUgdXBwZXIgYm91bmQgZm9yIGltYWdlcykgYWNyb3NzIGFsbCBjYW52YXNlcy5cbiAgICAvLyB3aGlsZSB3ZSdyZSBoZXJlLCBjb21wdXRlIHRoZSBnbG9iYWwgcmF0aW9zIGFzIHdlbGwuXG4gICAgZm9yIChsZXQgeiA9IDA7IHogPCBudW1DYW52YXNlczsgeisrKVxuICAgIHtcbiAgICAgICAgY29uc3QgYyA9IGNhbnZhc2VzW3pdO1xuICAgICAgICBjb25zdCB3ID0gYy53aWR0aDtcbiAgICAgICAgY29uc3QgaCA9IGMuaGVpZ2h0O1xuICAgICAgICBjb25zdCBteiA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gICAgICBpbWFnZUFQSVZlcnNpb24gPSAxLjE7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICBpbWFnZUFQSVZlcnNpb24gPSAxLjA7XG4gICAgICAgIH1cblxuICAgICAgICB6b29tRGltZW5zaW9ucyA9IG5ldyBBcnJheShsb3dlc3RNYXhab29tICsgMSk7XG5cbiAgICAgICAgZm9yIChsZXQgayA9IDA7IGsgPCBsb3dlc3RNYXhab29tICsgMTsgaysrKVxuICAgICAgICB7XG4gICAgICAgICAgICB3aWR0aEF0Q3VycmVudFpvb21MZXZlbCA9IE1hdGguZmxvb3IoaW5jb3Jwb3JhdGVab29tKHdpZHRoLCBsb3dlc3RNYXhab29tIC0gaykpO1xuICAgICAgICAgICAgaGVpZ2h0QXRDdXJyZW50Wm9vbUxldmVsID0gTWF0aC5mbG9vcihpbmNvcnBvcmF0ZVpvb20oaGVpZ2h0LCBsb3dlc3RNYXhab29tIC0gaykpO1xuICAgICAgICAgICAgem9vbURpbWVuc2lvbnNba10gPSB7XG4gICAgICAgICAgICAgICAgaDogaGVpZ2h0QXRDdXJyZW50Wm9vbUxldmVsLFxuICAgICAgICAgICAgICAgIHc6IHdpZHRoQXRDdXJyZW50Wm9vbUxldmVsXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0b3RhbFdpZHRoc1trXSArPSB3aWR0aEF0Q3VycmVudFpvb21MZXZlbDtcbiAgICAgICAgICAgIHRvdGFsSGVpZ2h0c1trXSArPSBoZWlnaHRBdEN1cnJlbnRab29tTGV2ZWw7XG4gICAgICAgICAgICBtYXhXaWR0aHNba10gPSBNYXRoLm1heCh3aWR0aEF0Q3VycmVudFpvb21MZXZlbCwgbWF4V2lkdGhzW2tdKTtcbiAgICAgICAgICAgIG1heEhlaWdodHNba10gPSBNYXRoLm1heChoZWlnaHRBdEN1cnJlbnRab29tTGV2ZWwsIG1heEhlaWdodHNba10pO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IGlzUGFnZWQgPSB0aGlzQ2FudmFzLnZpZXdpbmdIaW50ICE9PSAnbm9uLXBhZ2VkJyB8fCAodGhpc0NhbnZhcy5iZWhhdmlvciA/IHRoaXNDYW52YXMuYmVoYXZpb3JbMF0gIT09ICdub24tcGFnZWQnIDogZmFsc2UpO1xuICAgICAgICBsZXQgaXNGYWNpbmcgPSB0aGlzQ2FudmFzLnZpZXdpbmdIaW50ID09PSAnZmFjaW5nLXBhZ2VzJyB8fCAodGhpc0NhbnZhcy5iZWhhdmlvciA/IHRoaXNDYW52YXMuYmVoYXZpb3JbMF0gPT09ICdmYWNpbmctcGFnZXMnIDogZmFsc2UpO1xuXG4gICAgICAgIHBhZ2VzW2ldID0ge1xuICAgICAgICAgICAgZDogem9vbURpbWVuc2lvbnMsXG4gICAgICAgICAgICBtOiBtYXhab29tLFxuICAgICAgICAgICAgbDogbGFiZWwsICAgICAgICAgLy8gY2FudmFzIGxhYmVsICgncGFnZSAxLCBwYWdlIDInLCBldGMuKVxuICAgICAgICAgICAgaWw6IGltYWdlTGFiZWwsICAgLy8gZGVmYXVsdCBpbWFnZSBsYWJlbCAoJ3ByaW1hcnkgaW1hZ2UnLCAnVVYgbGlnaHQnLCBldGMuKVxuICAgICAgICAgICAgZjogaW5mby51cmwsXG4gICAgICAgICAgICB1cmw6IHVybCxcbiAgICAgICAgICAgIGFwaTogaW1hZ2VBUElWZXJzaW9uLFxuICAgICAgICAgICAgcGFnZWQ6IGlzUGFnZWQsXG4gICAgICAgICAgICBmYWNpbmdQYWdlczogaXNGYWNpbmcsXG4gICAgICAgICAgICBjYW52YXM6IGNhbnZhcyxcbiAgICAgICAgICAgIG90aGVySW1hZ2VzOiBvdGhlckltYWdlcyxcbiAgICAgICAgICAgIHhvZmZzZXQ6IGluZm8ueCB8fCBudWxsLFxuICAgICAgICAgICAgeW9mZnNldDogaW5mby55IHx8IG51bGxcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBjb25zdCBhdmVyYW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lID0gdGhpcy5wYWdlc1twYWdlSW5kZXhdO1xuXG4gICAgICAgIGlmICghaXNGaW5pdGUoem9vbUxldmVsKSB8fCB6b29tTGV2ZWwgJSAxICE9PSAwKVxuICAgICAgICB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdab29tIGxldmVsIG11c3QgYmUgYW4gaW50ZWdlcjogJyArIHpvb21MZXZlbCk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCByb3dzID0gTWF0aC5jZWlsKHBhZ2UuZFt6b29tTGV2ZWxdLmggLyB0aWxlRGltZW5zaW9ucy5oZWlnaHQpO1xuICAgICAgICBjb25zdCBjb2xzID0gTWF0aC5jZWlsKHBhZ2UuZFt6b29tTGV2ZWxdLncgLyB0aWxlRGltZW5zaW9ucy53aWR0aCk7XG5cbiAgICAgICAgY29uc3QgdGlsZXMgPSBbXTtcblxuICAgICAgICBsZXQgcm93LCBjb2wsIHVybDtcblxuICAgICAgICBmb3IgKHJvdyA9IDA7IHJvdyA8IHJvd3M7IHJvdysrKVxuICAgICAgICB7XG4gICAgICAgICAgICBmb3IgKGNvbCA9IDA7IGNvbCA8IGNvbHM7IGNvbCsrKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuX3VybEFkYXB0ZXIuZ2V0VGlsZUltYWdlVVJMKHRoaXMsIHBhZ2VJbmRleCwge1xuICAgICAgICAgICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgICAgICAgICAgY29sOiBjb2wsXG4gICAgICAgICAgICAgICAgICAgIHJvd0NvdW50OiByb3dzLFxuICAgICAgICAgICAgICAgICAgICBjb2xDb3VudDogY29scyxcbiAgICAgICAgICAgICAgICAgICAgem9vbUxldmVsOiB6b29tTGV2ZWwsXG4gICAgICAgICAgICAgICAgICAgIHRpbGVEaW1lbnNpb25zOiB0aWxlRGltZW5zaW9uc1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gRklYTUU6IERpbWVuc2lvbnMgc2hvdWxkIGFjY291bnQgZm9yIHBhcnRpYWwgdGlsZXMgKGUuZy4gdGhlXG4gICAgICAgICAgICAgICAgLy8gbGFzdCByb3cgYW5kIGNvbHVtbiBpbiBhIHRpbGVkIGltYWdlKVxuICAgICAgICAgICAgICAgIHRpbGVzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgICAgICAgICAgY29sOiBjb2wsXG4gICAgICAgICAgICAgICAgICAgIHpvb21MZXZlbDogem9vbUxldmVsLFxuICAgICAgICAgICAgICAgICAgICBkaW1lbnNpb25zOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IHRpbGVEaW1lbnNpb25zLmhlaWdodCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiB0aWxlRGltZW5zaW9ucy53aWR0aFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBvZmZzZXQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogcm93ICogdGlsZURpbWVuc2lvbnMuaGVpZ2h0LFxuICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogY29sICogdGlsZURpbWVuc2lvbnMud2lkdGhcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB6b29tTGV2ZWw6IHpvb21MZXZlbCxcbiAgICAgICAgICAgIHJvd3M6IHJvd3MsXG4gICAgICAgICAgICBjb2xzOiBjb2xzLFxuICAgICAgICAgICAgdGlsZXM6IHRpbGVzXG4gICAgICAgIH07XG4gICAgfVxufVxuXG5JbWFnZU1hbmlmZXN0LnByb3RvdHlwZS5nZXRNYXhXaWR0aCA9IHpvb21lZFByb3BlcnR5R2V0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ICAgY29uc3RydWN0b3IgKHZpZXdlcilcbiAgICB7XG4gICAgICAgIHRoaXMudmlld2VyID0gdmlld2VyO1xuICAgICAgICB0aGlzLnNldHRpbmdzID0gdmlld2VyLnNldHRpbmdzO1xuICAgIH1cblxuICAgIF9lbGVtQXR0cnMgKGlkZW50LCBiYXNlKVxuICAgIHtcbiAgICAgICAgY29uc3QgYXR0cnMgPSB7XG4gICAgICAgICAgICBpZDogdGhpcy5zZXR0aW5ncy5JRCArIGlkZW50LFxuICAgICAgICAgICAgY2xhc3M6ICdkaXZhLScgKyBpZGVudFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChiYXNlKVxuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oYXR0cnMsIGJhc2UpO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICByZXR1cm4gYXR0cnM7XG4gICAgfVxuXG5cbiAgICAvKiogQ29udmVuaWVuY2UgZnVuY3Rpb24gdG8gc3Vic2NyaWJlIHRvIGEgRGl2YSBldmVudCAqL1xuICAgIF9zdWJzY3JpYmUgKGV2ZW50LCBjYWxsYmFjaylcbiAgICB7XG4gICAgICAgIGRpdmEuRXZlbnRzLnN1YnNjcmliZShldmVudCwgY2FsbGJhY2ssIHRoaXMuc2V0dGluZ3MuSUQpO1xuICAgIH1cblxuXG4gICAgY3JlYXRlQnV0dG9uIChuYW1lLCBsYWJlbCwgY2FsbGJhY2ssIGljb24pXG4gICAge1xuICAgICAgICBjb25zdCBidXR0b24gPSBlbHQoJ2J1dHRvbicsIHtcbiAgICAgICAgICAgIHR5cGU6ICdidXR0b24nLFxuICAgICAgICAgICAgaWQ6IHRoaXMuc2V0dGluZ3MuSUQgKyBuYW1lLFxuICAgICAgICAgICAgY2xhc3M6ICdkaXZhLScgKyBuYW1lICsgJyBkaXZhLWJ1dHRvbicsXG4gICAgICAgICAgICB0aXRsZTogbGFiZWwsXG4gICAgICAgICAgICAnYXJpYS1sYWJlbCc6IGxhYmVsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmIChpY29uKVxuICAgICAgICAgICAgYnV0dG9uLmFwcGVuZENoaWxkKGljb24pO1xuXG4gICAgICAgIGlmIChjYWxsYmFjaylcbiAgICAgICAgICAgIGJ1dHRvbi5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGNhbGxiYWNrKTtcblxuICAgICAgICByZXR1cm4gYnV0dG9uO1xuICAgIH1cblxuICAgIGNyZWF0ZUxhYmVsIChuYW1lLCBpZCwgbGFiZWwsIGlubmVyTmFtZSwgaW5uZXJWYWx1ZSlcbiAgICB7XG4gICAgICAgIHJldHVybiBlbHQoJ2RpdicsIHsgaWQ6IHRoaXMuc2V0dGluZ3MuSUQgKyBpZCwgY2xhc3M6IG5hbWUgKyAnIGRpdmEtbGFiZWwnfSxcbiAgICAgICAgICAgICAgICAgICAgWyBsYWJlbCwgZWx0KCdzcGFuJywgeyBpZDogdGhpcy5zZXR0aW5ncy5JRCArIGlubmVyTmFtZSB9LCBpbm5lclZhbHVlKVxuICAgICAgICAgICAgICAgICAgICBdKTtcbiAgICB9XG5cbiAgICBjcmVhdGVab29tQnV0dG9ucyAoKVxuICAgIHtcbiAgICAgICAgbGV0IHpvb21PdXRJY29uID0gdGhpcy5fY3JlYXRlWm9vbU91dEljb24oKTtcbiAgICAgICAgbGV0IHpvb21Jbkljb24gPSB0aGlzLl9jcmVhdGVab29tSW5JY29uKCk7XG5cbiAgICAgICAgbGV0IHpvb21CdXR0b25zID0gW1xuICAgICAgICAgICAgdGhpcy5jcmVhdGVCdXR0b24oJ3pvb20tb3V0LWJ1dHRvbicsICdab29tIE91dCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdlci5zZXRab29tTGV2ZWwodGhpcy5zZXR0aW5ncy56b29tTGV2ZWwgLSAxKTtcbiAgICAgICAgICAgIH0sIHpvb21PdXRJY29uKSxcbiAgICAgICAgICAgIHRoaXMuY3JlYXRlQnV0dG9uKCd6b29tLWluLWJ1d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uZGxlcik7XG5cbiAgICAgICAgcmV0dXJuIGVsdCgnZGl2Jywge2lkOiB0aGlzLnNldHRpbmdzLklEICsgXCJncmlkLWNvbnRyb2xzXCIsIHN0eWxlOiBcImRpc3BsYXk6bm9uZVwiIH0sIGdyaWRCdXR0b25zKTtcbiAgICB9XG5cbiAgICBjcmVhdGVQYWdlTGFiZWwgKClcbiAgICB7XG4gICAgICAgIC8vIEN1cnJlbnQgcGFnZVxuICAgICAgICBjb25zdCBjdXJyZW50UGFnZSA9IGVsdCgnc3BhbicsIHtcbiAgICAgICAgICAgIGlkOiB0aGlzLnNldHRpbmdzLklEICsgJ2N1cnJlbnQtcGFnZSdcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgdXBkYXRlQ3VycmVudFBhZ2UgPSAoKSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBnZXQgbGFiZWxzIGZvciBpbmRleCByYW5nZVxuICAgICAgICAgICAgbGV0IGluZGljZXMgPSB0aGlzLnZpZXdlci5nZXRDdXJyZW50UGFnZUluZGljZXMoKTtcbiAgICAgICAgICAgIGxldCBzdGFydEluZGV4ID0gaW5kaWNlc1swXTtcbiAgICAgICAgICAgIGxldCBlbmRJbmRleCA9IGluZGljZXNbaW5kaWNlcy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgIGxldCBzdGFydExhYmVsID0gdGhpcy5zZXR0aW5ncy5tYW5pZmVzdC5wYWdlc1tzdGFydEluZGV4XS5sO1xuICAgICAgICAgICAgbGV0IGVuZExhYmVsID0gdGhpcy5zZXR0aW5ncy5tYW5pZmVzdC5wYWdlc1tlbmRJbmRleF0ubDtcblxuICAgICAgICAgICAgaWYgKHN0YXJ0SW5kZXggIT09IGVuZEluZGV4KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgXHRpZiAodGhpcy5zZXR0aW5ncy5lbmFibGVJbmRleEFzTGFiZWwpXG4gICAgICAgICAgICAgICAgXHRjdXJyZW50UGFnZS50ZXh0Q29udGVud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RoZSBzdWdnZXN0aW9uc1xuICAgICAgICAgICAgaW5wdXRTdWdnZXN0aW9ucy5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnO1xuXG4gICAgICAgICAgICAvLyBQcmV2ZW50IHRoZSBkZWZhdWx0IGFjdGlvbiBvZiByZWxvYWRpbmcgdGhlIHBhZ2VcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgWydpbnB1dCcsICdmb2N1cyddLmZvckVhY2goZXZlbnQgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgZ290b1BhZ2VJbnB1dC5hZGRFdmVudExpc3RlbmVyKGV2ZW50LCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgaW5wdXRTdWdnZXN0aW9ucy5pbm5lckhUTUwgPSAnJzsgLy8gUmVtb3ZlIGFsbCBwcmV2aW91cyBzdWdnZXN0aW9uc1xuXG4gICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBnb3RvUGFnZUlucHV0LnZhbHVlO1xuICAgICAgICAgICAgICAgIGxldCBudW1TdWdnZXN0aW9ucyA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuZW5hYmxlR290b1N1Z2dlc3Rpb25zICYmIHZhbHVlKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFnZXMgPSB0aGlzLnNldHRpbmdzLm1hbmlmZXN0LnBhZ2VzO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gcGFnZXMubGVuZ3RoOyBpIDwgbGVuICYmIG51bVN1Z2dlc3Rpb25zIDwgMTA7IGkrKylcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhZ2VzW2ldLmwudG9Mb3dlckNhc2UoKS5pbmRleE9mKHZhbHVlLnRvTG93ZXJDYXNlKCkpID4gLTEpXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3SW5wdXRTdWdnZXN0aW9uID0gZWx0KCdkaXYnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogJ2RpdmEtaW5wdXQtc3VnZ2VzdGlvbidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZXNbaV0ubFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dFN1Z2dlc3Rpb25zLmFwcGVuZENoaWxkKG5ld0lucHV0U3VnZ2VzdGlvbik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1TdWdnZXN0aW9ucysrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gU2hvdyBsYWJlbCBzdWdnZXN0aW9uc1xuICAgICAgICAgICAgICAgICAgICBpZiAobnVtU3VnZ2VzdGlvbnMgPiAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRTdWdnZXN0aW9ucy5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBpbnB1dFN1Z2dlc3Rpb25zLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgZ290b1BhZ2VJbnB1dC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgZSA9PiB7XG4gICAgICAgICAgICBsZXQgZWw7XG4gICAgICAgICAgICBpZiAoZS5rZXlDb2RlID09PSAxMykgLy8gJ0VudGVyJyBrZXlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCBhY3RpdmUgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdhY3RpdmUnKVswXTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFjdGl2ZSAhPT0gJ3VuZGVmaW5lZCcpXG4gICAgICAgICAgICAgICAgICAgIGdvdG9QYWdlSW5wdXQudmFsdWUgPSBhY3RpdmUuaW5uZXJUZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGUua2V5Q29kZSA9PT0gMzgpIC8vIFVwIGFycm93IGtleVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGVsID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgnYWN0aXZlJylbMF07XG4gICAgICAgICAgICAgICAgY29uc3QgcHJldkVsID0gZWwgPyBlbC5wcmV2aW91c1NpYmxpbmcgOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwcmV2RWwgIT09ICd1bmRlZmluZWQnKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZWwuY2xhc3NMaXN0LnJlbW92ZSgnYWN0aXZlJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmV2RWwgIT09IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmV2RWwuY2xhc3NMaXN0LmFkZCgnYWN0aXZlJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBsYXN0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgnZGl2YS1pbnB1dC1zdWdnZXN0aW9uJykubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgnZGl2YS1pbnB1dC1zdWdnZXN0aW9uJylbbGFzdF0uY2xhc3NMaXN0LmFkZCgnYWN0aXZlJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoZS5rZXlDb2RlID09PSA0MCkgLy8gRG93biBhcnJvdyBrZXlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBlbCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2FjdGl2ZScpWzBdO1xuICAgICAgICAgICAgICAgIGNvbnN0IG5leHRFbCA9IGVsID8gZWwubmV4dFNpYmxpbmcgOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBuZXh0RWwgIT09ICd1bmRlZmluZWQnKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZWwuY2xhc3NMaXN0LnJlbW92ZSgnYWN0aXZlJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0RWwgIT09IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0RWwuY2xhc3NMaXN0LmFkZCgnYWN0aXZlJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2RpdmEtaW5wdXQtc3VnZ2VzdGlvbicpWzBdLmNsYXNzTGlzdC5hZGQoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgb25FdmVudChpbnB1dFN1Z2dlc3Rpb25zLCAnbW91c2Vkb3duJywgJy5kaXZhLWlucHV0LXN1Z2dlc3Rpb24nLCBmdW5jdGlvbiAoKVxuICAgICAgICB7XG4gICAgICAgICAgICBnb3RvUGFnZUlucHV0LnZhbHVlID0gdGhpcy50ZXh0Q29udGVudDtcbiAgICAgICAgICAgIGlucHV0U3VnZ2VzdGlvbnMuc3R5bGUuZGlzcGxheSA9ICdub25lJztcbiAgICAgICAgICAgIGxldCBzdWJtaXRFdmVudCA9IG5ldyBFdmVudCgnc3VibWl0Jywge1xuICAgICAgICAgICAgICAgIGNhbmNlbGFibGU6IHRydWVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZ290b0Zvcm0uZGlzcGF0Y2hFdmVudChzdWJtaXRFdmVudCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIGphdmFzY3JpcHQgZXF1aXZhbGVudCB0byBqcXVlcnkgLm9uKGV2ZW50LCBzZWxlY3RvciwgZnVuY3Rpb24pXG4gICAgICAgIGZ1bmN0aW9uIG9uRXZlbnQgKGVsZW0sIGV2dCwgc2VsLCBoYW5kbGVyKVxuICAgICAgICB7XG4gICAgICAgICAgICBlbGVtLmFkZEV2ZW50TGlzdGVuZXIoZXZ0LCBmdW5jdGlvbiAoZXZlbnQpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdmFyIHQgPSBldmVudC50YXJnZXQ7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHQgJiYgdCAhPT0gdGhpcylcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0Lm1hdGNoZXMoc2VsKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZXIuY2FsbCh0LCBldmVudCk7XG4gICAgICAgICAgICAgICAgICAgIHQgPSB0LnBhcmVudE5vZGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBnb3RvUGFnZUlucHV0LmFkZEV2ZW50TGlzdGVuZXIoJ2JsdXInLCAoKSA9PiB7XG4gICAgICAgICAgICAvLyBIaWRlIGxhYmVsIHN1Z2dlc3Rpb25zXG4gICAgICAgICAgICBpbnB1dFN1Z2dlc3Rpb25zLnN0eWxlLm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ICAgIGNvbnN0IHVwZGF0ZVZpZXdNZW51ID0gKCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3Qgdmlld0ljb25DbGFzc2VzID0gJyBkaXZhLXZpZXctaWNvbiBkaXZhLWJ1dHRvbic7XG5cblxuICAgICAgICAgICAgLy8gZGlzcGxheSB0aGUgaWNvbiBvZiB0aGUgbW9kZSB3ZSdyZSBjdXJyZW50bHkgaW4gKD8pXG4gICAgICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5pbkdyaWQpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY2hhbmdlVmlld0J1dHRvbi5hcHBlbmRDaGlsZChncmlkVmlld0ljb24pO1xuICAgICAgICAgICAgICAgIGNoYW5nZVZpZXdCdXR0b24uY2xhc3NOYW1lID0gJ2RpdmEtZ3JpZC1pY29uJyArIHZpZXdJY29uQ2xhc3NlcztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuc2V0dGluZ3MuaW5Cb29rTGF5b3V0KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNoYW5nZVZpZXdCdXR0b24uYXBwZW5kQ2hpbGQoYm9va1ZpZXdJY29uKTtcbiAgICAgICAgICAgICAgICBjaGFuZ2VWaWV3QnV0dG9uLmNsYXNzTmFtZSA9ICdkaXZhLWJvb2staWNvbicgKyB2aWV3SWNvbkNsYXNzZXM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY2hhbmdlVmlld0J1dHRvbi5hcHBlbmRDaGlsZChwYWdlVmlld0ljb24pO1xuICAgICAgICAgICAgICAgIGNoYW5nZVZpZXdCdXR0b24uY2xhc3NOYW1lID0gJ2RpdmEtZG9jdW1lbnQtaWNvbicgKyB2aWV3SWNvbkNsYXNzZXM7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IHZpZXdPcHRpb25zID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gICAgICAgdmlld09wdGlvbnNMaXN0LnJlbW92ZUNoaWxkKHZpZXdPcHRpb25zTGlzdC5maXJzdENoaWxkKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gaW5zZXJ0IG5ldyBtZW51XG4gICAgICAgICAgICB2aWV3T3B0aW9uc0xpc3QuYXBwZW5kQ2hpbGQodmlld09wdGlvbnMpO1xuICAgICAgICB9O1xuXG4gICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCBldmVudCA9PlxuICAgICAgICB7XG4gICAgICAgICAgICBpZiAodmlld09wdGlvbnNMaXN0ICE9PSBldmVudC50YXJnZXQpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdmlld09wdGlvbnNMaXN0LnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuX3N1YnNjcmliZSgnVmlld0RpZFN3aXRjaCcsIHVwZGF0ZVZpZXdNZW51KTtcbiAgICAgICAgdGhpcy5fc3Vic2NyaWJlKCdPYmplY3REaWRMb2FkJywgdXBkYXRlVmlld01lbnUpO1xuXG4gICAgICAgIHJldHVybiBlbHQoJ2RpdicsIHRoaXMuX2VsZW1BdHRycygndmlldy1tZW51JyksXG4gICAgICAgICAgICBjaGFuZ2VWaWV3QnV0dG9uLFxuICAgICAgICAgICAgdmlld09wdGlvbnNMaXN0XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgY3JlYXRlRnVsbHNjcmVlbkJ1dHRvbiAoKVxuICAgIHtcbiAgICAgICAgbGV0IGZ1bGxzY3JlZW5JY29uID0gdGhpcy5fY3JlYXRlRnVsbHNjcmVlbkljb24oKTtcblxuICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVCdXR0b24oJ2Z1bGxzY3JlZW4taWNvbicsICdUb2dnbGUgZnVsbHNjcmVlbiBtb2RlJywgKCkgPT4ge1xuICAg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gdGhlIGVuZCBvZiB0aGUgc3RyaW5nXG4gICAgICAgICAgICBjb25zdCBlbmRJbmRleCA9IGhhc2guaW5kZXhPZignJicsIHN0YXJ0SW5kZXgpO1xuICAgICAgICAgICAgaWYgKGVuZEluZGV4ID4gc3RhcnRJbmRleClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KGhhc2guc3Vic3RyaW5nKHN0YXJ0SW5kZXgsIGVuZEluZGV4KSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChlbmRJbmRleCA8IDApXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgLy8gVGhpcyBtZWFucyB0aGlzIGhhc2ggcGFyYW0gaXMgdGhlIGxhc3Qgb25lXG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChoYXNoLnN1YnN0cmluZyhzdGFydEluZGV4KSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBJZiB0aGUga2V5IGRvZXNuJ3QgaGF2ZSBhIHZhbHVlIEkgdGhpbmtcbiAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIC8vIElmIGl0IGNhbid0IGZpbmQgdGhlIGtleVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2VcbiAgICB7XG4gICAgICAgIC8vIElmIHRoZXJlIGFyZSBubyBoYXNoIHBhcmFtcyBqdXN0IHJldHVybiBmYWxzZVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufVxuXG5mdW5jdGlvbiB1cGRhdGVIYXNoUGFyYW0gKGtleSwgdmFsdWUpXG57XG4gICAgLy8gRmlyc3QgbWFrZSBzdXJlIHRoYXQgd2UgaGF2ZSB0byBkbyBhbnkgd29yayBhdCBhbGxcbiA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gnT2JqZWN0RGlkTG9hZCcsICgpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRvb2xiYXIgIT09IG51bGwpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy50b29sYmFyLnJlbmRlcigpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBkaXZhLkV2ZW50cy51bnN1YnNjcmliZShoYW5kbGUpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLmhhc2hTdGF0ZSA9IHRoaXMuX2dldEhhc2hQYXJhbVN0YXRlKCk7XG5cbiAgICAgICAgdGhpcy5fbG9hZE9yRmV0Y2hPYmplY3REYXRhKCk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiovXG4gICAgX2xvYWRPckZldGNoT2JqZWN0RGF0YSAoKVxuICAgIHtcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLnNldHRpbmdzLm9iamVjdERhdGEgPT09ICdvYmplY3QnKVxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBEZWZlciBleGVjdXRpb24gdW50aWwgaW5pdGlhbGl6YXRpb24gaGFzIGNvbXBsZXRlZFxuICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuX2xvYWRPYmplY3REYXRhKHRoaXMuc2V0dGluZ3Mub2JqZWN0RGF0YSwgdGhpcy5oYXNoU3RhdGUpO1xuICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCBwZW5kaW5nTWFuaWZlc3RSZXF1ZXN0ID0gZmV0Y2godGhpcy5zZXR0aW5ncy5vYmplY3REYXRhLCB7XG4gICAgICAgICAgICAgICAgaGVhZGVyczogdGhpcy5zZXR0aW5ncy5yZXF1ZXN0SGVhZGVyc1xuICAgICAgICAgICAgfSkudGhlbiggKHJlc3BvbnNlKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlmICghcmVzcG9uc2Uub2spXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAvLyB0cmlnZ2VyIG1hbmlmZXN0IGxvYWQgZXJyb3IgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgZGl2YS5FdmVudHMucHVibGlzaCgnTWFuaWZlc3RGZXRjaEVycm9yJywgW3Jlc3BvbnNlXSwgdGhpcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWpheEVycm9yKHJlc3BvbnNlKTtcblxuICAgICAgICAgICAgICAgICAgICBsZXQgZXJyb3IgPSBuZXcgRXJyb3IocmVzcG9uc2Uuc3RhdHVzVGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yLnJlc3BvbnNlID0gcmVzcG9uc2U7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpO1xuXG4gICAgICAgICAgICB9KS50aGVuKCAoZGF0YSkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9sb2FkT2JqZWN0RGF0YShkYXRhLCB0aGlzLmhhc2hTdGF0ZSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gU3RvcmUgdGhlIHBlbmRpbmcgcmVxdWVzdCBzbyB0aGF0IGl0IGNhbiBiZSBjYW5jZWxsZWQgaW4gdGhlIGV2ZW50IHRoYXQgRGl2YSBuZWVkcyB0byBiZSBkZXN0cm95ZWRcbiAgICAgICAgICAgIHRoaXMuZGl2YVN0YXRlLnZpZXdlckNvcmUuc2V0UGVuZGluZ01hbmlmZXN0UmVxdWVzdChwZW5kaW5nTWFuaWZlc3RSZXF1ZXN0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBw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aW4gZGF0YSB3aXRob3V0IENPUlMuJyksXG4gICAgICAgICAgICAgICAgICAgIGVsdCgncCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAnWW91IG1heSBuZWVkIHRvIHVwZGF0ZSB5b3VyIHNlcnZlciBjb25maWd1cmF0aW9uIHRvIHN1cHBvcnQgQ09SUy4gRm9yIGhlbHAsIHNlZSB0aGUgJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsdCgnYScsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBocmVmOiAnaHR0cHM6Ly9naXRodWIuY29tL0RETUFML2RpdmEuanMvd2lraS9JbnN0YWxsYXRpb24jYS1ub3RlLWFib3V0LWNyb3NzLXNpdGUtcmVxdWVzdHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldDogJ19ibGFuaydcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sICdjcm9zcy1zaXRlIHJlcXVlc3QgZG9jdW1lbnRhdGlvbi4nKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX3Nob3dFcnJvcihlcnJvck1lc3NhZ2UpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBwcml2YXRlXG4gICAgICoqL1xuICAgIF9sb2FkT2JqZWN0RGF0YSAocmVzcG9uc2VEYXRhLCBoYXNoU3RhdGUpXG4gICAge1xuICAgICAgICBsZXQgbWFuaWZlc3Q7XG5cbiAgICAgICAgLy8gVE9ETyBpbXByb3ZlIElJSUYgZGV0ZWN0aW9uIG1ldGhvZFxuICAgICAgICBpZiAoIXJlc3BvbnNlRGF0YS5oYXNPd25Qcm9wZXJ0eSgnQGNvbnRleHQnKSAmJiAocmVzcG9uc2VEYXRhWydAY29udGV4dCddLmluZGV4T2YoJ2lpaWYnKSA9PT0gLTEgfHwgcmVzcG9uc2VEYXRhWydAY29udGV4dCddLmluZG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gdGhpcy5zZXR0aW5ncy5oYXNoUGFyYW1TdWZmaXgpO1xuXG4gICAgICAgICAgICAvLyBgZmFsc2VgIGlzIHJldHVybmVkIGlmIHRoZSB2YWx1ZSBpcyBtaXNzaW5nXG4gICAgICAgICAgICBpZiAodmFsdWUgIT09IGZhbHNlKVxuICAgICAgICAgICAgICAgIHN0YXRlW3BhcmFtXSA9IHZhbHVlO1xuICAgICAgICB9KTtcblxuICAgICAgICAvLyBEbyBzb21lIGF3a3dhcmQgc3BlY2lhbC1jYXNpbmcsIHNpbmNlIHRoaXMgZm9ybWF0IGlzIGtpbmQgb2Ygd2VpcmQuXG5cbiAgICAgICAgLy8gRm9yIGluRnVsbHNjcmVlbiAoZiksIHRydWUgYW5kIGZhbHNlIHN0cmluZ3Mgc2hvdWxkIGJlIGludGVycHJldGVkXG4gICAgICAgIC8vIGFzIGJvb2xlYW5zLlxuICAgICAgICBpZiAoc3RhdGUuZiA9PT0gJ3RydWUnKVxuICAgICAgICAgICAgc3RhdGUuZiA9IHRydWU7XG4gICAgICAgIGVsc2UgaWYgKHN0YXRlLmYgPT09ICdmYWxzZScpXG4gICAgICAgICAgICBzdGF0ZS5mID0gZmFsc2U7XG5cbiAgICAgICAgLy8gQ29udmVydCBudW1lcmljYWwgdmFsdWVzIHRvIGludGVnZXJzLCBpZiBwcm92aWRlZFxuICAgICAgICBbJ3onLCAnbicsICdwJywgJ3gnLCAneSddLmZvckVhY2goIChwYXJhbSkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKHBhcmFtIGluIHN0YXRlKVxuICAgICAgICAgICAgICAgIHN0YXRlW3BhcmFtXSA9IHBhcnNlSW50KHN0YXRlW3BhcmFtXSwgMTApO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiovXG4gICAgX2dldExvYWRPcHRpb25zRm9yU3RhdGUgKHN0YXRlLCBtYW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uICAgICAgICAgICAgY29uc3QgaG9yaXpvbnRhbE9mZnNldCA9IHBhcnNlSW50KHN0YXRlLngsIDEwKTtcbiAgICAgICAgICAgIGNvbnN0IHZlcnRpY2FsT2Zmc2V0ID0gcGFyc2VJbnQoc3RhdGUueSwgMTApO1xuXG4gICAgICAgICAgICBvcHRpb25zLmdvRGlyZWN0bHlUbyA9IHBhZ2VJbmRleDtcbiAgICAgICAgICAgIG9wdGlvbnMuaG9yaXpvbnRhbE9mZnNldCA9IGhvcml6b250YWxPZmZzZXQ7XG4gICAgICAgICAgICBvcHRpb25zLnZlcnRpY2FsT2Zmc2V0ID0gdmVydGljYWxPZmZzZXQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gb3B0aW9ucztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqICovXG4gICAgX2dldFZpZXdTdGF0ZSAodmlldylcbiAgICB7XG4gICAgICAgIHN3aXRjaCAodmlldylcbiAgICAgICAge1xuICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgaW5HcmlkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgaW5Cb29rTGF5b3V0OiBmYWxzZVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNhc2UgJ2InOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGluR3JpZDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGluQm9va0xheW91dDogdHJ1ZVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNhc2UgJ2cnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGluR3JpZDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgaW5Cb29rTGF5b3V0OiBmYWxzZVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiAqL1xuICAgIF9nZXRQYWdlSW5kZXhGb3JNYW5pZmVzdCAobWFuaWZlc3QsIGZpbGVuYW1lKVxuICAgIHtcbiAgICAgICAgbGV0IGk7XG4gICAgICAgIGNvbnN0IG5wID0gbWFuaWZlc3QucGFnZXMubGVuZ3RoO1xuXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBucDsgaSsrKVxuICAgICAgICB7XG4gICAgICAgICAgICBpZiAobWFuaWZlc3QucGFnZXNbaV0uZiA9PT0gZmlsZW5hbWUpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gLTE7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiAqL1xuICAgIF9nZXRTdGF0ZSAoKVxuICAgIHtcbiAgICAgICAgbGV0IHZpZXc7XG5cbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuaW5HcmlkKVxuICAgICAgICB7XG4gICAgICAgICAgICB2aWV3ID0gJ2cnO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHRoaXMuc2V0dGluZ3MuaW5Cb29rTGF5b3V0KVxuICAgICAgICB7XG4gICAgICAgICAgICB2aWV3ID0gJ2InO1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgdmlldyA9ICdkJztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGxheW91dCA9IHRoaXMuZGl2YVN0YXRlLnZpZXdlckNvcmUuZ2V0Q3VycmVudExheW91dCgpO1xuICAgICAgICBjb25zdCBwYWdlT2Zmc2V0ID0gbGF5b3V0LmdldFBhZ2VUb1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ICB0b29scy5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWVudGVyJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGhvdmVyID0gdHJ1ZTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdG9vbHMuYWRkRXZlbnRMaXN0ZW5lcignbW91c2VsZWF2ZScsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBob3ZlciA9IGZhbHNlO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICB0b29scy5jbGFzc0xpc3QucmVtb3ZlKFwiZGl2YS1mdWxsc2NyZWVuLXRvb2xzXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gdG9nZ2xlT3BhY2l0eSAoKVxuICAgICAgICB7XG4gICAgICAgICAgICB0b29scy5zdHlsZS5vcGFjaXR5ID0gMTtcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0KTtcbiAgICAgICAgICAgIGlmICghaG92ZXIgJiYgdGhpcy5zZXR0aW5ncy5pbkZ1bGxzY3JlZW4pIHtcbiAgICAgICAgICAgICAgICB0ID0gc2V0VGltZW91dChmdW5jdGlvbiAoKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdG9vbHMuc3R5bGUub3BhY2l0eSA9IDA7XG4gICAgICAgICAgICAgICAgfSwgVElNRU9VVCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUb2dnbGVzIGJldHdlZW4gb3JpZW50YXRpb25zXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqICovXG4gICAgX3RvZ2dsZVBhZ2VMYXlvdXRPcmllbnRhdGlvbiAoKVxuICAgIHtcbiAgICAgICAgY29uc3QgdmVydGljYWxseU9yaWVudGVkID0gIXRoaXMuc2V0dGluZ3MudmVydGljYWxseU9y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VyKHtcbiAgICAgICAgICAgICAgICAgICAgaW5HcmlkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgaW5Cb29rTGF5b3V0OiB0cnVlXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGNhc2UgJ2dyaWQnOlxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9yZWxvYWRWaWV3ZXIoe1xuICAgICAgICAgICAgICAgICAgICBpbkdyaWQ6IHRydWVcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqXG4gICAgICogQHBhcmFtIHtOdW1iZXJ9IHBhZ2VJbmRleCAtIDAtYmFzZWQgcGFnZSBpbmRleC5cbiAgICAgKiBAcGFyYW0ge051bWJlcn0geEFuY2hvciAtIHggY29vcmRpbmF0ZSB0byBqdW1wIHRvIG9uIHJlc3VsdGluZyBwYWdlLlxuICAgICAqIEBwYXJhbSB7TnVtYmVyfSB5QW5jaG9yIC0geSBjb29yZGluYXRlIHRvIGp1bXAgdG8gb24gcmVzdWx0aW5nIHBhZ2UuXG4gICAgICogQHJldHVybnMge0Jvb2xlYW59IC0gV2hldGhlciB0aGUganVtcCB3YXMgc3VjY2Vzc2Z1bC5cbiAgICAgKiovXG4gICAgX2dvdG9QYWdlQnlJbmRleCAocGFnZUluZGV4LCB4QW5jaG9yLCB5QW5jaG9yKVxuICAgIHtcbiAgICAgICAgbGV0IHBpZHggPSBwYXJzZUludChwYWdlSW5kZXgsIDEwKTtcblxuICAgICAgICBpZiAodGhpcy5faXNQYWdlSW5kZXhWYWxpZChwaWR4KSlcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgeE9mZnNldCA9IHRoaXMuZGl2YVN0YXRlLnZpZXdlckNvcmUuZ2V0WE9mZnNldChwaWR4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lLnJlbG9hZChuZXdPcHRpb25zKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIF9nZXRDdXJyZW50VVJMICgpXG4gICAge1xuICAgICAgICByZXR1cm4gbG9jYXRpb24ucHJvdG9jb2wgKyAnLy8nICsgbG9jYXRpb24uaG9zdCArIGxvY2F0aW9uLnBhdGhuYW1lICsgbG9jYXRpb24uc2VhcmNoICsgJyMnICsgdGhpcy5fZ2V0VVJMSGFzaCgpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICogICAgICAgICAgICAgICAgUFVCTElDIEZVTkNUSU9OU1xuICAgICAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICoqL1xuXG4gICAgLyoqXG4gICAgICogIEFjdGl2YXRlIHRoaXMgaW5zdGFuY2Ugb2YgZGl2YSB2aWEgdGhlIGFjdGl2ZSBEaXZhIGNvbnRyb2xsZXIuXG4gICAgICpcbiAgICAgKiAgQHB1YmxpY1xuICAgICAqL1xuICAgIGFjdGl2YXRlICgpXG4gICAge1xuICAgICAgICB0aGlzLnZpZXdlclN0YXRlLmlzQWN0aXZlRGl2YSA9IHRydWU7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ2hhbmdlIHRoZSBvYmplY3QgKG9iamVjdERhdGEpIHBhcmFtZXRlciBjdXJyZW50bHkgYmVpbmcgcmVuZGVyZWQgYnkgRGl2YS5cbiAgICAgKlxuICAgICAqIEBwdWJsaWNcbiAgICAgKiBAcGFyYW1zIHtvYmplY3R9IG9iamVjdERhdGEgLSBBbiBJSUlGIE1hbmlmZXN0IG9iamVjdCBPUiBhIFVSTCB0byBhIElJSUYgbWFuaWZlc3QuXG4gICAgICovXG4gICAgY2hhbmdlT2JqZWN0IChvYmplY3REYXRhKVxuICAgIHtcbiAgICAgICA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gKiBab29tIGluLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm5zIHtib29sZWFufSAtIGZhbHNlIGlmIGl0J3MgYXQgdGhlIG1heGltdW0gem9vbVxuICAgICAqKi9cbiAgICB6b29tSW4gKClcbiAgICB7XG4gICAgICAgIHJldHVybiB0aGlzLnNldFpvb21MZXZlbCh0aGlzLnNldHRpbmdzLnpvb21MZXZlbCArIDEpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFpvb20gb3V0LlxuICAgICAqIEByZXR1cm5zIHtib29sZWFufSAtIGZhbHNlIGlmIGl0J3MgYXQgdGhlIG1pbmltdW0gem9vbVxuICAgICAqKi9cbiAgICB6b29tT3V0ICgpXG4gICAge1xuICAgICAgICByZXR1cm4gdGhpcy5zZXRab29tTGV2ZWwodGhpcy5zZXR0aW5ncy56b29tTGV2ZWwgLSAxKTtcbiAgICB9XG59XG5cbkRpdmEuRXZlbnRzID0gZGl2YS5FdmVudHM7XG5cbmV4cG9ydCBkZWZhdWx0IERpdmE7XG5cbi8qKlxuICogTWFrZSBgRGl2YWAgYXZhaWxhYmxlIGluIHRoZSBnbG9iYWwgY29udGV4dC5cbiAqICovXG5pZiAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAoZnVuY3Rpb24gKGdsb2JhbClcbiAgICB7XG4gICAgICAgIGdsb2JhbC5EaXZhID0gZ2xvYmFsLkRpdmEgfHwgRGl2YTtcbiAgICB9KSh3aW5kb3cpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2V2ZW50cy9ldmVudHMuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2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Fja2VkIG5jJ3MvbGlnYXR1cmUgKGlkZW50aWNhbCB4KSwgb3IgZGVzY2VuZGluZyBuYydzICh5IGRlc2NlbmRzKVxuICAgICAgICAgICAgICAgIGlmIChmaXJzdE5DWCA9PT0gc2Vjb25kTkNYIHx8IGZpcnN0TkNZIDwgc2Vjb25kTkNZKSB7XG4gICAgICAgICAgICAgICAgICBHcm91cGluZy50cmlnZ2VyR3JvdXBpbmcoJ2xpZ2F0dXJlJyk7IFxuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBHcm91cGluZy50cmlnZ2VyR3JvdXBpbmcoJ25jJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIFNlbGVjdE9wdGlvbnMudHJpZ2dlckRlZmF1bHRBY3Rpb25zKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIGlmIChzaGFyZWRTZWNvbmRMZXZlbFBhcmVudChncm91cHMpKSB7XG4gICAgICAgICAgICBHcm91cGluZy50cmlnZ2VyR3JvdXBpbmcoJ25jJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIFNlbGVjdE9wdGlvbnMudHJpZ2dlckRlZmF1bHRBY3Rpb25zKCk7XG4gICAgICAgICAgfVxuICAgICAgfVxuICAgICAgYnJlYWs7XG4gICAgY2FzZSAnc2VsQnlCQm94JzpcbiAgICAgIHN3aXRjaCAoZ3JvdXBzLmxlbmd0aCkge1xuICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgc2VsZWN0QkJveChncm91cHNbMF0sIGRyYWdIYW5kbGVyLCBuZW9uVmlldyk7XG4gICAgICAgICAgU2VsZWN0T3B0aW9ucy50cmlnZ2VyRGVmYXVsdEFjdGlvbnMoKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVm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IGNsYXNzPVwicGFuZWwtY29udGVudC1zdWJzZWN0aW9uIGhpZGRlblwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwiZXh0cmFFZGl0XCI+PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDwhLS1cbiAgICAgICAgICAgICAgICAgICAgKiBUaGUgZXh0cmFFZGl0IHBhbmVsIGlzIGFkZGVkIGZvciBlZGl0IG9wdGlvbnMgdGhhdCBoYXZlIGRyb3Bkb3duIG1lbnVzXG4gICAgICAgICAgICAgICAgICAgICogTGlrZSB0aGUgTmV1bWUgYW5kIENsZWYgbWVudXNcbiAgICAgICAgICAgICAgICAgICAgKiBUaGlzIGlzIGRvbmUgYmVjYXVzZSB0aGUgbW9yZUVkaXQgbWVudSBuZWVkcyB0byBoYXZlIG92ZXJmbG93IGZvciBjYXNlcyB3aGVyZSBpdCBoYXMgbG90cyBvZiBidXR0b25zXG4gICAgICAgICAgICAgICAgICAgICogQnV0IG92ZXJmbG93IHJ1aW5zIGRyb3Bkb3duIG1lbnVzXG4gICAgICAgICAgICAgICAgICAgIC0tPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwYW5lbC1jb250ZW50LXN1YnNlY3Rpb24gaGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJuZXVtZUVkaXRcIj48L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicGFuZWwtY29udGVudC1zdWJzZWN0aW9uXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ1bmRvUmVkb19jb250cm9sc1wiPjwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5gO1xuXG5cbi8qKlxuICogQ29udGVudHMgb2YgZXh0cmEgbmMgYWN0aW9uIG1l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uICAgIDwvZGl2PmA7XG5cblxuLyoqXG4gKiBIVE1MIGZvciBIb3RrZXlzIG1vZGFsIHdpbmRvd1xuICovXG5leHBvcnQgY29uc3QgaG90a2V5c01vZGFsID0gYFxuICAgIDxkaXYgY2xhc3M9XCJuZW9uLW1vZGFsLXdpbmRvdy1jb250ZW50XCIgaWQ9XCJuZW9uLW1vZGFsLXdpbmRvdy1jb250ZW50LWhvdGtleXNcIj5cbiAgICAgICAgPCEtLSBcIkRpc3BsYXlcIiBob3RrZXlzIC0tPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS10aXRsZVwiPkRpc3BsYXk8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+KzwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5ab29tIEluPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+LTwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5ab29tIE91dDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj4wPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlpvb20gUmVzZXQ8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+aDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5IaWRlIEdseXBoPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgPCEtLSBcIkVkaXRcIiBob3RrZXlzIC0tPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LXN1YmNhdGVnb3J5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1zdWJjYXRlZ29yeS10aXRsZVwiPkVkaXQ8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPkN0cmw8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj56PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+b3I8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPuKMmDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPno8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWRlc2NyaXB0aW9uXCI+VW5kbzwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5DdHJsPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+U2hpZnQ8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj4rPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj56PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+b3I8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPuKMmDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPlNoaWZ0PC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+KzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+ejwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5SZWRvPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPnEvdy9lL3IvdC95PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1kZXNjcmlwdGlvblwiPlxuICAgICAgICAgICAgICAgICAgICBIaWdobGlnaHQgYnkgU3RhZmYvU3lsbGFibGUvTmV1bWUvTGF5ZXJFbGVtZW50L1NlbGVjdGlvbi9PZmZcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeS1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5XCI+MS8yLzMvNDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgU2VsZWN0IGJ5IFN5bGxhYmxlL05ldW1lL05ldW1lIENvbXBvbmVudC9TdGFmZlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaG90a2V5LWVudHJ5LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnlcIj5TaGlmdDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pis8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhvdGtleS1lbnRyeVwiPk51bWJlcjwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJob3RrZXktZW50cnktZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgQmVnaW4gSW5zZXJ0IGZvciB0aGUgPGk+bnRoPC9pPiBvcHRpb24gaW4gdGhlIHNlbGVjdGVkIHRhYlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG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AgICAgICAgICAgICAgICAgICBiZWdpbiA9IGNsYW1wKGZyb20sIGxlbmd0aCksXG4gICAgICAgICAgICAgICAgICAgIGVuZCA9IGxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgbnVtLFxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQsXG4gICAgICAgICAgICAgICAgICAgIHRhcmdldEFycmF5LFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2VBcnJheTtcblxuICAgICAgICAgICAgICAgIGlmICh0byAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGVuZCA9IGNsYW1wKHRvLCBsZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChiZWdpbiA+IGVuZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFycmF5QnVmZmVyKDApO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG51bSA9IGVuZCAtIGJlZ2luO1xuICAgICAgICAgICAgICAgIHRhcmdldCA9IG5ldyBBcnJheUJ1ZmZlcihudW0pO1xuICAgICAgICAgICAgICAgIHRhcmdldEFycmF5ID0gbmV3IFVpbnQ4QXJyYXkodGFyZ2V0KTtcblxuICAgICAgICAgICAgICAgIHNvdXJjZUFycmF5ID0gbmV3IFVpbnQ4QXJyYXkodGhpcywgYmVnaW4sIG51bSk7XG4gICAgICAgICAgICAgICAgdGFyZ2V0QXJyYXkuc2V0KHNvdXJjZUFycmF5KTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9KSgpO1xuICAgIH1cblxuICAgIC8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuXG4gICAgLyoqXG4gICAgICogSGVscGVycy5cbiAgICAgKi9cblxuICAgIGZ1bmN0aW9uIHRvVXRmOChzdHIpIHtcbiA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AgIGlmICh2YWwpIHtcbiAgICAgIHJlcyArPSB2YWw7XG4gICAgfSBlbHNlIGlmICh0eXBlb2Ygb2JqICE9PSAnb2JqZWN0Jykge1xuICAgICAgcmVzICs9IHR5cGVvZiBvYmogPT09ICd1bmRlZmluZWQnID8gbnVsbCA6IEpTT04uc3RyaW5naWZ5KG9iaik7XG4gICAgfSBlbHNlIGlmIChvYmogPT09IG51bGwpIHtcbiAgICAgIHJlcyArPSAnbnVsbCc7XG4gICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHtcbiAgICAgIHF1ZXVlLnB1c2goe3ZhbDogJ10nfSk7XG4gICAgICBmb3IgKGkgPSBvYmoubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgYXJyYXlQcmVmaXggPSBpID09PSAwID8gJycgOiAnLCc7XG4gICAgICAgIHF1ZXVlLnB1c2goe29iajogb2JqW2ldLCBwcmVmaXg6IGFycmF5UHJlZml4fSk7XG4gICAgICB9XG4gICAgICBxdWV1ZS5wdXNoKHt2YWw6ICdbJ30pO1xuICAgIH0gZWxzZSB7IC8vIG9iamVjdFxuICAgICAga2V5cyA9IFtdO1xuICAgICAgZm9yIChrIGluIG9iaikge1xuICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAga2V5cy5wdXNoKGspO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBxdWV1ZS5wdXNoKHt2YWw6ICd9J30pO1xuICAgICAgZm9yIChpID0ga2V5cy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICBrZXkgPSBrZXlzW2ldO1xuICAgICAgICB2YWx1ZSA9IG9ialtrZXldO1xuICAgICAgICBvYmpQcmVmaXggPSAoaSA+IDAgPyAnLCcgOiAnJyk7XG4gICAgICAgIG9ialByZWZpeCArPSBKU09OLnN0cmluZ2lmeShrZXkpICsgJzonO1xuICAgICAgICBxdWV1ZS5wdXNoKHtvYmo6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b3AobnVsbCwgc3RhY2ssIG1ldGFTdGFjayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAndCc6XG4gICAgICAgIGkgKz0gMzsgLy8gJ3J1ZSdcbiAgICAgICAgcG9wKHRydWUsIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2YnOlxuICAgICAgICBpICs9IDQ7IC8vICdhbHNlJ1xuICAgICAgICBwb3AoZmFsc2UsIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJzAnOlxuICAgICAgY2FzZSAnMSc6XG4gICAgICBjYXNlICcyJzpcbiAgICAgIGNhc2UgJzMnOlxuICAgICAgY2FzZSAnNCc6XG4gICAgICBjYXNlICc1JzpcbiAgICAgIGNhc2UgJzYnOlxuICAgICAgY2FzZSAnNyc6XG4gICAgICBjYXNlICc4JzpcbiAgICAgIGNhc2UgJzknOlxuICAgICAgY2FzZSAnLSc6XG4gICAgICAgIHBhcnNlZE51bSA9ICcnO1xuICAgICAgICBpLS07XG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgbnVtQ2hhciA9IHN0cltpKytdO1xuICAgICAgICAgIGlmICgvW1xcZFxcLlxcLWVcXCtdLy50ZXN0KG51bUNoYXIpKSB7XG4gICAgICAgICAgICBwYXJzZWROdW0gKz0gbnVtQ2hhcjtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHBvcChwYXJzZUZsb2F0KHBhcnNlZE51bSksIHN0YWNrLCBtZXRhU3RhY2spO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ1wiJzpcbiAgICAgICAgcGFyc2VkU3RyaW5nID0gJyc7XG4gICAgICAgIGxhc3RDaCA9IHZvaWQgMDtcbiAgICAgICAgbnVtQ29uc2VjdXRpdmVTbGFzaGVzID0gMDtcbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICBjaCA9IHN0cltpKytdO1xuICAgICAgICAgIGlmIChjaCAhPT0gJ1wiJyB8fCAobGFzdENoID09PSAnXFxcXCcgJiZcbiAgICAgICAgICAgICAgbnVtQ29uc2VjdXRpdmVTbGFzaGVzICUgMiA9PT0gMSkpIHtcbiAgICAgICAgICAgIHBhcnNlZFN0cmluZyArPSBjaDtcbiAgICAgICAgICAgIGxhc3RDaCA9IGNoO1xuICAgICAgICAgICAgaWYgKGxhc3RDaCA9PT0gJ1xcXFwnKSB7XG4gICAgICAgICAgICAgIG51bUNvbnNlY3V0aXZlU2xhc2hlcysrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbnVtQ29uc2VjdXRpdmVTbGFzaGVzID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHBvcChKU09OLnBhcnNlKCdcIicgKyBwYXJzZWRTdHJpbmcgKyAnXCInKSwgc3RhY2ssIG1ldGFTdGFjayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnWyc6XG4gICAgICAgIGFycmF5RWxlbWVudCA9IHsgZWxlbWVudDogW10sIGluZGV4OiBzdGFjay5sZW5ndGggfTtcbiAgICAgICAgc3RhY2sucHVzaChhcnJheUVsZW1lbnQuZWxlbWVudCk7XG4gICAgICAgIG1ldGFTdGFjay5wdXNoKGFycmF5RWxlbWVudCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAneyc6XG4gICAgICAgIG9iakVsZW1lbnQgPSB7IGVsZW1lbnQ6IHt9LCBpbmRleDogc3RhY2subGVuZ3RoIH07XG4gICAgICAgIHN0YWNrLnB1c2gob2JqRWxlbWVudC5lbGVtZW50KTtcbiAgICAgICAgbWV0YVN0YWNrLn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0Jywgcm90YXRlU3RhcnQpXG4gICAgICAgICAgLm9uKCdkcmFnJywgcm90YXRlRHJhZ0xlZnQpXG4gICAgICAgICAgLm9uKCdlbmQnLCByb3RhdGVFbmQpKTtcblxuICAgICAgZDMuc2VsZWN0KCcjcm90YXRlUmlnaHQnKS5jYWxsKFxuICAgICAgICBkMy5kcmFnKClcbiAgICAgICAgICAub24oJ3N0YXJ0Jywgcm90YXRlU3RhcnQpXG4gICAgICAgICAgLm9uKCdkcmFnJywgcm90YXRlRHJhZ1JpZ2h0KVxuICAgICAgICAgIC5vbignZW5kJywgcm90YXRlRW5kKSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcmVzaXplU3RhcnQgKG5hbWU6IHN0cmluZyk6IHZvaWQge1xuICAgICAgd2hpY2hQb2ludCA9IG5hbWU7XG4gICAgICBjb25zdCBwb2ludCA9IHBvaW50cy5maW5kKHBvaW50ID0+IHBvaW50Lm5hbWUgPT09IFBvaW50TmFtZXNbbmFtZV0pO1xuICAgICAgaW5pdGlhbFBvaW50ID0gW3BvaW50LngsIHBvaW50LnldO1xuICAgICAgaW5pdGlhbFVseSA9IHVseTtcbiAgICAgIGluaXRpYWxMcnkgPSBscnk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcmVzaXplRHJhZyAoKTogdm9pZCB7XG4gICAgICBjb25zdCBjdXJyZW50UG9pbnQgPSBkMy5tb3VzZSh0aGlzKTtcbiAgICAgIHN3aXRjaCAoUG9pbnROYW1lc1t3aGljaFBvaW50XSkge1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuVG9wTGVmdDpcbiAgICAgICAgICB1bHggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgdWx5ID0gY3VycmVudFBvaW50WzFdO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuVG9wOlxuICAgICAgICAgIHVseSA9IGN1cnJlbnRQb2ludFsxXSAtIChscnggLSB1bHgpICogTWF0aC50YW4ocm90YXRlKSAvIDI7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5Ub3BSaWdodDpcbiAgICAgICAgICBscnggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgdWx5ID0gY3VycmVudFBvaW50WzFdIC0gKGxyeCAtIHVseCkgKiBNYXRoLnRhbihyb3RhdGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuUmlnaHQ6XG4gICAgICAgICAgbHJ4ID0gY3VycmVudFBvaW50WzBdO1xuICAgICAgICAgIGxyeSA9IGluaXRpYWxMcnkgKyAoY3VycmVudFBvaW50WzBdIC0gaW5pdGlhbFBvaW50WzBdKSAqIE1hdGgudGFuKHJvdGF0ZSk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5Cb3R0b21SaWdodDpcbiAgICAgICAgICBscnggPSBjdXJyZW50UG9pbnRbMF07XG4gICAgICAgICAgbHJ5ID0gY3VycmVudFBvaW50WzFdO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFBvaW50TmFtZXMuQm90dG9tOlxuICAgICAgICAgIGxyeSA9IGN1cnJlbnRQb2ludFsxXSArIChscnggLSB1bHgpICogTWF0aC50YW4ocm90YXRlKSAvIDI7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5Cb3R0b21MZWZ0OlxuICAgICAgICAgIHVseCA9IGN1cnJlbnRQb2ludFswXTtcbiAgICAgICAgICBscnkgPSBjdXJyZW50UG9pbnRbMV0gKyAobHJ4IC0gdWx4KSAqIE1hdGgudGFuKHJvdGF0ZSk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgUG9pbnROYW1lcy5MZWZ0OlxuICAgICAgICAgIHVseCA9IGN1cnJlbnRQb2ludFswXTtcbiAgICAgICAgICB1bHkgPSBpbml0aWFsVWx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B7XG4gICAgICAgICAgICAgIGV4aXN0aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghZXhpc3RpbmcpIHtcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKHtvazogZG9jfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlc3VsdC5wdXNoKHttaXNzaW5nOiBsZWFmfSk7XG4gICAgICAgIH1cbiAgICAgICAgY291bnQtLTtcbiAgICAgICAgaWYgKCFjb3VudCkge1xuICAgICAgICAgIGNiKG51bGwsIHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG5cbiAgaWYgKG9wdHMub3Blbl9yZXZzKSB7XG4gICAgaWYgKG9wdHMub3Blbl9yZXZzID09PSBcImFsbFwiKSB7XG4gICAgICB0aGlzLl9nZXRSZXZpc2lvblRyZWUoaWQsIGZ1bmN0aW9uIChlcnIsIHJldl90cmVlKSB7XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIGNiKGVycik7XG4gICAgICAgIH1cbiAgICAgICAgbGVhdmVzID0gY29sbGVjdExlYXZlcyhyZXZfdHJlZSkubWFwKGZ1bmN0aW9uIChsZWFmKSB7XG4gICAgICAgICAgcmV0dXJuIGxlYWYucmV2O1xuICAgICAgICB9KTtcbiAgICAgICAgZmluaXNoT3BlblJldnMoKTtcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRzLm9wZW5fcmV2cykpIHtcbiAgICAgICAgbGVhdmVzID0gb3B0cy5vcGVuX3JldnM7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVhdmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIC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IHZhciBpbmRleE9mUmV2ID0gcGF0aC5pZHMubWFwKGZ1bmN0aW9uICh4KSB7IHJldHVybiB4LmlkOyB9KVxuICAgICAgICAuaW5kZXhPZihkb2MuX3Jldi5zcGxpdCgnLScpWzFdKSArIDE7XG4gICAgICB2YXIgaG93TWFueSA9IHBhdGguaWRzLmxlbmd0aCAtIGluZGV4T2ZSZXY7XG4gICAgICBwYXRoLmlkcy5zcGxpY2UoaW5kZXhPZlJldiwgaG93TWFueSk7XG4gICAgICBwYXRoLmlkcy5yZXZlcnNlKCk7XG5cbiAgICAgIGlmIChvcHRzLnJldnMpIHtcbiAgICAgICAgZG9jLl9yZXZpc2lvbnMgPSB7XG4gICAgICAgICAgc3RhcnQ6IChwYXRoLnBvcyArIHBhdGguaWRzLmxlbmd0aCkgLSAxLFxuICAgICAgICAgIGlkczogcGF0aC5pZHMubWFwKGZ1bmN0aW9uIChyZXYpIHtcbiAgICAgICAgICAgIHJldHVybiByZXYuaWQ7XG4gICAgICAgICAgfSlcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICAgIGlmIChvcHRzLnJldnNfaW5mbykge1xuICAgICAgICB2YXIgcG9zID0gIHBhdGgucG9zICsgcGF0aC5pZHMubGVuZ3RoO1xuICAgICAgICBkb2MuX3JldnNfaW5mbyA9IHBhdGguaWRzLm1hcChmdW5jdGlvbiAocmV2KSB7XG4gICAgICAgICAgcG9zLS07XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJldjogcG9zICsgJy0nICsgcmV2LmlkLFxuICAgICAgICAgICAgc3RhdHVzOiByZXYub3B0cy5zdGF0dXNcbiAgICAgICAgICB9O1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAob3B0cy5hdHRhY2htZW50cyAmJiBkb2MuX2F0dGFjaG1lbnRzKSB7XG4gICAgICB2YXIgYXR0YWNobWVudHMgPSBkb2MuX2F0dGFjaG1lbnRzO1xuICAgICAgdmFyIGNvdW50ID0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ICdudW1iZXInOlxuICAgICAgaWYgKGtleSA9PT0gSW5maW5pdHkgfHwga2V5ID09PSAtSW5maW5pdHkgfHwgaXNOYU4oa2V5KSkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBrZXk7XG4gICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgIHZhciBvcmlnS2V5ID0ga2V5O1xuICAgICAgaWYgKEFycmF5LmlzQXJyYXkoa2V5KSkge1xuICAgICAgICB2YXIgbGVuID0ga2V5Lmxlbmd0aDtcbiAgICAgICAga2V5ID0gbmV3IEFycmF5KGxlbik7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICBrZXlbaV0gPSBub3JtYWxpemVLZXkob3JpZ0tleVtpXSk7XG4gICAgICAgIH1cbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICB9IGVsc2UgaWYgKGtleSBpbnN0YW5jZW9mIERhdGUpIHtcbiAgICAgICAgcmV0dXJuIGtleS50b0pTT04oKTtcbiAgICAgIH0gZWxzZSBpZiAoa2V5ICE9PSBudWxsKSB7IC8vIGdlbmVyaWMgb2JqZWN0XG4gICAgICAgIGtleSA9IHt9O1xuICAgICAgICBmb3IgKHZhciBrIGluIG9yaWdLZXkpIHtcbiAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9yaWdLZXksIGspKSB7XG4gICAgICAgICAgICB2YXIgdmFsID0gb3JpZ0tleVtrXTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBrZXlba10gPSBub3JtYWxpemVLZXkodmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgfVxuICByZXR1cm4ga2V5O1xufVxuXG5mdW5jdGlv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B7XG4gICAgICBjYXNlICcxJzpcbiAgICAgICAgc3RhY2sucHVzaChudWxsKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICcyJzpcbiAgICAgICAgc3RhY2sucHVzaChzdHJbaV0gPT09ICcxJyk7XG4gICAgICAgIGkrKztcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICczJzpcbiAgICAgICAgdmFyIHBhcnNlZE51bSA9IHBhcnNlTnVtYmVyKHN0ciwgaSk7XG4gICAgICAgIHN0YWNrLnB1c2gocGFyc2VkTnVtLm51bSk7XG4gICAgICAgIGkgKz0gcGFyc2VkTnVtLmxlbmd0aDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICc0JzpcbiAgICAgICAgdmFyIHBhcnNlZFN0ciA9ICcnO1xuICAgICAgICAvKmVzbGludCBuby1jb25zdGFudC1jb25kaXRpb246IFtcImVycm9yXCIsIHsgXCJjaGVja0xvb3BzXCI6IGZhbHNlIH1dKi9cbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICB2YXIgY2ggPSBzdHJbaV07XG4gICAgICAgICAgaWYgKGNoID09PSAnXFx1MDAwMCcpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwYXJzZWRTdHIgKz0gY2g7XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG4gICAgICAgIC8vIHBlcmZvcm0gdGhlIHJldmVyc2Ugb2YgdGhlIG9yZGVyLXByZXNlcnZpbmcgcmVwbGFjZW1lbnRcbiAgICAgICAgLy8gYWxnb3JpdGhtIChzZWUgYWJvdmUpXG4gICAgICAgIC8qIGVzbGludC1kaXNhYmxlIG5vLWNvbnRyb2wtcmVnZXggKi9cbiAgICAgICAgcGFyc2VkU3RyID0gcGFyc2VkU3RyLnJlcGxhY2UoL1xcdTAwMDFcXHUwMDAxL2csICdcXHUwMDAwJylcbiAgICAgICAgICAucmVwbGFjZSgvXFx1MDAwMVxcdTA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vLyBuZWVkcyB0byBiZSByZWFkIG91dHNpZGUgb2YgdGhlIHRyYW5zYWN0aW9uIGNvbnRleHRcbmZ1bmN0aW9uIHBvc3RQcm9jZXNzQXR0YWNobWVudHMocmVzdWx0cywgYXNCbG9iKSB7XG4gIHJldHVybiBQcm9taXNlLmFsbChyZXN1bHRzLm1hcChmdW5jdGlvbiAocm93KSB7XG4gICAgaWYgKHJvdy5kb2MgJiYgcm93LmRvYy5fYXR0YWNobWVudHMpIHtcbiAgICAgIHZhciBhdHROYW1lcyA9IE9iamVjdC5rZXlzKHJvdy5kb2MuX2F0dGFjaG1lbnRzKTtcbiAgICAgIHJldHVybiBQcm9taXNlLmFsbChhdHROYW1lcy5tYXAoZnVuY3Rpb24gKGF0dCkge1xuICAgICAgICB2YXIgYXR0T2JqID0gcm93LmRvYy5fYXR0YWNobWVudHNbYXR0XTtcbiAgICAgICAgaWYgKCEoJ2JvZHknIGluIGF0dE9iaikpIHsgLy8gYWxyZWFkeSBwcm9jZXNzZWRcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGJvZHkgPSBhdHRPYmouYm9keTtcbiAgICAgICAgdmFyIHR5cGUgPSBhdHRPYmouY29udGVudF90eXBlO1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUpIHtcbiAgICAgICAgICByZWFkQmxvYkRhdGEoYm9keSwgdHlwZSwgYXNCbG9iLCBmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICAgICAgcm93LmRvYy5fYXR0YWNobWVudHNbYXR0XSA9ICRpbmplY3RfT2JqZWN0X2Fzc2lnbihcbiAgICAgICAgICAgICAgcGljayhhdHRPYmosIFsnZGlnZXN0JywgJ2NvbnRlbnRfdHlwZSddKSxcbiAgICAgICAgICAgICAge2RhdGE6IGRhdGF9XG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgIH0pO1xuICAgICAg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C8vIHJlbW92ZSBhbGwgc2VxIGVudHJpZXNcbiAgICAgICAgICAvLyBhc3NvY2lhdGVkIHdpdGggdGhpcyBkb2NJZFxuICAgICAgICAgIHZhciBzdGFydCA9IGRvY0lkICsgXCI6OlwiO1xuICAgICAgICAgIHZhciBlbmQgPSBkb2NJZCArIFwiOjp+XCI7XG4gICAgICAgICAgdmFyIGluZGV4ID0gc2VxU3RvcmUuaW5kZXgoJ19kb2NfaWRfcmV2Jyk7XG4gICAgICAgICAgdmFyIHJhbmdlID0gSURCS2V5UmFuZ2UuYm91bmQoc3RhcnQsIGVuZCwgZmFsc2UsIGZhbHNlKTtcbiAgICAgICAgICB2YXIgc2VxQ3Vyc29yID0gaW5kZXgub3BlbkN1cnNvcihyYW5nZSk7XG4gICAgICAgICAgc2VxQ3Vyc29yLm9uc3VjY2VzcyA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICBzZXFDdXJzb3IgPSBlLnRhcmdldC5yZXN1bHQ7XG4gICAgICAgICAgICBpZiAoIXNlcUN1cnNvcikge1xuICAgICAgICAgICAgICAvLyBkb25lXG4gICAgICAgICAgICAgIGRvY1N0b3JlLmRlbGV0ZShjdXJzb3IucHJpbWFyeUtleSk7XG4gICAgICAgICAgICAgIGN1cnNvci5jb250aW51ZSgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdmFyIGRhdGEgPSBzZXFDdXJzb3IudmFsdWU7XG4gICAgICAgICAgICAgIGlmIChkYXRhLl9kb2NfaWRfcmV2ID09PSBkb2NJZFJldikge1xuICAgICAgICAgICAgICAgIGxvY2FsU3RvcmUucHV0KGRhdGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHNlcVN0b3JlLmRlbGV0ZShzZXFDdXJzb3IucHJpbWFyeUtleSk7XG4gICAgICAgICAgICAgIHNlcUN1cnNvci5jb250aW51ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH0gZ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50SWQoZmlsZW5hbWUpICtcbiAgICAgICAgICAgICc/cmV2PScgKyBkb2MuX3JldjtcbiAgICAgICAgcmV0dXJuIG91ckZldGNoKGdlbkRCVXJsKGhvc3QsIHBhdGgpKS50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgIGlmICgnYnVmZmVyJyBpbiByZXNwb25zZSkge1xuICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmJ1ZmZlcigpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmJsb2IoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKGJsb2IpIHtcbiAgICAgICAgICBpZiAob3B0cy5iaW5hcnkpIHtcbiAgICAgICAgICAgIHZhciB0eXBlRmllbGREZXNjcmlwdG9yID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihibG9iLl9fcHJvdG9fXywgJ3R5cGUnKTtcbiAgICAgICAgICAgIGlmICghdHlwZUZpZWxkRGVzY3JpcHRvciB8fCB0eXBlRmllbGREZXNjcmlwdG9yLnNldCkge1xuICAgICAgICAgICAgICBibG9iLnR5cGUgPSBhdHQuY29udGVudF90eXBlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGJsb2I7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgYmxvYlRvQmFzZTY0KGJsb2IsIHJlc29sdmUpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgZGVsZXRlIGF0dC5zdHViO1xuICAgICAgICAgIGRlbGV0ZSBhdHQubGVuZ3RoO1xuICAgICAgICAgIGF0dC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SgncmVtb3ZlQXR0YWNobWVudCcsIGZ1bmN0aW9uIChkb2NJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50SWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKSB7XG4gICAgdmFyIHVybCA9IGdlbkRCVXJsKGhvc3QsIGVuY29kZURvY0lkKGRvY0lkKSArICcvJyArXG4gICAgICAgICAgICAgICAgICAgICAgIGVuY29kZUF0dGFjaG1lbnRJZChhdHRhY2htZW50SWQpKSArICc/cmV2PScgKyByZXY7XG4gICAgZmV0Y2hKU09OKHVybCwge21ldGhvZDogJ0RFTEVURSd9LCBjYWxsYmFjaykuY2F0Y2goY2FsbGJhY2spO1xuICB9KTtcblxuICAvLyBBZGQgdGhlIGF0dGFjaG1lbnQgZ2l2ZW4gYnkgYmxvYiBhbmQgaXRzIGNvbnRlbnRUeXBlIHByb3BlcnR5XG4gIC8vIHRvIHRoZSBkb2N1bWVudCB3aXRoIHRoZSBnaXZlbiBpZCwgdGhlIHJldmlzaW9uIGdpdmVuIGJ5IHJldiwgYW5kXG4gIC8vIGFkZCBpdCB0byB0aGUgZGF0YWJhc2UgZ2l2ZW4gYnkgaG9zdC5cbiAgYXBpLnB1dEF0dGFjaG1lbnQgPSBhZGFwdGVyRnVuJCQxKCdwdXRBdHRhY2htZW50JywgZnVuY3Rpb24gKGRvY0lkLCBhdHRhY2htZW50SWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXYsIGJsb2IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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HMubGFzdF9zZXEgPT09ICdzdHJpbmcnIHx8IHR5cGVvZiByZXN1bHRzLmxhc3Rfc2VxID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIGxhc3RTZXEgPSByZXN1bHRzLmxhc3Rfc2VxO1xuICAgICAgICB9XG4gICAgICAgIC8vIEZvciBlYWNoIGNoYW5nZVxuICAgICAgICB2YXIgcmVxID0ge307XG4gICAgICAgIHJlcS5xdWVyeSA9IG9wdHMucXVlcnlfcGFyYW1zO1xuICAgICAgICByZXMucmVzdWx0cyA9IHJlcy5yZXN1bHRzLmZpbHRlcihmdW5jdGlvbiAoYykge1xuICAgICAgICAgIGxlZnRUb0ZldGNoLS07XG4gICAgICAgICAgdmFyIHJldCA9IGZpbHRlckNoYW5nZShvcHRzKShjKTtcbiAgICAgICAgICBpZiAocmV0KSB7XG4gICAgICAgICAgICBpZiAob3B0cy5pbmNsdWRlX2RvY3MgJiYgb3B0cy5hdHRhY2htZW50cyAmJiBvcHRzLmJpbmFyeSkge1xuICAgICAgICAgICAgICByZWFkQXR0YWNobWVudHNBc0Jsb2JPckJ1ZmZlcihjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChvcHRzLnJldHVybl9kb2NzKSB7XG4gICAgICAgICAgICAgIHJlc3VsdHMucmVzdWx0cy5wdXNoKGMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgb3B0cy5vbkNoYW5nZShjLCBwZW5kaW5nLCBsYXN0U2VxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2UgaWYgKGVycikge1xuICAgICAgICAvLyBJbiBjYXNlIG9mIGFuIGVycm9yLCBzdG9wIGxpc3RlbmluZyBmb3IgY2hhbmdlcyBhbmQgY2FsbFxuICAgICAgICAvLyBvcHRzLmNvbXBsZXRlXG4gICAgICAgIG9wdHMuYWJvcnRlZCA9IHRydWU7XG4gICAgICAgIG9wdHMuY29tcG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XBwbGljYXRpb24vanNvbid9KSxcbiAgICAgICAgbWV0aG9kOiBtZXRob2QsXG4gICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KGJvZHkpXG4gICAgICB9KS50aGVuKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICBvayA9IHJlc3BvbnNlLm9rO1xuICAgICAgICBzdGF0dXMgPSByZXNwb25zZS5zdGF0dXM7XG4gICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7XG4gICAgICB9KS50aGVuKGZ1bmN0aW9uIChyZXN1bHQpIHtcbiAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgIHJlc3VsdC5zdGF0dXMgPSBzdGF0dXM7XG4gICAgICAgICAgdGhyb3cgZ2VuZXJhdGVFcnJvckZyb21SZXNwb25zZShyZXN1bHQpO1xuICAgICAgICB9XG4gICAgICAgIC8vIGZhaWwgdGhlIGVudGlyZSByZXF1ZXN0IGlmIHRoZSByZXN1bHQgY29udGFpbnMgYW4gZXJyb3JcbiAgICAgICAgcmVzdWx0LnJvd3MuZm9yRWFjaChmdW5jdGlvbiAocm93KSB7XG4gICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgaWYgKHJvdy52YWx1ZSAmJiByb3cudmFsdWUuZXJyb3IgJiYgcm93LnZhbHVlLmVycm9yID09PSBcImJ1aWx0aW5fcmVkdWNlX2Vycm9yXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihyb3cucmVhc29uKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfSkudGhlbihwb3N0cHJvY2Vzc0F0dGFjaG1lbnRzKG9wdHMpKTtcbiAgICB9XG5cbiAgICAvLyBXZSBhcmUgdXNpbmcgYSB0ZW1wb3JhcnkgdmlldywgdGVycmlibGUgZm9yIHBlcmZvcm1hbmNlLCBnb29kIGZvciB0ZXN0aW5nXG4gICAgYm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QpKTtcblxuICAgICAgICByZXR1cm4gdmlldy5zb3VyY2VEQi5hbGxEb2NzKHtcbiAgICAgICAgICBrZXlzOiBkb2NJZHMsXG4gICAgICAgICAgaW5jbHVkZV9kb2NzOiB0cnVlLFxuICAgICAgICAgIGNvbmZsaWN0czogb3B0cy5jb25mbGljdHMsXG4gICAgICAgICAgYXR0YWNobWVudHM6IG9wdHMuYXR0YWNobWVudHMsXG4gICAgICAgICAgYmluYXJ5OiBvcHRzLmJpbmFyeVxuICAgICAgICB9KS50aGVuKGZ1bmN0aW9uIChhbGxEb2NzUmVzKSB7XG4gICAgICAgICAgdmFyIGRvY0lkc1RvRG9jcyA9IG5ldyBFeHBvcnRlZE1hcCgpO1xuICAgICAgICAgIGFsbERvY3NSZXMucm93cy5mb3JFYWNoKGZ1bmN0aW9uIChyb3cpIHtcbiAgICAgICAgICAgIGRvY0lkc1RvRG9jcy5zZXQocm93LmlkLCByb3cuZG9jKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByb3dzLmZvckVhY2goZnVuY3Rpb24gKHJvdykge1xuICAgICAgICAgICAgdmFyIGRvY0lkID0gcm93VG9Eb2NJZChyb3cpO1xuICAgICAgICAgICAgdmFyIGRvYyA9IGRvY0lkc1RvRG9jcy5nZXQoZG9jSWQpO1xuICAgICAgICAgICAgaWYgKGRvYykge1xuICAgICAgICAgICAgICByb3cuZG9jID0gZG9jO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBmaW5hbFJlc3VsdHM7XG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGZpbmFsUmVzdWx0cztcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIG9wdHMua2V5cyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgIHZhciBrZXlzID0gb3B0cy5rZXlzO1xuICAgICAgdmFyIGZldGNoUHJvbWlzZXMgPSBrZXlzLm1hc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I4MzY5NlwifVxuICAgICAgICAgICAgb2sgPSBmYWxzZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIXJlbW90ZURvYyB8fCAhcmVtb3RlRG9jLl9hdHRhY2htZW50cykge1xuICAgICAgICAgICAgcmV0dXJuIHJlbW90ZURvYztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZ2V0RG9jQXR0YWNobWVudHNGcm9tVGFyZ2V0T3JTb3VyY2UodGFyZ2V0LCBzcmMsIHJlbW90ZURvYylcbiAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoYXR0YWNobWVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmaWxlbmFtZXMgPSBPYmplY3Qua2V5cyhyZW1vdGVEb2MuX2F0dGFjaG1lbnRzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dGFjaG1lbnRzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5mb3JFYWNoKGZ1bmN0aW9uIChhdHRhY2htZW50LCBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGF0dCA9IHJlbW90ZURvYy5fYXR0YWNobWVudHNbZmlsZW5hbWVzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgYXR0LnN0dWI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGF0dC5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0LmRhdGEgPSBhdHRhY2htZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVtb3RlRG9jO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pKTtc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NpemUsXG4gICAgICAgICAgc3R5bGU6IHN0eWxlLFxuICAgICAgICAgIGRvY19pZHM6IGRvY19pZHMsXG4gICAgICAgICAgc2VsZWN0b3I6IHNlbGVjdG9yLFxuICAgICAgICAgIHJldHVybl9kb2NzOiB0cnVlIC8vIHJlcXVpcmVkIHNvIHdlIGtub3cgd2hlbiB3ZSdyZSBkb25lXG4gICAgICAgIH07XG4gICAgICAgIGlmIChvcHRzLmZpbHRlcikge1xuICAgICAgICAgIGlmICh0eXBlb2Ygb3B0cy5maWx0ZXIgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAvLyByZXF1aXJlZCBmb3IgdGhlIGNsaWVudC1zaWRlIGZpbHRlciBpbiBvbkNoYW5nZVxuICAgICAgICAgICAgY2hhbmdlc09wdHMuaW5jbHVkZV9kb2NzID0gdHJ1ZTtcbiAgICAgICAgICB9IGVsc2UgeyAvLyBkZG9jIGZpbHRlclxuICAgICAgICAgICAgY2hhbmdlc09wdHMuZmlsdGVyID0gb3B0cy5maWx0ZXI7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICgnaGVhcnRiZWF0JyBpbiBvcHRzKSB7XG4gICAgICAgICAgY2hhbmdlc09wdHMuaGVhcnRiZWF0ID0gb3B0cy5oZWFydGJlYXQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCd0aW1lb3V0JyBpbiBvcHRzKSB7XG4gICAgICAgICAgY2hhbmdlc09wdHMudGltZW91dCA9IG9wdHMudGltZW91dDtcbiAgICAgICAgfVxuICAgICAgICBpZiAob3B0cy5xdWVyeV9wYXJhbXMpIHtcbiAgICAgICAgICBjaGFuZ2VzT3B0cy5xdWVyeV9wYXJhbXMgPSBvcHRzLnF1ZXJ5X3BhcmFtcztcbiAgICAgICAgfVxuICAgICAgICBpZiAob3B0cy52aWV3KSB7XG4gICAgICAgICAgY2hhbmdlc09wdHMudmlldyA9IG9wdHMudmlldztcbiAgICAgICAgfVxuICAgICAgICBnZXRD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ZShvdGhJbmRleCAmJiBhcnJheSlcbiAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgIH1cbiAgICAgIGFycmF5ID0gYXJyYXlzWzBdO1xuXG4gICAgICB2YXIgaW5kZXggPSAtMSxcbiAgICAgICAgICBzZWVuID0gY2FjaGVzWzBdO1xuXG4gICAgICBvdXRlcjpcbiAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoICYmIHJlc3VsdC5sZW5ndGggPCBtYXhMZW5ndGgpIHtcbiAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdLFxuICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlO1xuXG4gICAgICAgIHZhbHVlID0gKGNvbXBhcmF0b3IgfHwgdmFsdWUgIT09IDApID8gdmFsdWUgOiAwO1xuICAgICAgICBpZiAoIShzZWVuXG4gICAgICAgICAgICAgID8gY2FjaGVIYXMoc2VlbiwgY29tcHV0ZWQpXG4gICAgICAgICAgICAgIDogaW5jbHVkZXMocmVzdWx0LCBjb21wdXRlZCwgY29tcGFyYXRvcilcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICBvdGhJbmRleCA9IG90aExlbmd0aDtcbiAgICAgICAgICB3aGlsZSAoLS1vdGhJbmRleCkge1xuICAgICAgICAgICAgdmFyIGNhY2hlID0gY2FjaGVzW290aEluZGV4XTtcbiAgICAgICAgICAgIGlmICghKGNhY2hlXG4gICAgICAgICAgICAgICAgICA/IGNhY2hlSGFzKGNhY2hlLCBjb21wdXRlZClcbiAgICAgICAgICAgICAgICAgIDogaW5jbHVkZXMoYXJyYXlzW290aEluZGV4XSwgY29tcHV0ZWQsIGNvbXBhcmF0b3IpKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNlZW4pIHtc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VRhZyA9IG9ialRhZyA9PSBvdGhUYWc7XG5cbiAgICAgIGlmIChpc1NhbWVUYWcgJiYgaXNCdWZmZXIob2JqZWN0KSkge1xuICAgICAgICBpZiAoIWlzQnVmZmVyKG90aGVyKSkge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBvYmpJc0FyciA9IHRydWU7XG4gICAgICAgIG9iaklzT2JqID0gZmFsc2U7XG4gICAgICB9XG4gICAgICBpZiAoaXNTYW1lVGFnICYmICFvYmpJc09iaikge1xuICAgICAgICBzdGFjayB8fCAoc3RhY2sgPSBuZXcgU3RhY2spO1xuICAgICAgICByZXR1cm4gKG9iaklzQXJyIHx8IGlzVHlwZWRBcnJheShvYmplY3QpKVxuICAgICAgICAgID8gZXF1YWxBcnJheXMob2JqZWN0LCBvdGhlciwgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjaylcbiAgICAgICAgICA6IGVxdWFsQnlUYWcob2JqZWN0LCBvdGhlciwgb2JqVGFnLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKTtcbiAgICAgIH1cbiAgICAgIGlmICghKGJpdG1hc2sgJiBDT01QQVJFX1BBUlRJQUxfRkxBRykpIHtcbiAgICAgICAgdmFyIG9iaklzV3JhcHBlZCA9IG9iaklzT2JqICYmIGhhc093blByb3BlcnR5LmNhbGwob2JqZWN0LCAnX193cmFwcGVkX18nKSxcbiAgICAgICAgICAgIG90aElzV3JhcHBlZCA9IG90aElzT2JqICYmIGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsICdfX3dyYXBwZWRfXycpO1xuXG4gICAgICAgIGlmIChvYmpJc1dyYXBwZWQgfHwgb3RoSXNXcmFwcGVkKSB7XG4gICAgICAgICAgdmFyIG9ialVud3JhcHBlZCA9IG9iaklzV3JhcHBlZCA/IG9iamVjdC52YWx1ZSgpIDogb2JqZWN0LFxuICAgICAgICAgICAgICBvdGhVbnd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AgICAgOiAhKGRhdGFbMF0gaW4gb2JqZWN0KVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTtcbiAgICAgICAgdmFyIGtleSA9IGRhdGFbMF0sXG4gICAgICAgICAgICBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLFxuICAgICAgICAgICAgc3JjVmFsdWUgPSBkYXRhWzFdO1xuXG4gICAgICAgIGlmIChub0N1c3RvbWl6ZXIgJiYgZGF0YVsyXSkge1xuICAgICAgICAgIGlmIChvYmpWYWx1ZSA9PT0gdW5kZWZpbmVkICYmICEoa2V5IGluIG9iamVjdCkpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHN0YWNrID0gbmV3IFN0YWNrO1xuICAgICAgICAgIGlmIChjdXN0b21pemVyKSB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gY3VzdG9taXplcihvYmpWYWx1ZSwgc3JjVmFsdWUsIGtleSwgb2JqZWN0LCBzb3VyY2UsIHN0YWNrKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCEocmVzdWx0ID09PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICA/IGJhc2VJc0VxdWFsKHNyY1ZhbHVlLCBvYmpWYWx1ZSwgQ09NUEFSRV9QQVJUSUFMX0ZMQUcgfCBDT01QQVJFX1VOT1JERVJFRF9GTEFHLCBjdXN0b21pemVyLCBzdGFjaylcbiAgICAgICAgICAgICAgICA6IHJlc3VsdFxuICAgICAgICAgICAgICApKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gd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X0gaW5kZXhlcyBUaGUgaW5kZXhlcyBvZiBlbGVtZW50cyB0byByZW1vdmUuXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBhcnJheWAuXG4gICAgICovXG4gICAgZnVuY3Rpb24gYmFzZVB1bGxBdChhcnJheSwgaW5kZXhlcykge1xuICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID8gaW5kZXhlcy5sZW5ndGggOiAwLFxuICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHdoaWxlIChsZW5ndGgtLSkge1xuICAgICAgICB2YXIgaW5kZXggPSBpbmRleGVzW2xlbmd0aF07XG4gICAgICAgIGlmIChsZW5ndGggPT0gbGFzdEluZGV4IHx8IGluZGV4ICE9PSBwcmV2aW91cykge1xuICAgICAgICAgIHZhciBwcmV2aW91cyA9IGluZGV4O1xuICAgICAgICAgIGlmIChpc0luZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgc3BsaWNlLmNhbGwoYXJyYXksIGluZGV4LCAxKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYmFzZVVuc2V0KGFycmF5LCBpbmRleCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gYXJyYXk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ucmFuZG9tYCB3aXRob3V0IHN1cHBvcnQgZm9yIHJldHVybmluZ1xuICAgICAqIGZsb2F0aW5nLXBvaW50IG51bWJlcnMuXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSBsb3dlciBUaGUgbG93ZXIgYm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IHVwcGVyIFRoZSB1cHBlciBib3VuZC5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByY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lnaHRJbmRleF07XG4gICAgICB9XG4gICAgICB3aGlsZSAoKytob2xkZXJzSW5kZXggPCBob2xkZXJzTGVuZ3RoKSB7XG4gICAgICAgIGlmIChpc1VuY3VycmllZCB8fCBhcmdzSW5kZXggPCBhcmdzTGVuZ3RoKSB7XG4gICAgICAgICAgcmVzdWx0W29mZnNldCArIGhvbGRlcnNbaG9sZGVyc0luZGV4XV0gPSBhcmdzW2FyZ3NJbmRleCsrXTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDb3BpZXMgdGhlIHZhbHVlcyBvZiBgc291cmNlYCB0byBgYXJyYXlgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge0FycmF5fSBzb3VyY2UgVGhlIGFycmF5IHRvIGNvcHkgdmFsdWVzIGZyb20uXG4gICAgICogQHBhcmFtIHtBcnJheX0gW2FycmF5PVtdXSBUaGUgYXJyYXkgdG8gY29weSB2YWx1ZXMgdG8uXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBhcnJheWAuXG4gICAgICovXG4gICAgZnVuY3Rpb24gY29weUFycmF5KHNvdXJjZSwgYXJyYXkpIHtcbiAgICAgIHZhciBpbmRleCA9IC0xLFxuICAgICAgICAgIGxlbmd0aCA9IHNvdXJjZS5sZW5ndGg7XG5cbiAgICAgIGFycmF5IHx8IChhcnJheSA9IEFycmF5KGxlbmd0aCkpO1xuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgYXJyYXlbaW5kZXhdID0gc291cmNlW2luZGV4XTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBhcnJheTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDb3BpZXMgcHJvcGVydGllcyBvZiBgc291cmNlYCB0byBgb2JqZWN0YC5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICA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25lbnRpYWwgbm90YXRpb24gdG8gYXZvaWQgZmxvYXRpbmctcG9pbnQgaXNzdWVzLlxuICAgICAgICAgIC8vIFNlZSBbTUROXShodHRwczovL21kbi5pby9yb3VuZCNFeGFtcGxlcykgZm9yIG1vcmUgZGV0YWlscy5cbiAgICAgICAgICB2YXIgcGFpciA9ICh0b1N0cmluZyhudW1iZXIpICsgJ2UnKS5zcGxpdCgnZScpLFxuICAgICAgICAgICAgICB2YWx1ZSA9IGZ1bmMocGFpclswXSArICdlJyArICgrcGFpclsxXSArIHByZWNpc2lvbikpO1xuXG4gICAgICAgICAgcGFpciA9ICh0b1N0cmluZyh2YWx1ZSkgKyAnZScpLnNwbGl0KCdlJyk7XG4gICAgICAgICAgcmV0dXJuICsocGFpclswXSArICdlJyArICgrcGFpclsxXSAtIHByZWNpc2lvbikpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jKG51bWJlcik7XG4gICAgICB9O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBzZXQgb2JqZWN0IG9mIGB2YWx1ZXNgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge0FycmF5fSB2YWx1ZXMgVGhlIHZhbHVlcyB0byBhZGQgdG8gdGhlIHNldC5cbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgc2V0LlxuICAgICAqL1xuICAgIHZhciBjcmVhdGVTZXQgPSAhKFNldCAmJiAoMSAvIHNldFRvQXJyYXkobmV3IFNldChbLC0wXSkpWzFdKSA9PSBJTkZJTklUWSkgPyBub29wIDogZnVuY3Rpb24odmFsdWVzKSB7XG4gICAgICByZXR1cm4gbmV3IFNldCh2YWx1ZXMpO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGVzIGEgYF8udG9QYWlyc2Agb3IgYF8udG9QYWlyc0luYCBmdW5jdGlvbi5cbiAgICAgKlxuICAgICAqIEB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dGhlcik7XG4gICAgICBzdGFjay5zZXQob3RoZXIsIGFycmF5KTtcblxuICAgICAgLy8gSWdub3JlIG5vbi1pbmRleCBwcm9wZXJ0aWVzLlxuICAgICAgd2hpbGUgKCsraW5kZXggPCBhcnJMZW5ndGgpIHtcbiAgICAgICAgdmFyIGFyclZhbHVlID0gYXJyYXlbaW5kZXhdLFxuICAgICAgICAgICAgb3RoVmFsdWUgPSBvdGhlcltpbmRleF07XG5cbiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICB2YXIgY29tcGFyZWQgPSBpc1BhcnRpYWxcbiAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgYXJyVmFsdWUsIGluZGV4LCBvdGhlciwgYXJyYXksIHN0YWNrKVxuICAgICAgICAgICAgOiBjdXN0b21pemVyKGFyclZhbHVlLCBvdGhWYWx1ZSwgaW5kZXgsIGFycmF5LCBvdGhlciwgc3RhY2spO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb21wYXJlZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgaWYgKGNvbXBhcmVkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgaWYgKHNlZW4pIHtcbiAgICAgICAgICBpZiAoIWFycmF5U29tZShvdGhlciwgZnVuY3Rpb24ob3RoVmFsdWUsIG90aEluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFjYWNoZUhhcyhzZWVuLCBvdGhJbmRleCkgJiZcbiAgICAgICAgICAgICAgICAgICAgKGFyclZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gc2Vlbi5wdXNoKG90aEluZGV4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pKSB7XG4gICAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICghKFxuICAgICAgICAgICAgICBhcnJWYWx1ZSA9PT0gb3RoVmFsdWUgfHxcbiAgICAgICAgICAgICAgICBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaylcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgc3RhY2tbJ2RlbGV0ZSddKGFycmF5KTtcbiAgICAgIHN0YWNrWydkZWxldGUnXShvdGhlcik7XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEEgc3BlY2lhbGl6ZWQgdmVyc2lvbiBvZiBgYmFzZUlzRXF1YWxEZWVwYCBmb3IgY29tcGFyaW5nIG9iamVjdHMgb2ZcbiAgICAgKiB0aGUgc2FtZSBgdG9TdHJpbmdUYWdgLlxuICAgICAqXG4gICAgICogKipOb3RlOioqIFRoaXMgZnVuY3Rpb24gb25seSBzdXBwb3J0cyBjb21wYXJpbmcgdmFsdWVzIHdpdGggdGFncyBvZlxuICAgICAqIGBCb29sZWFuYCwgYERhdGVgLCBgRXJyb3JgLCBgTnVtYmVyYCwgYFJlZ0V4cGAsIG9yIGBTdHJpbmdgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3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gaHR0cDovL3d3dy5lY21hLWludGVybmF0aW9uYWwub3JnL2VjbWEtMjYyLzcuMC8jc2VjLXJlZ2V4cC5wcm90b3R5cGUudG9zdHJpbmdcbiAgICAgICAgICAvLyBmb3IgbW9yZSBkZXRhaWxzLlxuICAgICAgICAgIHJldHVybiBvYmplY3QgPT0gKG90aGVyICsgJycpO1xuXG4gICAgICAgIGNhc2UgbWFwVGFnOlxuICAgICAgICAgIHZhciBjb252ZXJ0ID0gbWFwVG9BcnJheTtcblxuICAgICAgICBjYXNlIHNldFRhZzpcbiAgICAgICAgICB2YXIgaXNQYXJ0aWFsID0gYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHO1xuICAgICAgICAgIGNvbnZlcnQgfHwgKGNvbnZlcnQgPSBzZXRUb0FycmF5KTtcblxuICAgICAgICAgIGlmIChvYmplY3Quc2l6ZSAhPSBvdGhlci5zaXplICYmICFpc1BhcnRpYWwpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQXNzdW1lIGN5Y2xpYyB2YWx1ZXMgYXJlIGVxdWFsLlxuICAgICAgICAgIHZhciBzdGFja2VkID0gc3RhY2suZ2V0KG9iamVjdCk7XG4gICAgICAgICAgaWYgKHN0YWNrZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyO1xuICAgICAgICAgIH1cbiAgICAgICAgICBiaXRtYXNrIHw9IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUc7XG5cbiAgICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIG9iamVjdHMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7XG4gICAgICAgICAgdmFyIHJlc3VsdCA9IGVxdWFsQXJyYXlzKGNvbnZlcnQob2JqZWN0KSwgY29udmVydChvdGhlciksIGJpdG1hc2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GZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgc3RhbXAgPSBuYXRpdmVOb3coKSxcbiAgICAgICAgICAgIHJlbWFpbmluZyA9IEhPVF9TUEFOIC0gKHN0YW1wIC0gbGFzdENhbGxlZCk7XG5cbiAgICAgICAgbGFzdENhbGxlZCA9IHN0YW1wO1xuICAgICAgICBpZiAocmVtYWluaW5nID4gMCkge1xuICAgICAgICAgIGlmICgrK2NvdW50ID49IEhPVF9DT1VOVCkge1xuICAgICAgICAgICAgcmV0dXJuIGFyZ3VtZW50c1swXTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY291bnQgPSAwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jLmFwcGx5KHVuZGVmaW5lZCwgYXJndW1lbnRzKTtcbiAgICAgIH07XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLnNodWZmbGVgIHdoaWNoIG11dGF0ZXMgYW5kIHNldHMgdGhlIHNpemUgb2YgYGFycmF5YC5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHNodWZmbGUuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtzaXplPWFycmF5Lmxlbmd0aF0gVGhlIHNpemUgb2YgYGFycmF5YC5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzaHVmZmxlU2VsZihhcnJheSwgc2l6ZSkge1xuICAgICAgdmFyIGluZGV4ID0gLTEsXG4gICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLFxuICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHNpemUgPSBzaXplID09PSB1bmRlZmluZWQgPyBsZW5ndGggOiBzaXpl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IEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgMywgNF07XG4gICAgICogdmFyIGV2ZW5zID0gXy5yZW1vdmUoYXJyYXksIGZ1bmN0aW9uKG4pIHtcbiAgICAgKiAgIHJldHVybiBuICUgMiA9PSAwO1xuICAgICAqIH0pO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFsxLCAzXVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2coZXZlbnMpO1xuICAgICAqIC8vID0+IFsyLCA0XVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIHJlbW92ZShhcnJheSwgcHJlZGljYXRlKSB7XG4gICAgICB2YXIgcmVzdWx0ID0gW107XG4gICAgICBpZiAoIShhcnJheSAmJiBhcnJheS5sZW5ndGgpKSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgICB2YXIgaW5kZXggPSAtMSxcbiAgICAgICAgICBpbmRleGVzID0gW10sXG4gICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoO1xuXG4gICAgICBwcmVkaWNhdGUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpO1xuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdO1xuICAgICAgICBpZiAocHJlZGljYXRlKHZhbHVlLCBpbmRleCwgYXJyYXkpKSB7XG4gICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICAgIGluZGV4ZXMucHVzaChpbmRleCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGJhc2VQdWxsQXQoYXJyYXksIGluZGV4ZXMpO1xuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXZlcnNlcyBgYXJyYXlgIHNvIHRoYXQgdGhlIGZpcnN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saWNpdCBjaGFpbmluZy5cbiAgICAgKiBfKHVzZXJzKS5oZWFkKCk7XG4gICAgICogLy8gPT4geyAndXNlcic6ICdiYXJuZXknLCAnYWdlJzogMzYgfVxuICAgICAqXG4gICAgICogLy8gQSBzZXF1ZW5jZSB3aXRoIGV4cGxpY2l0IGNoYWluaW5nLlxuICAgICAqIF8odXNlcnMpXG4gICAgICogICAuY2hhaW4oKVxuICAgICAqICAgLmhlYWQoKVxuICAgICAqICAgLnBpY2soJ3VzZXInKVxuICAgICAqICAgLnZhbHVlKCk7XG4gICAgICogLy8gPT4geyAndXNlcic6ICdiYXJuZXknIH1cbiAgICAgKi9cbiAgICBmdW5jdGlvbiB3cmFwcGVyQ2hhaW4oKSB7XG4gICAgICByZXR1cm4gY2hhaW4odGhpcyk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogRXhlY3V0ZXMgdGhlIGNoYWluIHNlcXVlbmNlIGFuZCByZXR1cm5zIHRoZSB3cmFwcGVkIHJlc3VsdC5cbiAgICAgKlxuICAgICAqIEBuYW1lIGNvbW1pdFxuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDMuMi4wXG4gICAgICogQGNhdGVnb3J5IFNlcVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMl07XG4gICAgICogdmFyIHdyYXBwZWQgPSBfKGFycmF5KS5wdXNoKDMpO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFsxLCAyXVxuICAgICAqXG4gICAgICogd3JhcHBlZCA9IHdyYXBwZWQuY29tbWl0KCk7XG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFsxLCAyLCAzXVxuICAgICAqXG4gICAgICogd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5kZWZpbmVkO1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBjYW5jZWwoKSB7XG4gICAgICAgIGlmICh0aW1lcklkICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXJJZCk7XG4gICAgICAgIH1cbiAgICAgICAgbGFzdEludm9rZVRpbWUgPSAwO1xuICAgICAgICBsYXN0QXJncyA9IGxhc3RDYWxsVGltZSA9IGxhc3RUaGlzID0gdGltZXJJZCA9IHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgZnVuY3Rpb24gZmx1c2goKSB7XG4gICAgICAgIHJldHVybiB0aW1lcklkID09PSB1bmRlZmluZWQgPyByZXN1bHQgOiB0cmFpbGluZ0VkZ2Uobm93KCkpO1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBkZWJvdW5jZWQoKSB7XG4gICAgICAgIHZhciB0aW1lID0gbm93KCksXG4gICAgICAgICAgICBpc0ludm9raW5nID0gc2hvdWxkSW52b2tlKHRpbWUpO1xuXG4gICAgICAgIGxhc3RBcmdzID0gYXJndW1lbnRzO1xuICAgICAgICBsYXN0VGhpcyA9IHRoaXM7XG4gICAgICAgIGxhc3RDYWxsVGltZSA9IHRpbWU7XG5cbiAgICAgICAgaWYgKGlzSW52b2tpbmcpIHtcbiAgICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXR1cm4gbGVhZGluZ0VkZ2UobGFzdENhbGxUaW1lKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG1heGluZykge1xuICAgICAgICAgICAgLy8gSGFuZGxlIGludm9jYXRpb25zIGluIGEgdGlnaHQgbG9vcC5cbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcklkKTtcbiAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgd2FpdCk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GF0aWNcbiAgICAgKiBAbWVtYmVyT2YgX1xuICAgICAqIEBzaW5jZSA0LjQuMFxuICAgICAqIEBjYXRlZ29yeSBMYW5nXG4gICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gaW5zcGVjdC5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIGNhc3QgYXJyYXkuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIF8uY2FzdEFycmF5KDEpO1xuICAgICAqIC8vID0+IFsxXVxuICAgICAqXG4gICAgICogXy5jYXN0QXJyYXkoeyAnYSc6IDEgfSk7XG4gICAgICogLy8gPT4gW3sgJ2EnOiAxIH1dXG4gICAgICpcbiAgICAgKiBfLmNhc3RBcnJheSgnYWJjJyk7XG4gICAgICogLy8gPT4gWydhYmMnXVxuICAgICAqXG4gICAgICogXy5jYXN0QXJyYXkobnVsbCk7XG4gICAgICogLy8gPT4gW251bGxdXG4gICAgICpcbiAgICAgKiBfLmNhc3RBcnJheSh1bmRlZmluZWQpO1xuICAgICAqIC8vID0+IFt1bmRlZmluZWRdXG4gICAgICpcbiAgICAgKiBfLmNhc3RBcnJheSgpO1xuICAgICAqIC8vID0+IFtdXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgM107XG4gICAgICogY29uc29sZS5sb2coXy5jYXN0QXJyYXkoYXJyYXkpID09PSBhcnJheSk7XG4gICAgICogLy8gPT4gdHJ1ZVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGNhc3RBcnJheSgpIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICB2YXIgdmFsdWUgPSBhcmd1bWVudHNbMF07XG4gICAgICByZXR1cm4gaXNBcnJheSh2YWx1ZSkgPyB2YWx1ZSA6IFt2YWx1ZV07XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ3JlY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pb24uXG4gICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgcHJvZHVjdC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy5tdWx0aXBseSg2LCA0KTtcbiAgICAgKiAvLyA9PiAyNFxuICAgICAqL1xuICAgIHZhciBtdWx0aXBseSA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24obXVsdGlwbGllciwgbXVsdGlwbGljYW5kKSB7XG4gICAgICByZXR1cm4gbXVsdGlwbGllciAqIG11bHRpcGxpY2FuZDtcbiAgICB9LCAxKTtcblxuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGBudW1iZXJgIHJvdW5kZWQgdG8gYHByZWNpc2lvbmAuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgMy4xMC4wXG4gICAgICogQGNhdGVnb3J5IE1hdGhcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gcm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtwcmVjaXNpb249MF0gVGhlIHByZWNpc2lvbiB0byByb3VuZCB0by5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByb3VuZGVkIG51bWJlci5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy5yb3VuZCg0LjAwNik7XG4gICAgICogLy8gPT4gNFxuICAgICAqXG4gICAgICogXy5yb3VuZCg0LjAwNiwgMik7XG4gICAgICogLy8gPT4gNC4wMVxuICAgICAqXG4gICAgICogXy5yb3VuZCg0MDYwLCAtMik7XG4gICAgICogLy8gPT4gNDEwMFxuICAgICAqL1xuICAgIHZhciByb3VuZCA9IGNyZWF0ZVJvdW5kKCdyb3VuZCcpO1xuXG4gICAgLyoqXG4gICAgICogU3VidHJhY3QgdHdvIG51bWJlcnMuXG4gICAgICpcbiAg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1lWm9uZVJlZ2V4cCwgJyQxOiQyJykpKS5nZXRUaW1lKClcbiAgICAgICAgICA6IChuZXcgRGF0ZSh0aGlzLm1hbmlmZXN0LnRpbWVzdGFtcCkpLmdldFRpbWUoKTtcbiAgICAgICAgaWYgKGRvY1RpbWUgPiBtYW5UaW1lKSB7XG4gICAgICAgICAgaWYgKCFmb3JjZSkge1xuICAgICAgICAgICAgLy8gRmlsbCBhbm5vdGF0aW9ucyBsaXN0IHdpdGggZGIgYW5ub3RhdGlvbnNcbiAgICAgICAgICAgIHRoaXMuYW5ub3RhdGlvbnMgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IHByb21pc2VzID0gZG9jLmFubm90YXRpb25zLm1hcCgoaWQ6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlcykgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZGIuZ2V0KGlkKS50aGVuKChhbm5vdGF0aW9uOiBEYkFubm90YXRpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIHRoaXMuYW5ub3RhdGlvbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGlkOiBhbm5vdGF0aW9uLl9pZCxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ0Fubm90YXRpb24nLFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBhbm5vdGF0aW9uLmJvZHksXG4gICAgICAgICAgICAgICAgICAgIHRhcmdldDogYW5ub3RhdGlvbi50YXJnZXRcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgcmVzKCcnKTtcbiAgICAgICAgICAgICAgICB9KS5jYXRjaChlcnIgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgICAgICAgICAgcmVzKCcnKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGF3YWl0IFByb21pc2UuYWxsKHByb21pc2VzKTtcbiAgICAgICAgICAgIHJldHVybiByZXNvbHZlKGZhbHNlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChjb25zdCBhbm5vdGF0aW9uIG9mIHRoaXMuYW5ub3RhdGlvbnMpIHtcbiAgICAgICAgICAvLyBBZGQgYW5ub3RhdGlvbnMgdG8gZGF0YWJhc2VcbiAgICAgICAgICBhd2FpdCB0aGlzLmRiLmdldChhbm5vdGF0aW9uLmlkKS5jYXRjaChlcnIgPT4ge1xuICAgICAgICAgICAgaWYgKGVyci5uYW1lID09PSAnbm90X2ZvdW5kJykge1xuICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIF9pZDogYW5ub3RhdGlvbi5pZFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KGVycik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSkudGhlbigobmV3QW5ub3RhdGlvbjogRGJBbm5vdGF0aW9uKSA9PiB7XG4gICAgICAgICAgICBuZXdBbm5vdGF0aW9uLmJvZHkgPSBhbm5vdGF0aW9uLmJvZHk7XG4gICAgICAgICAgICBuZXdBbm5vdGF0aW9uLnRhcmdldCA9IGFubm90YXRpb24udGFyZ2V0O1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGIucHV0KG5ld0Fubm90YXRpb24pO1xuICAgICAgICAgIH0pLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgICByZWplY3QoZXJyKTtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5kYi5wdXQoZG9jKTtcbiAgICAgIH0pLnRoZW4oKCkgPT4ge1xuICAgICAgICByZX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FnZSBoYXMgbm8gTUVJIGNvbnRlbnQ/XG4gICAgICB9IGVsc2UgaWYgKHRoaXMuYmxhbmtQYWdlcy5pbmNsdWRlcyhwYWdlVVJJKSkge1xuICAgICAgICBWYWxpZGF0aW9uLmJsYW5rUGFnZSgpO1xuICAgICAgICBjb25zdCBlID0gbmV3IEVycm9yKCdObyBNRUkgZmlsZSBmb3IgcGFnZSAnICsgcGFnZVVSSSk7XG4gICAgICAgIGUubmFtZSA9ICdtaXNzaW5nX21laSc7XG4gICAgICAgIHJlamVjdChlKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIEZpbmQgYW5ub3RhdGlvblxuICAgICAgICBjb25zdCBhbm5vdGF0aW9uID0gdGhpcy5hbm5vdGF0aW9ucy5maW5kKGVsZW0gPT4ge1xuICAgICAgICAgIHJldHVybiBlbGVtLnRhcmdldCA9PT0gcGFnZVVSSTtcbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChhbm5vdGF0aW9uKSB7XG4gICAgICAgICAgd2luZG93LmZldGNoKGFubm90YXRpb24uYm9keSkudGhlbihyZXNwb25zZSA9PiB7XG4gICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihyZXNwb25zZS5zdGF0dXNUZXh0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KS50aGVuKGRhdGEgPT4ge1xuICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIE1FSSBmaWxlIGlzIHNiLWJhc2VkLiBJZiBzbywgY29udmVydCB0byBzdGFmZi1iYXNlZC5cbiAgICAgICAgICAgIGlmIChkYXRhLm1hdGNoKC88c2IgLis+LykpIHtcbiAgICAgICAgICAgICAgZGF0YSA9IGNvbnZlcnRTYlRvU3RhZmYoZGF0YSk7XG4gICAgICAgICAgIC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lciBmb3IgTmVvbiEgQXQgdGltZSBvZiB3cml0aW5nLFxuICAgICAgICAvLyBvbmx5IGRldi90ZXN0aW5nIHNlcnZlciBhY2NlcHRzIFBVVCByZXF1ZXN0cy5cbiAgICAgICAgLy8gb25seSBhdHRlbXB0IGlmIG5vdCBhIGRhdGEgVVJJXG4gICAgICAgIGxldCB1cmk6IHN0cmluZztcbiAgICAgICAgaWYgKCF0aGlzLmFubm90YXRpb25zW2luZGV4XS5ib2R5Lm1hdGNoKC9eZGF0YTovKSkge1xuICAgICAgICAgIGF3YWl0IHdpbmRvdy5mZXRjaCh0aGlzLmFubm90YXRpb25zW2luZGV4XS5ib2R5LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBtZXRob2Q6ICdQVVQnLFxuICAgICAgICAgICAgICBoZWFkZXJzOiB7ICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vbWVpK3htbCcgfSxcbiAgICAgICAgICAgICAgYm9keTogdmFsdWUubWVpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgKS50aGVuKHJlc3BvbnNlID0+IHtcbiAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICB1cmkgPSB0aGlzLmFubm90YXRpb25zW2luZGV4XS5ib2R5O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdXJpID0gJ2RhdGE6YXBwbGljYXRpb24vbWVpK3htbDtiYXNlNjQsJyArIHdpbmRvdy5idG9hKHZhbHVlLm1laSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgICAgICAgICAgIGNvbnNvbGUud2FybignRmFsbGluZyBiYWNrIHRvIGRhdGEgVVJJJyk7XG4gICAgICAgICAgICB1cmkgPSAnZGF0YTphcHBsaWNhdGlvbi9tZWkreG1sO2Jhc2U2NCwnICsgd2luZG93LmJ0b2EodmFsdWUubWVpKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB1cmkgPSAnZGF0YTphcHBsaWNhdGlvbi9tZWkreG1sO2Jhc2U2NCwnICsgd2luZG93LmJ0b2EodmFsdWUubWVpKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBVcGRhdGUgVVJJIGluIGFubm90YXRpb25zLCBkYXRhYmFzZVxuICAgICAgICB0aGlzLmFubm90YXRpb25zW2luZGV4XS5ib2R5ID0gdXJpO1xuICAgICAgICBhd2FpdCB0aGlzLmRiLmdldCh0aGlzLmFubm90YXRpb25zW2luZGV4XS5pZCkudGhlbigoZG9jOiBEb2MpID0+IHtcbiAgICAgICAgICBkb2MuYm9keSA9IHVyaTtcbiAgICAgICAgICByZXR1cm4gdGhpcy5kYi5wdXQoZG9jKTtcbiAgICAgICAgfSkudGhlbigoKSA9PiB7XG4gICAgICAgICAgdmFsdWUuZGlydHkgPSBmYWxzZTtcbiAgICAgICAgfSkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmICh1cGRhdGVUaW1lc3RhbXApIHtcbiAgICAgIGF3YWl0IHRoaXMuZGIuZ2V0KHRoaXMubWFuaWZlc3RbJ0BpZCddKS50aGVuKChkb2M6IERvYykgPT4ge1xuICAgICAgICBkb2MudGltZXN0YW1wID0gKG5ldyBEYXRlKCkpLnRvSVNPU3RyaW5nKCk7XG4gICAgICAgIHJldHVybiB0aGlzLmRiLnB1dChkb2MpO1xuICAgICAgfSkuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgfSk7XG4gICAgfVxuICB9XG5cbiAgLyoqIENvbXBsZXRlbHkgcmVtb3ZlIHRoZSBkYXRhYmFzZS4gKi9cbiAgYXN5bmMgZGVsZXRlRGIgKCk6IFByb21pc2U8dm9pZ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hbnNmb3JtJzogJ3RyYW5zbGF0ZTNkKDAsMCwwKScsXG4gICAgICAgICAgICAgICAgJ3BlcnNwZWN0aXZlJzogJzEwMDAnLCAvLyBUT0RPIGlzIHRoaXMgZXZlbiB2YWxpZD8gaXMgdGhpcyBldmVuIG5lZWRlZD9cbiAgICAgICAgICAgICAgICAnYmFja2ZhY2UtdmlzaWJpbGl0eSc6ICdoaWRkZW4nXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgZm9yICh2YXIgaT0wOyBpPHByZWZpeGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHByZWZpeCA9IHByZWZpeGVzW2ldO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBzdHlsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0eWxlcy5oYXNPd25Qcm9wZXJ0eShrZXkpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZWwuc3R5bGVbcHJlZml4K2tleV0gPSBzdHlsZXNba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBWYW5pbGxhS2luZXRpYy5wcm90b3R5cGUuX2luaXRFdmVudHMgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICB0aGlzLnNldHRpbmdzLmV2ZW50cyA9IHtcbiAgICAgICAgICAgIHRvdWNoU3RhcnQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgdG91Y2g7XG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuX3VzZVRhcmdldChlLnRhcmdldCwgZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG91Y2ggPSBlLm9yaWdpbmFsRXZlbnQudG91Y2hlc1swXTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi50aHJlc2hvbGQgPSBzZWxmLl90aHJlc2hvbGQoZS50YXJnZXQsIGUpO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zdGFydCh0b3VjaC5jbGllbnRYLCB0b3VjaC5jbGllbnRZKTtcbiAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdG91Y2hNb3ZlOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRvdWNoO1xuICAgICAgICAgICAgICAgIGlmIChzZWxmLm1vdXNlRG93bikge1xuICAgICAgICAgICAgICAgICAgICB0b3VjaCA9IGUub3JpZ2luYWxFdmVudC50b3VjaGVzWzBdO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbnB1dG1vdmUodG91Y2guY2xpZW50WCwgdG91Y2guY2xpZW50WSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLnByZXZlbnREZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaW5wdXREb3duOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuX3VzZVRhcmdldChlLnRhcmdldCwgZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi50aHJlc2hvbGQgPSBzZWxmLl90aHJlc2hvbGQoZS50YXJnZXQsIGUpO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zdGFydChlLmNsaWVudFgsIGUuY2xpZW50WSk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZWxlbWVudEZvY3VzZWQgPSBlLnRhcmdldDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUudGFyZ2V0Lm5vZGVOYW1lID09PSBcIklNR1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaW5wdXRFbmQ6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fdXNlVGFyZ2V0KGUudGFyZ2V0LCBlKSkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9lbmQoKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5lbGVtZW50Rm9jdXNlZCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLnByZXZlbnREZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaW5wdXRNb3ZlOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNlbGYubW91c2VEb3duKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2lucHV0bW92ZShlLmNsaWVudFgsIGUuY2xpZW50WSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLnByZXZlbnREZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc2Nyb2xsOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLnNldHRpbmdzLm1vdmVkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2V0dGluZ3MubW92ZWQuY2FsbChzZWxmLCBzZWxmLnNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGUucHJldmVudERlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnB1dENsaWNrOiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgaWYgKE1hdGguYWJzKHNlbGYudmVsb2NpdHkpID4gMCB8fCBNYXRoLmFicyhzZWxmLnZlbG9jaXR5WSkgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUuc3RvcFByb3BhZ2F0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZHJhZ1N0YXJ0OiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuX3VzZVRhcmdldChlLnRhcmdldCwgZSkgJiYgc2VsZi5lbGVtZW50Rm9jdXNlZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZS5wcmV2ZW50RGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLnN0b3BQcm9wYWdhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNlbGVjdFN0YXJ0OiBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLnNldHRpbmdzLnNlbGVjdFN0YXJ0ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLnNldHRpbmdzLnNlbGVjdFN0YXJ0LmFwcGx5KHNlbGYsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNlbGYuX3VzZVRhcmdldChlLnRhcmdldCwgZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUucHJldmVudERlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoZS5zdG9wUHJvcGFnYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0aGlzLl9hdHRhY2hMaXN0ZW5lcnMoKTtcbiAgICB9O1xuXG4gICAgVmFuaWxsYUtpbmV0aWMucHJvdG90eXBlLl9pbnB1dG1vdmUgPSBmdW5jdGlvbihjbGllbnRYLCBjbGllbnRZKSB7XG4gICAgICAgIGlmICghdGhpcy5sYXN0TW92ZSB8fCBuZXcgRGF0ZSgpID4gbmV3IERhdGUodGhpcy5sYXN0TW92ZS5nZXRUaW1lKCkgKyB0aGlzLnRocm90dGxlVGltZW91dCkpIHtcbiAgICAgICAgICAgIHRoaXMubGFzdE1vdmUgPSBuZXcgRGF0ZSgpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5tb3VzZURvd24gJiYgKHRoaXMueHBvcyB8fCB0aGlzLnlwb3MpKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1vdmVkWCA9IChjbGllbnRYIC0gdGhpcy54cG9zKTtcbiAgICAgICAgICAgICAgICB2YXIgbW92ZWRZID0gKGNsaWVudFkgLSB0aGlzLnlwb3MpO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmludmVydCkge1xuICAgICAgICAgICAgICAgICAgICBtb3ZlZFggKj0gLTE7XG4gICAgICAgICAgICAgICAgICAgIG1vdmVkWSAqPSAtMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudGhyZXNob2xkPjApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1vdmVkID0gTWF0aC5zcXJ0KG1vdmVkWCptb3ZlZFggKyBtb3ZlZFkqbW92ZWRZKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudGhyZXNob2xkPm1vdmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRocmVzaG9sZCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZWxlbWVudEZvY3VzZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50Rm9jdXNlZC5ibHVyKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudEZvY3VzZWQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVsLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy5kZWNlbGVyYXRlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgdGhpcy52ZWxvY2l0eSA9IHRoaXMudmVsb2NpdHlZID0gMDtcblxuICAgICAgICAgICAgICAgIHZhciBzY3JvbGxMZWZ0ID0gdGhpcy5zY3JvbGxMZWZ0KCk7XG4gICAgICAgICAgICAgICAgdmFyIHNjcm9sbFRvcCA9IHRoaXMuc2Nyb2xsVG9wKCk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbExlZnQodGhpcy5zZXR0aW5ncy54ID8gc2Nyb2xsTGVmdCAtIG1vdmVkWCA6IHNjcm9sbExlZnQpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsVG9wKHRoaXMuc2V0dGluZ3MueSA/IHNjcm9sbFRvcCAtIG1vdmVkWSA6IHNjcm9sbFRvcCk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLnByZXZYUG9zID0gdGhpcy54cG9zO1xuICAgICAgICAgICAgICAgIHRoaXMucHJldllQb3MgPSB0aGlzLnlwb3M7XG4gICAgICAgICAgICAgICAgdGhpcy54cG9zID0gY2xpZW50WDtcbiAgICAgICAgICAgICAgICB0aGlzLnlwb3MgPSBjbGllbnRZO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5fY2FsY3VsYXRlVmVsb2NpdGllcygpO1xuICAgICAgICAgICAgICAgIHRoaXMuX3NldE1vdmVDbGFzc2VzKHRoaXMuc2V0dGluZ3MubW92aW5nQ2xhc3MpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLnNldHRpbmdzLm1vdmVkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MubW92ZWQuY2FsbCh0aGlzLCB0aGlzLnNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgVmFuaWxsYUtpbmV0aWMucHJvd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zLnZlbG9jaXR5WSk7XG4gICAgICAgICAgICBpZiAoTWF0aC5hYnModGhpcy52ZWxvY2l0eVkpID4gMCl7XG4gICAgICAgICAgICAgICAgdGhpcy52ZWxvY2l0eVkgPSBzZXR0aW5ncy5kZWNlbGVyYXRlID9cbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fZGVjZWxlcmF0ZVZlbG9jaXR5KHRoaXMudmVsb2NpdHlZLCBzZXR0aW5ncy5zbG93ZG93bikgOiB0aGlzLnZlbG9jaXR5WTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMudmVsb2NpdHlZID0gMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHNlbGYuX3NldE1vdmVDbGFzc2VzKHNldHRpbmdzLmRlY2VsZXJhdGluZ0NsYXNzKTtcblxuICAgICAgICBpZiAodHlwZW9mIHNldHRpbmdzLm1vdmVkID09PSAnZnVuY3Rpb24nKXtcbiAgICAgICAgICAgIHNldHRpbmdzLm1vdmVkLmNhbGwodGhpcywgc2V0dGluZ3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKE1hdGguYWJzKHRoaXMudmVsb2NpdHkpID4gMCB8fCBNYXRoLmFicyh0aGlzLnZlbG9jaXR5WSkgPiAwKXtcbiAgICAgICAgICAgIGlmICghdGhpcy5tb3ZpbmcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdmluZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgLy8gdGljayBmb3IgbmV4dCBtb3ZlbWVudFxuICAgICAgICAgICAgICAgIF9yYWYoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYubW92aW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX21vdmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgI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gICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXNoZWQgPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDbGllbnRYID0gZS5jbGllbnRYO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDbGllbnRZID0gZS5jbGllbnRZO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCAwXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIF93aW5kb3dbYWRkRXZlbnRMaXN0ZW5lcl0obW91c2V1cCwgY29udC5tdSA9IGZ1bmN0aW9uICgpXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1c2hlZCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH0sIDApO1xuXG4gICAgICAgICAgICAgICAgX3dpbmRvd1thZGRFdmVudExpc3RlbmVyXShtb3VzZW1vdmUsIGNvbnQubW0gPSBmdW5jdGlvbiAoZSlcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB1c2hlZClcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2Nyb2xsZXIgPSBlbC5zY3JvbGxlciB8fCBlbCkuc2Nyb2xsTGVmdCAtPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdTY3JvbGxYID0gKC1sYXN0Q2xpZW50WCArIChsYXN0Q2xpZW50WCA9IGUuY2xpZW50WCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcm9sbGVyLnNjcm9sbFRvcCAtPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdTY3JvbGxZID0gKC1sYXN0Q2xpZW50WSArIChsYXN0Q2xpZW50WSA9IGUuY2xpZW50WSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbCA9PT0gX2RvY3VtZW50LmJvZHkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2Nyb2xsZXIgPSBfZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50KS5zY3JvbGxMZWZ0IC09IG5ld1Njcm9sbFg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcm9sbGVyLnNjcm9sbFRvcCAtPSBuZXdTY3JvbGxZO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgICB9KShkcmFnZ2VkW2krK10pO1xuICAgICAgICB9XG4gICAgICAgIC8qIGpzaGludCBpZ25vcmU6ZW5kICovXG4gICAgfTtcblxuICAgIGlmIChfZG9jdW1lbnQucmVhZHlTdGF0ZSA9PT0gJ2NvbXBsZXRlJylcbiAgICB7XG4gICAgICAgIHJlc2V0KCk7XG4gICAgfVxuICAgIGVsc2VcbiAgICB7XG4gICAgICAgIF93aW5kb3dbYWRkRXZlbnRMaXN0ZW5lcl0oJ2xvYWQnLCByZXNldCwgMCk7XG4gICAgfVxuXG4gICAgZXhwb3J0cy5yZXNldCA9IHJlc2V0O1xuICAgIHdpbmRvdy5yZXNldERyYWdzY3JvbGwgPSByZXNldDtcbn0pKTtcbiIsIlxuLyoqXG4gKiBUaGlzIGlzIHRoZSBjb21tb24gbG9naWMgZm9yIGJvdGggdGhlIE5vZGUuanMgYW5kIHdlYiBicm93c2VyXG4gKiBpbXBsZW1lbnRhdGlvbnMgb2YgYGRlYnVnKClgLlxuICovXG5cbmZ1bmN0aW9uIHNldHVwKGVudikge1xuXHRjcmVhdGVEZWJ1Zy5kZWJ1ZyA9IGNyZWF0ZURl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c1swXS5pZCwgdGhpcy5uZW9uVmlldy52aWV3LmdldEN1cnJlbnRQYWdlVVJJKCkpO1xuICAgICAgICAgIGlmKGF0dHIudGlsdCA9PT0gJ3MnKSB7XG4gICAgICAgICAgICBsZXQgcGl0Y2hlcyA9IGF3YWl0IHRoaXMuZ2V0UGl0Y2hlcyhuY3MpO1xuXG4gICAgICAgICAgICBwaXRjaGVzID0gcGl0Y2hlcy50cmltKCkudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgIGJvZHkgPSAnU2hhcGU6IFZpcmdhIFxcclxcbicgICtcbiAgICAgICAgICAgICAgICAgICAgJ1BpdGNoKGVzKTogJyArIHBpdGNoZXM7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSBpZihhdHRyLnRpbHQgPT09ICduJyl7XG4gICAgICAgICAgICBsZXQgcGl0Y2hlcyA9IGF3YWl0IHRoaXMuZ2V0UGl0Y2hlcyhuY3MpO1xuXG4gICAgICAgICAgICBwaXRjaGVzID0gcGl0Y2hlcy50cmltKCkudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgIGJvZHkgPSAnU2hhcGU6IFJldmVyc2VkIFZpcmdhIFxcclxcbicgICtcbiAgICAgICAgICAgICAgICAgICAgJ1BpdGNoKGVzKTogJyArIHBpdGNoZXM7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvbnRvdXIgPT09ICdDbGl2aXMnKSB7XG4gICAgICAgICAgY29uc3QgYXR0cjogQXR0cmlidXRlcyA9IGF3YWl0IHRoaXMubmVvblZpZXcuZ2V0RWxlbWVudEF0dHIobmNzWzBdLmlkLCB0aGlzLm5lb25WaWV3LnZpZXcuZ2V0Q3VycmVudFBhZ2VVUkkoKSk7XG4gICAgICAgICAgaWYgKGF0dHIubGlnYXRlZCkge1xuICAgICAgICAgICAgY29udG91ciA9ICdMaWdhdHVyZSc7XG4gICAgICAg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jb250b3VyICs9ICdkJztcbiAgICAgICAgfSBlbHNlIGlmIChwcmV2aW91c1snb2N0J10gPCBhdHRyaWJ1dGVzWydvY3QnXSkge1xuICAgICAgICAgIGNvbnRvdXIgKz0gJ3UnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICh0aGlzLnBpdGNoTmFtZVRvTnVtKHByZXZpb3VzWydwbmFtZSddKSA8IHRoaXMucGl0Y2hOYW1lVG9OdW0oYXR0cmlidXRlc1sncG5hbWUnXSkpIHtcbiAgICAgICAgICAgIGNvbnRvdXIgKz0gJ3UnO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5waXRjaE5hbWVUb051bShwcmV2aW91c1sncG5hbWUnXSkgPiB0aGlzLnBpdGNoTmFtZVRvTnVtKGF0dHJpYnV0ZXNbJ3BuYW1lJ10pKSB7XG4gICAgICAgICAgICBjb250b3VyICs9ICdkJztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29udG91ciArPSAncyc7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBwcmV2aW91cyA9IGF0dHJpYnV0ZXM7XG4gICAgfVxuICAgIGlmIChuZXVtZUdyb3Vwcy5nZXQoY29udG91cikgPT09IHVuZGVmaW5lZCkge1xuICAgICAgY29uc29sZS53YXJuKCdVbmtub3duIGNvbnRvdXI6ICcgKyBjb250b3VyKTtcbiAgICB9XG4gICAgcmV0dXJuIG5ldW1lR3JvdXBzLmdldChjb250b3VyKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBTaG93IGFuZCB1cGRhdGUgdGhlIGluZm8gYm94LlxuICAgKiBAcGFyYW0gYm9keSAtIFRoZSBpbmZvIGJveCBjb250ZW50cy5cbiAgICovXG4gIHVwZGF0ZUluZm9Nb2R1bGUgKGJvZHk6IHN0cmluZyk6IHZvaWQge1xuICAgICg8SFRNTEVsZW1lbnQ+IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWU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zdGFuY2UgSUQgb2Ygc3Vic2NyaWJlcnMgdG8gZGV0ZXJtaW5lIHdoZXRoZXIgdGhleVxuICAgICAqICAgICAgICAgc2hvdWxkIGJlIGV4ZWN1dGVkLiAoU2VlIGluc3RhbmNlSUQgYXJndW1lbnQgb2Ygc3Vic2NyaWJlLilcbiAgICAgKi9cbiAgICBwdWJsaXNoKHRvcGljLCBhcmdzLCBzY29wZSlcbiAgICB7XG4gICAgICAgIGlmICh0aGlzLl9jYWNoZVt0b3BpY10pXG4gICAgICAgIHtcbiAgICAgICAgICAgIGNvbnN0IHRoaXNUb3BpYyA9IHRoaXMuX2NhY2hlW3RvcGljXTtcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzVG9waWMuZ2xvYmFsICE9PSAndW5kZWZpbmVkJylcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCB0aGlzVG9waWNHbG9iYWwgPSB0aGlzVG9waWMuZ2xvYmFsO1xuICAgICAgICAgICAgICAgIGNvbnN0IGdsb2JhbENvdW50ID0gdGhpc1RvcGljR2xvYmFsLmxlbmd0aDtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IGk9MDsgaSA8IGdsb2JhbENvdW50OyBpKyspXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzVG9waWNHbG9iYWxbaV0uYXBwbHkoc2NvcGUgfHwgbnVsbCwgYXJncyB8fCBbXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc2NvcGUgJiYgdHlwZW9mIHNjb3BlLmdldEluc3RhbmNlSWQgIT09ICd1bmRlZmluZWQnKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIGdldCBwdWJsaXNoZXIgaW5zdGFuY2UgSUQgZnJvbSBzY29wZSBhcmcsIGNvbXBhcmUsIGFuZCBleGVjdXRlIGlmIG1hdGNoXG4gICAgICAgICAgICAgICAgY29uc3QgaW5zdGFuY2VJRCA9IHNjb3BlLmdldEluc3RhbmNlSWQoKTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZVt0b3BpY11baW5zdGFuY2VJRF0pXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0aGlzVG9waWNJbnN0YW5jZSA9IHRoaXMuX2NhY2hlW3RvcGljXVtpbnN0YW5jZUlEXTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2NvcGVkQ291bnQgPSB0aGlzVG9waWNJbnN0YW5jZS5sZW5ndGg7XG5cbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaj0wOyBqIDwgc2NvcGVkQ291bnQ7IGorKylcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1RvcGljSW5zdGFuY2Vbal0uYXBwbHkoc2NvcGUsIGFyZ3MgfHwgW10pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogZGl2YS5FdmVudHMuc3Vic2NyaWJlXG4gICAgICogZS5nLjogZGl2YS5FdmVudHMuc3Vic2NyaWJlKFwiUGFnZURpZExvYWRcIiwgaGlnaGxpZ2h0LCBzZXR0aW5ncy5JRClcbiAgICAgKlxuICAgICAqIEBjbGFzcyBFdmVudHNcbiAgICAgKiBAbWV0aG9kIHN1YnNjcmliZVxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSB0b3BpY1xuICAgICAqIEBwYXJhbSB7ZnVuY3Rpb259IGNhbGxiYWNrXG4gICAgICogQHBhcmFtIHtzdHJpbmc9fSBpbnN0YW5jZUlEICBPcHRpb25hbCAtIFN0cmluZyByZXByZXNlbnRpbmcgdGhlIElEIG9mIGEgRGl2YSBpbnN0YW5jZTsgaWYgcHJvdmlkZWQsXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayBvbmx5IGZpcmVzIGZvciBldmVudHMgcHVibGlzaGVkIGZyb20gdGhhdCBpbnN0YW5jZS5cbiAgICAgKiBAcmV0dXJuIEV2ZW50IGhhbmRsZXIge0FycmF5fVxuICAgICAqL1xuICAgIHN1YnNjcmliZSh0b3BpYywgY2FsbGJhY2ssIGluc3RhbmNlSUQpXG4gICAge1xuICAgICAgICBpZiAoIXRoaXMuX2NhY2hlW3RvcGljXSlcbiAgICAgICAge1xuICAgICAgICAgICAgdGhpcy5fY2FjaGVbdG9waWNdID0ge307XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlSUQgPT09ICdzdHJpbmcnKVxuICAgICAgICB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuX2NhY2hlW3RvcGljXVtpbnN0YW5jZUlEXSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZVt0b3BpY11baW5zdGFuY2VJRF0gPSBbXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5fY2FjaGVbdG9waWNdW2luc3RhbmNlSURdLnB1c2goY2FsbGJhY2spO1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKCF0aGlzLl9jYWNoZVt0b3BpY10uZ2xvYmFsKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlW3RvcGljXS5nbG9iYWwgPSBbXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5fY2FjaGVbdG9waWNdLmdsb2JhbC5wdXNoKGNhbGxiYWNrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpbnN0YW5jZUlEID8gW3RvcGljLCBjYWxsYmFjaywgaW5zdGFuY2VJRF0gOiBbdG9waWMsIGNhbGxiYWNrXTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBkaXZhLkV2ZW50cy51bnN1YnNjcmliZVxuICAgICAqIGUuZy46IHZhciBoYW5kbGUgPSBFdmVudHMuc3Vic2NyaWJlKFwiUGFnZURpZExvYWRcIiwgaGlnaGxpZ2h0KTtcbiAgICAgKiAgICAgICAgIEV2ZW50cy51bnN1YnNjcmliZShoYW5kbGUpO1xuICAgICAqXG4gICAgICogQGNsYXNzIEV2ZW50c1xuICAgICAqIEBtZXRob2QgdW5zdWJzY3JpYmVcbiAgICAgKiBAcGFyYW0ge2FycmF5fSBoYW5kbGVcbiAgICAgKiBAcGFyYW0ge2Jvb2xlYW49fSBjb21wbGV0ZWx5IC0gVW5zdWJzY3JpYmUgYWxsIGV2ZW50cyBmb3IgYSBnaXZlbiB0b3BpYy5cbiAgICAgKiBAcmV0dXJuIHtib29sZWFufSBzdWNjZXNzXG4gICAgICovXG4gICAgdW5zdWJzY3JpYmUoaGFuZGxlLCBjb21wbGV0ZWx5KVxuICAgIHtcbiAgICAgICAgY29uc3QgdCA9IGhhbmRsZVswXTtcblxuICAgICAgICBpZiAodGhpcy5fY2FjaGVbdF0pXG4gICAgICAgIHtcbiAgICAgICAgICAgIGxldCB0b3BpY0FycmF5O1xuICAgICAgICAgICAgY29uc3QgaW5zdGFuY2VJRCA9IGhhbmRsZS5sZW5ndGggPT09IDMgPyBoYW5kbGVbMl0gOiAnZ2xvYmFsJztcblxuICAgICAgICAgICAgdG9waWNBcnJheSA9IHRoaXMuX2NhY2hlW3RdW2luc3RhbmNlSURdO1xuXG4gICAgICAgICAgICBpZiAoIXRvcGljQXJyYXkpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY29tcGxldGVseSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fY2FjaGVbdF1baW5zdGFuY2VJRF07XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRvcGljQXJyYXkubGVuZ3RoID4gMDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IGkgPSB0b3BpY0FycmF5Lmxlbmd0aDtcblxuICAgICAgICAgICAgd2hpbGUgKGktLSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZiAodG9waWNBcnJheVtpXSA9PT0gaGFuZGxlWzFdKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FjaGVbdF1baW5zdGFuY2VJRF0uc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogZGl2YS5FdmVudHMudW5zdWJzY3JpYmVBbGxcbiAgICAgKiBlLmcuOiBkaXZhLkV2ZW50cy51bnN1YnNjcmliZUFsbCgnZ2xvYmFsJyk7XG4gICAgICpcbiAgICAgKiBAY2xhc3MgRXZlbnRzXG4gICAgICogQHBhcmFtIHtzdHJpbmc9fSBpbnN0YW5jZUlEIE9wdGlvbmFsIC0gaW5zdGFuY2UgSUQgdG8gcmVtb3ZlIHN1YnNjcmliZXJzIGZyb20gb3IgJ2dsb2JhbCcgKGlmIG9taXR0ZWQsXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVycyBpbiBhbGwgc2NvcGVzIHJlbW92ZWQpXG4gICAgICogQG1ldGhvZCB1bnN1YnNjcmliZUFsbFxuICAgICAqL1xuICAgIHVuc3Vic2NyaWJlQWxsKGluc3RhbmNlSUQpXG4gICAge1xuICAgICAgICBpZiAoaW5zdGFuY2VJRClcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgdG9waWNzID0gT2JqZWN0LmtleXModGhpcy5fY2FjaGUpO1xuICAgICAgICAgICAgbGV0IGkgPSB0b3BpY3MubGVuZ3RoO1xuICAgICAgICAgICAgbGV0IHRvcGljO1xuXG4gICAgICAgICAgICB3aGlsZSAoaS0tKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRvcGljID0gdG9waWNzW2ldO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLl9jYWNoZVt0b3BpY11baW5zdGFuY2VJRF0gIT09ICd1bmRlZmluZWQnKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuX2NhY2hlW3RvcGljXVtpbnN0YW5jZUlEXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLl9jYWNoZSA9IHt9O1xuICAgICAgICB9XG4gICAgfVxufVxuXG5leHBvcnQgbGV0IEV2ZW50cyA9IG5ldyBEaXZhRXZlbnRzKCk7XG4iLCJleHBvcnQgZGVmYXVsdCB7XG4gICAgb25Eb3VibGVDbGljayxcbiAgICBvblBpbmNoLFxuICAgIG9uRG91YmxlVGFwXG59O1xuXG5jb25zdCBET1VCTEVfQ0xJQ0tfVElNRU9VVCA9IDUwMDtcbmNvbnN0IERPVUJMRV9UQVBfRElTVEFOQ0VfVEhSRVNIT0xEID0gNTA7XG5jb25zdCBET1VCTEVfVEFQX1RJTUVPVVQgPSAyNTA7XG5cbmZ1bmN0aW9uIG9uRG91YmxlQ2xpY2soZWxlbSwgY2FsbGJhY2spXG57XG4gICAgZWxlbS5hZGRFdmVudExpc3RlbmVyKCdkYmxjbGljaycsIGZ1bmN0aW9uIChldmVudClcbiAgICB7XG4gICAgICAgIGlmICghZXZlbnQuY3RybEtleSlcbiAgICAgICAge1xuICAgICAgICAgICAgY2FsbGJhY2soZXZlbnQsIGdldFJlbGF0aXZlT2Zmc2V0KGV2ZW50LmN1cnJlbnRUYXJnZXQsIGV2Z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XNlIGV2ZW50IGZyb20gZmlyaW5nXG4gICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG5cbiAgICAgICAgaWYgKGV2ZW50Lm9yaWdpbmFsRXZlbnQudG91Y2hlcy5sZW5ndGggPT09IDIpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHN0YXJ0RGlzdGFuY2UgPSBkaXN0YW5jZShcbiAgICAgICAgICAgICAgICBldmVudC5vcmlnaW5hbEV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WCxcbiAgICAgICAgICAgICAgICBldmVudC5vcmlnaW5hbEV2ZW50LnRvdWNoZXNbMF0uY2xpZW50WSxcbiAgICAgICAgICAgICAgICBldmVudC5vcmlnaW5hbEV2ZW50LnRvdWNoZXNbMV0uY2xpZW50WCxcbiAgICAgICAgICAgICAgICBldmVudC5vcmlnaW5hbEV2ZW50LnRvdWNoZXNbMV0uY2xpZW50WVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgZWxlbS5hZGRFdmVudExpc3RlbmVyKCd0b3VjaG1vdmUnLCBmdW5jdGlvbihldmVudClcbiAgICB7XG4gICAgICAgIC8vIFByZXZlbnQgbW91c2UgZXZlbnQgZnJvbSBmaXJpbmdcbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICBpZiAoZXZlbnQub3JpZ2luYWxFdmVudC50b3VjaGVzLmxlbmd0aCA9PT0gMilcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgdG91Y2hlcyA9IGV2ZW50Lm9yaWdpbmFsRXZlbnQudG91Y2hlcztcblxuICAgICAgICAgICAgY29uc3QgbW92ZURpc3RhbmNlID0gZGlzdGFuY2UoXG4gICAgICAgICAgICAgICAgdG91Y2hlc1swXS5jbGllbnRYLFxuICAgICAgICAgICAgICAgIHRvdWNoZXNbMF0uY2xpZW50WSxcbiAgICAgICAgICAgICAgICB0b3VjaGVzWzFdLmNsaWVudFgsXG4gICAgIC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AgICAgICBidXR0b24uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoZXZlbnQpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcGx1Z2luLmhhbmRsZUNsaWNrLmNhbGwocGx1Z2luLCBldmVudCwgc2V0dGluZ3MsIHB1YmxpY0luc3RhbmNlLCBwYWdlSW5kZXgpO1xuICAgICAgICAgICAgfSwgZmFsc2UpO1xuXG4gICAgICAgICAgICBidXR0b24uYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hlbmQnLCAoZXZlbnQpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgLy8gUHJldmVudCBmaXJpbmcgb2YgZW11bGF0ZWQgbW91c2UgZXZlbnRzXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgICAgIHBsdWdpbi5oYW5kbGVDbGljay5jYWxsKHBsdWdpbiwgZXZlbnQsIHNldHRpbmdzLCBwdWJsaWNJbnN0YW5jZSwgcGFnZUluZGV4KTtcbiAgICAgICAgICAgIH0sIGZhbHNlKTtcblxuICAgICAgICAgICAgcmV0dXJuIGJ1dHRvbjtcblxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB1bm1vdW50ICgpXG4gICAge1xuICAgICAgICB0aGlzLl9pbm5lckVsZW1lbnQucmVtb3ZlQ2hpbGQodGhpcy5fcGFnZVRvb2xzRWxlbSk7XG4gICAgICAgIHRoaXMuX2lubmVyRWxlbWVudC5yZW1vdmVDaGlsZCh0aGlzLl9wYWdlTGFiZWxzRWxlbSk7XG4gICAgfVxuXG4gICAgcmVmcmVzaCAoKVxuICAgIHtcbiAgICAgICAgY29uc3QgcG9zID0gdGhpcy5fdmlld2VyQ29yZS5nZXRQYWdlUmVnaW9uKHRoaXMucGFnZSwge1xuICAgICAgICAgICAgaW5jbHVkZVBhZGRpbmc6IHRydWUsXG4gICAgICAgICAgICBpbmNvcnBvcmF0ZVZpZXdwb3J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JbmRleF0gPSB0cnVlO1xuXG4gICAgICAgICAgICBpZiAoIXRoaXMuX3JlbmRlcmVkUGFnZU1hcFtwYWdlSW5kZXhdKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuX3JlbmRlcmVkUGFnZU1hcFtwYWdlSW5kZXhdID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIHRoaXMuX2ludm9rZU9uT3ZlcmxheXMocGFnZUluZGV4LCBvdmVybGF5ID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBvdmVybGF5Lm1vdW50KCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHByZXZpb3VzbHlSZW5kZXJlZC5tYXAoIChwYWdlSW5kZXgpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmIChuZXdSZW5kZXJlZE1hcFtwYWdlSW5kZXhdKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuX2ludm9rZU9uT3ZlcmxheXMocGFnZUluZGV4LCAob3ZlcmxheSkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXkucmVmcmVzaCgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9yZW5kZXJlZFBhZ2VNYXBbcGFnZUluZGV4XTtcbiAgICAgICAgICAgICAgICB0aGlzLl9pbnZva2VPbk92ZXJsYXlzKHBhZ2VJbmRleCwgb3ZlcmxheSA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheS51bm1vdW50KCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuX3JlbmRlcmVkUGFnZXMgPSByZW5kZXJlZFBhZ2VzO1xuICAgIH1cblxuICAgIF9pbnZva2VPbk92ZXJsYXlzIChwYWdlSW5kZXgsIGZ1bmMpXG4gICAge1xuICAgICAgICBjb25zdCBvdmVybGF5cyA9IHRoaXMuX3BhZ2VzW3BhZ2VJbmRleF07XG4gICAgICAgIGlmIChvdmVybGF5cylcbiAgICAgICAgICAgIG92ZXJsYXlzLm1hcCggKG8pID0+IGZ1bmMobykgKTtcbiAgICB9XG59XG4iLCJleHBvcnQgZGVmYXVsdCBjbGFzcyBUaWxlQ292ZXJhZ2VNYXBcbntcbiAgICBjb25zdHJ1Y3RvciAocm93cywgY29scylcbiAgICB7XG4gICAgICAgIHRoaXMuX3Jvd3MgPSByb3dzO1xuICAgICAgICB0aGlzLl9jb2xzID0gY29scztcbiAgICAgICAgdGhpcy5fbWFwID0gbmV3IEFycmF5KHJvd3MpLmZpbGwobnVsbCkubWFwKCgpID0+IG5ldyBBcnJheShjb2xzKS5maWxsKGZhbHNlKSk7XG4gICAgfVxuXG4gICAgaXNMb2FkZWQgKHJvdywgY29sKVxuICAgIHtcbiAgICAgICAgLy8gUmV0dXJuIHRydWUgZm9yIG91dCBvZiBib3VuZHMgdGlsZXMgYmVjYXVzZSB0aGV5XG4gICAgICAgIC8vIGRvbid0IG5lZWQgdG8gbG9hZC4gKFVuZm9ydHVuYXRlbHkgdGhpcyB3aWxsIGFsc29cbiAgICAgICAgLy8gbWFzayBsb2dpY2FsIGVycm9ycy4pXG4gICAgICAgIGlmIChyb3cgPj0gdGhpcy5fcm93cyB8fCBjb2wgPj0gdGhpcy5fY29scylcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuXG4gICAgICAgIHJldHVybiB0aGlzLl9tYXBbcm93XVtjb2xdO1xuICAgIH1cblxuICAgIHNldChyb3csIGNvbCwgdmFsdWUpXG4gICAge1xuICAgICAgICB0aGlzLl9tYXBbcm93XVtjb2xdID0gdmFsdWU7XG4gICAgfVxufSIsIm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RlbHkgY292ZXJlZCwgb3IgdG8gcGljayBvdXQgdGhlIHJlZ2lvblxuICAgICAgICAgICAgLy8gd2hpY2ggbmVlZHMgdG8gYmUgZHJhd24/XG4gICAgICAgICAgICAvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL0RETUFML2RpdmEuanMvaXNzdWVzLzM1OFxuICAgICAgICAgICAgY29uc3Qgc2NhbGVSYXRpbyA9IE1hdGgucG93KDIsIGhpZ2hlc3Rab29tTGV2ZWwgLSBsZXZlbC56b29tTGV2ZWwpO1xuXG4gICAgICAgICAgICBhZGRpdGlvbmFsVGlsZXMgPSBhZGRpdGlvbmFsVGlsZXMuZmlsdGVyKHRpbGUgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBpc05lZWRlZCA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgaGlnaFJlc1JvdyA9IHRpbGUucm93ICogc2NhbGVSYXRpbztcbiAgICAgICAgICAgICAgICBjb25zdCBoaWdoUmVzQ29sID0gdGlsZS5jb2wgKiBzY2FsZVJhdGlvO1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaT0wOyBpIDwgc2NhbGVSYXRpbzsgaSsrKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaj0wOyBqIDwgc2NhbGVSYXRpbzsgaisrKVxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvdmVyZWQuaXNMb2FkZWQoaGlnaFJlc1JvdyArIGksIGhpZ2hSZXNDb2wgKyBqKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc05lZWRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY292ZXJlZC5zZXQoaGlnaFJlc1JvdyArIGksIGhpZ2hSZXNDb2wgKyBqLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAg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gbnVsbH1cbiAgICAgKi9cbiAgICBnZXRQYWdlT2Zmc2V0IChwYWdlSW5kZXgsIG9wdGlvbnMpXG4gICAge1xuICAgICAgICBjb25zdCByZWdpb24gPSB0aGlzLmdldFBhZ2VSZWdpb24ocGFnZUluZGV4LCBvcHRpb25zKTtcblxuICAgICAgICBpZiAoIXJlZ2lvbilcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0b3A6IHJlZ2lvbi50b3AsXG4gICAgICAgICAgICBsZWZ0OiByZWdpb24ubGVmdFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGdldFBhZ2VSZWdpb24gKHBhZ2VJbmRleCwgb3B0aW9ucylcbiAgICB7XG4gICAgICAgIGNvbnN0IHBhZ2VJbmZvID0gdGhpcy5fcGFnZUxvb2t1cFtwYWdlSW5kZXhdO1xuXG4gICAgICAgIGlmICghcGFnZUluZm8pXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICBjb25zdCByZWdpb24gPSBnZXRQYWdlUmVnaW9uRnJvbVBhZ2VJbmZvKHBhZ2VJbmZvKTtcbiAgICAgICAgY29uc3QgcGFkZGluZyA9IHBhZ2VJbmZvLmdyb3VwLnBhZGRpbmc7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMgJiYgb3B0aW9ucy5pbmNsdWRlUGFkZGluZylcbiAgICAgICAge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB0b3A6IHJlZ2lvbi50b3AgKyBwYWRkaW5nLnRvcCxcbiAgICAgICAgICAgICAgICBsZWZ0OiByZWdpb24ubGVmdCArIHBhZGRpbmcubGVmdCxcbiAgICAgICAgICAgICAgICBib3R0b206IHJlZ2lvbi5ib3R0b20sXG4gICAgICAgICAgICAgICAgcmlnaHQ6IHJlZ2lvbi5yaWdodFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG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sIHJpZ2h0IGFzIHdlbGxcbiAgICBjb25zdCBwYWdlUGFkZGluZyA9IHtcbiAgICAgICAgdG9wOiBjb25maWcucGFkZGluZy5wYWdlLnRvcCxcbiAgICAgICAgbGVmdDogY29uZmlnLnBhZGRpbmcucGFnZS5sZWZ0XG4gICAgfTtcblxuICAgIHNjYWxlZExheW91dHMuZm9yRWFjaCgobGF5b3V0LCBpbmRleCkgPT4ge1xuICAgICAgICBsZXQgdG9wLCBsZWZ0O1xuXG4gICAgICAgIGlmIChjb25maWcudmVydGljYWxseU9yaWVudGVkKVxuICAgICAgICB7XG4gICAgICAgICAgICB0b3AgPSBwcmltYXJ5RG9jUG9zaXRpb247XG4gICAgICAgICAgICBsZWZ0ID0gKGRvY3VtZW50U2Vjb25kYXJ5RXh0ZW50IC0gbGF5b3V0LmRpbWVuc2lvbnMud2lkdGgpIC8gMjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRvcCA9IChkb2N1bWVudFNlY29uZGFyeUV4dGVudCAtIGxheW91dC5kaW1lbnNpb25zLmhlaWdodCkgLyAyO1xuICAgICAgICAgICAgbGVmdCA9IHByaW1hcnlEb2NQb3NpdGlvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHJlZ2lvbiA9IHtcbiAgICAgICAgICAgIHRvcDogdG9wLFxuICAgICAgICAgICAgYm90dG9tOiB0b3AgKyBwYWdlUGFkZGluZy50b3AgKyBsYXlvdXQuZGltZW5zaW9ucy5oZWlnaHQsXG4gICAgICAgICAgICBsZWZ0OiBsZWZ0LFxuICAgICAgICAgICAgcmlnaHQ6IGxlZnQgKyBwYWdlUGFkZGluZy5sZWZ0ICsgbGF5b3V0LmRpbWVuc2lvbnMud2lkdGhcbiAgICAgICAgfTtcblxuICAgICAgICBwYWdlR3JvdXBzLnB1c2goe1xuICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxuICAgICAgICAgICAgZGltZW5zaW9uczogbGF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EtleXMgfHwgREVGQVVMVF9NQVhfS0VZUztcblxuICAgICAgICB0aGlzLl9oZWxkID0ge307XG4gICAgICAgIHRoaXMuX3VybHMgPSB7fTtcbiAgICAgICAgdGhpcy5fbHJ1ID0gW107XG4gICAgfVxuXG4gICAgZ2V0ICh1cmwpXG4gICAge1xuICAgICAgICBjb25zdCByZWNvcmQgPSB0aGlzLl91cmxzW3VybF07XG4gICAgICAgIHJldHVybiByZWNvcmQgPyByZWNvcmQuaW1nIDogbnVsbDtcbiAgICB9XG5cbiAgICBoYXMgKHVybClcbiAgICB7XG4gICAgICAgIHJldHVybiAhIXRoaXMuX3VybHNbdXJsXTtcbiAgICB9XG5cbiAgICBwdXQgKHVybCwgaW1nKVxuICAgIHtcbiAgICAgICAgbGV0IHJlY29yZCA9IHRoaXMuX3VybHNbdXJsXTtcbiAgICAgICAgaWYgKHJlY29yZClcbiAgICAgICAge1xuICAgICAgICAgICAgLy8gRklYTUU6IERvZXMgdGhpcyBtYWtlIHNlbnNlIGZvciB0aGlzIHVzZSBjYXNlP1xuICAgICAgICAgICAgcmVjb3JkLmltZyA9IGltZztcbiAgICAgICAgICAgIHRoaXMuX3Byb21vdGUocmVjb3JkKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlY29yZCA9IHtcbiAgICAgICAgICAgICAgICBpbWc6IGltZyxcbiAgICAgICAgICAgICAgICB1cmw6IHVybFxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5fdXJsc1t1cmxdID0gcmVjb3JkO1xuICAgICAgICAgICAgdGhpcy5fdHJ5RXZpY3QoMSk7XG4gICAgICAgICAgICB0aGlzLl9scnUudW5zaGlmdChyZWNvcmQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgX3Byb21vdGUgKHJlY29yZClcbiAgICB7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdGhpcy5fbHJ1LmluZGV4T2YocmVjb3JkKTtcbiAgICAgICAgdGhpcy5fbHJ1LnNwbGljZShpbmRleCwgMSk7XG4gICAgICAgIHRoaXMuX2xydS51bnNoaWZ0KHJlY29yZCk7XG4gICAgfVxuXG4gICAgX3RyeUV2aWN0IChleHRyYUNhcGFjaXR5KVxuICAgIHtcbiAgICAgICAgY29uc3QgYWxsb3dlZEVudHJ5Q291bnQgPSB0aGlzLm1heEtleXMgLSBleHRyYUNhcGFjaXR5O1xuXG4gICAgICAgIGlmICh0aGlzLl9scnUubGVuZ3RoIDw9IGFsbG93ZWRFbnRyeUNvdW50KVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIGxldCBldmljdGlvbkluZGV4ID0gdGhpcy5fbHJ1Lmxlbmd0aCAtIDE7XG5cbiAgICAgICAgZm9yICg7OylcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gdGhpcy5fbHJ1W2V2aWN0aW9uSW5kZXhdO1xuXG4gICAgICAgICAgICBpZiAoIXRoaXMuX2hlbGRbdGFyZ2V0LnVybF0pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGVidWcoJ0V2aWN0aW5nIGltYWdlICVzJywgdGFyZ2V0LnVybCk7XG4gICAgICAgICAgICAgICAgdGhpcy5fbHJ1LnNwbGljZShldmljdGlvbkluZGV4LCAxKTtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fdXJsc1t0YXJnZXQudXJsXTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9scnUubGVuZ3RoIDw9IGFsbG93ZWRFbnRyeUNvdW50KVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGV2aWN0aW9uSW5kZXggPT09IDApXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgICAgICBkZWJ1Zy5lbmFibGVkICYmIGRlYnVnKCdDY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ICAgICAgdGhpcy5fcGVuZGluZ1JlcXVlc3RzID0ge307XG4gICAgfVxuXG4gICAgc3RhdGljIGdldENvbXBhdGliaWxpdHlFcnJvcnMgKClcbiAgICB7XG4gICAgICAgIGlmICh0eXBlb2YgSFRNTENhbnZhc0VsZW1lbnQgIT09ICd1bmRlZmluZWQnKVxuICAgICAgICB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAnWW91ciBicm93c2VyIGxhY2tzIHN1cHBvcnQgZm9yIHRoZSAnLCBlbHQoJ3ByZScsICdjYW52YXMnKSxcbiAgICAgICAgICAgICcgZWxlbWVudC4gUGxlYXNlIHVwZ3JhZGUgeW91ciBicm93c2VyLidcbiAgICAgICAgXTtcbiAgICB9XG5cbiAgICBsb2FkIChjb25maWcsIHZpZXdwb3J0UG9zaXRpb24sIHNvdXJjZVJlc29sdmVyKVxuICAgIHtcbiAgICAgICAgdGhpcy5fY2xlYXJBbmltYXRpb24oKTtcblxuICAgICAgICBpZiAodGhpcy5faG9va3Mub25WaWV3V2lsbExvYWQpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRoaXMuX2hvb2tzLm9uVmlld1dpbGxMb2FkKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl9zb3VyY2VSZXNvbHZlciA9IHNvdXJjZVJlc29sdmVyO1xuICAgICAgICB0aGlzLl9jb25maWcgPSBjb25maWc7XG4gICAgICAgIHRoaXMuX2NvbXBvc2l0ZUltYWdlcyA9IHt9O1xuICAgICAgICB0aGlzLl9zZXRMYXlvdXRUb1pvb21MZXZlbCh2aWV3cG9ydFBvc2l0aW9uLnpvb21MZXZlbCk7XG5cbiAgICAgICAgLy8gRklYTUUod2FiYWluKTogUmVtb3ZlIHRoaXMgd2hlbiB0aGVyZSdzIG1vcmUgY29uZmlkZW5jZSB0aGUgY2hlY2sgc2hvdWxkbid0IGJlIG5lZWRlZFxuICAgIC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vb2tzLm9uVmlld0RpZExvYWQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIF9zZXRWaWV3cG9ydFBvc2l0aW9uICh2aWV3cG9ydFBvc2l0aW9uKVxuICAgIHtcbiAgICAgICAgaWYgKHZpZXdwb3J0UG9zaXRpb24uem9vbUxldmVsICE9PSB0aGlzLl96b29tTGV2ZWwpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl96b29tTGV2ZWwgPT09IG51bGwpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignVGhlIGN1cnJlbnQgdmlldyBpcyBub3Qgem9vbWFibGUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHZpZXdwb3J0UG9zaXRpb24uem9vbUxldmVsID09PSBudWxsKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ1RoZSBjdXJyZW50IHZpZXcgcmVxdWlyZXMgYSB6b29tIGxldmVsJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX3NldExheW91dFRvWm9vbUxldmVsKHZpZXdwb3J0UG9zaXRpb24uem9vbUxldmVsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX2dvdG8odmlld3BvcnRQb3NpdGlvbi5hbmNob3JQYWdlLCB2aWV3cG9ydFBvc2l0aW9uLnZlcnRpY2FsT2Zmc2V0LCB2aWV3cG9ydFBvc2l0aW9uLmhvcml6b250YWxPZmZzZXQpO1xuICAgIH1cblxuICAgIF9zZXRMYXlvdXRUb1pvb21MZXZlbCAoem9vbUxldmVsKVxuICAgIHtcbiAgICAgICAgdGhpcy5sYXlvdXQgPSBuZXcgRG9jdW1lbnRMYXlvdXQodGhpcy5fY29uZmlnLCB6b29tTGV2ZWwpO1xuICAgICAgICB0aGlzLl96b29tTGV2ZWwgPSB6b29tTGV2ZWw7XG5cbiAgICAgICAgc2V0QXR0cmlidXRlcyh0aGlzLl9kb2N1bWVudEVsZW1lbnQsIHtcbiAgICAgICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICAgICAgaGVpZ2h0OiB0aGlzLmxheW91dC5kaW1lbnNpb25zLmhlaWdodCArICdweCcsXG4gICAgICAgICAgICAgICAgd2lkdGg6IHRoaXMubGF5b3V0LmRpbWVuc2lvbnMud2lkdGggKyAncHgnXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuX3ZpZXdwb3J0LnNldElubmVyRGltZW5zaW9ucyh0aGlzLmxheW91dC5kaW1lbnNpb25zKTtcbiAgICB9XG5cbiAgICBhZGp1c3QgKClcbiAgICB7XG4gICAgICAgIHRoaXMuX2NsZWFyQW5pbWF0aW9uKCk7XG5cbiAgICAgICAgdGhpcy5fcmVuZGVyKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuX2hvb2tzLm9uVmlld0RpZFVwZGF0ZSlcbiAgICAgICAge1xuICAgICAgICAgICAgdGhpcy5faG9va3Mub25WaWV3RGlkVXBkYXRlKHRoaXMuX3JlbmRlcmVkUGFnZXMuc2xpY2UoKSwgbnVsbCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBfcmVuZGVyICgpXG4gICAge1xuICAgICAgICBjb25zdCBuZXdSZW5kZXJlZFBhZ2VzID0gW107XG4gICAgICAgIHRoaXMubGF5b3V0LnBhZ2VHcm91cHMuZm9yRWFjaCgoZ3JvdXApID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5fdmlld3BvcnQuaW50ZXJzZWN0c1JlZ2lvbihncm91cC5yZWdpb24pKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgdmlzaWJsZVBhZ2VzID0gZ3JvdXAucGFnZXNcbiAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1b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gICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzY2FsZWQgPSBnZXRTY2FsZWRUaWxlUmVjb3JkKHNvdXJjZSwgdGhpcy5fem9vbUxldmVsKTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc1RpbGVWaXNpYmxlKHBhZ2VJbmRleCwgc2NhbGVkKSlcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHJlbmRlcmVkVGlsZXMucHVzaChzb3VyY2UudXJsKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fZHJhd1RpbGUocGFnZUluZGV4LCBzY2FsZWQsIHRoaXMuX2NhY2hlLmdldChzb3VyY2UudXJsKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbnN0IGNhY2hlID0gdGhpcy5fY2FjaGU7XG5cbiAgICAgICAgY29uc3QgY2hhbmdlcyA9IGZpbmRDaGFuZ2VzKHRoaXMuX3JlbmRlcmVkVGlsZXMgfHwgW10sIHJlbmRlcmVkVGlsZXMpO1xuXG4gICAgICAgIGNoYW5nZXMuYWRkZWQuZm9yRWFjaCh1cmwgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgY2FjaGUuYWNxdWlyZSh1cmwpO1xuICAgICAgICB9KTtcblxuICAgICAgICBjaGFuZ2VzLnJlbW92ZWQuZm9yRWFjaCh1cmwgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgY2FjaGUucmVsZWFzZSh1cmwpO1xuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoY2hhbmdlcy5yZW1vdmVkKVxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBGSVhNRTogU2hvdWxkIG9ubHkgbmVlZCB0byB1cGRhdGUgdGhlIGNvbXBvc2l0ZSBpbWFnZXNcbiAgICAgICAgICAgIC8vIGZvciB3aGljaCB0aWxlcyB3ZXJlIHJlbW92ZWRcbiAgICAgICAgICAgIHRoaX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9IChzb3VyY2UsIHBhZ2VJbmRleCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgY29tcG9zaXRlID0gdGhpcy5fY29tcG9zaXRlSW1hZ2VzW3BhZ2VJbmRleF07XG5cbiAgICAgICAgICAgIG5ld1BlbmRpbmdSZXF1ZXN0c1tzb3VyY2UudXJsXSA9IG5ldyBJbWFnZVJlcXVlc3RIYW5kbGVyKHtcbiAgICAgICAgICAgICAgICB1cmw6IHNvdXJjZS51cmwsXG4gICAgICAgICAgICAgICAgdGltZW91dFRpbWU6IFJFUVVFU1RfREVCT1VOQ0VfSU5URVJWQUwsXG4gICAgICAgICAgICAgICAgc2V0dGluZ3M6IHRoaXMuX3NldHRpbmdzLFxuICAgICAgICAgICAgICAgIGxvYWQ6IGltZyA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMuX3BlbmRpbmdSZXF1ZXN0c1tzb3VyY2UudXJsXTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FjaGUucHV0KHNvdXJjZS51cmwsIGltZyk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQXdrd2FyZCB3YXkgdG8gY2hlY2sgZm9yIHVwZGF0ZXNcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbXBvc2l0ZSA9PT0gdGhpcy5fY29tcG9zaXRlSW1hZ2VzW3BhZ2VJbmRleF0pXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvc2l0ZS51cGRhdGVXaXRoTG9hZGVkVXJscyhbc291cmNlLnVybF0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5faXNUaWxlRm9yU291cmNlVmlzaWJsZShwYWdlSW5kZXgsIHNvdXJjZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGFpbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc1RpbGVGb3JTb3VyY2VWaXNpYmxlKHBhZ2VJbmRleCwgc291cmNlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYWludCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBlcnJvcjogKCkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRPRE86IENvdWxkIG1ha2UgYSBsaW1pdGVkIG51bWJlciBvZiByZXRyaWVzLCBldGMuXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9wZW5kaW5nUmVxdWVzdHNbc291cmNlLnVybF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwYWdlcy5sZW5ndGg7IGkrKylcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgcGFnZUluZGV4ID0gcGFnZXNbaV07XG4gICAgICAgICAgICBjb25zdCB0aWxlcyA9IHRoaXMuX3NvdXJjZVJlc29sdmVyLmdldEJlc3Rab29tTGV2ZWxGb3JQYWdlKHRoaXMubGF5b3V0LmdldFBhZ2VJbmZvKHBhZ2VJbmRleCkpLnRpbGVzO1xuXG4gICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHRpbGVzLmxlbmd0aDsgaisrKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNvbnN0IHNvdXJjZSA9IHRpbGVzW2pdO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZS5oYXMoc291cmNlLnVybCkgfHwgIXRoaXMuX2lzVGlsZUZvclNvdXJjZVZpc2libGUocGFnZUluZGV4LCBzb3VyY2UpKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gRG9uJ3QgY3JlYXRlIGEgbmV3IHJlcXVlc3QgaWYgdGhlIHRpbGUgaXMgYWxyZWFkeSBiZWluZyBsb2FkZWRcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcGVuZGluZ1JlcXVlc3RzW3NvdXJjZS51cmxdKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3UGVuZGluZ1JlcXVlc3RzW3NvdXJjZS51cmxdID0gdGhpcy5fcGVuZGluZ1JlcXVlc3RzW3NvdXJjZS51cmxdO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fcGVuZGluZ1JlcXVlc3RzW3NvdXJjZS51cmxdO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBVc2UgYSBjbG9zdXJlIHNpbmNlIHRoZSBsb2FkIGFuZCBlcnJvciBtZXRob2RzIGFyZSBnb2luZyB0byBiZSBjYWxsZWQgbGF0ZXIgYW5kXG4gICAgICAgICAgICAgICAgLy8gd2UgbmVlZCB0byBrZWVwIHRoZSByaWdodCByZWZlcmVuY2UgdG8gdGhlIHNvdXJjZSBhbmQgdGhlIHBhZ2UgaW5kZXhcbiAgICAgICAgICAgICAgICBpbml0aWF0ZVJlcXVlc3Qoc291cmNlLCBwYWdlSW5kZXgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChjb25zdCB1cmwgaW4gdGhpcy5fcGVuZGluZ1JlcXVlc3RzKVxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLl9wZW5kaW5nUmVxdWVzdHNbdXJsXS5hYm9yd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AgICAgICAgY29uc3Qgb25WaWV3RGlkVHJhbnNpdGlvbiA9IHRoaXMuX2hvb2tzLm9uVmlld0RpZFRyYW5zaXRpb247XG5cbiAgICAgICAgdGhpcy5fYW5pbWF0aW9uID0gSW50ZXJwb2xhdGVBbmltYXRpb24uYW5pbWF0ZSh7XG4gICAgICAgICAgICBkdXJhdGlvbjogb3B0aW9ucy5kdXJhdGlvbixcbiAgICAgICAgICAgIHBhcmFtZXRlcnM6IG9wdGlvbnMucGFyYW1ldGVycyxcbiAgICAgICAgICAgIG9uVXBkYXRlOiAodmFsdWVzKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NldFZpZXdwb3J0UG9zaXRpb24oZ2V0UG9zaXRpb24odmFsdWVzKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5faG9va3Mub25ab29tTGV2ZWxXaWxsQ2hhbmdlKHZhbHVlcy56b29tTGV2ZWwpO1xuXG4gICAgICAgICAgICAgICAgaWYgKG9uVmlld0RpZFRyYW5zaXRpb24pXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBvblZpZXdEaWRUcmFuc2l0aW9uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uRW5kOiAoaW5mbykgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5vbkVuZClcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FbmQoaW5mbyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2hvb2tzLm9uVmlld0RpZFVwZGF0ZSAmJiAhaW5mby5pbnRlcnJ1cHRlZClcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2hvb2tzLm9uVmlld0RpZFVwZGF0ZSh0aGlzLl9yZW5kZXJlZFBhZ2VzLnNsaWNlKCksIG51bGwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgX2NsZWFyQW5pbWF0aW9uICgpXG4gICAge1xuICAgICAgICBpZiAodGhpcy5fYW5pbWF0aW9uKVxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLl9hbmltYXRpb24uY2FuY2VsKCk7XG4gICAgICAgICAgICB0aGlzLl9hbmltYXRpb24gPSBudWxsO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgaXNQYWdlVmlzaWJsZSAocGFnZUluZGV4KVxuICAgIHtcbiAgICAgICAgaWYgKCF0aGlzLmxheW91dClcbiAgICAgICAge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGFnZSA9IHRoaXMubGF5b3V0LmdldFBhZ2VJbmZvKHBhZ2VJbmRleCk7XG5cbiAgICAgICAgaWYgKCFwYWdlKVxuICAgICAgICB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5fdmlld3BvcnQuaW50ZXJzZWN0c1JlZ2lvbih0aGlzLmxheW91dC5nZXRQYWdlUmVnaW9uKHBhZ2VJbmRleCkpO1xuICAgIH1cblxuICAgIGdldFJlbmRlcmVkUGFnZXMgKClcbiAgICB7XG4gICAgICAgIHJldHVybiB0aGlzLl9yZW5kZXJlZFBhZ2VzLnNsaWNlKCk7XG4gICAgfVxuXG4gICAgZGVzdHJveSAoKVxuICAgIHtcbiAgICAgICAgdGhpcy5fY2xlYXJBbmltYXRpb24oKTtcblxuICAgICAgICAvLyBGSVhNRSh3YWJhaW4pOiBJIGRvbid0IGtub3cgaWYgd2Ugc2hvdWxkIGFjdHVhbGx5IGRvIHRoaXNcbiAgICAgICAgT2JqZWN0LmtleXModGhpcy5fcGVuZGluZ1JlcXVlc3RzKS5mb3JFYWNoK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lZClcbntcbiAgICBjb25zdCBsZWZ0RGltcyA9IGxlZnRQYWdlLmRpbWVuc2lvbnM7XG4gICAgY29uc3QgcmlnaHREaW1zID0gcmlnaHRQYWdlLmRpbWVuc2lvbnM7XG5cbiAgICBjb25zdCBoZWlnaHQgPSBNYXRoLm1heChsZWZ0RGltcy5oZWlnaHQsIHJpZ2h0RGltcy5oZWlnaHQpO1xuXG4gICAgbGV0IHdpZHRoLCBmaXJzdExlZnRPZmZzZXQsIHNlY29uZExlZnRPZmZzZXQ7XG5cbiAgICBpZiAodmVydGljYWxseU9yaWVudGVkKVxuICAgIHtcbiAgICAgICAgY29uc3QgbWlkV2lkdGggPSBNYXRoLm1heChsZWZ0RGltcy53aWR0aCwgcmlnaHREaW1zLndpZHRoKTtcblxuICAgICAgICB3aWR0aCA9IG1pZFdpZHRoICogMjtcblxuICAgICAgICBmaXJzdExlZnRPZmZzZXQgPSBtaWRXaWR0aCAtIGxlZnREaW1zLndpZHRoO1xuICAgICAgICBzZWNvbmRMZWZ0T2Zmc2V0ID0gbWlkV2lkdGg7XG4gICAgfVxuICAgIGVsc2VcbiAgICB7XG4gICAgICAgIHdpZHRoID0gbGVmdERpbXMud2lkdGggKyByaWdodERpbXMud2lkdGg7XG4gICAgICAgIGZpcnN0TGVmdE9mZnNldCA9IDA7XG4gICAgICAgIHNlY29uZExlZnRPZmZzZXQgPSBsZWZ0RGltcy53aWR0aDtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgICBkaW1lbnNpb25zOiB7XG4gICAgICAgICAgICBoZWlnaHQ6IGhlaWdodCxcbiAgICAgICAgICAgIHdpZHRoOiB3aWR0aFxuICAgICAgICB9LFxuICAgICAgICBwYWdlczogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGluZGV4OiBsZWZ0UGFnZS5pbmRleCxcbiAgICAgICAgICAgICAgICBkaW1lbnNpb25zOiBsZWZ0RGltcyxcbiAgICAgICAgICAgICAgICBncm91cE9mZnNldDoge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aXhlZFBhZGRpbmcgKyBncmlkUGFnZVdpZHRoKSArIGZpeGVkUGFkZGluZyk7XG5cbiAgICAgICAgLy8gQ2VudGVyIHRoZSBwYWdlIGlmIHRoZSBoZWlnaHQgaXMgZml4ZWQgKG90aGVyd2lzZSwgdGhlcmUgaXMgbm8gaG9yaXpvbnRhbCBwYWRkaW5nKVxuICAgICAgICBpZiAoZml4ZWRIZWlnaHRHcmlkKVxuICAgICAgICB7XG4gICAgICAgICAgICBsZWZ0T2Zmc2V0ICs9IChncmlkUGFnZVdpZHRoIC0gcGFnZURpbWVucy53aWR0aCkgLyAyO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gVE9ETzogUHJlY29tcHV0ZSBwYWdlIGRpbWVuc2lvbnMgZXZlcnl3aGVyZVxuICAgICAgICBjdXJyZW50UGFnZXMucHVzaCh7XG4gICAgICAgICAgICBpbmRleDogcGFnZUluZGV4LFxuICAgICAgICAgICAgZGltZW5zaW9uczogcGFnZURpbWVucyxcbiAgICAgICAgICAgIGdyb3VwT2Zmc2V0OiB7XG4gICAgICAgICAgICAgICAgdG9wOiAwLFxuICAgICAgICAgICAgICAgIGxlZnQ6IGxlZnRPZmZzZXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKGN1cnJlbnRQYWdlcy5sZW5ndGggPT09IHBhZ2VzUGVyUm93KVxuICAgICAgICB7XG4gICAgICAgICAgICBncm91cHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZGltZW5zaW9uczogcm93RGltZW5zaW9ucyxcbiAgICAgICAgICAgICAgICBwYWdlczogY3VycmVudFBhZ2VzXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgY3VycmVudFBhZ2VzID0gW107XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIGlmIChjdXJyZW50UGFnZXMubGVuZ3RoID4gMClcbiAgICB7XG4gICAgICAgIGdyb3Vwcy5wdXNoKHtcbiAgICAgICAgICAgIGRpbWVuc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xuICAgICAgICAgICAgICAgIGdyb3VwT2Zmc2V0OiB7IHRvcDogMCwgbGVmdDogMCB9LFxuICAgICAgICAgICAgICAgIGRpbWVuc2lvbnM6IHBhZ2VEaW1zXG4gICAgICAgICAgICB9XVxuICAgICAgICB9KTtcbiAgICB9KTtcblxuICAgIHJldHVybiBwYWdlcztcbn1cbiIsIlxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gY3JlYXRlU2V0dGluZ3NWaWV3KHNvdXJjZXMpXG57XG4gICAgY29uc3Qgb2JqID0ge307XG5cbiAgICBzb3VyY2VzLmZvckVhY2goIChzb3VyY2UpID0+XG4gICAge1xuICAgICAgICByZWdpc3Rlck1peGluKG9iaiwgc291cmNlKTtcbiAgICB9KTtcblxuICAgIHJldHVybiBvYmo7XG59XG5cbmZ1bmN0aW9uIHJlZ2lzdGVyTWl4aW4ob2JqLCBtaXhpbilcbntcbiAgICBPYmplY3Qua2V5cyhtaXhpbikuZm9yRWFjaCggKGtleSkgPT5cbiAgICB7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShvYmosIGtleSwge1xuICAgICAgICAgICAgZ2V0OiAoKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiBtaXhpbltrZXldO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHNldDogKCkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBNYWtlIGV2ZXJ5dGhpbmcgc3RyaWN0IG1vZGUgc28gdGhpcyBpc24ndCBuZWVkZWRcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3Qgc2V0IHNldHRpbmdzLicgKyBrZXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcbn1cbiIsImV4cG9ydCBkZWZhdWx0IGNsYXNzIFZhbGlkYXRpb25SdW5uZXJcbntcbiAgICBjb25zdHJ1Y3RvciAob3B0aW9ucylcbiAgICB7XG4gICAgICAgIHRoaXMud2hpdGVsaXN0ZWRLZXlzID0gb3B0aW9ucy53aGl0ZWxpc3RlZEtleXMgfHwgW107XG4gICAgICAgIHRoaXMuYWRkaXRpb25hbFByb3BlcnRpZXMgPSBvcHRpb25zLmFkZGl0aW9uYWxQcm9wZXJ0aWVzIHx8IFtdO1xuICAgICAgICB0aGlzLnZhbGlkYXRpb25zID0gb3B0aW9ucy52YWxpZGF0aW9ucztcbiAgICB9XG5cbiAgICBpc1ZhbGlkIChrZXksIHZhbHVlLCBzZXR0aW5ncylcbiAgICB7XG4gICAgICAgIC8vIEdldCB0aGUgdmFsaWRhdGlvbiBpbmRleFxuICAgICAgICBsZXQgdmFsaWRhdGlvbkluZGV4ID0gbnVsbDtcblxuICAgICAgICB0aGlzLnZhbGlkYXRpb25zLnNvbWUoKHZhbGlkYXRpb24sIGluZGV4KSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICBpZiAodmFsaWRhdGlvbi5rZXkgIT09IGtleSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbGlkYXRpb25JbmRleCA9IGluZGV4O1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmICh2YWxpZGF0aW9uSW5kZXggPT09IG51bGwpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gUnVuIHRoZSB2YWxpZGF0aW9uXG4gICAgICAgIGNvbnN0IGR1bW15Q2hhbmdlcyA9IHt9O1xuICAgICAgICBkdW1teUNoYW5nZXNba2V5XSA9IHZhbHVlO1xuICAgICAgICBjb25zdCBwcm94aWVyID0gY3JlYXRlU2V0dGluZ3NQcm94aWVyKHNldHRpbmdzLCBkdW1teUNoYW5nZXMsIHRoaXMpO1xuXG4gICA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ICAgICAgIGNvbnN0IGNvcnJlY3RlZCA9IHRoaXMuX3J1blZhbGlkYXRpb24oaW5kZXgsIGlucHV0LCBwcm94aWVyKTtcblxuICAgICAgICAgICAgaWYgKGNvcnJlY3RlZClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZiAoIWNvcnJlY3RlZC53YXJuaW5nU3VwcHJlc3NlZClcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGVtaXRXYXJuaW5nKHZhbGlkYXRpb24ua2V5LCBpbnB1dCwgY29ycmVjdGVkLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvcHRpb25zW3ZhbGlkYXRpb24ua2V5XSA9IGNvcnJlY3RlZC52YWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgdGhpcyk7XG4gICAgfVxuXG4gICAgX3J1blZhbGlkYXRpb24gKGluZGV4LCBpbnB1dCwgcHJveGllcilcbiAgICB7XG4gICAgICAgIGNvbnN0IHZhbGlkYXRpb24gPSB0aGlzLnZhbGlkYXRpb25zW2luZGV4XTtcblxuICAgICAgICBwcm94aWVyLmluZGV4ID0gaW5kZXg7XG5cbiAgICAgICAgbGV0IHdhcm5pbmdTdXBwcmVzc2VkID0gZmFsc2U7XG4gICAgICAgIGNvbnN0IGNvbmZpZyA9IHtcbiAgICAgICAgICAgIHN1cHByZXNzV2FybmluZzogKCkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB3YXJuaW5nU3VwcHJlc3NlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3Qgb3V0cHV0VmFsdWUgPSB2YWxpZGF0aW9uLnZhbGlkYXRlKGlucHV0LCBwcm94aWVyLnByb3h5LCBjb25maWcpO1xuXG4gICAgICAgIGlmIChvdXRwdXRWYWx1ZSA9PT0gdW5kZWZpbmVkIHx8IG91dHB1dFZhbHVlID09PSB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3RlZCkgPT5cbiAgICB7XG4gICAgICAgIHByb3BlcnRpZXNbd2hpdGVsaXN0ZWRdID0ge1xuICAgICAgICAgICAgZ2V0OiBsb29rdXAuYmluZChudWxsLCB3aGl0ZWxpc3RlZClcbiAgICAgICAgfTtcbiAgICB9KTtcblxuICAgIHJ1bm5lci5hZGRpdGlvbmFsUHJvcGVydGllcy5mb3JFYWNoKChhZGRpdGlvbmFsKSA9PlxuICAgIHtcbiAgICAgICAgcHJvcGVydGllc1thZGRpdGlvbmFsLmtleV0gPSB7XG4gICAgICAgICAgICBnZXQ6IGFkZGl0aW9uYWwuZ2V0XG4gICAgICAgIH07XG4gICAgfSk7XG5cbiAgICBydW5uZXIudmFsaWRhdGlvbnMuZm9yRWFjaCggKHZhbGlkYXRpb24sIHZhbGlkYXRpb25JbmRleCkgPT5cbiAgICB7XG4gICAgICAgIHByb3BlcnRpZXNbdmFsaWRhdGlvbi5rZXldID0ge1xuICAgICAgICAgICAgZ2V0OiAoKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGlmICh2YWxpZGF0aW9uSW5kZXggPCBwcm94aWVyLmluZGV4KVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxvb2t1cCh2YWxpZGF0aW9uLmtleSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgY3VycmVudEtleSA9IHJ1bm5lci52YWxpZGF0aW9uc1twcm94aWVyLmluZGV4XS5rZXk7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ2Fubm90IGFjY2VzcyBzZXR0aW5nICcgKyB2YWxpZGF0aW9uLmtleSArICcgd2hpbGUgdmFsaWRhdGluZyAnICsgY3VycmVudEtleSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSk7XG5cbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyhwcm94aWVyLnByb3h5LCBwcm9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ICAgICByZXR1cm4gdGhpcy5fdG9wICsgdGhpcy5faGVpZ2h0O1xuICAgICAgICB9XG4gICAgfSxcbiAgICByaWdodDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9sZWZ0ICsgdGhpcy5fd2lkdGg7XG4gICAgICAgIH1cbiAgICB9XG59KTtcblxuZnVuY3Rpb24gZ2V0Q29vcmRpbmF0ZURlc2NyaXB0b3IgKGNvb3JkLCBhc3NvY2lhdGVkRGltZW5zaW9uKVxue1xuICAgIGNvbnN0IHByaXZhdGVQcm9wID0gJ18nICsgY29vcmQ7XG4gICAgY29uc3Qgc291cmNlID0gJ3Njcm9sbCcgKyBjb29yZC5jaGFyQXQoMCkudG9VcHBlckNhc2UoKSArIGNvb3JkLnNsaWNlKDEpO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKVxuICAgICAgICB7XG4gICAgICAgICAgICByZXR1cm4gdGhpc1twcml2YXRlUHJvcF07XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKG5ld1ZhbHVlKVxuICAgICAgICB7XG4gICAgICAgICAgICBsZXQgbm9ybWFsaXplZDtcblxuICAgICAgICAgICAgaWYgKHRoaXMuX2lubmVyRGltZW5zaW9ucylcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCBtYXhBbGxvd2VkID0gdGhpcy5faW5uZXJEaW1lbnNpb25zW2Fzc29jaWF0ZWREaW1lbnNpb25dIC0gdGhpc1thc3NvY2lhdGVkRGltZW5zaW9uXTtcbiAgICAgICAgICAgICAgICBub3JtYWxpemVkID0gY2xhbXAobmV3VmFsdWUsIDAsIG1heEFsbG93ZWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBjbGFtcE1pb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Wx1ZSkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgcmV0dXJuIE1hdGgubWF4KDIsIHZhbHVlKTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6ICdtYXhQYWdlc1BlclJvdycsXG4gICAgICAgIHZhbGlkYXRlOiAodmFsdWUsIHNldHRpbmdzKSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgodmFsdWUsIHNldHRpbmdzLm1pblBhZ2VzUGVyUm93KTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6ICdwYWdlc1BlclJvdycsXG4gICAgICAgIHZhbGlkYXRlOiAodmFsdWUsIHNldHRpbmdzKSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBEZWZhdWx0IHRvIHRoZSBtYXhpbXVtXG4gICAgICAgICAgICBpZiAodmFsdWUgPCBzZXR0aW5ncy5taW5QYWdlc1BlclJvdyB8fCB2YWx1ZSA+IHNldHRpbmdzLm1heFBhZ2VzUGVyUm93KVxuICAgICAgICAgICAgICAgIHJldHVybiBzZXR0aW5ncy5tYXhQYWdlc1BlclJvdztcbiAgICAgICAgfVxuICAgIH0sXG4gICAge1xuICAgICAgICBrZXk6ICdtYXhab29tTGV2ZWwnLFxuICAgICAgICB2YWxpZGF0ZTogKHZhbHVlLCBzZXR0aW5ncywgY29uZmlnKSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBDaGFuZ2luZyB0aGlzIHZhbHVlIGlzbid0IHJlYWxseSBhbiBlcnJvciwgaXQganVzdCBkZXBlbmRzIG9uIHRoZVxuICAgICAgICAgICAgLy8gc291cmNlIG1hbmlmZXN0XG4gICAgICAgICAgICBjb25maWcuc3VwcHJlc3NXYXJuaW5nKCk7XG5cbiAgICAgICAgICAgIGlmICh2YWx1ZSA8IDAgfHwgdmFsdWUgPiBzZXR0aW5ncy5tYW5pZmVzdC5tYXhab29tKVxuICAgICAgICAgICAgICAgIHJldHVybiBzZXR0aW5ncy5tYW5pZmVzdC5tYXhab29tO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB7XG4gICAgICAgIGtleTogJ21pblpvb21MZXZlbCcsXG4gICAgICAgIHZhbGlkYXRlOiAodmFsdWUsIHNldHRpbmdzLCBjb25maWcpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIC8vIENoYW5nZXMgYmFzZWQgb24gdGhlIG1hbmlmZXN0IHZhbHVlIHNob3VsZG4ndCB0cmlnZ2VyIGFcbiAgICAgICAgICAgIC8vIHdhcm5pbmdcbiAgICAgICAgICAgIGlmICh2YWx1ZSA+IHNldHRpbmdzLm1hbmlmZXN0Lm1heFpvb20pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uZmlnLnN1cHByZXNzV2FybmluZygpO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodmFsdWUgPCAwIHx8IHZhbHVlID4gc2V0dGluZ3MubWF4Wm9vbUxldmVsKVxuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB7XG4gICAgICAgIGtleTogJ3pvb21MZXZlbCcsXG4gICAgICAgIHZhbGlkYXRlOiAodmFsdWUsIHNldHRpbmdzLCBjb25maWcpID0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSA+IHNldHRpbmdzLm1hbmlmZXN0Lm1heFpvb20pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uZmlnLnN1cHByZXNzV2FybmluZygpO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodmFsdWUgPCBzZXR0aW5ncy5taW5ab29tTGV2ZWwgfHwgdmFsdWUgPiBzZXR0aW5ncy5tYXhab29tTGV2ZWwpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNldHRpbmdz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EhlaWdodCBvZiB0aGUgZG9jdW1lbnQgdmlld2VyIHBhbmVcbiAgICAgICAgICAgIHBhbmVsSGVpZ2h0OiB7XG4gICAgICAgICAgICAgICAgZ2V0OiAoKSA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQuaGVpZ2h0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBXaWR0aCBvZiB0aGUgZG9jdW1lbnQgdmlld2VyIHBhbmVcbiAgICAgICAgICAgIHBhbmVsV2lkdGg6IHtcbiAgICAgICAgICAgICAgICBnZXQ6ICgpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC53aWR0aDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMub3B0aW9uc1ZhbGlkYXRvciA9IG5ldyBWYWxpZGF0aW9uUnVubmVyKHtcbiAgICAgICAgICAgIGFkZGl0aW9uYWxQcm9wZXJ0aWVzOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBrZXk6ICdtYW5pZmVzdCcsXG4gICAgICAgICAgICAgICAgICAgIGdldDogKCkgPT5cbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudmlld2VyU3RhdGUubWFuaWZlc3Q7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdLFxuXG4gICAgICAgICAgICB2YWxpZGF0aW9uczogb3B0aW9uc1ZhbGlkYXRpb25zXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUuc2Nyb2xsYmFyV2lkdGggPSBnZXRTY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cbiAgICAgICAgICAgICAgICAgICAgZWx0KCdkaXYnLCB7IGNsYXNzOiAnY3ViZSBjdWJlMScgfSksXG4gICAgICAgICAgICAgICAgICAgIGVsdCgnZGl2JywgeyBjbGFzczogJ2N1YmUgY3ViZTInIH0pLFxuICAgICAgICAgICAgICAgICAgICBlbHQoJ2RpdicsIHsgY2xhc3M6ICdjdWJlIGN1YmUzJyB9KSxcbiAgICAgICAgICAgICAgICAgICAgZWx0KCdkaXYnLCB7IGNsYXNzOiAnY3ViZSBjdWJlNCcgfSksXG4gICAgICAgICAgICAgICAgICAgIGVsdCgnZGl2JywgeyBjbGFzczogJ2N1YmUgY3ViZTUnIH0pLFxuICAgICAgICAgICAgICAgICAgICBlbHQoJ2RpdicsIHsgY2xhc3M6ICdjdWJlIGN1YmU2JyB9KSxcbiAgICAgICAgICAgICAgICAgICAgZWx0KCdkaXYnLCB7IGNsYXNzOiAnY3ViZSBjdWJlNycgfSksXG4gICAgICAgICAgICAgICAgICAgIGVsdCgnZGl2JywgeyBjbGFzczogJ2N1YmUgY3ViZTgnIH0pLFxuICAgICAgICAgICAgICAgICAgICBlbHQoJ2RpdicsIHsgY2xhc3M6ICdjdWJlIGN1YmU5JyB9KSxcbiAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICApKTtcblxuICAgICAgICB0aGlzLnZpZXdlclN0YXRlLmlubmVyRWxlbWVudCA9IGlubmVyRWxlbTtcbiAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydEVsZW1lbnQgPSB2aWV3cG9ydEVsZW07XG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUub3V0ZXJFbGVtZW50ID0gb3V0ZXJFbGVtO1xuXG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUuaW5uZXJPYmplY3QgPSBpbm5lckVsZW07XG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnRPYmplY3QgPSB2aWV3cG9ydEVsZW07XG4gICAgICAgIHRoaXMudmlld2Vy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4gICAgICAgICAgICBjb25zdCByZW5kZXJlckNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICBwYWdlTGF5b3V0czogZ2V0UGFnZUxheW91dHModGhpcy5zZXR0aW5ncyksXG4gICAgICAgICAgICAgICAgcGFkZGluZzogdGhpcy5nZXRQYWRkaW5nKCksXG4gICAgICAgICAgICAgICAgbWF4Wm9vbUxldmVsOiB0aGlzLnNldHRpbmdzLmluR3JpZCA/IG51bGwgOiB0aGlzLnZpZXdlclN0YXRlLm1hbmlmZXN0Lm1heFpvb20sXG4gICAgICAgICAgICAgICAgdmVydGljYWxseU9yaWVudGVkOiB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZCB8fCB0aGlzLnNldHRpbmdzLmluR3JpZCxcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHZpZXdwb3J0UG9zaXRpb24gPSB7XG4gICAgICAgICAgICAgICAgem9vbUxldmVsOiB0aGlzLnNldHRpbmdzLmluR3JpZCA/IG51bGwgOiB0aGlzLnNldHRpbmdzLnpvb21MZXZlbCxcbiAgICAgICAgICAgICAgICBhbmNob3JQYWdlOiB0aGlzLnNldHRpbmdzLmdvRGlyZWN0bHlUbyxcbiAgICAgICAgICAgICAgICB2ZXJ0aWNhbE9mZnNldDogdGhpcy52aWV3ZXJTdGF0ZS52ZXJ0aWNhbE9mZnNldCxcbiAgICAgICAgICAgICAgICBob3Jpem9udGFsT2Zmc2V0OiB0aGlzLnZpZXdlclN0YXRlLmhvcml6b250YWxPZmZzZXRcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGNvbnN0IHNvdXJjZVByb3ZpZGVyID0gdGhpcy5nZXRDdXJyZW50U291cmNlUHJvdmlkZXIoKTtcblxuICAgICAgICAgICAgaWYgKGRlYnVnLmVuYWJsZWQpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2VyaWFsaXplZCA9IE9iamVjdC5rZXlzKHJlbmRlcmVyQ29uZmlnKVxuICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChrZXkpXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRvbyBsb25nXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ga2V5ICE9PSAncGFnZUxheW91dHMnICYmIGtleSAhPT0gJ3BhZGRpbmcnO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChrZXkpXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcmVuZGVyZXJDb25maWdba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBrZXkgKyAnOiAnICsgSlNPTi5zdHJpbmdpZnkodmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuam9pbignLCAnKTtcblxuICAgICAgICAgICAgICAgIGRlYnVnKCdyZWxvYWQgd2l0aCAlcycsIHNlcmlhbGl6ZWQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnJlbmRlcmVyLmxvYWQocmVuZGVyZXJDb25maWcsIHZpZXdwb3J0UG9zaXRpb24sIHNvdXJjZVByb3ZpZGVyKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHF1ZXVlZEV2ZW50cy5mb3JFYWNoKCAocGFyYW1zKSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICB0aGlzLnB1Ymxpc2guYXBwbHkodGhpcywgcGFyYW1zKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuXG4gICAgLy8gSGFuZGxlcyBzd2l0Y2hpbmcgaW4gYW5kIG91dCBvZiBmdWxsc2NyZWVuIG1vZGVcbiAgICBwcmVwYXJlTW9kZUNoY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AgICAgICAgICAgIG91dGVyRWxlbWVudDogdGhpcy52aWV3ZXJTdGF0ZS5vdXRlckVsZW1lbnQsXG4gICAgICAgICAgICAgICAgaW5uZXJFbGVtZW50OiB0aGlzLnZpZXdlclN0YXRlLmlubmVyRWxlbWVudCxcbiAgICAgICAgICAgICAgICBzZXR0aW5nczogdGhpcy5zZXR0aW5nc1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgY29uc3QgaG9va3MgPSB7XG4gICAgICAgICAgICAgICAgb25WaWV3V2lsbExvYWQ6ICgpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdIYW5kbGVyLm9uVmlld1dpbGxMb2FkKCk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBvblZpZXdEaWRMb2FkOiAoKSA9PlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVQYWdlT3ZlcmxheXMoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3SGFuZGxlci5vblZpZXdEaWRMb2FkKCk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBvblZpZXdEaWRVcGRhdGU6IChwYWdlcywgdGFyZ2V0UGFnZSkgPT5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlUGFnZU92ZXJsYXlzKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld0hhbmRsZXIub25WaWV3RGlkVXBkYXRlKHBhZ2VzLCB0YXJnZXRQYWdlKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9uVmlld0RpZFRyYW5zaXRpb246ICgpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVBhZ2VPdmVybGF5cygpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb25QYWdlV2lsbExvYWQ6IChwYWdlSW5kZXgpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnB1Ymxpc2goJ1BhZ2VXaWxsTG9hZCcsIHBhZ2VJbmRleCk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBvblpvb21MZXZlbFdpbGxDaGFuZ2U6ICh6b29tTGV2ZWwpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnB1Ymxpc2goJ1pvb21MZXZlbFdpbGxDaGFuZ2UnLCB6b29tTGV2ZWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUucmVuZGVyZXIgPSBuZXcgUmVuZGVyZXIob3B0aW9ucywgaG9va3MpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0Q3VycmVudFNvdXJjZVByb3ZpZGVyICgpXG4gICAge1xuICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5pbkdyaWQpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGNvbnN0IGdyaWRTb3VyY2VQcm92aWRlciA9IHtcbiAgICAgICAgICAgICAgICBnZXRBbGxab29tTGV2ZWxzRm9yUGFnZTogKHBhZ2UpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW2dyaWRTb3VyY2VQcm92aWRlci5nZXRCZXN0Wm9vbUxldmVsRm9yUGFnZShwYWdlKV07XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBnZXRCZXN0Wm9vbUxldmVsRm9yUGFnZTogKHBhZ2UpID0+XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSB0aGlzLnNldHRpbmdzLm1hbmlmZXN0LmdldFBhZ2VJbWFnZVVSTChwYWdlLmluZGV4LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogcGFnZS5kaW1lbnNpb25zLndpZHRoXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IDEsIC8vIEZJWE1FXG4gICAgICAgICAgICAgICAgICAgICAgICByb3dzOiAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sczogMSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbGVzOiBbe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpvb21MZXZlbDogMSwgLy8gRklYTUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3c6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpbWVuc2lvbnM6IHBhZ2UuZGltZW5zaW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICByZXR1cm4gZ3JpZFNvdXJjZVByb3ZpZGVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdGlsZURpbWVuc2lvbnMgPSB7XG4gICAgICAgICAgICB3aWR0aDogdGhpcy5zZXR0aW5ncy50aWxlV2lkdGgsXG4gICAgICAgICAgICBoZWlnaHQ6IHRoaXMuc2V0dGluZ3MudGlsZUhlaWdodFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBnZXRCZXN0Wm9vbUxldmVsRm9yUGFnZTogKHBhZ2UpID0+XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2V0dGluZ3MubWFuaWZlc3QuZ2V0UGFnZUltYWdlVGlsZXMocGFnZS5pbmRleCwgTWF0aC5jZWlsKHRoaXMuc2V0dGluZ3Muem9vbUxldmVsKSwgdGlsZURpbWVuc2lvbnMpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdldEFsbFpvb21MZXZlbHNGb3JQYWdlOiAocGFnZSkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjb25zdCBsZXZlbHMgPSBbXTtcbiAgICAgICAgICAgICAgICBjb25zdCBsZXZlbENvdW50ID0gdGhpcy52aWV3ZXJTdGF0ZS5tYW5pZmVzdC5tYXhab29tO1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgbGV2ZWw9MDsgbGV2ZWwgPD0gbGV2ZWxDb3VudDsgbGV2ZWwrKylcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGxldmVscy5wdXNoKHRoaXMuc2V0dGluZ3MubWFuaWZlc3QuZ2V0UGFnZUltYWdlVGlsZXMocGFnZS5pbmRleCwgbGV2ZWwsIHRpbGVEaW1lbnNpb25zKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV2ZWxzLnJldmVyc2UoKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBsZXZlbHM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZ2V0UGFkZGluZyAoKVxuICAgIHtcbiAgICAgICAgbGV0IHRvcFBhZGRpbmcsIGxlZnRQYWRkaW5nO1xuICAgICAgICBsZXQgZG9jVlBhZGRpbmcsIGRvY0hQYWRkaW5nO1xuXG4gICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmluR3JpZClcbiAgICAgICAge1xuICAgICAgICAgICAgZG9jVlBhZGRpbmcgPSB0aGlzLnNldHRpbmdzLmZpeGVkUGFkZGluZztcbiAgICAgICAgICAgIHRvcFBhZGRpbmcgPSBsZWZ0UGFkZGluZyA9IGRvY0hQYWRkaW5nID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRvcFBhZGRpbmcgPSB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZCA/IHRoaXMudmlld2VyU3RhdGUudmVydGljYWxQYWRkaW5nIDogMDtcbiAgICAgICAgICAgIGxlZnRQYWRkaW5nID0gdGhpcy5zZXR0aW5ncy52ZXJ0aWNhbGx5T3JpZW50ZWQgPyAwIDogdGhpcy52aWV3ZXJTdGF0ZS5ob3Jpem9udGFsUGFkZGluZztcblxuICAgICAgICAgICAgZG9jVlBhZGRpbmcgPSB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZCA/IDAgOiB0aGlzLnZpZXdlclN0YXRlLnZlcnRpY2FsUGFkZGluZztcbiAgICAgICAgICAgIGRvY0hQYWRkaW5nID0gdGhpcy5zZXR0aW5ncy52ZXJ0aWNhbGx5T3JpZW50ZWQgPyB0aGlzLnZpZXdlclN0YXRlLmhvcml6b250YWxQYWRkaW5nIDogMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBkb2N1bWVudDoge1xuICAgICAgICAgICAgICAgIHRvcDogZG9jVlBhZGRpbmcsXG4gICAgICAgICAgICAgICAgYm90dG9tOiBkb2NWUGFkZGluZyxcbiAgICAgICAgICAgICAgICBsZWZ0OiBkb2NIUGFkZGluZyxcbiAgICAgICAgICAgICAgICByaWdodDogZG9jSFBhZGRpbmdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBwYWdlOiB7X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Zyb206IGluaXRpYWxab29tTGV2ZWwsXG4gICAgICAgICAgICAgICAgICAgIHRvOiBuZXdab29tTGV2ZWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2V0UG9zaXRpb246IChwYXJhbWV0ZXJzKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRQb3NpdGlvbkZvclpvb21MZXZlbChwYXJhbWV0ZXJzLnpvb21MZXZlbCwgaW5pdGlhbFpvb21MZXZlbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb25FbmQ6IChpbmZvKSA9PlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnRPYmplY3QuYWRkRXZlbnRMaXN0ZW5lcignc2Nyb2xsJywgdGhpcy5ib3VuZFNjcm9sbEZ1bmN0aW9uKTtcblxuICAgICAgICAgICAgICAgIGlmIChpbmZvLmludGVycnVwdGVkKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLm9sZFpvb21MZXZlbCA9IG5ld1pvb21MZXZlbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gRGVhY3RpdmF0ZSB6b29tIGJ1dHRvbnMgd2hpbGUgem9vbWluZ1xuICAgICAgICBsZXQgem9vbUluQnV0dG9uID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQodGhpcy5zZXR0aW5ncy5zZWxlY3RvciArICd6b29tLWluLWJ1dHRvbicpO1xuICAgICAgICBsZXQgem9vbU91dEJ1dHRvbiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuc2V0dGluZ3Muc2VsZWN0b3IgKyAnem9vbS1vdXQtYnV0dG9uJyk7XG4gICAgICAgIHpvb21JbkJ1dHRvbi5kaXNhYmxlZCA9IHRydWU7XG4gICAgICAgIHpvb21PdXRCdXR0b24uZGlzYWJ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ZUNsaWNrKGV2ZW50LCBjb29yZHMpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBvblJlc2l6ZSAoKVxuICAgIHtcbiAgICAgICAgdGhpcy51cGRhdGVQYW5lbFNpemUoKTtcbiAgICAgICAgLy8gQ2FuY2VsIGFueSBwcmV2aW91c2x5LXNldCByZXNpemUgdGltZW91dHNcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMudmlld2VyU3RhdGUucmVzaXplVGltZXIpO1xuXG4gICAgICAgIHRoaXMudmlld2VyU3RhdGUucmVzaXplVGltZXIgPSBzZXRUaW1lb3V0KCAoKSA9PlxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCBwYWdlT2Zmc2V0ID0gdGhpcy52aWV3ZXJTdGF0ZS5yZW5kZXJlci5sYXlvdXQuZ2V0UGFnZVRvVmlld3BvcnRDZW50ZXJPZmZzZXQodGhpcy5zZXR0aW5ncy5hY3RpdmVQYWdlSW5kZXgsIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQpO1xuXG4gICAgICAgICAgICBpZiAocGFnZU9mZnNldClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbG9hZFZpZXdlcih7XG4gICAgICAgICAgICAgICAgICAgIGdvRGlyZWN0bHlUbzogdGhpcy5zZXR0aW5ncy5hY3RpdmVQYWdlSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgIHZlcnRpY2FsT2Zmc2V0OiBwYWdlT2Zmc2V0LnksXG4gICAgICAgICAgICAgICAgICAgIGhvcml6b250YWxPZmZzZXQ6IHBhZ2VPZmZzZXQueFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMucmVsb2FkVmlld2VyKHtcbiAgICAgICAgICAgICAgICAgICAgZ29EaXJlY3RseVRvOiB0aGlzLnNldHRpbmdzLmFjdGl2ZVBhZ2VJ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gICAgICAgIHJldHVybiB0cnVlO1xuXG4gICAgICAgICAgICAvLyBTcGFjZSBvciBwYWdlIGRvd24gLSBnbyB0byB0aGUgbmV4dCBwYWdlXG4gICAgICAgICAgICBpZiAoKHRoaXMuc2V0dGluZ3MuZW5hYmxlU3BhY2VTY3JvbGwgJiYgIWV2ZW50LnNoaWZ0S2V5ICYmIGV2ZW50LmtleUNvZGUgPT09IHNwYWNlS2V5KSB8fCAodGhpcy5zZXR0aW5ncy5lbmFibGVLZXlTY3JvbGwgJiYgZXZlbnQua2V5Q29kZSA9PT0gcGFnZURvd25LZXkpKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMudmlld2VyU3RhdGUudmlld3BvcnQudG9wICs9IHRoaXMuc2V0dGluZ3MucGFuZWxIZWlnaHQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIXRoaXMuc2V0dGluZ3MuZW5hYmxlU3BhY2VTY3JvbGwgJiYgZXZlbnQua2V5Q29kZSA9PT0gc3BhY2VLZXkpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuZW5hYmxlS2V5U2Nyb2xsKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIERvbid0IHN0ZWFsIGtleWJvYXJkIHNob3J0Y3V0cyAobWV0YUtleSA9IGNvbW1hbmQgW09TIFhdLCBzdXBlciBbV2luL0xpbnV4XSlcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnQuc2hpZnRLZXkgfHwgZXZlbnQuY3RybEtleSB8fCBldmVudC5tZXRhS2V5KVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIHN3aXRjaCAoZXZlbnQua2V5Q29kZSlcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgcGFnZVVwS2V5OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUGFnZSB1cCAtIGdvIHRvIHRoZSBwcmV2aW91cyBwYWdlXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LnRvcCAtPSB0aGlzLnNldHRpbmdzLnBhbmVsSGVpZ2h0O1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgdXBBcnJvd0tleTpcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwIGFycm93IC0gc2Nyb2xsIHVwXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LnRvcCAtPSB0aGlzLnNldHRpbmdzLmFycm93U2Nyb2xsQW1vdW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgZG93bkFycm93S2V5OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG93biBhcnJvdyAtIHNjcm9sbCBkb3duXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LnRvcCArPSB0aGlzLnNldHRpbmdzLmFycm93U2Nyb2xsQW1vdW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgbGVmdEFycm93S2V5OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTGVmdCBhcnJvdyAtIHNjcm9sbCBsZWZ0XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdlclN0YXRlLnZpZXdwb3J0LmxlZnQgLT0gdGhpcy5zZXR0aW5ncy5hcnJvd1Njcm9sbEFtb3VudDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIHJpZ2h0QXJyb3dLZXk6XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBSaWdodCBhcnJvdyAtIHNjcm9sbCByaWdodFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC5sZWZ0ICs9IHRoaXMuc2V0dGluZ3MuYXJyb3dTY3JvbGxBbW91bnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSBob21lS2V5OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSG9tZSBrZXkgLSBnbyB0byB0aGUgYmVnaW5uaW5nIG9mIHRoZSBkb2N1bWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC50b3AgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgZW5kS2V5OlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gRW5kIGtleSAtIGdvIHRvIHRoZSBlbmQgb2YgdGhlIGRvY3VtZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBDb3VudCBvbiB0aGUgdmlld3BvcnQgY29vcmRpbmF0ZSB2YWx1ZSBiZWluZyBub3JtYWxpemVkXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy52ZXJ0aWNhbGx5T3JpZW50ZWQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC50b3AgPSBJbmZpbml0eTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZpZXdl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XG4gICAgICAgIGlmIChuZWVkc1hDb29yZClcbiAgICAgICAge1xuICAgICAgICAgICAgLy8gRklYTUU6IFdoYXQgaWYgaW5Cb29rTGF5b3V0L3ZlcnRpY2FsbHlPcmllbnRlZCBpcyBjaGFuZ2VkIGJ5IGxvYWRPcHRpb25zP1xuICAgICAgICAgICAgaWYgKGxvYWRPcHRpb25zLmdvRGlyZWN0bHlUbyA9PT0gMCAmJiB0aGlzLnNldHRpbmdzLmluQm9va0xheW91dCAmJiB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAvLyBpZiBpbiBib29rIGxheW91dCwgY2VudGVyIHRoZSBmaXJzdCBvcGVuaW5nIGJ5IGRlZmF1bHRcbiAgICAgICAgICAgICAgICBsb2FkT3B0aW9ucy5ob3Jpem9udGFsT2Zmc2V0ID0gdGhpcy52aWV3ZXJTdGF0ZS5ob3Jpem9udGFsUGFkZGluZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBhbmNob3JlZEhvcml6b250YWxseSA9IHRydWU7XG4gICAgICAgICAgICAgICAgbG9hZE9wdGlvbnMuaG9yaXpvbnRhbE9mZnNldCA9IHRoaXMuZ2V0WE9mZnNldChsb2FkT3B0aW9ucy5nb0RpcmVjdGx5VG8sIFwiY2VudGVyXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG5lZWRzWUNvb3JkKVxuICAgICAgICB7XG4gICAgICAgICAgICBhbmNob3JlZFZlcnRpY2FsbHkgPSB0cnVlO1xuICAgICAgICAgICAgbG9hZE9wdGlvbnMudmVydGljYWxPZmZzZXQgPSB0aGlzLmdldFlPZmZzZXQobG9hZE9wdGlvbnMuZ29EaXJlY3RseVRvLCBcInRvcFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucmVsb2FkV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pb25zKVxuICAgIHtcbiAgICAgICAgY29uc3QgbGF5b3V0ID0gdGhpcy52aWV3ZXJTdGF0ZS5yZW5kZXJlci5sYXlvdXQ7XG4gICAgICAgIGNvbnN0IHJlZ2lvbiA9IGxheW91dC5nZXRQYWdlUmVnaW9uKHBhZ2VJbmRleCwgb3B0aW9ucyk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMgJiYgb3B0aW9ucy5pbmNvcnBvcmF0ZVZpZXdwb3J0KVxuICAgICAgICB7XG4gICAgICAgICAgICBjb25zdCBzZWNvbmRhcnlEaW0gPSB0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZCA/ICd3aWR0aCcgOiAnaGVpZ2h0JztcblxuICAgICAgICAgICAgaWYgKHRoaXMudmlld2VyU3RhdGUudmlld3BvcnRbc2Vjb25kYXJ5RGltXSA+IGxheW91dC5kaW1lbnNpb25zW3NlY29uZGFyeURpbV0pXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3QgZG9jT2Zmc2V0ID0gKHRoaXMudmlld2VyU3RhdGUudmlld3BvcnRbc2Vjb25kYXJ5RGltXSAtIGxheW91dC5kaW1lbnNpb25zW3NlY29uZGFyeURpbV0pIC8gMjtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNldHRpbmdzLnZlcnRpY2FsbHlPcmllbnRlZClcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3A6IHJlZ2lvbi50b3AsXG4gICAgICAgICAgICAgICAgICAgICAgICBib3R0b206IHJlZ2lvbi5ib3R0b20sXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IHJlZ2lvbi5sZWZ0ICsgZG9jT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IHJlZ2lvbi5yaWdodCArIGRvY09mZnNldFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiByZWdpb24udG9wICsgZG9jT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tOiByZWdpb24uYm90dG9tICsgZG9jT2Zmc2V0LFxuXG4gICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiByZWdpb24ubGVmdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJpZ2h0OiByZWdpb24ucmlnaHRcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVnaW9uO1xuICAgIH1cblxuICAgIGdldFBhZ2VQb3NpdGlvbkF0Vmlld3BvcnRPZmZzZXQgKGNvb3JkcylcbiAgICB7XG4gICAgICAgIGNvbnN0IGRvY0Nvb3JkcyA9IHtcbiAgICAgICAgICAgIGxlZnQ6IGNvb3Jkcy5sZWZ0ICsgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC5sZWZ0LFxuICAgICAgICAgICAgdG9wOiBjb29yZHMudG9wICsgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydC50b3BcbiAgICAgICAgfTtcblxuICAgICAgICBjb25zdCByZW5kZXJlZFBhZ2VzID0gdGhpcy52aWV3ZXJTdGF0ZS5yZW5kZXJlci5nZXRSZW5kZXJlZFBhZ2VzKCk7XG4gICAgICAgIGNvbnN0IHBhZ2VDb3VudCA9IHJlbmRlcmVkUGFnZXMubGVuZ3RoO1xuXG4gICAgICAgIC8vIEZpbmQgdGhlIHBhZ2Ugb24gd2hpY2ggdGhlIGNvb3JkcyBvY2N1clxuICAgICAgICBmb3IgKGxldCBpPTA7IGkgPCBwYWdlQ291bnQ7IGkrKylcbiAgICAgICAge1xuIC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G9yYXRlWm9vbSA9IChpbWFnZURpbWVuc2lvbiwgem9vbURpZmZlcmVuY2UpID0+IGltYWdlRGltZW5zaW9uIC8gKE1hdGgucG93KDIsIHpvb21EaWZmZXJlbmNlKSk7XG5cbmNvbnN0IGdldE90aGVySW1hZ2VEYXRhID0gKG90aGVySW1hZ2VzLCBsb3dlc3RNYXhab29tKSA9Plxue1xuICAgIHJldHVybiBvdGhlckltYWdlcy5tYXAoIChpdG0pID0+XG4gICAge1xuICAgICAgICBjb25zdCB3ID0gaXRtLndpZHRoO1xuICAgICAgICBjb25zdCBoID0gaXRtLmhlaWdodDtcbiAgICAgICAgY29uc3QgaW5mbyA9IHBhcnNlSW1hZ2VJbmZvKGl0bSk7XG4gICAgICAgIGNvbnN0IHVybCA9IGluZm8udXJsLnNsaWNlKC0xKSAhPT0gJy8nID8gaW5mby51cmwgKyAnLycgOiBpbmZvLnVybDsgIC8vIGFwcGVuZCB0cmFpbGluZyBzbGFzaCB0byB1cmwgaWYgaXQncyBub3QgdGhlcmUuXG5cbiAgICAgICAgY29uc3QgZGltcyA9IG5ldyBBcnJheShsb3dlc3RNYXhab29tICsgMSk7XG4gICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgbG93ZXN0TWF4Wm9vbSArIDE7IGorKylcbiAgICAgICAge1xuICAgICAgICAgICAgZGltc1tqXSA9IHtcbiAgICAgICAgICAgICAgICBoOiBNYXRoLmZsb29yKGluY29ycG9yYXRlWm9vbShoLCBsb3dlc3RNYXhab29tIC0gaikpLFxuICAgICAgICAgICAgICAgIHc6IE1hdGguZmxvb3IoaW5jb3Jwb3JhdGVab29tKHcsIGxvd2VzdE1heFpvb20gLSBqKSlcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZjogaW5mby51cmwsXG4gICAgICAgICAgICB1cmw6IHVybCxcbiAgICAgICAgICAgIGlsOiBpdG0ubGFiZWwgfHwgXCJcIixcbiAgICAgICAg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XG4gICAgfTtcblxuICAgIGlmICh4eXdoLmxlbmd0aClcbiAgICB7XG4gICAgICAgIC8vIHBhcnNlIGludG8gc2VwYXJhdGUgY29tcG9uZW50c1xuICAgICAgICBjb25zdCBkaW1lbnNpb25zID0geHl3aC5zcGxpdCgnLCcpO1xuICAgICAgICBpbWFnZUluZm8ueCA9IHBhcnNlSW50KGRpbWVuc2lvbnNbMF0sIDEwKTtcbiAgICAgICAgaW1hZ2VJbmZvLnkgPSBwYXJzZUludChkaW1lbnNpb25zWzFdLCAxMCk7XG4gICAgICAgIGltYWdlSW5mby53ID0gcGFyc2VJbnQoZGltZW5zaW9uc1syXSwgMTApO1xuICAgICAgICBpbWFnZUluZm8uaCA9IHBhcnNlSW50KGRpbWVuc2lvbnNbM10sIDEwKTtcbiAgICB9XG5cbiAgICByZXR1cm4gaW1hZ2VJbmZvO1xufVxuIiwiZXhwb3J0IGRlZmF1bHQgY2xhc3MgSUlJRlNvdXJjZUFkYXB0ZXJcbntcbiAgICBnZXRQYWdlSW1hZ2VVUkwgKG1hbmlmZXN0LCBwYWdlSW5kZXgsIHNpemUpXG4gICAge1xuICAgICAgICBsZXQgZGltZW5zO1xuXG4gICAgICAgIGlmICghc2l6ZSB8fCAoc2l6ZS53aWR0aCA9PSBudWxsICYmIHNpemUuaGVpZ2h0ID09IG51bGwpKVxuICAgICAgICB7XG4gICAgICAgICAgICBkaW1lbnMgPSAnZnVsbCc7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICBkaW1lbnMgPSAoc2l6ZS53aWR0aCA9PSBudWxsID8gJycgOiBzaXplLndpZHRoKSArICcsJyArIChzaXplLmhlaWdodCA9PSBudWxsID8gJycgOiBzaXplLmhlaWdodCk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYWdlID0gbWFuaWZlc3QucGFnZXNbcGFnZUluZGV4XTtcbiAgICAgICAgY29uc3QgcXVhbGl0eSA9IChwYWdlLmFwaSA+IDEuMSkgPyAnZGVmYXVsdCcgOiAnbmF0aXZlJztcblxuICAgICAgICByZXR1cm4gZW5jb2RlVVJJKHBhZ2UudXJsICsgJ2Z1bGwvJyArIGRpbWVucyArICcvMC8nICsgcXVhbGl0eSArICcuanBnJyk7XG4gICAgfVxuXG4gICAgZ2V0VGlsZUltYWdlVVJMIChtYW5pZmVzdCwgcGFnZUluZGV4LCBwYXJhbXMpXG4gICAge1xuICAgICAgICBjb25zdCBwYWdlID0gbWFuaWZlc3QucGFnZXNbcGFnZUluZGV4XTtcblxuICAgICAgICBsZXQgaGVpZ2h0LCB3aWR0aDtcblxuICAgICAgICBpZiAocGFyYW1zLnJvdyA9PT0gcGFyYW1zLnJvd0NvdW50IC0gMSlcbiAgICAgICAge1xuICAgICAgICAgICAgaGVpZ2h0ID0gcGFnZS5kW3BhcmFtcy56b29tTGV2ZWxdLmggLSAocGFyYW1zLnJvd0NvdW50IC0gMSkgKiBwYXJhbXMudGlsZURpbWVuc2lvbnMuaGVpZ2h0O1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgaGVpZ2h0ID0gcGFyYW1zLnRpbGVEaW1lbnNpb25zLmhlaWdodDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChwYXJhbXMuY29sID09PSBwYXJhbXMuY29sQ291bnQgLSAxKVxuICAgICAgICB7XG4gICAgICAgICAgICB3aWR0aCA9IHBhZ2UuZFtwYXJhbXMuem9vbUxldmVsXS53IC0gKHBhcmFtcy5jb2xDb3VudCAtIDEpICogcGFyYW1zLnRpbGVEaW1lbnNpb25zLndpZHRoO1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgd2lkdGggPSBwYXJhbXMudGlsZURpbWVuc2lvbnMud2lkdGg7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB6b29tRGlmZmVyZW5jZSA9IE1hdGgucG93KDIsIG1hbmlmZXN0Lm1heFpvb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scyA9IE1hdGguY2VpbChwYWdlLmRbem9vbUxldmVsXS53IC8gdGlsZURpbWVuc2lvbnMud2lkdGgpO1xuXG4gICAgICAgIGNvbnN0IHRpbGVzID0gW107XG5cbiAgICAgICAgbGV0IHJvdywgY29sLCB1cmw7XG5cbiAgICAgICAgZm9yIChyb3cgPSAwOyByb3cgPCByb3dzOyByb3crKylcbiAgICAgICAge1xuICAgICAgICAgICAgZm9yIChjb2wgPSAwOyBjb2wgPCBjb2xzOyBjb2wrKylcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLl91cmxBZGFwdGVyLmdldFRpbGVJbWFnZVVSTCh0aGlzLCBwYWdlSW5kZXgsIHtcbiAgICAgICAgICAgICAgICAgICAgcm93OiByb3csXG4gICAgICAgICAgICAgICAgICAgIGNvbDogY29sLFxuICAgICAgICAgICAgICAgICAgICByb3dDb3VudDogcm93cyxcbiAgICAgICAgICAgICAgICAgICAgY29sQ291bnQ6IGNvbHMsXG4gICAgICAgICAgICAgICAgICAgIHpvb21MZXZlbDogem9vbUxldmVsLFxuICAgICAgICAgICAgICAgICAgICB0aWxlRGltZW5zaW9uczogdGlsZURpbWVuc2lvbnNcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIEZJWE1FOiBEaW1lbnNpb25zIHNob3VsZCBhY2NvdW50IGZvciBwYXJ0aWFsIHRpbGVzIChlLmcuIHRoZVxuICAgICAgICAgICAgICAgIC8vIGxhc3Qgcm93IGFuZCBjb2x1bW4gaW4gYSB0aWxlZCBpbWFnZSlcbiAgICAgICAgICAgICAgICB0aWxlcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgcm93OiByb3csXG4gICAgICAgICAgICAgICAgICAgIGNvbDogY29sLFxuICAgICAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IHpvb21MZXZlbCxcbiAgICAgICAgICAgICAgICAgICAgZGltZW5zaW9uczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiB0aWxlRGltZW5zaW9ucy5oZWlnaHQsXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogdGlsZURpbWVuc2lvbnMud2lkdGhcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3A6IHJvdyAqIHRpbGVEaW1lbnNpb25zLmhlaWdodCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IGNvbCAqIHRpbGVEaW1lbnNpb25zLndpZHRoXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHVybDogdXJsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgem9vbUxldmVsOiB6b29tTGV2ZWwsXG4gICAgICAgICAgICByb3dzOiByb3dzLFxuICAgICAgICAgICAgY29sczogY29scyxcbiAgICAgICAgICAgIHRpbGVzOiB0aWxlc1xuICAgICAgICB9O1xuICAgIH1cbn1cblxuSW1hZ2VNYW5pZmVzdC5wcm90b3R5cGUuZ2V0TWF4V2lkdGggPSB6b29tZWRQcm9wZXJ0eUdldHRlcignX21heFdpZHRocycpO1xuSW1hZ2VNYW5pZmVzdC5wcm90b3R5cGUuZ2V0TWF4SGVpZ2h0ID0gem9vbWVkUHJvcGVydHlHZXR0ZXIoJ19tYXhIZWlnaHRzJyk7XG5JbWFnZU1hbmlmZXN0LnByb3RvdHlwZS5nZXRBdmVyYWdlV2lkdGggPSB6b29tZWRQcm9wZXJ0eUdldHRlcignX2F2ZXJhZ2VXaWR0aHMnKTtcbkltYWdlTWFuaWZlc3QucHJvdG90eXBlLmdldEF2ZXJhZ2VIZWlnaHQgPSB6b29tZWRQcm9wZXJ0eUdldHRlcignX2F2ZXJhZ2VIZWlnaHRzJyk7XG5JbWFnZU1hbmlmZXN0L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ICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKGF0dHJzLCBiYXNlKTtcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgcmV0dXJuIGF0dHJzO1xuICAgIH1cblxuXG4gICAgLyoqIENvbnZlbmllbmNlIGZ1bmN0aW9uIHRvIHN1YnNjcmliZSB0byBhIERpdmEgZXZlbnQgKi9cbiAgICBfc3Vic2NyaWJlIChldmVudCwgY2FsbGJhY2spXG4gICAge1xuICAgICAgICBkaXZhLkV2ZW50cy5zdWJzY3JpYmUoZXZlbnQsIGNhbGxiYWNrLCB0aGlzLnNldHRpbmdzLklEKTtcbiAgICB9XG5cblxuICAgIGNyZWF0ZUJ1dHRvbiAobmFtZSwgbGFiZWwsIGNhbGxiYWNrLCBpY29uKVxuICAgIHtcbiAgICAgICAgY29uc3QgYnV0dG9uID0gZWx0KCdidXR0b24nLCB7XG4gICAgICAgICAgICB0eXBlOiAnYnV0dG9uJyxcbiAgICAgICAgICAgIGlkOiB0aGlzLnNldHRpbmdzLklEICsgbmFtZSxcbiAgICAgICAgICAgIGNsYXNzOiAnZGl2YS0nICsgbmFtZSArICcgZGl2YS1idXR0b24nLFxuICAgICAgICAgICAgdGl0bGU6IGxhYmVsLFxuICAgICAgICAgICAgJ2FyaWEtbGFiZWwnOiBsYWJlbFxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoaWNvbilcbiAgICAgICAgICAgIGJ1dHRvbi5hcHBlbmRDaGlsZChpY29uKTtcblxuICAgICAgICBpZiAoY2FsbGJhY2spXG4gICAgICAgICAgICBidXR0b24uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBjYWxsYmFjayk7XG5cbiAgICAgICAgcmV0dXJuIGJ1dHRvbjtcbiAgICB9XG5cbiAgICBjcmVhdGVMYWJlbCAobmFtZSwgaWQsIGxhYmVsLCBpbm5lck5hbWUsIGlubmVyVmFsdWUpXG4gICAge1xuICAgICAgICByZXR1cm4gZWx0KCdkaXYnLCB7IGlkOiB0aGlz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nXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbnN0IHVwZGF0ZUN1cnJlbnRQYWdlID0gKCkgPT5cbiAgICAgICAge1xuICAgICAgICAgICAgLy8gZ2V0IGxhYmVscyBmb3IgaW5kZXggcmFuZ2VcbiAgICAgICAgICAgIGxldCBpbmRpY2VzID0gdGhpcy52aWV3ZXIuZ2V0Q3VycmVudFBhZ2VJbmRpY2VzKCk7XG4gICAgICAgICAgICBsZXQgc3RhcnRJbmRleCA9IGluZGljZXNbMF07XG4gICAgICAgICAgICBsZXQgZW5kSW5kZXggPSBpbmRpY2VzW2luZGljZXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICBsZXQgc3RhcnRMYWJlbCA9IHRoaXMuc2V0dGluZ3MubWFuaWZlc3QucGFnZXNbc3RhcnRJbmRleF0ubDtcbiAgICAgICAgICAgIGxldCBlbmRMYWJlbCA9IHRoaXMuc2V0dGluZ3MubWFuaWZlc3QucGFnZXNbZW5kSW5kZXhdLmw7XG5cbiAgICAgICAgICAgIGlmIChzdGFydEluZGV4ICE9PSBlbmRJbmRleClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgIFx0aWYgKHRoaXMuc2V0dGluZ3MuZW5hYmxlSW5kZXhBc0xhYmVsKVxuICAgICAgICAgICAgICAgIFx0Y3VycmVudFBhZ2UudGV4dENvbnRlbnQgPSBzdGFydEluZGV4ICsgXCIgLSBcIiArIGVuZEluZGV4O1xuICAgICAgICAgICAgXHRlbHNlXG4gICAgICAgICAgICBcdFx0Y3VycmVudFBhZ2UudGV4dENvbnRlbnQgPSBzdGFydExhYmVsICsgXCIgLSBcIiArIGVuZExhYmVsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICBcdHtcbiAgICAgICAgICAgIFx0aWYgKHRoaXMuc2V0dGluZ3MuZW5hYmxlSW5kZXhBc0xhYmVsKVxuICAgICAgICAgICAgXHRcdGN1cnJlbnRQYWdlLnRleHRDb250ZW50ID0g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lbnRMaXN0ZW5lcihldmVudCwgKCkgPT4ge1xuICAgICAgICAgICAgICAgIGlucHV0U3VnZ2VzdGlvbnMuaW5uZXJIVE1MID0gJyc7IC8vIFJlbW92ZSBhbGwgcHJldmlvdXMgc3VnZ2VzdGlvbnNcblxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gZ290b1BhZ2VJbnB1dC52YWx1ZTtcbiAgICAgICAgICAgICAgICBsZXQgbnVtU3VnZ2VzdGlvbnMgPSAwO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmVuYWJsZUdvdG9TdWdnZXN0aW9ucyAmJiB2YWx1ZSlcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhZ2VzID0gdGhpcy5zZXR0aW5ncy5tYW5pZmVzdC5wYWdlcztcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDAsIGxlbiA9IHBhZ2VzLmxlbmd0aDsgaSA8IGxlbiAmJiBudW1TdWdnZXN0aW9ucyA8IDEwOyBpKyspXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYWdlc1tpXS5sLnRvTG93ZXJDYXNlKCkuaW5kZXhPZih2YWx1ZS50b0xvd2VyQ2FzZSgpKSA+IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld0lucHV0U3VnZ2VzdGlvbiA9IGVsdCgnZGl2Jywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6ICdkaXZhLWlucHV0LXN1Z2dlc3Rpb24nXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2VzW2ldLmxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRTdWdnZXN0aW9ucy5hcHBlbmRDaGlsZChuZXdJbnB1dFN1Z2dlc3Rpb24pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtU3VnZ2VzdGlvbnMrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIFNob3cgbGFiZWwgc3VnZ2VzdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgaWYgKG51bVN1Z2dlc3Rpb25zID4gMClcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0U3VnZ2VzdGlvbnMuc3R5bGUuZGlzcGxheSA9ICdibG9jayc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRTdWdnZXN0aW9ucy5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGdvdG9QYWdlSW5wdXQuYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsIGUgPT4ge1xuICAgICAgICAgICAgbGV0IGVsO1xuICAgICAgICAgICAgaWYgKGUua2V5Q29kZSA9PT0gMTMpIC8vICdFbnRlcicga2V5XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgY29uc3QgYWN0aXZlID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgnYWN0aXZlJylbMF07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3RpdmUgIT09ICd1bmRlZmluZWQnKVxuICAgICAgICAgICAgICAgICAgICBnb3RvUGFnZUlucHV0LnZhbHVlID0gYWN0aXZlLmlubmVyVGV4dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChlLmtleUNvZGUgPT09IDM4KSAvLyBVcCBhcnJvdyBrZXlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBlbCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2FjdGl2ZScpWzBdO1xuICAgICAgICAgICAgICAgIGNvbnN0IHByZXZFbCA9IGVsID8gZWwucHJldmlvdXNTaWJsaW5nIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcHJldkVsICE9PSAndW5kZWZpbmVkJylcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGVsLmNsYXNzTGlzdC5yZW1vdmUoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocHJldkVsICE9PSBudWxsKVxuICAgICAgICAgICAgICAgICAgICAgICAgcHJldkVsLmNsYXNzTGlzdC5hZGQoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbGFzdCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2RpdmEtaW5wdXQtc3VnZ2VzdGlvbicpLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2RpdmEtaW5wdXQtc3VnZ2VzdGlvbicpW2xhc3RdLmNsYXNzTGlzdC5hZGQoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGUua2V5Q29kZSA9PT0gNDApIC8vIERvd24gYXJyb3cga2V5XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdhY3RpdmUnKVswXTtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXh0RWwgPSBlbCA/IGVsLm5leHRTaWJsaW5nIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbmV4dEVsICE9PSAndW5kZWZpbmVkJylcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGVsLmNsYXNzTGlzdC5yZW1vdmUoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobmV4dEVsICE9PSBudWxsKVxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dEVsLmNsYXNzTGlzdC5hZGQoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdkaXZhLWlucHV0LXN1Z2dlc3Rpb24nKVswXS5jbGFzc0xpc3QuYWRkKCdhY3RpdmUnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIG9uRXZlbnQoaW5wdXRTdWdnZXN0aW9ucywgJ21vdXNlZG93bicsICcuZGl2YS1pbnB1dC1zdWdnZXN0aW9uJywgZnVuY3Rpb24gKClcbiAgICAgICAge1xuICAgICAgICAgICAgZ290b1BhZ2VJbnB1dC52YWx1ZSA9IHRoaXMudGV4dENvbnRlbnQ7XG4gICAgICAgICAgICBpbnB1dFN1Z2dlc3Rpb25zLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gICAgICAgICAgICBsZXQgc3VibWl0RXZlbnQgPSBuZXcgRXZlbnQoJ3N1Ym1pdCcsIHtcbiAgICAgICAgICAgICAgICBjYW5jZWxhYmxlOiB0cnVlXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGdvdG9Gb3JtLmRpc3BhdGNoRXZlbnQoc3VibWl0RXZlbnQpO1xuICAgICAgICB9KTtcblxuICAgICAgICAvLyBqYXZhc2NyaXB0IGVxdWl2YWxlbnQgdG8ganF1ZXJ5IC5vbihldmVudCwgc2VsZWN0b3IsIGZ1bmN0aW9uKVxuICAgICAgICBmdW5jdGlvbiBvbkV2ZW50IChlbGVtLCBldnQsIHNlbCwgaGFuZGxlcilcbiAgICAgICAge1xuICAgICAgICAgICAgZWxlbS5hZGRFdmVudExpc3RlbmVyKGV2dCwgZnVuY3Rpb24gKGV2ZW50KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciB0ID0gZXZlbnQudGFyZ2V0O1xuICAgICAgICAgICAgICAgIHdoaWxlICh0ICYmIHQgIT09IHRoaXMpXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBpZiAodC5tYXRjaGVzKHNlbCkpXG4gICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVyLmNhbGwodCwgZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICB0ID0gdC5wYXJlbnROb2RlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZ290b1BhZ2VJbnB1dC5hZGRFdmVudExpc3RlbmVyKCdibHVyJywgKCkgPT4ge1xuICAgICAgICAgICAgLy8gSGlkZSBsYWJlbCBzdWdnZXN0aW9uc1xuICAgICAgICAgICAgaW5wdXRTdWdnZXN0aW9ucy5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gZ290b0Zvcm07XG4gICAgfVxuXG4gICAgY3JlYXRlVmlld01lbnUgKClcbiAgICB7XG4gICAgICAgIGNvbnN0IHZpZXdPcHRpb25zTGlzdCA9IGVsdCgnZGl2JywgdGhpcy5fZWxlbUF0dHJzKCd2aWV3LW9wdGlvbnMnKSk7XG4gICAgICAgIGNvbnN0IGdyaWRWaWV3SWNvbiA9IHRoaXMuX2NyZWF0ZUdyaWRWaWV3SWNvbigpO1xuICAgICAgICBjb25zdCBib29rVmlld0ljb24gPSB0aGlz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QoZ3JpZFZpZXdJY29uKTtcbiAgICAgICAgICAgICAgICBjaGFuZ2VWaWV3QnV0dG9uLmNsYXNzTmFtZSA9ICdkaXZhLWdyaWQtaWNvbicgKyB2aWV3SWNvbkNsYXNzZXM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0aGlzLnNldHRpbmdzLmluQm9va0xheW91dClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBjaGFuZ2VWaWV3QnV0dG9uLmFwcGVuZENoaWxkKGJvb2tWaWV3SWNvbik7XG4gICAgICAgICAgICAgICAgY2hhbmdlVmlld0J1dHRvbi5jbGFzc05hbWUgPSAnZGl2YS1ib29rLWljb24nICsgdmlld0ljb25DbGFzc2VzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGNoYW5nZVZpZXdCdXR0b24uYXBwZW5kQ2hpbGQocGFnZVZpZXdJY29uKTtcbiAgICAgICAgICAgICAgICBjaGFuZ2VWaWV3QnV0dG9uLmNsYXNzTmFtZSA9ICdkaXZhLWRvY3VtZW50LWljb24nICsgdmlld0ljb25DbGFzc2VzO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB2aWV3T3B0aW9ucyA9IGRvY3VtZW50LmNyZWF0ZURvY3VtZW50RnJhZ21lbnQoKTtcblxuICAgICAgICAgICAgLy8gdGhlbiBkaXNwbGF5IGRvY3VtZW50LCBib29rLCBhbmQgZ3JpZCBidXR0b25zIGluIHRoYXQgb3JkZXIsIGV4Y2x1ZGluZyB0aGUgY3VycmVudCB2aWV3XG4gICAgICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5pbkdyaWQgfHwgdGhpcy5zZXR0aW5ncy5pbkJvb2tMYXlvdXQpXG4gICAgICAgICAgICAgICAgdmlld09wdGlvbnMuYXBwZW5kQ2hpbGQodGhpcy5jcmVhdGVCdXR0b24oJ2RvY3VtZW50LWljb24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RoaXMuY3JlYXRlRnVsbHNjcmVlbkJ1dHRvbigpKTtcbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuZW5hYmxlR290b1BhZ2UpXG4gICAgICAgICAgICByaWdodFRvb2xzLnNwbGljZSgxLCAwLCB0aGlzLmNyZWF0ZUdvdG9QYWdlRm9ybSgpKTtcblxuICAgICAgICAvLyBhc3NpZ24gdG9vbGJhciBwbHVnaW5zIHRvIHByb3BlciBzaWRlXG4gICAgICAgIGxldCBwbHVnaW5zID0gdGhpcy52aWV3ZXIudmlld2VyU3RhdGUucGx1Z2luSW5zdGFuY2VzO1xuICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gcGx1Z2lucy5sZW5ndGg7IGkgPCBsZW47IGkrKylcbiAgICAgICAge1xuICAgICAgICAgICAgbGV0IHBsdWdpbiA9IHBsdWdpbnNbaV07XG5cbiAgICAgICAgICAgIGlmICghcGx1Z2luLnRvb2xiYXJTaWRlKSAvLyBub3QgYSB0b29sYmFyIHRvb2xcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgcGx1Z2luLnRvb2xiYXJJY29uID0gcGx1Z2luLmNyZWF0ZUljb24oKTtcbiAgICAgICAgICAgIGlmICghcGx1Z2luLnRvb2xiYXJJY29uKSAvLyBpY29uIGNvdWxkbid0IGJlIGNyZWF0ZWRcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgLy8gYWRkIHBsdWdpbiB0b29scyBhZnRlciB0aGUgZ28tdG8tcGFnZSBhbmQgcGFnZS1sYWJlbCB0b29sc1xuICAgICAgICAgICAgaWYgKHBsdWdpbi50b29sYmFyU2lkZSA9PT0gJ3JpZ2h0JylcbiAgICAgICAgICAgICAgICByaWdodFRvb2xzLnNwbGljZSgyLCAwLCBwbHVnaW4udG9vbGJhckljb24pO1xuICAgICAgICAgICAgZWxzZSBpZiAocGx1Z2luLnRvb2xiYXJTaWRlID09PSAnbGVmdCcpXG4gICAgICAgICAgICAgICAgbGVmdFRvb2xzLnNwbGljZSgyLCAwLCBwbHVnaW4udG9vbGJhckljb24pO1xuXG4gICAgICAgICAgICBwbHVnaW4udG9vbGJhckljb24uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBoYW5kbGVQbHVnaW5DbGljay5iaW5kKHRoaXMsIHBsdWdpbikpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlUGx1Z2luQ2xpY2sgKHBsdWdpbilcbiAgICAgICAge1xuICAgICAgICAgICAgcGx1Z2luLmhhbmRsZUNsaWNrKHRoaXMudmlld2VyKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRvb2xzID0gZWx0KCdkaXYnLCB0aGlzLl9lbGVtQXR0cnMoJ3Rvb2xzJyksXG4gICAgICAgICAgICAgICAgICAgIGVsdCgnZGl2JywgdGhpcy5fZWxlbUF0dHJzKCd0b29scy1sZWZ0JyksIGxlZnRUb29scyksXG4gICAgICAgICAgICAgICAgICAgIGVsdCgnZGl2JywgdGhpcy5fZWxlbUF0dHJzKCd0b29scy1yaWdodCcpLCByaWdodFRvb2xzKVxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5zZXR0aW5ncy50b29sYmFyUGFyZW50T2JqZWN0Lmluc2VydEJlZm9yZShcbiAgICAgICAgICAgIHRvb2xzLFxuICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy50b29sYmFyUGFyZW50T2JqZWN0LmZpcnN0Q2hpbGRcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBfY3JlYXRlVG9vbGJhckljb24gKHBhdGhzKVxuICAgIHtcbiAgICAgICAgbGV0IGljb24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoXCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiLCBcInN2Z1wiKTtcbiAgICAgICAgaWNvbi5zZXRBdHRyaWJ1dGVOUyhudWxsLCAndmlld0JveCcsIFwiM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AgY29uc3QgaGFzaCA9IHdpbmRvdy5sb2NhdGlvbi5oYXNoO1xuXG4gICAgaWYgKGhhc2ggIT09ICcnKVxuICAgIHtcbiAgICAgICAgLy8gQ2hlY2sgaWYgdGhlcmUgaXMgc29tZXRoaW5nIHRoYXQgbG9va3MgbGlrZSBlaXRoZXIgJmtleT0gb3IgI2tleT1cbiAgICAgICAgbGV0IHN0YXJ0SW5kZXggPSAoaGFzaC5pbmRleE9mKCcmJyArIGtleSArICc9JykgPiAwKSA/IGhhc2guaW5kZXhPZignJicgKyBrZXkgKyAnPScpIDogaGFzaC5pbmRleE9mKCcjJyArIGtleSArICc9Jyk7XG5cbiAgICAgICAgLy8gSWYgc3RhcnRJbmRleCBpcyBzdGlsbCAtMSwgaXQgbWVhbnMgaXQgY2FuJ3QgZmluZCBlaXRoZXJcbiAgICAgICAgaWYgKHN0YXJ0SW5kZXggPj0gMClcbiAgICAgICAge1xuICAgICAgICAgICAgLy8gQWRkIHRoZSBsZW5ndGggb2YgdGhlIGtleSBwbHVzIHRoZSAmIGFuZCA9XG4gICAgICAgICAgICBzdGFydEluZGV4ICs9IGtleS5sZW5ndGggKyAyO1xuXG4gICAgICAgICAgICAvLyBFaXRoZXIgdG8gdGhlIG5leHQgYW1wZXJzYW5kIG9yIHRvIHRoZSBlbmQgb2YgdGhlIHN0cmluZ1xuICAgICAgICAgICAgY29uc3QgZW5kSW5kZXggPSBoYXNoLmluZGV4T2YoJyYnLCBzdGFydEluZGV4KTtcbiAgICAgICAgICAgIGlmIChlbmRJbmRleCA+IHN0YXJ0SW5kZXgpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChoYXNoLnN1YnN0cmluZyhzdGFydEluZGV4LCBlbmRJbmRleCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoZW5kSW5kZXggPCAwKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vI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3JpZ2luYWwgdmFsdWVcbiAgICAgICAgICAgIGNvbnN0IHN0YXJ0SW5kZXggPSAoaGFzaC5pbmRleE9mKCcmJyArIGtleSArICc9JykgPiAwKSA/IGhhc2guaW5kZXhPZignJicgKyBrZXkgKyAnPScpIDogaGFzaC5pbmRleE9mKCcjJyArIGtleSArICc9Jyk7XG4gICAgICAgICAgICBjb25zdCBlbmRJbmRleCA9IHN0YXJ0SW5kZXggKyBrZXkubGVuZ3RoICsgMiArIG9yaWdpbmFsVmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgLy8gIyBpZiBpdCdzIHRoZSBmaXJzdCwgJiBvdGhlcndpc2VcbiAgICAgICAgICAgIGNvbnN0IHN0YXJ0VGhpbmcgPSAoc3RhcnRJbmRleCA9PT0gMCkgPyAnIycgOiAnJic7XG4gICAgICAgICAgICB3aW5kb3cubG9jYXRpb24ucmVwbGFjZShoYXNoLnN1YnN0cmluZygwLCBzdGFydEluZGV4KSArIHN0YXJ0VGhpbmcgKyBrZXkgKyAnPScgKyB2YWx1ZSArIGhhc2guc3Vic3RyaW5nKGVuZEluZGV4KSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZVxuICAgICAgICB7XG4gICAgICAgICAgICAvLyBJdCdzIG5vdCBwcmVzZW50IC0gYWRkIGl0XG4gICAgICAgICAgICBpZiAoaGFzaC5sZW5ndGggPT09IDApXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLnJlcGxhY2UoJyMnICsga2V5ICsgJz0nICsgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIC8vIEFwcGVuZCBpdFxuICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5yZXBsYWNlKGhhc2ggKyAnJicgKyBrZXkgKyAnPScgKyB2YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59X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AgICoqL1xuICAgIF9sb2FkT3JGZXRjaE9iamVjdERhdGEgKClcbiAgICB7XG4gICAgICAgIGlmICh0eXBlb2YgdGhpcy5zZXR0aW5ncy5vYmplY3REYXRhID09PSAnb2JqZWN0JylcbiAgICAgICAge1xuICAgICAgICAgICAgLy8gRGVmZXIgZXhlY3V0aW9uIHVudGlsIGluaXRpYWxpemF0aW9uIGhhcyBjb21wbGV0ZWRcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9sb2FkT2JqZWN0RGF0YSh0aGlzLnNldHRpbmdzLm9iamVjdERhdGEsIHRoaXMuaGFzaFN0YXRlKTtcbiAgICAgICAgICAgIH0sIDApO1xuICAgICAgICB9XG4gICAgICAgIGVsc2VcbiAgICAgICAge1xuICAgICAgICAgICAgY29uc3QgcGVuZGluZ01hbmlmZXN0UmVxdWVzdCA9IGZldGNoKHRoaXMuc2V0dGluZ3Mub2JqZWN0RGF0YSwge1xuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHRoaXMuc2V0dGluZ3MucmVxdWVzdEhlYWRlcnNcbiAgICAgICAgICAgIH0pLnRoZW4oIChyZXNwb25zZSkgPT5cbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLm9rKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gdHJpZ2dlciBtYW5pZmVzdCBsb2FkIGVycm9yIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIGRpdmEuRXZlbnRzLnB1Ymxpc2goJ01hbmlmZXN0RmV0Y2hFcnJvcicsIFtyZXNwb25zZV0sIHRoaXMpO1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2FqYXhFcnJvcihyZXNwb25zZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yID0gbmV3IEVycm9yKHJlc3BvbnNlLnN0YXR1c1Rle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ICAgICAgcmV0dXJuIG9wdGlvbnM7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiAqL1xuICAgIF9nZXRWaWV3U3RhdGUgKHZpZXcpXG4gICAge1xuICAgICAgICBzd2l0Y2ggKHZpZXcpXG4gICAgICAgIHtcbiAgICAgICAgICAgIGNhc2UgJ2QnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGluR3JpZDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGluQm9va0xheW91dDogZmFsc2VcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjYXNlICdiJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBpbkdyaWQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBpbkJvb2tMYXlvdXQ6IHRydWVcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjYXNlICdnJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBpbkdyaWQ6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIGluQm9va0xheW91dDogZmFsc2VcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogKi9cbiAgICBfZ2V0UGFnZUluZGV4Rm9yTWFuaWZlc3QgKG1hbmlmZXN0LCBmaWxlbmFtZSlcbiAgICB7XG4gICAgICAgIGxldCBpO1xuICAgICAgICBjb25zdCBucCA9IG1hbmlmZXN0LnBhZ2VzLmxlbmd0aDtcblxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbnA7IGkrKylcbiAgICAgICAge1xuICAgICAgICAgICAgaWYgKG1hbmlmZXN0LnBhZ2VzW2ldLmYgPT09IGZpbGVuYW1lKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIC0xO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogKi9cbiAgICBfZ2V0U3RhdGUgKClcbiAgICB7XG4gICAgICAgIGxldCB2aWV3O1xuXG4gICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmluR3JpZClcbiAgICAgICAge1xuICAgICAgICAgICAgdmlldyA9ICdnJztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGlzLnNldHRpbmdzLmluQm9va0xheW91dClcbiAgICAgICAge1xuICAgICAgICAgICAgdmlldyA9ICdiJztcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgIHtcbiAgICAgICAgICAgIHZpZXcgPSAnZCc7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBsYXlvdXQgPSB0aGlzLmRpdmFTdGF0ZS52aWV3ZXJDb3JlLmdldEN1cnJlbnRMYXlvdXQoKTtcbiAgICAgICAgY29uc3QgcGFnZU9mZnNldCA9IGxheW91dC5nZXRQYWdlVG9WaWV3cG9ydENlbnRlck9mZnNldCh0aGlzLnNldHRpbmdzLmFjdGl2ZVBhZ2VJbmRleCwgdGhpcy52aWV3ZXJTdGF0ZS52aWV3cG9ydCk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICdmJzogdGhpcy5zZXR0aW5ncy5pbkZ1bGxzY3JlZW4sXG4gICAgICAgICAgICAndic6IHZpZXcsXG4gICAgICAgICAgICAneic6IHRoaXMuc2V0dGluZ3Muem9vbUxldmVsLFxuICAgICAgICAgICAgJ24nOiB0aGlzLnNldHRpbmdzLnBhZ2VzUGVyUm93LFxuICAgICAgICAgICAgJ2knOiB0aGlzLnNldHRpbmdzLmVuYWJsZUZpbGVuYW1lID8gdGhpcy5zZX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HRoaXMuZGl2YVN0YXRlLnZpZXdlckNvcmUuZ2V0WE9mZnNldCgpXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB2ZXJ0aWNhbGx5T3JpZW50ZWQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ2FsbGVkIHdoZW4gdGhlIGNoYW5nZSB2aWV3IGljb24gaXMgY2xpY2tlZFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiovXG4gICAgX2NoYW5nZVZpZXcgKGRlc3RpbmF0aW9uVmlldylcbiAgICB7XG4gICAgICAgIHN3aXRjaCAoZGVzdGluYXRpb25WaWV3KVxuICAgICAgICB7XG4gICAgICAgICAgICBjYXNlICdkb2N1bWVudCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbG9hZFZpZXdlcih7XG4gICAgICAgICAgICAgICAgICAgIGluR3JpZDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGluQm9va0xheW91dDogZmFsc2VcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgY2FzZSAnYm9vayc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlbG9hZFZpZXdlcih7XG4gICAgICAgICAgICAgICAgICAgIGluR3JpZDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGluQm9va0xheW91dDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBjYXNlICdncmlkJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcmVsb2FkVmlld2VyKHtcbiAgICAgICAgICAgICAgICAgICAgaW5HcmlkOiB0cnVlXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHByaXZhdGVcbiAgICAgKlxuICAgICAqIEBwYXJ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0+XG4gICAgICAgIHtcbiAgICAgICAgICAgIHJldHVybiBwZy5mO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBHZXQgdGhlIG51bWJlciBvZiBncmlkIHBhZ2VzIHBlciByb3cuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybnMge251bWJlcn0gLSBUaGUgbnVtYmVyIG9mIGdyaWQgcGFnZXMgcGVyIHJvdy5cbiAgICAgKiovXG4gICAgZ2V0R3JpZFBhZ2VzUGVyUm93ICgpXG4gICAge1xuICAgICAgICAvLyBUT0RPKHdhYmFpbik6IEFkZCB0ZXN0IGNhc2VcbiAgICAgICAgcmV0dXJuIHRoaXMuc2V0dGluZ3MucGFnZXNQZXJSb3c7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogR2V0IHRoZSBpbnN0YW5jZSBJRCBudW1iZXIuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybnMge251bWJlcn0gLSBUaGUgaW5zdGFuY2UgSUQuXG4gICAgICogKi9cbiAgICAvL1xuICAgIGdldEluc3RhbmNlSWQgKClcbiAgICB7XG4gICAgICAgIHJldHVybiB0aGlzLnNldHRpbmdzLklEO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEdldCB0aGUgaW5zdGFuY2Ugc2VsZWN0b3IgZm9yIHRoaXMgaW5zdGFuY2UuIFRoaXMgaXMgdGhlIHNlbGVjdG9yIGZvciB0aGUgcGFyZW50XG4gICAgICogZGl2LlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IC0gVGhlIHZpZXdwb3J0IHNlbGVjdG9yLlxuICAgICAqICovXG4gICAgZ2V0SW5zdGFuY2VTZWxlY3RvciAoKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZGl2YVN0YXRlLnZpZXdlckNvcmUuc2VsZWN0b3I7XG4gICAgfVxuXG4gICAgLyoqXG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gICAge1xuICAgICAgICBpZiAoIXRoaXMuX2NoZWNrTG9hZGVkKCkpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgcmV0dXJuIHRoaXMuc2V0dGluZ3MubWFuaWZlc3QucGFnZXNbcGFnZUlkeF0ubTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBHZXRzIHRoZSBtaW5pbXVtIHpvb20gbGV2ZWwgZm9yIHRoZSBlbnRpcmUgZG9jdW1lbnQuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybnMge251bWJlcn0gLSBUaGUgbWluaW11bSB6b29tIGxldmVsIGZvciB0aGUgZG9jdW1lbnRcbiAgICAgKiAqL1xuICAgIGdldE1pblpvb21MZXZlbCAoKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuc2V0dGluZ3MubWluWm9vbUxldmVsO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIG51bWJlciBvZiBwYWdlcyBpbiB0aGUgZG9jdW1lbnQuXG4gICAgICpcbiAgICAgKiBAcHVibGljXG4gICAgICogQHJldHVybnMge251bWJlcn0gLSBUaGUgbnVtYmVyIG9mIHBhZ2VzIGluIHRoZSBkb2N1bWVudC5cbiAgICAgKiAqL1xuICAgIGdldE51bWJlck9mUGFnZXMgKClcbiAgICB7XG4gICAgICAgIGlmICghdGhpcy5fY2hlY2tMb2FkZWQoKSlcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcblxuICAgICAgICByZXR1cm4gdGhpcy5zZXR0aW5ncy5udW1QYWdlcztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBJZiBhIGNhbnZhcyBoYXMgbXVsdGlwbGUgaW1hZ2VzIGRlZmluZWQsIHJldHVybnMgdGhlIG5vbi1wcmltYXJ5IGltYWdlLlxuICAgICAqXG4gICAgICogQHB1YmxpY1xuICAgICAqIEBwYXJhbXMge251bWJlcn0gcGFnZUluZGV4IC0gVGhlI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xufVxuXG5EaXZhLkV2ZW50cyA9IGRpdmEuRXZlbnRzO1xuXG5leHBvcnQgZGVmYXVsdCBEaXZhO1xuXG4vKipcbiAqIE1ha2UgYERpdmFgIGF2YWlsYWJsZSBpbiB0aGUgZ2xvYmFsIGNvbnRleHQuXG4gKiAqL1xuaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgKGZ1bmN0aW9uIChnbG9iYWwpXG4gICAge1xuICAgICAgICBnbG9iYWwuRGl2YSA9IGdsb2JhbC5EaXZhIHx8IERpdmE7XG4gICAgfSkod2luZG93KTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/css/dashboard.css b/css/dashboard.css index 810243b93..fb484a213 100644 --- a/css/dashboard.css +++ b/css/dashboard.css @@ -300,11 +300,13 @@ #unpaired_container { margin-right: 5%; - width: 65% + width: 65%; } #paired_container { - width: 30% + width: 30%; + display: flex; + flex-direction: column; } @@ -345,6 +347,21 @@ border-bottom: 1px solid #dfdfdf; } +.file_sort_name { + display: flex; + align-items: center; + justify-content: center; + background-color:rgba(123, 177, 183, 0.1); + border-bottom: 1px solid #dfdfdf; + font-size: 80%; +} + +.arrow_btn { + margin-left: 4px; + cursor: pointer; + font-weight: bold; +} + .file_list { height: 100%; width: 98%;