!function(){"use strict";function e(e){var t=[],a=[];this.getId=function(){return e.sliderid},this.getCbHandle=function(){return e.cbhandle},this.getView=function(n){return n||(n=0),e.value[n]===t[n]?a[n]:(t[n]=e.value[n],e.formatter?a[n]=e.formatter(e.value[n],e.ctrlhandle):a[n]=e.value[n],a[n])},this.updateClass=function(t,a){e.updateClass(t,a)},this.forceRefresh=function(t){e.forceRefresh(t)},this.getValue=function(t){return t||(t=0),e.value[t]},this.getRelative=function(t){return t||(t=0),e.relative[t]},this.setValue=function(t,a){a||(a=0),e.setValue(t,a)},this.setDisable=function(t){e.setDisable(t)}}var t=angular.module("RangeSlider",[]);t.directive("rangeSlider",["$log","$document","$timeout",function(t,a,n){function i(t,i,s,l){t.initWidget=function(e){e.byStep&&(t.byStep=parseInt(e.byStep)),e.notMore&&(t.notMore=parseInt(e.notMore)),e.notLess&&(t.notLess=parseInt(e.notLess)),e.id&&(t.sliderid=e.id),void 0!==e.value&&(t.value=e.value,t.forceRefresh(50))},t.forceRefresh=function(e){var a=t.value;t.value=[void 0,void 0],n(function(){t.setValue(a[0],0),t.dual&&t.setValue(a[1],1)},e)},t.updateClass=function(e,t){t?i.addClass(e):i.removeClass(e)},t.setDisable=function(e){e?(i.addClass("disable"),t.handles[0].css("visibility","hidden"),t.dual&&t.handles[1].css("visibility","hidden")):(i.removeClass("disable"),t.handles[0].css("visibility","visible"),t.dual&&t.handles[1].css("visibility","visible"))},t.normalize=function(e){var a,n=t.notMore-t.notLess,i=e*n;if(t.byStep>0){var s=(i-i%t.byStep)/t.byStep,l=i%t.byStep,o=l>=.5*t.byStep?t.byStep:0;return a=s*t.byStep+o+t.notLess}if(t.byStep<0){var r=Math.pow(10,-1*t.byStep);return a=t.notLess+parseInt(i*r)/r}return i},t.getValue=function(e,a){t.vertical?t.relative[a]=(e-t.bounds.handles[a].getBoundingClientRect().height)/(t.bounds.bar.getBoundingClientRect().height-t.bounds.handles[a].getBoundingClientRect().height):t.relative[a]=e/(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[a].getBoundingClientRect().width);var n=t.normalize(t.relative[a]);n!==t.value[a]&&(nt.stopValue&&(n=t.stopValue),t.formatter?t.viewValue=t.formatter(n,t.ctrlhandle):t.viewValue=n,t.displays[a]&&t.displays[a].html(t.viewValue),t.value[a]=n,l&&l.$setViewValue(t.viewValue),t.$apply(),n>t.startValue&&nt.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(a=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",a+"px")):(a=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("width",a+"px")),t.startValue=e},t.setStop=function(e){var a;et.notMore&&(e=t.notMore),e0&&t.$apply(t.setValue(t.value[t.actif]+t.byStep,t.actif)),t.byStep<0&&t.$apply(t.setValue(t.value[t.actif]+1/Math.pow(10,-1*t.byStep),t.actif)),t.callback&&t.callback(t.value[t.actif],t.ctrlhandle);break;case 37:case 40:t.byStep>0&&t.$apply(t.setValue(t.value[t.actif]-t.byStep,t.actif)),t.byStep<0&&t.$apply(t.setValue(t.value[t.actif]-1/Math.pow(10,-1*t.byStep),t.actif)),t.callback&&t.callback(t.value[t.actif],t.ctrlhandle);break;case 27:t.handles[t.actif][0].blur()}},t.moveHandle=function(e,a,n){var i;t.vertical?(i=t.bounds.bar.getBoundingClientRect().bottom-n,i>t.bounds.bar.getBoundingClientRect().height&&(i=t.bounds.bar.getBoundingClientRect().height),ii&&(i=0),a+t.bounds.handles[e].getBoundingClientRect().width>t.bounds.bar.getBoundingClientRect().right&&(i=t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[e].getBoundingClientRect().width)),t.getValue(i,e),t.dual&&t.value[0]>t.value[1]&&(0===e?t.setValue(t.value[0],1):t.setValue(t.value[1],0))},t.focusCB=function(e){e?a.on("keydown",t.keydown):a.unbind("keydown",t.keydown)},t.touchBarCB=function(e){var a,n=0,i=e.changedTouches,s=t.value[n];if(e.preventDefault(),t.dual){a=t.vertical?(i[0].pageY-t.bounds.bar.getBoundingClientRect().bottom)/t.bounds.bar.getBoundingClientRect().height:(i[0].pageX-t.bounds.bar.getBoundingClientRect().left)/t.bounds.bar.getBoundingClientRect().width;var l=Math.abs(a-t.relative[0]),o=Math.abs(a-t.relative[1]);l>o&&(n=1)}t.moveHandle(n,i[0].pageX,i[0].pageY),t.callback&&s!==t.value[n]&&t.callback(t.value[n],t.ctrlhandle)},t.touchHandleCB=function(e,n){function s(e){e.preventDefault();for(var a=e.changedTouches,i=0;it.stopAt,t.stopAt&&t.setStop(t.stopAt)}),t.initialSettings(t.initial)},t.init(),t.$watch("inithook",function(){t.inithook&&t.inithook(t.ctrlhandle)}),t.$watch("initvalues",function(){t.initvalues&&t.initWidget(t.initvalues)}),t.$watch("ngModel",function(e){t.setValue(e,0)})}var s='
';return{restrict:"E",scope:{startAt:"=",stopAt:"=",callback:"=",formatter:"=",inithook:"=",cbhandle:"=",initvalues:"=",ngModel:"="},require:"?ngModel",template:s,replace:!0,link:i}}])}(),function(){"use strict";var e='
afb://{{hostname}}:{{httpdport}}
';angular.module("TokenRefresh",["AppConfig","ModalNotification"]).directive("tokenRefresh",["$log","$window","$timeout","$location","Notification","AppConfig","AppCall",function(t,a,n,i,s,l,o){function r(e,r,u){e.logged=void 0,a.onbeforeunload=function(){o.get("token","reset",{},function(){t.log("OPA exit")})},e.online=function(){r.addClass("online"),r.removeClass("offline"),e.logged=!0},e.offline=function(){r.addClass("offline"),r.removeClass("online"),e.logged=!1},e.onerror=function(){e.logged!==!1&&(s.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t){t.request.token&&(l.session.token=t.request.token),t.request.uuid&&(l.session.uuid=t.request.uuid),t.request.timeout&&(l.session.timeout=t.request.timeout),e.logged!==!0&&(s.success({message:"AppFramework Binder Back to Live",delay:3e3}),e.online(),e.callback&&e.callback(t)),e.status=1},e.getping=function(){o.get("token","ping",{},function(t){200===t.status?e.onsuccess(t.data):e.onerror(),n(e.getping,1e3*l.session.pingrate)})},e.refresh=function(){o.get("token","refresh",{},function(t){200===t.status?e.onsuccess(t.data):e.onerror(),n(e.refresh,250*l.session.timeout)})},e.tkcreate=function(){o.get("token","create",{token:l.session.initial},function(t){200===t.status?e.onsuccess(t.data):e.onerror()})},e.icon=u.icon||"fi-lightbulb",e.hostname=i.host(),e.httpdport=i.port(),e.autolog=JSON.parse(u.autolog||!1),e.autolog&&e.tkcreate(),n(e.getping,1e3*l.session.pingrate),n(e.refresh,250*l.session.timeout)}return{template:e,scope:{callback:"="},restrict:"E",link:r}}])}(),function(){"use strict";var e='
{{tip}}
';angular.module("ModalNotification",[]).directive("tipModal",["$timeout",function(t){function a(e,a,n){function i(){function a(){e.show&&e.modal.css({opacity:1,visibility:"visible"})}e.show=!0,e.timeout=t(a,e.delay)}function s(){e.show=!1,e.modal.css({opacity:0,visibility:"hidden"})}e.parent=a.parent(),e.modal=a.find("div"),e.icon=n.icon||"fi-lightbulb",e.parent.addClass("as-modal-tip"),e.parent.bind("click",s),e.parent.bind("focus",i),e.parent.bind("mouseover",i),e.parent.bind("mouseleave",s),e.parent.bind("blur",s),e.delay=n.delay||1e3}return{restrict:"E",template:e,link:a,scope:{tip:"="}}}])}(),function(){"use strict";function e(e,t,a){var n=new XMLHttpRequest,i=new FormData;n.upload.onprogress=function(t){var a=Math.round(t.lengthComputable?100*t.loaded/t.total:0);e.slider&&e.slider.setValue(a)},n.onload=function(){e.divElem.addClass("success"),e.divElem.removeClass("error");var t={status:n.status,headers:n.getAllResponseHeaders()};e.callback(t)},n.onerror=function(){e.divElem.addClass("error"),e.divElem.removeClass("success")},n.onabort=function(){e.divElem.addClass("error"),e.divElem.removeClass("success");var t={status:n.status,headers:n.getAllResponseHeaders()};e.callback(t)},this.postfile=function(e){n.open("POST",e,!0),n.send(i)};for(var s=0;s1024*e.maxsize)setTimeout(a,100);else{var l=new FileReader;l.readAsArrayBuffer(this.file),l.onload=a,i.append(e.name,this.file,this.file.name)}}var t='
{{label}}
',a='Upload Application {{appname}} ?
',n='Invalid Application {{appname}} ?
';angular.module("UploadFiles",["AppConfig","ModalNotification","RangeSlider"]).directive("uploadAppli",["AppConfig","JQemu","Notification","ModalFactory","$timeout",function(i,s,l,o,r){function u(t,s,l){if(t.inputElem=s.find("input"),t.divElem=s.find("div"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var u,c,d,p=function(){u.postfile(l.posturl+"?token="+i.session.token),t.modal.deactivate(),r(function(){t.modal.destroy()},1e3)},f=function(){t.modal.deactivate(),r(function(){t.modal.destroy()},1e3)},g=function(e){if(e){var i=new JSZip(e.target.result),s=i.file("icon_128.png");s?(c=window.URL.createObjectURL(new Blob([s.asArrayBuffer()],{type:"image"})),d=a):(c=t.isnotvalid,d=n)}else u.file.size>1024*t.maxsize&&(c=t.istoobig,d=n),isNaN(u.file.size)&&(c=t.isnotvalid,d=n);var l={animationIn:"slideInFromTop",contentScope:{success:p,abandon:f,icon:c,appname:u.basename},template:d};t.modal=new o(l),t.modal.activate()};u=new e(t,s,g)},t.name=l.name||"appli",t.category=l.category||"appli",t.mimetype=l.accept||".wgt",t.maxsize=l.maxsize||1e5,t.regexp=new RegExp(l.accept+".*","i"),t.icon=l.icon||"fi-upload",t.label=l.label||"Upload",l.thumbnail?t.isnotvalid=i.paths[t.category]+l.isnotvalid:t.isnotvalid=i.paths[t.category]+"w3c-widget.png",l.istoobig?t.istoobig=i.paths[t.category]+l.istoobig:t.istoobig=i.paths[t.category]+"istoobig.png",t.noslider=l.noslider||!1,!l.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:u,scope:{callback:"="}}}])}(),function(){"use strict";var e='{{errmsg}}',t=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;angular.module("InputText",["JQueryEmu"]).directive("inputText",["JQemu",function(a){function n(e,n,i){e.error=!1,e.valid=!1,e.status="untouch",e.input=n.find("input"),e.required=0,"required"in i&&(e.required=1,n.addClass("required")),e.selected=function(){e.error=!1,e.errmsg=!1,e.status="touch"},e.validate=function(){e.parent.removeClass("ng-pristine"),e.value?(e.error=!1,e.value=e.value.trim(),"nospace"in i&&(e.value=e.value.replace(/\s/g,"")),"lowercase"in i&&(e.value=e.value.toLowerCase()),"minlen"in i&&e.value.length0&&e.l4acounter.validated--),e.callback(i.name,null,e.done)):(e.required&&!e.valid&&e.l4acounter.validated++,e.status="valid",e.valid=!0,e.callback(i.name,e.value,e.done))},e.done=function(t){for(var a in t)e[a]=t[a]},e.label=i.label,e.name=i.name,e.placeholder=i.placeholder,e.type=i.type||"text",e.tip=i.tip,e.parent=a.parent(n,"FORM"),"email"in i&&(i.lowercase=!0,i.nospace=!0,i.minlen=6),e.required&&(e.l4acounter=e.parent.data("l4acounter"),e.l4acounter?e.l4acounter.required++:(e.l4acounter={required:1,validated:0},e.parent.data("l4acounter",e.l4acounter))),e.$watch("value",function(){e.value&&e.validate()})}return{restrict:"E",template:e,link:n,scope:{callback:"=",value:"="}}}])}(),function(){"use strict";var e=' ';angular.module("InputPassword",[]).directive("inputPassword",function(){function t(e,t,a){e.valid1=function(t,a){e.firstpwd=a},e.valid2=function(t,n,i){e.firstpwd!==n?i({valid:!1,status:"invalid",errmsg:"both password should match"}):e.callback(a.name,n)},e.done=function(t){for(var a in t)e[a]=t[a]},e.name=a.name,e.label1=a.label||"Password",e.label2=a.label||"Password Verification",e.place1=a.placeholder1||"User Password",e.tip1=a.tip||"Choose a Password",e.place2=a.placeholder1||"Password Verification",e.tip2=a.tip||"Confirme your Password",e.minlen=a.minlen||10,"required"in a&&(e.required="required")}return{restrict:"E",template:e,link:t,scope:{callback:"="}}})}(),function(){"use strict";var e='{{label}}';angular.module("LinkButton",[]).directive("linkButton",["$location",function(t){function a(e,a,n){e.clicked=function(){n.query?t.path(n.href).search(n.query):t.path(n.href)},e.icon=n.icon||"fi-link",e.label=n.label||"Jump",e.href=n.href||"/home",a.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:a,scope:{}}}])}(),function(){"use strict";var e='
{{label}}
';angular.module("SubmitButton",[]).directive("submitButton",function(){function t(e,t,a){e.icon=a.icon||"fi-foot",e.label=a.label||"Next",t.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:t,scope:{clicked:"="}}})}(),function(){"use strict";var e='
{{label}}
',t='×Application {{label}}',a='×Application {{label}}
  • Name : {{detail.name}}
  • Description {{detail.description}}
  • Author : {{detail.author}}
';angular.module("AppliButton",[]).directive("appliButton",["AppConfig","AppCall","ModalFactory","Notification","$timeout","$window","$location","urlquery",function(n,i,s,l,o,r,u,c){function d(e,d,p){e.runstatus="stop",e.runmode=c.runmode||"auto",e.clicked=function(){var n=function(t,a){l.error({message:"Fail /api/afm-main"+t+"="+e.label+" RunID="+e.appID,delay:5e3}),d.addClass("fail"),d.removeClass("success"),e.callback(e.appID,t,a)},c=function(t,a){d.removeClass("fail"),e.runID=a.data.response.runid,e.callback(e.appID,t,a)},p=function(){e.modApp.deactivate(),o(function(){e.modApp.destroy()},1e3)},f=function(){e.modInfo.deactivate(),o(function(){e.modInfo.destroy()},1e3)},g=function(t){switch(t){case"start":if("stop"!==e.runstatus)return;i.get("afm-main","start",{id:e.appID,mode:e.runmode},function(a){return 200!==a.status||"AJB_reply"!==a.data.jtype?void n("start",a):(e.runstatus="start",c(t,a),void(a.data.response.uri&&(e.winapp=r.open(a.data.response.uri.replace("%h",u.host())))))});break;case"stop":if("start"!==e.runstatus)return;i.get("afm-main","terminate",{runid:e.runID},function(a){return 200!==a.status||"AJB_reply"!==a.data.jtype?void n("stop",a):(e.runstatus="stop",e.winapp&&(e.winapp.close(),e.winapp=!1),void c(t,a))});break;case"info":i.get("afm-main","detail",{id:e.appID},function(t){if(200!==t.status||"AJB_reply"!==t.data.jtype)return void n("detail",t);var i={animationIn:"slideInFromTop",contentScope:{close:f,icon:e.icon,label:e.appID,detail:t.data.response},template:a};e.modInfo=new s(i),e.modInfo.activate()});break;case"uninstall":if("stop"!==e.runstatus)return;i.get("afm-main","uninstall",{id:e.appID},function(e){return 200!==e.status||"AJB_reply"!==e.data.jtype?void n("uninstall",e):void c(t,e)})}p()},m={animationIn:"slideInFromTop",contentScope:{action:g,runstatus:e.runstatus,close:p,icon:e.icon,label:e.label},template:t};e.modApp=new s(m),e.modApp.activate()},p.handle&&e.store[p.handle].name?(e.icon=n.paths.icons+p.handle,e.label=e.store[p.handle].name,e.appID=p.handle):(e.icon=n.paths.icons+"w3c-ico.png",e.label=p.handle),d.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:d,scope:{callback:"=",store:"="}}}])}(),function(){"use strict";angular.module("DashboardModule",["SubmitButton","TokenRefresh","AppliButton"]).controller("DashboardController",["AppCall","Notification",function(e,t){var a=this;a.uuid="none",a.token="none",a.session="none",a.status="err-no",a.appliIDs=[],a.appliStore={},a.AppliCB=function(e,t,n){a.request=t,a.errcode=n.status,n.data&&(a.response=n.data),"uninstall"===t&&a.GetRunnables()},a.GetRunnables=function(){e.get("afm-main","runnables",{},function(e){if(a.request="/api/afm-main/runnable",a.response=e.data,a.errcode=e.status,200===e.status){if("AJB_reply"!==e.data.request.jtype&&"runnables"!==e.data.request.api)return void t.error({message:"Invalid Respond to /opa/afm-main/runnable response.data="+e.data,delay:5e3});for(var n=[],i=e.data.response.runnables,s=0;s\n \n \n\n')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Dashboard/Dashboard.html",'

Application Framework Manager Simple Client

req= {{ctrl.request}} res= {{ctrl.response}} status= {{ctrl.errcode}}
')}])}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvUmFuZ2VTbGlkZXJzL1JhbmdlU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sc2UgIGVsZW1lbnQucmVtb3ZlQ2xhc3MgKGNsYXNzZSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUuc2V0RGlzYWJsZSA9IGZ1bmN0aW9uIChkaXNhYmxlZCkge1xuXG4gICAgICAgICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzIChcImRpc2FibGVcIik7XG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5jc3MgKCd2aXNpYmlsaXR5JywnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1sxXS5jc3MgKCd2aXNpYmlsaXR5JywnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50LnJlbW92ZUNsYXNzIChcImRpc2FibGVcIik7XG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5jc3MgKCd2aXNpYmlsaXR5JywndmlzaWJsZScpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmNzcyAoJ3Zpc2liaWxpdHknLCd2aXNpYmxlJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5ub3JtYWxpemUgPSBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQ7XG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcztcbiAgICAgICAgICAgIHZhciBwb2ludCA9IHZhbHVlICogcmFuZ2U7XG5cbiAgICAgICAgICAgIC8vIGlmIHN0ZXAgaXMgcG9zaXRpdmUgbGV0J3Mgcm91bmQgc3RlcCBieSBzdGVwXG4gICAgICAgIC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lKSBuZXd2YWx1ZT1zY29wZS5zdGFydFZhbHVlO1xuICAgICAgICAgICAgICAgIGlmIChuZXd2YWx1ZSA+IHNjb3BlLnN0b3BWYWx1ZSkgIG5ld3ZhbHVlPXNjb3BlLnN0b3BWYWx1ZTtcblxuXG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmZvcm1hdHRlcikge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS52aWV3VmFsdWUgPSBzY29wZS5mb3JtYXR0ZXIgKG5ld3ZhbHVlLCBzY29wZS5jdHJsaGFuZGxlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzY29wZS52aWV3VmFsdWUgPSBuZXd2YWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmRpc3BsYXlzW2hhbmRsZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXNbaGFuZGxlXS5odG1sIChzY29wZS52aWV3VmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSBleHRlcm5hbCByZXByZXNlbnRhdGlvbiBvZiB0aGUgbW9kZWxcbiAgICAgICAgICAgICAgICBzY29wZS52YWx1ZVtoYW5kbGVdID0gbmV3dmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKG1vZGVsKSBtb2RlbC4kc2V0Vmlld1ZhbHVlIChzY29wZS52aWV3VmFsdWUpO1xuICAgICAgICAgICAgICAgIHNjb3BlLiRhcHBseSgpO1xuICAgICAgICAgICAgICAgIGlmIChuZXd2YWx1ZSA+IHNjb3BlLnN0YXJ0VmFsdWUgJiYgbmV3dmFsdWUgPCBzY29wZS5zdG9wVmFsdWUpIHNjb3BlLnRyYW5zbGF0ZShvZmZzZXQsIGhhbmRsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cblxuICAgICAgICBzY29wZS5zZXRTdGFydCA9IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdmFyIG9mZnNldDtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHZhbHVlID4gc2NvcGUudmFsdWVbMF0pIHtcbiAgICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwwKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAgICAgb2Zmc2V0ID0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQgKiAodmFsdWUgLSBzY29wZS5ub3RMZXNzKSAvIChzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcyk7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhcnQuY3NzKCdoZWlnaHQnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoICogKHZhbHVlIC0gc2NvcGUubm90TGVzcykgLyAoc2NvcGUubm90TW9yZSAtIHNjb3BlLm5vdExlc3MpO1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXJ0LmNzcygnd2lkdGgnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5zdGFydFZhbHVlPSB2YWx1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5zZXRTdG9wID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgb2Zmc2V0O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAodmFsdWUgPCBzY29wZS52YWx1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DtcbiAgICAgICAgICAgICAgICAgICBzdGFydCAgPSAoc2NvcGUucmVsYXRpdmVbMF0gKiAgc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQpO1xuICAgICAgICAgICAgICAgICAgIHNjb3BlLnNsaWRlci5jc3MgKHsnYm90dG9tJzogc3RhcnQrJ3B4JywnaGVpZ2h0JzogaGVpZ2h0ICsgJ3B4J30pO1xuICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXS5jc3Moe1xuICAgICAgICAgICAgICAgICAgICAnLXdlYmtpdC10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctbW96LXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1tcy10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctby10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICd0cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KSdcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNsaWRlci5jc3MoJ3dpZHRoJyxvZmZzZXQgKyAncHgnKTtcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChzY29wZS5yZWxhdGl2ZVsxXSAmJiBzY29wZS5yZWxhdGl2ZVswXSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgd2lkdGggPSAoc2NvcGUucmVsYXRpdmVbMV0gLSBz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dW5kcy5oYW5kbGVzW2hhbmRsZV0uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5nZXRWYWx1ZSAgKG9mZnNldCwgaGFuZGxlKTtcblxuICAgICAgICAgICAgLy8gcHJldmVudCBkdWFsIGhhbmRsZSB0byBjcm9zc1xuICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwgJiYgc2NvcGUudmFsdWUgWzBdID4gc2NvcGUudmFsdWVbMV0pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGFuZGxlID09PSAwKSBzY29wZS5zZXRWYWx1ZSAoc2NvcGUudmFsdWVbMF0gLCAxKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlKHNjb3BlLnZhbHVlWzFdLDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG5cbiAgICAgICAgc2NvcGUuZm9jdXNDQiA9IGZ1bmN0aW9uIChpbnNpZGUpIHtcbiAgICAgICAgICAgIGlmIChpbnNpZGUpIHtcbiAgICAgICAgICAgICAgICAkZG9jdW1lbnQub24oJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAkZG9jdW1lbnQudW5iaW5kKCdrZXlkb3duJyxzY29wZS5rZXlkb3duKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICAvLyBiYXIgd2FzIHRvdWNoIGxldCBtb3ZlIGhhbmRsZSB0byB0aGlzIHBvaW50XG4gICAgICAgIHNjb3BlLnRvdWNoQmFyQ0IgPSBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgIHZhciBoYW5kbGU9MDtcbiAgICAgICAgICAgIHZhciByZWxhdGl2ZTtcbiAgICAgICAgICAgIHZhciB0b3VjaGVzID0gZXZlbnQuY2hhbmdlZFRvdW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AgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gdG91Y2hlbmQoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ3RvdWNobW92ZScsdG91Y2htb3ZlKTtcbiAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ3RvdWNoZW5kJyAsdG91Y2hlbmQpO1xuICAgICAgICAgICAgICAgZWxlbWVudC5vbigndG91Y2hzdGFydCcsIHNjb3BlLnRvdWNoQmFyQ0IpO1xuXG4gICAgICAgICAgICAgICAgLy8gaWYgdmFsdWUgY2hhbmdlIG5vdGlmeSBhcHBsaWNhdGlvbiBjYWxsYmFja1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5jYWxsYmFjayAmJiBvbGR2YWx1ZSAhPT0gc2NvcGUudmFsdWVbaGFuZGxlXSkgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLnZhbHVlW2hhbmRsZV0sIHNjb3BlLmN0cmxoYW5kbGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLmhhbmRsZUNCID0gZnVuY3Rpb24gKGNsaWNrZXZlbnQsIGhhbmRsZSkge1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuYXV0b21hdGljKSByZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBvbGR2YWx1ZSA9IHNjb3BlLnZhbHVlW2hhbmRsZV07XG4gICAgICAgICAgICAvLyByZWdpc3RlciBtb3VzZSBldmVudCB0byB0cmFjayBoYW5kbGVcbiAgICAgICAgICAgIGNsaWNrZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgJGRvY3VtZW50Lm9uKCdtb3VzZW1vdmUnLG1vdXNlbW92ZSk7XG4gICAgICAgICAgICAkZG9jdW1lbnQub24oJ21vdXNldXAnLCBtb3VzZXVwKTtcbiAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNba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YW5nZVNsaWRlckhhbmRsZSAoc2NvcGUpO1xuXG4gICAgICAgICAgICAvLyBwcmVwYXJlIERPTSBvYmplY3QgcG9pbnRlciB0byBjb21wdXRlIHNpemUgZHluYW1pY2FsbHlcbiAgICAgICAgICAgIHNjb3BlLmJvdW5kcyA9IHtcbiAgICAgICAgICAgICAgICBiYXIgICAgOiBlbGVtZW50WzBdLFxuICAgICAgICAgICAgICAgIGhhbmRsZXM6IFtzY29wZS5oYW5kbGVzWzBdWzBdLCBzY29wZS5oYW5kbGVzWzFdWzBdXVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKGF0dHJzLmRpc2FibGUgPT09ICd0cnVlJykgc2NvcGUuc2V0RGlzYWJsZSh0cnVlKTtcblxuICAgICAgICAgICAgaWYgKGF0dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGF0dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSB0cnVlIDpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaGFuZGxlJyA6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9IHNjb3BlLmhhbmRsZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzWzBdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXMgPSAgWyRkb2N1bWVudC5nZXRFbGVtZW50QnlJZCAoYXR0cnMuZGlzcGxheVRhcmdldCldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBzY29wZS5kaXNwbGF5cz1bXTtcblxuICAgICAgICAgICAgLy8gZXh0cmFjdCBpbml0aWFsIHZhbHVlcyBmcm9tIGF0dHJzIGFuZCBwYXJzZSBpbnRvIGludFxuICAgICAgICAgICAgaWYgKCFhdHRycy5pbml0aWFsKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuaW5pdGlhbCAgPSBbc2NvcGUubmdNb2RlbCwgc2NvcGUubmdNb2RlbF07IC8vIGluaXRpYWxpemUgdG8gbW9kZWwgdmFsdWVzXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBpbml0aWFsICA9IGF0dHJzLmluaXRpYWwuc3BsaXQoJywnKTtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsID0gW1xuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzBdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFswXSkgOiBzY29wZS5ub3RMZXNzLFxuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzFdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFsxXSkgOiBzY29wZS5ub3RNb3JlXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gTW9uaXRvciBhbnkgY2hhbmdlcyBvbiBzdGFydC9zdG9wIGRhdGVzLlxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdGFydEF0JywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlIDwgc2NvcGUuc3RhcnRBdCApIHtcbiAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5zZXRWYWx1ZSAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdGFydEF0KSBzY29wZS5zZXRTdGFydCAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdG9wQXQnICwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlID4gc2NvcGUuc3RvcEF0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuc2V0VmFsdWUgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdG9wQXQpIHNjb3BlLnNldFN0b3AgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gZmluaXNoIHdpZGdldCBpbml0aWFsaXNhdGlvblxuICAgICAgICAgICAgc2NvcGUuaW5pdGlhbFNldHRpbmdzIChzY29wZS5pbml0aWFsKTtcblxuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLmluaXQoKTtcbiAgICAgICAgXG4gICAgICAgICAvLyBzbGlkZXIgaXMgcmVhZHkgcHJvdmlkZSBjb250cm9sIGhhbmRsZSB0byBhcHBsaWNhdGlvbiBjb250cm9sbGVyXG4gICAgICAgIHNjb3BlLiR3YXRjaCAoJ2luaXRob29rJywgZnVuY3Rpb24gKCkgeyAgICAgICAgIC8vIGluaXQgVmFsdWVzIG1heSBhcnJpdmUgbGF0ZVxuICAgICAgICAgICAgaWYgKHNjb3BlLmluaXRob29rKSBzY29wZS5pbml0aG9vayAoc2NvcGUuY3RybGhhbmRsZSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHNjb3BlLiR3YXRjaCAoJ2luaXR2YWx1ZXMnLCBmdW5jdGlvbiAoKSB7IFx0Ly8gaW5pdCBWYWx1ZXMgbWF5IGFycml2ZSBsYXRlXG4gICAgICAgICAgICBpZiAoc2NvcGUuaW5pdHZhbHVlcykgc2NvcGUuaW5pdFdpZGdldChzY29wZS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kdGltZW91dCAoc2NvcGUucmVmcmVzaCwgQXBwQ29uZmlnLnNlc3Npb24udGltZW91dCAqMjUwKTtcbiAgICAgICAgICAgIH0pOyAgICAgICAgICAgIFxuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgLy8gSW5pdGlhbCBjb25uZWN0aW9uXG4gICAgICAgIHNjb3BlLnRrY3JlYXRlID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcInRva2VuXCIsIFwiY3JlYXRlXCIsIHt0b2tlbjogQXBwQ29uZmlnLnNlc3Npb24uaW5pdGlhbH0sZnVuY3Rpb24ocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgPT09IDIwMCkgc2NvcGUub25zdWNjZXNzIChyZXN1bHQuZGF0YSk7XG4gICAgICAgICAgICAgICAgZWxzZSAgc2NvcGUub25lcnJvcigpO1xuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgIH07XG4gXG4gICAgICAgIHNjb3BlLmljb24gICAgICA9IGF0dHJzLmljb24gICB8fCBcImZpLWxpZ2h0YnVsYlwiO1xuICAgICAgICBzY29wZS5ob3N0bmFtZSAgPSAkbG9jYXRpb24uaG9zdCgpO1xuICAgICAgICBzY29wZS5odHRwZHBvcnQgPSAkbG9jYXRpb24ucG9ydCgpO1xuICAgICAgICBzY29wZS5hdXRvbG9nICAgPSBKU09OLnBhcnNlKGF0dHJzLmF1dG9sb2cgfHwgZmFsc2UpO1xuICAgICAgICBcbiAgICAgICAgaWYgKHNjb3BlLmF1dG9sb2cpIHNjb3BlLnRrY3JlYXRlKCk7XG5cbiAgICAgICAgLy8gSW5pdCBwaW5nIGFuZCByZWZyZXNoIHByb2Nlc3NcbiAgICAgICAgJHRpbWVvdXQgKHNjb3BlLmdldHBpbmcsIEFwcENvbmZpZy5zZXNzaW9uLnBpbmdyYXRlKjEwMDApO1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+JyArXG4gICAgICAgICAgICAnPHNwYW4+e3t0aXB9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L3NwYW4+PC9kaXY+JyA7XG5cbiAgICBhbmd1bGFyLm1vZHVsZSgnTW9kYWxOb3RpZmljYXRpb24nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ3RpcE1vZGFsJywgW1wiJHRpbWVvdXRcIiwgZnVuY3Rpb24gKCR0aW1lb3V0KSB7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudCA9IGVsZW0ucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsICAgID0gZWxlbS5maW5kKFwiZGl2XCIpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gZGVsYXkgdGlwIGRpc3BsYXkgdG8gYXZvaWQgYmxpbmtpbmcgd2hlbiBtb3ZpbmcgbW91c2UgZmFzdFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBkaXNwbGF5ICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFjdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnNob3cpIHNjb3BlLm1vZGFsLmNzcyh7b3BhY2l0eTogMSwgdmlzaWJpbGl0eTondmlzaWJsZSd9KTsgIFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2hvdyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS50aW1lb3V0ID0gJHRpbWVvdXQoYWN0aW9uLCBzY29wZS5kZWxheSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsb3NlICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAwLCB2aXNpYmlsaXR5OidoaWRkZW4nfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IGF0dHJzLmljb24gfHwgJ2ZpLWxpZ2h0YnVsYic7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgUGFyZW50IGVsZW1lbnQgdG8gZ2V0IG1vdXNlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5hZGRDbGFzcyAoJ2FzLW1vZGFsLXRpcCcpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnY2xpY2snLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdmb2N1cycsIGRpc3BsYXkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnbW91c2VvdmVyJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZWxlYXZlJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnYmx1cicsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmRlbGF5ID0gYXR0cnMuZGVsYXkgfHwgMTAwMDsgLy8gd2FpdCAxcyBiZWZvcmUgZ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ZhciBhYmFuZG9uID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuZGVhY3RpdmF0ZSgpO1xuICAgICAgICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtzY29wZS5tb2RhbC5kZXN0cm95KCk7fSwgMTAwMCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByZWFkZXJDQiA9IGZ1bmN0aW9uICh1cGxvYWQpIHtcbiAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIEZpbGUgdXBsb2FkIGZhaWwgaGFuZGxlIGVycm9yXG4gICAgICAgICAgICAgICAgaWYgKCEgdXBsb2FkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChoYW5kbGUuZmlsZS5zaXplID4gc2NvcGUubWF4c2l6ZSoxMDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gc2NvcGUuaXN0b29iaWc7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZT0gdG1wbEVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNOYU4oaGFuZGxlLmZpbGUuc2l6ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGljb24gPSBzY29wZS5pc25vdHZhbGlkOyBcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciB6aXBhcHAgPSBuZXcgSlNaaXAgKHVwbG9hZC50YXJnZXQucmVzdWx0KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRodW1ibmFpbCA9IHppcGFwcC5maWxlKFwiaWNvbl8xMjgucG5nXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIENoZWNrIGlzIHdlIGhhdmUgYSB0aHVtYm5haWwgd2l0aGluIGxvYWRlZCBaaXBmaWxlXG4gICAgICAgICAgICAgICAgICAgIGlmICghdGh1bWJuYWlsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJUaGlzIGlzIG5vdCBhIHZhbGlkIEFwcGxpY2F0aW9uIEZyYW1ld29yayBBUFBcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gc2NvcGUuaXNub3R2YWxpZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlPSB0bXBsRXJyb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuaW1nRWxlbVswXS5zcmMgPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChuZXcgQmxvYihbdGh1bWJuYWlsLmFzQXJyYXlCdWZmZXIoKV0sIHt0eXBlOiBcImltYWdlXCJ9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBpY29uID0gd2luZG93LlVSTC5jcmVhdGVPYmplY3RVUkwobmV3IEJsb2IoW3RodW1ibmFpbC5hc0FycmF5QnVmZmVyKCldLCB7dHlwZTogXCJpbWFnZVwifSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGUgPSB0bXBsTW9kYWw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdWNjZXNzIDogc3VjY2VzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFiYW5kb24gOiBhYmFuZG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IGFwcGljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBuYW1lIDogaGFuZGxlLmJhc2VuYW1lXG4gICAgICAgICAgICAgICAgICAgIH0sIHRlbXBsYXRlIDogdGVtcGxhdGVcbiAgICAgICAgICAgICAgICB9OyBcbiAgICAgICAgICAgICAgICAvLyBQb3B1cCBNb2RhbCB0byByZW5kZXIgYXBwbGljYXRpb24gZGF0YVxuICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsID0gbmV3IE1vZGFsRmFjdG9yeShjb25maWcpO1xuICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsLmFjdGl2YXRlICgpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLy8gTG9hZCBmaWxlIHdpdGhpbiBicm93c2VyIGFuZCBpZiBPSyBjYWxsIHJlYWRlckNCXG4gICAgICAgICAgICBoYW5kbGUgPSBuZXcgTG9hZEZpbGVTdmMgKHNjb3BlLCBmaWxlcywgcmVhZGVyQ0IpO1xuICAgICAgICAgICAgY29uc29sZS5sb2cgKGhhbmRsZSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gSW5pdGlhbGxpemUgZGVmYXVsdCB2YWx1ZXMgZnJvbSBhdHRyaWJ1dGVzIHZhbHVlc1xuICAgICAgICBzY29wZS5uYW1lPSBhdHRycy5uYW1lIHx8ICdhcHBsaSc7XG4gICAgICAgIHNjb3BlLmNhdGVnb3J5PSBhdHRycy5jYXRlZ29yeSA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IHNjb3BlLnN0YXR1cyA9ICd0b3VjaCc7XG4gICAgIH07ICAgXG4gICAgICAgICAgICBcbiAgICAgc2NvcGUudmFsaWRhdGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICBcbiAgICAgICAgIC8vIGdldCB2YWx1ZSBmcm9tIGlucHV0IGZpZWxkIGJ5cGFzc2luZyBBbmd1bGFyIG5nLW1vZGVsXG4gICAgICAgICBjb25zb2xlLmxvZyAoXCJDbGlja2VkIElucHV0VGV4dCBuYW1lPSVzIHZhbHVlPSVzIHZhbGlkPSVzXCIsIHNjb3BlLm5hbWUsIHNjb3BlLnZhbHVlLCBzY29wZS52YWxpZCk7ICAgICAgICBcblxuICAgICAgICAgLy8gZm9ybSBpcyBub3QgdW50b3VjaGVkIGFueW1vcmVcbiAgICAgICAgIHNjb3BlLnBhcmVudC5yZW1vdmVDbGFzcyAoXCJuZy1wcmlzdGluZVwiKTtcblxuICAgICAgICAgLy8gaWYgdmFsdWUgbm90IG51bGwgY2xlYW4gdXAgc3RyaW5nXG4gICAgICAgICBpZiAoc2NvcGUudmFsdWUpIHtcbiAgICAgICAgICAgICBzY29wZS5lcnJvcj1mYWxzZTsgXG4gICAgICAgICAgICAvLyByZW1vdmUgbGVhZGluZyBhbmQgdHJhaWxsaW5nIHNwYWNlXG4gICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRyaW0oKTtcbiAgICAgICAgIFxuICAgICAgICAgICAgLy8gcmVtb3ZlIGFueSBzcGFjZSBpcyBub3QgYWxsb3dlZFxuICAgICAgICAgICAgaWYgKCdub3NwYWNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWU9c2NvcGUudmFsdWUucmVwbGFjZSgvXFxzL2csICcnKTsgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIGlmICgnbG93ZXJjYXNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBzY29wZS52YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgXG4gICAgICAgICAgICAvLyBjaGVjayBtaW5pbXVtIGxlbmdodFxuICAgICAgICAgICAgaWYgKFwibWlubGVuXCIgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlLmxlbmd0aCA8IGF0dHJzLm1pbmxlbikge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IE1pbmludW0gTGVuZ2g9ICcgKyBhdHRycy5taW5sZW4gKyAnIENoYXJhY3RlcnMnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJvcj10cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICgnZW1haWwnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICBpZiAoIWVtYWlscGF0ZXJuLnRlc3QgKHNjb3BlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJybXNnPSdpbnZhbGlkIGVtYWlsIGFkZHJlc3MnO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IFJlcXVpcmVkIEF0dHJpYnV0ZSc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7IFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgIC8vIElmIGxvY2FsIGNvbnRyb2wgZmFpbCBsZXQncyByZWZ1c2UgaW5wdXRcbiAgICAgICAgIGlmIChzY29wZS5lcnJvcikge1xuICAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCAmJiBzY29wZS52YWxpZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS52YWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBpZiAoc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgPiAwKSBzY29wZS5sNGFjb3VudGVyLnZhbGlkYXRlZCAtLTtcbiAgICAgICAgICAgICB9IFxuICAgICAgICAgICAgIC8vIHVzZSBjYWxsIHRvIHVwZGF0ZSBmb3JtIHNjb3BlIG9uIGZvcm0gY29tcGxldGVuZXNzXG4gICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKGF0dHJzLm5hbWUsIG51bGwsIHNjb3BlLmRvbmUpO1xuICAgICAgICAgfSBlbHNlIHsgXG4gICAgICAgICAgICAgLy8gbG9jYWxjaGVjayBpcyBPSyBiYWNrdXAgbWF5IG5ldmVydGhlbGVzcyBjaGFuZ2Ugc3RhdHVzIHRvIGZhbHNlXG4gICAgICAgICAgICBpZiAoc2NvcGUucmVxdWlyZWQgICYmICFzY29wZS52YWxpZCkgc2NvcGUubDRhY291bnRlci52YWxpZGF0ZWQgKys7XG4gICAgICAgICAgICBzY29wZS5zdGF0dXM9J3ZhbGlkJztcbiAgICAgICAgICAgIHNjb3BlLnZhbGlkPXRydWU7XG4gICAgICAgICAgICBzY29wZS5jYWxsYmFjayAoYXR0cnMubmFtZSwgc2NvcGUudmFsdWUsIHNjb3BlLmRvbmUpO1xuICAgICAgICAgfVxuICAgICAgICAgIFxuICAgICB9O1xuICAgICBcbiAgICAgLy8gdGhpcyBtZXRob2QgY2FuIGJlIGNhbGxlZCBmcm9tIGNvbnRyb2xsZ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lKCdMaW5rQnV0dG9uJywgW10pXG4gICAgICAgICAgICAuZGlyZWN0aXZlKCdsaW5rQnV0dG9uJywgW1wiJGxvY2F0aW9uXCIsIGZ1bmN0aW9uICgkbG9jYXRpb24pIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBteW1ldGhvZHMoc2NvcGUsIGVsZW0sIGF0dHJzKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2xpY2tlZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFhdHRycy5xdWVyeSkgJGxvY2F0aW9uLnBhdGgoYXR0cnMuaHJlZik7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlICRsb2NhdGlvbi5wYXRoKGF0dHJzLmhyZWYpLnNlYXJjaChhdHRycy5xdWVyeSk7XG4gICAgICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uID0gYXR0cnMuaWNvbiAgIHx8ICdmaS1saW5rJztcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBhdHRycy5sYWJlbCB8fCAnSnVtcCc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmhyZWYgID0gYXR0cnMuaHJlZiAgfHwgJy9ob21lJztcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICA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dGhpcyBwcm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LlxuICogXG4gKiBCdWdzOiBJbnB1dCB3aXRoIENhbGxiYWNrIFNIT1VMRCBCRSBnZXQgJ3JlcXVpcmVkJyBjbGFzc1xuICovXG5cbihmdW5jdGlvbiAoKSB7XG4gICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgdmFyIHRtcGwgPSAnPGRpdiAgbmctY2xpY2s9XCJjbGlja2VkKClcIj4nICtcbiAgICAgICAgICAgICc8aSBjbGFzcz1cInt7aWNvbn19XCI+PC9pPicgK1xuICAgICAgICAgICAgJzxzcGFuPnt7bGFiZWx9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L2Rpdj4nO1xuXG4gICAgYW5ndWxhci5tb2R1bGUoJ1N1Ym1pdEJ1dHRvbicsIFtdKVxuICAgICAgICAgICAgLmRpcmVjdGl2ZSgnc3VibWl0QnV0dG9uJywgZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gfHwgJ2ZpLWZvb3QnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdOZXh0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGN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Y3Rpb24oYWN0aW9uLCByZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vdGlmaWNhdGlvbi5lcnJvciAoe21lc3NhZ2U6IFwiRmFpbCAvYXBpL2FmbS1tYWluXCIgKyBhY3Rpb24gKyBcIj1cIiArIHNjb3BlLmxhYmVsICsgXCIgUnVuSUQ9XCIrIHNjb3BlLmFwcElELCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgKFwiZmFpbFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcInN1Y2Nlc3NcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLmFwcElELCBhY3Rpb24sIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBub3RpZnlTdWNjZXNzID0gZnVuY3Rpb24gKGFjdGlvbiwgcmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcImZhaWxcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUucnVuSUQgPSByZXNwb25zZS5kYXRhLnJlc3BvbnNlLnJ1bmlkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmNhbGxiYWNrIChzY29wZS5hcHBJRCwgYWN0aW9uLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2xvc2VNb2RBcHAgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5tb2RBcHAuZGVhY3RpdmF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtzY29wZS5tb2RBcHAuZGVzdHJveSgpO30sIDEwMDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNsb3NlTW9kSW5mbyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEluZm8uZGVhY3RpdmF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aW1lb3V0IChmdW5jdGlvbigpIHtzY29wZS5tb2RJbmZvLmRlc3Ryb3koKTt9LCAxMDAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3Rpb25Nb2RhbCA9IGZ1bmN0aW9uKGFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIk1vZGFsIEFjdGlvbj0lc1wiLCBhY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwic3RhcnRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5ydW5zdGF0dXMgIT09IFwic3RvcFwiKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcHBDYWxsLmdldCAoXCJhZm0tbWFpblwiLCBcInN0YXJ0XCIsIHtpZDogc2NvcGUuYXBwSUQsIG1vZGU6IHNjb3BlLnJ1bm1vZGV9LCBmdW5jdGlvbihyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5zdGF0dXMgIT09IDIwMCB8fCByZXNwb25zZS5kYXRhLmp0eXBlICE9PSBcIkFKQl9yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcInN0YXJ0XCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5ydW5zdGF0dXM9XCJzdGFydFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKGFjdGlvbiwgcmVzcG9uc2UpO1xuXHRcdFx0XHRcdGlmKHJlc3BvbnNlLmRhdGEucmVzcG9uc2UudXJpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS53aW5hcHA9ICR3aW5kb3cub3BlbihyZXNwb25zZS5kYXRhLnJlc3BvbnNlLnVyaS5yZXBsYWNlKFwiJWhcIiwgJGxvY2F0aW9uLmhvc3QoKSkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJzdG9wXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUucnVuc3RhdHVzICE9PSBcInN0YXJ0XCIpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJ0ZXJtaW5hdGVcIiwge3J1bmlkOiBzY29wZS5ydW5JRH0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEuanR5cGUgIT09IFwiQUpCX3JlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwic3RvcFwiLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUucnVuc3RhdHVzPVwic3RvcFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIGEgcmVtb3RlIHdpbmRvdyBhcHAgd2FzIG9wZW4gbGV0J3MgY2xvc2UgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUud2luYXBwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiQ2xvc2luZyBBcHBsaWNhdGlvbiBXaW5kb3cgbGFiZWw9JXMgaWQ9JXNcIiwgc2NvcGUubGFiZWwsIHNjb3BlLmFwcElEKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS53aW5hcHAuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS53aW5hcHA9ZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeVN1Y2Nlc3MgKGFjdGlvbiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcImluZm9cIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFwcENhbGwuZ2V0IChcImFmbS1tYWluXCIsIFwiZGV0YWlsXCIsIHtpZDogc2NvcGUuYXBwSUR9LCBmdW5jdGlvbihyZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5zdGF0dXMgIT09IDIwMCB8fCByZXNwb25zZS5kYXRhLmp0eXBlICE9PSBcIkFKQl9yZXBseVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdGlmeUVycm9yIChcImRldGFpbFwiLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25JbjogJ3NsaWRlSW5Gcm9tVG9wJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgIDogY2xvc2VNb2RJbmZvLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbiAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbCAgIDogc2NvcGUuYXBwSUQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRhaWwgIDogcmVzcG9uc2UuZGF0YS5yZXNwb25zZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB0ZW1wbGF0ZSA6IHRtcGxEZXRhaWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OyBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQb3B1cCBNb2RhbCB0byByZW5kZXIgYXBwbGljYXRpb24gZGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEluZm8gPSBuZXcgTW9kYWxGYWN0b3J5KGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kSW5mby5hY3RpdmF0ZSAoKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwidW5pbnN0YWxsXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvcGUucnVuc3RhdHVzICE9PSBcInN0b3BcIikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJ1bmluc3RhbGxcIiwge2lkOiBzY29wZS5hcHBJRH0sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwIHx8IHJlc3BvbnNlLmRhdGEuanR5cGUgIT09IFwiQUpCX3JlcGx5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90aWZ5RXJyb3IgKFwidW5pbnN0YWxsXCIsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlTdWNjZXNzIChhY3Rpb24sIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkFjdGlvbk1vZGFsIHVua25vd24gYWN0aW9uPVslc11cIiwgYWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZU1vZEFwcCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVmZXJlbmNlIGh0dHA6Ly9mb3VuZGF0aW9uLnp1cmIuY29tL2FwcHMvZG9jcy8jIS9hbmd1bGFyLW1vZHVsZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uSW46ICdzbGlkZUluRnJvbVRvcCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFNjb3BlOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbiAgIDogYWN0aW9uTW9kYWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bnN0YXR1czogc2NvcGUucnVuc3RhdHVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSAgICA6IGNsb3NlTW9kQXBwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uICAgICA6IHNjb3BlLmljb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsICAgIDogc2NvcGUubGFiZWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB0ZW1wbGF0ZSAgOiB0bXBsTW9kYWxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07IFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9wdXAgTW9kYWwgdG8gcmVuZGVyIGFwcGxpY2F0aW9uIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcCA9IG5ldyBNb2RhbEZhY3RvcnkoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZEFwcC5hY3RpdmF0ZSAoKTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBleHRyYWN0IGFwcGxpY2F0aW9uIGluZm9ybWF0aW9uIGZyb20gQXBwSUQrU3RvcmVcbiAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHJzLmhhbmRsZSAmJiBzY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArIGF0dHJzLmhhbmRsZTsgLy9zY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lLnRvTG93ZXJDYXNlKCkgKyAnLWljby5wbmcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBzY29wZS5zdG9yZSBbYXR0cnMuaGFuZGxlXS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuYXBwSUQ9IGF0dHJzLmhhbmRsZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IEFwcENvbmZpZy5wYXRocy5pY29ucyArICd3M2MtaWNvLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUubGFiZWwgPSBhdHRycy5oYW5kbGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgIC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FzaGJvYXJkIEdldFJ1bm5hYmxlc1wiKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgQXBwQ2FsbC5nZXQgKFwiYWZtLW1haW5cIiwgXCJydW5uYWJsZXNcIiwgey8qcXVlcnkqL30sIGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGRlYnVnIFVJIHpvbmVcbiAgICAgICAgICAgICAgICBzY29wZS5yZXF1ZXN0ICA9IFwiL2FwaS9hZm0tbWFpbi9ydW5uYWJsZVwiOyBcbiAgICAgICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJyY29kZSAgPSByZXNwb25zZS5zdGF0dXM7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIkhvb3AgR2V0UnVubmFibGUgZmFpbGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIENoZWNrIHRoaXMgaXMgYSB2YWxpZCByZXNwb25zZSBmcm9tIEJpbmRlclxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5kYXRhLnJlcXVlc3QuanR5cGUgIT09IFwiQUpCX3JlcGx5XCIgJiYgcmVzcG9uc2UuZGF0YS5yZXF1ZXN0LmFwaSAhPT0gXCJydW5uYWJsZXNcIikge1xuICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVycm9yICh7bWVzc2FnZTogXCJJbnZhbGlkIFJlc3BvbmQgdG8gL29wYS9hZm0tbWFpbi9ydW5uYWJsZSByZXNwb25zZS5kYXRhPVwiK3Jlc3BvbnNlLmRhdGEsIGRlbGF5OiA1MDAwfSk7IFxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyBsb29wIG9uIHJ1bm5hYmxlIGFwcGxpY2F0aW9uIHRvIHByZXBhcmUgZm9yIGRpc3BsYXlcbiAgICAgICAgICAgICAgICB2YXIgIGFwcGxpSURzPVtdO1xuICAgICAgICAgICAgICAgIHZhciAgcnVubmFibGVzID0gcmVzcG9uc2UuZGF0YS5yZXNwb25zZS5ydW5uYWJsZXM7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaWR4PTA7IGlkeCA8IHJ1bm5hYmxlcy5sZW5ndGg7IGlkeCArKykge1xuICAgICAgICAgICAgICAgICAgICBhcHBsaUlEc1tpZHhdID0gcnVubmFibGVzIFtpZHhdLmlkO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5hcHBsaVN0b3JlIFtydW5uYWJsZXMgW2lkeF0uaWRdID0gIHJ1bm5hYmxlcyBbaWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2NvcGUuYXBwbGlJRHMgPSBhcHBsaUlEczsgLy8gYXZvaWQgcGFydGlhbCB1cGRhdGUgdG8gbGltaXQgVUkgcmVmcmVzaFxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgfSk7ICAgICAgICAgICAgXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5GaWxlVXBsb2FkZWQgPSBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcImZpbGUgVXBsb2FkZWRcIik7XG4gICAgICAgICAgICAvLyBDYW5ub3QgZGlzcGxheSBwb3N0IHJlc3VsdHMgYXMgR2V0UnVubmFibGUgd2lsbCBvdmVybG9hZCB0aGVtIGF5bmNocm9ub3VzbHlcbiAgICAgICAgICAgIHNjb3BlLnJlcXVlc3QgID0gXCIv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VjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnQgPSBlbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudFswXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlYXJjaCA9PT0gcGFyZW50WzBdLnRhZ05hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeVRhZz0gZnVuY3Rpb24gKGVsZW1lbnQsIHRhZywgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0eXBlICAgPSB0YWcudG9Mb3dlckNhc2UoKSsgXCJOYW1lXCI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBjaGlsZHJlblswXVt0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeUNsYXNzPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hpbGRyZW4uaGFzQ2xhc3Moc2VhcmNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHZhciBteU1ldGhvZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIEZpbmRJblBhcmVudDogRmluZEluUGFyZW50LFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlUYWc6IEZpbmRCeVRhZyxcbiAgICAgICAgICAgICAgICAgICAgRmluZEJ5Q2xhc3M6IEZpbmRCeUNsYXNzXG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBteU1ldGhvZHM7XG4gICAgICAgICAgICB9KTtcblxufSkoKTsiLCJ2YXIgZm91bmRhdGlvblJvdXRlcyA9IFt7XCJuYW1lXC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hdGFycy8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXVkaW8gOiAnaW1hZ2VzL2F1ZGlvLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHBsaSA6ICdpbWFnZXMvYXBwbGkvJ1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uOiB7IC8vIFRob3NlIGRhdGEgYXJlIHVwZGF0ZWQgYnkgc2Vzc2lvbiBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgICAgICAgIGluaXRpYWwgOiB1cmxxdWVyeS50b2tlbiB8fCAnMTIzNDU2Nzg5JywgIC8vIHR5cGljYWwgZGV2IGluaXRpYWwgdG9rZW5cbiAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dCA6IDM2MDAsICAgICAgICAgLy8gdGltZW91dCBpcyB1cGRhdGVkIGNsaWVudCBzZXNzaW4gY29udGV4dCBjcmVhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICBwaW5ncmF0ZTogMTUsICAgICAgICAgICAvLyBQaW5nIHJhdGUgdG8gY2hlY2sgaWYgc2VydmVyIGlzIHN0aWxsIGFsaXZlXG4gICAgICAgICAgICAgICAgICAgICAgIHV1aWQgICAgOiAnJywgICAgICAgICAgIC8vIHV1aWQgbWFwIHdpdGggY29va2llIG9yIGxvbmcgdGVybSBzZXNzaW9uIGFjY2VzcyBrZXlcbiAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gICA6ICcnICAgICAgICAgICAgLy8gd2lsbCBiZSByZXR1cm5lZCBmcm9tIGF1dGhlbnRpY2F0aW9uICAgIFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBteUNvbmZpZztcbiAgICAgICAgICAgIH1dKVxuXG4gICAgICAgICAgICAvLyBGYWN0b3J5IGlzIGEgc2luZ2xldG9uIG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