_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

MediaWiki:Gadget-XFDcloser-core.js

In today's world, MediaWiki:Gadget-XFDcloser-core.js continues to be a topic of interest and debate. Over time, it has become a fundamental element in society and has impacted various aspects of daily life. Whether on a personal, political, scientific or cultural level, MediaWiki:Gadget-XFDcloser-core.js has left a significant mark on history and continues to generate controversies and conflicting opinions. In this article, we will closely study the influence of MediaWiki:Gadget-XFDcloser-core.js in different contexts, as well as the advances and challenges it represents for the future.
/*  _______________________________________________________________________________
 * |                                                                               |
 * |                     === WARNING: GLOBAL GADGET FILE ===                       |
 * |                   Changes to this page affect many users.                     |
 * |  Please discuss changes on the talk page or on ] before editing.  |
 * |_______________________________________________________________________________|
 * 
 * Built from source code at GitHub repository 
 * All changes should be made in the repository, otherwise they will be lost.
 * 
 * To update this script from github, you must have a local repository set up. Then
 * follow the instructions at 
 * 
 * XFDcloser: close deletion discussions at XfD venues, including actions to implement closes; see ]
 * Author: Evad37
 * Licencing and attribution: ]
 */
/* jshint esversion: 5, esnext:false, laxbreak: true, undef: true, eqnull: true, maxerr: 3000 */
/* globals console, document, window, $, mw, OO */
/* <nowiki> */
!function r(e,n,t){function o(i,f){if(!n){if(!e){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n={exports:{}};e.call(p.exports,function(r){return o(e||r)},p,p.exports,r,e,n,t)}return n.exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t);return o}({1:,2:,3:,4:&&definePropertyModule.f(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create(null)}),module.exports=function(key){ArrayPrototype=!0}},{"../internals/object-create":61,"../internals/object-define-property":63,"../internals/well-known-symbol":102}],5:,6:,7:.forEach:function(callbackfn,argument_1){return $forEach(this,callbackfn,1<arguments.length?argument_1:void 0)}},{"../internals/array-iteration":9,"../internals/array-method-is-strict":12,"../internals/array-method-uses-to-length":13}],8:)!=value)return!0}else for(;index<length;index++)if((IS_INCLUDES||index in O)&&O===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}}var toIndexedObject=require("../internals/to-indexed-object"),toLength=require("../internals/to-length"),toAbsoluteIndex=require("../internals/to-absolute-index");module.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},{"../internals/to-absolute-index":93,"../internals/to-indexed-object":94,"../internals/to-length":96}],9:,index,O),TYPE))if(IS_MAP)target=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push.call(target,value)}else switch(TYPE){case 4:return!1;case 7:push.call(target,value)}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}}var bind=require("../internals/function-bind-context"),IndexedObject=require("../internals/indexed-object"),toObject=require("../internals/to-object"),toLength=require("../internals/to-length"),arraySpeciesCreate=require("../internals/array-species-create"),push=.push;module.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterOut:createMethod(7)}},{"../internals/array-species-create":15,"../internals/function-bind-context":37,"../internals/indexed-object":46,"../internals/to-length":96,"../internals/to-object":97}],10:.lastIndexOf,NEGATIVE_ZERO=!!nativeLastIndexOf&&1/.lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("lastIndexOf"),USES_TO_LENGTH=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0}),FORCED=NEGATIVE_ZERO||!STRICT_METHOD||!USES_TO_LENGTH;module.exports=FORCED?function(searchElement,argument_1){if(NEGATIVE_ZERO)return nativeLastIndexOf.apply(this,arguments)||0;var O=toIndexedObject(this),length=toLength(O.length),index=length-1;for(1<arguments.length&&(index=min(index,toInteger(argument_1))),index<0&&(index=length+index);0<=index;index--)if(index in O&&O===searchElement)return index||0;return-1}:nativeLastIndexOf},{"../internals/array-method-is-strict":12,"../internals/array-method-uses-to-length":13,"../internals/to-indexed-object":94,"../internals/to-integer":95,"../internals/to-length":96}],11:;return(array.constructor={})=function(){return{foo:1}},1!==array(Boolean).foo})}},{"../internals/engine-v8-version":31,"../internals/fails":34,"../internals/well-known-symbol":102}],12:;return!!method&&fails(function(){method.call(null,argument||function(){throw 1},1)})}},{"../internals/fails":34}],13:;var method=,ACCESSORS=!!has(options=options||{},"ACCESSORS")&&options.ACCESSORS,argument0=has(options,0)?options:thrower,argument1=has(options,1)?options:void 0;return cache=!!method&&!fails(function(){if(ACCESSORS&&!DESCRIPTORS)return!0;var O={length:-1};ACCESSORS?defineProperty(O,1,{enumerable:!0,get:thrower}):O=1,method.call(O,argument0,argument1)})}},{"../internals/descriptors":26,"../internals/fails":34,"../internals/has":42}],14:,index+=i;break}if(index+=i,IS_RIGHT?index<0:length<=index)throw TypeError("Reduce of empty array with no initial value")}for(;IS_RIGHT?0<=index:index<length;index+=i)index in self&&(memo=callbackfn(memo,self,index,O));return memo}}var aFunction=require("../internals/a-function"),toObject=require("../internals/to-object"),IndexedObject=require("../internals/indexed-object"),toLength=require("../internals/to-length");module.exports={left:createMethod(!1),right:createMethod(!0)}},{"../internals/a-function":2,"../internals/indexed-object":46,"../internals/to-length":96,"../internals/to-object":97}],15:))&&(C=void 0),new(void 0===C?Array:C)(0===length?0:length)}},{"../internals/is-array":50,"../internals/is-object":52,"../internals/well-known-symbol":102}],16:,17:}catch(error){}}(O=Object(it),TO_STRING_TAG))?tag:CORRECT_ARGUMENTS?classofRaw(O):"Object"==(result=classofRaw(O))&&"function"==typeof O.callee?"Arguments":result}},{"../internals/classof-raw":16,"../internals/to-string-tag-support":99,"../internals/well-known-symbol":102}],18:;has(target,key)||defineProperty(target,key,getOwnPropertyDescriptor(source,key))}}},{"../internals/has":42,"../internals/object-define-property":63,"../internals/object-get-own-property-descriptor":64,"../internals/own-keys":74}],19:(regexp)}catch(error1){try{return regexp=!1,"/./"(regexp)}catch(error2){}}return!1}},{"../internals/well-known-symbol":102}],20:,21:=returnThis,IteratorConstructor}},{"../internals/create-property-descriptor":23,"../internals/iterators":56,"../internals/iterators-core":55,"../internals/object-create":61,"../internals/set-to-string-tag":85}],22:=value,object}},{"../internals/create-property-descriptor":23,"../internals/descriptors":26,"../internals/object-define-property":63}],23:,24:=value}},{"../internals/create-property-descriptor":23,"../internals/object-define-property":63,"../internals/to-primitive":98}],25:;switch(KIND){case"keys":case"values":case"entries":return function(){return new IteratorConstructor(this,KIND)}}return function(){return new IteratorConstructor(this)}}var CurrentIteratorPrototype,methods,KEY,TO_STRING_TAG=NAME+" Iterator",INCORRECT_VALUES_NAME=!1,IterablePrototype=Iterable.prototype,nativeIterator=IterablePrototype||IterablePrototype||DEFAULT&&IterablePrototype,defaultIterator=!BUGGY_SAFARI_ITERATORS&&nativeIterator||getIterationMethod(DEFAULT),anyNativeIterator="Array"==NAME&&IterablePrototype.entries||nativeIterator;if(anyNativeIterator&&(CurrentIteratorPrototype=getPrototypeOf(anyNativeIterator.call(new Iterable)),IteratorPrototype!==Object.prototype&&CurrentIteratorPrototype.next&&(IS_PURE||getPrototypeOf(CurrentIteratorPrototype)===IteratorPrototype||(setPrototypeOf?setPrototypeOf(CurrentIteratorPrototype,IteratorPrototype):"function"!=typeof CurrentIteratorPrototype&&createNonEnumerableProperty(CurrentIteratorPrototype,ITERATOR,returnThis)),setToStringTag(CurrentIteratorPrototype,TO_STRING_TAG,!0,!0),IS_PURE&&(Iterators=returnThis))),"values"==DEFAULT&&nativeIterator&&"values"!==nativeIterator.name&&(INCORRECT_VALUES_NAME=!0,defaultIterator=function(){return nativeIterator.call(this)}),IS_PURE&&!FORCED||IterablePrototype===defaultIterator||createNonEnumerableProperty(IterablePrototype,ITERATOR,defaultIterator),Iterators=defaultIterator,DEFAULT)if(methods={values:getIterationMethod("values"),keys:IS_SET?defaultIterator:getIterationMethod("keys"),entries:getIterationMethod("entries")},FORCED)for(KEY in methods)!BUGGY_SAFARI_ITERATORS&&!INCORRECT_VALUES_NAME&&KEY in IterablePrototype||redefine(IterablePrototype,KEY,methods);else $({target:NAME,proto:!0,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods);return methods}},{"../internals/create-iterator-constructor":21,"../internals/create-non-enumerable-property":22,"../internals/export":33,"../internals/is-pure":53,"../internals/iterators":56,"../internals/iterators-core":55,"../internals/object-get-prototype-of":67,"../internals/object-set-prototype-of":71,"../internals/redefine":76,"../internals/set-to-string-tag":85,"../internals/well-known-symbol":102}],26:})},{"../internals/fails":34}],27:,28:,29:,30:,31:+match:userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match)&&(match=userAgent.match(/Chrome\/(\d+)/))&&(version=match),module.exports=version&&+version},{"../internals/engine-user-agent":30,"../internals/global":41}],32:},{}],33:||setGlobal(TARGET,{}):(global||{}).prototype)for(key in source){if(sourceProperty=source,targetProperty=options.noTargetGet?(descriptor=getOwnPropertyDescriptor(target,key))&&descriptor.value:target,!isForced(GLOBAL?key:TARGET+(STATIC?".":"#")+key,options.forced)&&void 0!==targetProperty){if(typeof sourceProperty==typeof targetProperty)continue;copyConstructorProperties(sourceProperty,targetProperty)}(options.sham||targetProperty&&targetProperty.sham)&&createNonEnumerableProperty(sourceProperty,"sham",!0),redefine(target,key,sourceProperty,options)}}},{"../internals/copy-constructor-properties":18,"../internals/create-non-enumerable-property":22,"../internals/global":41,"../internals/is-forced":51,"../internals/object-get-own-property-descriptor":64,"../internals/redefine":76,"../internals/set-global":83}],34:,35:;return result.groups={a:"7"},result},"7"!=="".replace(re,"$<a>")}),REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REPLACE=wellKnownSymbol("replace"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./&&""===/./("a","$0"),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails(function(){var re=/(?:)/,originalExec=re.exec;re.exec=function(){return originalExec.apply(this,arguments)};var result="ab".split(re);return 2!==result.length||"a"!==result||"b"!==result});module.exports=function(KEY,length,exec,sham){var SYMBOL=wellKnownSymbol(KEY),DELEGATES_TO_SYMBOL=!fails(function(){var O={};return O=function(){return 7},7!=""(O)}),DELEGATES_TO_EXEC=DELEGATES_TO_SYMBOL&&!fails(function(){var execCalled=!1,re=/a/;return"split"===KEY&&((re={constructor:{}}).constructor=function(){return re},re.flags="",re=/./),re.exec=function(){return execCalled=!0,null},re(""),!execCalled});if(!DELEGATES_TO_SYMBOL||!DELEGATES_TO_EXEC||"replace"===KEY&&(!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE)||"split"===KEY&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var nativeRegExpMethod=/./,methods=exec(SYMBOL,"",function(nativeMethod,regexp,str,arg2,forceStringMethod){return regexp.exec===regexpExec?DELEGATES_TO_SYMBOL&&!forceStringMethod?{done:!0,value:nativeRegExpMethod.call(regexp,str,arg2)}:{done:!0,value:nativeMethod.call(str,regexp,arg2)}:{done:!1}},{REPLACE_KEEPS_$0:REPLACE_KEEPS_$0,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE}),stringMethod=methods,regexMethod=methods;redefine(String.prototype,KEY,stringMethod),redefine(RegExp.prototype,SYMBOL,2==length?function(string,arg){return regexMethod.call(string,this,arg)}:function(string){return regexMethod.call(string,this)})}sham&&createNonEnumerableProperty(RegExp.prototype,"sham",!0)}},{"../internals/create-non-enumerable-property":22,"../internals/fails":34,"../internals/redefine":76,"../internals/regexp-exec":78,"../internals/well-known-symbol":102,"../modules/es.regexp.exec":132}],36:,sourceIndex,original):source,0<depth&&isArray(element))targetIndex=flattenIntoArray(target,original,element,toLength(element.length),targetIndex,depth-1)-1;else{if(9007199254740991<=targetIndex)throw TypeError("Exceed the acceptable array length");target=element}targetIndex++}sourceIndex++}return targetIndex};module.exports=flattenIntoArray},{"../internals/function-bind-context":37,"../internals/is-array":50,"../internals/to-length":96}],37:,38:.slice,factories={};module.exports=Function.bind||function(that){var fn=aFunction(this),partArgs=slice.call(arguments,1),boundFunction=function(){var args=partArgs.concat(slice.call(arguments));return this instanceof boundFunction?function(C,argsLength,args){if(!(argsLength in factories)){for(var list=,i=0;i<argsLength;i++)list="a";factories=Function("C,a","return new C("+list.join(",")+")")}return factories(C,args)}(fn,args.length,args):fn.apply(that,args)};return isObject(fn.prototype)&&(boundFunction.prototype=fn.prototype),boundFunction}},{"../internals/a-function":2,"../internals/is-object":52}],39:)||aFunction(global):path&&path||global&&global}},{"../internals/global":41,"../internals/path":75}],40:|\d\d?|<*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$(|\d\d?)/g;module.exports=function(matched,str,position,captures,namedCaptures,replacement){var tailPos=position+matched.length,m=captures.length,symbols=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==namedCaptures&&(namedCaptures=toObject(namedCaptures),symbols=SUBSTITUTION_SYMBOLS),replace.call(replacement,symbols,function(match,ch){var capture;switch(ch.charAt(0)){case"$":return"$";case"&":return matched;case"`":return str.slice(0,position);case"'":return str.slice(tailPos);case"<":capture=namedCaptures;break;default:var n=+ch;if(0==n)return match;if(m<n){var f=floor(n/10);return 0===f?match:f<=m?void 0===captures?ch.charAt(1):captures+ch.charAt(1):match}capture=captures}return void 0===capture?"":capture})}},{"../internals/to-object":97}],41:,42:,43:,44:,45:,46:,47:,48:,49:=!0,set=function(it,metadata){return metadata.facade=it,createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return objectHas(it,STATE)?it:{}},has=function(it){return objectHas(it,STATE)}}module.exports={set:set,get:get,has:has,enforce:function(it){return has(it)?get(it):set(it,{})},getterFor:function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw TypeError("Incompatible receiver, "+TYPE+" required");return state}}}},{"../internals/create-non-enumerable-property":22,"../internals/global":41,"../internals/has":42,"../internals/hidden-keys":43,"../internals/is-object":52,"../internals/native-weak-map":58,"../internals/shared-key":86,"../internals/shared-store":87}],50:,51:;return value==POLYFILL||value!=NATIVE&&("function"==typeof detection?fails(detection):!!detection)}var fails=require("../internals/fails"),replacement=/#|\.prototype\./,normalize=isForced.normalize=function(string){return String(string).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P";module.exports=isForced},{"../internals/fails":34}],52:,53:,54:)?!!isRegExp:"RegExp"==classof(it))}},{"../internals/classof-raw":16,"../internals/is-object":52,"../internals/well-known-symbol":102}],55:.keys&&("next"in(arrayIterator=.keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf(getPrototypeOf(arrayIterator)))!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS=!0);var NEW_ITERATOR_PROTOTYPE=null==IteratorPrototype||fails(function(){var test={};return IteratorPrototype.call(test)!==test});NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype={}),IS_PURE&&!NEW_ITERATOR_PROTOTYPE||has(IteratorPrototype,ITERATOR)||createNonEnumerableProperty(IteratorPrototype,ITERATOR,function(){return this}),module.exports={IteratorPrototype:IteratorPrototype,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS}},{"../internals/create-non-enumerable-property":22,"../internals/fails":34,"../internals/has":42,"../internals/is-pure":53,"../internals/object-get-prototype-of":67,"../internals/well-known-symbol":102}],56:.apply(exports,arguments)},{dup:43}],57:,58:,59:,60:?0/,FORCED=8!==$parseInt(whitespaces+"08")||22!==$parseInt(whitespaces+"0x16");module.exports=FORCED?function(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10))}:$parseInt},{"../internals/global":41,"../internals/string-trim":92,"../internals/whitespaces":103}],61:];return NullProtoObject()};hiddenKeys=!0,module.exports=Object.create||function(O,Properties){var result;return null!==O?(EmptyConstructor.prototype=anObject(O),result=new EmptyConstructor,EmptyConstructor.prototype=null,result=O):result=NullProtoObject(),void 0===Properties?result:defineProperties(result,Properties)}},{"../internals/an-object":6,"../internals/document-create-element":27,"../internals/enum-bug-keys":32,"../internals/hidden-keys":43,"../internals/html":44,"../internals/object-define-properties":62,"../internals/shared-key":86}],62:,Properties);return O}},{"../internals/an-object":6,"../internals/descriptors":26,"../internals/object-define-property":63,"../internals/object-keys":69}],63:=Attributes.value),O}},{"../internals/an-object":6,"../internals/descriptors":26,"../internals/ie8-dom-define":45,"../internals/to-primitive":98}],64:)}},{"../internals/create-property-descriptor":23,"../internals/descriptors":26,"../internals/has":42,"../internals/ie8-dom-define":45,"../internals/object-property-is-enumerable":70,"../internals/to-indexed-object":94,"../internals/to-primitive":98}],65:,66:,67::"function"==typeof O.constructor&&O instanceof O.constructor?O.constructor.prototype:O instanceof Object?ObjectPrototype:null}},{"../internals/correct-prototype-getter":20,"../internals/has":42,"../internals/shared-key":86,"../internals/to-object":97}],68:;for(key in O)!has(hiddenKeys,key)&&has(O,key)&&result.push(key);for(;names.length>i;)has(O,key=names)&&(~indexOf(result,key)||result.push(key));return result}},{"../internals/array-includes":8,"../internals/has":42,"../internals/hidden-keys":43,"../internals/to-indexed-object":94}],69:,70:,71:),CORRECT_SETTER=test instanceof Array}catch(error){}return function(O,proto){return anObject(O),aPossiblePrototype(proto),CORRECT_SETTER?setter.call(O,proto):O.__proto__=proto,O}}():void 0)},{"../internals/a-possible-prototype":3,"../internals/an-object":6}],72:;i<length;)key=keys,DESCRIPTORS&&!propertyIsEnumerable.call(O,key)||result.push(TO_ENTRIES?]:O);return result}}var DESCRIPTORS=require("../internals/descriptors"),objectKeys=require("../internals/object-keys"),toIndexedObject=require("../internals/to-indexed-object"),propertyIsEnumerable=require("../internals/object-property-is-enumerable").f;module.exports={entries:createMethod(!0),values:createMethod(!1)}},{"../internals/descriptors":26,"../internals/object-keys":69,"../internals/object-property-is-enumerable":70,"../internals/to-indexed-object":94}],73:"}},{"../internals/classof":17,"../internals/to-string-tag-support":99}],74:,75:,76:&&(simple=!0):delete O,simple?O=value:createNonEnumerableProperty(O,key,value)):simple?O=value:setGlobal(key,value)})(Function.prototype,"toString",function(){return"function"==typeof this&&getInternalState(this).source||inspectSource(this)})},{"../internals/create-non-enumerable-property":22,"../internals/global":41,"../internals/has":42,"../internals/inspect-source":48,"../internals/internal-state":49,"../internals/set-global":83}],77:,78:;(UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y)&&(patchedExec=function(str){var lastIndex,reCopy,match,i,re=this,sticky=UNSUPPORTED_Y&&re.sticky,flags=regexpFlags.call(re),source=re.source,charsAdded=0,strCopy=str;return sticky&&(-1===(flags=flags.replace("y","")).indexOf("g")&&(flags+="g"),strCopy=String(str).slice(re.lastIndex),0<re.lastIndex&&(!re.multiline||re.multiline&&"\n"!==str)&&(source="(?: "+source+")",strCopy=" "+strCopy,charsAdded++),reCopy=new RegExp("^(?:"+source+")",flags)),NPCG_INCLUDED&&(reCopy=new RegExp("^"+source+"$(?!\\s)",flags)),UPDATES_LAST_INDEX_WRONG&&(lastIndex=re.lastIndex),match=nativeExec.call(sticky?reCopy:re,strCopy),sticky?match?(match.input=match.input.slice(charsAdded),match=match.slice(charsAdded),match.index=re.lastIndex,re.lastIndex+=match.length):re.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&match&&(re.lastIndex=re.global?match.index+match.length:lastIndex),NPCG_INCLUDED&&match&&1<match.length&&nativeReplace.call(match,reCopy,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments&&(match=void 0)}),match}),module.exports=patchedExec},{"./regexp-flags":79,"./regexp-sticky-helpers":80}],79:,80:,81:,82:,83:=value}return value}},{"../internals/create-non-enumerable-property":22,"../internals/global":41}],84:&&defineProperty(Constructor,SPECIES,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":26,"../internals/get-built-in":39,"../internals/object-define-property":63,"../internals/well-known-symbol":102}],85:,86:||(keys=uid(key))}},{"../internals/shared":88,"../internals/uid":100}],87:||setGlobal("__core-js_shared__",{});module.exports=store},{"../internals/global":41,"../internals/set-global":83}],88:||(store=void 0!==value?value:{})})("versions",).push({version:"3.8.3",mode:IS_PURE?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":53,"../internals/shared-store":87}],89:)?defaultConstructor:aFunction(S)}},{"../internals/a-function":2,"../internals/an-object":6,"../internals/well-known-symbol":102}],90:,91:()||"\u200b\x85\u180e"!="\u200b\x85\u180e"()||whitespaces.name!==METHOD_NAME})}},{"../internals/fails":34,"../internals/whitespaces":103}],92:",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$");module.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},{"../internals/require-object-coercible":81,"../internals/whitespaces":103}],93:,94:,95:,96:,97:,98:,99:="z",module.exports=""===String(test)},{"../internals/well-known-symbol":102}],100:,101:,102:=Symbol:WellKnownSymbolsStore=createWellKnownSymbol("Symbol."+name)),WellKnownSymbolsStore}},{"../internals/global":41,"../internals/has":42,"../internals/native-symbol":57,"../internals/shared":88,"../internals/uid":100,"../internals/use-symbol-as-uid":101}],103:,104:;return void 0!==spreadable?!!spreadable:isArray(O)}}var $=require("../internals/export"),fails=require("../internals/fails"),isArray=require("../internals/is-array"),isObject=require("../internals/is-object"),toObject=require("../internals/to-object"),toLength=require("../internals/to-length"),createProperty=require("../internals/create-property"),arraySpeciesCreate=require("../internals/array-species-create"),arrayMethodHasSpeciesSupport=require("../internals/array-method-has-species-support"),wellKnownSymbol=require("../internals/well-known-symbol"),V8_VERSION=require("../internals/engine-v8-version"),IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=51<=V8_VERSION||!fails(function(){var array=;return array=!1,array.concat()!==array}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat");$({target:"Array",proto:!0,forced:!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT},{concat:function(arg){var i,k,length,len,E,O=toObject(this),A=arraySpeciesCreate(O,0),n=0;for(i=-1,length=arguments.length;i<length;i++)if(isConcatSpreadable(E=-1===i?O:arguments)){if(9007199254740991<n+(len=toLength(E.length)))throw TypeError("Maximum allowed index exceeded");for(k=0;k<len;k++,n++)k in E&&createProperty(A,n,E)}else{if(9007199254740991<=n)throw TypeError("Maximum allowed index exceeded");createProperty(A,n++,E)}return A.length=n,A}})},{"../internals/array-method-has-species-support":11,"../internals/array-species-create":15,"../internals/create-property":24,"../internals/engine-v8-version":31,"../internals/export":33,"../internals/fails":34,"../internals/is-array":50,"../internals/is-object":52,"../internals/to-length":96,"../internals/to-object":97,"../internals/well-known-symbol":102}],105:,106:,107:&&Array(1).findIndex(function(){SKIPS_HOLES=!1}),$({target:"Array",proto:!0,forced:SKIPS_HOLES||!USES_TO_LENGTH},{findIndex:function(callbackfn,argument_1){return $findIndex(this,callbackfn,1<arguments.length?argument_1:void 0)}}),addToUnscopables("findIndex")},{"../internals/add-to-unscopables":4,"../internals/array-iteration":9,"../internals/array-method-uses-to-length":13,"../internals/export":33}],108:&&Array(1).find(function(){SKIPS_HOLES=!1}),$({target:"Array",proto:!0,forced:SKIPS_HOLES||!USES_TO_LENGTH},{find:function(callbackfn,argument_1){return $find(this,callbackfn,1<arguments.length?argument_1:void 0)}}),addToUnscopables("find")},{"../internals/add-to-unscopables":4,"../internals/array-iteration":9,"../internals/array-method-uses-to-length":13,"../internals/export":33}],109:,110:.forEach!=forEach},{forEach:forEach})},{"../internals/array-for-each":7,"../internals/export":33}],111:,112:.indexOf,NEGATIVE_ZERO=!!nativeIndexOf&&1/.indexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("indexOf"),USES_TO_LENGTH=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});$({target:"Array",proto:!0,forced:NEGATIVE_ZERO||!STRICT_METHOD||!USES_TO_LENGTH},{indexOf:function(searchElement,argument_1){return NEGATIVE_ZERO?nativeIndexOf.apply(this,arguments)||0:$indexOf(this,searchElement,1<arguments.length?argument_1:void 0)}})},{"../internals/array-includes":8,"../internals/array-method-is-strict":12,"../internals/array-method-uses-to-length":13,"../internals/export":33}],113:,done:!1}:{value:],done:!1}},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries")},{"../internals/add-to-unscopables":4,"../internals/define-iterator":25,"../internals/internal-state":49,"../internals/iterators":56,"../internals/to-indexed-object":94}],114:.join,ES3_STRINGS=IndexedObject!=Object,STRICT_METHOD=arrayMethodIsStrict("join",",");$({target:"Array",proto:!0,forced:ES3_STRINGS||!STRICT_METHOD},{join:function(separator){return nativeJoin.call(toIndexedObject(this),void 0===separator?",":separator)}})},{"../internals/array-method-is-strict":12,"../internals/export":33,"../internals/indexed-object":46,"../internals/to-indexed-object":94}],115:.lastIndexOf},{lastIndexOf:lastIndexOf})},{"../internals/array-last-index-of":10,"../internals/export":33}],116:,117:,118:.reverse,test=;$({target:"Array",proto:!0,forced:String(test)===String(test.reverse())},{reverse:function(){return isArray(this)&&(this.length=this.length),nativeReverse.call(this)}})},{"../internals/export":33,"../internals/is-array":50}],119:.slice,max=Math.max;$({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT||!USES_TO_LENGTH},{slice:function(start,end){var Constructor,result,n,O=toIndexedObject(this),length=toLength(O.length),k=toAbsoluteIndex(start,length),fin=toAbsoluteIndex(void 0===end?length:end,length);if(isArray(O)&&(("function"==typeof(Constructor=O.constructor)&&(Constructor===Array||isArray(Constructor.prototype))||isObject(Constructor)&&null===(Constructor=Constructor))&&(Constructor=void 0),Constructor===Array||void 0===Constructor))return nativeSlice.call(O,k,fin);for(result=new(void 0===Constructor?Array:Constructor)(max(fin-k,0)),n=0;k<fin;k++,n++)k in O&&createProperty(result,n,O);return result.length=n,result}})},{"../internals/array-method-has-species-support":11,"../internals/array-method-uses-to-length":13,"../internals/create-property":24,"../internals/export":33,"../internals/is-array":50,"../internals/is-object":52,"../internals/to-absolute-index":93,"../internals/to-indexed-object":94,"../internals/to-length":96,"../internals/well-known-symbol":102}],120:,121:,122:,123:*)/;!DESCRIPTORS||"name"in FunctionPrototype||defineProperty(FunctionPrototype,"name",{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)}catch(error){return""}}})},{"../internals/descriptors":26,"../internals/object-define-property":63}],124:)&&!has(NumberWrapper,key)&&defineProperty(NumberWrapper,key,getOwnPropertyDescriptor(NativeNumber,key));redefine(global,"Number",(NumberWrapper.prototype=NumberPrototype).constructor=NumberWrapper)}},{"../internals/classof-raw":16,"../internals/descriptors":26,"../internals/fails":34,"../internals/global":41,"../internals/has":42,"../internals/inherit-if-required":47,"../internals/is-forced":51,"../internals/object-create":61,"../internals/object-define-property":63,"../internals/object-get-own-property-descriptor":64,"../internals/object-get-own-property-names":65,"../internals/redefine":76,"../internals/string-trim":92,"../internals/to-primitive":98}],125:,126:,127:,128:,129:,130:,131:=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")}))){function proxy(key){key in RegExpWrapper||defineProperty(RegExpWrapper,key,{configurable:!0,get:function(){return NativeRegExp},set:function(it){NativeRegExp=it}})}for(var RegExpWrapper=function(pattern,flags){var sticky,thisIsRegExp=this instanceof RegExpWrapper,patternIsRegExp=isRegExp(pattern),flagsAreUndefined=void 0===flags;if(!thisIsRegExp&&patternIsRegExp&&pattern.constructor===RegExpWrapper&&flagsAreUndefined)return pattern;CORRECT_NEW?patternIsRegExp&&!flagsAreUndefined&&(pattern=pattern.source):pattern instanceof RegExpWrapper&&(flagsAreUndefined&&(flags=getFlags.call(pattern)),pattern=pattern.source),UNSUPPORTED_Y&&(sticky=!!flags&&-1<flags.indexOf("y"))&&(flags=flags.replace(/y/g,""));var result=inheritIfRequired(CORRECT_NEW?new NativeRegExp(pattern,flags):NativeRegExp(pattern,flags),thisIsRegExp?this:RegExpPrototype,RegExpWrapper);return UNSUPPORTED_Y&&sticky&&setInternalState(result,{sticky:sticky}),result},keys=getOwnPropertyNames(NativeRegExp),index=0;keys.length>index;)proxy(keys);(RegExpPrototype.constructor=RegExpWrapper).prototype=RegExpPrototype,redefine(global,"RegExp",RegExpWrapper)}setSpecies("RegExp")},{"../internals/descriptors":26,"../internals/fails":34,"../internals/global":41,"../internals/inherit-if-required":47,"../internals/internal-state":49,"../internals/is-forced":51,"../internals/is-regexp":54,"../internals/object-define-property":63,"../internals/object-get-own-property-names":65,"../internals/redefine":76,"../internals/regexp-flags":79,"../internals/regexp-sticky-helpers":80,"../internals/set-species":84,"../internals/well-known-symbol":102}],132:,133:,134:,135:;return void 0!==matcher?matcher.call(regexp,O):new RegExp(regexp)(String(O))},function(regexp){var res=maybeCallNative(nativeMatch,regexp,this);if(res.done)return res.value;var rx=anObject(regexp),S=String(this);if(!rx.global)return regExpExec(rx,S);for(var result,fullUnicode=rx.unicode,A=,n=rx.lastIndex=0;null!==(result=regExpExec(rx,S));){var matchStr=String(result);""===(A=matchStr)&&(rx.lastIndex=advanceStringIndex(S,toLength(rx.lastIndex),fullUnicode)),n++}return 0===n?null:A}]})},{"../internals/advance-string-index":5,"../internals/an-object":6,"../internals/fix-regexp-well-known-symbol-logic":35,"../internals/regexp-exec-abstract":77,"../internals/require-object-coercible":81,"../internals/to-length":96}],136:;return void 0!==replacer?replacer.call(searchValue,O,replaceValue):nativeReplace.call(String(O),searchValue,replaceValue)},function(regexp,replaceValue){if(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE&&REPLACE_KEEPS_$0||"string"==typeof replaceValue&&-1===replaceValue.indexOf(UNSAFE_SUBSTITUTE)){var res=maybeCallNative(nativeReplace,regexp,this,replaceValue);if(res.done)return res.value}var rx=anObject(regexp),S=String(this),functionalReplace="function"==typeof replaceValue;functionalReplace||(replaceValue=String(replaceValue));var global=rx.global;if(global){var fullUnicode=rx.unicode;rx.lastIndex=0}for(var results=;;){var result=regExpExec(rx,S);if(null===result)break;if(results.push(result),!global)break;""===String(result)&&(rx.lastIndex=advanceStringIndex(S,toLength(rx.lastIndex),fullUnicode))}for(var it,accumulatedResult="",nextSourcePosition=0,i=0;i<results.length;i++){result=results;for(var matched=String(result),position=max(min(toInteger(result.index),S.length),0),captures=,j=1;j<result.length;j++)captures.push(void 0===(it=result)?it:String(it));var namedCaptures=result.groups;if(functionalReplace){var replacerArgs=.concat(captures,position,S);void 0!==namedCaptures&&replacerArgs.push(namedCaptures);var replacement=String(replaceValue.apply(void 0,replacerArgs))}else replacement=getSubstitution(matched,S,position,captures,namedCaptures,replaceValue);nextSourcePosition<=position&&(accumulatedResult+=S.slice(nextSourcePosition,position)+replacement,nextSourcePosition=position+matched.length)}return accumulatedResult+S.slice(nextSourcePosition)}]})},{"../internals/advance-string-index":5,"../internals/an-object":6,"../internals/fix-regexp-well-known-symbol-logic":35,"../internals/get-substitution":40,"../internals/regexp-exec-abstract":77,"../internals/require-object-coercible":81,"../internals/to-integer":95,"../internals/to-length":96}],137:;return void 0!==searcher?searcher.call(regexp,O):new RegExp(regexp)(String(O))},function(regexp){var res=maybeCallNative(nativeSearch,regexp,this);if(res.done)return res.value;var rx=anObject(regexp),S=String(this),previousLastIndex=rx.lastIndex;sameValue(previousLastIndex,0)||(rx.lastIndex=0);var result=regExpExec(rx,S);return sameValue(rx.lastIndex,previousLastIndex)||(rx.lastIndex=previousLastIndex),null===result?-1:result.index}]})},{"../internals/an-object":6,"../internals/fix-regexp-well-known-symbol-logic":35,"../internals/regexp-exec-abstract":77,"../internals/require-object-coercible":81,"../internals/same-value":82}],138:.push,min=Math.min,SUPPORTS_Y=!fails(function(){return!RegExp(4294967295,"y")});fixRegExpWellKnownSymbolLogic("split",2,function(SPLIT,nativeSplit,maybeCallNative){var internalSplit;return internalSplit="c"=="abbc".split(/(b)*/)||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(separator,limit){var string=String(requireObjectCoercible(this)),lim=void 0===limit?4294967295:limit>>>0;if(0==lim)return;if(void 0===separator)return;if(!isRegExp(separator))return nativeSplit.call(string,separator,lim);for(var match,lastIndex,lastLength,output=,flags=(separator.ignoreCase?"i":"")+(separator.multiline?"m":"")+(separator.unicode?"u":"")+(separator.sticky?"y":""),lastLastIndex=0,separatorCopy=new RegExp(separator.source,flags+"g");(match=regexpExec.call(separatorCopy,string))&&!(lastLastIndex<(lastIndex=separatorCopy.lastIndex)&&(output.push(string.slice(lastLastIndex,match.index)),1<match.length&&match.index<string.length&&arrayPush.apply(output,match.slice(1)),lastLength=match.length,lastLastIndex=lastIndex,output.length>=lim));)separatorCopy.lastIndex===match.index&&separatorCopy.lastIndex++;return lastLastIndex===string.length?!lastLength&&separatorCopy.test("")||output.push(""):output.push(string.slice(lastLastIndex)),output.length>lim?output.slice(0,lim):output}:"0".split(void 0,0).length?function(separator,limit){return void 0===separator&&0===limit?:nativeSplit.call(this,separator,limit)}:nativeSplit,;return void 0!==splitter?splitter.call(separator,O,limit):internalSplit.call(String(O),separator,limit)},function(regexp,limit){var res=maybeCallNative(internalSplit,regexp,this,limit,internalSplit!==nativeSplit);if(res.done)return res.value;var rx=anObject(regexp),S=String(this),C=speciesConstructor(rx,RegExp),unicodeMatching=rx.unicode,flags=(rx.ignoreCase?"i":"")+(rx.multiline?"m":"")+(rx.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),splitter=new C(SUPPORTS_Y?rx:"^(?:"+rx.source+")",flags),lim=void 0===limit?4294967295:limit>>>0;if(0==lim)return;if(0===S.length)return null===callRegExpExec(splitter,S)?:;for(var p=0,q=0,A=;q<S.length;){splitter.lastIndex=SUPPORTS_Y?q:0;var e,z=callRegExpExec(splitter,SUPPORTS_Y?S:S.slice(q));if(null===z||(e=min(toLength(splitter.lastIndex+(SUPPORTS_Y?0:q)),S.length))===p)q=advanceStringIndex(S,q,unicodeMatching);else{if(A.push(S.slice(p,q)),A.length===lim)return A;for(var i=1;i<=z.length-1;i++)if(A.push(z),A.length===lim)return A;q=p=e}}return A.push(S.slice(p)),A}]},!SUPPORTS_Y)},{"../internals/advance-string-index":5,"../internals/an-object":6,"../internals/fails":34,"../internals/fix-regexp-well-known-symbol-logic":35,"../internals/is-regexp":54,"../internals/regexp-exec":78,"../internals/regexp-exec-abstract":77,"../internals/require-object-coercible":81,"../internals/species-constructor":89,"../internals/to-length":96}],139:,140:,CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==forEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",forEach)}catch(error){CollectionPrototype.forEach=forEach}}},{"../internals/array-for-each":7,"../internals/create-non-enumerable-property":22,"../internals/dom-iterables":28,"../internals/global":41}],141:,CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){if(CollectionPrototype!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype,ITERATOR,ArrayValues)}catch(error){CollectionPrototype=ArrayValues}if(CollectionPrototype||createNonEnumerableProperty(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),DOMIterables)for(var METHOD_NAME in ArrayIteratorMethods)if(CollectionPrototype!==ArrayIteratorMethods)try{createNonEnumerableProperty(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods)}catch(error){CollectionPrototype=ArrayIteratorMethods}}}},{"../internals/create-non-enumerable-property":22,"../internals/dom-iterables":28,"../internals/global":41,"../internals/well-known-symbol":102,"../modules/es.array.iterator":113}],142:,143:||o;if(!it){if(Array.isArray(o)||(it=function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function(){return i>=o.length?{done:!0}:{done:!1,value:o}},e:function(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}var err,normalCompletion=!0,didErr=!1;return{s:function(){it=it.call(o)},n:function(){var step=it.next();return normalCompletion=step.done,step},e:function(_e2){didErr=!0,err=_e2},f:function(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}!function(){if(_config.default.mw.wgUserGroups.includes("extendedconfirmed")||_config.default.mw.wgUserGroups.includes("sysop")||"testwiki"===_config.default.mw.wgDBname)if((0,_globals.$)(window).on("beforeunload",function(e){if(_windowSetManager.default.hasOpenWindows())return e.returnValue=""}),_globals.mw.util.addPortletLink("p-cactions","#","XFDC prefs","p-xfdc-prefs","XFDcloser preferences"),(0,_globals.$)("#p-xfdc-prefs").click(function(e){e.preventDefault(),_windowSetManager.default.openWindow("prefs",{userIsSysop:_config.default.user.isSysop})}),0===_config.default.mw.wgArticleId)_globals.mw.util.addPortletLink("p-cactions","#","XFDC Unlink","p-xfdc-unlink","Unlink backlinks using XFDcloser"),(0,_globals.$)("#p-xfdc-unlink").click(function(e){e.preventDefault();var comment="",$commentEl=(0,_globals.$)(".mw-logline-delete").first().find(".comment").first();if($commentEl.length){var _step,_iterator=_createForOfIteratorHelper($commentEl.get().childNodes);try{for(_iterator.s();!(_step=_iterator.n()).done;){var child=_step.value;if("A"==child.nodeName){var target=child.href.replace(/^.*?\/wiki\//,"").replace(/_/g," "),label=child.textContent;comment+=target===label?"]"):"]")}else comment+=child.nodeValue}}catch(err){_iterator.e(err)}finally{_iterator.f()}comment=comment.replace(/ \(\+)?|XFDcloser]]\)/,"").slice(1,-1)}_windowSetManager.default.openWindow("unlink",{summary:comment,pageName:_config.default.mw.wgPageName})});else{var heading=_config.default.xfd.html.headlineinner,showHide=1<(0,_globals.$)("#mw-content-text "+heading).length&&_ShowHideTag.default.initialiseNewTag();(0,_globals.$)(heading).not(".XFDcloser-ignore").each(function(index){try{var discussionView=_DiscussionView.default.newFromHeadline({headingIndex:index,context:this,venue:_config.default.venue,currentPageName:_config.default.mw.wgPageName,userIsSysop:_config.default.user.isSysop});discussionView&&_config.default.isMobileSite?(0,_globals.$)(this).parent().next().prepend(discussionView.$element):discussionView&&(0,_globals.$)(this).after(discussionView.$element)}catch(e){console.warn(" Could not retrieve page info for "+(0,_globals.$)(this).text(),e)}}),showHide&&showHide.isHidden&&showHide.hideClosed()}}()},{"../globals":1,"./ShowHideTag":201,"./Views/DiscussionView":204,"./config":221,"./windowSetManager":226,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.slice":119,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.replace":136}],144:])/g,"\\$1").replace(/\s+/g,"\\s+"),exact&&(re="^\\s*"+re+"\\s*$"),re=new RegExp(re,"i"),function(item){var matchText=item.getMatchText();return matchText.normalize&&(matchText=matchText.normalize()),re.test(matchText)}};var _default=LookupMenuSelectWidget;exports.default=_default},{"../../globals":1,"core-js/modules/es.regexp.constructor":131,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.regexp.to-string":133,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139}],145:),$floatableContainer:this.hasInput&&"outline"===this.inputPosition?this.input.$element:this.$element,$overlay:this.$overlay,disabled:this.isDisabled(),multiselect:!0},config.menu)),this.menu.connect(this,{choose:"onMenuChoose",toggle:"onMenuToggle"}),this.hasInput&&this.input.connect(this,{change:"onInputChange"}),this.$input&&(this.$input.prop("disabled",this.isDisabled()),this.$input.attr({role:"combobox","aria-owns":this.menu.getElementId(),"aria-autocomplete":"list"})),this.popup||(this.$content.append(this.$input),this.$overlay.append(this.menu.$element))}_globals.OO.inheritClass(LookupMenuTagMultiselectWidget,_globals.OO.ui.MenuTagMultiselectWidget);var _default=LookupMenuTagMultiselectWidget;exports.default=_default},{"../../globals":1,"./LookupMenuSelectWidget":144}],146:",framed:!1}),this.showButton.$element.find("a").css("font-weight","normal"),this.hideButton=new _globals.OO.ui.ButtonWidget({label:"",framed:!1}),this.hideButton.$element.find("a").css("font-weight","normal"),this.hideButton.toggle(!1),this.showHideButtonGroup=new _globals.OO.ui.ButtonGroupWidget({items:,$element:(0,_globals.$)("<div style='margin-left:2em;'>")}),this.$element.css({border:"1px dashed #888"}).append(this.title.$element,this.showHideButtonGroup.$element,this.noteContent.$element),this.showButton.connect(this,{click:}),this.hideButton.connect(this,{click:})}_globals.OO.inheritClass(NoteWidget,_globals.OO.ui.Widget),NoteWidget.prototype.setExpanded=function(expand){this.showButton.toggle(!expand),this.hideButton.toggle(!!expand),this.noteContent.toggle(!!expand)};var _default=NoteWidget;exports.default=_default},{"../../globals":1,"core-js/modules/es.array.find":108}],147:,148:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _default=function(){function DiscussionViewController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,DiscussionViewController),this.model=model,this.statusLabel=widget.statusLabel,this.buttonGroup=widget.buttonGroup,this.closeButton=widget.closeButton,this.relistButton=widget.relistButton,this.quickCloseButton=widget.quickCloseButtonMenu,this.quickCloseMenu=widget.quickCloseButtonMenu.getMenu(),this.model.connect(this,{update:"updateFromModel"}),this.closeButton.connect(this,{click:}),this.relistButton.connect(this,{click:}),this.quickCloseMenu.connect(this,{choose:"onQuickCloseChoose"}),this.model.pages.length&&this.fetchInfoFromApi()}var Constructor,protoProps,staticProps;return Constructor=DiscussionViewController,(protoProps=.revisions.timestamp;return new Date(timestamp)});nominationDatePromise.then(function(nominationDate){_this.model.setNominationDate(nominationDate)}),_globals.$.when(pagesExistencesPromise,nominationDatePromise).then(function(){_this.model.setStatusReady()}).catch(function(code,error){_this.model.setStatusError(code,error)})}},{key:"updateFromModel",value:function(){this.statusLabel.setLabel(new _globals.OO.ui.HtmlSnippet(this.model.status)).toggle(this.model.showStatus),this.buttonGroup.toggle(this.model.showButtons),this.quickCloseButton.toggle(this.model.showQuickClose),this.model.actioned&&(this.model.$headlineSpan.addClass("xfdc-actioned-heading"),(0,_globals.$)(".".concat(this.model.id,"-discussion-node")).addClass("xfdc-actioned-discussion"))}},{key:"onButtonClick",value:function(type){var _this2=this;_windowSetManager.default.openWindow("main",{model:new _MainWindowModel.default({type:type,discussion:this.model}),offsetTop:(0,_util.windowOffsetTop)()}).closed.then(function(winData){_this2.model.setClosedWindowData(winData)}),this.model.setWindowOpened(type)}},{key:"onQuickCloseChoose",value:function(menuOption){var _this3=this,quickCloseResult=menuOption.getData(),windowModel=new _MainWindowModel.default({type:"close",quick:!0,result:quickCloseResult,discussion:this.model});_windowSetManager.default.openWindow("main",{model:windowModel,offsetTop:(0,_util.windowOffsetTop)()}).closed.then(function(winData){_this3.model.setClosedWindowData(winData)}),this.model.setWindowOpened("close"),windowModel.result.singleModeResult.setSelectedResultName(quickCloseResult.replace("quick","").toLowerCase()),windowModel.options.isValid?(windowModel.taskList.resetItems(),windowModel.taskList.startTasks()):windowModel.showOptions()}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),DiscussionViewController}();exports.default=_default},{"../../globals":1,"../Models/MainWindowModel":185,"../api":220,"../util":225,"../windowSetManager":226,"core-js/modules/es.array.for-each":110,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.replace":136,"core-js/modules/web.dom-collections.for-each":140}],149:=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}require("core-js/modules/es.array.find"),require("core-js/modules/es.array.for-each"),require("core-js/modules/es.array.map"),require("core-js/modules/es.function.name"),require("core-js/modules/es.object.define-property"),require("core-js/modules/web.dom-collections.for-each"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var GroupedItemController=function(){function GroupedItemController(model,group){if(!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,GroupedItemController),!model)throw new Error("GroupedItemController: model must be defined.");if(!Array.isArray(model.items))throw console.warn("GroupedItemController: model.items = ",model.items),new Error("GroupedItemController: Expected model.items to be an array");if(!group)throw new Error("GroupedItemController: group must be defined.");if(!Array.isArray(group.items))throw console.warn("GroupedItemController: group.items = ",group.items),new Error("GroupedItemController: Expected group.items to be an array");this.model=model,this.group=group,this.model.connect(this,{update:"updateGroupFromModel"}),this.group.aggregate({update:"itemUpdate"}),this.group.connect(this,{itemUpdate:"onItemUpdate"})}var Constructor,protoProps,staticProps;return Constructor=GroupedItemController,(protoProps==widget.getInputStates())}),this.group.clearItems();var newWidgetItems=this.model.getItems().map(function(modelItem){var widget=widgetItems.find(function(widgetItem){return widgetItem.getData().name===modelItem.name});if(!widget){if(!modelItem.name)throw new Error("Models for group item widgets must have names!");var data=(widget=_this.newItemWidget(modelItem)).getData()||{};widget.setData(function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},data,{name:modelItem.name}))}return widget});this.group.addItems(newWidgetItems),newWidgetItems.forEach(function(widget){var state=widgetInputStates;state&&widget.setInputStates&&widget.setInputStates(state)}),this.updateFromModel()}},{key:"newItemWidget",value:function(){}},{key:"updateFromModel",value:function(){}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),GroupedItemController}();exports.default=GroupedItemController},{"core-js/modules/es.array.find":108,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.map":116,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125,"core-js/modules/web.dom-collections.for-each":140}],150:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("../prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _default=function(){function MainWindowController(model,window){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,MainWindowController),this.model=model,this.window=window,this.stackLayout=window.stackLayout,this.actions=window.actions,this.model.connect(this,{update:"updateFromModel",resize:this.window.updateSize.bind(this.window)})}var Constructor,protoProps,staticProps;return Constructor=MainWindowController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),MainWindowController}();exports.default=_default},{"../../globals":1,"../prefs":223,"../util":225,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.function.bind":122,"core-js/modules/es.object.define-property":125}],151:||null!=iter)return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _default=function(){function OptionsItemController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,OptionsItemController),this.model=model,this.model.connect(this,{update:"updateFromModel"}),this.widget=widget,this.widget.fieldset.aggregate({widgetChange:"fieldWidgetChange"}),this.widget.fieldset.connect(this,{fieldWidgetChange:"onFieldWidgetChange"}),this.widget.actionsDropdown.getMenu().connect(this,{choose:"onActionChange",select:"onActionChange"})}var Constructor,protoProps,staticProps;return Constructor=OptionsItemController,(protoProps=.concat(_toConsumableArray(itemgroup.names.map(function(name){return new _globals.OO.ui.MenuOptionWidget({data:"{{"+name+"}}",label:"{{"+name+"}}"})})))})}}),option.value&&widget.setValue(option.value);break;default:throw new Error("Unrecognised option type: "+option.type)}var layout=new _globals.OO.ui.FieldLayout(widget,{label:option.label,data:{name:option.name}});switch(option.type){case"lookupMenuTagMultiselect":case"toggleSwitch":widget.on("change",function(){return layout.emit("widgetChange")});break;case"dropdown":widget.getMenu().on("choose",function(){return layout.emit("widgetChange")}),widget.getMenu().on("select",function(){return layout.emit("widgetChange")})}return layout}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),OptionsItemController}();exports.default=_default},{"../../globals":1,"../Components/LookupMenuTagMultiselectWidget":145,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.array.flat-map":109,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.array.unscopables.flat-map":121,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125}],152:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var OptionsPanelController=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(OptionsPanelController,_GroupItemController);var Constructor,protoProps,staticProps,_super=_createSuper(OptionsPanelController);function OptionsPanelController(model,widget){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,OptionsPanelController),(_this=_super.call(this,model,widget)).$overlay=widget.$overlay,_this}return Constructor=OptionsPanelController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),OptionsPanelController}();exports.default=OptionsPanelController},{"../Views/OptionsItemWidget":206,"./GroupItemController":149,"core-js/modules/es.object.set-prototype-of":127}],153:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}require("core-js/modules/es.array.find"),require("core-js/modules/es.object.define-property"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var PrefsItemController=function(){function PrefsItemController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PrefsItemController),this.model=model,this.model.connect(this,{update:"updateFromModel"}),this.widget=widget,this.widget.selector.connect(this,{change:"onSelectorChange"}),"dropdown"===model.type&&this.widget.selector.getMenu().connect(this,{choose:"onMenuSelection",select:"onMenuSelection"}),this.updateFromModel()}var Constructor,protoProps,staticProps;return Constructor=PrefsItemController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),PrefsItemController}();exports.default=PrefsItemController},{"core-js/modules/es.array.find":108,"core-js/modules/es.object.define-property":125}],154:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var PrefsPanelController=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(PrefsPanelController,_GroupItemController);var Constructor,protoProps,staticProps,_super=_createSuper(PrefsPanelController);function PrefsPanelController(model,widget){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PrefsPanelController),(_this=_super.call(this,model,widget.fieldset)).$overlay=widget.$overlay,_this.updateGroupFromModel(),_this}return Constructor=PrefsPanelController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),PrefsPanelController}();exports.default=PrefsPanelController},{"../Views/PrefsItemWidget":208,"./GroupItemController":149,"core-js/modules/es.object.set-prototype-of":127}],155:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("../prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PrefsWindowController=function(){function PrefsWindowController(model,window){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PrefsWindowController),this.model=model,this.window=window,this.model.connect(this,{update:"updateFromModel",resize:this.window.updateSize}),this.updateFromModel()}var Constructor,protoProps,staticProps;return Constructor=PrefsWindowController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),PrefsWindowController}();exports.default=PrefsWindowController},{"../../globals":1,"../prefs":223,"core-js/modules/es.object.define-property":125}],156:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var ResultItemController=function(){function ResultItemController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ResultItemController),this.model=model,this.model.connect(this,{update:"updateFromModel"}),this.widget=widget,this.widget.resultDropdown.getMenu().connect(this,{choose:"onResultChoose"}),this.widget.targetInput.connect(this,{change:"onTargetChange"}),this.widget.customResultInput.connect(this,{change:"onCustomResultChange"})}var Constructor,protoProps,staticProps;return Constructor=ResultItemController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),ResultItemController}();exports.default=ResultItemController},{"../../globals":1,"core-js/modules/es.array.find":108,"core-js/modules/es.array.map":116,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125}],157:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var ResultListWidgetController=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(ResultListWidgetController,_GroupItemController);var Constructor,protoProps,staticProps,_super=_createSuper(ResultListWidgetController);function ResultListWidgetController(model,widget){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ResultListWidgetController),(_this=_super.call(this,model,widget)).$overlay=widget.$overlay,_this.updateGroupFromModel(),_this}return Constructor=ResultListWidgetController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),ResultListWidgetController}();exports.default=ResultListWidgetController},{"../Views/ResultItemWidget":211,"./GroupItemController":149,"core-js/modules/es.object.set-prototype-of":127}],158:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _default=function(){function ResultPanelController(model,widgets){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ResultPanelController),this.model=model,this.notesFieldset=widgets.notesFieldset,this.resultFieldset=widgets.resultFieldset,this.resultWidgetField=widgets.resultWidgetField,this.multiResultWidgetField=widgets.multiResultWidgetField,this.resultSummary=widgets.resultSummary,this.resultSummaryField=widgets.resultSummaryField,this.rationaleFieldset=widgets.rationaleFieldset,this.copyButton=widgets.copyButton,this.rationaleTextbox=widgets.rationaleTextbox,this.newSentenceOption=widgets.newSentenceOption,this.preview=widgets.preview,this.model.connect(this,{update:"updateFromModel"}),this.resultSummary.connect(this,{change:"onResultSummaryChange"}),this.copyButton.connect(this,{click:"onCopyButtonClick"}),this.rationaleTextbox.connect(this,{change:"onRationaleChange"}),this.newSentenceOption.connect(this,{change:"onNewSentenceChange"}),this._latestPreviewWikitext="",this._latestRequestId=0}var Constructor,protoProps,staticProps;return Constructor=ResultPanelController,(protoProps=,unexpand:}),new _globals.OO.ui.FieldLayout(widget,{align:"top",$element:(0,_globals.$)("<div>").css("margin-top","5px")})}));var wikitext=this.model.previewWikitext;if(this._latestPreviewWikitext!==wikitext){this._latestPreviewWikitext=wikitext;var requestId=++this._latestRequestId;return _api.default.get({action:"parse",format:"json",formatversion:"2",text:wikitext,title:this.model.discussion.discussionPageName,prop:"text",pst:1,disablelimitreport:1,contentmodel:"wikitext"}).then(function(response){requestId===_this._latestRequestId&&response&&response.parse&&response.parse.text&&(_this.preview.$element.empty().html(response.parse.text),_this.model.emit("resize"))})}}},{key:"onNoteExpand",value:function(noteName){this.model.setNoteExpanded(noteName,!0)}},{key:"onNoteUnexpand",value:function(noteName){this.model.setNoteExpanded(noteName,!1)}},{key:"onResultSelect",value:function(item){this.model.selectResult(item.getData())}},{key:"onSpeedyChange",value:function(isSelected){this.model.setSpeedyResult(isSelected)}},{key:"onSoftChange",value:function(isSelected){this.model.setSoftResult(isSelected)}},{key:"onDeleteFirstChange",value:function(isSelected){this.model.setDeleteFirstResult(isSelected)}},{key:"onTargetChange",value:function(value){this.model.setTarget(value)}},{key:"onCustomResultChange",value:function(value){this.model.setCustomResultText(value)}},{key:"onMultiResultChange",value:function(resultChange){this.model.updateMultimodeResult(resultChange)}},{key:"onResultSummaryChange",value:function(value){this.model.setResultSummary(value)}},{key:"onCopyButtonClick",value:function(){this.model.copyResultsToRationale()}},{key:"onRationaleChange",value:function(value){this.model.setRationale(value)}},{key:"onNewSentenceChange",value:function(isSelected){this.model.setNewSentence(isSelected)}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),ResultPanelController}();exports.default=_default},{"../../globals":1,"../Components/NoteWidget":146,"../api":220,"core-js/modules/es.array.map":116,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125}],159:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var SingleResultWidgetController=function(){function SingleResultWidgetController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,SingleResultWidgetController),this.model=model,this.model.connect(this,{update:"updateFromModel"}),this.widget=widget,this.widget.buttonSelect.connect(this,{select:"onButtonSelect"}),this.widget.speedyOption.connect(this,{change:"onSpeedyChange"}),this.widget.softOption.connect(this,{change:"onSoftChange"}),this.widget.deleteFirstOption.connect(this,{change:"onDeleteFirstChange"}),this.widget.targetInput.connect(this,{change:"onTargetChange"}),this.widget.customResultInput.connect(this,{change:"onCustomResultChange"})}var Constructor,protoProps,staticProps;return Constructor=SingleResultWidgetController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),SingleResultWidgetController}();exports.default=SingleResultWidgetController},{"../../globals":1,"core-js/modules/es.array.find":108,"core-js/modules/es.array.map":116,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125}],160:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("../prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function toSmallSnippet(content){return new _globals.OO.ui.HtmlSnippet('<span style="font-size: 88%; font-weight: normal;">'.concat(content,"</span>"))}var _default=function(){function TaskItemController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TaskItemController),this.model=model,this.widget=widget,this.api=_api.default,this._doingTask=!1,this.model.connect(this,{update:"updateFromModel"}),this.widget.showAllWarningsButton&&this.widget.showAllErrorsButton&&(this.widget.showAllWarningsButton.connect(this,{click:"onShowWarningsButtonClick"}),this.widget.showAllErrorsButton.connect(this,{click:"onShowErrorsButtonClick"}))}var Constructor,protoProps,staticProps;return Constructor=TaskItemController,(protoProps=}},{key:"onShowWarningsButtonClick",value:function(){this.model.showOverflowWarnings=!0,this.updateFromModel()}},{key:"makeErrors",value:function(){return this.model.showOverflowErrors||this.model.errors.length<prefs.get("collapseErrors")?this.model.errors.map(toSmallSnippet):}},{key:"onShowErrorsButtonClick",value:function(){this.model.showOverflowErrors=!0,this.updateFromModel()}},{key:"updateFromModel",value:function(){var _this=this;this.widget.field.setLabel(new _globals.OO.ui.HtmlSnippet("<span>".concat(this.model.label,"</span>"))),this.widget.progressbar.setProgress(this.model.progress),this.widget.progressbar.toggle(this.model.showProgressBar),this.widget.field.setNotices(this.model.notices.map(toSmallSnippet)),this.widget.field.setWarnings(this.makeWarnings()),this.widget.field.setErrors(this.makeErrors()),this.widget.showAllWarningsButton&&this.widget.showAllErrorsButton&&(this.widget.showAllWarningsButton.toggle(!this.model.showOverflowWarnings&&this.model.warnings.length>=prefs.get("collapseWarnings")),this.widget.showAllWarningsButton.setLabel("Show ".concat(this.model.warnings.length," warnings")),this.widget.showAllErrorsButton.toggle(!this.model.showOverflowErrors&&this.model.errors.length>=prefs.get("collapseErrors")),this.widget.showAllErrorsButton.setLabel("Show ".concat(this.model.errors.length," errors"))),this.widget.emit("update"),this.model.starting&&!this._doingTask&&this.model.canProceed()&&(this._doingTask=!0,this.model.setStarted(),_globals.$.when(this.doTask()).then(function(){return _this.model.setDone()}).catch(function(){return _this.model.setFailed()}))}},{key:"doTask",value:function(){throw new Error("doTask method not implemented")}},{key:"logError",value:function(code,error){console.error(" ").concat(code||"unknown"),error)}},{key:"handlePageError",value:function(code,error,title,action){switch(action=action||"edit",code){case"unexpectedTitle":this.model.addError("API query result included unexpected title ".concat((0,_util.makeLink)(title),"; this page will not be edited")),this.model.trackStep("failed");break;case"unexpectedTarget":this.model.addError("API query result included unexpected target talk page ".concat((0,_util.makeLink)(title),"; this page will not be edited")),this.model.trackStep("failed");break;case"doesNotExist":this.model.addError("".concat((0,_util.makeLink)(title)," does not exist, and will not be edited")),this.model.trackStep("failed");break;case"couldNotUpdate":this.model.addError("Could not update ".concat((0,_util.makeLink)(title),": ").concat(error.message)),this.model.trackStep("failed");break;case"subjectDoesNoteExist":this.model.addError("The subject page for ".concat((0,_util.makeLink)(title)," does not exist; this talk page will not be edited")),this.model.trackStep("failed");break;case"targetIsNotModule":this.model.addError("Could not redirect ".concat((0,_util.makeLink)(title)," because ").concat(error&&error.target?(0,_util.makeLink)(error.target):"the target"," is not a module")),this.model.trackStep("failed");break;case"skipped":this.model.addWarning("".concat((0,_util.makeLink)(title)," skipped")),this.model.trackStep("skipped");break;case"skippedNoneFound":this.model.addWarning("".concat((0,_util.makeLink)(title)," skipped: none found")),this.model.trackStep("skipped");break;case"skippedNoLinks":this.model.addWarning("".concat((0,_util.makeLink)(title)," skipped (no direct links)")),this.model.trackStep("skipped");break;case"noChangesMade":this.model.addError("Did not find any changes to make to ".concat((0,_util.makeLink)(title))),this.model.trackStep("skipped");break;case"nominationTemplateNotFound":this.model.addError("Nomination template not found on page ".concat((0,_util.makeLink)(title))),this.model.trackStep("skipped");break;case"abort":this.model.setAborted(),this.model.trackStep("failed");break;case"aborted":this.model.trackStep("failed");break;default:this.model.addError("".concat(code||"unknown"," error: could not ").concat(action," page ").concat((0,_util.makeLink)(title))),this.model.trackStep("failed"),this.logError(code,error)}}},{key:"handleOverallError",value:function(errortype,code,error){if("read"===errortype)return this.model.addError("".concat(code||"unknown"," error: Could not read contents of nominated ").concat(1<this.model.discussion.pages.length?"pages":"page")),this.model.setFailed(),this.logError(code,error),(0,_util.rejection)()}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),TaskItemController}();exports.default=_default},{"../../globals":1,"../api":220,"../prefs":223,"../util":225,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125}],161:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var TaskListPanelController=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(TaskListPanelController,_GroupItemController);var Constructor,protoProps,staticProps,_super=_createSuper(TaskListPanelController);function TaskListPanelController(model,widget){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TaskListPanelController),(_this=_super.call(this,model,widget.fieldset))._startedItems=!1,_this}return Constructor=TaskListPanelController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),TaskListPanelController}();exports.default=TaskListPanelController},{"../Views/TaskItemWidget":215,"./GroupItemController":149,"core-js/modules/es.array.for-each":110,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/web.dom-collections.for-each":140}],162:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var AddBeingDeleted=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(AddBeingDeleted,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(AddBeingDeleted);function AddBeingDeleted(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AddBeingDeleted),(_this=_super.call(this,model,widgets)).model.setName("Updating ".concat(1<model.pageNames.length?"templates":"template")),_this.mergeTargets=,_this.mergeTitles=,_this}return Constructor=AddBeingDeleted,(protoProps=] Speedy deletion nomination, per"})}:{text:"<".concat(inclusionTag,">{{Being deleted|").concat((0,_util.ymdDateString)(this.model.discussion.nominationDate),"|").concat((0,_util.encodeForWikilinkFragment)(this.model.discussion.sectionHeader)+(this.mergeTitles.includes(page.title)?"|merge="+result.targetPageName:""),"}}</").concat(inclusionTag,">").concat(this.model.venue.removeNomTemplate(oldWikitext)),summary:this.model.getEditSummary({short:!0,prefix:"Added {{being deleted}} per"})}}catch(e){return(0,_util.rejection)("couldNotUpdate",e)}}},{key:"initialise",value:function(){this.model.setStarted(),this.model.setTotalSteps(this.model.pageNames.length);var mergePageResults=this.model.getPageResults("merge");this.mergeTargets=(0,_util.uniqueArray)(mergePageResults.map(function(pageResult){return pageResult.targetPageName})),this.mergeTitles=this.model.discussion.redirects.resolve(mergePageResults.map(function(pageResult){return pageResult.pageName}))}},{key:"doTask",value:function(){var _this3=this;return this.initialise(),this.model.setDoing(),this.api.editWithRetry(this.model.getResolvedPageNames().map(_util.moduleToDoc),null,function(page){return _this3.transform(page)},function(){return _this3.model.trackStep()},function(code,error,title){return _this3.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this3.handleOverallError(errortype,code,error)})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),AddBeingDeleted}();exports.default=AddBeingDeleted},{"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.map":116,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.string.includes":134}],163:,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}var Merger=function(){function Merger(config){_classCallCheck(this,Merger),this.from=config.from,this.target=config.target,this.mergeToTemplate=config.mergeToTemplate,this.mergeFromTemplates=config.mergeFromTemplates,this.isNominatedPage=config.isNominatedPage}return _createClass(Merger,),Merger}(),AddMergeTemplatesTask=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(AddMergeTemplatesTask,_TaskItemController2);var _super=_createSuper(AddMergeTemplatesTask);function AddMergeTemplatesTask(model,widgets){var _this;return _classCallCheck(this,AddMergeTemplatesTask),(_this=_super.call(this,model,widgets)).model.setName("Adding merge templates"),_this}return _createClass(AddMergeTemplatesTask,),AddMergeTemplatesTask}();exports.default=AddMergeTemplatesTask},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"./RemoveNomTemplates":174,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.replace":136}],164:?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var AddOldXfdTask=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(AddOldXfdTask,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(AddOldXfdTask);function AddOldXfdTask(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AddOldXfdTask),(_this=_super.call(this,model,widgets)).model.setName("Updating talk ".concat(1<model.pageNames.length?"pages":"page")),_this}return Constructor=AddOldXfdTask,(protoProps=+(+)/i.exec(param.name),paramNum=numCheck&&parseInt(numCheck)||1;count<paramNum&&(count=paramNum)});else if(/(?:old|tfd|Previous) ?(?:tfd|tfd|end)(?:full)?/i.test(template.name)){count++;var logSubpage=template.getParamValue("link")||ymdFormatDate,fragment=template.getParamValue(1)||template.getParamValue("disc")||"Template:"+PAGENAME,_page="{{subst:#ifexist:Wikipedia:Templates for deletion/Log/".concat(logSubpage)+"|Wikipedia:Templates for deletion/Log/".concat(logSubpage,"#").concat(fragment)+"|Wikipedia:Templates for discussion/Log/".concat(logSubpage,"#").concat(fragment,"}}");oldafdmulti+=" |date".concat(count,"=").concat(dmyFormatDate," |result").concat(count,"='''").concat((0,_util.uppercaseFirst)(result.replace(/'''/g,"")),"''' |page").concat(count,"=").concat(_page),wikitext=wikitext.replace(template.wikitext+"\n","").replace(template.wikitext,"")}else if(/old ?(?:f|i)fd(?:full)?/i.test(template.name)){count++;var _fragment="File:"+template.getParamValue("page")||PAGENAME,_page2="{{subst:#ifexist:Wikipedia:Images and media for deletion/".concat(ymdFormatDate)+"|Wikipedia:Images and media for deletion/".concat(ymdFormatDate,"#").concat(_fragment)+"|{{subst:#ifexist:Wikipedia:Files for deletion/".concat(ymdFormatDate)+"|Wikipedia:Files for deletion/".concat(ymdFormatDate,"#").concat(_fragment)+"|Wikipedia:Files for discussion/".concat(ymdFormatDate,"#").concat(_fragment,"}}}}");oldafdmulti+=" |date".concat(count,"=").concat(dmyFormatDate," |result").concat(count,"='''").concat((0,_util.uppercaseFirst)(result.replace(/'''/g,"")),"''' |page").concat(count,"=").concat(_page2),wikitext=wikitext.replace(template.wikitext+"\n","").replace(template.wikitext,"")}else if(/(?:old ?mfd|mfdend|mfdold)(?:full)?/i.test(template.name)){count++;var subpage=template.getParamValue("votepage")||template.getParamValue("title")||template.getParamValue("page")||SUBJECTPAGENAME,_page3="Wikipedia:Miscellany for deletion/".concat(subpage);oldafdmulti+=" |date".concat(count,"=").concat(dmyFormatDate," |result").concat(count,"='''").concat((0,_util.uppercaseFirst)(result.replace(/'''/g,"")),"''' |page").concat(count,"=").concat(_page3),wikitext=wikitext.replace(template.wikitext+"\n","").replace(template.wikitext,"")}else if(/old?(?: |-)?rfd(?:full)?/i.test(template.name)){count++;var rawlink=template.getParamValue("rawlink"),_subpage=template.getParamValue("page")||ymdFormatDate+"#"+SUBJECTPAGENAME,_page4=rawlink?rawlink.slice(2,rawlink.indexOf("|")):"Wikipedia:Redirects for discussion/Log/"+_subpage;oldafdmulti+=" |date".concat(count,"=").concat(dmyFormatDate," |result").concat(count,"='''").concat((0,_util.uppercaseFirst)(result.replace(/'''/g,"")),"''' |page").concat(count,"=").concat(_page4),wikitext=wikitext.replace(template.wikitext+"\n","").replace(template.wikitext,"")}}}),"afd"!==this.model.venue.type&&0===count)return this.makeOldxfdWikitext()+wikitext;var currentCount=1===++count?"":count.toString(),currentResult=1===count?this.model.result.getResultText():(0,_util.uppercaseFirst)(this.model.result.getResultText()),page="afd"===this.model.venue.type?this.model.discussion.discussionSubpageName:this.model.discussion.discussionPageLink;return oldafdmulti+=" |date".concat(currentCount,"=").concat((0,_util.dmyDateString)(this.model.discussion.nominationDate)," |result").concat(currentCount,"='''").concat(currentResult,"''' |page").concat(currentCount,"=").concat(page,"}}"),oldAfdTemplate?wikitext.replace(oldAfdTemplate.wikitext,oldafdmulti):oldafdmulti+"\n"+wikitext.trim()}},{key:"transform",value:function(page){var _this2=this;if(this.model.aborted)return(0,_util.rejection)("aborted");var pageName=this.model.getResolvedTalkpagesNames().find(function(talkpageName){return talkpageName===page.title}),pageTitle=pageName&&_globals.mw.Title.newFromText(pageName);if(!pageTitle)return(0,_util.rejection)("unexpectedTitle");if(!pageTitle.getSubjectPage().exists())return(0,_util.rejection)("Subject page does not exist");var baseEditParams={section:"0",summary:this.model.getEditSummary({prefix:"Old ".concat(this.model.venue.type.toUpperCase(),":")})};switch(!0){case page.redirect&&"rfd"===this.model.venue.type:return _globals.OO.ui.confirm('"'.concat(page.title,'" is currently a redirect. Okay to replace with Old RFD template?')).then(function(confirmed){return confirmed?_objectSpread({},baseEditParams,{text:_this2.makeOldxfdWikitext(),redirect:!1}):_globals.$.Deferred().reject("skipped")});case page.redirect&&"mfd"===this.model.venue.type:return _objectSpread({},baseEditParams,{prependtext:this.makeOldxfdWikitext(pageTitle.getPrefixedText()),redirect:!0});case page.redirect&&"afd"!==this.model.venue.type:return _objectSpread({},baseEditParams,{appendtext:"\n"+this.makeOldxfdWikitext(),redirect:!1});default:return _objectSpread({},baseEditParams,{text:this.makeNewWikitext(page.missing?"":page.content,page.title),redirect:!1})}}},{key:"doTask",value:function(){var _this3=this,talkpagesNames=this.model.getResolvedTalkpagesNames();return 0===talkpagesNames.length?(this.model.addWarning("None found"),(0,_util.rejection)()):(this.model.setTotalSteps(talkpagesNames.length),this.model.setDoing(),this.api.editWithRetry(talkpagesNames,{rvsection:"0"},function(page){return _this3.transform(page)},function(){return _this3.model.trackStep()},function(code,error,title){return _this3.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this3.handleOverallError(errortype,code,error)}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),AddOldXfdTask}();exports.default=AddOldXfdTask},{"../../../globals":1,"../../Template":202,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.index-of":112,"core-js/modules/es.array.slice":119,"core-js/modules/es.function.name":123,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.object.to-string":128,"core-js/modules/es.parse-int":130,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.regexp.to-string":133,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],165:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}(this,result)}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}var AddToHoldingCell=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(AddToHoldingCell,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(AddToHoldingCell);function AddToHoldingCell(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,AddToHoldingCell),_defineProperty(_assertThisInitialized(_this=_super.call(this,model,widgets)),"doTask",function(){var _this2=this;return this.model.setTotalSteps(1),this.model.setDoing(),this.api.editWithRetry(this.model.venue.subpagePath+"Holding cell",null,function(page){return _this2.transform(page)},function(){return _this2.model.trackStep()},function(code,error,title){return _this2.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this2.handleOverallError(errortype,code,error)})}),_this.model.setName("Listing at holding cell"),_this}return Constructor=AddToHoldingCell,(protoProps=+(=+)\n/.exec(section);return headingSigns?headingSigns+section:section}),changesMade=0,moduleCount=0;return this.model.getPageResults().forEach(function(pageResult){var pageName=_this3.model.discussion.redirects.resolveOne(pageResult.pageName),pageTitle=_globals.mw.Title.newFromText(pageName),options=_this3.model.options.getOptionValues(pageResult.selectedResultName);if(_this3.model.venue.ns_number.includes(pageTitle.getNamespaceId()))if(pageTitle.exists()){var main=pageTitle.getMain(),dateString=(0,_util.ymdDateString)(_this3.model.discussion.nominationDate),section=_this3.model.discussion.sectionHeader,deleteParam="ready"===options.holdcellSection?"|delete=1":"",nsParam=828===pageTitle.getNamespaceId()?"|ns=Module":"",sectionNum=_this3.model.venue.holdingCellSectionNumber;sectionsArray=AddToHoldingCell.cleanupSection(sectionsArray)+"\n*{{tfdl|".concat(main,"|").concat(dateString,"|section=").concat(section).concat(deleteParam).concat(nsParam,"}}\n"),changesMade++,nsParam&&moduleCount++}else _this3.model.addError("".concat((0,_util.makeLink)(pageName)," does not exist, and will not be listed at the holding cell"));else _this3.model.addError("".concat((0,_util.makeLink)(pageName)," is not in the expected namespace, and will not be listed at the holding cell"))}),0===changesMade?(0,_util.rejection)("noChangesMade"):{text:sectionsArray.join("\n"),summary:this.model.getEditSummary({prefix:"Listing ".concat(AddToHoldingCell.typeListed(changesMade,moduleCount),":")})}}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),AddToHoldingCell}();_defineProperty(exports.default=AddToHoldingCell,"cleanupSection",function(wikitext){return wikitext.replace(/\n*^\*\s*''None currently''\s*$(?!*?-->)/gim,"").trim()}),_defineProperty(AddToHoldingCell,"typeListed",function(total,moduleCount){switch(!0){case 1===total&&0===moduleCount:return"template";case 1===total&&1===moduleCount:return"module";case total===moduleCount:return"modules";case 0===moduleCount:return"templates";case 2===total&&1===moduleCount:return"template and module";case total===moduleCount+1:return"template and modules";default:return"templates and modules"}})},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.split":138,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],166:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}(this,result)}}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}var CloseDiscussion=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(CloseDiscussion,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(CloseDiscussion);function CloseDiscussion(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,CloseDiscussion),_defineProperty(_assertThisInitialized(_this=_super.call(this,model,widgets)),"doTask",function(){var _this2=this;return this.model.setTotalSteps(1),this.model.setDoing(),this.api.editWithRetry(this.model.discussion.discussionPageName,{rvsection:this.model.discussion.sectionNumber},function(page){return _this2.transform(page)},function(){return _this2.model.trackStep()},function(code,error,title){_this2.handlePageError("abort"),"abort"!==code&&"aborted"!==code&&_this2.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this2.model.setAborted(),_this2.handleOverallError(errortype,code,error),(0,_util.rejection)()})}),_this.model.setName("Closing discussion"),_this}return Constructor=CloseDiscussion,(protoProps=.timestamp))return this.model.addError("Edit conflict detected"),(0,_util.rejection)("abort");var section_heading=page.content.slice(0,page.content.indexOf("\n")),sectionHeadingText=CloseDiscussion.sectionHeadingText(section_heading);if(sectionHeadingText!==this.model.discussion.sectionHeader)return this.model.addError('Possible edit conflict detected, found section heading"'.concat(sectionHeadingText,'"')),(0,_util.rejection)("abort");var xfd_close_top=this.model.venue.wikitext.closeTop.replace(/__RESULT__/,this.model.result.getResultText()||"&thinsp;").replace(/__TO_TARGET__/,this.model.result.getFormattedTarget({prepend:" to "})).replace(/__RATIONALE__/,this.model.result.getFormattedRationale("punctuated")||".").replace(/__SIG__/,_config.default.user.sig),section_content=page.content.slice(page.content.indexOf("\n")+1).replace(/({{closing}}|{{AfDh}}|{{AfDb}}|\{\{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD\|.?\}\}|<noinclude>\\](\\])?<\/noinclude>)/gi,""),updated_section=(this.model.venue.hasIndividualSubpages?xfd_close_top+"\n"+section_heading:section_heading+"\n"+xfd_close_top)+"\n"+section_content.trim()+"\n"+this.model.venue.wikitext.closeBottom;return{section:this.model.discussion.sectionNumber,text:updated_section,summary:"/* ".concat(this.model.discussion.sectionHeader," */ Closed as ").concat(this.model.result.getResultText()," ").concat(_config.default.script.advert)}}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),CloseDiscussion}();_defineProperty(exports.default=CloseDiscussion,"sectionHeadingText",function(wikitext){return(0,_util.decodeHtml)(wikitext.replace(/(?:^\s*=*\s*|\s*=*\s*$)/g,"").replace(/\]+\|)?(]+)\]\]/g,"$1").replace(/{{\s*l?\s*\|\s*(+)}}/g,"{{$1}}").replace(/s*}}/,"}}").replace(/\s{2,}/g," ").trim())})},{"../../config":221,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.index-of":112,"core-js/modules/es.array.slice":119,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139}],167:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var DeletePages=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(DeletePages,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(DeletePages);function DeletePages(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,DeletePages),(_this=_super.call(this,model,widgets)).model.setName("Deleting ".concat(1<model.pageNames.length?"pages":"page")),_this}return Constructor=DeletePages,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),DeletePages}();exports.default=DeletePages},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.filter":106,"core-js/modules/es.object.set-prototype-of":127}],168:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var DeleteRedirects=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(DeleteRedirects,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(DeleteRedirects);function DeleteRedirects(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,DeleteRedirects),(_this=_super.call(this,model,widgets)).model.setName("Deleting redirects"),_this}return Constructor=DeleteRedirects,(protoProps=,size:"medium",scrolled:!0}).then(function(action){return"show"!==action?action:(0,_util.multiButtonConfirm)({title:"Warning",message:"Mass action to be peformed: delete ".concat(result.titles.length," redirects:<ul>").concat(result.titles.map(function(title){return"<li>".concat(title,"</li>")}).join(""),"</ul>"),actions:,size:"medium",scrolled:!0})}).then(function(action){return"accept"!==action?(_this2.model.addWarning("Cancelled by user"),_globals.$.Deferred().reject("Skipped.")):result})}},{key:"doTask",value:function(){var _this3=this;return this.api.queryWithContinue({titles:this.model.getResolvedPageNames(),generator:"redirects",grdlimit:"max",prop:"info",inprop:"talkid"}).then(function(response){return _this3.model.aborted?(0,_util.rejection)("aborted"):response&&response.pages?_this3.titlesFromResponsePages(response.pages):(_this3.model.addWarning("none found"),(0,_util.rejection)("Skipped."))}).then(function(result){if(_this3.model.aborted)return(0,_util.rejection)("aborted");_this3.model.setDoing();var deleteRedirectsPromise=_this3.api.deleteWithRetry(result.titles,{reason:_this3.model.getEditSummary({prefix:"] (redirect):"})},function(){return _this3.model.trackStep()},function(code,error,title){return _this3.handlePageError(code,error,title,"delete")}).catch(function(errortype,code,error){_this3.handleOverallError(errortype,code,error)}),deleteTalkpagesPromise=result.talkTitles.length&&_this3.api.deleteWithRetry(result.talkTitles,{reason:_this3.model.getEditSummary({prefix:"] (talk page of redirect):"})},function(){return _this3.model.trackStep()},function(code,error,title){return _this3.handlePageError(code,error,title,"delete")}).catch(function(errortype,code,error){_this3.handleOverallError(errortype,code,error)});return _globals.$.when(deleteRedirectsPromise,deleteTalkpagesPromise)})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),DeleteRedirects}();exports.default=DeleteRedirects},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.object.set-prototype-of":127}],169:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var DeleteTalkpages=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(DeleteTalkpages,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(DeleteTalkpages);function DeleteTalkpages(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,DeleteTalkpages),(_this=_super.call(this,model,widgets)).model.setName("Deleting talk ".concat(1<model.pageNames.length?"pages":"page")),_this}return Constructor=DeleteTalkpages,(protoProps=]:"})},function(){return _this2.model.trackStep()},function(code,error,title){return _this2.handlePageError(code,error,title,"delete")}).catch(function(errortype,code,error){_this2.handleOverallError(errortype,code,error)})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),DeleteTalkpages}();exports.default=DeleteTalkpages},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.includes":111,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.string.includes":134}],170:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var Disambiguate=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(Disambiguate,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(Disambiguate);function Disambiguate(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Disambiguate),(_this=_super.call(this,model,widgets)).model.setName("Updating ".concat(1<model.pageNames.length?"pages":"page")),_this}return Constructor=Disambiguate,(protoProps=*}}/i.test(updatedWikitext)?updatedWikitext.trim():updatedWikitext.trim()+"\n{{Disambiguation cleanup|{{subst:DATE}}}}",summary:this.model.getEditSummary()}}},{key:"doTask",value:function(){var _this2=this,pageNames=this.model.getResolvedPageNames();return 0===pageNames.length?(this.model.addWarning("None found"),(0,_util.rejection)()):(this.model.setTotalSteps(pageNames.length),this.model.setDoing(),this.api.editWithRetry(pageNames,null,function(page){return _this2.transform(page)},function(){return _this2.model.trackStep()},function(code,error,title){return _this2.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this2.handleOverallError(errortype,code,error)}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Disambiguate}();exports.default=Disambiguate},{"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.includes":111,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139}],171:?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr||arr;if(null==_i)return;var _s,_e,_arr=,_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}var RelistInfo=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(RelistInfo,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(RelistInfo);function RelistInfo(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,RelistInfo),(_this=_super.call(this,model,widgets)).model.setName("Preparing to relist"),_this}return Constructor=RelistInfo,(protoProps=\]/g),relistNumber=relists?relists.length+1:1;return"{{subst:Relist|1=".concat(this.model.result.getRelistComment(),"|2=").concat(relistNumber,"}}")}},{key:"getRelistWikitext",value:function(content){var _this2=this,heading=content.slice(0,content.indexOf("\n")),newWikitext=content.trim()+"\n".concat(this.getRelistTemplate(content),"\n"),oldLogWikitext="";switch(this.model.venue.type){case"afd":newWikitext=newWikitext.replace(/\]")).replace(/__RATIONALE__/,".").replace(/__SIG__/,_config.default.user.sig),pagesList=this.model.discussion.pages.map(function(page){return _this2.model.venue.wikitext.pagelinks.replace("__PAGE__",page.getMain()+(828===page.getNamespaceId()?"|module=Module":""))}).join("");oldLogWikitext="".concat(heading,"\n").concat(xfdCloseTop,"\n").concat(pagesList+this.model.venue.wikitext.closeBottom);break;case"mfd":var splitIndex=newWikitext.indexOf("\n",newWikitext.lastIndexOf(":{{pagelinks"));newWikitext="".concat(newWikitext.slice(0,splitIndex).trim(),"\n{{subst:mfdr}}\n").concat(newWikitext.slice(splitIndex+1).trim());break;case"rfd":var topWikitext="====".concat(this.model.discussion.sectionHeader,"===="),firstNomIndex=content.indexOf("*<span id="),lastNomIndex=content.lastIndexOf("*<span id=");if(firstNomIndex!==lastNomIndex){var sliceFrom=content.indexOf("\n",firstNomIndex-2),sliceTo=content.indexOf("\n",lastNomIndex);topWikitext+="\n<noinclude>"+content.slice(sliceFrom,sliceTo).replace(/\*<span/g,"<span").replace(/^(?!<span).*$\n?/gm,"").replace(/>.*$\s*/gm,"></span>").trim()+"</noinclude>"}oldLogWikitext="".concat(topWikitext,"\n{{subst:rfd relisted|page=").concat(RelistInfo.today,"|").concat(this.model.discussion.sectionHeader,"}}");break;case"cfd":oldLogWikitext="====".concat(this.model.discussion.sectionHeader,"====\n{{subst:cfd relisted|").concat(this.model.discussion.sectionHeader,"}}")}return{newWikitext:newWikitext,oldLogWikitext:oldLogWikitext}}},{key:"getLogInfo",value:function(embeddedinLogpage){var _this3=this;switch(this.model.venue.type){case"ffd":case"mfd":return{newLogEditType:"appendtext"};case"tfd":case"rfd":case"cfd":return this.api.get({action:"query",titles:this.todaysLogpage,prop:"revisions",rvprop:"content|timestamp",rvslots:"main",curtimestamp:1,formatversion:"2"}).then(function(response){return _this3.getNewLogInfo(response.query.pages,response.curtimestamp)});case"afd":return this.api.get({action:"query",titles:,prop:"revisions",rvprop:"content|timestamp",rvslots:"main",curtimestamp:1,formatversion:"2"}).then(function(response){return _this3.getTranscludingLogsInfo(response.query.pages,response.curtimestamp)});default:return(0,_util.rejection)("abort","Unknown XfD venue")}}},{key:"getNewLogInfo",value:function(page,curtimestamp){if(page.missing)return(0,_util.rejection)("abort","Today's log page does not yet exist");var newLogTimestamps={start:curtimestamp,base:page.revisions.timestamp},logWikitext=page.revisions.slots.main.content,h4_match=/====\s*(.*?)\s*====/.exec(logWikitext),h4=h4_match&&h4_match;return{newLogTimestamps:newLogTimestamps,newLogSection:h4?2:1,newLogEditType:h4&&"NEW NOMINATIONS"!==h4.toUpperCase()?"prependtext":"appendtext"}}},{key:"getTranscludingLogsInfo",value:function(pages,curtimestamp){if(1===pages.length)return(0,_util.rejection)("abort","Already transcluded to today's log page");var _ref2=_slicedToArray(pages.title===this.todaysLogpage?pages:pages.slice().reverse(),2),newLogpage=_ref2,oldLogpage=_ref2,newLogContent=newLogpage.revisions.slots.main.content,oldLogContent=oldLogpage.revisions.slots.main.content,newLogTimestamps={start:curtimestamp,base:newLogpage.revisions.timestamp},oldLogTimestamps={start:curtimestamp,base:oldLogpage.revisions.timestamp},escapedTitle=_globals.mw.util.escapeRegExp(this.model.discussion.discussionPageName),hiddenOnOldLogpage=new RegExp("\x3c!-- ?\\{\\{"+escapedTitle+"\\}\\} ?--\x3e","i"),listedOnNewLogpage=new RegExp("\\{\\{"+escapedTitle+"\\}\\}","i");if(hiddenOnOldLogpage.test(oldLogContent)||listedOnNewLogpage.test(newLogContent))return(0,_util.rejection)("abort","Discussion has been relisted already");var listCommentPattern=new RegExp("\x3c!-- Add new entries to the TOP of the following list --\x3e","i"),newLogWikitext=newLogContent.replace(listCommentPattern,"\x3c!-- Add new entries to the TOP of the following list --\x3e\n{{"+this.model.discussion.discussionPageName+"}}\x3c!--Relisted--\x3e"),transclusionPattern=new RegExp("(\\{\\{"+escapedTitle+"\\}\\})","i"),oldlogTransclusion=transclusionPattern.test(oldLogContent),oldLogWikitext=oldLogContent.replace(transclusionPattern,"\x3c!-- $1 --\x3e");return{oldlogtitle:oldLogpage.title,oldlogTransclusion:oldlogTransclusion,oldLogWikitext:oldLogWikitext,oldLogTimestamps:oldLogTimestamps,newLogWikitext:newLogWikitext,newLogTimestamps:newLogTimestamps,newLogSection:1,newLogEditType:"text"}}},{key:"getEmbeddedInLogpages",value:function(embeddedin){var _this4=this;return embeddedin.filter(function(ei){return ei.title.includes(_this4.model.venue.path)})}},{key:"doTask",value:function(){var _this5=this;return this.model.setTotalSteps(1),this.model.setDoing(),this.api.get(this.query).then(function(response){if(_this5.model.aborted)return(0,_util.rejection)("aborted");var content=response.query.pages.revisions.slots.main.content;if(content.includes("xfd-closed"))return(0,_util.rejection)("abort","Discussion is already closed");var embeddedinLogpage,discussionPageTimestamps={start:response.curtimestamp,base:response.query.pages.revisions.timestamp},_this5$getRelistWikit=_this5.getRelistWikitext(content),newWikitext=_this5$getRelistWikit.newWikitext,oldLogWikitext=_this5$getRelistWikit.oldLogWikitext;if(response.query.embeddedin){var embeddedInLogpages=response.query.embeddedin.filter(function(ei){return ei.title.includes(_this5.model.venue.path)});if(0===embeddedInLogpages.length)return(0,_util.rejection)("abort","Old log page not found");1<embeddedInLogpages.length&&embeddedInLogpages.slice(1).forEach(function(logpage){return _this5.model.addWarning("Note: transcluded on additional log page: "+(0,_util.makeLink)(logpage.title,logpage.title.replace(_this5.model.venue.path,"")))}),embeddedinLogpage=embeddedInLogpages}return _globals.$.when(_this5.getLogInfo(embeddedinLogpage)).then(function(logInfo){if(_this5.model.aborted)return(0,_util.rejection)("abort");_this5.model.discussion.setRelistInfo(_objectSpread({today:RelistInfo.today,discussionPageTimestamps:discussionPageTimestamps,newWikitext:newWikitext,oldLogWikitext:oldLogWikitext},logInfo)),_this5.model.trackStep()})}).catch(function(code,error){return _this5.model.setAborted(),"abort"===code?_this5.model.addError("Aborted".concat("string"==typeof error?": "+error:".")):(_this5.model.addError("Aborted: ".concat(code||"unknown"," error")),_this5.logError(code,error)),(0,_util.rejection)()})}},{key:"todaysLogpage",get:function(){return this.model.venue.path+RelistInfo.today}},{key:"query",get:function(){var queryBase={action:"query",titles:this.model.discussion.discussionPageName,prop:"revisions",indexpageids:1,rvprop:"content|timestamp",rvslots:"main",curtimestamp:1,formatversion:"2"};return"afd"===this.model.venue.type?_objectSpread({},queryBase,{list:"embeddedin",eititle:this.model.discussion.discussionPageName,einamespace:this.model.venue.ns_logpages,eifilterredir:"nonredirects",eilimit:500}):_objectSpread({},queryBase,{rvsection:this.model.discussion.sectionNumber})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),RelistInfo}();_defineProperty(exports.default=RelistInfo,"today",(0,_util.ymdDateString)(new Date))},{"../../../globals":1,"../../config":221,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.index-of":112,"core-js/modules/es.array.join":114,"core-js/modules/es.array.last-index-of":115,"core-js/modules/es.array.map":116,"core-js/modules/es.array.reverse":118,"core-js/modules/es.array.slice":119,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.constructor":131,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.regexp.to-string":133,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.match":135,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],172:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Redirection(config){_classCallCheck(this,Redirection),this.from=config.from,this.to=config.to,this.deleteFirst=config.deleteFirst,this.isSoft=config.isSoft,this.rcats=config.options&&config.options.rcats}var Redirect=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(Redirect,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(Redirect);function Redirect(model,widgets){var _this;_classCallCheck(this,Redirect);var plural=1<(_this=_super.call(this,model,widgets)).model.pageNames.length,label=_this.redirections.find(function(redirection){return redirection.deleteFirst})?"Deleting ".concat(plural?"pages":"page"," and replacing with ").concat(plural?"redirects":"redirect"):"Replacing ".concat(plural?"pages":"page"," with ").concat(plural?"redirects":"redirect");return _this.model.setName(label),_this}return Constructor=Redirect,(protoProps=]").concat(rcatshell);return{text:text,summary:this.model.getEditSummary()}}},{key:"redirect",value:function(redirection){var _this2=this;return this.api.editWithRetry(redirection.from,null,function(){return _this2.transform(redirection)},function(){return _this2.model.trackStep()},function(code,error,title){return _this2.handlePageError(code,error,title)}).catch(function(errortype,code,error){"read"===errortype&&(_this2.model.addError("".concat(code||"unknown"," error: Could not read contents of ").concat((0,_util.makeLink)(redirection.from))),_this2.model.trackStep("failed"),_this2.logError(code,error))})}},{key:"deleteAndRedirect",value:function(redirection){var _this3=this;return this.api.deleteWithRetry(redirection.from,{reason:this.model.getEditSummary({short:!0})}).then(function(){return _this3.redirect(redirection)},function(_errortype,code,error){_this3.model.addError("".concat(code||"unknown"," error: Could not delete ").concat((0,_util.makeLink)(redirection.from))),_this3.model.trackStep("failed"),_this3.logError(code,error)})}},{key:"doTask",value:function(){var _this4=this;return this.model.setTotalSteps(this.redirections.length),this.model.setDoing(),_globals.$.when.apply(null,this.redirections.map(function(redirection){return redirection.deleteFirst?_this4.deleteAndRedirect(redirection):_this4.redirect(redirection)}))}},{key:"redirections",get:function(){var _this5=this,targets=(0,_util.uniqueArray)(this.model.getPageResults().map(function(pageResult){return(0,_util.normalisePageName)(pageResult.targetPageName)}));return this.model.getPageResults().filter(function(pageResult){var resolvedPageName=_this5.model.discussion.redirects.resolveOne(pageResult.pageName);return!targets.includes(resolvedPageName)}).map(function(pageResult){return new Redirection({from:_this5.model.discussion.redirects.resolveOne(pageResult.pageName),to:(0,_util.normalisePageName)(pageResult.targetPageName),deleteFirst:pageResult.isDeleteFirst(),isSoft:pageResult.isSoft(),options:_this5.model.options.getOptionValues(pageResult.resultName)})})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Redirect}();exports.default=Redirect},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.string.includes":134}],173:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var RemoveCircularLinks=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(RemoveCircularLinks,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(RemoveCircularLinks);function RemoveCircularLinks(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,RemoveCircularLinks),(_this=_super.call(this,model,widgets)).model.setName("Unlinking circular links on redirect target"),_this}return Constructor=RemoveCircularLinks,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),RemoveCircularLinks}();exports.default=RemoveCircularLinks},{"../../../globals":1,"../../unlink":224,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.map":116,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.string.includes":134}],174:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var RemoveNomTemplates=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(RemoveNomTemplates,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(RemoveNomTemplates);function RemoveNomTemplates(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,RemoveNomTemplates),(_this=_super.call(this,model,widgets)).model.setName("Updating ".concat(1<model.pageNames.length?"pages":"page")),_this}return Constructor=RemoveNomTemplates,staticProps=,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),RemoveNomTemplates}();exports.default=RemoveNomTemplates},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.find":108,"core-js/modules/es.array.map":116,"core-js/modules/es.object.set-prototype-of":127}],175:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var TagTalkWithSpeedy=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(TagTalkWithSpeedy,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(TagTalkWithSpeedy);function TagTalkWithSpeedy(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TagTalkWithSpeedy),(_this=_super.call(this,model,widgets)).model.setName("Tagging talk ".concat(1<model.pageNames.length?"pages":"page")),_this}return Constructor=TagTalkWithSpeedy,(protoProps=] Speedy deletion nomination, per"}),nocreate:1}}},{key:"doTask",value:function(){var _this2=this,talkPages=this.model.getResolvedTalkpagesNames();if(0===talkPages.length)return this.model.addWarning("None found"),(0,_util.rejection)();this.model.setTotalSteps(talkPages.length);var talkPagesToTag=talkPages.filter(function(talkPage){return _this2.verifyPage(talkPage)});return 0===talkPagesToTag.length?_globals.$.Deferred().resolve("Skipped"):(this.model.setDoing(),this.api.editWithRetry(talkPagesToTag,null,function(page){return _this2.transform(page)},function(){return _this2.model.trackStep()},function(code,error,title){return _this2.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this2.handleOverallError(errortype,code,error)}))}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),TagTalkWithSpeedy}();exports.default=TagTalkWithSpeedy},{"../../../globals":1,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.includes":111,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.string.includes":134}],176:||null!=iter)return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var UnlinkBacklinks=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(UnlinkBacklinks,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(UnlinkBacklinks);function UnlinkBacklinks(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UnlinkBacklinks),(_this=_super.call(this,model,widgets)).model.setName("Unlinking backlinks"),_this.finishedReadingApi=_globals.$.Deferred(),_this.queuedPrompts=,_this.redirectPageNames=,_this}return Constructor=UnlinkBacklinks,staticProps=).map(function(subpage){return subpage.title}):page.title})}},{key:"findRedirectResults",value:function(list){return list.filter(function(page){return page.redirect}).map(function(page){return page.title})}},{key:"ignoreResultTitle",value:function(title){return.includes(title.split("/"))}}],(protoProps=?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},query,{list:"backlinks|imageusage",iufilterredir:"nonredirects",iulimit:"max",iunamespace:this.model.venue.ns_unlink,iuredirect:1,iutitle:pageName}):query}},{key:"getUnlinkPages",value:function(backlinks,imageusage){var blPageNames=(0,_util.uniqueArray)(UnlinkBacklinks.flattenResults(backlinks)).filter(function(title){return!UnlinkBacklinks.ignoreResultTitle(title)}),iuPageNames=(0,_util.uniqueArray)(UnlinkBacklinks.flattenResults(imageusage)).filter(function(title){return!UnlinkBacklinks.ignoreResultTitle(title)});return{unlinkPageNames:(0,_util.uniqueArray)(.concat(_toConsumableArray(blPageNames),_toConsumableArray(iuPageNames))),redirectPageNames:UnlinkBacklinks.findRedirectResults(.concat(_toConsumableArray(backlinks),_toConsumableArray(imageusage))),hasImageUsage:0<iuPageNames.length}}},{key:"processSelection",value:function(selection){var _this2=this;if(this.model.aborted)return(0,_util.rejection)("aborted");if(selection&&"accept"===selection.action){if(selection.items&&0!==selection.items.length){this.model.setTotalSteps(selection.items.length);var editPromises=selection.items.reduce(function(batches,title){return 50===batches.length?batches=:batches.push(title),batches},]).map(function(batch){return _this2.api.editWithRetry(batch,{prop:"categories|revisions",clcategories:"Category:All disambiguation pages"},function(page){return _this2.transform(page)},function(){return _this2.model.trackStep()},function(code,error,title){return _this2.handlePageError(code,error,title)}).catch(function(errortype,code,error){return _this2.handleOverallError(errortype,code,error)})});return _globals.$.when.apply(null,editPromises)}this.model.addWarning("No pages selected")}else this.model.addWarning("Cancelled by user")}},{key:"transform",value:function(page){var _this3=this;if(this.model.aborted)return(0,_util.rejection)("aborted");var newWikitext=(0,_unlink.default)(page.content,.concat(_toConsumableArray(this.model.getResolvedPageNames()),_toConsumableArray(this.redirectPageNames)),page.ns,!!page.categories);return newWikitext===page.content?(0,_util.rejection)("skippedNoLinks"):this.processListItems(page.title,newWikitext).then(function(updatedWikitext,isMajorEdit){var prefix="Removing link(s)"+(isMajorEdit?" / list item(s)":"")+((0,_util.isFile)(page.title)?" / file usage(s)":""),req={text:(0,_util.cleanupVoidTemplates)(updatedWikitext),summary:_this3.model.getEditSummary({prefix:prefix}),nocreate:1};return isMajorEdit||(req.minor=1),req})}},{key:"processListItems",value:function(pageTitle,wikitext,isMajorEdit){var _this4=this;if(this.model.aborted)return(0,_util.rejection)("aborted");var linesToReview=/^{{subst:void}}(.*)$/m.exec(wikitext);if(!linesToReview)return _globals.$.Deferred().resolve(wikitext,!!isMajorEdit).promise();var allHeadings=wikitext.split("{{subst:void}}").match(/^=+.+?=+$/gm),heading=allHeadings?allHeadings.replace(/(^=* *| *=*$)/g,"").replace(/\{\{.*?\}\}/g,"").replace(/\]*?)\|(]*?)\]\]/,"$2").replace(/\]*?)\]\]/,"$1"):null,message="<p>A backlink has been removed from the following list item:</p>\n<strong>List:</strong> ]\n<pre>").concat(linesToReview,"</pre>\n<p>Please check if the item matches the list's ] before deciding to keep or remove the item from the list.</p>");return this.queueMultiButtonConfirm({title:"Review unlinked list item",message:message,actions:,size:"large",scrolled:!0}).then(function(action){return"keep"===action?wikitext=wikitext.replace(/^{{subst:void}}/m,""):"keep-cite"===action?wikitext=wikitext.replace(/^{{subst:void}}(.*)(\n?)/m,"$1{{subst:Citation needed}}$2"):(wikitext=wikitext.replace(/^{{subst:void}}.*\n?/m,""),isMajorEdit=!0),_this4.processListItems(pageTitle,wikitext,isMajorEdit)})}},{key:"queueMultiButtonConfirm",value:function(params){var _this5=this,previousPrompt=this.queuedPrompts.length&&this.queuedPrompts,prompt=_globals.$.when(previousPrompt).then(function(){return _this5.aborted?(0,_util.rejection)("aborted"):(0,_util.multiButtonConfirm)(params)});return this.queuedPrompts.push(prompt),prompt}},{key:"doTask",value:function(){var _this6=this;return _globals.$.when.apply(null,this.model.getResolvedPageNames().map(function(pageName){return _this6.api.queryWithContinue(_this6.getQuery(pageName))})).then(function(){return Array.prototype.slice.call(arguments).reduce(_util.recursiveMerge)}).then(function(result){if(_this6.model.setDoing(),_this6.model.aborted)return(0,_util.rejection)("aborted");if(result.imageusage||(result.imageusage=),result.backlinks.length+result.imageusage.length===0)return _this6.model.addWarning("none found"),_this6.model.setTotalSteps(1),_this6.model.trackStep("skipped"),"Skipped";var _this6$getUnlinkPages=_this6.getUnlinkPages(result.backlinks,result.imageusage),unlinkPageNames=_this6$getUnlinkPages.unlinkPageNames,redirectPageNames=_this6$getUnlinkPages.redirectPageNames,hasImageUsage=_this6$getUnlinkPages.hasImageUsage;_this6.redirectPageNames=redirectPageNames;var title='"Unlink backlinks'.concat(hasImageUsage?" (and file usage)":"",":"),messages=]","<hr>"];return(0,_util.multiCheckboxMessageDialog)({title:title,message:_globals.$.apply(void 0,messages),items:unlinkPageNames.map(function(pageName){return{data:pageName,label:pageName,selected:!0}}),size:"medium",scrolled:!0}).then(function(selection){return _this6.processSelection(selection)})})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UnlinkBacklinks}();exports.default=UnlinkBacklinks},{"../../../globals":1,"../../unlink":224,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.flat-map":109,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.map":116,"core-js/modules/es.array.reduce":117,"core-js/modules/es.array.slice":119,"core-js/modules/es.array.unscopables.flat-map":121,"core-js/modules/es.object.set-prototype-of":127,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.match":135,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.split":138}],177:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var UpdateDiscussion=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(UpdateDiscussion,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(UpdateDiscussion);function UpdateDiscussion(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UpdateDiscussion),(_this=_super.call(this,model,widgets)).model.setName("Updating discussion"),_this}return Constructor=UpdateDiscussion,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UpdateDiscussion}();exports.default=UpdateDiscussion},{"../../config":221,"../../util":225,"../TaskItemController":160,"core-js/modules/es.object.set-prototype-of":127}],178:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var UpdateNewLogPage=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(UpdateNewLogPage,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(UpdateNewLogPage);function UpdateNewLogPage(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UpdateNewLogPage),(_this=_super.call(this,model,widgets)).model.setName("Adding to today's log page"),_this}return Constructor=UpdateNewLogPage,(protoProps=]"):'"'.concat(this.model.discussion.sectionHeader,'"')," ").concat(_config.default.script.advert)};return params="afd"===this.model.venue.type?relistInfo.newLogWikitext:("appendtext"===relistInfo.newLogEditType?"\n":"")+relistInfo.newWikitext,relistInfo.newLogTimestamps&&(params.basetimestamp=relistInfo.newLogTimestamps.base,params.starttimestamp=relistInfo.newLogTimestamps.start),/(tfd|rfd|cfd)/.test(this.model.venue.type)&&(params.section=relistInfo.newLogSection),params}},{key:"doTask",value:function(){var _this2=this;if(this.aborted)return(0,_util.rejection)("aborted");this.model.setTotalSteps(1),this.model.setDoing();var params=this.getParams();return this.api.postWithToken("csrf",params).then(function(){return _this2.model.trackStep()},function(code,error){return _this2.handlePageError(code,error,params.title),(0,_util.rejection)()})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UpdateNewLogPage}();exports.default=UpdateNewLogPage},{"../../config":221,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.object.set-prototype-of":127}],179:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var UpdateNewLogPage=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(UpdateNewLogPage,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(UpdateNewLogPage);function UpdateNewLogPage(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UpdateNewLogPage),(_this=_super.call(this,model,widgets)).model.setName("Updating link in nomination ".concat(1<model.discussion.pages.length?"templates":"template")),_this}return Constructor=UpdateNewLogPage,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UpdateNewLogPage}();exports.default=UpdateNewLogPage},{"../../config":221,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.array.map":116,"core-js/modules/es.object.set-prototype-of":127}],180:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var UpdateOldLogPage=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(UpdateOldLogPage,_TaskItemController2);var Constructor,protoProps,staticProps,_super=_createSuper(UpdateOldLogPage);function UpdateOldLogPage(model,widgets){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UpdateOldLogPage),(_this=_super.call(this,model,widgets)).model.setName("Removing from old log page"),_this}return Constructor=UpdateOldLogPage,(protoProps=] ").concat(_config.default.script.advert):"/* ".concat(this.model.discussion.sectionHeader," */ Relisted on ] ").concat(_config.default.script.advert)};return relistInfo.oldLogTimestamps&&(params.basetimestamp=relistInfo.oldLogTimestamps.base,params.starttimestamp=relistInfo.oldLogTimestamps.start),"afd"!==this.model.venue.type&&(params.section=this.model.discussion.sectionNumber),params}},{key:"doTask",value:function(){var _this2=this;if(this.aborted)return(0,_util.rejection)("aborted");if(this.model.setTotalSteps(1),"afd"===this.model.venue.type&&!this.model.discussion.relistInfo.oldlogTransclusion)return this.model.addError("Transclusion not found on old log page; could not be commented out"),this.model.trackStep("failed"),(0,_util.rejection)();this.model.setDoing();var params=this.getParams();return this.api.postWithToken("csrf",params).then(function(){return _this2.model.trackStep()},function(code,error){return _this2.handlePageError(code,error,params.title),(0,_util.rejection)()})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UpdateOldLogPage}();exports.default=UpdateOldLogPage},{"../../config":221,"../../util":225,"../TaskItemController":160,"core-js/modules/es.array.concat":104,"core-js/modules/es.object.set-prototype-of":127}],181:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var UnlinkSummaryPanelController=function(){function UnlinkSummaryPanelController(model,widget){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UnlinkSummaryPanelController),this._requestId=0,this.model=model,this.summaryInput=widget.summaryInput,this.summaryInputField=widget.summaryInputField,this.summaryPreview=widget.summaryPreview,this.summaryPreviewField=widget.summaryPreviewField,this.model.connect(this,{update:"updateFromModel"}),this.summaryInput.connect(this,{change:"onInputChange",enter:"onInputEnter"}),this.updateFromModel()}var Constructor,protoProps,staticProps;return Constructor=UnlinkSummaryPanelController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UnlinkSummaryPanelController}();_globals.OO.initClass(UnlinkSummaryPanelController);var _default=UnlinkSummaryPanelController;exports.default=_default},{"../../globals":1,"../api":220,"../config":221,"../util":225,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.object.define-property":125}],182:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _default=function(){function UnlinkWindowController(model,window){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UnlinkWindowController),this.model=model,this.window=window,this.stackLayout=window.stackLayout,this.actions=window.actions,this.model.connect(this,{update:"updateFromModel",resize:this.window.updateSize}),this.updateFromModel()}var Constructor,protoProps,staticProps;return Constructor=UnlinkWindowController,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UnlinkWindowController}();exports.default=_default},{"../../globals":1,"core-js/modules/es.object.define-property":125}],183:,184:=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var Discussion=function(){function Discussion(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Discussion),_globals.OO.EventEmitter.call(this),this.$headlineSpan=config.$headlineSpan,this.id=config.id,this.venue=config.venue,this.pages=config.pages||,this.action=config.action||"",this.redirects=new _RedirectList.default,this.discussionPageName=config.discussionPageName,this.sectionHeader=config.sectionHeader,this.sectionNumber=config.sectionNumber,this.firstCommentDate=config.firstCommentDate,this.isOld=config.isOld,this.isRelisted=config.isRelisted,this.userIsSysop=config.userIsSysop,this.classes=config.classes,this.status="Loading...",this.showStatus=!0}var Constructor,protoProps,staticProps;return Constructor=Discussion,(protoProps=?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},relistInfo)}},{key:"setNominationDate",value:function(nominationDate){this.nominationDate=nominationDate,this.firstCommentDate||(this.firstCommentDate=nominationDate),this.emit("update")}},{key:"setStatusReady",value:function(){!this.userIsSysop&&50<this.pages.length?this.status="":(this.status="",this.showStatus=!1),this.emit("update")}},{key:"setStatusError",value:function(code){this.status="".concat(code||"unknown"," error retrieving page information (reload the page to try again)"),this.emit("update")}},{key:"setWindowOpened",value:function(type){this.type=type,this.status=type.slice(0,1).toUpperCase()+type.slice(1).replace(/e$/,"")+"ing discussion...",this.showStatus=!0,this.emit("update")}},{key:"setClosedWindowData",value:function(windowData){switch(!0){case windowData&&windowData.aborted:this.status="<strong>Aborted</strong> during ".concat(this.type,"; check ").concat((0,_util.makeLink)("Special:MyContributions","your contributions")," to see which actions were already completed.");break;case windowData&&windowData.success:var actioned=this.type.slice(0,1).toUpperCase()+this.type.slice(1).replace(/e$/,"")+"ed",as=windowData.result?' as "'.concat(windowData.result,'"'):"";this.status="<strong>".concat(actioned,"</strong>").concat(as," (reload page to see the actual ").concat(this.type,")"),this.actioned=!0;break;default:return void this.setStatusReady()}this.finished=!0,this.showStatus=!0,this.emit("update")}},{key:"startClosing",value:function(){this.emit("update")}},{key:"startRelisting",value:function(){this.emit("update")}},{key:"startQuickClosing",value:function(result){console.log(result),this.emit("update")}},{key:"showButtons",get:function(){return!this.showStatus}},{key:"showQuickClose",get:function(){return 0<this.pages.length}},{key:"pagesNames",get:function(){return this.pages.map(function(page){return page.getPrefixedText()})}},{key:"discussionSubpageName",get:function(){return this.venue.hasIndividualSubpages?this.discussionPageName.replace(this.venue.subpagePath,""):this.discussionPageName.replace(this.venue.path,"")}},{key:"discussionPageLink",get:function(){return this.venue.hasIndividualSubpages?this.discussionPageName:this.discussionPageName+"#"+(0,_util.encodeForWikilinkFragment)(this.sectionHeader)}},{key:"talkpages",get:function(){return this.pages.filter(function(page){return page.cahHaveTalkPage()&&!page.isTalkPage()}).map(function(page){return page.getTalkPage()})}},{key:"talkpagesNames",get:function(){return this.talkpages.map(function(page){return page.getPrefixedText()})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Discussion}();_globals.OO.initClass(Discussion),_globals.OO.mixinClass(Discussion,_globals.OO.EventEmitter);var _default=Discussion;exports.default=_default},{"../../globals":1,"../util":225,"./RedirectList":191,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.replace":136}],185:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var obj,key,value,MainWindowModel=function(){function MainWindowModel(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,MainWindowModel),_globals.OO.EventEmitter.call(this);var type=config.type,userIsSysop=config.discussion.userIsSysop;this.discussion=config.discussion,this.result=new _Result.default({discussion:this.discussion,type:type,userIsSysop:userIsSysop}),this.options=new _Options.default({result:this.result,venue:this.discussion.venue,userIsSysop:userIsSysop}),this.sanityChecks=new _SanityChecks.default({discussion:this.discussion,result:this.result,options:this.options}),this.taskList=new _TaskList.default({discussion:this.discussion,result:this.result,options:this.options,type:type,userIsSysop:userIsSysop}),this.preferences=new _PrefsGroup.default({userIsSysop:userIsSysop}),this.heights={},this.type=config.type,config.quick?(this.isQuick=!0,this.mode="tasks"):"relist"===this.type?this.mode="relist":1<this.discussion.pages.length?this.mode="multimodeAvailable":this.mode="normal",this.previousMode="",this.currentPanel=config.quick?"taskListPanel":"resultPanel",this.userIsSysop=config.userIsSysop,this.result.connect(this,{update:,resize:}),this.options.connect(this,{update:,itemUpdate:}),this.taskList.connect(this,{update:}),this.preferences.connect(this,{update:,itemUpdate:,resize:})}var Constructor,protoProps,staticProps;return Constructor=MainWindowModel,(protoProps=||MainWindowModel.defaultHeight;suggestedHeight<currentHeight&&currentHeight-suggestedHeight<50||(this.heights=suggestedHeight,this.emit("resize"))}},{key:"_setMode",value:function(mode){var currentMode=this.mode,nextMode="_previous"===mode?this.previousMode:mode;this.previousMode=currentMode,this.mode=nextMode}},{key:"showPrefs",value:function(){var _this=this;this._setMode("prefs"),this.currentPanel="prefsPanel",this.emit("update"),setTimeout(function(){_this.heights+=15,_this.emit("update")},100)}},{key:"closePrefs",value:function(){this._setMode("_previous"),this.currentPanel="resultPanel",this.emit("update")}},{key:"startTasks",value:function(){this._setMode("tasks"),this.currentPanel="taskListPanel",this.emit("update"),this.taskList.startTasks()}},{key:"setMultimode",value:function(active){this._setMode("multimode".concat(active?"Active":"Available")),this.result.setMultimode(active),this.emit("update")}},{key:"showOptions",value:function(){this._setMode("options"),this.currentPanel="optionsPanel",this.options.onResultUpdate(),this.emit("update")}},{key:"showResult",value:function(){this._setMode("_previous"),this.currentPanel="resultPanel",this.emit("update")}},{key:"abortTasks",value:function(){this.taskList.abortTasks()}},{key:"actionAbilities",get:function(){return{savePrefs:this.preferences.changed,next:this.result.isValid,save:"options"===this.mode?this.options.isValid:this.result.isValid,finish:this.taskList.done||this.taskList.aborted,closePrefs:!0,defaultPrefs:!this.preferences.allHaveDefaultValues(),back:!0,abort:!this.taskList.finished&&!this.taskList.aborted,showPrefs:!0,multimode:!0,singlemode:!0}}},{key:"canClose",get:function(){return"tasks"!==this.mode||this.taskList.finished||this.taskList.aborted}},{key:"_heightKey",get:function(){return this.currentPanel+"_"+this.mode}},{key:"height",get:function(){return this.heights||MainWindowModel.defaultHeight}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),MainWindowModel}();value=200,(key="defaultHeight")in(obj=MainWindowModel)?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,_globals.OO.initClass(MainWindowModel),_globals.OO.mixinClass(MainWindowModel,_globals.OO.EventEmitter);var _default=MainWindowModel;exports.default=_default},{"../../globals":1,"./Options":186,"./PrefsGroup":188,"./Result":192,"./SanityChecks":195,"./TaskList":197,"core-js/modules/es.object.define-property":125}],186:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var Options=function(){function Options(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Options),_globals.OO.EventEmitter.call(this),_globals.OO.EmitterList.call(this),this.result=config.result,this.venue=config.venue,this.userIsSysop=config.userIsSysop,this.result.connect(this,{update:"onResultUpdate"})}var Constructor,protoProps,staticProps;return Constructor=Options,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Options}();_globals.OO.initClass(Options),_globals.OO.mixinClass(Options,_globals.OO.EventEmitter),_globals.OO.mixinClass(Options,_globals.OO.EmitterList);var _default=Options;exports.default=_default},{"../../globals":1,"./OptionsItem":187,"core-js/modules/es.array.every":105,"core-js/modules/es.array.find":108,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.iterator":113,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125,"core-js/modules/es.object.to-string":128,"core-js/modules/es.string.includes":134,"core-js/modules/web.dom-collections.iterator":141}],187:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("../prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr||arr;if(null==_i)return;var _s,_e,_arr=,_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var OptionsItem=function(){function OptionsItem(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,OptionsItem),_globals.OO.EventEmitter.call(this),this.result=config.result,this.actions=(0,_data.getRelevantActions)(config.venueType,config.userIsSysop,config.result),this._options=(0,_data.getRelevantOptions)(config.venueType,config.userIsSysop,this.actions),this.selectedActionName=this.actions.name,"tfd"===config.venueType&&"delete"===config.result&&(this.selectedActionName=prefs.get("tfdDeleteAction"));var unlinkOptionIndex=this._options.findIndex(function(option){return"unlink"===option.name});-1!==unlinkOptionIndex&&(this._options.value=prefs.get("unlinkBacklinks"))}var Constructor,protoProps,staticProps;return Constructor=OptionsItem,staticProps=.map(function(value){return Array.isArray(value)?value.join("|"):value}),2);return _map2===_map2}}],(protoProps=}},{key:"isValid",get:function(){return!!this.selectedAction&&this.options.every(function(option){return null!==option.value&&void 0!==option.value})}},{key:"values",get:function(){var values={action:this.selectedAction&&this.selectedAction.name};return this.options.forEach(function(option){values=option.value}),values}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),OptionsItem}();_globals.OO.initClass(OptionsItem),_globals.OO.mixinClass(OptionsItem,_globals.OO.EventEmitter);var _default=OptionsItem;exports.default=_default},{"../../globals":1,"../data":222,"../prefs":223,"core-js/modules/es.array.every":105,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.find-index":107,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125,"core-js/modules/es.string.includes":134,"core-js/modules/web.dom-collections.for-each":140}],188:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("../prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PrefsGroup=function(){function PrefsGroup(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PrefsGroup),_globals.OO.EventEmitter.call(this),_globals.OO.EmitterList.call(this),this.userIsSysop=config.userIsSysop,this.addItems((0,_data.getRelevantPrefs)(config.userIsSysop).map(function(prefConfig){return new _PrefsItem.default(prefConfig,prefs.get(prefConfig.name))}))}var Constructor,protoProps,staticProps;return Constructor=PrefsGroup,(protoProps==item.value}),prefs}},{key:"resetValues",value:function(values){this.items.forEach(function(item){void 0!==values&&item.reset(values)}),this.emit("update")}},{key:"restoreDefaults",value:function(){this.items.forEach(function(item){return item.restoreDefault()})}},{key:"allHaveDefaultValues",value:function(){return this.getItems().every(function(item){return item.hasDefaultValue()})}},{key:"onItemUpdate",value:function(){this.emit("itemUpdate")}},{key:"isValid",get:function(){return this.getItems().every(function(item){return item.isValid})}},{key:"changed",get:function(){return this.getItems().some(function(item){return item.changed})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),PrefsGroup}();_globals.OO.initClass(PrefsGroup),_globals.OO.mixinClass(PrefsGroup,_globals.OO.EventEmitter),_globals.OO.mixinClass(PrefsGroup,_globals.OO.EmitterList);var _default=PrefsGroup;exports.default=_default},{"../../globals":1,"../data":222,"../prefs":223,"./PrefsItem":189,"core-js/modules/es.array.every":105,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.map":116,"core-js/modules/es.array.some":120,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125,"core-js/modules/web.dom-collections.for-each":140}],189:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PrefsItem=function(){function PrefsItem(config,value){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PrefsItem),_globals.OO.EventEmitter.call(this),this.name=config.name,this.label=config.label,this.type=config.type,this.help=config.help,this.helpInline=config.helpInline,this.value=value,this.initialValue=value,this.options=config.options,this.min=config.min,this.max=config.max}var Constructor,protoProps,staticProps;return Constructor=PrefsItem,(protoProps=)}},{key:"hasDefaultValue",value:function(){return this.value===_data.defaultPrefValues}},{key:"isValid",get:function(){var _this=this;switch(this.type){case"number":return"number"==typeof this.value&&!isNaN(this.value)&&(void 0===this.min||this.min<=this.value)&&(void 0===this.max||this.max>=this.value);case"toggle":return"boolean"==typeof this.value;case"dropdown":return this.options.find(function(option){return option.data===_this.value})}return this.getItems().every(function(item){return item.isValid})}},{key:"changed",get:function(){return this.value!==this.initialValue}},{key:"errors",get:function(){return this.isValid?:}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),PrefsItem}();_globals.OO.initClass(PrefsItem),_globals.OO.mixinClass(PrefsItem,_globals.OO.EventEmitter),_globals.OO.mixinClass(PrefsItem,_globals.OO.EmitterList);var _default=PrefsItem;exports.default=_default},{"../../globals":1,"../data":222,"core-js/modules/es.array.every":105,"core-js/modules/es.array.find":108,"core-js/modules/es.function.name":123,"core-js/modules/es.number.constructor":124,"core-js/modules/es.object.define-property":125}],190:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var PrefsWindowModel=function(){function PrefsWindowModel(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PrefsWindowModel),_globals.OO.EventEmitter.call(this),this.preferences=new _PrefsGroup.default({userIsSysop:config.userIsSysop}),this.preferences.connect(this,{update:,itemUpdate:,resize:})}var Constructor,protoProps,staticProps;return Constructor=PrefsWindowModel,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),PrefsWindowModel}();_globals.OO.initClass(PrefsWindowModel),_globals.OO.mixinClass(PrefsWindowModel,_globals.OO.EventEmitter);var _default=PrefsWindowModel;exports.default=_default},{"../../globals":1,"./PrefsGroup":188,"core-js/modules/es.object.define-property":125}],191:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var RedirectList=function(){function RedirectList(redirections){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,RedirectList),this.list=Array.isArray(redirections)?redirections:,this.list.forEach(function(redirection){_globals.mw.Title.exist.set(_globals.mw.Title.newFromText(redirection.to).getPrefixedDb(),!0)})}var Constructor,protoProps,staticProps;return Constructor=RedirectList,(protoProps=)}},{key:"resolveTalks",value:function(pagesNames){return this.resolve(pagesNames).map(function(pageName){var title=_globals.mw.Title.newFromText(pageName);return title&&title.canHaveTalkPage()&&!title.isTalkPage()&&title.getTalkPage().getPrefixedText()}).filter(function(t){return!!t})}},{key:"resolveOneTalk",value:function(pagesName){var resolved=this.resolveTalks();return resolved.length?resolved:}},{key:"unresolve",value:function(pageNames){var _this2=this;return pageNames.map(function(pageName){var redirect=_this2.list.find(function(redirect){return redirect.to===pageName});return redirect?redirect.from:pageName})}},{key:"unresolveOne",value:function(pageName){return this.unresolve()}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),RedirectList}();exports.default=RedirectList},{"../../globals":1,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125,"core-js/modules/web.dom-collections.for-each":140}],192:=value,obj}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter||null!=iter)return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function makeLink(target,text){text=text||target;var url="https://wiki386.com/en/"+encodeURIComponent(String(target)).replace(/'/g,"%27").replace(/%20/g,"_").replace(/%3B/g,";").replace(/%40/g,"@").replace(/%24/g,"$").replace(/%2C/g,",").replace(/%2F/g,"/").replace(/%3A/g,":");return(0,_globals.$)("<a>").attr({href:url,target:"_blank"}).text(text)}var Result=function(){function Result(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Result),_globals.OO.EventEmitter.call(this),this.discussion=config.discussion,this.type=config.type,this.userIsSysop=config.userIsSysop;var availableResults=(0,_data.getRelevantResults)(this.discussion.venue.type,config.userIsSysop);if(this.singleModeResult=new _ResultItem.default({availableResults:availableResults}),this.singleModeResult.connect(this,{update:,softDeleteSelect:"onSoftDeleteSelect"}),this.multimodeResults=new _ResultList.default({availableResults:availableResults,pageNames:this.discussion.pagesNames}),this.multimodeResults.connect(this,{update:}),this.resultSummary="",this.isMultimode=!1,this.rationale="",this.newSentence=!0,this.topNotes=,0===this.discussion.pages.length)this.topNotes.push({name:"basicMode",title:"Discussion: ".concat(this.discussion.sectionHeader," (basic mode only)"),content:"Nominated pages were not detected.",expanded:!1});else{var pageCount=1===this.discussion.pages.length?"1 page":"".concat(this.discussion.pages.length," pages");this.topNotes.push({name:"discussionPages",title:"Discussion: ".concat(this.discussion.sectionHeader," (").concat(pageCount,")"),content:(0,_globals.$)("<ul>").append(this.discussion.pagesNames.map(function(pageName){return(0,_globals.$)("<li>").append(makeLink(pageName))})),expanded:!1})}this.userIsSysop||"close"!==this.type||this.topNotes.push({name:"nonAdminWarning",title:"Take care to avoid inappropriate non-administrator closes",content:(0,_globals.$)("<span>").append("See the ",makeLink("WP:NACD")," guideline for advice on appropriate and inappropriate closures."),expanded:!1})}var Constructor,protoProps,staticProps;return Constructor=Result,(protoProps=*]|*}))/g,"&#124;"):text);var isNewSentence=this.newSentence&&this.showNewSentenceOption;return"".concat(isNewSentence?".":"").concat(needsLinebreak?"\n":" ").concat(text)}},{key:"getRelistComment",value:function(){return this.getFormattedRationale("escaped")}},{key:"getFormattedResult",value:function(){return this.isMultimode?this.resultSummary.trim():this.singleModeResult.getResultText()}},{key:"getResultText",value:function(){return this.getFormattedResult()}},{key:"getFormattedTarget",value:function(format){return this.isMultimode?"":this.singleModeResult.getFormattedTarget(format)}},{key:"getResultsByPage",value:function(){var _this=this;return this.isMultimode?this.multimodeResults.getItems():this.discussion.pagesNames.map(function(pageName){return _ResultItem.default.newWithPageName(_this.singleModeResult,pageName)})}},{key:"setMultimode",value:function(active){this.isMultimode=!!active,this.emit("update")}},{key:"setNoteExpanded",value:function(noteName,isExpanded){var noteIndex=this.topNotes.findIndex(function(note){return note.name===noteName});if(-1===noteIndex)throw new Error("Note ".concat(noteName," not found"));this.topNotes=.concat(_toConsumableArray(this.topNotes.slice(0,noteIndex)),?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},this.topNotes,{expanded:isExpanded})],_toConsumableArray(this.topNotes.slice(noteIndex+1))),this.emit("update")}},{key:"setResultSummary",value:function(value){if(this.resultSummary===value)return!1;this.resultSummary=value,this.emit("update")}},{key:"copyResultsToRationale",value:function(){if(!this.isMultimode)return!1;var results=this.multimodeResults.getItems().map(function(result){var pageName,title,value,pageLink=(pageName=result.pageName,(title=_globals.mw.Title.newFromText(pageName))&&/^(File|Image|Category):.+/.test(title.getPrefixedText())?"]"):"]")),resultText=(value=result.getResultText()).slice(0,1).toUpperCase()+value.slice(1);if(!resultText)return"*''' ''' ".concat(pageLink,"\n");var formattedTarget=result.showTarget&&(result.getFormattedTarget()||"]");return"*'''".concat(resultText,"''' ").concat(pageLink).concat(formattedTarget?" to "+formattedTarget:"","\n")}).join("");this.rationale=results+this.rationale,this.emit("update")}},{key:"setRationale",value:function(value){if(this.rationale===value)return!1;this.rationale=value,this.emit("update")}},{key:"prependToRationale",value:function(value){this.setRationale((value+" "+this.rationale).trim())}},{key:"setNewSentence",value:function(isSelected){if(this.newSentence===isSelected)return!1;this.newSentence=isSelected,this.emit("update")}},{key:"onSoftDeleteSelect",value:function(){if(!this.rationale.includes(_data.softDeletionRationaleTemplate)){var pageName=this.discussion.pages.getPrefixedText(),nomLink=this.discussion.discussionPageLink,isMulti=1<this.discussion.pages.length;this.prependToRationale((0,_data.makeSoftDeleteRationale)(pageName,nomLink,isMulti))}}},{key:"uniqueSelectedResults",get:function(){var results=;return(this.isMultimode?this.multimodeResults.getItems():).forEach(function(modeResult){var selectedResult=modeResult.selectedResult,isDuplicate=selectedResult&&results.find(function(result){return result.name===selectedResult.name});selectedResult&&!isDuplicate&&results.push(selectedResult)}),results}},{key:"uniqueSelectedResultsNames",get:function(){return this.uniqueSelectedResults.map(function(data){return data.name})}},{key:"resultSummaryIsValid",get:function(){return!!this.resultSummary.trim()}},{key:"showNewSentenceOption",get:function(){return"close"===this.type}},{key:"showResultFieldset",get:function(){return"close"===this.type}},{key:"rationaleHeading",get:function(){return"close"===this.type?"Rationale":"Relist comment"}},{key:"showCopyButton",get:function(){return this.showResultFieldset&&this.isMultimode}},{key:"isValid",get:function(){return"relist"===this.type||(this.isMultimode?this.resultSummaryIsValid&&this.multimodeResults.getItems().every(function(result){return result.isValid()}):this.singleModeResult.isValid())}},{key:"previewWikitext",get:function(){if("relist"===this.type)return"{{Relist|1=".concat(this.getRelistComment(),"}}");var resultText=this.isMultimode?this.resultSummary.trim():this.singleModeResult.getResultText(),resultWikitext=resultText?"'''".concat(resultText,"'''"):"",targetWikitext=this.getFormattedTarget({prepend:" to "}),rationaleWikitext=this.getFormattedRationale("punctuated")||".";return"The result of the discussion was ".concat(resultWikitext).concat(targetWikitext).concat(rationaleWikitext)}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Result}();_globals.OO.initClass(Result),_globals.OO.mixinClass(Result,_globals.OO.EventEmitter);var _default=Result;exports.default=_default},{"../../globals":1,"../data":222,"./ResultItem":193,"./ResultList":194,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.every":105,"core-js/modules/es.array.find":108,"core-js/modules/es.array.find-index":107,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],193:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var ResultItem=function(){function ResultItem(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ResultItem),_globals.OO.EventEmitter.call(this),this.pageName=config.pageName,this.availableResults=config.availableResults,this.selectedResultName=config.selectedResultName||"",this.softResult=config.softResult||!1,this.speedyResult=config.speedyResult||!1,this.deleteFirstResult=config.deleteFirstResult||!1,this.targetPageName=config.targetPageName||"",this.customResultText=config.customResultText||""}var Constructor,protoProps,staticProps;return Constructor=ResultItem,staticProps=,(protoProps=]")}},{key:"isValid",value:function(){return!!this.selectedResult&&(!this.showTarget||this.targetIsValid)&&(!this.showCustomResult||this.customResultIsValid)}},{key:"isSpeedy",value:function(){return this.showSpeedyResult&&this.speedyResult}},{key:"isSoft",value:function(){return this.showSoftResult&&this.softResult}},{key:"isSoftDelete",value:function(){return this.isSoft()&&"delete"===this.selectedResultName}},{key:"isDeleteFirst",value:function(){return this.showDeleteFirstResult&&this.deleteFirstResult}},{key:"setPageName",value:function(pageName){this.pageName=pageName,this.emit("update")}},{key:"setSelectedResultName",value:function(name){this.selectedResultName=name,this.emit("update")}},{key:"setSoftResult",value:function(isSoft){this.softResult=!!isSoft,this.softResult&&(this.speedyResult=!1,this.deleteFirstResult=!1),this.emit("update"),this.isSoftDelete()&&this.emit("softDeleteSelect")}},{key:"setSpeedyResult",value:function(isSpeedy){this.speedyResult=!!isSpeedy,this.speedyResult&&(this.softResult=!1,this.deleteFirstResult=!1),this.emit("update")}},{key:"setDeleteFirstResult",value:function(isDeleteFirst){this.deleteFirstResult=!!isDeleteFirst,this.deleteFirstResult&&(this.softResult=!1,this.speedyResult=!1),this.emit("update")}},{key:"setTargetPageName",value:function(target){if(this.targetPageName===target)return!1;this.targetPageName=target,this.emit("update")}},{key:"setCustomResultText",value:function(text){if(this.customResultText===text)return!1;this.customResultText=text,this.emit("update")}},{key:"name",get:function(){return this.pageName}},{key:"resultName",get:function(){return this.selectedResultName}},{key:"selectedResult",get:function(){var _this=this;return this.availableResults.find(function(result){return result.name===_this.selectedResultName})}},{key:"showSpeedyResult",get:function(){return!!this.selectedResult&&!!this.selectedResult.allowSpeedy}},{key:"showSoftResult",get:function(){return!!this.selectedResult&&!!this.selectedResult.allowSoft}},{key:"showDeleteFirstResult",get:function(){return!!this.selectedResult&&!!this.selectedResult.allowDeleteFirst}},{key:"showResultOptions",get:function(){return this.showSpeedyResult||this.showSoftResult||this.showDeleteFirstResult}},{key:"showTarget",get:function(){return!!this.selectedResult&&!!this.selectedResult.requireTarget}},{key:"targetIsValid",get:function(){return ResultItem.validatePageName(this.targetPageName)}},{key:"showCustomResult",get:function(){return!!this.selectedResult&&"custom"===this.selectedResult.name}},{key:"customResultIsValid",get:function(){return ResultItem.validateNonEmpty(this.customResultText)}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),ResultItem}();_globals.OO.initClass(ResultItem),_globals.OO.mixinClass(ResultItem,_globals.OO.EventEmitter);var _default=ResultItem;exports.default=_default},{"../../globals":1,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.find":108,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125,"core-js/modules/es.string.trim":139}],194:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var ResultList=function(){function ResultList(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ResultList),_globals.OO.EventEmitter.call(this),_globals.OO.EmitterList.call(this),this.addItems(config.pageNames.map(function(pageName){return new _ResultItem.default({availableResults:config.availableResults,pageName:pageName})})),this.aggregate({update:"itemUpdate"}),this.connect(this,{itemUpdate:})}var Constructor,protoProps,staticProps;return Constructor=ResultList,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),ResultList}();_globals.OO.initClass(ResultList),_globals.OO.mixinClass(ResultList,_globals.OO.EventEmitter),_globals.OO.mixinClass(ResultList,_globals.OO.EmitterList);var _default=ResultList;exports.default=_default},{"../../globals":1,"./ResultItem":193,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125}],195:||null!=iter)return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var SanityChecks=function(){function SanityChecks(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,SanityChecks),_globals.OO.EventEmitter.call(this),this.discussion=config.discussion,this.result=config.result,this.options=config.options,this.showWarnings=!0,this.showRedirections=!0,this.result.connect(this,{update:"resetShowAll"}),this.options.connect(this,{update:"resetShowAll"})}var Constructor,protoProps,staticProps;return Constructor=SanityChecks,staticProps=:}},{key:"massActions",value:function(actions,numPages){return actions.some(function(action){return"noActions"!==action})&&3<numPages?:}},{key:"nominatedPagesNamespaces",value:function(pageNames,expectedNamespaceNumbers){if(!expectedNamespaceNumbers||!expectedNamespaceNumbers.length)return;var warnPages=pageNames.filter(function(pageName){return!expectedNamespaceNumbers.includes(_globals.mw.Title.newFromText(pageName).getNamespaceId())}).map(function(pageName){return"<li>".concat((0,_util.makeLink)(pageName),"</li>")});return warnPages.length?:}},{key:"targetsNamespaces",value:function(targets,expectedNamespaceNumbers){return expectedNamespaceNumbers&&expectedNamespaceNumbers.length?(0,_util.uniqueArray)(targets).filter(function(target){return!!target&&!expectedNamespaceNumbers.includes(_globals.mw.Title.newFromText(target).getNamespaceId())}).map(function(target){return"Target page ".concat((0,_util.makeLink)(target)," is not in the expected namespace.")}):}}],(protoProps=}),expectedNamespaces=this.discussion.venue.ns_number;return.concat(_toConsumableArray(SanityChecks.date(this.discussion.isOld,this.discussion.isRelisted)),_toConsumableArray(SanityChecks.massActions(actions,this.discussion.pages.length)),_toConsumableArray(SanityChecks.nominatedPagesNamespaces(this.discussion.pagesNames,expectedNamespaces)),_toConsumableArray(SanityChecks.targetsNamespaces(targets,expectedNamespaces)))}},{key:"getRedirections",value:function(options){return this.discussion.venue.expectRedirects?_globals.$.Deferred().resolve():_api.default.get({action:"query",titles:this.discussion.pagesNames,redirects:1,prop:"info",inprop:"talkid",format:"json",formatversion:"2"}).then(function(response){return options&&options.setExistences&&response.query.pages.forEach(function(page){var title=_globals.mw.Title.newFromText(page.title);_globals.mw.Title.exist.set(title.getPrefixedDb(),!page.missing),title.canHaveTalkPage()&&!title.isTalkPage()&&_globals.mw.Title.exist.set(title.getTalkPage().getPrefixedDb(),!!page.talkid)}),response&&response.query&&response.query.redirects||})}},{key:"setShowWarnings",value:function(show){this.showWarnings=!!show,this.emit("update")}},{key:"setShowRedirections",value:function(show){this.showRedirections=!!show,this.emit("update")}},{key:"resetShowAll",value:function(){this.showWarnings=!0,this.showRedirections=!0,this.emit("update")}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),SanityChecks}();_globals.OO.initClass(SanityChecks),_globals.OO.mixinClass(SanityChecks,_globals.OO.EventEmitter);var _default=SanityChecks;exports.default=_default},{"../../globals":1,"../api":220,"../util":225,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.flat-map":109,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.array.some":120,"core-js/modules/es.array.unscopables.flat-map":121,"core-js/modules/es.object.define-property":125,"core-js/modules/es.string.includes":134,"core-js/modules/web.dom-collections.for-each":140}],196:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var TaskItem=function(){function TaskItem(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TaskItem),_globals.OO.EventEmitter.call(this),this.discussion=config.discussion,this.venue=this.discussion.venue,this.result=config.result,this.options=config.options,this.pageNames=config.relaventPageNames||,this.taskName=config.taskName,this.displayName=config.displayName,this.summary=config.summary,this.warnings=,this.showOverflowWarnings=!1,this.errors=,this.showOverflowErrors=!1,this.steps={total:0,completed:0,skipped:0,failed:0},this.starting=!1,this.started=!1,this.doing=!1,this.done=!1,this.aborted=!1,this.failed=!1}var Constructor,protoProps,staticProps;return Constructor=TaskItem,(protoProps=]"):"] closed as ").concat(this.result.getResultText()))+" "+_config.default.script.advert}},{key:"getResolvedPageNames",value:function(){return this.discussion.redirects.resolve(this.pageNames)}},{key:"getResolvedTalkpagesNames",value:function(){return this.discussion.redirects.resolveTalks(this.pageNames)}},{key:"getPageResults",value:function(resultType){var _this=this;return this.result.getResultsByPage().filter(function(pageResult){return _this.pageNames.includes(pageResult.pageName)&&(!resultType||pageResult.selectedResultName===resultType)})}},{key:"setName",value:function(name){this.displayName=name,this.emit("update")}},{key:"addWarning",value:function(message){this.warnings=this.warnings.concat(message),this.emit("update")}},{key:"addError",value:function(message){this.errors=this.errors.concat(message),this.emit("update")}},{key:"setTotalSteps",value:function(count){this.steps.total=count,this.emit("update")}},{key:"trackStep",value:function(type){"failed"!==type&&"skipped"!==type&&(type="completed"),this.steps++,this.emit("update")}},{key:"setPrecedingTask",value:function(task,requiredState){this.precedingTask={task:task,requiredState:requiredState},task.connect(this,{update:"onPrecedingTaskUpdate"})}},{key:"onPrecedingTaskUpdate",value:function(){this.canProceed()&&this.start(),this.emit("update")}},{key:"canProceed",value:function(){if(!this.precedingTask)return!0;var _this$precedingTask=this.precedingTask;return!!_this$precedingTask.task}},{key:"start",value:function(){if(this.starting)return!1;this.starting=!0,this.emit("update")}},{key:"setStarted",value:function(){if(this.started)return!1;this.started=!0,this.emit("update")}},{key:"setDoing",value:function(){if(this.doing)return!1;this.doing=!0,this.emit("update")}},{key:"setDone",value:function(){if(this.done)return!1;0<this.steps.completed+this.steps.skipped?this.done=!0:this.failed=!0,this.emit("update")}},{key:"setAborted",value:function(){if(!this.canAbort)return!1;this.aborted=!0,this.emit("update")}},{key:"setFailed",value:function(){if(this.done||this.failed)return!1;this.failed=!0,this.emit("update")}},{key:"name",get:function(){return this.taskName}},{key:"progress",get:function(){return this.started?!(this.steps.total<=1)&&100*(this.steps.completed+this.steps.skipped)/this.steps.total:0}},{key:"showProgressBar",get:function(){return!this.done&&!this.aborted&&!this.failed}},{key:"resultsByPage",get:function(){return{}}},{key:"pageNamesWithModuleDocs",get:function(){return this.pageNames.map(function(pageName){return"".concat(pageName).concat(0===pageName.indexOf("Module:")?"/doc":"")})}},{key:"label",get:function(){var message,completedOutOfTotal="".concat(this.steps.completed,"/").concat(this.steps.total);return this.started&&0!==this.steps.total?(this.aborted&&!this.done?message=this.steps.completed?"Aborted (after completing ".concat(completedOutOfTotal,")"):"Aborted":this.failed||this.steps.failed===this.steps.total?message="Failed (completed ".concat(completedOutOfTotal,")"):this.done&&(message=this.steps.completed?"Done! (".concat(completedOutOfTotal,")"):"Skipped"+(this.steps.skipped?" (".concat(this.steps.skipped,")"):"")),message?"".concat(this.displayName,": ").concat(message):this.displayName):this.displayName}},{key:"notices",get:function(){return this.aborted||this.done||this.failed?:this.started?0===this.steps.total?::}},{key:"canAbort",get:function(){return!this.done&&!this.failed&&!this.aborted}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),TaskItem}();_globals.OO.initClass(TaskItem),_globals.OO.mixinClass(TaskItem,_globals.OO.EventEmitter);var _default=TaskItem;exports.default=_default},{"../../globals":1,"../config":221,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.index-of":112,"core-js/modules/es.array.map":116,"core-js/modules/es.object.define-property":125,"core-js/modules/es.string.includes":134}],197:||null!=iter)return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var TaskList=function(){function TaskList(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TaskList),_globals.OO.EventEmitter.call(this),_globals.OO.EmitterList.call(this),this.discussion=config.discussion,this.result=config.result,this.options=config.options,this.label=config.label||"Tasks",this.type=config.type,this.userIsSysop=config.userIsSysop,this.started=!1,this.done=!1,this.aborted=!1,this.allFailed=!1,this.result.connect(this,{update:"resetItems"}),this.options.connect(this,{update:"resetItems",itemUpdate:"resetItems"})}var Constructor,protoProps,staticProps;return Constructor=TaskList,(protoProps=,closeDiscussionTask=new _TaskItem.default({taskName:"CloseDiscussion",discussion:this.discussion,result:this.result});tasks.push(closeDiscussionTask);var addOldXfdPageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName),action=optionValues&&optionValues.action;return"updatePages"===action||"redirectAndUpdate"===action||"disambiguateAndUpdate"===action||"mergeAndUpdate"===action});addOldXfdPageResults.length&&tasks.push(new _TaskItem.default({taskName:"AddOldXfd",relaventPageNames:addOldXfdPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var removeNomPageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&"updatePages"===optionValues.action});removeNomPageResults.length&&tasks.push(new _TaskItem.default({taskName:"RemoveNomTemplates",relaventPageNames:removeNomPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var redirectActionPageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&"redirectAndUpdate"===optionValues.action});if(redirectActionPageResults.length){tasks.push(new _TaskItem.default({taskName:"Redirect",relaventPageNames:redirectActionPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var notSoftRedirectPageResults=redirectActionPageResults.filter(function(result){return!result.isSoft()});notSoftRedirectPageResults.length&&tasks.push(new _TaskItem.default({taskName:"RemoveCircularLinks",relaventPageNames:notSoftRedirectPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}))}var mergeActionPageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&"mergeAndUpdate"===optionValues.action});mergeActionPageResults.length&&tasks.push(new _TaskItem.default({taskName:"AddMergeTemplates",relaventPageNames:mergeActionPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var disambigPageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&"disambiguateAndUpdate"===optionValues.action});disambigPageResults.length&&tasks.push(new _TaskItem.default({taskName:"Disambiguate",relaventPageNames:disambigPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var deletePageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&"deletePages"===optionValues.action});if(deletePageResults.length){tasks.push(new _TaskItem.default({taskName:"DeletePages",relaventPageNames:deletePageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var deleteTalkPageResults=deletePageResults.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&optionValues.deleteTalk});deleteTalkPageResults.length&&tasks.push(new _TaskItem.default({taskName:"DeleteTalkpages",relaventPageNames:deleteTalkPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var deleteRedirPageResults=deletePageResults.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&optionValues.deleteRedir});deleteRedirPageResults.length&&tasks.push(new _TaskItem.default({taskName:"DeleteRedirects",relaventPageNames:deleteRedirPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var unlinkPageResults=deletePageResults.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&optionValues.unlink});if(unlinkPageResults.length&&tasks.push(new _TaskItem.default({taskName:"UnlinkBacklinks",relaventPageNames:unlinkPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options})),deleteRedirPageResults.length&&unlinkPageResults.length){var deleteRedirTask=tasks,unlinkTask=tasks;deleteRedirTask.setPrecedingTask(unlinkTask,"doing")}}var holdingCellPageResults=resultsbyPage.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName),action=optionValues&&optionValues.action;return"holdingCell"===action||"holdingCellMerge"===action});if(holdingCellPageResults.length){tasks.push(new _TaskItem.default({taskName:"AddBeingDeleted",relaventPageNames:holdingCellPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}),new _TaskItem.default({taskName:"AddToHoldingCell",relaventPageNames:holdingCellPageResults.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}));var tagTalkPageResuts=holdingCellPageResults.filter(function(result){var optionValues=_this.options.getOptionValues(result.selectedResultName);return optionValues&&optionValues.tagTalk});tagTalkPageResuts.length&&tasks.push(new _TaskItem.default({taskName:"TagTalkWithSpeedy",relaventPageNames:tagTalkPageResuts.map(function(result){return result.pageName}),discussion:this.discussion,result:this.result,options:this.options}))}return tasks.slice(1).forEach(function(task){task.precedingTask||task.setPrecedingTask(closeDiscussionTask,"done")}),tasks}},{key:"makeItemsForRelist",value:function(){var _this2=this,relistInfoTask=new _TaskItem.default({taskName:"GetRelistInfo",discussion:this.discussion,result:this.result}),tasks=.concat(_toConsumableArray(this.discussion.venue.relistTasks.flatMap(function(taskName){return"UpdateNomTemplates"===taskName&&0===_this2.discussion.pages.length?:new _TaskItem.default({taskName:taskName,relaventPageNames:_this2.discussion.pagesNames,discussion:_this2.discussion,result:_this2.result,options:_this2.options})})));return tasks.slice(1).forEach(function(task){return task.setPrecedingTask(relistInfoTask,"done")}),tasks}},{key:"resetItems",value:function(){this.clearItems(),this.emit("update"),this.addItems("close"===this.type?this.makeItemsForClose():this.makeItemsForRelist()),this.emit("update")}},{key:"startTasks",value:function(){if(this.started)return!1;this.started=!0,this.getItems().length||this.resetItems(),this.getItems().start(),this.emit("update")}},{key:"abort",value:function(){this.getItems().forEach(function(taskItem){taskItem.setAborted()}),this.getItems().some(function(taskItem){return taskItem.aborted})&&this.setAborted()}},{key:"setAborted",value:function(){this.label="Aborted",this.aborted=!0,this.emit("update")}},{key:"setDone",value:function(){this.done=!0,this.emit("update")}},{key:"setAllFailed",value:function(){this.done=!0,this.allFailed=!0,this.emit("update")}},{key:"onItemUpdate",value:function(){this.getItems().some(function(task){return task.aborted})?this.abort():this.getItems().every(function(task){return task.failed})?this.setAllFailed():this.getItems().every(function(task){return task.done||task.failed})&&this.setDone(),this.emit("update")}},{key:"success",get:function(){return this.done&&!this.allFailed}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),TaskList}();_globals.OO.initClass(TaskList),_globals.OO.mixinClass(TaskList,_globals.OO.EventEmitter),_globals.OO.mixinClass(TaskList,_globals.OO.EmitterList);var _default=TaskList;exports.default=_default},{"../../globals":1,"./TaskItem":196,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.every":105,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.flat-map":109,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.array.some":120,"core-js/modules/es.array.unscopables.flat-map":121,"core-js/modules/es.object.define-property":125,"core-js/modules/web.dom-collections.for-each":140}],198:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var UnlinkSummary=function(){function UnlinkSummary(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UnlinkSummary),_globals.OO.EventEmitter.call(this),this.summary=config.summary||"",this.summaryErrors=,this.parsedSummary="",this.parseErrors=}var Constructor,protoProps,staticProps;return Constructor=UnlinkSummary,(protoProps=:,this.emit("update"))}},{key:"setParsedSummary",value:function(parsedSummary){parsedSummary!==this.parsedSummary&&(this.parsedSummary=parsedSummary,this.parseErrors=,this.emit("update"))}},{key:"setParseError",value:function(errorCode){this.parsedSummary="",this.parseErrors=,this.emit("update")}},{key:"onInputEnter",value:function(){this.summaryIsValid&&this.emit("inputEnter")}},{key:"summaryIsValid",get:function(){return!!this.summary.trim()}},{key:"value",get:function(){return this.summary.trim()}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UnlinkSummary}();_globals.OO.initClass(UnlinkSummary),_globals.OO.mixinClass(UnlinkSummary,_globals.OO.EventEmitter);var _default=UnlinkSummary;exports.default=_default},{"../../globals":1,"core-js/modules/es.object.define-property":125,"core-js/modules/es.string.trim":139}],199:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var UnlinkWindowModel=function(){function UnlinkWindowModel(config){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,UnlinkWindowModel),_globals.OO.EventEmitter.call(this),this.mode="initial",this.currentPanel="summary",this.pageName=config.pageName,this.summary=new _UnlinkSummary.default({summary:config.summary}),this.task=new _TaskItem.default({taskName:"UnlinkBacklinks",relaventPageNames:,discussion:new _Discussion.default({venue:_Venue.default.newFromPageName(this.pageName),pages:})}),this.summary.connect(this,{update:"onSummaryUpdate",inputEnter:"startTask"}),this.task.connect(this,{update:})}var Constructor,protoProps,staticProps;return Constructor=UnlinkWindowModel,(protoProps=)&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),UnlinkWindowModel}();_globals.OO.initClass(UnlinkWindowModel),_globals.OO.mixinClass(UnlinkWindowModel,_globals.OO.EventEmitter);var _default=UnlinkWindowModel;exports.default=_default},{"../../globals":1,"../Venue":203,"./Discussion":184,"./TaskItem":196,"./UnlinkSummary":198,"core-js/modules/es.object.define-property":125}],200:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}require("core-js/modules/es.array.find-index"),require("core-js/modules/es.array.slice"),require("core-js/modules/es.function.name"),require("core-js/modules/es.object.define-property"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,key,value,Month=function(){function Month(index){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Month),this.index=index}var Constructor,protoProps,staticProps;return Constructor=Month,staticProps=}},{key:"numberFromShortName",value:function(shortName,option){return Month.newFromMonthShortName(shortName)}}],(protoProps=}},{key:"shortName",get:function(){return this.name.slice(0,3)}},{key:"number",get:function(){return this.index+1}},{key:"paddedNumber",get:function(){return(this.number<10?"0":"")+this.number}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Month}();exports.default=Month,value=,(key="names")in(obj=Month)?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value},{"core-js/modules/es.array.find-index":107,"core-js/modules/es.array.slice":119,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125}],201:,202:||null!=iter)return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}var obj,key,value,Parameter=function(){function Parameter(name,value,wikitext){_classCallCheck(this,Parameter),this.name=name,this.value=value,this.wikitext=wikitext}return _createClass(Parameter,+$/.test(this.name)}},{key:"number",get:function(){return this.isNumberedParam?Number(this.name):NaN}}],),Parameter}(),Template=function(){function Template(wikitext){_classCallCheck(this,Template),this.wikitext=wikitext,this.parameters=,this.pipeStyle=" |",this.equalsStyle="=",this.endBracesStyle="}}"}return _createClass(Template,),Template}();exports.default=Template,value=function(wikitext,recursive){if(!wikitext)return;for(var startIdx,strReplaceAt=function(string,index,_char){return string.slice(0,index)+_char+string.slice(index+1)},result=,processTemplateText=function(startIdx,endIdx){for(var text=wikitext.slice(startIdx,endIdx),template=new Template("{{"+text.replace(/\x01/g,"|")+"}}");/(\]*?)\|(.*?\]\])/g.test(text);)text=text.replace(/(\]*?)\|(.*?\]\])/g,"$1\x01$2");template.pipeStyle=(0,_util.mostFrequent)(text.match(/*\|*/g))||" |",template.equalsStyle=(0,_util.mostFrequent)(text.replace(/(=*)=+/g,"$1").match(/*=*/g))||"=";var endSpacing=text.match(/*$/);template.endBracesStyle=(endSpacing?endSpacing:"")+"}}";var _text$split$map2=_toArray(text.split("|").map(function(chunk){return chunk.replace(/\x01/g,"|")})),name=_text$split$map2,parameterChunks=_text$split$map2.slice(1);template.setName(name),parameterChunks.forEach(function(chunk){template.addParam(Parameter.newFromWikitext(chunk,template.parameters))}),result.push(template)},n=wikitext.length,numUnclosed=0,inComment=!1,inNowiki=!1,inParameter=!1,i=0;i<n;i++)inComment||inNowiki||inParameter?"|"===wikitext?wikitext=strReplaceAt(wikitext,i,"\x01"):/^-->/.test(wikitext.slice(i,i+3))?(inComment=!1,i+=2):/^<\/nowiki ?>/.test(wikitext.slice(i,i+10))?(inNowiki=!1,i+=8):"}"===wikitext&&"}"===wikitext&&"}"===wikitext&&(inParameter=!1,i+=2):"{"===wikitext&&"{"===wikitext&&"{"===wikitext&&"{"!==wikitext?(inParameter=!0,i+=2):"{"===wikitext&&"{"===wikitext?(0===numUnclosed&&(startIdx=i+2),numUnclosed+=2,i++):"}"===wikitext&&"}"===wikitext?(2===numUnclosed&&processTemplateText(startIdx,i),numUnclosed-=2,i++):"|"===wikitext&&2<numUnclosed?wikitext=strReplaceAt(wikitext,i,"\x01"):/^<!--/.test(wikitext.slice(i,i+4))?(inComment=!0,i+=3):/^<nowiki ?>/.test(wikitext.slice(i,i+9))&&(inNowiki=!0,i+=7);if(recursive){var subtemplates=result.filter(function(template){return/\{\{(?:.|\n)*\}\}/.test(template.wikitext.slice(2,-2))}).map(function(template){return Template.parseTemplates(template.wikitext.slice(2,-2),!0)});return result.concat.apply(result,subtemplates)}return result},(key="parseTemplates")in(obj=Template)?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value},{"../globals":1,"./util":225,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.index-of":112,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.function.name":123,"core-js/modules/es.number.constructor":124,"core-js/modules/es.object.define-property":125,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.match":135,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.split":138,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],203:=settings};Venue.prototype.hasNomTemplate=function(wikitext){return new RegExp(this.regex.nomTemplate).test(wikitext)},Venue.prototype.removeNomTemplate=function(wikitext){var pattern=new RegExp(this.regex.nomTemplate),matches=wikitext.match(pattern);if(!matches)return wikitext;if(1<matches.length)throw new Error("Multiple nomination templates on page");return wikitext.replace(pattern,"")},Venue.prototype.updateNomTemplateAfterRelist=function(wikitext,today,sectionHeader){var matches=wikitext.match(this.regex.relistPattern);if(!matches)return wikitext;if(1<matches.length)throw new Error("Multiple nomination templates on page");return wikitext.replace(this.regex.relistPattern,this.wikitext.relistReplace.replace("__TODAY__",today).replace("__SECTION_HEADER__",sectionHeader))},Venue.Mfd=function(){return new Venue("mfd",{path:"Wikipedia:Miscellany for deletion",subpagePath:"Wikipedia:Miscellany for deletion/",hasIndividualSubpages:!0,ns_number:null,html:{headlineouter:".mw-heading.mw-heading4",headlineinner:"h4",list:"dl",listitem:"dd"},wikitext:{closeTop:"{{subst:Mfd top}} '''__RESULT__'''__TO_TARGET____RATIONALE__ __SIG__",closeBottom:"{{subst:Mfd bottom}}",oldXfd:"{{Old MfD |date=__DATE__ |result='''__RESULT__''' |page=__SUBPAGE__}}\n",mergeFrom:"{{mfd-mergefrom|__NOMINATED__|__DEBATE__|__DATE__}}\n",mergeTo:"{{mfd-mergeto|__TARGET__|__DEBATE__|__DATE__|__TARGETTALK__}}\n",alreadyClosed:"{{#ifeq:{{FULLPAGENAME}}|Wikipedia:Miscellany for deletion|{{collapse bottom}}|}}"},regex:{nomTemplate:/(?:<noinclude>\s*)?(?:{{mfd*}}|<span id="mfd".*?<\/span>&nbsp;{{#invoke:Noinclude\|noinclude\|text=\\]}}\s*)(?:\s*<\/noinclude>)?/gi},relistTasks:})},Venue.Cfd=function(){var cfdVenue=new Venue("cfd",{path:"Wikipedia:Categories for discussion/Log/",ns_number:,html:{headlineouter:".mw-heading.mw-heading4",headlineinner:"h4",list:"ul",listitem:"li",nthSpan:"2"},wikitext:{closeTop:"{{subst:cfd top}} '''__RESULT__'''__TO_TARGET____RATIONALE__ __SIG__",closeBottom:"{{subst:cfd bottom}}",oldXfd:"{{Old CfD |__SECTION__ |date=__DATE_YMD__ |action=__ACTION__ |result=__RESULT__}}\n",alreadyClosed:"\x3c!-- Template:Cfd top --\x3e",relistReplace:" full|day=__DAY__|month=__MONTH__|year=__YEAR__"},regex:{nomTemplate:/<!--\s*BEGIN CFD TEMPLATE\s*-->(?:.|\n)+<!--\s*END CFD TEMPLATE\s*-->\n*/gi,relistPattern:/ full\|day=\d\d?\|month=\w+\|year=\d{4}/gi},relistTasks:});return cfdVenue.updateNomTemplateAfterRelist=function(wikitext,today){var matches=wikitext.match(cfdVenue.regex.relistPattern);if(!matches)return wikitext;if(1<matches.length)throw new Error("Multiple nomination templates on page");var todayParts=today.split(" ");return wikitext.replace(cfdVenue.regex.relistPattern,cfdVenue.wikitext.relistReplace.replace("__DAY__",todayParts).replace("__MONTH__",todayParts).replace("__YEAR__",todayParts)).replace(/'''\,ns_unlink:,html:{headlineouter:".mw-heading.mw-heading4",headlineinner:"h4",list:"dl",listitem:"dd",nthSpan:"1"},wikitext:{closeTop:"{{subst:ffd top|'''__RESULT__'''}}__TO_TARGET____RATIONALE__ __SIG__",closeBottom:"{{subst:ffd bottom}}",oldXfd:"{{oldffdfull |date=__DATE__ |result='''__RESULT__''' |page=__SECTION__}}\n",pagelinks:"{{subst:ffd2|__PAGE__|multi=yes}}\n",relistReplace:"{{ffd|log=__TODAY__",alreadyClosed:"\x3c!--Template:Ffd top--\x3e"},regex:{nomTemplate:/{{ffd*}}/gi,relistPattern:/{{\s*ffd\s*\|\s*log\s*=\s**/gi},relistTasks:})},Venue.Tfd=function(){var tfdVenue=new Venue("tfd",{path:"Wikipedia:Templates for discussion/Log/",subpagePath:"Wikipedia:Templates for discussion/",ns_number:,html:{headlineouter:".mw-heading.mw-heading4",headlineinner:"h4",list:"ul",listitem:"li",nthSpan:"1"},wikitext:{closeTop:"{{subst:Tfd top|'''__RESULT__'''}}__TO_TARGET____RATIONALE__ __SIG__",closeBottom:"{{subst:Tfd bottom}}",oldXfd:"{{oldtfdfull|date= __DATE__ |result=__RESULT__ |disc=__SECTION__}}\n",pagelinks:"* {{tfd links|__PAGE__}}\n",relistReplace:"Wikipedia:Templates for discussion/Log/__TODAY__#",alreadyClosed:"\x3c!-- Tfd top --\x3e"},regex:{nomTemplate:/(<noinclude>*)?{{(?:Template for discussion|Tfm)\/dated*(?:{{*}}*)*?}}(*<\/noinclude>)?(\n)?/gi,relistPattern:/Wikipedia:Templates(_|\s){1}for(_|\s){1}discussion\/Log\/\d{4}(_|\s){1}\w*(_|\s){1}\d{1,2}#(?=*}{2})/gi},holdingCellSectionNumber:{review:3,"merge-infobox":5,"merge-navigation":6,"merge-link":7,"merge-other":8,"merge-meta":9,convert:10,substitute:11,orphan:12,ready:13},relistTasks:});return tfdVenue.removeNomTemplate=function(wikitext){var pattern=new RegExp(tfdVenue.regex.nomTemplate),matches=wikitext.match(pattern);if(!matches)return wikitext;if(1<matches.length)throw new Error("Multiple nomination templates on page");var tags=pattern.exec(wikitext);if(!tags)return wikitext;var first,second,replacement=(first=tags,second=tags,!!first!=!!second)?"$1$2":"";return wikitext.replace(pattern,replacement)},tfdVenue.updateNomTemplateAfterRelist=function(wikitext,today,sectionHeader){var matches=wikitext.match(tfdVenue.regex.relistPattern);if(!matches)return wikitext;if(1<matches.length)throw new Error("Multiple nomination templates on page");return wikitext.replace(tfdVenue.regex.relistPattern,tfdVenue.wikitext.relistReplace.replace("__TODAY__",today).replace("__SECTION_HEADER__",sectionHeader))},tfdVenue},Venue.Rfd=function(){var rfdVenue=new Venue("rfd",{type:"rfd",path:"Wikipedia:Redirects for discussion/Log/",ns_number:null,html:{headlineouter:".mw-heading.mw-heading4",headlineinner:"h4",list:"ul",listitem:"li"},wikitext:{closeTop:"{{subst:Rfd top|'''__RESULT__'''}}__TO_TARGET____RATIONALE__ __SIG__",closeBottom:"{{subst:Rfd bottom}}",oldXfd:"{{Old RfD |date={{subst:date|__FIRSTDATE__}} |result='''__RESULT__''' |page=__DATE_YMD__#__SECTION__}}\n",alreadyClosed:"\x3c!-- Template:Rfd top--\x3e",relistReplace:"#invoke:RfD||2=__SECTION_HEADER__|"},regex:{nomTemplate:/(^\s*{{.*#invoke:RfD(?:.|\n)*?-->\|content=\n?|\n?<!-- Don't add anything after this line.*? -->\n}}|\\]\n?)/g,fullNomTemplate:/(^\s*{{.*#invoke:RfD(?:.|\n)*?<!-- Don't add anything after this line.*? -->\n}}|\\]\n?)/g,relistPattern:/#invoke:RfD\|\|\|/gi},relistTasks:,expectRedirects:!0});return rfdVenue.removeNomTemplate=function(wikitext){var pattern=new RegExp(rfdVenue.regex.nomTemplate);return wikitext.replace(pattern,"")},rfdVenue},Venue.Afd=function(transcludedOnly){return new Venue("afd",{type:"afd",path:"Wikipedia:Articles for deletion/Log/",subpagePath:"Wikipedia:Articles for deletion/",hasIndividualSubpages:!0,ns_number:,ns_logpages:4,ns_unlink:,html:{headlineouter:".mw-heading.mw-heading3",headlineinner:"h3",list:"dl",listitem:"dd",nthSpan:"2"},wikitext:{closeTop:"{{subst:Afd top|'''__RESULT__'''}}__TO_TARGET____RATIONALE__ __SIG__",closeBottom:"{{subst:Afd bottom}}",mergeFrom:"{{Afd-merge from|__NOMINATED__|__DEBATE__|__DATE__}}\n",mergeTo:"{{Afd-merge to|__TARGET__|__DEBATE__|__DATE__}}\n",alreadyClosed:"\x3c!--Template:Afd bottom--\x3e"},regex:{nomTemplate:/(?:{{(?:rticle for deletion\/dated|fDM|fd\/dated)|<!-- Please do not remove or change this AfD message)(?:.|\n)*?}}(?:(?:.|\n)+this point -->)?\s*/g},transcludedOnly:transcludedOnly,relistTasks:})},Venue.newFromPageName=function(pageName){var isAfd=/(Articles_for_deletion|User:Cyberbot_I|Wikipedia:WikiProject_Deletion_sorting)/.test(pageName),afdTranscludedOnly=/(User:Cyberbot_I|Wikipedia:WikiProject_Deletion_sorting)/.test(pageName);if(pageName.includes("Wikipedia:Miscellany_for_deletion"))return Venue.Mfd();if(pageName.includes("Categories_for_discussion/"))return Venue.Cfd();if(pageName.includes("Files_for_discussion"))return Venue.Ffd();if(pageName.includes("Templates_for_discussion"))return Venue.Tfd();if(pageName.includes("Redirects_for_discussion"))return Venue.Rfd();if(isAfd)return Venue.Afd(afdTranscludedOnly);switch(_globals.mw.Title.newFromText(pageName).getNamespaceId()){case 0:return Venue.Afd();case 6:return Venue.Ffd();case 10:case 828:return Venue.Tfd();case 14:return Venue.Cfd();default:return Venue.Mfd()}};var _default=Venue;exports.default=_default},{"../globals":1,"core-js/modules/es.array.includes":111,"core-js/modules/es.regexp.constructor":131,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.regexp.to-string":133,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.match":135,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.split":138}],204:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("../prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function xfdcActionLabel(label){return new _globals.OO.ui.HtmlSnippet('<span class="xfdc-action" style="margin:0;"></span>"))}var calculatedButtonMenuWidth=function(){var $testElement=(0,_globals.$)("<span>").text("Quick Delete");(0,_globals.$)("#mw-content-text").append($testElement);var width=$testElement.width();return $testElement.remove(),Math.ceil(width)+24+5}();function DiscussionView(model){DiscussionView.super.call(this,{$element:(0,_globals.$)("<span>").attr({id:model.id,class:"xfdc-status"}),classes:model.classes}),this.model=model,this.$headlineSpan=model.$headlineSpan,this.closeButton=new _globals.OO.ui.ButtonWidget({framed:!1,label:xfdcActionLabel("Close"),title:"Close discussion...",classes:"xfdc-action"}),this.relistButton=new _globals.OO.ui.ButtonWidget({framed:!1,label:xfdcActionLabel("Relist"),title:"Relist discussion...",classes:"xfdc-action"});var quickKeepMenuOption=new _globals.OO.ui.MenuOptionWidget({data:"quickKeep",label:"Quick Keep",title:'close as "keep", remove nomination templates, add old xfd templates to talk pages',classes:});if(!!(0,_data.getRelevantResults)(this.model.venue.type,this.model.userIsSysop).find(function(resultData){return"delete"===resultData.name})){var quickDeleteDescription=!this.model.userIsSysop||"tfd"===this.model.venue.type&&"holdingCell"===prefs.get("tfdDeleteAction")?"list nominated pages for deletion":"delete nominated pages & their talk pages";this.quickCloseMenuOptions=})]}else this.quickCloseMenuOptions=;this.quickCloseButtonMenu=new _globals.OO.ui.ButtonMenuSelectWidget({framed:!1,indicator:"down",label:xfdcActionLabel("quickClose"),title:"Quickly close discussion...",$overlay:(0,_globals.$)("#mw-content-text"),menu:{items:this.quickCloseMenuOptions,width:100<calculatedButtonMenuWidth?calculatedButtonMenuWidth:"10em"}}),this.buttonGroup=new _globals.OO.ui.ButtonGroupWidget({items:}),this.buttonGroup.$element.css({margin:"-1em 0"}),this.statusLabel=new _globals.OO.ui.LabelWidget({label:"XFDcloser loading..."}),this.$element.append(this.buttonGroup.$element,this.statusLabel.$element),this.controller=new _DiscussionViewController.default(this.model,this)}_globals.OO.inheritClass(DiscussionView,_globals.OO.ui.Widget),DiscussionView.prototype.onQuickCloseChoose=function(menuOption){this.emit("actionSelect",menuOption.getData())},DiscussionView.newFromHeadline=function(_ref){var headingIndex=_ref.headingIndex,context=_ref.context,venue=_ref.venue,currentPageName=_ref.currentPageName,userIsSysop=_ref.userIsSysop,id="XFDC"+headingIndex,$headlineSpan=(0,_globals.$)(context),$heading=$headlineSpan.parent();(0,_globals.$)(".mw-headline-number",context).prependTo($heading);var sectionHeader=$headlineSpan.text().trim();if(!(/(afd|mfd)/.test(venue.type)&&$heading.parent().attr("class")&&$heading.parent().attr("class").includes("xfd-closed"))){if(/(afd|mfd)/.test(venue.type)||!$heading.next().attr("class")){var sectionlink=$heading.find(".mw-editsection a").not(".mw-editsection-visualeditor, .autoCloserButton").attr("href");if(!sectionlink){if(!(sectionlink=$heading.next().find(".xfdOldSectionEdit > a").attr("href")))return;sectionlink=sectionlink.replace("section=","section=T-")}var nompage,editsection=sectionlink.split("section=").split("&");if(/T/.test(editsection)){if(nompage=_globals.mw.Title.newFromText(decodeURIComponent(sectionlink.split("title=").split("&"))).getPrefixedText(),.includes(nompage))return;editsection=editsection.substr(2)}else{if(venue.transcludedOnly)return;nompage=_globals.mw.Title.newFromText(currentPageName).getPrefixedText()}(0,_globals.$)("table.mw-collapsible").has("div.xfd-closed").addClass("xfd-closed");var headlineouter=venue.html.headlineouter,$discussionNodes=$heading.nextUntil(headlineouter+", div.xfd-closed, table.xfd-closed");$discussionNodes.addClass("".concat(id,"-discussion-node"));var firstDate,isOld,pages=,action="";if("cfd"===venue.type){0===(pages=$discussionNodes.find("dd > ul > li").has('b:first-child:contains("Propose ")').find("a:first-of-type").not(".external").map(function(){return _globals.mw.Title.newFromText((0,_globals.$)(this).text())}).get()).length&&(pages=$heading.next("ul").find("li").find("a:first-of-type").not(".external").map(function(){return _globals.mw.Title.newFromText((0,_globals.$)(this).text())}).get());var $action=$heading.next().find("dd > ul > li > b").first();$action.length&&(action=$action.text().replace(/propose /i,""))}else pages="rfd"===venue.type||"mfd"===venue.type?$discussionNodes.find(venue.html.listitem).has("span.plainlinks.lx").children("span").filter(":first-child").children("a, span.plainlinks:not(.lx)").filter(":first-child").map(function(){return _globals.mw.Title.newFromText((0,_globals.$)(this).text())}).get():$discussionNodes.find(venue.html.listitem+" > span.plainlinks.nourlexpansion").filter(":nth-of-type("+venue.html.nthSpan+")").children("a").filter(":first-child").map(function(){return _globals.mw.Title.newFromText((0,_globals.$)(this).text())}).get();pages&&0!==pages.length&&!pages.some(function(p){return!p})||(pages=);var classes=,$clonedDiscussionNodes=$discussionNodes.clone().find("span.localcomments").each(function(){var utcTime=(0,_globals.$)(this).attr("title");(0,_globals.$)(this).text(utcTime)}).end(),discussionText=$clonedDiscussionNodes.text();if("rfd"===venue.type){if(discussionText.includes("Relisted, see Wikipedia:Redirects for discussion")||discussionText.includes("Closed discussion, see full discussion"))return;var firstDateMatch=/(?:\d\d:\d\d, )(\d{1,2} \w+ \d{4})(?: \(UTC\))/.exec(discussionText),firstDateString=firstDateMatch&&firstDateMatch;firstDateString&&(firstDate=_util.dateFromParts.apply(null,firstDateString.split(" ").reverse()))}var lastRelist=(0,_globals.$)("<div>").append($clonedDiscussionNodes).find(".xfd_relist").last().text();lastRelist&&classes.push("xfdc-relisted");var notTranscludedCorrectlyMatch=discussionText.match(/(?:Automated|Procedural) (?:comment|Note).*transcluded.*/i),notTranscludedCorrectlyComment=notTranscludedCorrectlyMatch&&notTranscludedCorrectlyMatch,timestampPatt=/\d\d:\d\d, \d{1,2} \w+ \d{4} \(UTC\)/,listingTimestampMatch=lastRelist.match(timestampPatt)||notTranscludedCorrectlyComment&&notTranscludedCorrectlyComment.match(timestampPatt)||discussionText.match(timestampPatt),listingTimestampDate=listingTimestampMatch&&(0,_util.dateFromSigTimestamp)(listingTimestampMatch);if(listingTimestampDate){isOld=6048e5<new Date-listingTimestampDate,classes.push(isOld?"xfdc-old":"xfdc-notOld")}else classes.push("xfdc-unknownAge");return new DiscussionView(new _Discussion.default({$headlineSpan:$headlineSpan,id:"XFDC"+headingIndex,venue:venue,pages:pages,action:action,discussionPageName:nompage,sectionHeader:sectionHeader,sectionNumber:editsection,firstCommentDate:firstDate,isOld:isOld,isRelisted:!!lastRelist,userIsSysop:userIsSysop,classes:classes}))}$heading.addClass("xfd-closed")}};var _default=DiscussionView;exports.default=_default},{"../../globals":1,"../Controllers/DiscussionViewController":148,"../Models/Discussion":184,"../data":222,"../prefs":223,"../util":225,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.map":116,"core-js/modules/es.array.reverse":118,"core-js/modules/es.array.some":120,"core-js/modules/es.function.name":123,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.match":135,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.split":138,"core-js/modules/es.string.trim":139}],205:,modes:"prefs"},{action:"next",label:"Next",title:"Next",flags:,modes:},{action:"save",label:"Save",title:"Close discussion and implement selected actions",flags:,modes:},{action:"finish",label:"Close",title:"Close",flags:,modes:"tasks",disabled:!0},{action:"closePrefs",label:"Back",flags:"safe",modes:"prefs"},{label:"Cancel",title:"Cancel",flags:"safe",modes:},{action:"back",label:"Back",title:"Back",flags:"safe",modes:"options"},{action:"abort",label:"Abort",title:"Abort",flags:,modes:"tasks"},{action:"showPrefs",label:"Preferences",title:"Preferences",icon:"settings",flags:"safe",modes:},{action:"defaultPrefs",label:"Restore defaults",title:"Restore default preferences",flags:"safe",modes:"prefs"},{action:"multimode",label:"Multiple results...",modes:},{action:"singlemode",label:"Single result...",modes:}],MainWindow.prototype.setErrorsLabels=function(labels){labels=labels||{},this.$errorsTitle.text(labels.title||"Something went wrong..."),this.dismissButton.setLabel(labels.dismiss||"Dismiss")},MainWindow.prototype.initialize=function(){MainWindow.super.prototype.initialize.call(this),this.stackLayout=new _globals.OO.ui.StackLayout({padded:!1,expanded:!1}),this.$body.append(this.stackLayout.$element),this.$body.attr("tabindex","999").parent().attr("tabindex","999").keydown(function(event){var scrollAmount;switch(event.which){case 33:scrollAmount=this.$body.scrollTop()-.9*this.$body.height();break;case 34:scrollAmount=this.$body.scrollTop()+.9*this.$body.height();break;default:return}this.$body.scrollTop(scrollAmount),event.preventDefault()}.bind(this))},MainWindow.prototype.getBodyHeight=function(){return(0,_globals.$)(".oo-ui-processDialog-errors").get(0).scrollHeight||this.model.height},MainWindow.prototype.getSetupProcess=function(data){var _this=this;return(data=data||{}).preferences||(data.preferences={}),this.setupDraggablityStyles(),MainWindow.super.prototype.getSetupProcess.call(this,data).next(function(){_this.model=data.model,_this.resultPanel=new _ResultPanel.default({data:{name:"resultPanel"},padded:!0},_this.model.result),_this.optionsPanel=new _OptionsPanel.default({data:{name:"optionsPanel"},padded:!0,$overlay:_this.$overlay},_this.model.options),_this.taskListPanel=new _TaskListPanel.default({data:{name:"taskListPanel"},padded:!0},_this.model.taskList),_this.prefsPanel=new _PrefsPanel.default({data:{name:"prefsPanel"},padded:!0},_this.model.preferences),_this.stackLayout.clearItems(),_this.stackLayout.addItems(),_this.model.isQuick&&(_this.taskListPanel.controller.updateGroupFromModel(),_this.optionsPanel.controller.updateGroupFromModel()),_this.controller=new _MainWindowController.default(_this.model,_this),_this.controller.updateFromModel()},this)},MainWindow.prototype.getReadyProcess=function(data){var _this2=this;return data=data||{},MainWindow.super.prototype.getReadyProcess.call(this,data).next(function(){_this2.makeDraggable(0,data.offsetTop)})},MainWindow.prototype.getActionProcess=function(action){return this.controller.getActionProcess(action)},MainWindow.prototype.onActionClick=function(action){this.isPending()&&"abort"!==action.getAction()||this.executeAction(action.getAction())},MainWindow.prototype.showErrors=function(errors){MainWindow.super.prototype.showErrors.call(this,errors),this.updateSize()},MainWindow.prototype.getTeardownProcess=function(data){var _this3=this;return MainWindow.super.prototype.getTeardownProcess.call(this,data).first(function(){_this3.removeDraggability()})};var _default=MainWindow;exports.default=_default},{"../../globals":1,"../Controllers/MainWindowController":150,"../Mixins/DraggableMixin":183,"../config":221,"./OptionsPanel":207,"./PrefsPanel":209,"./ResultPanel":213,"./TaskListPanel":216,"core-js/modules/es.function.bind":122,"core-js/modules/es.function.name":123}],206:),this.controller=new _OptionsItemController.default(this.model,this),this.controller.updateFromModel(),this.$element.append(this.fieldset.$element).css({"margin-bottom":"1.8em"}),this.setData({name:this.model.name})}_globals.OO.inheritClass(OptionsItemWidget,_globals.OO.ui.Widget);var _default=OptionsItemWidget;exports.default=_default},{"../../globals":1,"../Controllers/OptionsItemController":151,"core-js/modules/es.function.name":123}],207:=value,obj}function OptionsPanel(config,model){config=config||{},OptionsPanel.super.call(this,config),_globals.OO.ui.mixin.GroupElement.call(this,function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({$group:(0,_globals.$)("<div>").appendTo(this.$element)},config)),this.model=model,this.$overlay=config.$overlay,this.controller=new _OptionsPanelController.default(this.model,this),this.controller.updateFromModel()}_globals.OO.inheritClass(OptionsPanel,_globals.OO.ui.PanelLayout),_globals.OO.mixinClass(OptionsPanel,_globals.OO.ui.mixin.GroupElement);var _default=OptionsPanel;exports.default=_default},{"../../globals":1,"../Controllers/OptionsPanelController":152,"core-js/modules/es.object.define-property":125}],208:,209:,210:},{label:"Close",flags:"safe"},{action:"defaultPrefs",label:"Restore defaults",title:"Restore default preferences",flags:"safe"}],PrefsWindow.prototype.initialize=function(){PrefsWindow.super.prototype.initialize.call(this),this.stackLayout=new _globals.OO.ui.StackLayout({padded:!1,expanded:!1}),this.$body.append(this.stackLayout.$element),this.$body.attr("tabindex","999").parent().attr("tabindex","999").keydown(function(event){var scrollAmount;switch(event.which){case 33:scrollAmount=this.$body.scrollTop()-.9*this.$body.height();break;case 34:scrollAmount=this.$body.scrollTop()+.9*this.$body.height();break;default:return}this.$body.scrollTop(scrollAmount),event.preventDefault()}.bind(this))},PrefsWindow.prototype.getSetupProcess=function(data){var _this=this;return data=data||{},this.setupDraggablityStyles(),PrefsWindow.super.prototype.getSetupProcess.call(this,data).next(function(){_this.model=new _PrefsWindowModel.default({userIsSysop:data.userIsSysop}),_this.prefsPanel=new _PrefsPanel.default({data:{name:"prefsPanel"},padded:!0},_this.model.preferences),_this.stackLayout.clearItems(),_this.stackLayout.addItems(),_this.controller=new _PrefsWindowController.default(_this.model,_this),_this.controller.updateFromModel()})},PrefsWindow.prototype.getReadyProcess=function(data){var _this2=this;return data=data||{},PrefsWindow.super.prototype.getReadyProcess.call(this,data).next(function(){_this2.makeDraggable(0,data.offsetTop),_this2.prefsPanel.fieldset.items.fieldLayout.getField().focus()})},PrefsWindow.prototype.getActionProcess=function(action){return this.controller.getActionProcess(action)},PrefsWindow.prototype.getBodyHeight=function(){return this.controller?this.controller.getBodyHeight():PrefsWindow.super.prototype.getBodyHeight.call(this)},PrefsWindow.prototype.getTeardownProcess=function(data){var _this3=this;return PrefsWindow.super.prototype.getTeardownProcess.call(this,data).first(function(){_this3.removeDraggability()})};var _default=PrefsWindow;exports.default=_default},{"../../globals":1,"../Controllers/PrefsWindowController":155,"../Mixins/DraggableMixin":183,"../Models/PrefsWindowModel":190,"../config":221,"./PrefsPanel":209,"core-js/modules/es.function.bind":122,"core-js/modules/es.function.name":123}],211:}),this.$element.append(this.fieldset.$element).css({"margin-bottom":"1.8em"}),this.controller=new _ResultItemController.default(this.model,this),this.controller.updateFromModel()}_globals.OO.inheritClass(ResultItemWidget,_globals.OO.ui.Widget),ResultItemWidget.prototype.getInputStates=function(){var targetInputCarets=this.targetInput.$input.textSelection("getCaretPosition",{startAndEnd:!0}),customResultCarets=this.customResultInput.$input.textSelection("getCaretPosition",{startAndEnd:!0});return{targetInput:{focused:this.targetInput.$input.get(0)===document.activeElement,caretStart:targetInputCarets,caretEnd:targetInputCarets},customResultInput:{focused:this.customResultInput.$input.get(0)===document.activeElement,caretStart:customResultCarets,caretEnd:customResultCarets}}},ResultItemWidget.prototype.setInputStates=function(state){state.targetInput.focused?(this.targetInput.focus(),this.targetInput.$input.textSelection("setSelection",{start:state.targetInput.caretStart,end:state.targetInput.caretEnd})):state.customResultInput.focused&&(this.customResultInput.focus(),this.customResultInput.$input.textSelection("setSelection",{start:state.customResultInput.caretStart,end:state.customResultInput.caretEnd}))};var _default=ResultItemWidget;exports.default=_default},{"../../globals":1,"../Controllers/ResultItemController":156}],212:=value,obj}function ResultListWidget(model,config){config=config||{},ResultListWidget.super.call(this,config),_globals.OO.ui.mixin.GroupElement.call(this,function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({$group:this.$element},config)),this.model=model,this.$overlay=config.$overlay,this.controller=new _ResultListWidgetController.default(this.model,this)}_globals.OO.inheritClass(ResultListWidget,_globals.OO.ui.Widget),_globals.OO.mixinClass(ResultListWidget,_globals.OO.ui.mixin.GroupElement);var _default=ResultListWidget;exports.default=_default},{"../../globals":1,"../Controllers/ResultListWidgetController":157,"core-js/modules/es.object.define-property":125}],213:),this.rationaleFieldset=new _globals.OO.ui.FieldsetLayout,this.copyButton=new _globals.OO.ui.ButtonWidget({label:"Copy from above",framed:!1}),this.rationaleTextbox=new _globals.OO.ui.MultilineTextInputWidget({rows:3}),this.newSentenceOption=new _globals.OO.ui.CheckboxMultioptionWidget({label:"Result is a new sentence",selected:!0}),this.rationaleWidget=new _globals.OO.ui.Widget,this.rationaleWidget.$element.append(this.copyButton.$element,this.rationaleTextbox.$element,this.newSentenceOption.$element),this.rationaleFieldset.addItems(),this.previewFieldset=new _globals.OO.ui.FieldsetLayout({label:"Preview"}),this.preview=new _globals.OO.ui.Widget,this.preview.$element.css({border:"2px dashed #ccc","border-radius":"5px",padding:"5px"}),this.previewFieldset.addItems(),this.$element.append(this.notesFieldset.$element,this.resultFieldset.$element,this.rationaleFieldset.$element,this.previewFieldset.$element).children().css({margin:"1em 0"}).first().css({"margin-top":"0"}),this.controller=new _ResultPanelController.default(this.model,this),this.controller.updateFromModel()}_globals.OO.inheritClass(ResultPanel,_globals.OO.ui.PanelLayout);var _default=ResultPanel;exports.default=_default},{"../../globals":1,"../Controllers/ResultPanelController":158,"./ResultListWidget":212,"./SingleResultWidget":214}],214:}),this.optionsMultiselect.$element.find("label").css({display:"inline-block","margin-left":"1em",padding:"4px 0"}),this.targetInput=new _globals.OO.ui.TextInputWidget({label:"to:",labelPosition:"before",classes:,validate:function(val){return null!==_globals.mw.Title.newFromText(val)}}),this.customResultInput=new _globals.OO.ui.TextInputWidget({label:"Result:",labelPosition:"before",classes:,validate:"non-empty"}),this.$element.append(this.buttonSelect.$element,this.optionsMultiselect.$element,this.targetInput.$element,this.customResultInput.$element),this.controller=new _SingleResultWidgetController.default(this.model,this),this.controller.updateFromModel()}_globals.OO.inheritClass(SingleResultWidget,_globals.OO.ui.Widget);var _default=SingleResultWidget;exports.default=_default},{"../../globals":1,"../Controllers/SingleResultWidgetController":159,"core-js/modules/es.array.find":108}],215:}),this.model=model,this.progressbar=new _globals.OO.ui.ProgressBarWidget,this.field=new _globals.OO.ui.FieldLayout(this.progressbar,{$element:this.$element}),this.$element.find(".oo-ui-fieldLayout-messages").css("clear","both"),this.showAllWarningsButton=new _globals.OO.ui.ButtonWidget({label:"Show warnings",icon:"alert"}),this.showAllErrorsButton=new _globals.OO.ui.ButtonWidget({label:"Show errors",icon:"error",flags:"destructive"}),this.$element.append(this.showAllWarningsButton.$element,this.showAllErrorsButton.$element),this.controller=new controllers(model,this),this.controller.updateFromModel()}_globals.OO.inheritClass(TaskItemWidget,_globals.OO.ui.Widget);var _default=TaskItemWidget;exports.default=_default},{"../../globals":1,"../Controllers/Tasks/AddBeingDeleted":162,"../Controllers/Tasks/AddMergeTemplates":163,"../Controllers/Tasks/AddOldXfd":164,"../Controllers/Tasks/AddToHoldingCell":165,"../Controllers/Tasks/CloseDiscussion":166,"../Controllers/Tasks/DeletePages":167,"../Controllers/Tasks/DeleteRedirects":168,"../Controllers/Tasks/DeleteTalkpages":169,"../Controllers/Tasks/Disambiguate":170,"../Controllers/Tasks/GetRelistInfo":171,"../Controllers/Tasks/Redirect":172,"../Controllers/Tasks/RemoveCircularLinks":173,"../Controllers/Tasks/RemoveNomTemplates":174,"../Controllers/Tasks/TagTalkWithSpeedy":175,"../Controllers/Tasks/UnlinkBacklinks":176,"../Controllers/Tasks/UpdateDiscussion":177,"../Controllers/Tasks/UpdateNewLogPage":178,"../Controllers/Tasks/UpdateNomTemplates":179,"../Controllers/Tasks/UpdateOldLogPage":180,"core-js/modules/es.array.find":108}],216:,217:}),this.summaryInputField=new _globals.OO.ui.FieldLayout(this.summaryInput,{label:"Enter the reason for link removal",align:"top"}),this.summaryPreviewField=new _globals.OO.ui.FieldLayout(this.summaryPreview,{label:"Edit summary preview:",align:"top"}),this.controller=new _UnlinkSummaryPanelController.default(this.model,this),this.content=new _globals.OO.ui.FieldsetLayout,this.content.addItems(),this.$element.append(this.content.$element)}_globals.OO.inheritClass(UnlinkSummaryPanel,_globals.OO.ui.PanelLayout);var _default=UnlinkSummaryPanel;exports.default=_default},{"../../globals":1,"../Controllers/UnlinkSummaryPanelController":181}],218:}),this.$element.append(this.fieldset.$element)}_globals.OO.inheritClass(UnlinkTaskPanel,_globals.OO.ui.PanelLayout);var _default=UnlinkTaskPanel;exports.default=_default},{"../../globals":1,"./TaskItemWidget":215}],219:,modes:"initial"},{action:"close",label:"Close",flags:,modes:"task",disabled:!0},{label:"Cancel",flags:"safe",modes:"initial"},{action:"abort",label:"Abort",flags:,modes:"task"}],UnlinkWindow.prototype.initialize=function(){UnlinkWindow.super.prototype.initialize.call(this),this.stackLayout=new _globals.OO.ui.StackLayout({padded:!1,expanded:!1}),this.$body.append(this.stackLayout.$element),this.$body.attr("tabindex","999").parent().attr("tabindex","999").keydown(function(event){var scrollAmount;switch(event.which){case 33:scrollAmount=this.$body.scrollTop()-.9*this.$body.height();break;case 34:scrollAmount=this.$body.scrollTop()+.9*this.$body.height();break;default:return}this.$body.scrollTop(scrollAmount),event.preventDefault()}.bind(this))},UnlinkWindow.prototype.getSetupProcess=function(data){var _this=this;return data=data||{},this.setupDraggablityStyles(),UnlinkWindow.super.prototype.getSetupProcess.call(this,data).next(function(){_this.model=new _UnlinkWindowModel.default({pageName:data.pageName,summary:data.summary}),_this.summaryPanel=new _UnlinkSummaryPanel.default({data:{name:"summary"},padded:!0},_this.model.summary),_this.taskPanel=new _UnlinkTaskPanel.default({data:{name:"task"},padded:!0},_this.model.task),_this.stackLayout.clearItems(),_this.stackLayout.addItems(),_this.controller=new _UnlinkWindowController.default(_this.model,_this),_this.controller.updateFromModel()})},UnlinkWindow.prototype.getReadyProcess=function(data){var _this2=this;return data=data||{},UnlinkWindow.super.prototype.getReadyProcess.call(this,data).next(function(){_this2.makeDraggable(0,data.offsetTop),_this2.summaryPanel.summaryInput.focus()})},UnlinkWindow.prototype.getActionProcess=function(action){return this.controller.getActionProcess(action)},UnlinkWindow.prototype.getBodyHeight=function(){return this.controller?this.controller.getBodyHeight():UnlinkWindow.super.prototype.getBodyHeight.call(this)},UnlinkWindow.prototype.getTeardownProcess=function(data){var _this3=this;return UnlinkWindow.super.prototype.getTeardownProcess.call(this,data).first(function(){_this3.removeDraggability()})};var _default=UnlinkWindow;exports.default=_default},{"../../globals":1,"../Controllers/UnlinkWindowController":182,"../Mixins/DraggableMixin":183,"../Models/UnlinkWindowModel":199,"../config":221,"./UnlinkSummaryPanel":217,"./UnlinkTaskPanel":218,"core-js/modules/es.function.bind":122,"core-js/modules/es.function.name":123}],220:=obj}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("./prefs"));function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var _default=new(function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(API,_globals.mw.Api);var Constructor,protoProps,staticProps,_super=_createSuper(API);function API(apiUserAgent){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,API),_super.call(this,{ajax:{headers:{"Api-User-Agent":apiUserAgent}}})}return Constructor=API,(protoProps=.timestamp;return _globals.$.when(transform(page)).then(function(editParams){var query=_objectSpread({},{action:"edit",title:page.title,watchlist:watchlist,assert:"user",basetimestamp:editParams.redirect?null:basetimestamp,starttimestamp:starttime},{},editParams);return function doEdit(isRetry){return _this.postWithToken("csrf",query).then(function(data){return onEachSuccess&&onEachSuccess(data),data.edit},function(code,error){return"http"!==code||isRetry?"editconflict"===code?doGetQuery(page.title):(onEachFail&&onEachFail(code,error,page.title),(0,_util.rejection)(code,error,page.title)):doEdit(!0)})}()},function(code,error){return onEachFail&&onEachFail(code,error,page.title),(0,_util.rejection)(code,error,page.title)})},doGetQuery=function doGetQuery(titles,isRetry){var baseQuery={action:"query",format:"json",formatversion:"2",curtimestamp:1,titles:titles,prop:"revisions|info",rvprop:"content|timestamp",rvslots:"main"};return _this.get(_objectSpread({},baseQuery,{},getParams)).then(function(response){var starttime=response.curtimestamp,pages=response.query.pages.map(function(page){return processPage(_objectSpread({},page,{content:page.revisions&&page.revisions.slots.main.content}),starttime)});return _globals.$.when.apply(null,pages.map(function(page){return page.then(function(){return{success:!0}},function(code,error,title){return{success:!1,code:code,error:error,title:title}})})).then(function(){var errors=Array.prototype.slice.call(arguments).filter(function(arg){return!arg.success});if(0<errors.length)return(0,_util.rejection)("write",errors.length,errors)})},function(code,error){return isRetry?(0,_util.rejection)("read",code,error):doGetQuery(titles,!0)})};return doGetQuery(titles)}},{key:"deleteWithRetry",value:function(pages,options,onEachSuccess,onEachFail){function deletePage(titleOrId,isRetry){var baseQuery={action:"delete"};return"number"==typeof titleOrId?baseQuery.pageid=titleOrId:baseQuery.title=titleOrId,_this2.postWithEditToken(_objectSpread({},baseQuery,{},options)).then(function(response){return onEachSuccess&&onEachSuccess(response),{success:!0}},function(code,error){return isRetry?(onEachFail&&onEachFail(code,error,titleOrId),{success:!1,code:code,error:error,title:titleOrId}):deletePage(titleOrId,!0)})}var _this2=this,deletionPromises=Array.isArray(pages)?pages.map(function(page){return deletePage(page)}):;return _globals.$.when.apply(null,deletionPromises).then(function(){var errors=Array.prototype.slice.call(arguments).filter(function(arg){return!arg.success});if(0<errors.length)return(0,_util.rejection)("delete",errors.length,errors)})}},{key:"queryWithContinue",value:function(params,method){var _this3=this,baseQuery=_objectSpread({action:"query",format:"json",formatversion:"2"},params);return function doQuery(query,previousResult){return _this3(query).then(function(response){var result=previousResult?(0,_util.recursiveMerge)(previousResult,response.query):response.query;return response.continue?doQuery(_objectSpread({},baseQuery,{},response.continue),result):result})}(baseQuery)}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),API}())("XFDcloser/".concat(_config.default.script.version," ( https://en.wikipedia.orghttps://wiki386.com/en/WP:XFDC )"));exports.default=_default},{"../globals":1,"./config":221,"./prefs":223,"./util":225,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.object.set-prototype-of":127}],221:);mwConfig.namespaces=_globals.$.extend({},mwConfig.wgFormattedNamespaces,{0:"article"});var months=,config={script:{advert:"(])"),version:scriptVersion},isMobileSite:window.location.host.includes(".m.")||window.location.search.includes("useformat=mobile"),mw:mwConfig,wgMonthNames:months,monthNames:months.slice(1),user:{isSysop:mwConfig.wgUserGroups.includes("sysop"),sig:mwConfig.wgUserGroups.includes("sysop")?"~~~~":"<small>]</small> ~~~~"},startTime:new Date,track:{afdLogEdit:,started:0,finished:0,discussions:},venue:_Venue.default.newFromPageName(mwConfig.wgPageName)};config.xfd=config.venue,window.XFDC_SANDBOX&&(config=window.XFDC_MAKE_SANDBOX_CONFIG(config));var _default=config;exports.default=_default},{"../globals":1,"../package.json":142,"./Venue":203,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.slice":119,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.includes":134,"core-js/modules/es.string.search":137}],222:=value,obj}require("core-js/modules/es.array.concat"),require("core-js/modules/es.array.filter"),require("core-js/modules/es.array.find"),require("core-js/modules/es.array.flat-map"),require("core-js/modules/es.array.includes"),require("core-js/modules/es.array.map"),require("core-js/modules/es.array.reduce"),require("core-js/modules/es.array.unscopables.flat-map"),require("core-js/modules/es.function.name"),require("core-js/modules/es.object.define-property"),require("core-js/modules/es.string.includes"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.softDeletionRationaleTemplate=exports.defaultPrefValues=exports.prefs=exports.options=exports.actions=exports.resultsData=exports.makeSoftDeleteRationale=exports.getRelevantPrefs=exports.getRelevantOptions=exports.getRelevantActions=exports.getRelevantResults=void 0;var resultsData=,actions:},{name:"delete",label:"Delete",title:'Close discussion as "delete"',allowSpeedy:!0,allowSoft:!0,sysopOnly:!0,venues:,actions:},{name:"delete",label:"Delete",title:'Close discussion as "delete"',allowSpeedy:!0,allowSoft:!0,sysopOnly:!0,venues:,actions:},{name:"delete",label:"Delete",title:'Close discussion as "delete"',allowSpeedy:!0,allowSoft:!0,sysopOnly:!0,venues:,actions:},{name:"delete",label:"Delete",title:'Close discussion as "delete"',allowSpeedy:!0,allowSoft:!0,nonSysopOnly:!0,venues:,actions:},{name:"redirect",label:"Redirect",title:'Close discussion as "redirect"',requireTarget:!0,allowSoft:!0,allowDeleteFirst:!0,sysopOnly:!0,venues:,actions:},{name:"redirect",label:"Redirect",title:'Close discussion as "redirect"',requireTarget:!0,allowSoft:!0,nonSysopOnly:!0,venues:,actions:},{name:"redirect",label:"Redirect",title:'Close discussion as "redirect"',requireTarget:!0,venues:,actions:},{name:"redirect",label:"Redirect",title:'Close discussion as "redirect"',requireTarget:!0,allowDeleteFirst:!0,sysopOnly:!0,venues:,actions:},{name:"redirect",label:"Redirect",title:'Close discussion as "redirect"',requireTarget:!0,nonSysopOnly:!0,venues:,actions:},{name:"rename",label:"Rename",title:'Close discussion as "rename"',requireTarget:!0,venues:,actions:},{name:"retarget",label:"Retarget",title:'Close discussion as "retarget"',requireTarget:!0,allowSoft:!0,allowDeleteFirst:!0,sysopOnly:!0,venues:,actions:},{name:"retarget",label:"Retarget",title:'Close discussion as "retarget"',requireTarget:!0,allowSoft:!0,nonSysopOnly:!0,venues:,actions:},{name:"soft redirect",label:"Soft redirect",title:'Close discussion as "soft redirect"',requireTarget:!0,venues:,actions:},{name:"disambiguate",label:"Disambiguate",title:'Close discussion as "disambiguate"',venues:,actions:},{name:"merge",label:"Merge",title:'Close discussion as "merge"',requireTarget:!0,venues:,actions:},{name:"merge",label:"Merge",title:'Close discussion as "merge"',requireTarget:!0,venues:,actions:},{name:"merge",label:"Merge",title:'Close discussion as "merge"',requireTarget:!0,venues:,actions:},{name:"no consensus",label:"No consensus",title:'Close discussion as "no consensus"',venues:,actions:},{name:"custom",label:"Custom",title:"Close discussion with a custom result",sysopOnly:!0,venues:,actions:},{name:"custom",label:"Custom",title:"Close discussion with a custom result",sysopOnly:!0,venues:,actions:},{name:"custom",label:"Custom",title:"Close discussion with a custom result",nonSysopOnly:!0,venues:,actions:}];exports.resultsData=resultsData;var rcats=},{group:"Related information",names:},{group:"Fiction",names:},{group:"Abbreviation",names:},{group:"Capitalisation",names:},{group:"Grammar & punctuation",names:},{group:"Parts of speech",names:},{group:"Spelling",names:},{group:"Alternative names (general)",names:},{group:"Alternative names (people)",names:},{group:"Alternative names (technical)",names:},{group:"Alternative names (organisms)",names:},{group:"Alternative names (geography)",names:},{group:"Navigation",names:},{group:"Disambiguation",names:},{group:"Merge, duplicate & move",names:},{group:"To namespaces",names:},{group:"ISO codes",names:},{group:"Miscellaneous",names:}],actions=},{label:"List pages at holding cell",name:"holdingCell",options:},{label:"List pages at holding cell",name:"holdingCellMerge",options:},{label:"Redirect pages, tag talk pages",name:"redirectAndUpdate",options:},{label:"Remove nomination templates, tag talk pages",name:"disambiguateAndUpdate"},{label:"Add merge templates, tag talk pages",name:"mergeAndUpdate"},{label:"No automated actions",name:"noActions"}];exports.actions=actions;var options=,sysopOnly:!0,value:!0},{name:"deleteRedir",label:"Delete redirects",type:"toggleSwitch",venues:,value:!0},{name:"unlink",label:"Unlink backlinks",type:"toggleSwitch",for:"deletePages",venues:,value:!0},{name:"holdcellSection",label:"Holding cell section",type:"dropdown",venues:,items:},{name:"tagTalk",label:"Tag talk pages for deletion",type:"toggleSwitch",for:"deletePages",venues:,nonSysopOnly:!0,value:!1},{name:"holdcellMergeSection",label:"Holding cell section",type:"dropdown",venues:,items:},{name:"rcats",label:"Rcats",type:"lookupMenuTagMultiselect",venues:,items:rcats,value:},{name:"rcats",label:"Rcats",type:"lookupMenuTagMultiselect",venues:,items:rcats,value:}];exports.options=options;var prefs=,help:'Default behaviour follows your "Watched pages" settings in Special:Preferences \xa7 Watchlist',default:"preferences"},{name:"tfdDeleteAction",label:"Default action for TfD delete results",sysopOnly:!0,type:"dropdown",options:,default:"holdingCell"},{name:"unlinkBacklinks",label:"Enable unlink backlinks option by default",sysopOnly:!0,type:"toggle",default:!0},{name:"collapseWarnings",label:"Collapse task warnings if at least:",type:"number",min:2,default:5},{name:"collapseErrors",label:"Collapse task errors if at least:",type:"number",min:2,default:5}],defaultPrefValues=(exports.prefs=prefs).reduce(function(accumulated,currentPref){return accumulated=currentPref.default,accumulated},{});exports.defaultPrefValues=defaultPrefValues;var isRelevant=function(venueType,userIsSysop){return function(data){return(!Array.isArray(data.venues)||data.venues.includes(venueType))&&(!data.sysopOnly||userIsSysop)&&(!data.nonSysopOnly||!userIsSysop)}},getRelevantResults=function(venueType,userIsSysop){return resultsData.filter(isRelevant(venueType,userIsSysop))};exports.getRelevantResults=getRelevantResults;exports.getRelevantActions=function(venueType,userIsSysop,result){var resultData=getRelevantResults(venueType,userIsSysop).find(function(resData){return resData.name===result});return resultData||console.log("No results data for",{venueType:venueType,userIsSysop:userIsSysop,result:result}),actions.filter(function(action){return resultData.actions.includes(action.name)})};exports.getRelevantOptions=function(venueType,userIsSysop,actions){var actionOptions=actions.flatMap(function(action){return action.options||});return options.filter(function(option){return actionOptions.includes(option.name)&&isRelevant(venueType,userIsSysop)(option)}).map(function(option){return function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},option)})};exports.getRelevantPrefs=function(userIsSysop){return prefs.filter(isRelevant(null,userIsSysop))};exports.softDeletionRationaleTemplate="Wikipedia:XFDcloser/Soft deletion rationale";exports.makeSoftDeleteRationale=function(pageName,nomLink,isMulti){var multiParam=isMulti?"|multi=yes":"";return"{{subst:".concat("Wikipedia:XFDcloser/Soft deletion rationale","|1=").concat(pageName,"|2=").concat(nomLink).concat(multiParam,"}}")}},{"core-js/modules/es.array.concat":104,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.find":108,"core-js/modules/es.array.flat-map":109,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.map":116,"core-js/modules/es.array.reduce":117,"core-js/modules/es.array.unscopables.flat-map":121,"core-js/modules/es.function.name":123,"core-js/modules/es.object.define-property":125,"core-js/modules/es.string.includes":134}],223:?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}var API=new _globals.mw.Api({ajax:{headers:{"Api-User-Agent":"XFDcloser/".concat(_config.default.script.version," ( https://en.wikipedia.orghttps://wiki386.com/en/WP:XFDC )")}}}),parseOptions=function(){try{return JSON.parse(_globals.mw.user.options.get("userjs-xfdc"))||{}}catch(e){return{}}};exports.get=function(prefName){var options=parseOptions();if(prefName){var val=options;return void 0!==val?val:_data.defaultPrefValues}return _objectSpread({},_data.defaultPrefValues,{},options)};exports.set=function(prefs,mode){var previousOptions=parseOptions(),options=JSON.stringify(mode&&mode.reset?prefs:_objectSpread({},previousOptions,{},prefs));return API.postWithToken("csrf",{action:"options",format:"json",formatversion:"2",optionname:"userjs-xfdc",optionvalue:options}).then(function(){_globals.mw.user.options.set("userjs-xfdc",options),_globals.mw.notify("XFDcloser preferences updated successfully")})}},{"../globals":1,"./config":221,"./data":222,"core-js/modules/es.object.define-property":125}],224:.replace(/^.*?:/,""),filename_regex_str=""+_globals.mw.util.escapeRegExp(filename.slice(1)).replace(/(?: |_)/g,""),normal_regex_str+="\\mage|ile)\\s*:\\s*"+filename_regex_str+"\\s*\\|?.*?(?:(?:\\\\]).*?)*\\]\\]",gallery_regex_str+="^\\s*(?:mage|ile):\\s*"+filename_regex_str+".*?$",free_regex_str+="\\|\\s*(?:+\\=)?\\s*(?:(?:mage|ile):\\s*)?"+filename_regex_str,i+1!==unlinkFiles.length&&(normal_regex_str+="|",gallery_regex_str+="|",free_regex_str+="|");normal_regex_str+=")(?!*?--\x3e)",gallery_regex_str+=")(?!*?--\x3e)",free_regex_str+=")(?!*?--\x3e)";var normal_regex=new RegExp(normal_regex_str,"g");wikitext=wikitext.replace(normal_regex,"");var gallery_regex=new RegExp(gallery_regex_str,"mg");wikitext=wikitext.replace(gallery_regex,"");var free_regex=new RegExp(free_regex_str,"mg");wikitext=wikitext.replace(free_regex,"")}var unlinkPortals=unlinkThese.filter(function(t){return/^Portal:/i.test(t)});if(0<unlinkPortals.length){var portal_regex_str="("+unlinkPortals.map(function(portal){var portalname=portal.replace("Portal:","");return""+_globals.mw.util.escapeRegExp(portalname.slice(1)).replace(/(?: |_)/g,"")}).join("|")+")(?!*?--\x3e)",portal_regex=new RegExp(portal_regex_str),templatesInWikitext=_Template.default.parseTemplates(wikitext,!0),numberedParameterTemplates=,namedParameterTemplates=,isNumberedParameter=function(param){return!isNaN(Number(param.name))},editOrRemoveTemplates=function(existingTemplates,paramTypeFilter,keepFilter){existingTemplates.forEach(function(template){var paramsToKeep=template.parameters.filter(function(param){return!paramTypeFilter(param)||!portal_regex.test(param.value)});if(paramsToKeep.length!==template.parameters.length)if(keepFilter(paramsToKeep)){var updatedTemplateWikitext=template.wikitext.replace(/\|(.|\n)*/,"")+paramsToKeep.map(function(p){return p.wikitext}).join("")+"}}";wikitext=wikitext.replace(template.wikitext,updatedTemplateWikitext)}else wikitext=wikitext.replace(new RegExp("\\n**"+_globals.mw.util.escapeRegExp(template.wikitext)+"\\n"),"\n").replace(new RegExp("**"+_globals.mw.util.escapeRegExp(template.wikitext)),"")})};editOrRemoveTemplates(templatesInWikitext.filter(function(template){var name=template.name.toLowerCase().replace(/_/g," ");return numberedParameterTemplates.includes(name)}),isNumberedParameter,function(params){return params.some(isNumberedParameter)}),editOrRemoveTemplates(templatesInWikitext.filter(function(template){var name=template.name.toLowerCase().replace(/_/g," ");return namedParameterTemplates.includes(name)}),function(param){return/portal\d*/.test(param.name)},function(params){return 0<params.length});var seeAlsoSection=/(==+)\s*ee lso\s*==+(*?)(?:(==+)|$)/g.exec(wikitext);if(seeAlsoSection){var hasSubsection=seeAlsoSection&&seeAlsoSection&&seeAlsoSection.length>seeAlsoSection.length;""===seeAlsoSection.trim()&&!hasSubsection&&(wikitext=wikitext.replace(seeAlsoSection,seeAlsoSection))}}for(var simple_regex_str="\\.slice(0,1).toUpperCase())+_globals.mw.util.escapeRegExp(unlinkThese.slice(0,1).toLowerCase())+"]"+_globals.mw.util.escapeRegExp(unlinkThese.slice(1)).replace(/(?: |_)/g,"");simple_regex_str+=unlink_regex_str,named_regex_str+=unlink_regex_str,ii+1!==unlinkThese.length&&(simple_regex_str+="|",named_regex_str+="|")}simple_regex_str+=")(?:#]*?)?\\s*\\]\\](?!*?--\x3e)",named_regex_str+=")(?:#]*?)?\\s*\\|(\\n\\r]+?)\\]\\](?!*?--\x3e)";var simple_regex=new RegExp(simple_regex_str,"g"),named_regex=new RegExp(named_regex_str,"g");/\{\{\s*(?:ivenname|urnames?|ickname|irstname|orename|isambigN(?:ame|m)?)\s*(?:\|.*?)*?\}\}/g.test(wikitext)&&(isDab=!0);if(10===ns){var navbox_regex=new RegExp("\\{\\{avbox(?: with collapsible groups| with columns)?\\s*\\|(?:.|\\n)*?(?:(?:\\{\\{(?:.|\\n)*?(?:(?:\\{\\{(?:.|\\n)*?\\}\\})(?:.|\\n)*?)*?\\}\\})(?:.|\\n)*?)*\\}\\}","g"),navbox_simple_regex=new RegExp("\\*+\\s*"+simple_regex_str+"*\\n","g"),navbox_named_regex=new RegExp("\\*+\\s*"+named_regex_str+"*\\n","g"),navboxes=wikitext.match(navbox_regex);if(navboxes)for(var replacement,jj=0;jj<navboxes.length;jj++)replacement=navboxes.replace(navbox_simple_regex,"").replace(navbox_named_regex,""),wikitext=wikitext.replace(navboxes,replacement)}else if(isDab){var dab_simple_regex=new RegExp("\\*+\\n\\r]*"+simple_regex_str+"\\n\\r]*\\n","g"),dab_named_regex=new RegExp("\\*+\\n\\r]*"+named_regex_str+"\\n\\r]*\\n","g");wikitext=wikitext.replace(dab_simple_regex,"").replace(dab_named_regex,"")}else{var seealso_simple_regex=new RegExp("\\*+\\n\\r]*"+simple_regex_str+"\\n\\r]*\\n","g"),seealso_named_regex=new RegExp("\\*+\\n\\r]*"+named_regex_str+"\\n\\r]*\\n","g"),seealso=wikitext.match(/==+\s*ee lso\s*==+\n+(?:^.*\n*)*?(?:(?===+)|$)/gm);if(seealso)for(var replacement_seealso,kk=0;kk<seealso.length;kk++)replacement_seealso=(seealso+"\n").replace(seealso_simple_regex,"").replace(seealso_named_regex,""),wikitext=wikitext.replace(seealso.trim(),replacement_seealso.trim())}var manual_review_regex=new RegExp("^(\\*+.*)("+simple_regex_str.replace(/()\(()/g,"$1(?:$2")+"|"+named_regex_str.replace(/()\(()/g,"$1(?:$2")+")(.*)$","gm");return wikitext=(wikitext=wikitext.replace(manual_review_regex,"{{subst:void}}$1{{subst:^|<strong>}}$2{{subst:^|</strong>}}$3")).replace(simple_regex,"$1").replace(named_regex,"$1")};var obj,_globals=require("../globals"),_Template=(obj=require("./Template"))&&obj.__esModule?obj:{default:obj}},{"../globals":1,"./Template":202,"core-js/modules/es.array.filter":106,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.includes":111,"core-js/modules/es.array.join":114,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.array.some":120,"core-js/modules/es.function.name":123,"core-js/modules/es.number.constructor":124,"core-js/modules/es.regexp.constructor":131,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.regexp.to-string":133,"core-js/modules/es.string.match":135,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],225:=(map||0)+1,(null===mostFreq||map>map)&&(mostFreq=item)}),mostFreq},exports.cleanupVoidTemplates=exports.windowOffsetTop=exports.normalisePageName=exports.decodeHtml=exports.docToModule=exports.moduleToDoc=exports.isModule=exports.isFile=exports.timeout=exports.rejection=exports.recursiveMerge=exports.multiCheckboxMessageDialog=exports.multiButtonConfirm=exports.dateFromUserInput=exports.dateFromSubpageName=exports.dateFromSigTimestamp=exports.dateFromParts=exports.ymdDateString=exports.dmyDateString=exports.safeUnescape=exports.uniqueArray=exports.makeLink=exports.encodeForWikilinkFragment=exports.encodeForUrl=void 0;var _globals=require("../globals"),_ScrolledMessageDialog=_interopRequireDefault(require("./Components/ScrolledMessageDialog")),_Month=_interopRequireDefault(require("./Month"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&&null!=iter||null!=iter)return Array.from(iter)}(arr)||_unsupportedIterableToArray(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj=value,obj}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr||arr;if(null==_i)return;var _s,_e,_arr=,_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||_unsupportedIterableToArray(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a () method.")}()}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2=arr;return arr2}var escapeHtml=function(string){return string.replace(//g,function(_char){switch(_char){case"'":return"&#039;";case'"':return"&quot;";case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;"}})},encodeForUrl=function(text){return encodeURIComponent(String(text)).replace(/'/g,"%27").replace(/%20/g,"_").replace(/%3B/g,";").replace(/%40/g,"@").replace(/%24/g,"$").replace(/%2C/g,",").replace(/%2F/g,"/").replace(/%3A/g,":")};exports.encodeForUrl=encodeForUrl;var makeLink=function(target,text){text=text||target;var url="https://wiki386.com/en/"+encodeForUrl(target);return'<a href="'.concat(url,'" target="_blank">').concat(escapeHtml(text.trim()),"</a>")};exports.makeLink=makeLink;exports.encodeForWikilinkFragment=function(text){return encodeForUrl(text).replace(/_/g," ")};var safeUnescape=function(text,config){return(config&&config.noEscape?text:escapeHtml(text)).replace(/&lt;(\/?pre\s?\/?)&gt;/g,"<$1>").replace(/\]*?)\|(]*?)\]\](?!*?<\/pre>)/g,function(_match,linkTarget,linkText){return makeLink(linkTarget,linkText)}).replace(/\]+?)]\](?!*?<\/pre>)/g,function(_match,link){return makeLink(link)}).replace(/&lt;(\/?(?:br|p|ul|li|hr|strong|em)\s?\/?)&gt;(?!*?<\/pre>)/g,"<$1>").replace(/{{subst:\^\|&lt;(\/?(?:br|p|ul|li|hr|strong|em)\s?\/?)&gt;}}/g,"<$1>")};exports.safeUnescape=safeUnescape;exports.dmyDateString=function(date){if("Date"!==date.constructor.name)throw new Error("dmyDateString: expected a Date object, instead found ".concat(date.constructor.name));return"".concat(date.getUTCDate()," ").concat(_Month.default.nameFromIndex(date.getUTCMonth())," ").concat(date.getUTCFullYear())};exports.ymdDateString=function(date){if("Date"!==date.constructor.name)throw new Error("ymdDateString: expected a Date object, instead found ".concat(date.constructor.name));return"".concat(date.getUTCFullYear()," ").concat(_Month.default.nameFromIndex(date.getUTCMonth())," ").concat(date.getUTCDate())};var dateFromParts=function(year,monthName,day,time){var month=_Month.default.newFromMonthName(monthName);if(!month.isValid())return NaN;var paddedDay=Number(day)<10?"0"+day:day,iso8601DateString="".concat(year,"-").concat(month.paddedNumber,"-").concat(paddedDay,"T").concat(time||"00:01","Z");return Date.parse(iso8601DateString)&&new Date(iso8601DateString)};exports.dateFromParts=dateFromParts;exports.dateFromSigTimestamp=function(sigTimestamp){var parts=/(\d\d:\d\d), (\d{1,2}) (\w+) (\d\d\d\d) \(UTC\)/.exec(sigTimestamp);if(null===parts)return NaN;var _parts$slice2=_slicedToArray(parts.slice(1),4),time=_parts$slice2,day=_parts$slice2,monthName=_parts$slice2,year=_parts$slice2;return dateFromParts(year,monthName,day,time)};exports.dateFromSubpageName=function(subpageName){var _subpageName$split2=_slicedToArray(subpageName.split(" "),3),year=_subpageName$split2,monthName=_subpageName$split2,day=_subpageName$split2;return dateFromParts(year,monthName,day)};exports.dateFromUserInput=function(text){var day,monthName,year,mdyParts=/(\w+) (\d{1,2}), (\d\d\d\d)/.exec(text),dmyParts=/(\d{1,2}) (\w+) (\d{4})/.exec(text),ymdParts=/(\d{4}) (\w+) (\d{1,2})/.exec(text);switch(!0){case!!mdyParts:var _mdyParts$slice2=_slicedToArray(mdyParts.slice(1),3);monthName=_mdyParts$slice2,day=_mdyParts$slice2,year=_mdyParts$slice2;break;case!!dmyParts:var _dmyParts$slice2=_slicedToArray(dmyParts.slice(1),3);day=_dmyParts$slice2,monthName=_dmyParts$slice2,year=_dmyParts$slice2;break;case!!ymdParts:var _ymdParts$slice2=_slicedToArray(ymdParts.slice(1),3);year=_ymdParts$slice2,monthName=_ymdParts$slice2,day=_ymdParts$slice2;break;default:return NaN}var month=_Month.default.newFromMonthShortName(monthName.slice(0,3));return month.isValid()?dateFromParts(year,month.name,day):NaN};exports.multiButtonConfirm=function(config){var htmlSnippetMessage=new _globals.OO.ui.HtmlSnippet(safeUnescape(config.message)),windowManager=new _globals.OO.ui.WindowManager,messageDialog=config.scrolled?new _ScrolledMessageDialog.default:new _globals.OO.ui.MessageDialog;return(0,_globals.$)("body").append(windowManager.$element),windowManager.addWindows(),windowManager.openWindow(messageDialog,{title:config.title,message:htmlSnippetMessage,actions:config.actions,size:config.size,scrollBy:config.scrolled&&windowOffsetTop()}).closed.then(function(data){return windowManager.destroy(),data&&data.action})};exports.multiCheckboxMessageDialog=function(config){var windowManager=new _globals.OO.ui.WindowManager,messageDialog=config.scrolled?new _ScrolledMessageDialog.default:new _globals.OO.ui.MessageDialog,selectAllCheckbox=new _globals.OO.ui.CheckboxMultioptionWidget({label:(0,_globals.$)("<strong>Select all</strong>"),selected:config.items.every(function(item){return item.selected})});selectAllCheckbox.$element.css("margin-bottom","10px");var checkboxMultiselect=new _globals.OO.ui.CheckboxMultiselectWidget({items:config.items.map(function(item){return new _globals.OO.ui.CheckboxMultioptionWidget(item)})});return selectAllCheckbox.on("change",function(selected){checkboxMultiselect.getItems().forEach(function(item){return item.setSelected(selected)})}),(0,_globals.$)("body").append(windowManager.$element),windowManager.addWindows(),windowManager.openWindow(messageDialog,{title:config.title,message:(0,_globals.$)("<div>").append(config.message,1<config.items.length?selectAllCheckbox.$element:null,checkboxMultiselect.$element),actions:config.actions,size:config.size,scrollBy:config.scrolled&&windowOffsetTop()}).closed.then(function(data){return windowManager.destroy(),{action:data&&data.action,items:checkboxMultiselect.findSelectedItemsData()}})};var isPlainObject=function(obj){return!!obj&&"object"===_typeof(obj)&&obj.constructor===Object};exports.recursiveMerge=function recursiveMerge(target,source){var result={};return Object.keys(function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments?arguments:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source)}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},target,{},source)).forEach(function(key){Array.isArray(target)&&Array.isArray(source)?result=.concat(_toConsumableArray(target),_toConsumableArray(source)):isPlainObject(target)&&isPlainObject(source)?result=recursiveMerge(target,source):void 0===source?result=target:result=source}),result};exports.rejection=function(){var _$$Deferred;return(_$$Deferred=_globals.$.Deferred()).reject.apply(_$$Deferred,arguments)};exports.timeout=function(delay){var deferred=_globals.$.Deferred();return setTimeout(deferred.resolve,delay),deferred.promise()};exports.uniqueArray=function(array){var vals={};return array.forEach(function(val){vals=val}),Object.values(vals)};exports.isFile=function(pageName){return 6===_globals.mw.Title.newFromText(pageName).getNamespaceId()};var isModule=function(pageName){return 828===_globals.mw.Title.newFromText(pageName).getNamespaceId()};exports.isModule=isModule;exports.moduleToDoc=function(pageName){return isModule(pageName)?pageName+"/doc":pageName};exports.docToModule=function(pageName){return isModule(pageName)?pageName.replace(/\/doc$/,""):pageName};exports.decodeHtml=function(t){return(0,_globals.$)("<div>").html(t).text()};exports.normalisePageName=function(pageName){var title=_globals.mw.Title.newFromText(pageName);if(null==title)return null;var prefixedText=title.getPrefixedText(),fragment=title.getFragment();return fragment?prefixedText+"#"+fragment:prefixedText};var windowOffsetTop=function(){return window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop};exports.windowOffsetTop=windowOffsetTop;exports.cleanupVoidTemplates=function(wikitext){return wikitext.replace(/\{\{subst:(?:\^|void)*\}\}/gi,"")}},{"../globals":1,"./Components/ScrolledMessageDialog":147,"./Month":200,"core-js/modules/es.array.concat":104,"core-js/modules/es.array.every":105,"core-js/modules/es.array.for-each":110,"core-js/modules/es.array.map":116,"core-js/modules/es.array.slice":119,"core-js/modules/es.function.name":123,"core-js/modules/es.number.constructor":124,"core-js/modules/es.object.keys":126,"core-js/modules/es.object.values":129,"core-js/modules/es.regexp.exec":132,"core-js/modules/es.string.replace":136,"core-js/modules/es.string.split":138,"core-js/modules/es.string.trim":139,"core-js/modules/web.dom-collections.for-each":140}],226:;descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _createSuper(Derived){var hasNativeReflectConstruct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,,function(){})),!0}catch(e){return!1}}();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function(self,call){{if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined")}return function(self){if(void 0!==self)return self;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(self)}(this,result)}}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}var WindowManager=function(){!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(WindowManager,_globals.OO.ui.WindowManager);var _super=_createSuper(WindowManager);function WindowManager(config){return _classCallCheck(this,WindowManager),_super.call(this,config)}return _createClass(WindowManager,),WindowManager}(),_default=new(function(){function WindowSetManager(){var factory;_classCallCheck(this,WindowSetManager),this.factory=((factory=new _globals.OO.Factory).register(_MainWindow.default),factory.register(_UnlinkWindow.default),factory.register(_PrefsWindow.default),factory),this.windowManagers=}return _createClass(WindowSetManager,),WindowSetManager}());exports.default=_default},{"../globals":1,"./Views/MainWindow":205,"./Views/PrefsWindow":210,"./Views/UnlinkWindow":219,"core-js/modules/es.array.find":108,"core-js/modules/es.array.some":120,"core-js/modules/es.object.set-prototype-of":127}]},{},);
/* </nowiki> */