User:Eejit43/scripts/redirect-helper.js
Appearance
< User:Eejit43 | scripts
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
This user script seems to have a documentation page at User:Eejit43/scripts/redirect-helper. |
// <nowiki>
// Note: This script was compiled and minified from TypeScript. For a more readable version, see https://github.com/Eejit43/wikipedia-scripts/blob/main/scripts/redirect-helper/redirect-helper.ts
"use strict";(()=>{var A=Object.defineProperty;var O=(g,t)=>()=>(g&&(t=g(g=0)),t);var D=(g,t)=>{for(var i in t)A(g,i,{get:t[i],enumerable:!0})};var w,v=O(()=>{"use strict";w=class extends OO.ui.TextInputWidget{api=new mw.Api;constructor(t){super(t),OO.ui.mixin.LookupElement.call(this,t)}getLookupRequest=()=>{let t=this.getValue(),i=$.Deferred();t||i.resolve([]);let e=mw.Title.newFromText(t);return this.api.get({action:"query",formatversion:"2",gaplimit:20,gapnamespace:14,gapprefix:e?.getMainText()??t,generator:"allpages",prop:"categories"}).catch(()=>null).then(a=>{if(a?.query?.pages){let s=a.query.pages.filter(r=>!r.categories?.some(o=>o.title==="Category:Wikipedia soft redirected categories")).map(r=>{let o=r.title.split(":")[1];return{data:o,label:o}});this.emit("showing-values",s),i.resolve(s)}else i.resolve([])}),i.promise({abort(){}})};getLookupCacheDataFromResponse=t=>t??[];getLookupMenuOptionsFromData=t=>t.map(({data:i,label:e})=>new OO.ui.MenuOptionWidget({data:i,label:e}))};Object.assign(w.prototype,OO.ui.mixin.LookupElement.prototype)});var b,S=O(()=>{"use strict";b=class g extends OO.ui.ProcessDialog{api=new mw.Api;constructor(t){super(t),g.static.name="ShowChangesDialog",g.static.title="Changes to be made",g.static.actions=[{action:"cancel",label:"Close",flags:["safe","close"]}]}getSetupProcess=()=>g.super.prototype.getSetupProcess.call(this).next(()=>{let[t,i]=this.getData();return this.api.post({action:"compare",formatversion:"2",prop:["diff"],fromslots:"main","fromtext-main":t,"fromcontentmodel-main":"wikitext",toslots:"main","totext-main":i,"tocontentmodel-main":"wikitext"}).then(e=>{let a=e.compare.body,s=new OO.ui.MessageWidget({type:"warning",label:"No changes to make!"}),r=new OO.ui.PanelLayout({padded:!0,expanded:!1});r.$element.append(a?`
<table class="diff diff-editfont-monospace">
<colgroup>
<col class="diff-marker">
<col class="diff-content">
<col class="diff-marker">
<col class="diff-content">
</colgroup>
<tbody>
${a}
</tbody>
</table>`:s.$element[0]),this.$body.append(r.$element)})});getActionProcess=t=>t?new OO.ui.Process(()=>{this.close()}):g.super.prototype.getActionProcess.call(this,t);getTeardownProcess=()=>g.super.prototype.getTeardownProcess.call(this).next(()=>{this.$body.empty()})};Object.assign(b.prototype,OO.ui.ProcessDialog.prototype)});var T,k=O(()=>{"use strict";T=class g extends OO.ui.ProcessDialog{api=new mw.Api;pageTitleParsed;constructor(t,i){super(t),this.pageTitleParsed=i,g.static.name="OutputPreviewDialog",g.static.title="Redirect categorization templates preview",g.static.actions=[{action:"cancel",label:"Close",flags:["safe","close"]}]}getSetupProcess=()=>g.super.prototype.getSetupProcess.call(this).next(()=>this.api.post({action:"parse",formatversion:"2",contentmodel:"wikitext",prop:["text","categorieshtml"],title:this.pageTitleParsed.getPrefixedDb(),text:this.getData()}).then(t=>{let i=t.parse.text,e=t.parse.categorieshtml,a=new OO.ui.PanelLayout({padded:!0,expanded:!1});a.$element.append(i,e),this.$body.append(a.$element)}));getActionProcess=t=>t?new OO.ui.Process(()=>{this.close()}):g.super.prototype.getActionProcess.call(this,t);getTeardownProcess=()=>g.super.prototype.getTeardownProcess.call(this).next(()=>{this.$body.empty()})};Object.assign(T.prototype,OO.ui.ProcessDialog.prototype)});var x,R=O(()=>{"use strict";x=class extends OO.ui.TextInputWidget{api=new mw.Api;pageTitleParsed;constructor(t,i){super(t),OO.ui.mixin.LookupElement.call(this,t),this.pageTitleParsed=i}getLookupRequest=()=>{let t=this.getValue(),i=$.Deferred();if(!t)i.resolve([]);else if(t.includes("#")){let e=t.split("#")[0];this.api.get({action:"parse",page:e,prop:"sections",redirects:!0}).catch(()=>null).then(a=>{if(a){let s=a.parse.sections.filter(r=>r.line.toLowerCase().replaceAll(/<\/?i>/g,"").startsWith(t.split("#")[1].toLowerCase()));i.resolve(s.map(r=>({data:`${a.parse.title}#${r.line.replaceAll(/<\/?i>/g,"")}`,label:`${a.parse.title}#${r.line.replaceAll(/<\/?i>/g,"")}`})))}else i.resolve([])})}else{let e=mw.Title.newFromText(t);this.api.get({action:"query",formatversion:"2",gaplimit:20,gapnamespace:e?.getNamespaceId()??0,gapprefix:e?.getMainText()??t,generator:"allpages",prop:["info","pageprops"]}).catch(()=>null).then(a=>{a?i.resolve(a.query?.pages?a.query.pages.filter(s=>s.title!==this.pageTitleParsed.getPrefixedText()).map(s=>({data:s.title,label:new OO.ui.HtmlSnippet(`${s.title}${s.pageprops&&"disambiguation"in s.pageprops?" <i>(disambiguation)</i>":""}${"redirect"in s?" <i>(redirect)</i>":""}`)})):[]):i.resolve([])})}return i.promise({abort(){}})};getLookupCacheDataFromResponse=t=>t??[];getLookupMenuOptionsFromData=t=>t.map(({data:i,label:e})=>new OO.ui.MenuOptionWidget({data:i,label:e}))};Object.assign(x.prototype,OO.ui.mixin.LookupElement.prototype)});var C={};D(C,{default:()=>P});var P,I=O(()=>{"use strict";v();S();k();R();P=class{api=new mw.Api;redirectRegex=/^#redirect:?\s*\[\[\s*:?([^[\]{|}]+?)\s*(?:\|[^[\]{|}]+?)?]]\s*/i;scriptAdvert=" (via [[User:Eejit43/scripts/redirect-helper|redirect-helper]])";redirectTemplates;contentText;pageTitle;pageTitleParsed;exists;needsCheck=!0;editorBox;syncWithMainButton;redirectInput;redirectInputLayout;tagSelect;tagSelectLayout;templateParametersEditor;templateEditorsInfo=[];categorySelect;categorySelectInput;categorySelectLayout;defaultSortInput;defaultSortSuggestButton;defaultSortInputLayout;summaryInput;summaryInputLayout;submitButton;showChangesButton;showPreviewButton;syncTalkCheckbox;syncTalkCheckboxLayout;patrolCheckbox;patrolCheckboxLayout;submitLayout;talkData;pageContent="";oldRedirectTarget;oldRedirectTags;oldRedirectTagData;oldDefaultSort;oldCategories;oldStrayText;parsedDestination;constructor({redirectTemplates:t,contentText:i,pageTitle:e,pageTitleParsed:a},s){this.redirectTemplates=t,this.contentText=i,this.pageTitle=e,this.pageTitleParsed=a,this.exists=s}async load(){mw.util.addCSS(`
#create-redirect-button {
margin-bottom: 20px;
}
#redirect-helper-box {
margin-right: auto;
margin-bottom: 25px !important;
margin-left: auto;
background-color: whitesmoke;
width: 700px;
max-width: calc(100% - 50px);
color: #202122;
}
.redirect-input-layout label {
font-weight: bold;
}
.redirect-helper-redirect-possibilities::after {
content: " (redirect with possibilities)";
font-style: italic;
}
.redirect-helper-template-parameters-container,
.redirect-helper-template-parameters-container details {
margin-block: 10px;
border-radius: 5px;
background-color: #e2e2e2;
padding: 5px;
}
.redirect-helper-template-parameters-container summary {
cursor: pointer;
font-weight: bold;
}
.redirect-helper-template-parameters-container details {
margin-block: 5px;
background-color: #d1cece;
}
#redirect-helper-no-templates-message {
padding: 5px;
}
#redirect-helper-summary-layout {
margin-top: 15px;
border-top: 1px solid gray;
padding-top: 10px;
}
#redirect-helper-submit-layout {
margin-top: 10px;
}
#redirect-helper-submit-layout > * {
margin-bottom: 0;
}
.redirect-helper-warning {
margin-top: 8px;
}
.redirect-helper-autofix-button {
margin-left: 5px;
font-size: 12px;
}
.redirect-helper-autofix-button a {
padding: 3px 4px !important;
min-height: unset !important;
}`),mw.loader.addLinkTag("https://www.mediawiki.org/w/load.php?modules=mediawiki.diff.styles&only=styles"),this.editorBox=new OO.ui.PanelLayout({id:"redirect-helper-box",padded:!0,expanded:!1,framed:!0}),this.pageTitleParsed.isTalkPage()&&(await this.api.get({action:"query",formatversion:"2",prop:"info",titles:this.pageTitleParsed.getSubjectPage().getPrefixedText()})).query.pages[0].redirect&&await this.loadSyncWithMainButton(),this.loadInputElements(),await this.loadSubmitElements(),this.editorBox.$element[0].append(...[this.syncWithMainButton?.$element?.[0],this.redirectInputLayout.$element[0],this.tagSelectLayout.$element[0],this.templateParametersEditor,this.defaultSortInputLayout.$element[0],this.categorySelectLayout.$element[0],this.summaryInputLayout.$element[0],this.submitLayout.$element[0]].filter(Boolean)),this.contentText.prepend(this.editorBox.$element[0]),this.exists&&this.loadExistingData()}async loadSyncWithMainButton(){let t=await this.getPageContent(this.pageTitleParsed.getSubjectPage().getPrefixedText());this.syncWithMainButton=new OO.ui.ButtonWidget({label:"Sync with main page",icon:"link",flags:["progressive"]}),this.syncWithMainButton.on("click",()=>{let i=this.redirectRegex.exec(t)?.[1];if(!i)return mw.notify("Failed to parse main page content!",{type:"error"});this.redirectInput.setValue(mw.Title.newFromText(i)?.getTalkPage()?.getPrefixedText()??""),["R from move",...this.redirectTemplates["R from move"].aliases].some(a=>new RegExp(`{{\\s*[${a[0].toLowerCase()}${a[0]}]${a.slice(1)}\\s*(\\||}})`).test(t))&&this.tagSelect.setValue(["R from move"])})}loadInputElements(){this.redirectInput=new x({placeholder:"Target page name",required:!0},this.pageTitleParsed),this.redirectInput.on("change",()=>{let e=this.redirectInput.getValue();e=e.replace(new RegExp(`^(https?:)?/{2}?${mw.config.get("wgServer").replace(/^\/{2}/,"")}/wiki/`),""),e=e.replace(/^:/,""),e.length>0?(this.redirectInput.setValue(e[0].toUpperCase()+e.slice(1).replaceAll("_"," ")),this.defaultSortSuggestButton.setDisabled(!1),this.submitButton.setDisabled(!1),this.showPreviewButton.setDisabled(!1),this.showChangesButton.setDisabled(!1)):(this.defaultSortSuggestButton.setDisabled(!0),this.submitButton.setDisabled(!0),this.showPreviewButton.setDisabled(!0),this.showChangesButton.setDisabled(!0)),this.updateSummary(),this.submitButton.setLabel("Submit"),this.needsCheck=!0}),this.redirectInputLayout=new OO.ui.FieldLayout(this.redirectInput,{label:"Redirect target:",classes:["redirect-input-layout"],align:"top"}),this.tagSelect=new OO.ui.MenuTagMultiselectWidget({allowArbitrary:!1,allowReordering:!1,options:Object.entries(this.redirectTemplates).map(([e,{redirect:a}])=>{if(!a)return{data:e,label:e};let s=new OO.ui.HtmlSnippet(`<span class="redirect-helper-redirect-possibilities">${e}</span>`);return{data:e,label:s}})}),this.tagSelect.getMenu().filterMode="substring",this.tagSelect.on("change",()=>{let e=this.tagSelect.getValue().sort((s,r)=>s.toLowerCase().localeCompare(r.toLowerCase()));this.tagSelect.getValue().join(";")!==e.join(";")&&this.tagSelect.setValue(e),this.updateSummary(),this.submitButton.setLabel("Submit"),this.needsCheck=!0;for(let s of this.templateEditorsInfo)s.details.style.display="none";let a=0;for(let s of this.tagSelect.getValue()){let r=this.templateEditorsInfo.find(o=>o.name===s);r&&(r.details.style.display="block",a++)}t.textContent=`Template parameters (${a>0?`for ${a} template${a>1?"s":""}`:"none to show"})`,i.style.display=a>0?"none":"block"}),this.tagSelectLayout=new OO.ui.FieldLayout(this.tagSelect,{label:"Redirect categorization templates:",classes:["redirect-input-layout"],align:"top"}),this.templateParametersEditor=document.createElement("details"),this.templateParametersEditor.classList.add("redirect-helper-template-parameters-container");let t=document.createElement("summary");t.textContent="Template parameters (none to show)",this.templateParametersEditor.append(t);for(let[e,a]of Object.entries(this.redirectTemplates)){let s=Object.entries(a.parameters);if(s.length===0)continue;let r=document.createElement("details");r.style.display="none";let o=document.createElement("summary");o.textContent=e,r.append(o);let n={name:e,details:r,parameters:[]};for(let[u,l]of s){let m=new OO.ui.TextInputWidget({placeholder:l.default?.toString(),required:l.required});m.on("change",()=>{this.updateSummary(),this.submitButton.setLabel("Submit"),this.needsCheck=!0});let p=new OO.ui.FieldLayout(m,{label:new OO.ui.HtmlSnippet(`${u}${!l.label||u.toLowerCase()===l.label?.toLowerCase()?"":` (${l.label})`}${l.description?` (${l.description})`:""} (type: ${l.type}) ${l.suggested?" (suggested)":""}${l.example?` (example: "${l.example}")`:""}`),align:"inline"});r.append(p.$element[0]),n.parameters.push({name:u,aliases:l.aliases,editor:m})}this.templateParametersEditor.append(r),this.templateEditorsInfo.push(n)}let i=document.createElement("div");i.id="redirect-helper-no-templates-message",i.textContent="No templates with parameters to display!",this.templateParametersEditor.append(i),this.defaultSortInput=new OO.ui.TextInputWidget,this.defaultSortInput.on("change",()=>{let e=this.defaultSortInput.getValue();e.length>0&&this.defaultSortInput.setValue(e.replaceAll("_"," ")),this.updateSummary(),this.submitButton.setLabel("Submit"),this.needsCheck=!0}),this.defaultSortSuggestButton=new OO.ui.ButtonWidget({icon:"robot",label:"Suggest",disabled:!0}),this.defaultSortSuggestButton.on("click",()=>{let e=this.pageTitleParsed.getMainText().replace(/ \(.*\)$/,"");if(["R from birth name","R from fictional character","R from band member","R from member","R from person","R from personal name","R from relative","R from spouse"].some(a=>this.tagSelect.getValue().includes(a))){if(!e.includes(" "))return mw.notify("redirect-helper wasn't able to determine a sort key different from the current page title!",{type:"warn"});let a="";if(/ (?:[JS]r.?|[IVX]+)$/.test(e)&&(a=e.slice(e.lastIndexOf(" ")),e=e.slice(0,e.lastIndexOf(" ")),!e.includes(" ")))return e+a;let s=e.slice(e.lastIndexOf(" ")+1).replace(/,$/,"").replace(/O'/,"O"),r=e.slice(0,e.lastIndexOf(" "));this.defaultSortInput.setValue(s+", "+r+a)}else{let a=e.replaceAll("Mr.","Mister").replaceAll("&","And");for(let s of["An","A","The"])if(a.startsWith(s+" ")){a=a.slice(s.length+1)+", "+s;break}a===e?mw.notify("redirect-helper wasn't able to determine a sort key different from the current page title!",{type:"warn"}):this.defaultSortInput.setValue(a)}}),this.defaultSortInputLayout=new OO.ui.ActionFieldLayout(this.defaultSortInput,this.defaultSortSuggestButton,{label:new OO.ui.HtmlSnippet(`Default sort key (DEFAULTSORT) (see <a href="${mw.util.getUrl("Wikipedia:Categorization#Sort keys")}" target="_blank">guideline</a>):`),classes:["redirect-input-layout"],align:"top"}),this.categorySelectInput=new w({placeholder:"Add categories here"}),this.categorySelectInput.on("change",()=>{let e=this.categorySelectInput.getValue();e=e.replace(new RegExp(`^(https?:)?/{2}?${mw.config.get("wgServer").replace(/^\/{2}/,"")}/wiki/`),""),e=e.replace(/^Category:/,""),e.length>0&&this.categorySelectInput.setValue(e[0].toUpperCase()+e.slice(1).replaceAll("_"," "))}),this.categorySelectInput.on("showing-values",e=>{for(let a of e)this.categorySelect.addAllowedValue(a.data)}),this.categorySelect=new OO.ui.TagMultiselectWidget({allowReordering:!1,inputPosition:"outline",inputWidget:this.categorySelectInput}),this.categorySelect.on("change",()=>{let e=this.categorySelect.getValue().sort((a,s)=>a.toLowerCase().localeCompare(s.toLowerCase()));this.categorySelect.getValue().join(";")!==e.join(";")&&this.categorySelect.setValue(e),this.updateSummary(),this.submitButton.setLabel("Submit"),this.needsCheck=!0}),this.categorySelectLayout=new OO.ui.FieldLayout(this.categorySelect,{label:"Categories:",classes:["redirect-input-layout"],align:"top"}),this.summaryInput=new OO.ui.ComboBoxInputWidget({options:[{data:"Resolve double redirect"},{data:"Resolve self redirect"},{data:"Remove incorrect rcats"}]}),this.summaryInputLayout=new OO.ui.FieldLayout(this.summaryInput,{id:"redirect-helper-summary-layout",label:"Summary:",classes:["redirect-input-layout"],align:"top"})}async loadSubmitElements(){let t=new OO.ui.WindowManager;document.body.append(t.$element[0]),this.submitButton=new OO.ui.ButtonWidget({label:"Submit",disabled:!0,flags:["progressive"]}),this.submitButton.on("click",()=>this.handleSubmitButtonClick());let i=new T({size:"large"},this.pageTitleParsed);t.addWindows([i]),this.showPreviewButton=new OO.ui.ButtonWidget({label:"Show preview",disabled:!0}),this.showPreviewButton.on("click",()=>{i.setData(this.createOutput(this.redirectInput.getValue(),this.tagSelect.getValue(),this.oldStrayText,this.defaultSortInput.getValue(),this.categorySelect.getValue())),i.open()});let e=new b({size:"large"});t.addWindows([e]),this.showChangesButton=new OO.ui.ButtonWidget({label:"Show changes",disabled:!0}),this.showChangesButton.on("click",async()=>{this.exists&&(this.pageContent=await this.getPageContent(this.pageTitle)),e.setData([this.pageContent,this.createOutput(this.redirectInput.getValue(),this.tagSelect.getValue(),this.oldStrayText,this.defaultSortInput.getValue(),this.categorySelect.getValue())]),e.open()}),this.pageTitleParsed.isTalkPage()||(this.talkData=await this.api.get({action:"query",formatversion:"2",prop:"info",titles:this.pageTitleParsed.getTalkPage().getPrefixedText()}),this.syncTalkCheckbox=new OO.ui.CheckboxInputWidget({selected:!!this.talkData.query.pages[0].redirect}),this.syncTalkCheckboxLayout=new OO.ui.Widget({content:[new OO.ui.FieldLayout(this.syncTalkCheckbox,{label:"Sync talk page",align:"inline"})]})),await this.checkShouldPromptPatrol()&&(this.patrolCheckbox=new OO.ui.CheckboxInputWidget({selected:!0}),this.patrolCheckboxLayout=new OO.ui.Widget({content:[new OO.ui.FieldLayout(this.patrolCheckbox,{label:"Mark as patrolled",align:"inline"})]})),this.submitLayout=new OO.ui.HorizontalLayout({id:"redirect-helper-submit-layout",items:[this.submitButton,this.showPreviewButton,this.showChangesButton,this.syncTalkCheckboxLayout,this.patrolCheckboxLayout].filter(Boolean)})}async checkShouldPromptPatrol(){let t=document.querySelector("#mwe-pt-mark .mwe-pt-tool-icon");if(t?.click(),t?.click(),mw.config.get("wgNamespaceNumber")!==0)return!1;if(document.querySelector(".patrollink"))return!0;if(document.querySelector("#mwe-pt-mark-as-reviewed-button"))return!0;if(document.querySelector("#mwe-pt-mark-as-unreviewed-button"))return!1;{if(!mw.config.get("wgArticleId")||!(await mw.user.getRights()).includes("patrol"))return!1;let e=await this.api.get({action:"pagetriagelist",page_id:mw.config.get("wgArticleId")});return e.pagetriagelist.pages[0]?.user_name===mw.config.get("wgUserName")||e.pagetriagelist.result!=="success"||e.pagetriagelist.pages.length===0?!1:!Number.parseInt(e.pagetriagelist.pages[0]?.patrol_status)}}updateSummary(){let t=this.redirectInput.getValue().trim();if(!t)this.summaryInput.$tabIndexed[0].placeholder="";else if(this.exists){let i=this.oldRedirectTarget?.replaceAll("_"," ");i&&(i=i[0].toUpperCase()+i.slice(1));let e=t!==i,a=this.tagSelect.getValue().some(u=>!this.oldRedirectTags.includes(u))||this.oldRedirectTags.some(u=>!this.tagSelect.getValue().includes(u)),s=!1;if(this.oldRedirectTagData){let u=Object.entries(this.redirectTemplates).filter(([,l])=>Object.entries(l.parameters).length>0);for(let[l,m]of u){if(!this.oldRedirectTags.includes(l)||!this.tagSelect.getValue().includes(l))continue;let c=this.oldRedirectTagData[l]??Object.entries(m.parameters).map(([d])=>[d,""]),h=this.templateEditorsInfo.find(d=>d.name===l);for(let d of h.parameters){let f=c.find(L=>L[0]===d.name)?.[1]??"",y=d.editor.getValue().trim();if(f!==y){s=!0;break}}if(s)break}}let r=this.defaultSortInput.getValue().trim()!==this.oldDefaultSort.replaceAll("_"," "),o=this.categorySelect.getValue().some(u=>!this.oldCategories.includes(u))||this.oldCategories.some(u=>!this.categorySelect.getValue().includes(u)),n=[];e&&n.push(`retarget to [[${t}]]`),a&&n.push(`${this.tagSelect.getValue().length>0&&this.oldRedirectTags.length>0?"change":this.tagSelect.getValue().length>0?"add":"remove"} categorization templates`),s&&n.push("change categorization template arguments"),r&&n.push(`${this.defaultSortInput.getValue().trim().length>0&&this.oldDefaultSort.replaceAll("_"," ").length>0?"change":this.defaultSortInput.getValue().trim().length>0?"add":"remove"} default sort key`),o&&n.push(`${this.categorySelect.getValue().length>0&&this.oldCategories.length>0?"change":this.categorySelect.getValue().length>0?"add":"remove"} categories`),n.length===0&&n.push("perform redirect cleanup"),n[0]=n[0][0].toUpperCase()+n[0].slice(1),n.length>1&&(n[n.length-1]=`and ${n.at(-1)}`),this.summaryInput.$tabIndexed[0].placeholder=n.join(n.length>2?", ":" ")}else this.summaryInput.$tabIndexed[0].placeholder=`Create redirect to [[${t}]]`}async loadExistingData(){this.exists&&(this.pageContent=await this.getPageContent(this.pageTitle)),this.oldRedirectTarget=this.redirectRegex.exec(this.pageContent)?.[1],this.oldRedirectTags=Object.entries(this.redirectTemplates).map(([i,e])=>[i,...e.aliases].some(a=>new RegExp(`{{\\s*[${a[0].toLowerCase()}${a[0]}]${a.slice(1)}\\s*(\\||}})`).test(this.pageContent))?i:null).filter(Boolean).sort((i,e)=>i.toLowerCase().localeCompare(e.toLowerCase()));let t=Object.entries(this.redirectTemplates).flatMap(([i,e])=>[i,...e.aliases]).map(i=>new RegExp(`{{\\s*[${i[0].toLowerCase()}${i[0]}]${i.slice(1)}\\s*(\\||}})`).test(this.pageContent)?i:null).filter(Boolean);this.oldRedirectTagData=Object.fromEntries(t.map(i=>{let e=new RegExp(`{{\\s*[${i[0].toLowerCase()}${i[0]}]${i.slice(1)}\\|?(.*?)\\s*}}`).exec(this.pageContent),a=Object.entries(this.redirectTemplates).find(([o,n])=>[o,...n.aliases].includes(i))?.[0];if(!e?.[1])return null;let r=e[1].split("|").map((o,n)=>{if(!o.includes("="))return[(n+1).toString(),o.trim()];let[u,l]=o.split("=");return[u.trim(),l.trim()]});return[a,r]}).filter(Boolean)),this.oldDefaultSort=this.pageContent.match(/{{DEFAULTSORT:.*?}}/g)?.at(-1)?.slice(14,-2)?.trim()??"",this.oldCategories=this.pageContent.match(/\[\[[Cc]ategory:.+?]]/g)?.map(i=>i.slice(11,-2))??[],this.oldStrayText=[/{{short description\|.*?}}/i.exec(this.pageContent)?.[0],/{{DISPLAYTITLE:.*?}}/.exec(this.pageContent)?.[0],/{{italic title\|?.*?}}/i.exec(this.pageContent)?.[0],/{{title language\|.*?}}/.exec(this.pageContent)?.[0],/{{authority control(\|.*?)?}}/i.exec(this.pageContent)?.[0]].filter(Boolean).join(`
`),this.oldRedirectTarget?this.redirectInput.setValue(this.oldRedirectTarget.replaceAll("_"," ")):mw.notify("Could not find redirect target!",{type:"error"}),this.tagSelect.setValue(this.oldRedirectTags);for(let[i,e]of Object.entries(this.oldRedirectTagData)){let a=this.templateEditorsInfo.find(s=>s.name===i);if(a)for(let[s,r]of e){let o=a.parameters.find(n=>[n.name,...n.aliases].includes(s));o&&o.editor.setValue(r)}}this.oldDefaultSort&&this.defaultSortInput.setValue(this.oldDefaultSort);for(let i of this.oldCategories)this.categorySelect.addAllowedValue(i);this.categorySelect.setValue(this.oldCategories.map(i=>({data:i,label:i}))),this.updateSummary()}async validateSubmission(){let t=[],i=this.redirectInput.getValue().trim(),e=this.tagSelect.getValue();/^\s*[^[\]{|}]+\s*$/.test(i)||t.push({title:i,message:"is not a valid page title!"});try{this.parsedDestination=mw.Title.newFromText(i)}catch{t.length===0&&t.push({title:i,message:"is not a valid page title!"})}!this.parsedDestination&&t.length===0&&t.push({title:i,message:"is not a valid page title!"}),this.parsedDestination?.getPrefixedText()===this.pageTitleParsed.getPrefixedText()&&t.push({message:"cannot redirect to itself!"});let a=await this.api.get({action:"query",formatversion:"2",prop:["pageprops","categories"],titles:i}).catch(p=>(p==="missingtitle"?t.push({title:i,message:"does not exist!"}):t.push({title:i,message:`was not able to be fetched from the API (${p})!`}),null)),s=await this.api.get({action:"parse",page:i,prop:"sections",redirects:!0});if(s.parse.redirects?.[0]){let p=s.parse.redirects[0].to+(s.parse.redirects[0].tofragment?`#${s.parse.redirects[0].tofragment}`:"");t.push({title:i,message:`is a redirect to <a href="${mw.util.getUrl(p)}" target="_blank">${p}</a>. Retarget to that page instead, as double redirects aren't allowed.`,autoFixes:[{type:"change-target",target:p}]})}if(i.split("#").length>1)if(s.parse.sections.find(c=>c.line.replaceAll(/<\/?i>/g,"")===i.split("#")[1]))e.includes("R to anchor")&&t.push({message:"is tagged as a redirect to an anchor, but it is actually a redirect to a section!",autoFixes:[{type:"add",tag:"R to section"},{type:"remove",tag:"R to anchor"}]}),e.includes("R to section")||t.push({message:"is a redirect to a section, but it is not tagged with <code>{{R to section}}</code>!",autoFixes:[{type:"add",tag:"R to section"}]});else{let c=(await this.api.get({action:"query",formatversion:"2",prop:"revisions",rvprop:"content",rvslots:"main",titles:this.parsedDestination.getPrefixedText()})).query.pages[0].revisions[0].slots.main.content;[...c.match(/(?<={{\s*?[Aa](?:nchors?|nchor for redirect|nker|NCHOR|nc)\s*?\|).+?(?=}})/g)?.map(d=>d.split("|").map(f=>f.trim()))?.flat()??[],...c.match(/(?<={{\s*?(?:[Vv](?:isible anchors?|isanc|Anch|anchor|isibleanchor|a)|[Aa](?:nchord|chored|nchor\+)|[Tt]ext anchor)\s*?\|).+?(?=(?<!!|=)}})/g)?.map(d=>d.split("|").map(f=>f.trim()).filter(f=>!/^text\s*?=/.test(f)))?.flat()??[],...c.match(/(?<=id=)"?.+?(?="|>|\|)/g)?.map(d=>d.trim())??[],...c.match(/EpisodeNumber += +\d+/g)?.map(d=>`ep${d.split("=")[1].trim()}`)??[]].includes(i.split("#")[1])?(e.includes("R to section")&&t.push({message:"is tagged as a redirect to a section, but it is actually a redirect to an anchor!",autoFixes:[{type:"add",tag:"R to anchor"},{type:"remove",tag:"R to section"}]}),e.includes("R to anchor")||t.push({message:"is a redirect to an anchor, but it is not tagged with <code>{{R from anchor}}</code>!",autoFixes:[{type:"add",tag:"R to anchor"}]})):t.push({message:`is a redirect to <a href="${mw.util.getUrl(i)}" target="_blank">${i}</a>, but that section or anchor does not exist!`,autoFixes:[{type:"change-target",target:i.split("#")[0]}]})}if(i.split("#").length===1)for(let p of["R to section","R to anchor"])e.includes(p)&&t.push({message:`is not a redirect to a section/anchor, but it is tagged with <code>{{${p}}}</code>!`,autoFixes:[{type:"remove",tag:p}]});let r=!!(a.query.pages[0].pageprops&&"disambiguation"in a.query.pages[0].pageprops),o=!!a.query.pages[0].categories?.some(p=>p.title==="Category:Surnames"),n=["R to disambiguation page","R from incomplete disambiguation"],u=["R from ambiguous sort name","R from ambiguous term"],l=n.some(p=>e.includes(p)),m=u.some(p=>e.includes(p));r&&!l&&!m&&t.push({message:"is a redirect to a disambiguation page, but it is not tagged with a disambiguation categorization template!"}),a.query.pages[0].pageprops&&!r&&((!o&&(l||m)||o&&l)&&t.push({message:"is not a redirect to a disambiguation page, but it is tagged with a disambiguation categorization template!",autoFixes:[...n,...u].map(p=>({type:"remove",tag:p}))}),o&&!m&&t.push({message:"is a redirect to a surname list, but it is not tagged with a correct disambiguation categorization template!"})),r&&e.includes("R to disambiguation page")&&!this.pageTitleParsed.getMainText().endsWith(" (disambiguation)")&&t.push({message:'is tagged with <code>{{R to disambiguation page}}</code>, but this title does not end with " (disambiguation)". Use <code>{{R from ambiguous term}}</code> or a similar categorization template instead!',autoFixes:[{type:"remove",tag:"R to disambiguation page"}]});for(let p of["R protected","R semi-protected","R extended-protected","R template-protected","R fully protected"])e.includes(p)&&t.push({message:`is tagged with unnecessarily tagged with <code>{{${p}}}</code> which will be duplicated by the redirect category shell!`,autoFixes:[{type:"remove",tag:p}]});mw.config.get("wgWikibaseItemId")&&!e.includes("R with Wikidata item")&&t.push({message:"is linked to a Wikidata item but it isn't tagged with <code>{{R with Wikidata item}}</code>!",autoFixes:[{type:"add",tag:"R with Wikidata item"}]}),e.includes("R with Wikidata item")&&!mw.config.get("wgWikibaseItemId")&&t.push({message:"is tagged with <code>{{R with Wikidata item}}</code> but it is not actually linked to a Wikidata item!",autoFixes:[{type:"remove",tag:"R with Wikidata item"}]});for(let p of e){let c=this.redirectTemplates[p];if(c)for(let[h,d]of Object.entries(c.parameters)){let f=this.templateEditorsInfo.find(y=>y.name===p)?.parameters.find(y=>[y.name,...y.aliases].includes(h));f&&d.required&&!f.editor.getValue().trim()&&t.push({message:`is tagged with <code>{{${p}}}</code> but it is missing the required parameter <code>${h}</code>!`})}}return this.syncTalkCheckbox?.isSelected()&&!this.talkData.query.pages[0].missing&&!this.talkData.query.pages[0].redirect&&t.push({title:this.pageTitleParsed.getTalkPage().getPrefixedText(),message:"exists, but is not a redirect!"}),t}async handleSubmitButtonClick(){let t=[this.redirectInput,this.tagSelect,...this.templateEditorsInfo.flatMap(r=>r.parameters.map(o=>o.editor)),this.defaultSortInput,this.defaultSortSuggestButton,this.categorySelect,this.summaryInput,this.submitButton,this.showPreviewButton,this.showChangesButton,this.syncTalkCheckbox,this.patrolCheckbox].filter(Boolean);for(let r of t)r.setDisabled(!0);this.submitButton.setLabel("Checking target validity...");let i=[];if(this.needsCheck?i=await this.validateSubmission():this.parsedDestination=mw.Title.newFromText(this.redirectInput.getValue()),i.length>0){for(let r of document.querySelectorAll(".redirect-helper-warning"))r.remove();for(let{title:r,message:o,autoFixes:n}of i){let u=new OO.ui.HtmlSnippet(`${r?`<a href="${mw.util.getUrl(r)}" target="_blank">${r}</a>`:"This page"} ${o} Click again without making changes to submit anyway.`),l=new OO.ui.MessageWidget({type:"error",classes:["redirect-helper-warning"],inline:!0,label:u});if(n){let m=new OO.ui.ButtonWidget({label:"Perform auto-fix",flags:["progressive"],classes:["redirect-helper-autofix-button"]});m.on("click",()=>{let p=this.tagSelect.getValue();for(let c of n)c.type==="add"&&!p.includes(c.tag)&&this.tagSelect.addTag(c.tag,c.tag),c.type==="remove"&&p.includes(c.tag)&&this.tagSelect.removeTagByData(c.tag),c.type==="change-target"&&this.redirectInput.setValue(c.target);l.$element[0].style.textDecoration="line-through 2px black",m.$element[0].remove()}),l.$element[0].querySelector(".oo-ui-labelElement-label").append(m.$element[0])}this.editorBox.$element[0].append(l.$element[0])}for(let r of t)r.setDisabled(!1);this.submitButton.setLabel("Submit anyway"),this.needsCheck=!1;return}this.submitButton.setLabel(`${this.exists?"Editing":"Creating"} redirect...`);let e=this.createOutput(this.redirectInput.getValue(),this.tagSelect.getValue(),this.oldStrayText,this.defaultSortInput.getValue(),this.categorySelect.getValue()),a=(this.summaryInput.getValue()||this.summaryInput.$tabIndexed[0].placeholder)+this.scriptAdvert;if(await this.editOrCreate(this.pageTitle,e,a)){if(mw.notify(`Redirect ${this.exists?"edited":"created"} successfully!`,{type:"success"}),this.syncTalkCheckbox?.isSelected()){this.submitButton.setLabel("Editing talk page...");let r=this.tagSelect.getValue().includes("R from move"),o=this.createOutput(this.parsedDestination.getTalkPage().getPrefixedText(),r?["R from move"]:[],void 0,void 0,[]);if(!await this.editOrCreate(this.pageTitleParsed.getTalkPage().getPrefixedText(),o,"Syncing redirect from main page"+this.scriptAdvert))return;mw.notify("Talk page synced successfully!",{type:"success"})}if(this.patrolCheckbox?.isSelected()){this.submitButton.setLabel("Patrolling redirect...");let r=document.querySelector(".patrollink a"),o=document.querySelector("#mwe-pt-mark-as-reviewed-button");r?await this.api.postWithToken("patrol",{action:"patrol",rcid:new URL(r.href).searchParams.get("rcid")}).catch((u,l)=>(mw.notify(`Error patrolling ${this.pageTitle} via API: ${l?.error.info??"Unknown error"} (${u})`,{type:"error"}),null))&&mw.notify("Redirect patrolled successfully!",{type:"success"}):o?(o.click(),mw.notify("Redirect patrolled successfully!",{type:"success"})):mw.notify("Page curation toolbar not found, redirect cannot be patrolled!",{type:"error"})}this.submitButton.setLabel("Complete, reloading..."),window.location.href=mw.util.getUrl(this.pageTitle,{redirect:"no"})}}createOutput(t,i,e,a,s){let r=mw.Title.newFromText(t),o=r?`${r.getNamespaceId()===14?":":""}${r.getPrefixedText()}${r.getFragment()?`#${r.getFragment()}`:""}`:t.trim();this.pageTitleParsed.getMainText().toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036F]/g,"")===a?.toLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036F]/g,"")&&(a=void 0);let n=i.map(u=>{let l=this.templateEditorsInfo.find(c=>c.name===u);if(!l)return`{{${u}}}`;let m=l.parameters.findLastIndex((c,h)=>c.name===(h+1).toString()&&c.editor.getValue().trim()),p=l.parameters.map((c,h)=>{let d=c.editor.getValue().trim();return!d&&h>m?null:`|${c.name===(h+1).toString()?"":`${c.name}=`}${d}`}).filter(Boolean).join("");return`{{${u}${p}}}`});return[`#REDIRECT [[${o}]]
`,i.length>0?`{{Redirect category shell|
${n.join(`
`)}
}}
`:null,e?e+`
`:null,a?`{{DEFAULTSORT:${a.trim()}}}`:null,s.length>0?s.map(u=>`[[Category:${u}]]`).join(`
`):null].filter(Boolean).join(`
`)}async getPageContent(t){return(await this.api.get({action:"query",formatversion:"2",prop:"revisions",rvprop:"content",rvslots:"main",titles:t})).query.pages[0].revisions[0].slots.main.content.trim()}async editOrCreate(t,i,e){return await this.api.edit(t,()=>({text:i,summary:e})).catch((a,s)=>a==="nocreate-missing"?this.api.create(t,{summary:e},i).catch((r,o)=>{mw.notify(`Error creating ${t}: ${o?.error.info??"Unknown error"} (${r})`,{type:"error"})}):(mw.notify(`Error editing or creating ${t}: ${s?.error.info??"Unknown error"} (${a})`,{type:"error"}),null))}}});var E=["mediawiki.util","oojs-ui-core","oojs-ui-widgets","oojs-ui-windows","oojs-ui.styles.icons-content","oojs-ui.styles.icons-editing-core"];mw.loader.using(E,async()=>{let{default:g}=await Promise.resolve().then(()=>(I(),C));class t{api=new mw.Api;redirectTemplates;contentText;pageTitle;pageTitleParsed;async run(){if(this.passesPreChecks()){if(this.redirectTemplates=await this.fetchRedirectTemplates(),this.contentText=document.querySelector("#mw-content-text"),!this.contentText)return mw.notify("redirect-helper: Failed to find content text element!",{type:"error"});if(this.pageTitle=mw.config.get("wgPageName"),this.pageTitleParsed=mw.Title.newFromText(this.pageTitle),!this.pageTitleParsed)return mw.notify("redirect-helper: Failed to parse page title!",{type:"error"});await this.checkPageAndLoad()}}passesPreChecks(){return[mw.config.get("wgNamespaceNumber")>=0,mw.config.get("wgIsProbablyEditable"),mw.config.get("wgIsArticle"),mw.config.get("wgAction")==="view",mw.config.get("wgRevisionId")===mw.config.get("wgCurRevisionId"),!mw.config.get("wgDiffOldId")].every(Boolean)}async fetchRedirectTemplates(){return JSON.parse((await this.api.get({action:"query",formatversion:"2",prop:"revisions",rvprop:"content",rvslots:"main",titles:"User:Eejit43/scripts/redirect-helper.json"})).query.pages?.[0]?.revisions?.[0]?.slots?.main?.content||"{}")}async checkPageAndLoad(){let e=await this.api.get({action:"query",formatversion:"2",prop:"info",titles:this.pageTitle}),a={redirectTemplates:this.redirectTemplates,contentText:this.contentText,pageTitle:this.pageTitle,pageTitleParsed:this.pageTitleParsed};if(e.query.pages[0].missing){mw.util.addCSS(`
#create-redirect-button {
margin-bottom: 20px;
}`);let s=new OO.ui.ButtonWidget({id:"create-redirect-button",label:"Create redirect",icon:"articleRedirect",flags:["progressive"]});s.on("click",()=>{s.$element[0].remove(),new g(a,!1).load()}),this.contentText.prepend(s.$element[0])}else if(e.query.pages[0].redirect)new g(a,!0).load();else{let s=mw.util.addPortletLink(mw.config.get("skin")==="minerva"?"p-tb":"p-cactions","#","Redirect page","redirect-helper");s.addEventListener("click",r=>{r.preventDefault(),new g(a,!1).load(),window.scrollTo({top:0,behavior:"smooth"}),s.remove()})}}}new t().run()});})();
// </nowiki>
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2NyaXB0cy9yZWRpcmVjdC1oZWxwZXIvY2F0ZWdvcnktaW5wdXQtd2lkZ2V0LnRzIiwgIi4uLy4uL3NjcmlwdHMvcmVkaXJlY3QtaGVscGVyL2NoYW5nZXMtZGlhbG9nLnRzIiwgIi4uLy4uL3NjcmlwdHMvcmVkaXJlY3QtaGVscGVyL291dHB1dC1wcmV2aWV3LWRpYWxvZy50cyIsICIuLi8uLi9zY3JpcHRzL3JlZGlyZWN0LWhlbHBlci9yZWRpcmVjdC10YXJnZXQtaW5wdXQtd2lkZ2V0LnRzIiwgIi4uLy4uL3NjcmlwdHMvcmVkaXJlY3QtaGVscGVyL3JlZGlyZWN0LWhlbHBlci1kaWFsb2cudHMiLCAiLi4vLi4vc2NyaXB0cy9yZWRpcmVjdC1oZWxwZXIvcmVkaXJlY3QtaGVscGVyLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgdHlwZSB7IEFwaVF1ZXJ5QWxsUGFnZXNHZW5lcmF0b3JQYXJhbWV0ZXJzIH0gZnJvbSAnLi4vLi4vZ2xvYmFsLXR5cGVzJztcbmltcG9ydCB0eXBlIHsgTG9va3VwRWxlbWVudENvbmZpZyB9IGZyb20gJy4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BhcnNlZFRpdGxlPy5nZXRNYWluVGV4dCgpID8/IHZhbHVlLFxuICAgICAgICAgICAgICAgIGdlbmVyYXRvcjogJ2FsbHBhZ2VzJyxcbiAgICAgICAgICAgICAgICBwcm9wOiAnY2F0ZWdvcmllcycsXG4gICAgICAgICAgICB9IHNhdGlzZmllcyBBcGlRdWVyeUFsbFBhZ2VzR2VuZXJhdG9yUGFyYW1ldGVycylcbiAgICAgICAgICAgIC5jYXRjaCgoKSA9PiBudWxsKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3VsdDogeyBxdWVyeTogeyBwYWdlczogeyB0aXRsZTogc3RyaW5nOyBjYXRlZ29yaWVzPzogeyB0aXRsZTogc3RyaW5nIH1bXSB9W10gfSB9IHwgbnVsbCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQ/LnF1ZXJ5Py5wYWdlcykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwYWdlcyA9IHJlc3VsdC5xdWVyeS5wYWdlc1xuICAgICAgICAgICAgICAgICAgICAgICAgLmZpbHRlcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocGFnZSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIXBhZ2UuY2F0ZWdvcmllcz8uc29tZSgoY2F0ZWdvcnkpID0+IGNhdGVnb3J5LnRpdGxlID09PSAnQ2F0ZWdvcnk6V2lraXBlZGlhIHNvZnQgcmVkaXJlY3RlZCBjYXRlZ29yaWVzJyksXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAubWFwKChwYWdlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdGl0bGVXaXRob3V0TmFtZXNwYWNlID0gcGFnZS50aXRsZS5zcGxpdCgnOicpWzFdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZGF0YTogdGl0bGVXaXRob3V0TmFtZXNwYWNlLCBs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ICcyJyxcbiAgICAgICAgICAgICAgICAgICAgJ3Byb3AnOiBbJ2RpZmYnXSxcbiAgICAgICAgICAgICAgICAgICAgJ2Zyb21zbG90cyc6ICdtYWluJyxcbiAgICAgICAgICAgICAgICAgICAgJ2Zyb210ZXh0LW1haW4nOiBvbGRUZXh0LFxuICAgICAgICAgICAgICAgICAgICAnZnJvbWNvbnRlbnRtb2RlbC1tYWluJzogJ3dpa2l0ZXh0JyxcbiAgICAgICAgICAgICAgICAgICAgJ3Rvc2xvdHMnOiAnbWFpbicsXG4gICAgICAgICAgICAgICAgICAgICd0b3RleHQtbWFpbic6IG5ld1RleHQsXG4gICAgICAgICAgICAgICAgICAgICd0b2NvbnRlbnRtb2RlbC1tYWluJzogJ3dpa2l0ZXh0JyxcbiAgICAgICAgICAgICAgICB9IHNhdGlzZmllcyBBcGlDb21wYXJlUGFnZXNQYXJhbXMgJiB7XG4gICAgICAgICAgICAgICAgICAgICdmcm9tdGV4dC1tYWluJzogc3RyaW5nO1xuICAgICAgICAgICAgICAgICAgICAnZnJvbWNvbnRlbnRtb2RlbC1tYWluJzogc3RyaW5nO1xuICAgICAgICAgICAgICAgICAgICAndG90ZXh0LW1haW4nOiBzdHJpbmc7XG4gICAgICAgICAgICAgICAgICAgICd0b2NvbnRlbnRtb2RlbC1tYWluJzogc3RyaW5nO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnRoZW4oKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21wYXJpc29uID0gKHJlc3VsdCBhcyB7IGNvbXBhcmU6IHsgYm9keTogc3RyaW5nIH0gfSkuY29tcGFyZS5ib2R5O1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vQ2hhbmdlc0VsZW1lbnQgPSBuZXcgT08udWkuTWVzc2FnZVdpZGdldCh7IHR5cGU6ICd3YXJuaW5nJywgbGFiZWw6ICdObyBjaGFuZ2VzIHRvIG1ha2UhJyB9KTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBwYW5lbExheW91dCA9IG5ldyBPTy51aS5QYW5lbExheW91dCh7IHBhZGRlZDogdHJ1ZSwgZXhwYW5kZWQ6IGZhbHNlIH0pO1xuICAgICAgICAgICAgICAgICAgICBwYW5lbExheW91dC4kZWxlbWVudC5hcHBlbmQoXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wYXJpc29uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBgXG48dGFibGUgY2xhc3M9XCJkaWZmIGRpZmYtZWRpdGZvbnQtbW9ub3NwYWNlXCI+XG4gICAgPGNvbGdyb3VwPlxuICAgICAgICA8Y29sIGNsYXNzPVwiZGlmZi1tYXJrZXJcIj5cbiAgICAgICAgPGNvbCBjbGFzcz1cImRpZmYtY29udGVudFwiPlxuICAgICAgICA8Y29sIGNsYXNzPVwiZGlmZi1tYXJrZXJcIj5cbiAgICAgICAgPGNvbCBjbGFzcz1cImRpZmYtY29udGVudFwiPlxuICAgIDwvY29sZ3JvdXA+XG4gICAgPHRib2R5PlxuICAgICAgICAke2NvbXBhcmlzb259XG4gICAgPC90Ym9keT5cbjwvdGFibGU+YFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbm9DaGFuZ2VzRWxlbWVudC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICAodGhpcyBhcyB1bmtub3duIGFzIHsgJGJvZHk6IEpRdWVyeSB9KS4kYm9keS5hcHBlbmQocGFuZWxMYXlvdXQuJGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgZ2V0QWN0aW9uUHJvY2VzcyA9IChhY3Rpb246IHN0cmluZykgPT4ge1xuICAgICAgICByZXR1cm4gYWN0aW9uXG4gICAgICAgICAgICA/IG5ldyBPTy51aS5Qcm9jZXNzKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgI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ZXRQcmVmaXhlZERiKCksXG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IHRoaXMuZ2V0RGF0YSgpIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICB9IHNhdGlzZmllcyBBcGlQYXJzZVBhcmFtcylcbiAgICAgICAgICAgICAgICAudGhlbigocmVzdWx0KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRhZ3NDb250ZW50ID0gKHJlc3VsdCBhcyB7IHBhcnNlOiB7IHRleHQ6IHN0cmluZyB9IH0pLnBhcnNlLnRleHQ7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhdGVnb3JpZXNDb250ZW50ID0gKHJlc3VsdCBhcyB7IHBhcnNlOiB7IGNhdGVnb3JpZXNodG1sOiBzdHJpbmcgfSB9KS5wYXJzZS5jYXRlZ29yaWVzaHRtbDtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBwYW5lbExheW91dCA9IG5ldyBPTy51aS5QYW5lbExheW91dCh7IHBhZGRlZDogdHJ1ZSwgZXhwYW5kZWQ6IGZhbHNlIH0pO1xuICAgICAgICAgICAgICAgICAgICBwYW5lbExheW91dC4kZWxlbWVudC5hcHBlbmQodGFnc0NvbnRlbnQsIGNhdGVnb3JpZXNDb250ZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAodGhpcyBhcyB1bmtub3duIGFzIHsgJGJvZHk6IEpRdWVyeSB9KS4kYm9keS5hcHBlbmQocGFuZWxMYXlvdXQuJGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgZ2V0QWN0aW9uUHJvY2VzcyA9IChhY3Rpb246IHN0cmluZykgPT4ge1xuICAgICAgICByZXR1cm4gYWN0aW9uXG4gICAgICAgICAgICA/IG5ldyBPTy51aS5Qcm9jZXNzKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIHRoaXMuY2xvc2UoKTtcbiAgICAgICAgICAgICAgfSlcbiAg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kgPT4gbnVsbClcbiAgICAgICAgICAgICAgICAudGhlbigocmVzdWx0OiBQYWdlUGFyc2VSZXN1bHQgfCBudWxsKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoZWRTZWN0aW9ucyA9IHJlc3VsdC5wYXJzZS5zZWN0aW9ucy5maWx0ZXIoKHNlY3Rpb24pID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VjdGlvbi5saW5lXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50b0xvd2VyQ2FzZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlQWxsKC88XFwvP2k+L2csICcnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3RhcnRzV2l0aCh2YWx1ZS5zcGxpdCgnIycpWzFdLnRvTG93ZXJDYXNlKCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZFNlY3Rpb25zLm1hcCgoc2VjdGlvbikgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogYCR7cmVzdWx0LnBhcnNlLnRpdGxlfSMke3NlY3Rpb24ubGluZS5yZXBsYWNlQWxsKC88XFwvP2k+L2csICcnKX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogYCR7cmVzdWx0LnBhcnNlLnRpdGxlfSMke3NlY3Rpb24ubGluZS5yZXBsYWNlQWxsKC88XFwvP2k+L2csICcnKX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBkZWZlcnJlZC5yZXNvbHZlKFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnN0IHBhcnNlZFRpdGxlID0gbXcuVGl0bGUubmV3RnJvbVRleHQodmFsdWUpO1xuXG4gICAgICAgICAgICB0aGlzLmFwaVxuICAgICAgICAgICAgICAgIC5nZXQoe1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb246ICdxdWVyeScsXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHZlcnNpb246ICcyJyxcbiAgICAgICAgICAgICAgICAgICAgZ2FwbGltaXQ6IDIwLFxuICAgICAgICAgICAgICAgICAgICBnYXBuYW1lc3BhY2U6IHBhcnNlZFRpdGxlPy5nZXROYW1lc3BhY2VJZCgpID8/IDAsXG4gICAgICAgICAgICAgICAgICAgIGdhcHByZWZpeDogcGFyc2VkVGl0bGU/LmdldE1haW5UZXh0KCkgPz8gdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYXRvcjogJ2FsbHBhZ2VzJyxcbiAgICAgICAgICAgICAgICAgICAgcHJvcDogWydpbmZvJywgJ3BhZ2Vwcm9wcyddLFxuICAgICAgICAgICAgICAgIH0gc2F0aXNmaWVzIEFwaVF1ZXJ5QWxsUGFnZXNHZW5lcmF0b3JQYXJhbWV0ZXJzKVxuICAgICAgICAgICAgICAgIC5jYXRjaCgoKSA9PiBudWxsKVxuICAgICAgICAgICAgICAgIC50aGVuKFxuICAgICAgICAgICAgICAgICAgICAoXG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVyeTogeyBwYWdlczogeyB0aXRsZTogc3RyaW5nOyBwYWdlcHJvcHM6IHsgZGlzYW1iaWd1YXRpb24/OiBzdHJpbmcgfTsgcmVkaXJlY3Q/OiBzdHJpbmcgfVtdIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHwgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdC5xdWVyeT8ucGFnZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gcmVzdWx0LnF1ZXJ5LnBhZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKChwYWdlKSA9PiBwYWdlLnRpdGxlICE9PSB0aGlzLnBhZ2VUaXRsZVBhcnNlZC5nZXRQcmVmaXhlZFRleHQoKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHBhZ2UpID0+ICh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogcGFnZS50aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogbmV3IE9PLnVpLkh0bWxTbmlwcGV0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgJHtwYWdlLnRpdGxlfSR7cGFnZS5wYWdlcHJvcHMgJiYgJ2Rpc2FtYmlndWF0aW9uJyBpbiBwYWdlLnBhZ2Vwcm9wcyA/ICcgPGk+KGRpc2FtYmlndWF0aW9uKTwvaT4nIDogJyd9JHsncmVkaXJlY3QnIGluIHBhZ2UgPyAnIDxpPihyZWRpcmVjdCk8L2k+JyA6ICcnfWAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBbXSxcbiAgICAgICAgICAgICAgIC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pZiBhcHBsaWNhYmxlKSAqL1xuICAgICAgICB0aGlzLmVkaXRvckJveC4kZWxlbWVudFswXS5hcHBlbmQoXG4gICAgICAgICAgICAuLi4oW1xuICAgICAgICAgICAgICAgIHRoaXMuc3luY1dpdGhNYWluQnV0dG9uPy4kZWxlbWVudD8uWzBdLFxuICAgICAgICAgICAgICAgIHRoaXMucmVkaXJlY3RJbnB1dExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICB0aGlzLnRhZ1NlbGVjdExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICB0aGlzLnRlbXBsYXRlUGFyYW1ldGVyc0VkaXRvcixcbiAgICAgICAgICAgICAgICB0aGlzLmRlZmF1bHRTb3J0SW5wdXRMYXlvdXQuJGVsZW1lbnRbMF0sXG4gICAgICAgICAgICAgICAgdGhpcy5jYXRlZ29yeVNlbGVjdExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICB0aGlzLnN1bW1hcnlJbnB1dExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgICAgICB0aGlzLnN1Ym1pdExheW91dC4kZWxlbWVudFswXSxcbiAgICAgICAgICAgIF0uZmlsdGVyKEJvb2xlYW4pIGFzIEhUTUxFbGVtZW50W10pLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuY29udGVudFRleHQucHJlcGVuZCh0aGlzLmVkaXRvckJveC4kZWxlbWVudFswXSk7XG5cbiAgICAgICAgaWYgKHRoaXMuZXhpc3RzKSB0aGlzLmxvYWRFeGlzdGluZ0RhdGEoKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBMb2FkcyB0aGUgXCJTeW5jIHdpdGggbWFpbiBwYWdlXCIgYnV0dG9uXCIgb24gdGFsayBwYWdlcy5cbiAgICAgKi9cbiAgICBwcml2YXRlIGFzeW5jIGxvYWRTeW5jV2l0aE1haW5CdXR0b24oKSB7XG4gICAgICAgIGNvbnN0IG1haW5QYWdlQ29udGVud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pY3Rpb25hbCBjaGFyYWN0ZXInLFxuICAgICAgICAgICAgICAgICAgICAnUiBmcm9tIGJhbmQgbWVtYmVyJyxcbiAgICAgICAgICAgICAgICAgICAgJ1IgZnJvbSBtZW1iZXInLFxuICAgICAgICAgICAgICAgICAgICAnUiBmcm9tIHBlcnNvbicsXG4gICAgICAgICAgICAgICAgICAgICdSIGZyb20gcGVyc29uYWwgbmFtZScsXG4gICAgICAgICAgICAgICAgICAgICdSIGZyb20gcmVsYXRpdmUnLFxuICAgICAgICAgICAgICAgICAgICAnUiBmcm9tIHNwb3VzZScsXG4gICAgICAgICAgICAgICAgXS5zb21lKCh0YWcpID0+IHRoaXMudGFnU2VsZWN0LmdldFZhbHVlKCkuaW5jbHVkZXModGFnKSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIC8vIEhhbmRsaW5nIGlzIG1vZGlmaWVkIGZyb20gZXZhZDM3J3MgXCJSYXRlclwiXG5cbiAgICAgICAgICAgICAgICBpZiAoIW5hbWUuaW5jbHVkZXMoJyAnKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG13Lm5vdGlmeShcInJlZGlyZWN0LWhlbHBlciB3YXNuJ3QgYWJsZSB0byBkZXRlcm1pbmUgYSBzb3J0IGtleSBkaWZmZXJlbnQgZnJvbSB0aGUgY3VycmVudCBwYWdlIHRpdGxlIVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnd2FybicsXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgbGV0IGdlbmVyYXRpb25hbFN1ZmZpeCA9ICcnO1xuICAgICAgICAgICAgICAgIGlmICgvICg/OltKU11yLj98W0lWWF0rKSQvLnRlc3QobmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZ2VuZXJhdGlvbmFsU3VmZml4ID0gbmFtZS5zbGljZShuYW1lLmxhc3RJbmRleE9mKCcgJykpO1xuICAgICAgICAgICAgICAgICAgICBuYW1lID0gbmFtZS5zbGljZSgwLCBuYW1lLmxhc3RJbmRleE9mKCcgJykpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW5hbWUuaW5jbHVkZXMoJyAnKSkgcmV0dXJuIG5hbWUgKyBnZW5lcmF0aW9uYWxTdWZmaXg7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgbGFzdE5hbWUgPSBuYW1lXG4gICAgICAgICAgICAgICAgICAgIC5zbGljZShuYW1lLmxhc3RJbmRleE9mKCcgJykgKyAxKVxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvLCQvLCAnJylcbiAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoL08nLywgJ08nKTtcbiAgICAgICAgICAgICAgICBjb25zdCBvdGhlck5hbWVzID0gbmFtZS5zbGljZSgwLCBuYW1lLmxhc3RJbmRleE9mKCcgJykpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5kZWZhdWx0U29ydElucHV0LnNldFZhbHVlKGxhc3ROYW1lICsgJywgJyArIG90aGVyTmFtZXMgKyBnZW5lcmF0aW9uYWxTdWZmaXgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsZXQgbmV3TmFtZSA9IG5hbWUucmVwbGFjZUFsbCgnTXIuJywgJ01pc3RlcicpLnJlcGxhY2VBbGwoJyYnLCAnQW5kJyk7XG5cbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGxlYWRpbmdBcnRpY2xlIG9mIFsnQW4nLCAnQScsICdUaGUnXSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5ld05hbWUuc3RhcnRzV2l0aChsZWFkaW5nQXJ0aWNsZSArICcgJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld05hbWUgPSBuZXdOYW1lLnNsaWNlKGxlYWRpbmdBcnRpY2xlLmxlbmd0aCArIDEpICsgJywgJyArIGxlYWRpbmdBcnRpY2xlO1xuICAgICAgICAgICAgIC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aWVsZExheW91dCh0aGlzLnN5bmNUYWxrQ2hlY2tib3gsIHsgbGFiZWw6ICdTeW5jIHRhbGsgcGFnZScsIGFsaWduOiAnaW5saW5lJyB9KV0sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qIFNldHVwIHBhdHJvbCBjaGVja2JveCAqL1xuICAgICAgICBpZiAoYXdhaXQgdGhpcy5jaGVja1Nob3VsZFByb21wdFBhdHJvbCgpKSB7XG4gICAgICAgICAgICB0aGlzLnBhdHJvbENoZWNrYm94ID0gbmV3IE9PLnVpLkNoZWNrYm94SW5wdXRXaWRnZXQoeyBzZWxlY3RlZDogdHJ1ZSB9KTtcblxuICAgICAgICAgICAgdGhpcy5wYXRyb2xDaGVja2JveExheW91dCA9IG5ldyBPTy51aS5XaWRnZXQoe1xuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFtuZXcgT08udWkuRmllbGRMYXlvdXQodGhpcy5wYXRyb2xDaGVja2JveCwgeyBsYWJlbDogJ01hcmsgYXMgcGF0cm9sbGVkJywgYWxpZ246ICdpbmxpbmUnIH0pXSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLyogU2V0dXAgbGF5b3V0ICovXG4gICAgICAgIHRoaXMuc3VibWl0TGF5b3V0ID0gbmV3IE9PLnVpLkhvcml6b250YWxMYXlvdXQoe1xuICAgICAgICAgICAgaWQ6ICdyZWRpcmVjdC1oZWxwZXItc3VibWl0LWxheW91dCcsXG4gICAgICAgICAgICBpdGVtczogW1xuICAgICAgICAgICAgICAgIHRoaXMuc3VibWl0QnV0dG9uLFxuICAgICAgICAgICAgICAgIHRoaXMuc2hvd1ByZXZpZXdCdXR0b24sXG4gICAgICAgICAgICAgICAgdGhpcy5zaG93Q2hhbmdlc0J1dHRvbixcbiAgICAgICAgICAgICAgICB0aGlzLnN5bmNUYWxrQ2hlY2tib3hMYXlvdXQsXG4gICAgICAgICAgICAgICAgdGhpcy5wYXRyb2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4aXN0aW5nIHBhZ2UgZGF0YS5cbiAgICAgKi9cbiAgICBwcml2YXRlIGFzeW5jIGxvYWRFeGlzdGluZ0RhdGEoKSB7XG4gICAgICAgIGlmICh0aGlzLmV4aXN0cykgdGhpcy5wYWdlQ29udGVudCA9IGF3YWl0IHRoaXMuZ2V0UGFnZUNvbnRlbnQodGhpcy5wYWdlVGl0bGUpO1xuXG4gICAgICAgIHRoaXMub2xkUmVkaXJlY3RUYXJnZXQgPSB0aGlzLnJlZGlyZWN0UmVnZXguZXhlYyh0aGlzLnBhZ2VDb250ZW50KT8uWzFdO1xuXG4gICAgICAgIHRoaXMub2xkUmVkaXJlY3RUYWdzID0gKFxuICAgICAgICAgICAgT2JqZWN0LmVudHJpZXModGhpcy5yZWRpcmVjdFRlbXBsYXRlcylcbiAgICAgICAgICAgICAgICAubWFwKChbdGFnLCB0YWdEYXRhXSkgPT5cbiAgICAgICAgICAgICAgICAgICAgW3RhZywgLi4udGFnRGF0YS5hbGlhc2VzXS5zb21lKCh0YWdPclJlZGlyZWN0KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3IFJlZ0V4cChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBge3tcXFxccypbJHt0YWdPclJlZGlyZWN0WzBdLnRvTG93ZXJDYXNlKCl9JHt0YWdPclJlZGlyZWN0WzBdfV0ke3RhZ09yUmVkaXJlY3Quc2xpY2UoMSl9XFxcXHMqKFxcXFx8fH19KWAsXG4gICAgICAgICAgICAgICAgICAgICAgICApLnRlc3QodGhpcy5wYWdlQ29udGVudCksXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgID8gdGFnXG4gICAgICAgICAgICAgICAgICAgICAgICA6IG51bGwsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoQm9vbGVhbikgYXMgc3RyaW5nW11cbiAgICAgICAgKS5zb3J0KChhLCBiKSA9PiBhLnRvTG93ZXJDYXNl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AgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdUYWcgPSBPYmplY3QuZW50cmllcyh0aGlzLnJlZGlyZWN0VGVtcGxhdGVzKS5maW5kKChbdGVtcGxhdGUsIHRhZ0RhdGFdKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgW3RlbXBsYXRlLCAuLi50YWdEYXRhLmFsaWFzZXNdLmluY2x1ZGVzKHRhZyksXG4gICAgICAgICAgICAgICAgICAgICk/LlswXTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBvcmlnaW5hbEFyZ3VtZW50cyA9IG1hdGNoPy5bMV07XG4gICAgICAgICAgICAgICAgICAgIGlmICghb3JpZ2luYWxBcmd1bWVudHMpIHJldHVybiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZvcm1hdHRlZEFyZ3VtZW50cyA9IG1hdGNoWzFdLnNwbGl0KCd8JykubWFwKChhcmd1bWVudCwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYXJndW1lbnQuaW5jbHVkZXMoJz0nKSkgcmV0dXJuIFsoaW5kZXggKyAxKS50b1N0cmluZygpLCBhcmd1bWVudC50cmltKCldO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBbbmFtZSwgdmFsdWVdID0gYXJndW1lbnQuc3BsaXQoJz0nKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtuYW1lLnRyaW0oKSwgdmFsdWUudHJpbSgpXTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtuZXdUYWcsIGZvcm1hdHRlZEFyZ3VtZW50c107XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuZmlsdGVyKEJvb2xlYW4pIGFzIFtzdHJpbmcsIHN0cmluZ1tdW11dW10sXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5vbGREZWZhdWx0U29ydCA9XG4gICAgICAgICAgICB0aGlzLnBhZ2VDb250ZW50XG4gICAgICAgICAgICAgICAgLm1hdGNoKC97e0RFRkFVTFRTT1JUOi4qP319L2cpXG4gICAgICAgICAgICAgICAgPy5hdCgtMSlcbiAgICAgICAgICAgICAgICA/LnNsaWNlKDE0LCAtMilcbiAgICAgICAgICAgICAgICA/LnRyaW0oKSA/PyAnJztcblxuICAgICAgICB0aGlzLm9sZENhdGVnb3JpZXMgPSB0aGlzLnBhZ2VDb250ZW50Lm1hdGNoKC9cXFtcXFtbQ2NdYXRlZ29yeTouKz9dXS9nKT8ubWFwKChjYXRlZ29yeSkgPT4gY2F0ZWdvcnkuc2xpY2UoMTEsIC0yKSkgPz8gW107XG5cbiAgICAgICAgdGhpcy5vbGRTdHJheVRleHQgPSBbXG4gICAgICAgICAgICAve3tzaG9ydCBkZXNjcmlwdGlvblxcfC4qP319L2kuZXhlYyh0aGlzLnBhZ2VDb250ZW50KT8uWzBdLFxuICAgICAgICAgICAgL3t7RElTUExBWVRJVExFOi4qP319Ly5leGVjKHRoaXMucGFnZUNvbnRlbnQpPy5bMF0sXG4gICAgICAgICAgICAve3tpdGFsaWMgdGl0bGVcXHw/Lio/fX0vaS5leGVjKHRoaXMucGFnZUNvbnRlbnQpPy5bMF0sXG4gICAgICAgICAgICAve3t0aXRsZSBsYW5ndWFnZVxcfC4qP319Ly5leGVjKHRoaXMucGFnZUNvbnRlbnQpPy5bMF0sXG4gICAgICAgICAgICAve3thdXRob3JpdHkgY29udHJvbChcXHwuKj8pP319L2kuZXhlYyh0aGlzLnBhZ2VDb250ZW50KT8uWzBdLFxuICAgICAgICBdXG4gICAgICAgICAgICAuZmlsdGVyKEJvb2xlYW4pXG4gICAgICAgICAgICAuam9pbignXFxuJyk7XG5cbiAgICAgICAgaWYgKHRoaXMub2xkUmVkaXJlY3RUYXJnZXQpIHRoaXMucmVkaXJlY3RJbnB1dC5zZXRWYWx1ZSh0aGlzL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eXBlOiAnY2hhbmdlLXRhcmdldCcsIHRhcmdldDogZGVzdGluYXRpb25SZWRpcmVjdCB9XSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLyogTm9uZXhpc3RlbnQgc2VjdGlvbiAqL1xuICAgICAgICBpZiAoZGVzdGluYXRpb24uc3BsaXQoJyMnKS5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBjb25zdCB2YWxpZFNlY3Rpb24gPSBkZXN0aW5hdGlvblBhcnNlUmVzdWx0LnBhcnNlLnNlY3Rpb25zLmZpbmQoXG4gICAgICAgICAgICAgICAgKHNlY3Rpb24pID0+IHNlY3Rpb24ubGluZS5yZXBsYWNlQWxsKC88XFwvP2k+L2csICcnKSA9PT0gZGVzdGluYXRpb24uc3BsaXQoJyMnKVsxXSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAodmFsaWRTZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRhZ3MuaW5jbHVkZXMoJ1IgdG8gYW5jaG9yJykpXG4gICAgICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdpcyB0YWdnZWQgYXMgYSByZWRpcmVjdCB0byBhbiBhbmNob3IsIGJ1dCBpdCBpcyBhY3R1YWxseSBhIHJlZGlyZWN0IHRvIGEgc2VjdGlvbiEnLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0ZpeGVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyB0eXBlOiAnYWRkJywgdGFnOiAnUiB0byBzZWN0aW9uJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgdHlwZTogJ3JlbW92ZScsIHRhZzogJ1IgdG8gYW5jaG9yJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0YWdzLmluY2x1ZGVzKCdSIHRvIHNlY3Rpb24nKSlcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogJ2lzIGEgcmVkaXJlY3QgdG8gYSBzZWN0aW9uLCBidXQgaXQgaXMgbm90IHRhZ2dlZCB3aXRoIDxjb2RlPnt7UiB0byBzZWN0aW9ufX08L2NvZGU+IScsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdXRvRml4ZXM6IFt7IHR5cGU6ICdhZGQnLCB0YWc6ICdSIHRvIHNlY3Rpb24nIH1dLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb25Db250ZW50ID0gKFxuICAgICAgICAgICAgICAgICAgICAoYXdhaXQgdGhpcy5hcGkuZ2V0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbjogJ3F1ZXJ5JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdHZlcnNpb246ICcyJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3A6ICdyZXZpc2lvbnMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgcnZwcm9wOiAnY29udGVudCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBydnNsb3RzOiAnbWFpbicsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZXM6IHRoaXMucGFyc2VkRGVzdGluYXRpb24hLmdldFByZWZpeGVkVGV4dCgpLFxuICAgICAgICAgICAgICAgICAgICB9IHNhdGlzZmllcyBBcGlRdWVyeVJldmlzaW9uc1BhcmFtcykpIGFzIFBhZ2VSZXZpc2lvbnNSZXN1bHRcbiAgICAgICAgICAgICAgICApLnF1ZXJ5LnBhZ2VzWzBdLnJldmlzaW9uc1swXS5zbG90cy5tYWluLmNvbnRlbnQ7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBhbmNob3JzID0gW1xuICAgICAgICAgICAgICAgICAgICAuLi4oZGVzdGluYXRpb25Db250ZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAubWF0Y2goLyg/PD17e1xccyo/W0FhXSg/Om5jaG9ycz98bmNob3IgZm9yIHJlZGlyZWN0fG5rZXJ8TkNIT1J8bmMpXFxzKj9cXHwpLis/KD89fX0pL2cpXG4gICAgICAgICAgICAgICAgICAgICAgICA/Lm1hcCgoYW5jaG9yOiBzdHJpbmcpID0+IGFuY2hvci5zcGxpdCgnfCcpLm1hcCgocGFydCkgPT4gcGFydC50cmltKCkpKVxuICAgICAgICAgICAgICAgICAgICAgICAgPy5mbGF0KCkgPz8gW10pLFxuICAgICAgICAgICAgICAgICAgICAuLi4oZGVzdGluYXRpb25Db250ZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAubWF0Y2goXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLyg/PD17e1xccyo/KD86W1Z2XSg/OmlzaWJsZSBhbmNob3JzP3xpc2FuY3xBbmNofGFuY2hvcnxpc2libGVhbmNob3J8YSl8W0FhXSg/Om5jaG9yZHxjaG9yZWR8bmNob3JcXCspfFtUdF1leHQgYW5jaG9yKVxccyo/XFx8KS4rPyg/PSg/PCEhfD0pfX0pL2csXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICA/Lm1hcCgoYW5jaG9yOiBzdHJpbmcpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5jaG9yXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnfCcpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHBhcnQpID0+IHBhcnQudHJpbSgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKChwYXJ0KSA9PiAhL150ZXh0XFxzKj89Ly50ZXN0KHBhcnQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgID8uZmxhdCgpID8/IFtdKSxcbiAgICAgICAgICAgICAgICAgICAgLi4uKGRlc3RpbmF0aW9uQ29udGVudC5tYXRjaCgvKD88PWlkPSlcIj8uKz8oPz1cInw+fFxcfCkvZyk/Lm1hcCgoYW5jaG9yOiBzdHJpbmcpID0+IGFuY2hvci50cmltKCkpID8/IFtdKSxcbiAgICAgICAgICAgICAgICAgICAgLi4uKGRlc3RpbmF0aW9uQ29udGVudC5tYXRjaCgvRXBpc29kZU51bWJlciArPSArXFxkKy9nKT8ubWFwKChhbmNob3I6IHN0cmluZykgPT4gYGVwJHthbmNob3Iuc3BsaXQoJz0nKVsxXS50cmltKCl9YCkgPz9cbiAgICAgICAgICAgICAgICAgICAgICAgIFtdKSxcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIGlmIChhbmNob3JzLmluY2x1ZGVzKGRlc3RpbmF0aW9uLnNwbGl0KCcjJylbMV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWdzLmluY2x1ZGVzKCdSIHRvIHNlY3Rpb24nKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnaXMgdGFnZ2VkIGFzIGEgcmVkaXJlY3QgdG8gYSBzZWN0aW9uLCBidXQgaXQgaXMgYWN0dWFsbHkgYSByZWRpcmVjdCB0byBhbiBhbmNob3IhJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdXRvRml4ZXM6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyB0eXBlOiAnYWRkJywgdGFnOiAnUiB0byBhbmNob3InIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgdHlwZTogJ3JlbW92ZScsIHRhZzogJ1IgdG8gc2VjdGlvbicgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdGFncy5pbmNsdWRlcygnUiB0byBhbmNob3InKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnaXMgYSByZWRpcmVjdCB0byBhbiBhbmNob3IsIGJ1dCBpdCBpcyBub3QgdGFnZ2VkIHdpdGggPGNvZGU+e3tSIGZyb20gYW5jaG9yfX08L2NvZGU+IScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0ZpeGVzOiBbeyB0eXBlOiAnYWRkJywgdGFnOiAnUiB0byBhbmNob3InIH1dLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGBpcyBhIHJlZGlyZWN0IHRvIDxhIGhyZWY9XCIke213LnV0aWwuZ2V0VXJsKGRlc3RpbmF0aW9uKX1cIiB0YXJnZXQ9XCJfYmxhbmtcIj4ke2Rlc3RpbmF0aW9ufTwvYT4sIGJ1dCB0aGF0IHNlY3Rpb24gb3IgYW5jaG9yIGRvZXMgbm90IGV4aXN0IWAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdXRvRml4ZXM6IFt7IHR5cGU6ICdjaGFuZ2UtdGFyZ2V0JywgdGFyZ2V0OiBkZXN0aW5hdGlvbi5zcGxpdCgnIycpWzBdIH1dLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8qIEltcHJvcGVybHkgdGFnZ2VkIGFzIHJlZGlyZWN0IHRvIHNlY3Rpb24vYW5jaG9yICovXG4gICAgICAgIGlmIChkZXN0aW5hdGlvbi5zcGxpdCgnIycpLmxlbmd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iPiR7dGl0bGV9PC9hPmAgOiAnVGhpcyBwYWdlJ30gJHttZXNzYWdlfSBDbGljayBhZ2FpbiB3aXRob3V0IG1ha2luZyBjaGFuZ2VzIHRvIHN1Ym1pdCBhbnl3YXkuYCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGNvbnN0IHdhcm5pbmdNZXNzYWdlID0gbmV3IE9PLnVpLk1lc3NhZ2VXaWRnZXQoe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgICAgICBjbGFzc2VzOiBbJ3JlZGlyZWN0LWhlbHBlci13YXJuaW5nJ10sXG4gICAgICAgICAgICAgICAgICAgIGlubGluZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWwsXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoYXV0b0ZpeGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGF1dG9GaXhCdXR0b24gPSBuZXcgT08udWkuQnV0dG9uV2lkZ2V0KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiAnUGVyZm9ybSBhdXRvLWZpeCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnczogWydwcm9ncmVzc2l2ZSddLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NlczogWydyZWRpcmVjdC1oZWxwZXItYXV0b2ZpeC1idXR0b24nXSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGF1dG9GaXhCdXR0b24ub24oJ2NsaWNrJywgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdGFncyA9IHRoaXMudGFnU2VsZWN0LmdldFZhbHVlKCkgYXMgc3RyaW5nW107XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgYXV0b0ZpeCBvZiBhdXRvRml4ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXV0b0ZpeC50eXBlID09PSAnYWRkJyAmJiAhdGFncy5pbmNsdWRlcyhhdXRvRml4LnRhZykpIHRoaXMudGFnU2VsZWN0LmFkZFRhZyhhdXRvRml4LnRhZywgYXV0b0ZpeC50YWcpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF1dG9GaXgudHlwZSA9PT0gJ3JlbW92ZScgJiYgdGFncy5pbmNsdWRlcyhhdXRvRml4LnRhZykpIHRoaXMudGFnU2VsZWN0LnJlbW92ZVRhZ0J5RGF0YShhdXRvRml4LnRhZyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXV0b0ZpeC50eXBlID09PSAnY2hhbmdlLXRhcmdldCcpIHRoaXMucmVkaXJlY3RJbnB1dC5zZXRWYWx1ZShhdXRvRml4LnRhcmdldCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdhcm5pbmdNZXNzYWdlLiRlbGVtZW50WzBdLnN0eWxlLnRleHREZWNvcmF0aW9uID0gJ2xpbmUtdGhyb3VnaCAycHggYmxhY2snO1xuICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0ZpeEJ1dHRvbi4kZWxlbWVudFswXS5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgd2FybmluZ01lc3NhZ2UuJGVsZW1lbnRbMF0ucXVlcnlTZWxlY3RvcignLm9vLXVpLWxhYmVsRWxlbWVudC1sYWJlbCcpIS5hcHBlbmQoYXV0b0ZpeEJ1dHRvbi4kZWxlbWVudFswXSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5lZGl0b3JCb3guJGVsZW1lbnRbMF0uYXBwZW5kKHdhcm5pbmdNZXNzYWdlLiRlbGVtZW50WzBdKTtcbiAgICAgICAgICAgIH1cblxuICAgICA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ICAgICAgICAgKTtcblxuICAgICAgICAgICAgY29uc3QgbWFwcGVkQXJndW1lbnRzID0gZm91bmRBcmd1bWVudEVkaXRvci5wYXJhbWV0ZXJzXG4gICAgICAgICAgICAgICAgLm1hcCgocGFyYW1ldGVyLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IHBhcmFtZXRlci5lZGl0b3IuZ2V0VmFsdWUoKS50cmltKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdmFsdWUgJiYgaW5kZXggPiBsYXN0TnVtYmVyUGFyYW1ldGVySW5kZXgpIHJldHVybiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgfCR7cGFyYW1ldGVyLm5hbWUgPT09IChpbmRleCArIDEpLnRvU3RyaW5nKCkgPyAnJyA6IGAke3BhcmFtZXRlci5uYW1lfT1gfSR7dmFsdWV9YDtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoQm9vbGVhbilcbiAgICAgICAgICAgICAgICAuam9pbignJyk7XG5cbiAgICAgICAgICAgIHJldHVybiBge3ske3RhZ30ke21hcHBlZEFyZ3VtZW50c319fWA7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICBgI1JFRElSRUNUIFtbJHtmb3JtYXR0ZWRUaXRsZX1dXVxcbmAsXG4gICAgICAgICAgICB0YWdzLmxlbmd0aCA+IDAgPyBge3tSZWRpcmVjdCBjYXRlZ29yeSBzaGVsbHxcXG4ke3RhZ3NXaXRoQXJndW1lbnRzLmpvaW4oJ1xcbicpfVxcbn19XFxuYCA6IG51bGwsXG4gICAgICAgICAgICBzdHJheVRleHQgPyBzdHJheVRleHQgKyAnXFxuJyA6IG51bGwsXG4gICAgICAgICAgICBkZWZhdWx0U29ydCA/IGB7e0RFRkFVTFRTT1JUOiR7ZGVmYXVsdFNvcnQudHJpbSgpfX19YCA6IG51bGwsXG4gICA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ZpZXcnLCAvLyBWaWV3aW5nIHRoZSBwYWdlIChub3QgZWRpdGluZylcbiAgICAgICAgICAgICAgICBtdy5jb25maWcuZ2V0KCd3Z1JldmlzaW9uSWQnKSA9PT0gbXcuY29uZmlnLmdldCgnd2dDdXJSZXZpc2lvbklkJyksIC8vIFZpZXdpbmcgdGhlIGN1cnJlbnQgcmV2aXNpb25cbiAgICAgICAgICAgICAgICAhbXcuY29uZmlnLmdldCgnd2dEaWZmT2xkSWQnKSwgLy8gTm90IHZpZXdpbmcgYSBkaWZmXG4gICAgICAgICAgICBdO1xuXG4gICAgICAgICAgICByZXR1cm4gY29uZGl0aW9ucy5ldmVyeShCb29sZWFuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBGZXRjaGVzIHRoZSByZWRpcmVjdCB0ZW1wbGF0ZXMuXG4gICAgICAgICAqL1xuICAgICAgICBwcml2YXRlIGFzeW5jIGZldGNoUmVkaXJlY3RUZW1wbGF0ZXMoKSB7XG4gICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShcbiAgICAgICAgICAgICAgICAoXG4gICAgICAgICAgICAgICAgICAgIChhd2FpdCB0aGlzLmFwaS5nZXQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiAncXVlcnknLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0dmVyc2lvbjogJzInLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcDogJ3JldmlzaW9ucycsXG4gICAgICAgICAgICAgICAgICAgICAgICBydnByb3A6ICdjb250ZW50JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJ2c2xvdHM6ICdtYWluJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlczogJ1VzZXI6RWVqaXQ0My9zY3JpcHRzL3JlZGlyZWN0LWhlbHBlci5qc29uJyxcbiAgICAgICAgICAgICAgICAgICAgfSBzYXRpc2ZpZXMgQXBpUXVlcnlSZXZpc2lvbnNQ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AgaWYgKHBhZ2VJbmZvLnF1ZXJ5LnBhZ2VzWzBdLm1pc3NpbmcpIHtcbiAgICAgICAgICAgICAgICBtdy51dGlsLmFkZENTUyhgXG4jY3JlYXRlLXJlZGlyZWN0LWJ1dHRvbiB7XG4gICAgbWFyZ2luLWJvdHRvbTogMjBweDtcbn1gKTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGJ1dHRvbiA9IG5ldyBPTy51aS5CdXR0b25XaWRnZXQoe1xuICAgICAgICAgICAgICAgICAgICBpZDogJ2NyZWF0ZS1yZWRpcmVjdC1idXR0b24nLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbDogJ0NyZWF0ZSByZWRpcmVjdCcsXG4gICAgICAgICAgICAgICAgICAgIGljb246ICdhcnRpY2xlUmVkaXJlY3QnLFxuICAgICAgICAgICAgICAgICAgICBmbGFnczogWydwcm9ncmVzc2l2ZSddLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJ1dHRvbi5vbignY2xpY2snLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbi4kZWxlbWVudFswXS5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgbmV3IFJlZGlyZWN0SGVscGVyRGlhbG9nKGRpYWxvZ0luZm8sIGZhbHNlKS5sb2FkKCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnRUZXh0LnByZXBlbmQoYnV0dG9uLiRlbGVtZW50WzBdKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocGFnZUluZm8ucXVlcnkucGFnZXNbMF0ucmVkaXJlY3QpIG5ldyBSZWRpcmVjdEhlbHBlckRpYWxvZyhkaWFsb2dJbmZvLCB0cnVlKS5sb2FkKCk7XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwb3J0bGV0TGluayA9IG13LnV0aWwuYWRkUG9ydGxldExpbmsoXG4gICAgICAgICAgICAgICAgICAgIG13LmNvbmZpZy5nZXQoJ3NraW4nKSA9PT0gJ21pbmVydmEnID8gJ3AtdGInIDogJ3AtY2FjdGlvbnMnLFxuICAgICAgICAgICAgICAgICAgICAnIycsXG4gICAgICAgICAgICAgICAgICAgICdSZWRpcmVjdCBwYWdlJyxcbiAgICAgICAgICAgICAgICAgICAgJ3JlZGlyZWN0LWhlbHBlcicsXG4gICAgICAgICAgICAgICAgKSE7XG4gICAgICAgICAgICAgICAgcG9ydGxldExpbmsuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgICAgICAgICBuZXcgUmVkaXJlY3RIZWxwZXJEaWFsb2coZGlhbG9nSW5mbywgZmFsc2UpLmxvYWQoKTtcblxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cuc2Nyb2xsVG8oeyB0b3A6IDAsIGJlaGF2aW9yOiAnc21vb3RoJyB9KTtcblxuICAgICAgICAgICAgICAgICAgICBwb3J0bGV0TGluay5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5ldyBSZWRpcmVjdEhlbHBlcigpLnJ1bigpO1xufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiOzs7Z0pBQUEsSUFNcUJBLEVBTnJCQyxFQUFBQyxFQUFBLGtCQU1xQkYsRUFBckIsY0FBaUQsR0FBRyxHQUFHLGVBQWdCLENBRTNELElBQU0sSUFBSSxHQUFHLElBRXJCLFlBQVlHLEVBQTZCLENBQ3JDLE1BQU1BLENBQU0sRUFFWixHQUFHLEdBQUcsTUFBTSxjQUFjLEtBQUssS0FBOENBLENBQU0sQ0FDdkYsQ0FFQSxpQkFBbUIsSUFBTSxDQUNyQixJQUFNQyxFQUFRLEtBQUssU0FBUyxFQUN0QkMsR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