diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2016-02-15 15:56:36 +0100 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2016-02-15 15:56:36 +0100 |
commit | e6d12f74be543056a439259b61ba40a9d0adcf5c (patch) | |
tree | 06042b26cc2745b749ea1ff99370acaf58e12223 /afb-client/dist.prod/opa | |
parent | fb1353dbc12ae889c17a6aa1572b917f57de0f9d (diff) |
Updated TokenRefresh and AppConfig
Diffstat (limited to 'afb-client/dist.prod/opa')
-rw-r--r-- | afb-client/dist.prod/opa/AFBclient.min.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/afb-client/dist.prod/opa/AFBclient.min.js b/afb-client/dist.prod/opa/AFBclient.min.js index 67b51ae..f6d5d1c 100644 --- a/afb-client/dist.prod/opa/AFBclient.min.js +++ b/afb-client/dist.prod/opa/AFBclient.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";var e='<div ng-click="clicked()"> <span><i class="{{icon}}"></i><span>{{label}}</span></div>';angular.module("SubmitButton",[]).directive("submitButton",function(){function t(e,t,n){e.icon=n.icon||"fi-foot",e.label=n.label||"Next",t.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:t,scope:{clicked:"="}}})}(),function(){"use strict";function e(e){var t=[],n=[];this.getId=function(){return e.sliderid},this.getCbHandle=function(){return e.cbhandle},this.getView=function(a){return a||(a=0),e.value[a]===t[a]?n[a]:(t[a]=e.value[a],e.formatter?n[a]=e.formatter(e.value[a],e.ctrlhandle):n[a]=e.value[a],n[a])},this.updateClass=function(t,n){e.updateClass(t,n)},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,n){n||(n=0),e.setValue(t,n)},this.setDisable=function(t){e.setDisable(t)}}var t=angular.module("RangeSlider",[]);t.directive("rangeSlider",["$log","$document","$timeout",function(t,n,a){function i(t,i,s,o){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 n=t.value;t.value=[void 0,void 0],a(function(){t.setValue(n[0],0),t.dual&&t.setValue(n[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 n,a=t.notMore-t.notLess,i=e*a;if(t.byStep>0){var s=(i-i%t.byStep)/t.byStep,o=i%t.byStep,l=o>=.5*t.byStep?t.byStep:0;return n=s*t.byStep+l+t.notLess}if(t.byStep<0){var r=Math.pow(10,-1*t.byStep);return n=t.notLess+parseInt(i*r)/r}return i},t.getValue=function(e,n){t.vertical?t.relative[n]=(e-t.bounds.handles[n].getBoundingClientRect().height)/(t.bounds.bar.getBoundingClientRect().height-t.bounds.handles[n].getBoundingClientRect().height):t.relative[n]=e/(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[n].getBoundingClientRect().width);var a=t.normalize(t.relative[n]);a!==t.value[n]&&(a<t.startValue&&(a=t.startValue),a>t.stopValue&&(a=t.stopValue),t.formatter?t.viewValue=t.formatter(a,t.ctrlhandle):t.viewValue=a,t.displays[n]&&t.displays[n].html(t.viewValue),t.value[n]=a,o&&o.$setViewValue(t.viewValue),t.$apply(),a>t.startValue&&a<t.stopValue&&t.translate(e,n))},t.setStart=function(e){var n;e>t.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(n=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",n+"px")):(n=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("width",n+"px")),t.startValue=e},t.setStop=function(e){var n;e<t.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(n=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",n+"px")):(n=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.stop.css({right:0,width:t.bounds.bar.getBoundingClientRect().width-n+"px"})),t.stopValue=e},t.translate=function(e,n){var a;if(t.vertical){var i=t.bounds.bar.getBoundingClientRect().height-e;if(t.handles[n].css({"-webkit-transform":"translateY("+i+"px)","-moz-transform":"translateY("+i+"px)","-ms-transform":"translateY("+i+"px)","-o-transform":"translateY("+i+"px)",transform:"translateY("+i+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var s=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().height;a=t.relative[0]*t.bounds.bar.getBoundingClientRect().height,t.slider.css({bottom:a+"px",height:s+"px"})}}else t.slider.css("height",e+"px")}else if(t.handles[n].css({"-webkit-transform":"translateX("+e+"px)","-moz-transform":"translateX("+e+"px)","-ms-transform":"translateX("+e+"px)","-o-transform":"translateX("+e+"px)",transform:"translateX("+e+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var o=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().width;a=t.relative[0]*t.bounds.bar.getBoundingClientRect().width,t.slider.css({left:a+"px",width:o+"px"})}}else t.slider.css("width",e+"px")},t.setValue=function(e,n){var a;e!==t.value[n]&&(void 0===e&&(e=0),e>t.notMore&&(e=t.notMore),e<t.notLess&&(e=t.notLess),t.vertical?(t.relative[n]=(e-t.notLess)/(t.notMore-t.notLess),0===n&&(a=t.relative[n]*t.bounds.bar.getBoundingClientRect().height+t.bounds.handles[n].getBoundingClientRect().height/2),1===n&&(a=t.relative[n]*t.bounds.bar.getBoundingClientRect().height)):(t.relative[n]=(e-t.notLess)/(t.notMore-t.notLess),a=t.relative[n]*(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[n].getBoundingClientRect().width)),t.translate(a,n),t.value[n]=e,t.formatter?t.viewValue=t.formatter(e,void 0):t.viewValue=e,o&&o.$setViewValue(t.viewValue),t.displays[n]&&t.displays[n].html(t.viewValue))},t.keydown=function(e){switch(e.keyCode){case 39:case 38: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 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,n,a){var i;t.vertical?(i=t.bounds.bar.getBoundingClientRect().bottom-a,i>t.bounds.bar.getBoundingClientRect().height&&(i=t.bounds.bar.getBoundingClientRect().height),i<t.bounds.handles[e].getBoundingClientRect().height&&(i=t.bounds.handles[e].getBoundingClientRect().height)):(i=n-t.bounds.bar.getBoundingClientRect().left,0>i&&(i=0),n+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?n.on("keydown",t.keydown):n.unbind("keydown",t.keydown)},t.touchBarCB=function(e){var n,a=0,i=e.changedTouches,s=t.value[a];if(e.preventDefault(),t.dual){n=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 o=Math.abs(n-t.relative[0]),l=Math.abs(n-t.relative[1]);o>l&&(a=1)}t.moveHandle(a,i[0].pageX,i[0].pageY),t.callback&&s!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)},t.touchHandleCB=function(e,a){function s(e){e.preventDefault();for(var n=e.changedTouches,i=0;i<n.length;i++)t.moveHandle(a,n[i].pageX,n[i].pageY)}function o(e){n.unbind("touchmove",s),n.unbind("touchend",o),i.on("touchstart",t.touchBarCB),t.callback&&l!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)}var l=t.value[a];e.preventDefault(),n.on("touchmove",s),n.on("touchend",o),i.unbind("touchstart",t.touchBarCB)},t.handleCB=function(e,a){function i(e){t.moveHandle(a,e.clientX,e.clientY)}function o(){n.unbind("mousemove",i),n.unbind("mouseup",o),t.callback&&l!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)}if(!s.automatic){var l=t.value[a];e.preventDefault(),n.on("mousemove",i),n.on("mouseup",o),t.handles[a][0].focus(),t.actif=a}},t.find=function(e,t){var n;n=t?t[0].querySelector(e):i[0].querySelector(e);var a=angular.element(n);return a},t.initialSettings=function(e){var n;t.value=[],t.relative=[],null===t.precision&&(n=(""+t.byStep).match(/\.([\d]*)/),t.precision=n&&n[1]?n[1].length:0),i.on("touchstart",t.touchBarCB),t.handles[0].on("touchstart",function(e){t.touchHandleCB(e,0)}),t.dual&&(t.handles[1].addClass("range-slider-handle"),t.handles[1].on("touchstart",function(e){t.touchHandleCB(e,1)}),t.initvalues||t.setValue(e[1],1)),t.initvalues?t.initWidget(t.initvalues):t.setValue(e[0],0)},t.init=function(){if(t.sliderid=s.id||"slider-"+parseInt(1e3*Math.random()),t.startValue=-(1/0),t.stopValue=1/0,t.byStep=parseInt(s.byStep)||1,t.vertical=s.vertical||!1,t.dual=s.dualHandles||!1,t.trigger_input_change=!1,t.notMore=parseInt(s.notMore)||100,t.notLess=parseInt(s.notLess)||0,t.vertical&&i.addClass("vertical-range"),t.handles=[t.find(".handle-min"),t.find(".handle-max")],t.bar=i,t.slider=t.find(".range-slider-active-segment"),t.start=t.find(".ibz-range-slider-start"),t.stop=t.find(".ibz-range-slider-stop"),t.disable=s.disable||!1,t.ctrlhandle=new e(t),t.bounds={bar:i[0],handles:[t.handles[0][0],t.handles[1][0]]},"true"===s.disable&&t.setDisable(!0),s.displayTarget)switch(s.displayTarget){case!0:case"handle":t.displays=t.handles,t.handles[0].addClass("ibz-range-slider-display"),t.dual&&t.handles[1].addClass("ibz-range-slider-display");break;default:t.displays=[n.getElementById(s.displayTarget)]}else t.displays=[];if(s.initial){var a=s.initial.split(",");t.initial=[void 0!==a[0]?parseInt(a[0]):t.notLess,void 0!==a[1]?parseInt(a[1]):t.notMore]}else t.initial=[t.ngModel,t.ngModel];t.$watch("startAt",function(){t.value<t.startAt,t.startAt&&t.setStart(t.startAt)}),t.$watch("stopAt",function(){t.value>t.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='<div class="ibz-range-slider range-slider" title="{{title}}"data-slider><span class="range-slider-handle handle-min" ng-mousedown="handleCB($event,0)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="handle-max" ng-mousedown="handleCB($event,1)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="range-slider-active-segment"></span><span class="ibz-range-slider-start" ></span> <span class="ibz-range-slider-stop"></span> <input id={{sliderid}} type="hidden"></div>';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='<div class="afb-monitor" ng-click="getping()"><span class="afb-refresh-token" >afb://{{hostname}}:{{httpdport}}</span><i class="{{icon}}"></i></div>';angular.module("TokenRefresh",["ConfigApp","ModalNotification"]).directive("tokenRefresh",["$timeout","$http","$location","Notification","ConfigApp",function(t,n,a,i,s){function o(e,o,l){e.status=void 0,e.online=function(){o.addClass("online"),o.removeClass("offline")},e.offline=function(){o.addClass("offline"),o.removeClass("online")},e.onerror=function(t,n,a){e.status!==!1&&(i.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t,n,a,o){e.status!==!0&&(t.request.token&&(s.session.token=t.request.token),t.request.uuid&&(s.session.uuid=t.request.uuid),t.request.timeout&&(s.session.timeout=t.request.timeout),i.success({message:"AppFramework Binder Back to Live",delay:3e3}),e.online()),e.status=1},e.getping=function(){var a=n.get(s.session.ping+"?token="+s.session.token);a.success(e.onsuccess),a.error(e.onerror),t(e.getping,1e3*s.session.pingrate)},e.refresh=function(){var a=n.get(s.session.refresh+"?token="+s.session.token);a.success(e.onsuccess),a.error(e.onerror),t(e.refresh,250*s.session.timeout)},e.tkcreate=function(){var t=n.get(s.session.create+"?token="+s.session.initial);t.success(e.onsuccess),t.error(e.onerror)},e.icon=l.icon||"fi-lightbulb",e.hostname=a.host(),e.httpdport=a.port(),e.autolog=JSON.parse(l.autolog||!1),e.autolog&&e.tkcreate(),t(e.getping,1e3*s.session.pingrate),t(e.refresh,250*s.session.timeout)}return{template:e,scope:{callback:"="},restrict:"E",link:o}}])}(),function(){"use strict";var e='<div class="tip-modal-popup"><i class="{{icon}}"></i><span>{{tip}}</span></span></div>';angular.module("ModalNotification",[]).directive("tipModal",["$timeout",function(t){function n(e,n,a){function i(){function n(){e.show&&e.modal.css({opacity:1,visibility:"visible"})}e.show=!0,e.timeout=t(n,e.delay)}function s(){e.show=!1,e.modal.css({opacity:0,visibility:"hidden"})}e.parent=n.parent(),e.modal=n.find("div"),e.icon=a.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=a.delay||1e3}return{restrict:"E",template:e,link:n,scope:{tip:"="}}}])}(),function(){"use strict";var e='<span title="Goto: {{href}}" ng-click="clicked()"><i class="{{icon}}"></i><span>{{label}}</span></span>';angular.module("LinkButton",[]).directive("linkButton",["$location",function(t){function n(e,n,a){e.clicked=function(){a.query?t.path(a.href).search(a.query):t.path(a.href)},e.icon=a.icon||"fi-link",e.label=a.label||"Jump",e.href=a.href||"/home",n.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:n,scope:{}}}])}(),function(){"use strict";function e(e,t,n,a,i){var s=new XMLHttpRequest,o=new FormData,l=function(e){i(e)};s.upload.onprogress=function(t){var n=Math.round(t.lengthComputable?100*t.loaded/t.total:0);e.slider&&e.slider.setValue(n)},s.onload=function(){t.addClass("success"),t.removeClass("error");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)},s.onerror=function(){t.addClass("error"),t.removeClass("success");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)},s.onabort=function(){t.addClass("error"),t.removeClass("success");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)};for(var r=0;r<a.length;r++){var u=a[r];if(u.type.match(e.mimetype)){if(u.size>1024*e.maxsize)return e.thumbnail=e.istoobig,void e.$apply("thumbnail");if(isNaN(u.size))return e.thumbnail=e.isnotvalid,void e.$apply("thumbnail");if(e.Basename=u.name.split("/").reverse()[0],e.imgElem[0].file=u,i){var c=new FileReader;c.readAsArrayBuffer(u),c.onload=l}o.append(e.name,u,u.name)}}s.open("POST",n,!0),s.send(o)}var t='<input type="file" name="{{name}}-input" onchange="angular.element(this).scope().UpLoadFile(this.files)" accept="{{mimetype}}" style="display:none"><div class="upload-file" ng-click="imgClicked()"><img id="{{name}}-img" src="{{thumbnail}}"><range-slider ng-show="!noslider" id="{{name}}-slider" automatic=true inithook="SliderInitCB"></range-slider></div>';angular.module("UploadFiles",["ConfigApp","ModalNotification","RangeSlider"]).directive("uploadImage",["ConfigApp","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=function(e){return t.imgElem[0].src=window.URL.createObjectURL(new Blob([e.target.result],{type:"image"})),!0},l=i.posturl+"?token="+n.session.token;new e(t,a,l,s,o)},t.name=i.name||"avatar",t.category=i.category||"image",t.mimetype=(i.accept||"image")+"/*",t.maxsize=i.maxsize||100,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"tux-bzh.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}]).directive("uploadAudio",["ConfigApp","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=i.posturl+"?token="+n.session.token;new e(t,a,o,s,!1)},t.name=i.name||"audio",t.category=i.category||"audio",t.mimetype=(i.accept||"audio")+"/*",t.maxsize=i.maxsize||1e4,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"upload-music.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}]).directive("uploadAppli",["ConfigApp","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=function(e){var a=new JSZip(e.target.result),i=a.file("afa-pkg/thumbnail.jpg");return i?(t.imgElem[0].src=window.URL.createObjectURL(new Blob([i.asArrayBuffer()],{type:"image"})),!0):(t.thumbnail=n.paths[t.category]+"isnotvalid.png",t.$apply("thumbnail"),!1)},l=i.posturl+"?token="+n.session.token;new e(t,a,l,s,o)},t.name=i.name||"appli",t.category=i.category||"appli",t.mimetype=i.accept||".zip",t.maxsize=i.maxsize||1e5,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"upload-appli.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}])}(),function(){"use strict";var e='<tip-modal tip="tip"></tip-modal><label for="{{name}}-intext">{{label}} <i ng-show="required" ng-click="ToBeDefined" class="required {{status}} fi-checkbox" title="Free Value But Mandatory Argument" alt="?"> </i></label><input type="{{type}}" id="{{name}}-intext" placeholder="{{placeholder}}" class="status-{{status}}" ng-model="value" ng-blur="validate()" ng-focus="selected()" ng-model-options="{ updateOn: \'default blur\', debounce: {default: 500, blur: 0} }"><alert data-ng-show="!valid&&errmsg">{{errmsg}}</alert>',t=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;angular.module("InputText",["JQueryEmu"]).directive("inputText",["JQemu",function(n){function a(e,a,i){e.error=!1,e.valid=!1,e.status="untouch",e.input=a.find("input"),e.required=0,"required"in i&&(e.required=1,a.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.length<i.minlen&&(e.status="invalid",e.errmsg=e.name+": Mininum Lengh= "+i.minlen+" Characters",e.error=!0),"email"in i&&(t.test(e.value)||(e.status="invalid",e.errmsg="invalid email address",e.error=!0))):e.required&&(e.status="invalid",e.errmsg=e.name+": Required Attribute",e.error=!0),e.error?(e.required&&e.valid&&(e.valid=!1,e.l4acounter.validated>0&&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 n in t)e[n]=t[n]},e.label=i.label,e.name=i.name,e.placeholder=i.placeholder,e.type=i.type||"text",e.tip=i.tip,e.parent=n.parent(a,"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:a,scope:{callback:"=",value:"="}}}])}(),function(){"use strict";var e='<input-text class="password" tip="{{tip1}}" placeholder="{{place1}}"label="{{label1}}" callback="valid1" name="{{name}}-1" value="pass1" required minlen="{{minlen}}" type="password" ></input-text><input-text class="password" tip="tip2" placeholder="{{place2}}"label="{{label2}}" callback="valid2" name="{{name}}-2" value="pass2" required minlen="{{minlen}}" type="password" > </input-text>';angular.module("InputPassword",[]).directive("inputPassword",function(){function t(e,t,n){e.valid1=function(t,n){e.firstpwd=n},e.valid2=function(t,a,i){e.firstpwd!==a?i({valid:!1,status:"invalid",errmsg:"both password should match"}):e.callback(n.name,a)},e.done=function(t){for(var n in t)e[n]=t[n]},e.name=n.name,e.label1=n.label||"Password",e.label2=n.label||"Password Verification",e.place1=n.placeholder1||"User Password",e.tip1=n.tip||"Choose a Password",e.place2=n.placeholder1||"Password Verification",e.tip2=n.tip||"Confirme your Password",e.minlen=n.minlen||10,"required"in n&&(e.required="required")}return{restrict:"E",template:e,link:t,scope:{callback:"="}}})}(),function(){"use strict";angular.module("SampleModule",["SubmitButton","UploadFiles"]).controller("SampleController",["$http",function(e){var t=this;t.FileUploaded=function(e){}}])}(),function(){"use strict";angular.module("HomeModule",["SubmitButton","TokenRefresh"]).controller("HomeController",["$http","ConfigApp",function(e,t){var n=this;n.uuid="none",n.token="none",n.session="none",n.status="err-no",n.ProcessResponse=function(e,a,i,s){var o="API"+e.request.api.replace("-","_");n.status="err-ok",n.errcode=a,n.request=e.request,n.response=e.response,e.request.token&&(t.session.token=e.request.token),e.request.uuid&&(t.session.uuid=e.request.uuid),e.request.timeout&&(t.session.timeout=e.request.timeout),("APIcreate"===o||"APIreset"===o)&&(n.APIreset="",n.APIcreate="",n.APIrefresh="",n.APIcheck=""),n[o]="success",e.request.token&&(n.token=e.request.token)},n.ProcessError=function(e,t,a,i){var s="API"+e.request.api.replace("-","_");n.status="err-fx",n.errcode=t,n.request=e.request,n.response="",n[s]="fail"},n.OpenSession=function(){var a={},i=e.post(t.session.create+"?token="+t.session.initial,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.CheckSession=function(){var a={},i=e.post(t.session.check+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.RefreshSession=function(){var a={},i=e.post(t.session.refresh+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.ResetSession=function(){var a={},i=e.post(t.session.reset+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)}}])}(),function(){"use strict";angular.module("JQueryEmu",[]).factory("JQemu",function(){var e=function(e,t){for(var n=e,a=t.toUpperCase();n[0];){if(a===n[0].tagName)return n;n=n.parent()}},t=function(e,t,n){for(var a=n.toLowerCase(),i=t.toLowerCase()+"Name",s=e.children();s[0];){if(a===s[0][i])return s;s=s.next()}},n=function(e,t){for(var n=t.toLowerCase(),a=e.children();a[0];){if(a.hasClass(n))return a;a=a.next()}},a={FindInParent:e,FindByTag:t,FindByClass:n};return a})}();var foundationRoutes=[{name:"mysample",url:"/sample",controller:"SampleController as ctrl",animationIn:"slideInRight",path:"pages/Sample/Sample.html"},{name:"myhome",url:"/home",controller:"HomeController as ctrl",animationIn:"slideInRight",path:"pages/Home/Home.html"}];!function(){"use strict";angular.module("ConfigApp",[]).factory("ConfigApp",["urlquery",function(e){var t={paths:{image:"images/",avatar:"images/avatars/",audio:"images/audio/",appli:"images/appli/"},myapi:{token:"/api/myplugin/xxxx"},session:{create:"/api/token/create",refresh:"/api/token/refresh",check:"/api/token/check",reset:"/api/token/reset",ping:"/api/token/check",initial:e.token||"123456789",timeout:3600,pingrate:60,uuid:"",token:""}};return t}])}(),function(){"use strict";function e(){var e={};return location.search.substr(1).split("&").forEach(function(t){var n=t.split("=")[0],a=decodeURIComponent(t.split("=")[1]);n in e?e[n].push(a):e[n]=[a]}),e}function t(e,t,n){e.otherwise("/home"),t.html5Mode(!0).hashPrefix("!")}function n(){FastClick.attach(document.body)}angular.module("AFBclient",["ui.router","ngAnimate","foundation","foundation.dynamicRouting","foundation.dynamicRouting.animations","ui-notification","ConfigApp","JQueryEmu","HomeModule","SampleModule","UploadFiles","LinkButton","TokenRefresh","RangeSlider","ModalNotification"]).value("urlquery",e()).config(t).run(n),t.$inject=["$urlRouterProvider","$locationProvider"]}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Sample/Sample.html",'<h1><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> Post File Upload</h1><div class="sample-box box-content"><upload-image name="avatar" category="avatar" thumbnail="tux-visitor.png" maxsize="100" posturl="/api/post/upload-image" callback="ctrl.FileUploaded" accept="image" title="Change your Avatar"></upload-image><upload-audio name="music" posturl="/api/post/upload-music" callback="ctrl.FileUploaded" title="Upload your Music"></upload-audio><upload-appli name="appli" posturl="/api/post/upload-appli" callback="ctrl.FileUploaded" title="Upload AGL App"></upload-appli></div><link-button href="home" icon="fi-home" label="home"></link-button>')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Home/Home.html",'<h3><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> App Framework Binder Simple Client</h3><token-refresh autolog="true"></token-refresh><div class="button-box box-content"><submit-button class="session-button {{ctrl.APIcreate}}" icon="fi-unlock" label="Open" clicked="ctrl.OpenSession"></submit-button><submit-button class="session-button {{ctrl.APIcheck}}" icon="fi-checkbox" label="Check" clicked="ctrl.CheckSession"></submit-button><submit-button class="session-button {{ctrl.APIrefresh}}" icon="fi-arrows-compress" label="Refresh" clicked="ctrl.RefreshSession"></submit-button><submit-button class="session-button {{ctrl.APIreset}}" icon="fi-lock" label="Close" clicked="ctrl.ResetSession"></submit-button></div><div class="message-box box-content vertical grid-frame"><div class="response"><span class="grid-content noscroll req {{ctrl.status}}">req= {{ctrl.request}}</span> <span class="grid-content noscroll res {{ctrl.status}}">res= {{ctrl.response}}</span> <span class="grid-content noscroll status {{ctrl.status}}">status= {{ctrl.errcode}}</span></div></div><link-button href="sample" icon="fi-home" label="sample"></link-button>')}])}(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpZGdldHMvQnV0dG9ucy9TdWJtaXRCdXR0b25zL1N1Ym1p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gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gfHwgJ2ZpLWZvb3QnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdOZXh0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyBpdCB3aWxsIGNhbGwgY2xpY2tlZCBtZXRob2QgcGFzc2VkIGluIHBhcmFtLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge2NsaWNrZWQgOiAnPSd9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pO1xufSkoKTtcbiIsIi8qIFxuICogQ29weXJpZ2h0IChDKSAyMDE1IFwiSW9ULmJ6aFwiXG4gKiBBdXRob3IgXCJGdWx1cCBBciBGb2xsXCJcbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGU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GRDbGFzcyAoY2xhc3NlKTtcbiAgICAgICAgICAgIGVsc2UgIGVsZW1lbnQucmVtb3ZlQ2xhc3MgKGNsYXNzZSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUuc2V0RGlzYWJsZSA9IGZ1bmN0aW9uIChkaXNhYmxlZCkge1xuXG4gICAgICAgICAgICBpZiAoZGlzYWJsZWQpIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzIChcImRpc2FibGVcIik7XG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5jc3MgKCd2aXNpYmlsaXR5JywnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1sxXS5jc3MgKCd2aXNpYmlsaXR5JywnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50LnJlbW92ZUNsYXNzIChcImRpc2FibGVcIik7XG4gICAgICAgICAgICAgICAgc2NvcGUuaGFuZGxlc1swXS5jc3MgKCd2aXNpYmlsaXR5JywndmlzaWJsZScpO1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmNzcyAoJ3Zpc2liaWxpdHknLCd2aXNpYmxlJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5ub3JtYWxpemUgPSBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQ7XG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcztcbiAgICAgICAgICAgIHZhciBwb2ludCA9IHZhbHVlICogcmFuZ2U7XG5cbiAgICAgICAgICAgIC8vIGlmIHN0ZXAgaXMgcG9zaXRpdmUgbGV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AgIH07XG5cblxuICAgICAgICBzY29wZS5zZXRTdGFydCA9IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdmFyIG9mZnNldDtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHZhbHVlID4gc2NvcGUudmFsdWVbMF0pIHtcbiAgICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwwKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAgICAgb2Zmc2V0ID0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQgKiAodmFsdWUgLSBzY29wZS5ub3RMZXNzKSAvIChzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcyk7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhcnQuY3NzKCdoZWlnaHQnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoICogKHZhbHVlIC0gc2NvcGUubm90TGVzcykgLyAoc2NvcGUubm90TW9yZSAtIHNjb3BlLm5vdExlc3MpO1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXJ0LmNzcygnd2lkdGgnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5zdGFydFZhbHVlPSB2YWx1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5zZXRTdG9wID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgb2Zmc2V0O1xuICAgICAgICAgICAgXG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LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodDtcbiAgICAgICAgICAgICAgICAgICBzdGFydCAgPSAoc2NvcGUucmVsYXRpdmVbMF0gKiAgc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQpO1xuICAgICAgICAgICAgICAgICAgIHNjb3BlLnNsaWRlci5jc3MgKHsnYm90dG9tJzogc3RhcnQrJ3B4JywnaGVpZ2h0JzogaGVpZ2h0ICsgJ3B4J30pO1xuICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXS5jc3Moe1xuICAgICAgICAgICAgICAgICAgICAnLXdlYmtpdC10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctbW96LXRyYW5zZm9ybSc6ICd0cmFuc2xhdGVYKCcgKyBvZmZzZXQgKyAncHgpJyxcbiAgICAgICAgICAgICAgICAgICAgJy1tcy10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICctby10cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KScsXG4gICAgICAgICAgICAgICAgICAgICd0cmFuc2Zvcm0nOiAndHJhbnNsYXRlWCgnICsgb2Zmc2V0ICsgJ3B4KSdcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNsaWRlci5jc3MoJ3dpZHRoJyxvZmZzZXQgKyAncHgnKTtcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChzY29wZS5yZWxhdGl2ZVsxXSAmJiBzY29wZS5yZWxhdGl2ZVswXSkge1xuICAgICAgICAgICAgICAgICAgICB2YXI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Z0NsaWVudFJlY3QoKS53aWR0aCAtIHNjb3BlLmJvdW5kcy5oYW5kbGVzW2hhbmRsZV0uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkud2lkdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5nZXRWYWx1ZSAgKG9mZnNldCwgaGFuZGxlKTtcblxuICAgICAgICAgICAgLy8gcHJldmVudCBkdWFsIGhhbmRsZSB0byBjcm9zc1xuICAgICAgICAgICAgaWYgKHNjb3BlLmR1YWwgJiYgc2NvcGUudmFsdWUgWzBdID4gc2NvcGUudmFsdWVbMV0pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGFuZGxlID09PSAwKSBzY29wZS5zZXRWYWx1ZSAoc2NvcGUudmFsdWVbMF0gLCAxKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlKHNjb3BlLnZhbHVlWzFdLDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG5cbiAgICAgICAgc2NvcGUuZm9jdXNDQiA9IGZ1bmN0aW9uIChpbnNpZGUpIHtcbiAgICAgICAgICAgIGlmIChpbnNpZGUpIHtcbiAgICAgICAgICAgICAgICAkZG9jdW1lbnQub24oJ2tleWRvd24nLHNjb3BlLmtleWRvd24pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAkZG9jdW1lbnQudW5iaW5kKCdrZXlkb3duJyxzY29wZS5rZXlkb3duKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICAvLyBiYXIgd2FzIHRvdWNoIGxldCBtb3ZlIGhhbmRsZSB0byB0aGlzIHBvaW50XG4gICAgICAgIHNjb3BlLnRvdWNoQmFyQ0IgPSBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgIHZhciBoYW5kbGU9MDtcbiAgICAgICAgICAgIHZhciByZWxhdGl2ZTtcbiAgICAgICAgICAgI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VjaGVzW2lkeF0ucGFnZVkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gdG91Y2hlbmQoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ3RvdWNobW92ZScsdG91Y2htb3ZlKTtcbiAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ3RvdWNoZW5kJyAsdG91Y2hlbmQpO1xuICAgICAgICAgICAgICAgZWxlbWVudC5vbigndG91Y2hzdGFydCcsIHNjb3BlLnRvdWNoQmFyQ0IpO1xuXG4gICAgICAgICAgICAgICAgLy8gaWYgdmFsdWUgY2hhbmdlIG5vdGlmeSBhcHBsaWNhdGlvbiBjYWxsYmFja1xuICAgICAgICAgICAgICAgIGlmIChzY29wZS5jYWxsYmFjayAmJiBvbGR2YWx1ZSAhPT0gc2NvcGUudmFsdWVbaGFuZGxlXSkgc2NvcGUuY2FsbGJhY2sgKHNjb3BlLnZhbHVlW2hhbmRsZV0sIHNjb3BlLmN0cmxoYW5kbGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLmhhbmRsZUNCID0gZnVuY3Rpb24gKGNsaWNrZXZlbnQsIGhhbmRsZSkge1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuYXV0b21hdGljKSByZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBvbGR2YWx1ZSA9IHNjb3BlLnZhbHVlW2hhbmRsZV07XG4gICAgICAgICAgICAvLyByZWdpc3RlciBtb3VzZSBldmVudCB0byB0cmFjayBoYW5kbGVcbiAgICAgICAgICAgIGNsaWNrZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgJGRvY3VtZW50Lm9uKCdtb3VzZW1vdmUnLG1vdXNlbW92ZSk7XG4gICAgICAgICAgICAkZG9jdW1lbnQub24oJ21vdXNldXAnLCBtb3VzZXV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AgICAgICAgc2NvcGUuY3RybGhhbmRsZSA9IG5ldyBSYW5nZVNsaWRlckhhbmRsZSAoc2NvcGUpO1xuXG4gICAgICAgICAgICAvLyBwcmVwYXJlIERPTSBvYmplY3QgcG9pbnRlciB0byBjb21wdXRlIHNpemUgZHluYW1pY2FsbHlcbiAgICAgICAgICAgIHNjb3BlLmJvdW5kcyA9IHtcbiAgICAgICAgICAgICAgICBiYXIgICAgOiBlbGVtZW50WzBdLFxuICAgICAgICAgICAgICAgIGhhbmRsZXM6IFtzY29wZS5oYW5kbGVzWzBdWzBdLCBzY29wZS5oYW5kbGVzWzFdWzBdXVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKGF0dHJzLmRpc2FibGUgPT09ICd0cnVlJykgc2NvcGUuc2V0RGlzYWJsZSh0cnVlKTtcblxuICAgICAgICAgICAgaWYgKGF0dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGF0dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSB0cnVlIDpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaGFuZGxlJyA6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9IHNjb3BlLmhhbmRsZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzWzBdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXMgPSAgWyRkb2N1bWVudC5nZXRFbGVtZW50QnlJZCAoYXR0cnMuZGlzcGxheVRhcmdldCldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBzY29wZS5kaXNwbGF5cz1bXTtcblxuICAgICAgICAgICAgLy8gZXh0cmFjdCBpbml0aWFsIHZhbHVlcyBmcm9tIGF0dHJzIGFuZCBwYXJzZSBpbnRvIGludFxuICAgICAgICAgICAgaWYgKCFhdHRycy5pbml0aWFsKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuaW5pdGlhbCAgPSBbc2NvcGUubmdNb2RlbCwgc2NvcGUubmdNb2RlbF07IC8vIGluaXRpYWxpemUgdG8gbW9kZWwgdmFsdWVzXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBpbml0aWFsICA9IGF0dHJzLmluaXRpYWwuc3BsaXQoJywnKTtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsID0gW1xuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzBdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFswXSkgOiBzY29wZS5ub3RMZXNzLFxuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzFdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFsxXSkgOiBzY29wZS5ub3RNb3JlXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gTW9uaXRvciBhbnkgY2hhbmdlcyBvbiBzdGFydC9zdG9wIGRhdGVzLlxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdGFydEF0JywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlIDwgc2NvcGUuc3RhcnRBdCApIHtcbiAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5zZXRWYWx1ZSAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdGFydEF0KSBzY29wZS5zZXRTdGFydCAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdG9wQXQnICwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlID4gc2NvcGUuc3RvcEF0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuc2V0VmFsdWUgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdG9wQXQpIHNjb3BlLnNldFN0b3AgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gZmluaXNoIHdpZGdldCBpbml0aWFsaXNhdGlvblxuICAgICAgICAgICAgc2NvcGUuaW5pdGlhbFNldHRpbmdzIChzY29wZS5pbml0aWFsKTtcblxuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLmluaXQoKTtcbiAgICAgICAgXG4gICAgICAgICAvLyBzbGlkZXIgaXMgcmVhZHkgcHJvdmlkZSBjb250cm9sIGhhbmRsZSB0byBhcHBsaWNhdGlvbiBjb250cm9sbGVyXG4gICAgICAgIHNjb3BlLiR3YXRjaCAoJ2luaXRob29rJywgZnVuY3Rpb24gKCkgeyAgICAgICAgIC8vIGluaXQgVmFsdWVzIG1heSBhcnJpdmUgbGF0ZVxuICAgICAgICAgICAgaWYgKHNjb3BlLmluaXRob29rKSBzY29wZS5pbml0aG9vayAoc2NvcGUuY3RybGhhbmRsZSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHNjb3BlLiR3YXRjaCAoJ2luaXR2YWx1ZXMnLCBmdW5jdGlvbiAoKSB7IFx0Ly8gaW5pdCBWYWx1ZXMgbWF5IGFycml2ZSBsYXRlXG4gICAgICAgICAgICBpZiAoc2NvcGUuaW5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IHNjb3BlLnBhcmVudCA9IGVsZW0ucGFyZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLm1vZGFsICAgID0gZWxlbS5maW5kKFwiZGl2XCIpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gZGVsYXkgdGlwIGRpc3BsYXkgdG8gYXZvaWQgYmxpbmtpbmcgd2hlbiBtb3ZpbmcgbW91c2UgZmFzdFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBkaXNwbGF5ICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFjdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnNob3cpIHNjb3BlLm1vZGFsLmNzcyh7b3BhY2l0eTogMSwgdmlzaWJpbGl0eTondmlzaWJsZSd9KTsgIFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2hvdyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS50aW1lb3V0ID0gJHRpbWVvdXQoYWN0aW9uLCBzY29wZS5kZWxheSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsb3NlICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAwLCB2aXNpYmlsaXR5OidoaWRkZW4nfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IGF0dHJzLmljb24gfHwgJ2ZpLWxpZ2h0YnVsYic7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgUGFyZW50IGVsZW1lbnQgdG8gZ2V0IG1vdXNlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5hZGRDbGFzcyAoJ2FzLW1vZGFsLXRpcCcpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnY2xpY2snLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdmb2N1cycsIGRpc3BsYXkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnbW91c2VvdmVyJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZWxlYXZlJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnYmx1cicsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmRlbGF5ID0gYXR0cnMuZGVsYXkgfHwgMTAwMDsgLy8gd2FpdCAxcyBiZWZvcmUgZGlzcGxheWluZyB0aXBcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge3RpcDogXCI9XCJ9IC8vIHRpcCBtYXkgbm90IGJlIGRlZmluZWQgd2hlbiB3aWRnZXQgaXMgZGlzcGxheVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XSk7X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xdWlyZWQnIGNsYXNzXG4gKi9cblxuKGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICB2YXIgdG1wbCA9ICc8c3BhbiB0aXRsZT1cIkdvdG86IHt7aHJlZn19XCIgbmctY2xpY2s9XCJjbGlja2VkKClcIj4nICtcbiAgICAgICAgICAgICc8aSBjbGFzcz1cInt7aWNvbn19XCI+PC9pPicgK1xuICAgICAgICAgICAgJzxzcGFuPnt7bGFiZWx9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L3NwYW4+JztcblxuXG4gICAgYW5ndWxhci5tb2R1bGUoJ0xpbmtCdXR0b24nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ2xpbmtCdXR0b24nLCBbXCIkbG9jYXRpb25cIiwgZnVuY3Rpb24gKCRsb2NhdGlvbikge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG15bWV0aG9kcyhzY29wZSwgZWxlbSwgYXR0cnMpIHtcblxuICAgICAgICAgICAgICAgICAgICBzY29wZS5jbGlja2VkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWF0dHJzLnF1ZXJ5KSAkbG9jYXRpb24ucGF0aChhdHRycy5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgJGxvY2F0aW9uLnBhdGgoYXR0cnMuaHJlZikuc2VhcmNoKGF0dHJzLnF1ZXJ5KTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gPSBhdHRycy5pY29uICAgfHwgJ2ZpLWxpbmsnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdKdW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1ZSBmcm9tIGlucHV0IGZpZWxkIGJ5cGFzc2luZyBBbmd1bGFyIG5nLW1vZGVsXG4gICAgICAgICBjb25zb2xlLmxvZyAoXCJDbGlja2VkIElucHV0VGV4dCBuYW1lPSVzIHZhbHVlPSVzIHZhbGlkPSVzXCIsIHNjb3BlLm5hbWUsIHNjb3BlLnZhbHVlLCBzY29wZS52YWxpZCk7ICAgICAgICBcblxuICAgICAgICAgLy8gZm9ybSBpcyBub3QgdW50b3VjaGVkIGFueW1vcmVcbiAgICAgICAgIHNjb3BlLnBhcmVudC5yZW1vdmVDbGFzcyAoXCJuZy1wcmlzdGluZVwiKTtcblxuICAgICAgICAgLy8gaWYgdmFsdWUgbm90IG51bGwgY2xlYW4gdXAgc3RyaW5nXG4gICAgICAgICBpZiAoc2NvcGUudmFsdWUpIHtcbiAgICAgICAgICAgICBzY29wZS5lcnJvcj1mYWxzZTsgXG4gICAgICAgICAgICAvLyByZW1vdmUgbGVhZGluZyBhbmQgdHJhaWxsaW5nIHNwYWNlXG4gICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRyaW0oKTtcbiAgICAgICAgIFxuICAgICAgICAgICAgLy8gcmVtb3ZlIGFueSBzcGFjZSBpcyBub3QgYWxsb3dlZFxuICAgICAgICAgICAgaWYgKCdub3NwYWNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWU9c2NvcGUudmFsdWUucmVwbGFjZSgvXFxzL2csICcnKTsgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIGlmICgnbG93ZXJjYXNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBzY29wZS52YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgXG4gICAgICAgICAgICAvLyBjaGVjayBtaW5pbXVtIGxlbmdodFxuICAgICAgICAgICAgaWYgKFwibWlubGVuXCIgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlLmxlbmd0aCA8IGF0dHJzLm1pbmxlbikge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IE1pbmludW0gTGVuZ2g9ICcgKyBhdHRycy5taW5sZW4gKyAnIENoYXJhY3RlcnMnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJvcj10cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICgnZW1haWwnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICBpZiAoIWVtYWlscGF0ZXJuLnRlc3QgKHNjb3BlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJybXNnPSdpbnZhbGlkIGVtYWlsIGFkZHJlc3MnO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IFJlcXVpcmVkIEF0dHJpYnV0ZSc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7IFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgIC8vIElmIGxvY2FsIGNvbnRyb2wgZmFpbCBsZXQncyByZWZ1c2UgaW5wdXRcbiAgICAgICAgIGlmIChzY29wZS5lcnJ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ICAgICAgICAgc2NvcGUuQVBJY2hlY2sgID0nJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlW2FwaW5hbWVdPVwic3VjY2Vzc1wiO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAvLyBJZiB3ZSBoYXZlIGEgbmV3IHRva2VuIGxldCdzIHVwZGF0ZSBpdFxuICAgICAgICAgICAgaWYgKGRhdGEucmVxdWVzdC50b2tlbikgc2NvcGUudG9rZW49ZGF0YS5yZXF1ZXN0LnRva2VuO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJPSzogXCIrIEpTT04uc3RyaW5naWZ5KGRhdGEpKTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHNjb3BlLlByb2Nlc3NFcnJvcj0gZnVuY3Rpb24oZGF0YSwgZXJyY29kZSwgaGVhZGVycywgY29uZmlnKSB7XG4gICAgICAgICAgICB2YXIgYXBpbmFtZT0gJ0FQSScrZGF0YS5yZXF1ZXN0LmFwaS5yZXBsYWNlKCctJywnXycpO1xuICAgICAgICAgICAgc2NvcGUuc3RhdHVzICAgPSBcImVyci1meFwiO1xuICAgICAgICAgICAgc2NvcGUuZXJyY29kZSAgPSBlcnJjb2RlO1xuICAgICAgICAgICAgc2NvcGUucmVxdWVzdCAgPSBkYXRhLnJlcXVlc3Q7XG4gICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IFwiXCI7XG4gICAgICAgICAgICBzY29wZVthcGluYW1lXT1cImZhaWxcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiRlg6IFwiKyBKU09OLnN0cmluZ2lmeShkYXRhKSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUuT3BlblNlc3Npb24gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIk9wZW5TZXNzaW9uXCIpOyBcbiAgICAgICAgICAgIHZhciBwb3N0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AgICAgXG4gICAgLy8gX2FsbCBtb2R1bGVzIG9ubHkgcmVmZXJlbmNlIGRlcGVuZGVuY2llc1xuICAgIGFuZ3VsYXIubW9kdWxlKCdKUXVlcnlFbXUnLCBbXSlcblxuICAgICAgICAgICAgLy8gRmFjdG9yeSBpcyBhIHNpbmdsZXRvbiBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnSlFlbXUnLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICB2YXIgRmluZEluUGFyZW50ID0gZnVuY3Rpb24gKGVsZW1lbnQsIHNlbGVjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnQgPSBlbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudFswXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlYXJjaCA9PT0gcGFyZW50WzBdLnRhZ05hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeVRhZz0gZnVuY3Rpb24gKGVsZW1lbnQsIHRhZywgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0eXBlICAgPSB0YWcudG9Mb3dlckNhc2UoKSsgXCJOYW1lXCI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBjaGlsZHJlblswXVt0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeUNsYXNzPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hpbGRyZW4uaGFzQ2xhc3Moc2VhcmNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAg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0NvbmZpZ0FwcCcsIFtcInVybHF1ZXJ5XCIsIGZ1bmN0aW9uICh1cmxxdWVyeSkge1xuXG4gICAgICAgICAgICAgICAgdmFyIG15Q29uZmlnID0ge1xuICAgICAgICAgICAgICAgICAgICBwYXRoczogeyAvLyBXYXJuaW5nIHBhdGhzIHNob3VsZCBlbmQgd2l0aCAvXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWFnZSA6ICdpbWFnZXMvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF2YXRhcjogJ2ltYWdlcy9hdmF0YXJzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdWRpbyA6ICdpbWFnZXMvYXVkaW8vJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpIDogJ2ltYWdlcy9hcHBsaS8nXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBteWFwaTogeyAvLyBXYXJuaW5nIHBhdGhzIHNob3VsZCBlbmQgd2l0aCAvXG4gICAgICAgICAgICAgICAgICAgICAgIHRva2VuIDogJy9hcGkvbXlwbHVnaW4veHh4eCdcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb246IHsgLy8gVGhvc2UgZGF0YSBhcmUgdXBkYXRlZCBieSBzZXNzaW9uIHNlcnZpY2VcbiAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlICA6ICcvYXBpL3Rva2VuL2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2ggOiAnL2FwaS90b2tlbi9yZWZyZXNoJyxcbiAgICAgICAgICAgICAgICAgICAgICAgY2hlY2sgICA6ICcvYXBpL3Rva2VuL2NoZWNrJyxcbiAgICAgICAgICAgICAgICAgICAgICAgcmVzZXQgICA6ICcvYXBpL3Rva2VuL3Jlc2V0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgcGluZyAgICA6ICcvYXBpL3Rva2VuL2NoZWNrJyxcbiAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbCA6IHVybHF1ZXJ5LnRva2VuIHx8ICcxMjM0NTY3ODknLCAgLy8gdHlwaWNhbCBkZXYgaW5pdGlhbCB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0IDogMzYwMCwgICAgICAgICAvLyB0aW1lb3V0IGlzIHVwZGF0ZWQgY2xpZW50IHNlc3NpbiBjb250ZXh0IGNyZWF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmdyYXRlOiA2MCwgICAgICAgICAgIC8vIFBpbmcgcmF0ZSB0byBjaGVjayBpZiBzZXJ2ZXIgaXMgc3RpbGwgYWxpdmVcbiAgICAgICAgICAgICAgICAgICAgICAgdXVpZCAgICA6ICcnLCAgICAgICAgICAgLy8gdXVpZCBtYXAgd2l0aCBjb29raWUgb3IgbG9uZyB0ZXJtIHNlc3Npb24gYWNjZXNzIGtleVxuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiAgIDogJycgICAgICAgICAgICAvLyB3aWxsIGJlIHJldHVybmVkIGZyb20gYXV0aGVudGljYXRpb24gICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15Q29uZmlnO1xuICAgICAgICAgICAgfV0pO1xuXG59KSgpOyIsIihmdW5jdGlvbigpIHtcbiAgJ3VzZSBzdHJpY3QnO1xuICBcbiAgZnVuY3Rpb24gIFBhcnNlUXVlcnlTdHJpbmcgKCkge1xuICAgICAgdmFyIHFkID0ge307XG4gICAgICBsb2NhdGlvbi5zZWFyY2guc3Vic3RyKDEpLnNwbGl0KFwiJlwiKS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pIHtcbiAgICAgICAgICB2YXIgayA9IGl0ZW0uc3BsaXQoXCI9XCIpWzBdO1xuICAgICAgICAgIHZhciB2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lc3R9fTwvc3Bhbj4gPHNwYW4gY2xhc3M9XCJncmlkLWNvbnRlbnQgbm9zY3JvbGwgcmVzIHt7Y3RybC5zdGF0dXN9fVwiPnJlcz0ge3tjdHJsLnJlc3BvbnNlfX08L3NwYW4+IDxzcGFuIGNsYXNzPVwiZ3JpZC1jb250ZW50IG5vc2Nyb2xsIHN0YXR1cyB7e2N0cmwuc3RhdHVzfX1cIj5zdGF0dXM9IHt7Y3RybC5lcnJjb2RlfX08L3NwYW4+PC9kaXY+PC9kaXY+PGxpbmstYnV0dG9uIGhyZWY9XCJzYW1wbGVcIiBpY29uPVwiZmktaG9tZVwiIGxhYmVsPVwic2FtcGxlXCI+PC9saW5rLWJ1dHRvbj4nKTt9XSk7XG59KSgpO1xuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 +!function(){"use strict";var e='<div ng-click="clicked()"> <span><i class="{{icon}}"></i><span>{{label}}</span></div>';angular.module("SubmitButton",[]).directive("submitButton",function(){function t(e,t,n){e.icon=n.icon||"fi-foot",e.label=n.label||"Next",t.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:t,scope:{clicked:"="}}})}(),function(){"use strict";function e(e){var t=[],n=[];this.getId=function(){return e.sliderid},this.getCbHandle=function(){return e.cbhandle},this.getView=function(a){return a||(a=0),e.value[a]===t[a]?n[a]:(t[a]=e.value[a],e.formatter?n[a]=e.formatter(e.value[a],e.ctrlhandle):n[a]=e.value[a],n[a])},this.updateClass=function(t,n){e.updateClass(t,n)},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,n){n||(n=0),e.setValue(t,n)},this.setDisable=function(t){e.setDisable(t)}}var t=angular.module("RangeSlider",[]);t.directive("rangeSlider",["$log","$document","$timeout",function(t,n,a){function i(t,i,s,o){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 n=t.value;t.value=[void 0,void 0],a(function(){t.setValue(n[0],0),t.dual&&t.setValue(n[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 n,a=t.notMore-t.notLess,i=e*a;if(t.byStep>0){var s=(i-i%t.byStep)/t.byStep,o=i%t.byStep,l=o>=.5*t.byStep?t.byStep:0;return n=s*t.byStep+l+t.notLess}if(t.byStep<0){var r=Math.pow(10,-1*t.byStep);return n=t.notLess+parseInt(i*r)/r}return i},t.getValue=function(e,n){t.vertical?t.relative[n]=(e-t.bounds.handles[n].getBoundingClientRect().height)/(t.bounds.bar.getBoundingClientRect().height-t.bounds.handles[n].getBoundingClientRect().height):t.relative[n]=e/(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[n].getBoundingClientRect().width);var a=t.normalize(t.relative[n]);a!==t.value[n]&&(a<t.startValue&&(a=t.startValue),a>t.stopValue&&(a=t.stopValue),t.formatter?t.viewValue=t.formatter(a,t.ctrlhandle):t.viewValue=a,t.displays[n]&&t.displays[n].html(t.viewValue),t.value[n]=a,o&&o.$setViewValue(t.viewValue),t.$apply(),a>t.startValue&&a<t.stopValue&&t.translate(e,n))},t.setStart=function(e){var n;e>t.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(n=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",n+"px")):(n=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("width",n+"px")),t.startValue=e},t.setStop=function(e){var n;e<t.value[0]&&(t.dual?t.setValue(e,1):t.setValue(e,0)),t.vertical?(n=t.bounds.bar.getBoundingClientRect().height*(e-t.notLess)/(t.notMore-t.notLess),t.start.css("height",n+"px")):(n=t.bounds.bar.getBoundingClientRect().width*(e-t.notLess)/(t.notMore-t.notLess),t.stop.css({right:0,width:t.bounds.bar.getBoundingClientRect().width-n+"px"})),t.stopValue=e},t.translate=function(e,n){var a;if(t.vertical){var i=t.bounds.bar.getBoundingClientRect().height-e;if(t.handles[n].css({"-webkit-transform":"translateY("+i+"px)","-moz-transform":"translateY("+i+"px)","-ms-transform":"translateY("+i+"px)","-o-transform":"translateY("+i+"px)",transform:"translateY("+i+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var s=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().height;a=t.relative[0]*t.bounds.bar.getBoundingClientRect().height,t.slider.css({bottom:a+"px",height:s+"px"})}}else t.slider.css("height",e+"px")}else if(t.handles[n].css({"-webkit-transform":"translateX("+e+"px)","-moz-transform":"translateX("+e+"px)","-ms-transform":"translateX("+e+"px)","-o-transform":"translateX("+e+"px)",transform:"translateX("+e+"px)"}),t.dual){if(t.relative[1]&&t.relative[0]){var o=(t.relative[1]-t.relative[0])*t.bounds.bar.getBoundingClientRect().width;a=t.relative[0]*t.bounds.bar.getBoundingClientRect().width,t.slider.css({left:a+"px",width:o+"px"})}}else t.slider.css("width",e+"px")},t.setValue=function(e,n){var a;e!==t.value[n]&&(void 0===e&&(e=0),e>t.notMore&&(e=t.notMore),e<t.notLess&&(e=t.notLess),t.vertical?(t.relative[n]=(e-t.notLess)/(t.notMore-t.notLess),0===n&&(a=t.relative[n]*t.bounds.bar.getBoundingClientRect().height+t.bounds.handles[n].getBoundingClientRect().height/2),1===n&&(a=t.relative[n]*t.bounds.bar.getBoundingClientRect().height)):(t.relative[n]=(e-t.notLess)/(t.notMore-t.notLess),a=t.relative[n]*(t.bounds.bar.getBoundingClientRect().width-t.bounds.handles[n].getBoundingClientRect().width)),t.translate(a,n),t.value[n]=e,t.formatter?t.viewValue=t.formatter(e,void 0):t.viewValue=e,o&&o.$setViewValue(t.viewValue),t.displays[n]&&t.displays[n].html(t.viewValue))},t.keydown=function(e){switch(e.keyCode){case 39:case 38: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 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,n,a){var i;t.vertical?(i=t.bounds.bar.getBoundingClientRect().bottom-a,i>t.bounds.bar.getBoundingClientRect().height&&(i=t.bounds.bar.getBoundingClientRect().height),i<t.bounds.handles[e].getBoundingClientRect().height&&(i=t.bounds.handles[e].getBoundingClientRect().height)):(i=n-t.bounds.bar.getBoundingClientRect().left,0>i&&(i=0),n+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?n.on("keydown",t.keydown):n.unbind("keydown",t.keydown)},t.touchBarCB=function(e){var n,a=0,i=e.changedTouches,s=t.value[a];if(e.preventDefault(),t.dual){n=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 o=Math.abs(n-t.relative[0]),l=Math.abs(n-t.relative[1]);o>l&&(a=1)}t.moveHandle(a,i[0].pageX,i[0].pageY),t.callback&&s!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)},t.touchHandleCB=function(e,a){function s(e){e.preventDefault();for(var n=e.changedTouches,i=0;i<n.length;i++)t.moveHandle(a,n[i].pageX,n[i].pageY)}function o(e){n.unbind("touchmove",s),n.unbind("touchend",o),i.on("touchstart",t.touchBarCB),t.callback&&l!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)}var l=t.value[a];e.preventDefault(),n.on("touchmove",s),n.on("touchend",o),i.unbind("touchstart",t.touchBarCB)},t.handleCB=function(e,a){function i(e){t.moveHandle(a,e.clientX,e.clientY)}function o(){n.unbind("mousemove",i),n.unbind("mouseup",o),t.callback&&l!==t.value[a]&&t.callback(t.value[a],t.ctrlhandle)}if(!s.automatic){var l=t.value[a];e.preventDefault(),n.on("mousemove",i),n.on("mouseup",o),t.handles[a][0].focus(),t.actif=a}},t.find=function(e,t){var n;n=t?t[0].querySelector(e):i[0].querySelector(e);var a=angular.element(n);return a},t.initialSettings=function(e){var n;t.value=[],t.relative=[],null===t.precision&&(n=(""+t.byStep).match(/\.([\d]*)/),t.precision=n&&n[1]?n[1].length:0),i.on("touchstart",t.touchBarCB),t.handles[0].on("touchstart",function(e){t.touchHandleCB(e,0)}),t.dual&&(t.handles[1].addClass("range-slider-handle"),t.handles[1].on("touchstart",function(e){t.touchHandleCB(e,1)}),t.initvalues||t.setValue(e[1],1)),t.initvalues?t.initWidget(t.initvalues):t.setValue(e[0],0)},t.init=function(){if(t.sliderid=s.id||"slider-"+parseInt(1e3*Math.random()),t.startValue=-(1/0),t.stopValue=1/0,t.byStep=parseInt(s.byStep)||1,t.vertical=s.vertical||!1,t.dual=s.dualHandles||!1,t.trigger_input_change=!1,t.notMore=parseInt(s.notMore)||100,t.notLess=parseInt(s.notLess)||0,t.vertical&&i.addClass("vertical-range"),t.handles=[t.find(".handle-min"),t.find(".handle-max")],t.bar=i,t.slider=t.find(".range-slider-active-segment"),t.start=t.find(".ibz-range-slider-start"),t.stop=t.find(".ibz-range-slider-stop"),t.disable=s.disable||!1,t.ctrlhandle=new e(t),t.bounds={bar:i[0],handles:[t.handles[0][0],t.handles[1][0]]},"true"===s.disable&&t.setDisable(!0),s.displayTarget)switch(s.displayTarget){case!0:case"handle":t.displays=t.handles,t.handles[0].addClass("ibz-range-slider-display"),t.dual&&t.handles[1].addClass("ibz-range-slider-display");break;default:t.displays=[n.getElementById(s.displayTarget)]}else t.displays=[];if(s.initial){var a=s.initial.split(",");t.initial=[void 0!==a[0]?parseInt(a[0]):t.notLess,void 0!==a[1]?parseInt(a[1]):t.notMore]}else t.initial=[t.ngModel,t.ngModel];t.$watch("startAt",function(){t.value<t.startAt,t.startAt&&t.setStart(t.startAt)}),t.$watch("stopAt",function(){t.value>t.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='<div class="ibz-range-slider range-slider" title="{{title}}"data-slider><span class="range-slider-handle handle-min" ng-mousedown="handleCB($event,0)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="handle-max" ng-mousedown="handleCB($event,1)" ng-focus="focusCB(true)" ng-blur="focusCB(false)" role="slider" tabindex="0"></span><span class="range-slider-active-segment"></span><span class="ibz-range-slider-start" ></span> <span class="ibz-range-slider-stop"></span> <input id={{sliderid}} type="hidden"></div>';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='<div class="afb-monitor" ng-click="getping()"><span class="afb-refresh-token" >afb://{{hostname}}:{{httpdport}}</span><i class="{{icon}}"></i></div>';angular.module("TokenRefresh",["AppConfig","ModalNotification"]).directive("tokenRefresh",["$window","$timeout","$location","Notification","AppConfig","AppCall",function(t,n,a,i,s,o){function l(e,l,r){e.logged=void 0,t.onbeforeunload=function(){o.get("token","reset",{},function(){})},e.online=function(){l.addClass("online"),l.removeClass("offline"),e.logged=!0},e.offline=function(){l.addClass("offline"),l.removeClass("online"),e.logged=!1},e.onerror=function(){e.logged!==!1&&(i.warning({message:"AppFramework Binder Lost",delay:5e3}),e.offline()),e.status=0},e.onsuccess=function(t){t.request.token&&(s.session.token=t.request.token),t.request.uuid&&(s.session.uuid=t.request.uuid),t.request.timeout&&(s.session.timeout=t.request.timeout),e.logged!==!0&&(i.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*s.session.pingrate)})},e.refresh=function(){o.get("token","refresh",{},function(t){200===t.status?e.onsuccess(t.data):e.onerror(),n(e.refresh,250*s.session.timeout)})},e.tkcreate=function(){o.get("token","create",{token:s.session.initial},function(t){200===t.status?e.onsuccess(t.data):e.onerror()})},e.icon=r.icon||"fi-lightbulb",e.hostname=a.host(),e.httpdport=a.port(),e.autolog=JSON.parse(r.autolog||!1),e.autolog&&e.tkcreate(),n(e.getping,1e3*s.session.pingrate),n(e.refresh,250*s.session.timeout)}return{template:e,scope:{callback:"="},restrict:"E",link:l}}])}(),function(){"use strict";var e='<div class="tip-modal-popup"><i class="{{icon}}"></i><span>{{tip}}</span></span></div>';angular.module("ModalNotification",[]).directive("tipModal",["$timeout",function(t){function n(e,n,a){function i(){function n(){e.show&&e.modal.css({opacity:1,visibility:"visible"})}e.show=!0,e.timeout=t(n,e.delay)}function s(){e.show=!1,e.modal.css({opacity:0,visibility:"hidden"})}e.parent=n.parent(),e.modal=n.find("div"),e.icon=a.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=a.delay||1e3}return{restrict:"E",template:e,link:n,scope:{tip:"="}}}])}(),function(){"use strict";var e='<span title="Goto: {{href}}" ng-click="clicked()"><i class="{{icon}}"></i><span>{{label}}</span></span>';angular.module("LinkButton",[]).directive("linkButton",["$location",function(t){function n(e,n,a){e.clicked=function(){a.query?t.path(a.href).search(a.query):t.path(a.href)},e.icon=a.icon||"fi-link",e.label=a.label||"Jump",e.href=a.href||"/home",n.addClass(e.label.toLowerCase())}return{restrict:"E",template:e,link:n,scope:{}}}])}(),function(){"use strict";function e(e,t,n,a,i){var s=new XMLHttpRequest,o=new FormData,l=function(e){i(e)};s.upload.onprogress=function(t){var n=Math.round(t.lengthComputable?100*t.loaded/t.total:0);e.slider&&e.slider.setValue(n)},s.onload=function(){t.addClass("success"),t.removeClass("error");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)},s.onerror=function(){t.addClass("error"),t.removeClass("success");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)},s.onabort=function(){t.addClass("error"),t.removeClass("success");var n={status:s.status,headers:s.getAllResponseHeaders()};e.callback(n)};for(var r=0;r<a.length;r++){var u=a[r];if(u.type.match(e.mimetype)){if(u.size>1024*e.maxsize)return e.thumbnail=e.istoobig,void e.$apply("thumbnail");if(isNaN(u.size))return e.thumbnail=e.isnotvalid,void e.$apply("thumbnail");if(e.Basename=u.name.split("/").reverse()[0],e.imgElem[0].file=u,i){var c=new FileReader;c.readAsArrayBuffer(u),c.onload=l}o.append(e.name,u,u.name)}}s.open("POST",n,!0),s.send(o)}var t='<input type="file" name="{{name}}-input" onchange="angular.element(this).scope().UpLoadFile(this.files)" accept="{{mimetype}}" style="display:none"><div class="upload-file" ng-click="imgClicked()"><img id="{{name}}-img" src="{{thumbnail}}"><range-slider ng-show="!noslider" id="{{name}}-slider" automatic=true inithook="SliderInitCB"></range-slider></div>';angular.module("UploadFiles",["AppConfig","ModalNotification","RangeSlider"]).directive("uploadImage",["AppConfig","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=function(e){return t.imgElem[0].src=window.URL.createObjectURL(new Blob([e.target.result],{type:"image"})),!0},l=i.posturl+"?token="+n.session.token;new e(t,a,l,s,o)},t.name=i.name||"avatar",t.category=i.category||"image",t.mimetype=(i.accept||"image")+"/*",t.maxsize=i.maxsize||100,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"tux-bzh.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}]).directive("uploadAudio",["AppConfig","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=i.posturl+"?token="+n.session.token;new e(t,a,o,s,!1)},t.name=i.name||"audio",t.category=i.category||"audio",t.mimetype=(i.accept||"audio")+"/*",t.maxsize=i.maxsize||1e4,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"upload-music.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}]).directive("uploadAppli",["AppConfig","JQemu","Notification",function(n,a,i){function s(t,a,i){if(t.imgElem=a.find("img"),t.inputElem=a.find("input"),t.imgClicked=function(){t.inputElem[0].click()},t.SliderInitCB=function(e){t.slider=e},t.UpLoadFile=function(s){var o=function(e){var a=new JSZip(e.target.result),i=a.file("afa-pkg/thumbnail.jpg");return i?(t.imgElem[0].src=window.URL.createObjectURL(new Blob([i.asArrayBuffer()],{type:"image"})),!0):(t.thumbnail=n.paths[t.category]+"isnotvalid.png",t.$apply("thumbnail"),!1)},l=i.posturl+"?token="+n.session.token;new e(t,a,l,s,o)},t.name=i.name||"appli",t.category=i.category||"appli",t.mimetype=i.accept||".zip",t.maxsize=i.maxsize||1e5,t.regexp=new RegExp(i.accept+".*","i"),i.thumbnail?t.thumbnail=n.paths[t.category]+i.thumbnail:t.thumbnail=n.paths[t.category]+"upload-appli.png",i.thumbnail?t.isnotvalid=n.paths[t.category]+i.isnotvalid:t.isnotvalid=n.paths[t.category]+"isnotvalid.png",i.istoobig?t.istoobig=n.paths[t.category]+i.istoobig:t.istoobig=n.paths[t.category]+"istoobig.png",t.noslider=i.noslider||!1,!i.posturl)throw new TypeError("file-upload %s posturl=/api/xxxx/xxxx required",t.attrs)}return{restrict:"E",template:t,link:s,scope:{callback:"="}}}])}(),function(){"use strict";var e='<tip-modal tip="tip"></tip-modal><label for="{{name}}-intext">{{label}} <i ng-show="required" ng-click="ToBeDefined" class="required {{status}} fi-checkbox" title="Free Value But Mandatory Argument" alt="?"> </i></label><input type="{{type}}" id="{{name}}-intext" placeholder="{{placeholder}}" class="status-{{status}}" ng-model="value" ng-blur="validate()" ng-focus="selected()" ng-model-options="{ updateOn: \'default blur\', debounce: {default: 500, blur: 0} }"><alert data-ng-show="!valid&&errmsg">{{errmsg}}</alert>',t=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;angular.module("InputText",["JQueryEmu"]).directive("inputText",["JQemu",function(n){function a(e,a,i){e.error=!1,e.valid=!1,e.status="untouch",e.input=a.find("input"),e.required=0,"required"in i&&(e.required=1,a.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.length<i.minlen&&(e.status="invalid",e.errmsg=e.name+": Mininum Lengh= "+i.minlen+" Characters",e.error=!0),"email"in i&&(t.test(e.value)||(e.status="invalid",e.errmsg="invalid email address",e.error=!0))):e.required&&(e.status="invalid",e.errmsg=e.name+": Required Attribute",e.error=!0),e.error?(e.required&&e.valid&&(e.valid=!1,e.l4acounter.validated>0&&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 n in t)e[n]=t[n]},e.label=i.label,e.name=i.name,e.placeholder=i.placeholder,e.type=i.type||"text",e.tip=i.tip,e.parent=n.parent(a,"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:a,scope:{callback:"=",value:"="}}}])}(),function(){"use strict";var e='<input-text class="password" tip="{{tip1}}" placeholder="{{place1}}"label="{{label1}}" callback="valid1" name="{{name}}-1" value="pass1" required minlen="{{minlen}}" type="password" ></input-text><input-text class="password" tip="tip2" placeholder="{{place2}}"label="{{label2}}" callback="valid2" name="{{name}}-2" value="pass2" required minlen="{{minlen}}" type="password" > </input-text>';angular.module("InputPassword",[]).directive("inputPassword",function(){function t(e,t,n){e.valid1=function(t,n){e.firstpwd=n},e.valid2=function(t,a,i){e.firstpwd!==a?i({valid:!1,status:"invalid",errmsg:"both password should match"}):e.callback(n.name,a)},e.done=function(t){for(var n in t)e[n]=t[n]},e.name=n.name,e.label1=n.label||"Password",e.label2=n.label||"Password Verification",e.place1=n.placeholder1||"User Password",e.tip1=n.tip||"Choose a Password",e.place2=n.placeholder1||"Password Verification",e.tip2=n.tip||"Confirme your Password",e.minlen=n.minlen||10,"required"in n&&(e.required="required")}return{restrict:"E",template:e,link:t,scope:{callback:"="}}})}(),function(){"use strict";angular.module("SampleModule",["SubmitButton","UploadFiles"]).controller("SampleController",["$http",function(e){var t=this;t.FileUploaded=function(e){}}])}(),function(){"use strict";angular.module("HomeModule",["SubmitButton","TokenRefresh"]).controller("HomeController",["$http","AppConfig",function(e,t){var n=this;n.uuid="none",n.token="none",n.session="none",n.status="err-no",n.ProcessResponse=function(e,a,i,s){var o="API"+e.request.api.replace("-","_");n.status="err-ok",n.errcode=a,n.request=e.request,n.response=e.response,e.request.token&&(t.session.token=e.request.token),e.request.uuid&&(t.session.uuid=e.request.uuid),e.request.timeout&&(t.session.timeout=e.request.timeout),("APIcreate"===o||"APIreset"===o)&&(n.APIreset="",n.APIcreate="",n.APIrefresh="",n.APIcheck=""),n[o]="success",e.request.token&&(n.token=e.request.token)},n.ProcessError=function(e,t,a,i){var s="API"+e.request.api.replace("-","_");n.status="err-fx",n.errcode=t,n.request=e.request,n.response="",n[s]="fail"},n.OpenSession=function(){var a={},i=e.post(t.session.create+"?token="+t.session.initial,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.CheckSession=function(){var a={},i=e.post(t.session.check+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.RefreshSession=function(){var a={},i=e.post(t.session.refresh+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)},n.ResetSession=function(){var a={},i=e.post(t.session.reset+"?token="+t.session.token,a);i.success(n.ProcessResponse),i.error(n.ProcessError)}}])}(),function(){"use strict";angular.module("JQueryEmu",[]).factory("JQemu",function(){var e=function(e,t){for(var n=e,a=t.toUpperCase();n[0];){if(a===n[0].tagName)return n;n=n.parent()}},t=function(e,t,n){for(var a=n.toLowerCase(),i=t.toLowerCase()+"Name",s=e.children();s[0];){if(a===s[0][i])return s;s=s.next()}},n=function(e,t){for(var n=t.toLowerCase(),a=e.children();a[0];){if(a.hasClass(n))return a;a=a.next()}},a={FindInParent:e,FindByTag:t,FindByClass:n};return a})}();var foundationRoutes=[{name:"mysample",url:"/sample",controller:"SampleController as ctrl",animationIn:"slideInRight",path:"pages/Sample/Sample.html"},{name:"myhome",url:"/home",controller:"HomeController as ctrl",animationIn:"slideInRight",path:"pages/Home/Home.html"}];!function(){"use strict";angular.module("AppConfig",[]).factory("AppConfig",["urlquery",function(e){var t={paths:{image:"images/",avatar:"images/avatars/",audio:"images/audio/",appli:"images/appli/"},session:{create:"/api/token/create",refresh:"/api/token/refresh",check:"/api/token/check",reset:"/api/token/reset",ping:"/api/token/check",initial:e.token||"123456789",timeout:3600,pingrate:60,uuid:"",token:""}};return t}]).factory("AppCall",["$http","AppConfig",function(e,t){var n={get:function(n,a,i,s){i.token||(i.token=t.session.token),e.get("/api/"+n+"/"+a,{params:i}).then(s,s)}};return n}])}(),function(){"use strict";function e(){var e={};return location.search.substr(1).split("&").forEach(function(t){var n=t.split("=")[0],a=decodeURIComponent(t.split("=")[1]);n in e?e[n].push(a):e[n]=[a]}),e}function t(e,t,n){e.otherwise("/home"),t.html5Mode(!0).hashPrefix("!")}function n(){FastClick.attach(document.body)}angular.module("AFBclient",["ui.router","ngAnimate","foundation","foundation.dynamicRouting","foundation.dynamicRouting.animations","ui-notification","AppConfig","JQueryEmu","HomeModule","SampleModule","UploadFiles","LinkButton","TokenRefresh","RangeSlider","ModalNotification"]).value("urlquery",e()).config(t).run(n),t.$inject=["$urlRouterProvider","$locationProvider"]}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Sample/Sample.html",'<h1><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> Post File Upload</h1><div class="sample-box box-content"><upload-image name="avatar" category="avatar" thumbnail="tux-visitor.png" maxsize="100" posturl="/api/post/upload-image" callback="ctrl.FileUploaded" accept="image" title="Change your Avatar"></upload-image><upload-audio name="music" posturl="/api/post/upload-music" callback="ctrl.FileUploaded" title="Upload your Music"></upload-audio><upload-appli name="appli" posturl="/api/post/upload-appli" callback="ctrl.FileUploaded" title="Upload AGL App"></upload-appli></div><link-button href="home" icon="fi-home" label="home"></link-button>')}])}(),function(){angular.module("AFBclient").run(["$templateCache",function(e){e.put("pages/Home/Home.html",'<h3><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px"> App Framework Binder Simple Client</h3><token-refresh autolog="true"></token-refresh><div class="button-box box-content"><submit-button class="session-button {{ctrl.APIcreate}}" icon="fi-unlock" label="Open" clicked="ctrl.OpenSession"></submit-button><submit-button class="session-button {{ctrl.APIcheck}}" icon="fi-checkbox" label="Check" clicked="ctrl.CheckSession"></submit-button><submit-button class="session-button {{ctrl.APIrefresh}}" icon="fi-arrows-compress" label="Refresh" clicked="ctrl.RefreshSession"></submit-button><submit-button class="session-button {{ctrl.APIreset}}" icon="fi-lock" label="Close" clicked="ctrl.ResetSession"></submit-button></div><div class="message-box box-content vertical grid-frame"><div class="response"><span class="grid-content noscroll req {{ctrl.status}}">req= {{ctrl.request}}</span> <span class="grid-content noscroll res {{ctrl.status}}">res= {{ctrl.response}}</span> <span class="grid-content noscroll status {{ctrl.status}}">status= {{ctrl.errcode}}</span></div></div><link-button href="sample" icon="fi-home" label="sample"></link-button>')}])}(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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V0IHdpdGggQ2FsbGJhY2sgU0hPVUxEIEJFIGdldCAncmVxdWlyZWQnIGNsYXNzXG4gKi9cblxuKGZ1bmN0aW9uICgpIHtcbiAgICAndXNlIHN0cmljdCc7XG5cbiAgICB2YXIgdG1wbCA9ICc8ZGl2ICBuZy1jbGljaz1cImNsaWNrZWQoKVwiPiA8c3Bhbj4nICtcbiAgICAgICAgICAgICc8aSBjbGFzcz1cInt7aWNvbn19XCI+PC9pPicgK1xuICAgICAgICAgICAgJzxzcGFuPnt7bGFiZWx9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L2Rpdj4nO1xuXG4gICAgYW5ndWxhci5tb2R1bGUoJ1N1Ym1pdEJ1dHRvbicsIFtdKVxuICAgICAgICAgICAgLmRpcmVjdGl2ZSgnc3VibWl0QnV0dG9uJywgZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXltZXRob2RzKHNjb3BlLCBlbGVtLCBhdHRycykge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGFqdXN0IGljb24gb3IgdXNlIGRlZmF1bHRcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaWNvbiA9IGF0dHJzLmljb24gfHwgJ2ZpLWZvb3QnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdOZXh0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIGFkZCBsYWJlbCBhcyBjbGFzc1xuICAgICAgICAgICAgICAgICAgICBlbGVtLmFkZENsYXNzIChzY29wZS5sYWJlbC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdGU6IGNsaWNrZWQgaW4gaW1wb3J0ZWQgYW5kIHdoZW4gdGVtcGxhdGUgaXMgY2xpY2tlZFxuICAgICAgICAgICAgICAgICAgICAvLyB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gICAgICAgICAgc2NvcGUuZGlzcGxheXNbaGFuZGxlXS5odG1sIChzY29wZS52aWV3VmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSBleHRlcm5hbCByZXByZXNlbnRhdGlvbiBvZiB0aGUgbW9kZWxcbiAgICAgICAgICAgICAgICBzY29wZS52YWx1ZVtoYW5kbGVdID0gbmV3dmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKG1vZGVsKSBtb2RlbC4kc2V0Vmlld1ZhbHVlIChzY29wZS52aWV3VmFsdWUpO1xuICAgICAgICAgICAgICAgIHNjb3BlLiRhcHBseSgpO1xuICAgICAgICAgICAgICAgIGlmIChuZXd2YWx1ZSA+IHNjb3BlLnN0YXJ0VmFsdWUgJiYgbmV3dmFsdWUgPCBzY29wZS5zdG9wVmFsdWUpIHNjb3BlLnRyYW5zbGF0ZShvZmZzZXQsIGhhbmRsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cblxuICAgICAgICBzY29wZS5zZXRTdGFydCA9IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdmFyIG9mZnNldDtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHZhbHVlID4gc2NvcGUudmFsdWVbMF0pIHtcbiAgICAgICAgICAgICAgICBpZiAoIXNjb3BlLmR1YWwpIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwwKTtcbiAgICAgICAgICAgICAgICBlbHNlIHNjb3BlLnNldFZhbHVlICh2YWx1ZSwxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNjb3BlLnZlcnRpY2FsKSB7XG4gICAgICAgICAgICAgICAgb2Zmc2V0ID0gc2NvcGUuYm91bmRzLmJhci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5oZWlnaHQgKiAodmFsdWUgLSBzY29wZS5ub3RMZXNzKSAvIChzY29wZS5ub3RNb3JlIC0gc2NvcGUubm90TGVzcyk7XG4gICAgICAgICAgICAgICAgc2NvcGUuc3RhcnQuY3NzKCdoZWlnaHQnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoICogKHZhbHVlIC0gc2NvcGUubm90TGVzcykgLyAoc2NvcGUubm90TW9yZSAtIHNjb3BlLm5vdExlc3MpO1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXJ0LmNzcygnd2lkdGgnLG9mZnNldCArICdweCcpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY29wZS5zdGFydFZhbHVlPSB2YWx1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5zZXRTdG9wID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgb2Zmc2V0O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAodmFsdWUgPCBzY29wZS52YWx1ZVswXSkge1xuICAgICAgICAgICAgICAgIGlmICghc2NvcGUuZHVhbCkgc2NvcGUuc2V0VmFsdWUgKHZhbHVlLDApO1xuICAgICAgICAgICAgICAgIGVsc2Ugc2NvcGUuc2V0VmFsdWUgKHZhbHVlLDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc2NvcGUudmVydGljYWwpIHtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBzY29wZS5ib3VuZHMuYmFyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmhlaWdodCAqICh2YWx1ZSAtIHNjb3BlLm5vdExlc3MpIC8gKHNjb3BlLm5vdE1vcmUgLSBzY29wZS5ub3RMZXNzKTtcbiAgICAgICAgICAgICAgICBzY29wZS5zdGFydC5jc3MoJ2hlaWdodCcsb2Zmc2V0ICsgJ3B4Jyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xu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Y2sgKHNjb3BlLnZhbHVlW2hhbmRsZV0sIHNjb3BlLmN0cmxoYW5kbGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHNjb3BlLmhhbmRsZUNCID0gZnVuY3Rpb24gKGNsaWNrZXZlbnQsIGhhbmRsZSkge1xuXG4gICAgICAgICAgICBpZiAoYXR0cnMuYXV0b21hdGljKSByZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBvbGR2YWx1ZSA9IHNjb3BlLnZhbHVlW2hhbmRsZV07XG4gICAgICAgICAgICAvLyByZWdpc3RlciBtb3VzZSBldmVudCB0byB0cmFjayBoYW5kbGVcbiAgICAgICAgICAgIGNsaWNrZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgJGRvY3VtZW50Lm9uKCdtb3VzZW1vdmUnLG1vdXNlbW92ZSk7XG4gICAgICAgICAgICAkZG9jdW1lbnQub24oJ21vdXNldXAnLCBtb3VzZXVwKTtcbiAgICAgICAgICAgIHNjb3BlLmhhbmRsZXNbaGFuZGxlXVswXS5mb2N1cygpO1xuICAgICAgICAgICAgc2NvcGUuYWN0aWY9aGFuZGxlO1xuXG4gICAgICAgICAgICAvLyBzbGlkZXIgaGFuZGxlIGlzIG1vdmluZ1xuICAgICAgICAgICAgZnVuY3Rpb24gbW91c2Vtb3ZlKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgc2NvcGUubW92ZUhhbmRsZSAoaGFuZGxlLCBldmVudC5jbGllbnRYLCBldmVudC5jbGllbnRZKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gbW91c2UgaXMgdXAgZGFucyBsZWF2ZSBzbGlkZXIgc2VuZCByZXNpemUgZXZlbnRzXG4gICAgICAgICAgICBmdW5jdGlvbiBtb3VzZXVwKCkge1xuICAgICAgICAgICAgICAgICRkb2N1bWVudC51bmJpbmQoJ21vdXNlbW92ZScsIG1vdXNlbW92ZSk7XG4gICAgICA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dHJzLmRpc3BsYXlUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSB0cnVlIDpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaGFuZGxlJyA6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kaXNwbGF5cyA9IHNjb3BlLmhhbmRsZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5oYW5kbGVzWzBdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY29wZS5kdWFsKSBzY29wZS5oYW5kbGVzWzFdLmFkZENsYXNzKCdpYnotcmFuZ2Utc2xpZGVyLWRpc3BsYXknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGlzcGxheXMgPSAgWyRkb2N1bWVudC5nZXRFbGVtZW50QnlJZCAoYXR0cnMuZGlzcGxheVRhcmdldCldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBzY29wZS5kaXNwbGF5cz1bXTtcblxuICAgICAgICAgICAgLy8gZXh0cmFjdCBpbml0aWFsIHZhbHVlcyBmcm9tIGF0dHJzIGFuZCBwYXJzZSBpbnRvIGludFxuICAgICAgICAgICAgaWYgKCFhdHRycy5pbml0aWFsKSB7XG4gICAgICAgICAgICAgICAgc2NvcGUuaW5pdGlhbCAgPSBbc2NvcGUubmdNb2RlbCwgc2NvcGUubmdNb2RlbF07IC8vIGluaXRpYWxpemUgdG8gbW9kZWwgdmFsdWVzXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBpbml0aWFsICA9IGF0dHJzLmluaXRpYWwuc3BsaXQoJywnKTtcbiAgICAgICAgICAgICAgICBzY29wZS5pbml0aWFsID0gW1xuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzBdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFswXSkgOiBzY29wZS5ub3RMZXNzLFxuICAgICAgICAgICAgICAgICAgICBpbml0aWFsWzFdICE9PSB1bmRlZmluZWQgPyBwYXJzZUludCAoaW5pdGlhbFsxXSkgOiBzY29wZS5ub3RNb3JlXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gTW9uaXRvciBhbnkgY2hhbmdlcyBvbiBzdGFydC9zdG9wIGRhdGVzLlxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdGFydEF0JywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlIDwgc2NvcGUuc3RhcnRBdCApIHtcbiAgICAgICAgICAgICAgICAgICAgLy9zY29wZS5zZXRWYWx1ZSAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdGFydEF0KSBzY29wZS5zZXRTdGFydCAoc2NvcGUuc3RhcnRBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgc2NvcGUuJHdhdGNoKCdzdG9wQXQnICwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlID4gc2NvcGUuc3RvcEF0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vc2NvcGUuc2V0VmFsdWUgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY29wZS5zdG9wQXQpIHNjb3BlLnNldFN0b3AgKHNjb3BlLnN0b3BBdCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gZmluaXNoIHdpZGdldCBpbml0aWFsaXNhdGlvblxuICAgICAgICAgICAgc2NvcGUuaW5pdGlhbFNldHRpbmdzIChzY29wZ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nKFwiT1BBIEV4aXQgUmVxdWVzdGVkXCIpOyAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9O1xuICAgICAgICAgICAgICAgICBcbiAgICAgICAgc2NvcGUub25saW5lID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZWxlbS5hZGRDbGFzcyAgICAoXCJvbmxpbmVcIik7XG4gICAgICAgICAgICBlbGVtLnJlbW92ZUNsYXNzIChcIm9mZmxpbmVcIik7XG4gICAgICAgICAgICBzY29wZS5sb2dnZWQ9dHJ1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICBzY29wZS5vZmZsaW5lID0gZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIGVsZW0uYWRkQ2xhc3MgICAgKFwib2ZmbGluZVwiKTtcbiAgICAgICAgICAgIGVsZW0ucmVtb3ZlQ2xhc3MgKFwib25saW5lXCIpO1xuICAgICAgICAgICAgc2NvcGUubG9nZ2VkPWZhbHNlO1xuICAgICAgICB9O1xuICAgICAgICBcbiAgICAgICAgc2NvcGUub25lcnJvciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKHNjb3BlLmxvZ2dlZCAhPT0gZmFsc2UpICB7XG4gICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uLndhcm5pbmcgKHttZXNzYWdlOiBcIkFwcEZyYW1ld29yayBCaW5kZXIgTG9zdFwiLCBkZWxheTogNTAwMH0pO1xuICAgICAgICAgICAgICAgIHNjb3BlLm9mZmxpbmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjb3BlLnN0YXR1cyA9IDA7XG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBzY29wZS5vbnN1Y2Nlc3MgPSBmdW5jdGlvbihqcmVzcCkge1xuICAgICAgICAgICAgaWYgKGpyZXNwLnJlcXVlc3QudG9rZW4pIEFwcENvbmZpZy5zZXNzaW9uLnRva2VuID0ganJlc3AucmVxdWVzdC50b2tlbjtcbiA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ICAgICAgICAgICAgICAgICAgLy8gZGVsYXkgdGlwIGRpc3BsYXkgdG8gYXZvaWQgYmxpbmtpbmcgd2hlbiBtb3ZpbmcgbW91c2UgZmFzdFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBkaXNwbGF5ICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFjdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjb3BlLnNob3cpIHNjb3BlLm1vZGFsLmNzcyh7b3BhY2l0eTogMSwgdmlzaWJpbGl0eTondmlzaWJsZSd9KTsgIFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuc2hvdyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZS50aW1lb3V0ID0gJHRpbWVvdXQoYWN0aW9uLCBzY29wZS5kZWxheSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsb3NlICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzY29wZS5zaG93ID0gZmFsc2U7ICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgc2NvcGUubW9kYWwuY3NzKHtvcGFjaXR5OiAwLCB2aXNpYmlsaXR5OidoaWRkZW4nfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gYWp1c3QgaWNvbiBvciB1c2UgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICBzY29wZS5pY29uICA9IGF0dHJzLmljb24gfHwgJ2ZpLWxpZ2h0YnVsYic7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgUGFyZW50IGVsZW1lbnQgdG8gZ2V0IG1vdXNlIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5hZGRDbGFzcyAoJ2FzLW1vZGFsLXRpcCcpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnY2xpY2snLCBjbG9zZSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdmb2N1cycsIGRpc3BsYXkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnbW91c2VvdmVyJywgZGlzcGxheSk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLnBhcmVudC5iaW5kKCdtb3VzZWxlYXZlJywgY2xvc2UpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5wYXJlbnQuYmluZCgnYmx1cicsIGNsb3NlKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmRlbGF5ID0gYXR0cnMuZGVsYXkgfHwgMTAwMDsgLy8gd2FpdCAxcyBiZWZvcmUgZGlzcGxheWluZyB0aXBcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByZXN0cmljdDogJ0UnLFxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdG1wbCxcbiAgICAgICAgICAgICAgICAgICAgbGluazogbXltZXRob2RzLFxuICAgICAgICAgICAgICAgICAgICBzY29wZToge3RpcDogXCI9XCJ9IC8vIHRpcCBtYXkgbm90IGJlIGRlZmluZWQgd2hlbiB3aWRnZXQgaXMgZGlzcGxheVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XSk7XG59KSgpO1xuIiwiLyogXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTUgXCJJb1QuYnpoXCJcbiAqIEF1dGhvciBcIkZ1bHVwIEFyIEZvbGxcIlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVl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Y2s9XCJjbGlja2VkKClcIj4nICtcbiAgICAgICAgICAgICc8aSBjbGFzcz1cInt7aWNvbn19XCI+PC9pPicgK1xuICAgICAgICAgICAgJzxzcGFuPnt7bGFiZWx9fTwvc3Bhbj4nICtcbiAgICAgICAgICAgICc8L3NwYW4+JztcblxuXG4gICAgYW5ndWxhci5tb2R1bGUoJ0xpbmtCdXR0b24nLCBbXSlcbiAgICAgICAgICAgIC5kaXJlY3RpdmUoJ2xpbmtCdXR0b24nLCBbXCIkbG9jYXRpb25cIiwgZnVuY3Rpb24gKCRsb2NhdGlvbikge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG15bWV0aG9kcyhzY29wZSwgZWxlbSwgYXR0cnMpIHtcblxuICAgICAgICAgICAgICAgICAgICBzY29wZS5jbGlja2VkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWF0dHJzLnF1ZXJ5KSAkbG9jYXRpb24ucGF0aChhdHRycy5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgJGxvY2F0aW9uLnBhdGgoYXR0cnMuaHJlZikuc2VhcmNoKGF0dHJzLnF1ZXJ5KTtcbiAgICAgICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBhanVzdCBpY29uIG9yIHVzZSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmljb24gPSBhdHRycy5pY29uICAgfHwgJ2ZpLWxpbmsnO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS5sYWJlbCA9IGF0dHJzLmxhYmVsIHx8ICdKdW1wJztcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuaHJlZiAgPSBhdHRycy5ocmVmICB8fCAnL2hvbWUnO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIGxhYmVsIGFzI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3BlLnNsaWRlcj0gc2xpZGVyOyBcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIC8vIFVwbG9hZCBpcyBkZWxlZ2F0ZWQgdG8gYSBzaGFyZWQgZnVuY3Rpb25cbiAgICAgICAgc2NvcGUuVXBMb2FkRmlsZT1mdW5jdGlvbiAoZmlsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgcmVhZGVyQ0IgPSBmdW5jdGlvbiAodXBsb2FkKSB7XG4gICAgICAgICAgICAgICAgdmFyIHppcGFwcCA9IG5ldyBKU1ppcCh1cGxvYWQudGFyZ2V0LnJlc3VsdCk7XG4gICAgICAgICAgICAgICAgdmFyIHRodW1ibmFpbCA9IHppcGFwcC5maWxlKFwiYWZhLXBrZy90aHVtYm5haWwuanBnXCIpO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIENoZWNrIGlzIHdlIGhhdmUgYSB0aHVtYm5haWwgd2l0aGluIGxvYWRlZCBaaXBmaWxlXG4gICAgICAgICAgICAgICAgaWYgKCF0aHVtYm5haWwpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiVGhpcyBpcyBub3QgYSB2YWxpZCBBcHBsaWNhdGlvbiBGcmFtZXdvcmsgQVBQXCIpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS50aHVtYm5haWw9QXBwQ29uZmlnLnBhdGhzW3Njb3BlLmNhdGVnb3J5XSArICdpc25vdHZhbGlkLnBuZyc7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLiRhcHBseSgndGh1bWJuYWlsJyk7IC8vIHdlIHNob3J0LWNpcmN1aXQgQW5ndWxhciByZXN5bmMgSW1hZ2VcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOyAvLyBkbyBub3QgcG9zdCB6aXAgb24gYmluZGVyXG4gICAgICAgICAgICAgICAgfSBcbiAgICAgICAgICAgICAgICBzY29wZS5pbW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3BlLm5hbWUsIHNjb3BlLnZhbHVlLCBzY29wZS52YWxpZCk7ICAgICAgICBcblxuICAgICAgICAgLy8gZm9ybSBpcyBub3QgdW50b3VjaGVkIGFueW1vcmVcbiAgICAgICAgIHNjb3BlLnBhcmVudC5yZW1vdmVDbGFzcyAoXCJuZy1wcmlzdGluZVwiKTtcblxuICAgICAgICAgLy8gaWYgdmFsdWUgbm90IG51bGwgY2xlYW4gdXAgc3RyaW5nXG4gICAgICAgICBpZiAoc2NvcGUudmFsdWUpIHtcbiAgICAgICAgICAgICBzY29wZS5lcnJvcj1mYWxzZTsgXG4gICAgICAgICAgICAvLyByZW1vdmUgbGVhZGluZyBhbmQgdHJhaWxsaW5nIHNwYWNlXG4gICAgICAgICAgICBzY29wZS52YWx1ZSA9IHNjb3BlLnZhbHVlLnRyaW0oKTtcbiAgICAgICAgIFxuICAgICAgICAgICAgLy8gcmVtb3ZlIGFueSBzcGFjZSBpcyBub3QgYWxsb3dlZFxuICAgICAgICAgICAgaWYgKCdub3NwYWNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWU9c2NvcGUudmFsdWUucmVwbGFjZSgvXFxzL2csICcnKTsgICAgXG4gICAgICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgICAgIGlmICgnbG93ZXJjYXNlJyBpbiBhdHRycykge1xuICAgICAgICAgICAgICAgc2NvcGUudmFsdWUgPSBzY29wZS52YWx1ZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgXG4gICAgICAgICAgICAvLyBjaGVjayBtaW5pbXVtIGxlbmdodFxuICAgICAgICAgICAgaWYgKFwibWlubGVuXCIgaW4gYXR0cnMpIHtcbiAgICAgICAgICAgICAgaWYgKHNjb3BlLnZhbHVlLmxlbmd0aCA8IGF0dHJzLm1pbmxlbikge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IE1pbmludW0gTGVuZ2g9ICcgKyBhdHRycy5taW5sZW4gKyAnIENoYXJhY3RlcnMnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJvcj10cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICgnZW1haWwnIGluIGF0dHJzKSB7XG4gICAgICAgICAgICBpZiAoIWVtYWlscGF0ZXJuLnRlc3QgKHNjb3BlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHNjb3BlLnN0YXR1cz0naW52YWxpZCc7XG4gICAgICAgICAgICAgICAgc2NvcGUuZXJybXNnPSdpbnZhbGlkIGVtYWlsIGFkZHJlc3MnO1xuICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICB9XG4gICAgICAgICBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS5zdGF0dXM9J2ludmFsaWQnO1xuICAgICAgICAgICAgICAgICBzY29wZS5lcnJtc2c9c2NvcGUubmFtZSArICc6IFJlcXVpcmVkIEF0dHJpYnV0ZSc7XG4gICAgICAgICAgICAgICAgIHNjb3BlLmVycm9yPXRydWU7IFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgIC8vIElmIGxvY2FsIGNvbnRyb2wgZmFpbCBsZXQncyByZWZ1c2UgaW5wdXRcbiAgICAgICAgIGlmIChzY29wZS5lcnJvcikge1xuICAgICAgICAgICAgIGlmIChzY29wZS5yZXF1aXJlZCAmJiBzY29wZS52YWxpZCkge1xuICAgICAgICAgICAgICAgICBzY29wZS52YWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBpZiAoc2NvcGUubDRhY291bnRlci52YWxp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Rva2VuIGxldCdzIHVwZGF0ZSBpdFxuICAgICAgICAgICAgaWYgKGRhdGEucmVxdWVzdC50b2tlbikgc2NvcGUudG9rZW49ZGF0YS5yZXF1ZXN0LnRva2VuO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBjb25zb2xlLmxvZyAoXCJPSzogXCIrIEpTT04uc3RyaW5naWZ5KGRhdGEpKTtcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHNjb3BlLlByb2Nlc3NFcnJvcj0gZnVuY3Rpb24oZGF0YSwgZXJyY29kZSwgaGVhZGVycywgY29uZmlnKSB7XG4gICAgICAgICAgICB2YXIgYXBpbmFtZT0gJ0FQSScrZGF0YS5yZXF1ZXN0LmFwaS5yZXBsYWNlKCctJywnXycpO1xuICAgICAgICAgICAgc2NvcGUuc3RhdHVzICAgPSBcImVyci1meFwiO1xuICAgICAgICAgICAgc2NvcGUuZXJyY29kZSAgPSBlcnJjb2RlO1xuICAgICAgICAgICAgc2NvcGUucmVxdWVzdCAgPSBkYXRhLnJlcXVlc3Q7XG4gICAgICAgICAgICBzY29wZS5yZXNwb25zZSA9IFwiXCI7XG4gICAgICAgICAgICBzY29wZVthcGluYW1lXT1cImZhaWxcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgY29uc29sZS5sb2cgKFwiRlg6IFwiKyBKU09OLnN0cmluZ2lmeShkYXRhKSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgc2NvcGUuT3BlblNlc3Npb24gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nIChcIk9wZW5TZXNzaW9uXCIpOyBcbiAgICAgICAgICAgIHZhciBwb3N0ZGF0YT0gey8qIGFueSBqc29uIHlvdXIgYXBwbGljYXRpb24gbWF5IG5lZWQgKi99O1xuICAgICAgICAgICAgdmFyIGhhbmRsZXIgPSAkaHR0cC5wb3N0KEFwcENvbmZpZy5zZXNzaW9uLmNyZWF0ZSArICc/dG9rZW49JytBcHBDb25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biBhbmQgc2hhcmUgaXRzIGNvbnRleHQgd2l0aGluIGFsbCBpbnN0YW5jZXMuXG4gICAgICAgICAgICAuZmFjdG9yeSgnSlFlbXUnLCBmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICB2YXIgRmluZEluUGFyZW50ID0gZnVuY3Rpb24gKGVsZW1lbnQsIHNlbGVjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnQgPSBlbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VsZWN0b3IudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudFswXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlYXJjaCA9PT0gcGFyZW50WzBdLnRhZ05hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSAgLy8gSFRNTERpdkVsZW1lbnQgcHJvcGVydGllc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeVRhZz0gZnVuY3Rpb24gKGVsZW1lbnQsIHRhZywgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0eXBlICAgPSB0YWcudG9Mb3dlckNhc2UoKSsgXCJOYW1lXCI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoID09PSBjaGlsZHJlblswXVt0eXBlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgIEZpbmRCeUNsYXNzPSBmdW5jdGlvbiAoZWxlbWVudCwgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlYXJjaCA9IHNlbGVjdG9yLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IGVsZW1lbnQuY2hpbGRyZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNoaWxkcmVuWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hpbGRyZW4uaGFzQ2xhc3Moc2VhcmNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gIC8vIEhUTUxEaXZFbGVtZW50IHByb3BlcnRpZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuID0gY2hpbGRyZW4ubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHZhciBteU1ldGhvZHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIEZpbmRJblBhcmVudDogRmluZEluUGFyZW50LFxuICAgICAgICAgICAgICAgICAgICBGaW5kQnlUYWc6IEZpbmRCeVRhZyxcbiAg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CBlbmQgd2l0aCAvXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWFnZSA6ICdpbWFnZXMvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF2YXRhcjogJ2ltYWdlcy9hdmF0YXJzLycsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdWRpbyA6ICdpbWFnZXMvYXVkaW8vJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpIDogJ2ltYWdlcy9hcHBsaS8nXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb246IHsgLy8gVGhvc2UgZGF0YSBhcmUgdXBkYXRlZCBieSBzZXNzaW9uIHNlcnZpY2VcbiAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlICA6ICcvYXBpL3Rva2VuL2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2ggOiAnL2FwaS90b2tlbi9yZWZyZXNoJyxcbiAgICAgICAgICAgICAgICAgICAgICAgY2hlY2sgICA6ICcvYXBpL3Rva2VuL2NoZWNrJyxcbiAgICAgICAgICAgICAgICAgICAgICAgcmVzZXQgICA6ICcvYXBpL3Rva2VuL3Jlc2V0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgcGluZyAgICA6ICcvYXBpL3Rva2VuL2NoZWNrJyxcbiAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbCA6IHVybHF1ZXJ5LnRva2VuIHx8ICcxMjM0NTY3ODknLCAgLy8gdHlwaWNhbCBkZXYgaW5pdGlhbCB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0IDogMzYwMCwgICAgICAgICAvLyB0aW1lb3V0IGlzIHVwZGF0ZWQgY2xpZW50IHNlc3NpbiBjb250ZXh0IGNyZWF0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgIHBpbmdyYXRlOiA2MCwgICAgICAgICAgIC8vIFBpbmcgcmF0ZSB0byBjaGVjayBpZiBzZXJ2ZXIgaXMgc3RpbGwgYWxpdmVcbiAgICAgICAgICAgICAgICAgICAgICAgdXVpZCAgICA6ICcnLCAgICAgICAgICAgLy8gdXVpZCBtYXAgd2l0aCBjb29raWUgb3IgbG9uZyB0ZXJtIHNlc3Npb24gYWNjZXNzIGtleVxuICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiAgIDogJycgICAgICAgICAgICAvLyB3aWxsIGJlIHJldHVybmVkIGZyb20gYXV0aGVudGljYXRpb24gICAgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG15Q29uZmlnO1xuICAgICAgICAgICAgfV0pXG4gICAgICAgICAgICBcbiAgICAgICAgICAgIC8vIEZhY3RvcnkgaXMgYSBzaW5nbGV0b24gYW5kIHNoYXJlIGl0cyBjb250ZXh0IHdpdGhpbiBhbGwgaW5zdGFuY2VzLlxuICAgICAgICAgICAgLmZhY3RvcnkoJ0FwcENhbGwnLCBbXCIkaHR0cFwiLCBcIkFwcENvbmZpZ1wiLCBmdW5jdGlvbiAoJGh0dHAsIEFwcENvbmZpZykge1xuICAgICAgICAgICAgICAgIHZhciBteUNhbGxzID0ge1xuICAgICAgICAgICAgICAgICAgICBnZXQgOiBmdW5jdGlvbihwbHVnaW4sIGFjdGlvbiwgcXVlcnksIGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXF1ZXJ5LnRva2VuKSBxdWVyeS50b2tlbiA9IEFwcENvbmZpZy5zZXNzaW9uLnRva2VuOyAvLyBhZGQgdG9rZW4gdG8gcHJvdmlkZWQgcXVlcnkgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgICRodHRwLmdldCgnL2FwaS8nICsgcGx1Z2luICsgJy8nICsgYWN0aW9uICwge3BhcmFtczogcXVlcnl9KS50aGVuIChjY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