%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/wiki.varak.net/extensions/MobileFrontend/resources/dist/
Upload File :
Create Path :
Current File : /www/varak.net/wiki.varak.net/extensions/MobileFrontend/resources/dist/tests.mobilefrontend.js

this[void 0]=(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t){e.exports=function(e,t,n){var i;for(i in n?OO.inheritClass(e,t):(OO.initClass(e),n=t),n)e.prototype[i]=n[i]}},function(e,t){e.exports={escapeSelector:function(e){return $.escapeSelector(e)},grep:function(){return $.grep.apply($,arguments)},docReady:function(e){return $(e)},when:function(){return $.when.apply($,arguments)},Deferred:function(){var e=$.Deferred(),t="Use Promise compatible methods `then` and `catch` instead.";return mw.log.deprecate(e,"fail",e.fail,t),mw.log.deprecate(e,"always",e.always,t),mw.log.deprecate(e,"done",e.done,t),e},getDocument:function(){return $(document.documentElement)},getWindow:function(){return $(window)},parseHTML:function(e,t){return $($.parseHTML(e,t))},isNumeric:function(){return $.isNumeric.apply($,arguments)},extend:function(){return $.extend.apply($,arguments)},escapeHash:function(e){return e.replace(/(:|\.)/g,"\\$1")},isModifiedEvent:function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey},repeatEvent:function(e,t,n,i){return e.on(n,function(e){return t.emit(n,e)},i)}}},function(e,t,n){var i=n(1),a=n(0),o=/^(\S+)\s*(.*)$/,s=0;function r(){this.initialize.apply(this,arguments)}OO.mixinClass(r,OO.EventEmitter),a(r,{className:void 0,tagName:"div",isTemplateMode:!1,isBorderBox:!0,template:void 0,templatePartials:{},defaults:{},events:null,initialize:function(e){var t=this;OO.EventEmitter.call(this),e=i.extend({},this.defaults,e),this.options=e,this.cid=function(e){var t=(++s).toString();return e?e+t:t}("view"),"string"==typeof this.template&&(this.template=mw.template.compile(this.template)),e.el?this.$el=$(e.el):this.$el=this.parseHTML("<"+this.tagName+">"),this.$el.length?this._postInitialize():i.docReady(function(){t.$el=$(e.el),t._postInitialize()})},_postInitialize:function(){this.$el.addClass(this.className),this.isBorderBox&&this.$el.addClass("view-border-box"),this.render(this.options)},preRender:function(){},postRender:function(){},render:function(e){var t;return i.extend(this.options,e),this.preRender(),this.undelegateEvents(),this.template&&!this.options.skipTemplateRender&&(t=this.template.render(this.options,this.templatePartials),this.isTemplateMode?this.$el=$(t):this.$el.html(t)),this.postRender(),this.delegateEvents(),this},$:function(e){return this.$el.find(e)},delegateEvents:function(e){var t,n,i;if(e=e||this.events)for(n in this.undelegateEvents(),e)"function"!=typeof(i=e[n])&&(i=this[e[n]]),i&&(t=n.match(o),this.delegate(t[1],t[2],i.bind(this)))},delegate:function(e,t,n){this.$el.on(e+".delegateEvents"+this.cid,t,n)},undelegateEvents:function(){this.$el&&this.$el.off(".delegateEvents"+this.cid)},undelegate:function(e,t,n){this.$el.off(e+".delegateEvents"+this.cid,t,n)},parseHTML:i.parseHTML}),["append","prepend","appendTo","prependTo","after","before","insertAfter","insertBefore","remove","detach"].forEach(function(e){r.prototype[e]=function(){return this.$el[e].apply(this.$el,arguments),this}}),e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){!function(){e.exports=this.sinon}()},function(e,t,n){var i="object"!=typeof window;e.exports={setUp:function(e,t){i&&(t.OO=t.OO||void 0,e.stub(t,"OO",n(35)))}}},function(e,t,n){var i=n(12),a=n(1);e.exports={spinner:function(e){return e=e||{},new i(a.extend(e,{name:"spinner",label:mw.msg("mobile-frontend-loading-message"),additionalClassNames:"spinner loading"}))}}},function(e,t,n){var i,a=n(1);function o(e){var t=function(){var n=this["__cache"+t.cacheId]||(this["__cache"+t.cacheId]={}),i=[].join.call(arguments,"|");return Object.prototype.hasOwnProperty.call(n,i)?n[i]:n[i]=e.apply(this,arguments)};return t.cacheId=Date.now().toString()+Math.random().toString(),t}function s(e,t){this.userAgent=e,this.$el=t,this._fixIosLandscapeBug()}s.prototype={_fixIosLandscapeBug:function(){var e=this;this.$el.find('meta[name="viewport"]')[0]&&(this.isIos(4)||this.isIos(5))&&(this.lockViewport(),document.addEventListener("gesturestart",function(){e.lockViewport()},!1))},isIos:o(function(e){var t=this.userAgent,n=/ipad|iphone|ipod/i.test(t);if(!n||!e)return n;switch(e){case 8:return/OS 8_/.test(t)||/Version\/8/.test(t);case 4:return/OS 4_/.test(t);case 5:return/OS 5_/.test(t);default:return!1}}),lockViewport:function(){this.$el&&this.$el.find('meta[name="viewport"]').attr("content","initial-scale=1.0, maximum-scale=1.0, user-scalable=no")},isWideScreen:o(function(){var e=parseInt(mw.config.get("wgMFDeviceWidthTablet"),10);return window.innerWidth>=e||window.innerHeight>=e}),supportsAnimations:o(function(){var e=document.createElement("foo").style;function t(t){return t in e||"webkit"+t[0].toUpperCase()+t.slice(1)in e}return t("animationName")&&t("transform")&&t("transition")}),supportsTouchEvents:o(function(){return"ontouchstart"in window}),supportsGeoLocation:o(function(){return"geolocation"in window.navigator})},s.getSingleton=function(){var e;return i||(e=a.getDocument(),i=new s(window.navigator.userAgent,e)),i},e.exports=s},function(e,t,n){var i="object"!=typeof window;e.exports={setUp:function(e,t){i&&(t.$=t.$||void 0,e.stub(t,"$",n(24)))},tearDown:function(){i&&delete n.c[24]}}},function(e,t,n){var i=mw.html,a=n(0),o=n(11),s=n(1),r=n(15),l=n(16),c=n(2),u=mw.config.get("wgMFMobileFormatterHeadings").join(","),d=["noviewer","metadata"];function h(e){var t;void 0===e.thumbnail&&(e.thumbnail=!1),this.options=e,e.languageUrl=mw.util.getUrl("Special:MobileLanguages/"+e.title),c.call(this,e),e.displayTitle=this.getDisplayTitle(),this.title=e.title,this.displayTitle=e.displayTitle,this.thumbnail=e.thumbnail,this.url=e.url||mw.util.getUrl(e.title),this.id=e.id,this.isMissing=void 0!==e.isMissing?e.isMissing:0===e.id,(t=this.thumbnail)&&t.width&&(this.thumbnail.isLandscape=t.width>t.height),this.wikidataDescription=e.wikidataDescription}a(h,c,{defaults:{id:0,title:"",displayTitle:"",namespaceNumber:0,protection:{edit:["*"]},sections:[],isMissing:!1,isMainPage:!1,url:void 0,thumbnail:{isLandscape:void 0,source:void 0,width:void 0,height:void 0}},isBorderBox:!1,getDisplayTitle:function(){return this.options.displayTitle||i.escape(this.options.title)},inNamespace:function(e){return this.options.namespaceNumber===mw.config.get("wgNamespaceIds")[e]},findSectionHeadingByIndex:function(e){return e<1?this.$():this.$(u).filter('.mw-parser-output > *, [class^="mf-section-"] > *').eq(e-1)},findChildInSectionLead:function(e,t){var n,i,a,o,s=u;function r(e){return e.find(t).addBack()}return 0===e?(o=this.getLeadSectionElement())&&o.length?r(o.children(t)):(n=this.findSectionHeadingByIndex(1)).length?r(n.prevAll(t)):this.$(t):(n=this.findSectionHeadingByIndex(e)).hasClass("section-heading")?(i=(a=n.next()).find(s).eq(0)).length?r(i.prevAll(t)):r(a.children(t)):(i=n.eq(0).nextAll(s).eq(0),n.nextUntil(i,t))},getLeadSectionElement:function(){return this.$(".mf-section-0").length?this.$(".mf-section-0"):null},isWikiText:function(){return"wikitext"===mw.config.get("wgPageContentModel")},isMainPage:function(){return this.options.isMainPage},isWatched:function(){return this.options.isWatched},getRevisionId:function(){return this.options.revId},getTitle:function(){return this.options.title},getId:function(){return this.options.id},getNamespaceId:function(){var e=this.options.title.split(":");return e[1]&&mw.config.get("wgNamespaceIds")[e[0].toLowerCase().replace(" ","_")]||0},isTalkPage:function(){var e=this.getNamespaceId();return e>0&&e%2==1},preRender:function(){this.sections=[],this._sectionLookup={},this.title=this.options.title,this.options.sections.forEach(function(e){var t=new r(e);this.sections.push(t),this._sectionLookup[t.id]=t}.bind(this))},getThumbnails:function(){var e=this.$el,t="."+d.join(",."),n=[];return this._thumbs||(e.find("a.image, a.thumbimage").not(t).each(function(){var i=e.find(this),a=i.find(".lazy-image-placeholder"),o=0===i.parents(t).length&&0===i.find(t).length,s=i.attr("href").match(/title=([^/&]+)/),r=i.attr("href").match(/[^/]+$/);a.length&&o&&(o=!new RegExp("\\b("+d.join("|")+")\\b").test(a.data("class"))),o&&(s||r)&&n.push(new l({el:i,filename:decodeURIComponent(s?s[1]:r[0])}))}),this._thumbs=n),this._thumbs},getSection:function(e){return this._sectionLookup[e]},getSections:function(){return this.sections},getRedLinks:function(){return this.$(".new")}}),h.newFromJSON=function(e){var t,n,a=e.thumbnail,r=e.pageprops||{displaytitle:i.escape(e.title)},l=e.terms;return(r||l)&&(n=l&&l.label?i.escape(l.label[0]):r.displaytitle),e.wikidataDescription=e.description||void 0,a&&(e.thumbnail.isLandscape=a.width>a.height),e.revisions&&e.revisions[0]&&(t=e.revisions[0],e.lastModified=o.getLastModifiedMessage(new Date(t.timestamp).getTime()/1e3,t.user)),new h(s.extend(e,{id:e.pageid,isMissing:!!e.missing,url:mw.util.getUrl(e.title),displayTitle:n}))},h.HEADING_SELECTOR=u,e.exports=h},function(e,t,n){var i="object"!=typeof window,a=n(32);e.exports={setUp:function(e,t){i&&(t.mw=t.mw||void 0,e.stub(t,"mw",a()))}}},function(e,t,n){var i=["seconds","minutes","hours","days","months","years"],a=n(1),o=[1,60,3600,86400,2592e3,31536e3];function s(e){for(var t=0;t<o.length&&e>o[t+1];)++t;return{value:Math.round(e/o[t]),unit:i[t]}}function r(e){return s(Math.round((new Date).getTime()/1e3)-e)}function l(e){return"seconds"===e.unit&&e.value<10}e.exports={getLastModifiedMessage:function(e,t,n,i){var o,s,c=[];return n=n||"unknown",l(o=r(e))?c.push("mobile-frontend-last-modified-with-user-just-now",n,t):c.push({seconds:"mobile-frontend-last-modified-with-user-seconds",minutes:"mobile-frontend-last-modified-with-user-minutes",hours:"mobile-frontend-last-modified-with-user-hours",days:"mobile-frontend-last-modified-with-user-days",months:"mobile-frontend-last-modified-with-user-months",years:"mobile-frontend-last-modified-with-user-years"}[o.unit],n,t,mw.language.convertNumber(o.value)),c.push(i||"#",mw.language.convertNumber(t?1:0),t?mw.util.getUrl("User:"+t):""),s=mw.message.apply(this,c).parse(),i?s:a.parseHTML("<div>").html(s).text()},getRegistrationMessage:function(e,t){var n,i=[];return t=t||"unknown",l(n=r(parseInt(e,10)))?i.push("mobile-frontend-joined-just-now",t):i.push({seconds:"mobile-frontend-joined-seconds",minutes:"mobile-frontend-joined-minutes",hours:"mobile-frontend-joined-hours",days:"mobile-frontend-joined-days",months:"mobile-frontend-joined-months",years:"mobile-frontend-joined-years"}[n.unit],t,mw.language.convertNumber(n.value)),mw.message.apply(this,i).parse()},timeAgo:s,getTimeAgoDelta:r,isNow:l,isRecent:function(e){return["seconds","minutes","hours"].indexOf(e.unit)>-1}}},function(e,t,n){var i=n(0),a=n(2);function o(e){e.hasText&&(e.modifier="mw-ui-icon-before"),e.href&&(e.tagName="a"),a.call(this,e)}i(o,a,{preRender:function(){this.setRotationClass()},setRotationClass:function(){var e=this.options;if(e.rotation)switch(e.rotation){case-180:case 180:e._rotationClass="mf-mw-ui-icon-rotate-flip";break;case-90:e._rotationClass="mf-mw-ui-icon-rotate-anti-clockwise";break;case 90:e._rotationClass="mf-mw-ui-icon-rotate-clockwise";break;case 0:break;default:throw new Error("Bad value for rotation given. Must be ±90, 0 or ±180.")}},isTemplateMode:!0,defaults:{rotation:0,hasText:!1,href:void 0,glyphPrefix:"mf",tagName:"div",isSmall:!1,base:"mw-ui-icon",name:"",modifier:"mw-ui-icon-element",title:""},getClassName:function(){return this.$el.attr("class")},getGlyphClassName:function(){return this.options.base+"-"+this.options.glyphPrefix+"-"+this.options.name},toHtmlString:function(){return this.parseHTML("<div>").append(this.$el).html()},template:mw.template.get("mobile.startup","icon.hogan")}),e.exports=o},function(e,t,n){var i="object"!=typeof window,a=i&&n(31);e.exports={setUp:function(e,t){i&&(t.window=t.window||void 0,t.document=t.document||void 0,e.stub(t,"window",(new a.JSDOM).window),e.stub(t,"document",window.document))}}},function(e,t){function n(){this._register={},OO.EventEmitter.call(this)}n.prototype={require:function(e){var t,n,i=this._register;function a(){if(!Object.hasOwnProperty.call(i,e))throw new Error("MobileFrontend Module not found: "+e);return i[e]}n=e.split("/");try{return(t=mw.loader.require(n[0]))[n[1]]?t[n[1]]:a()}catch(e){return a()}},define:function(e,t){var n=this;if(Object.hasOwnProperty.call(this._register,e))throw new Error("Module already exists: "+e);return this._register[e]=t,{deprecate:function(i){n.deprecate(i,t,e)}}},deprecate:function(e,t,n){var i;n&&(i="Use "+n+" instead."),mw.log.deprecate(this._register,e,t,i)}},OO.mixinClass(n,OO.EventEmitter),e.exports=n},function(e,t,n){var i=n(0),a=n(6),o=n(2);function s(e){var t=this;e.tag="h"+e.level,this.line=e.line,this.text=e.text,this.hasReferences=e.hasReferences||!1,this.id=e.id||null,this.anchor=e.anchor,this.children=[],(e.children||[]).forEach(function(e){t.children.push(new s(e))}),o.call(this,e)}i(s,o,{template:mw.template.get("mobile.startup","Section.hogan"),defaults:{line:void 0,text:"",spinner:a.spinner().toHtmlString()}}),e.exports=s},function(e,t,n){var i=n(0),a=n(2);function o(){a.apply(this,arguments)}i(o,a,{defaults:{filename:void 0},isBorderBox:!1,postRender:function(){this.options.description=this.$el.siblings(".thumbcaption").text()},getDescription:function(){return this.options.description},getFileName:function(){return this.options.filename}}),e.exports=o},function(e,t,n){var i=n(21);i.Template=n(22).Template,e.exports=i},function(e,t,n){var i=n(14);e.exports=new i},function(e,t){function n(){this._cache={}}function i(){}n.prototype.get=function(e){return this._cache[e]},n.prototype.set=function(e,t){this._cache[e]=t},i.prototype.get=function(){},i.prototype.set=function(){},e.exports={MemoryCache:n,NoCache:i}},function(e,t,n){var i=n(1);function a(e){e.on("route",this._checkRoute.bind(this)),this.router=e,this.entries={},this.stack=[],this.hideCurrent=!0}n(0)(a,{_onHideOverlay:function(){this.hideCurrent=!1,this.router.back()},_showOverlay:function(e){e.once("_om_hide",this._onHideOverlay.bind(this)),e.show()},_hideOverlay:function(e){var t;return e.off("_om_hide"),(t=e.hide(this.stack.length>1))||e.once("_om_hide",this._onHideOverlay.bind(this)),t},_processMatch:function(e){var t,n=this;function i(e){e.on("hide",function(){e.emit("_om_hide")})}e&&(e.overlay?n._showOverlay(e.overlay):"function"==typeof(t=e.factoryResult).promise?t.then(function(t){e.overlay=t,i(t),n._showOverlay(t)}):(e.overlay=t,i(e.overlay),n._showOverlay(t)))},_checkRoute:function(e){var t,n=this.stack[0];n||(this.scrollTop=window.pageYOffset),t=Object.keys(this.entries).reduce(function(t,n){return t||this._matchRoute(e.path,this.entries[n])}.bind(this),null),n&&void 0!==n.overlay&&this.hideCurrent&&!this._hideOverlay(n.overlay)?e.preventDefault():t||(this.stack=[],window.scrollTo(window.pageXOffset,this.scrollTop)),this.hideCurrent=!0,this._processMatch(t)},_matchRoute:function(e,t){var n,i=e.match(t.route),a=this.stack[1],o=this;function s(){return{path:e,factoryResult:t.factory.apply(o,i.slice(1))}}return i?a&&a.path===e?a.overlay&&a.overlay.hasLoadError?(o.stack.shift(),o.stack[0]=s(),o.stack[0]):(o.stack.shift(),a):(n=s(),this.stack[0]&&n.path===this.stack[0].path?o.stack[0]=n:o.stack.unshift(n),n):null},add:function(e,t){var n=this,a={route:e,factory:t};this.entries[e]=a,i.docReady(function(){n._processMatch(n._matchRoute(n.router.getPath(),a))})},replaceCurrent:function(e){if(0===this.stack.length)throw new Error("Trying to replace OverlayManager's current overlay, but stack is empty");this._hideOverlay(this.stack[0].overlay),this.stack[0].overlay=e,this._showOverlay(e)}}),e.exports=a},function(e,t,n){!function(e){var t=/\S/,n=/\"/g,i=/\n/g,a=/\r/g,o=/\\/g,s={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};function r(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function l(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function c(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var i=1,a=e.length;i<a;i++)if(t.charAt(n+i)!=e.charAt(i))return!1;return!0}function u(e,t){for(var n=0,i=t.length;n<i;n++)if(t[n].o==e.n)return e.tag="#",!0}function d(e,t,n){for(var i=0,a=n.length;i<a;i++)if(n[i].c==e&&n[i].o==t)return!0}function h(e){return e.replace(o,"\\\\").replace(n,'\\"').replace(i,"\\n").replace(a,"\\r")}function p(e){return~e.indexOf(".")?"d":"f"}function f(e){for(var t="",n=0,i=e.length;n<i;n++){var a=e[n].tag;"#"==a?t+=m(e[n].nodes,e[n].n,p(e[n].n),e[n].i,e[n].end,e[n].otag+" "+e[n].ctag):"^"==a?t+=g(e[n].nodes,e[n].n,p(e[n].n)):"<"==a||">"==a?t+=v(e[n]):"{"==a||"&"==a?t+=w(e[n].n,p(e[n].n)):"\n"==a?t+=y('"\\n"'+(e.length-1==n?"":" + i")):"_v"==a?t+=b(e[n].n,p(e[n].n)):void 0===a&&(t+=y('"'+h(e[n])+'"'))}return t}function m(e,t,n,i,a,o){return"if(_.s(_."+n+'("'+h(t)+'",c,p,1),c,p,0,'+i+","+a+',"'+o+'")){_.rs(c,p,function(c,p,_){'+f(e)+"});c.pop();}"}function g(e,t,n){return"if(!_.s(_."+n+'("'+h(t)+'",c,p,1),c,p,1,0,0,"")){'+f(e)+"};"}function v(e){return'_.b(_.rp("'+h(e.n)+'",c,p,"'+(e.indent||"")+'"));'}function w(e,t){return"_.b(_.t(_."+t+'("'+h(e)+'",c,p,0)));'}function b(e,t){return"_.b(_.v(_."+t+'("'+h(e)+'",c,p,0)));'}function y(e){return"_.b("+e+");"}e.scan=function(e,n){var i=e.length,a=0,o=null,u=null,d="",h=[],p=!1,f=0,m=0,g="{{",v="}}";function w(){d.length>0&&(h.push(new String(d)),d="")}function b(e,n){if(w(),e&&function(){for(var e=!0,n=m;n<h.length;n++)if(!(e=h[n].tag&&s[h[n].tag]<s._v||!h[n].tag&&null===h[n].match(t)))return!1;return e}())for(var i,a=m;a<h.length;a++)h[a].tag||((i=h[a+1])&&">"==i.tag&&(i.indent=h[a].toString()),h.splice(a,1));else n||h.push({tag:"\n"});p=!1,m=h.length}function y(e,t){var n="="+v,i=e.indexOf(n,t),a=l(e.substring(e.indexOf("=",t)+1,i)).split(" ");return g=a[0],v=a[1],i+n.length-1}for(n&&(n=n.split(" "),g=n[0],v=n[1]),f=0;f<i;f++)0==a?c(g,e,f)?(--f,w(),a=1):"\n"==e.charAt(f)?b(p):d+=e.charAt(f):1==a?(f+=g.length-1,"="==(o=(u=s[e.charAt(f+1)])?e.charAt(f+1):"_v")?(f=y(e,f),a=0):(u&&f++,a=2),p=f):c(v,e,f)?(h.push({tag:o,n:l(d),otag:g,ctag:v,i:"/"==o?p-v.length:f+g.length}),d="",f+=v.length-1,a=0,"{"==o&&("}}"==v?f++:r(h[h.length-1]))):d+=e.charAt(f);return b(p,!0),h},e.generate=function(t,n,i){var a='var _=this;_.b(i=i||"");'+f(t)+"return _.fl();";return i.asString?"function(c,p,i){"+a+";}":new e.Template(new Function("c","p","i",a),n,e,i)},e.parse=function(e,t,n){return function e(t,n,i,a){for(var o=[],s=null,r=null;t.length>0;)if("#"==(r=t.shift()).tag||"^"==r.tag||u(r,a))i.push(r),r.nodes=e(t,r.tag,i,a),o.push(r);else{if("/"==r.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+r.n);if(s=i.pop(),r.n!=s.n&&!d(r.n,s.n,a))throw new Error("Nesting error: "+s.n+" vs. "+r.n);return s.end=r.i,o}o.push(r)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return o}(e,0,[],(n=n||{}).sectionTags||[])},e.cache={},e.compile=function(e,t){var n=e+"||"+!!(t=t||{}).asString,i=this.cache[n];return i||(i=this.generate(this.parse(this.scan(e,t.delimiters),e,t),e,t),this.cache[n]=i)}}(t)},function(e,t,n){!function(e,t){e.Template=function(e,t,n,i){this.r=e||this.r,this.c=n,this.options=i,this.text=t||"",this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=l(e),r.test(e)?e.replace(n,"&amp;").replace(i,"&lt;").replace(a,"&gt;").replace(o,"&#39;").replace(s,"&quot;"):e},t:l,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},rp:function(e,t,n,i){var a=n[e];return a?(this.c&&"string"==typeof a&&(a=this.c.compile(a,this.options)),a.ri(t,n,i)):""},rs:function(e,t,n){var i=e[e.length-1];if(c(i))for(var a=0;a<i.length;a++)e.push(i[a]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,i,a,o,s){var r;return(!c(e)||0!==e.length)&&("function"==typeof e&&(e=this.ls(e,t,n,i,a,o,s)),r=""===e||!!e,!i&&r&&t&&t.push("object"==typeof e?e:t[t.length-1]),r)},d:function(e,t,n,i){var a=e.split("."),o=this.f(a[0],t,n,i),s=null;if("."===e&&c(t[t.length-2]))return t[t.length-1];for(var r=1;r<a.length;r++)o&&"object"==typeof o&&a[r]in o?(s=o,o=o[a[r]]):o="";return!(i&&!o)&&(i||"function"!=typeof o||(t.push(s),o=this.lv(o,t,n),t.pop()),o)},f:function(e,t,n,i){for(var a=!1,o=null,s=!1,r=t.length-1;r>=0;r--)if((o=t[r])&&"object"==typeof o&&e in o){a=o[e],s=!0;break}return s?(i||"function"!=typeof a||(a=this.lv(a,t,n)),a):!i&&""},ho:function(e,t,n,i,a){var o=this.c,s=this.options;return s.delimiters=a,i=null==(i=e.call(t,i))?String(i):i.toString(),this.b(o.compile(i,s).render(t,n)),!1},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ls:function(e,t,n,i,a,o,s){var r,l=t[t.length-1];if(!i&&this.c&&e.length>0)return this.ho(e,l,n,this.text.substring(a,o),s);if("function"==typeof(r=e.call(l))){if(i)return!0;if(this.c)return this.ho(r,l,n,this.text.substring(a,o),s)}return r},lv:function(e,t,n){var i=t[t.length-1],a=e.call(i);return"function"==typeof a&&(a=l(a.call(i)),this.c&&~a.indexOf("{{"))?this.c.compile(a,this.options).render(i,n):l(a)}};var n=/&/g,i=/</g,a=/>/g,o=/\'/g,s=/\"/g,r=/[&<>\"\']/;function l(e){return String(null===e||void 0===e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},function(e,t,n){var i=n(7).getSingleton(),a=n(2),o=n(1),s=n(9),r=o.Deferred,l=o.when,c=n(6),u=mw.viewport,d=c.spinner(),h=n(0),p=n(18);function f(e){var t,n=s.HEADING_SELECTOR,i=e.parent(),a=e.prevAll(n).eq(0);return a.length&&(t=a.find(".mw-headline").attr("id"))?t:i.length?f(i):null}function m(e){var t=this;this.page=e.page,this.name=e.name,e.mainMenu&&(this.mainMenu=e.mainMenu,mw.log.warn("Skin: Use of mainMenu is deprecated.")),a.call(this,e),this.referencesGateway=e.referencesGateway,mw.config.get("wgMFLazyLoadImages")&&o.docReady(function(){t.setupImageLoading()}),mw.config.get("wgMFLazyLoadReferences")&&p.on("before-section-toggled",this.lazyLoadReferences.bind(this))}h(m,a,{isBorderBox:!1,defaults:{page:void 0},events:{},postRender:function(){var e=this.$el;i.supportsAnimations()&&e.addClass("animations"),i.supportsTouchEvents()&&e.addClass("touch-events"),o.parseHTML('<div class="transparent-shield cloaked-element">').appendTo(e.find("#mw-mf-page-center")),this.emit("changed"),this.$("#mw-mf-page-center").on("click",this.emit.bind(this,"click"))},getUnloadedImages:function(e){return(e=e||this.$("#content")).find(".lazy-image-placeholder").toArray()},setupImageLoading:function(e){var t=this,n=1.5*o.getWindow().height(),i=this.loadImagesList.bind(this),a=this.getUnloadedImages(e);function s(){var e=[];return(a=o.grep(a,function(i){var a=t.$(i);return!a.length||!function(e){return u.isElementCloseToViewport(e[0],n)&&(e.is(":visible")||0===e.height())}(a)||(e.push(i),!1)})).length||(p.off("scroll:throttled",s),p.off("resize:throttled",s),p.off("section-toggled",s),t.off("changed",s)),i(e)}return p.on("scroll:throttled",s),p.on("resize:throttled",s),p.on("section-toggled",s),this.on("changed",s),s()},loadImagesList:function(e){var t,n=this.$.bind(this),i=this.loadImage.bind(this);return t=(e=e||this.getUnloadedImages()).map(function(e){return i(n(e))}),l.apply(null,t)},loadImage:function(e){var t=r(),n=e.attr("data-width"),i=e.attr("data-height"),a=o.parseHTML("<img>",this.$el[0].ownerDocument);return a.on("load",function(){a.addClass("image-lazy-loaded"),e.replaceWith(a),t.resolve()}),a.on("error",function(){t.reject()}),a.attr({class:e.attr("data-class"),width:n,height:i,src:e.attr("data-src"),alt:e.attr("data-alt"),style:e.attr("style"),srcset:e.attr("data-srcset")}),t},lazyLoadReferences:function(e){var t,n,i=this.referencesGateway,a=this.getUnloadedImages.bind(this),o=this.loadImagesList.bind(this),s=this;if(!e.wasExpanded&&e.isReferenceSection)return(t=e.$heading.next()).data("are-references-loaded")?r().reject().promise():(t.children().addClass("hidden"),n=d.$el.prependTo(t),i.getReferencesLists(e.page).then(function(){var a;t.find(".mf-lazy-references-placeholder").each(function(){var n=0,o=t.find(this),s=f(o);a!==s?(n=0,a=s):n++,s&&i.getReferencesList(e.page,s).then(function(e){e&&e[n]&&o.replaceWith(e[n])})}),n.remove(),t.children().removeClass("hidden"),s.emit("references-loaded",s.page),l()},function(){n.remove(),t.children().removeClass("hidden"),l()}));function l(){o(a(t)),t.data("are-references-loaded",1)}},getLicenseMsg:function(){var e,t=mw.config.get("wgMFLicense"),n=mw.language.convertNumber(t.plural);return t.link&&(e=this.$("#footer-places-terms-use").length>0?mw.msg("mobile-frontend-editor-licensing-with-terms",mw.message("mobile-frontend-editor-terms-link",this.$("#footer-places-terms-use a").attr("href")).parse(),t.link,n):mw.msg("mobile-frontend-editor-licensing",t.link,n)),e}}),m.getSectionId=f,e.exports=m},function(e,t){!function(){e.exports=this.jquery}()},,,,,function(e,t,n){n(30),n(33),n(34),n(36),n(37),n(38),n(39),n(43),n(44),e.exports=n(45)},function(e,t,n){(function(e){var t,i,a=n(7),o=n(13),s=n(8),r=n(4),l=n(10);QUnit.module("MobileFrontend Browser.js",{beforeEach:function(){var n;i=r.sandbox.create(),o.setUp(i,e),s.setUp(i,e),l.setUp(i,e),n=window.document.implementation.createHTMLDocument("Test"),t=$(n)},afterEach:function(){i.restore()}}),QUnit.test("isIos()",function(e){var n=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t),i=new a("Mozilla/5.0 (iPad; CPU OS 4_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t),o=new a("Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t),s=new a("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/8.0 Mobile/11A465 Safari/9537.53",t);e.strictEqual(n.isIos(),!0),e.strictEqual(n.isIos(8),!1),e.strictEqual(n.isIos(4),!1),e.strictEqual(n.isIos(5),!1),e.strictEqual(s.isIos(),!0),e.strictEqual(s.isIos(8),!0),e.strictEqual(i.isIos(4),!0),e.strictEqual(o.isIos(5),!0)}),QUnit.test("Methods are cached",function(e){var n=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t),i=new a("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/8.0 Mobile/11A465 Safari/9537.53",t),o=new a("Android 2",t);function s(e,t){return e["__cache"+e[t].cacheId]}e.strictEqual(n.isIos(),!0),e.strictEqual(n.isIos(8),!1),e.strictEqual(o.isIos(8),!1),e.strictEqual(i.isIos(),!0),e.strictEqual(i.isIos(8),!0),e.strictEqual(Object.keys(s(n,"isIos")).length,2,"isIos on ipad cached as expected"),e.strictEqual(Object.keys(s(o,"isIos")).length,1,"isIos on android cached as expected"),e.strictEqual(Object.keys(s(i,"isIos")).length,2,"isIos on iphone cached as expected")}),QUnit.test("lockViewport()",function(e){var n,i=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t);i.$el.find("head").append('<meta name="viewport"/>'),i.lockViewport(),n=i.$el.find('meta[name="viewport"]').attr("content"),e.strictEqual(n,"initial-scale=1.0, maximum-scale=1.0, user-scalable=no")}),QUnit.test("isWideScreen()",function(e){var n=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t);i.stub(mw.config,"get",function(){return"720px"}),e.strictEqual(n.isWideScreen(),!0)}),QUnit.test("supportsAnimations() - true",function(e){var n,o=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t),s=i.stub(document,"createElement",function(){return{style:{animationName:"",transform:"",transition:""}}});n=o.supportsAnimations(),s.restore(),e.strictEqual(n,!0)}),QUnit.test("supportsAnimations() - false",function(e){var n,o=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t),s=i.stub(document,"createElement",function(){return{style:{}}});n=o.supportsAnimations(),s.restore(),e.strictEqual(n,!1)}),QUnit.test("supportsTouchEvents()",function(e){var n=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t);window.ontouchstart=window.ontouchstart||void 0,e.strictEqual(n.supportsTouchEvents(),!0)}),QUnit.test("supportsGeoLocation()",function(e){var n=new a("Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)",t);window.navigator.geolocation=window.navigator.geolocation||void 0,e.strictEqual(n.supportsGeoLocation(),!0)})}).call(this,n(3))},function(e,t){!function(){e.exports=this.jsdom}()},function(e,t){var n={special:-1,talk:1,user_talk:3,project:4,project_talk:5};e.exports=function(){var e={wgNamespaceIds:n};return{config:{get:function(t){return e[t]},set:function(t,n){e[t]=n}},html:{escape:function(e){return e.replace(/['"<>&]/g,function(e){switch(e){case"'":return"&#039;";case'"':return"&quot;";case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;"}})}},log:{deprecate:function(){}},msg:function(e){return e},now:Date.now.bind(Date),template:{get:function(){}},user:{},util:{getUrl:function(e){return e}},loader:{using:function(){}}}}},function(e,t,n){var i=new(0,n(19).MemoryCache);QUnit.module("MobileFrontend cache.js"),QUnit.test("cache set() and get()",function(e){i.set("key","value"),e.strictEqual(i.get("key"),"value")})},function(e,t,n){(function(e){var t,i,a=n(4),o=n(5);QUnit.module("MobileFrontend mfExtend.test.js",{beforeEach:function(){i=a.sandbox.create(),o.setUp(i,e),t=n(0)},afterEach:function(){i.restore()}}),QUnit.test("mfExtend() - extending from constructor",function(e){function n(){}function i(){}t(n,i,{}),e.strictEqual(n.prototype instanceof i,!0)}),QUnit.test("mfExtend() - extending from object",function(e){var n,i=new function(){this.protoMethod=function(){return!0}};function a(){}t(a,i),n=new a,e.strictEqual(n.protoMethod(),!0)}),QUnit.test("mfExtend() - extending from constructor with overrides",function(e){var n;function i(){}t(i,function(){this.protoMethod=function(){return!0}},{protoMethod:function(){return!1}}),n=new i,e.strictEqual(n.protoMethod(),!1)})}).call(this,n(3))},function(e,t){!function(){e.exports=this.oojs}()},function(e,t,n){(function(e){var t,i,a=n(5),o=n(4);QUnit.module("MobileFrontend ModuleLoader",{beforeEach:function(){i=o.sandbox.create(),a.setUp(i,e),t=n(14),this.loader=new t},afterEach:function(){i.restore()}}),QUnit.test("#require",function(e){this.loader.define("foo",1),this.loader.define("bar",5),e.strictEqual(this.loader.require("foo"),1,"Returns appropriate module"),e.strictEqual(this.loader.require("bar"),5,"Returns appropriate module"),e.throws(function(){this.loader.require("undefinedmodule")},"Cannot require an undefined module."),e.throws(function(){this.loader.require("mobile.modules/Foo")},"Cannot require an undefined export on a known module.")}),QUnit.test("#define",function(e){var t=this.loader;t.define("foo",1),t.define("bar",5),e.throws(function(){t.define("bar",50)},"Cannot define two modules with the same name"),e.strictEqual(this.loader.require("bar"),5,"Returns first definition of module.")})}).call(this,n(3))},function(e,t,n){(function(e){var t,i,a,o,s=n(4),r=n(13),l=n(8),c=n(5),u=n(1),d=n(10);QUnit.module("MobileFrontend mobile.startup/OverlayManager",{beforeEach:function(){o=s.sandbox.create(),r.setUp(o,e),c.setUp(o,e),l.setUp(o,e),d.setUp(o,e),o.stub(e.window,"scrollTo"),t=n(20),this.createFakeOverlay=function(e){var t=new OO.EventEmitter;return t.hasLoadError=!1,t.show=o.spy(),t.hide=function(){return this.emit("hide"),!0},o.spy(t,"hide"),u.extend(t,e),t},(i=new OO.EventEmitter).getPath=o.stub().returns(""),i.back=o.spy(),a=new t(i)},afterEach:function(){o.restore()}}),QUnit.test("#add",function(e){var t=this.createFakeOverlay();a.add(/^test$/,function(){return t}),i.emit("route",{path:"test"}),e.strictEqual(t.show.callCount,1,"show registered overlay")}),QUnit.test("#add, with $.Deferred factory",function(e){var t=u.Deferred(),n=this.createFakeOverlay();return t.show=o.spy(),a.add(/^foo$/,function(){return t}),i.emit("route",{path:"foo"}),t.resolve(n),t.then(function(){e.notOk(t.show.called,"don't call show on Deferred"),e.strictEqual(n.show.callCount,1,"show registered overlay")})}),QUnit.test("#add, with current path",function(e){var t=this.createFakeOverlay(),n=u.Deferred();return i.getPath=o.stub().returns("baha"),a.add(/^baha$/,function(){return t}),u.docReady(function(){n.resolve()}),n.then(function(){e.strictEqual(t.show.callCount,1,"show registered overlay")})}),QUnit.test("#replaceCurrent",function(e){var t=this.createFakeOverlay(),n=this.createFakeOverlay();a.add(/^test$/,function(){return t}),i.emit("route",{path:"test"}),a.replaceCurrent(n),e.strictEqual(t.hide.callCount,1,"hide overlay"),e.strictEqual(n.show.callCount,1,"show another overlay"),i.emit("route",{path:""}),e.strictEqual(n.hide.callCount,1,"hide another overlay")}),QUnit.test("route with params",function(e){var t=this.createFakeOverlay(),n=o.stub().returns(t);a.add(/^sam\/(\d+)$/,n),i.emit("route",{path:"sam/123"}),e.ok(n.calledWith("123"),"pass params from the route")}),QUnit.test("hide when route changes",function(e){var t=this.createFakeOverlay(),n=o.stub().returns(t);a.add(/^jon$/,n),i.emit("route",{path:"jon"}),i.emit("route",{path:""}),i.emit("route",{path:"jon"}),i.emit("route",{path:"other"}),e.strictEqual(t.hide.callCount,2,"hide overlay"),e.ok(t.hide.getCall(0).notCalledWith(!0),"don't force hide (first)"),e.ok(t.hide.getCall(1).notCalledWith(!0),"don't force hide (second)")}),QUnit.test("go back (change route) if overlay hidden but not by route change",function(e){var t=this.createFakeOverlay(),n=o.stub().returns(t);a.add(/^joakino$/,n),i.emit("route",{path:"joakino"}),t.hide(),e.strictEqual(i.back.callCount,1,"route back")}),QUnit.test("stacked overlays",function(e){var t=this.createFakeOverlay(),n=o.stub().returns(t),s=this.createFakeOverlay(),r=o.stub().returns(s);a.add(/^parent$/,r),a.add(/^child$/,n),i.emit("route",{path:"parent"}),e.strictEqual(s.show.callCount,1,"show parent"),i.emit("route",{path:"child"}),e.strictEqual(s.hide.callCount,1,"hide parent"),e.ok(s.hide.calledWith(!0),"hide parent forcefully (no confirmation)"),e.strictEqual(t.show.callCount,1,"show child"),i.emit("route",{path:"parent"}),e.strictEqual(t.hide.callCount,1,"hide child"),e.strictEqual(s.show.callCount,2,"show parent again"),e.strictEqual(r.callCount,1,"create parent only once")}),QUnit.test("prevent route change",function(e){var t=this.createFakeOverlay({hide:o.stub().returns(!1)}),n=o.stub().returns(t),s={path:"",preventDefault:o.spy()};a.add(/^rob$/,n),i.emit("route",{path:"rob"}),i.emit("route",s),e.ok(s.preventDefault.calledOnce,"prevent route change")}),QUnit.test("reload failed overlay when navigating to it again from another overlay",function(e){var t,n,s=this.createFakeOverlay(),r=this.createFakeOverlay();s.hasLoadError=!0,(n=o.stub()).onCall(0).returns(s),n.onCall(1).returns(r),t=function(e){return"0"===e?n():r},a.add(/^test\/(\d+)$/,t),i.emit("route",{path:"test/0"}),e.strictEqual(a.stack.length,1,"stack is correct size"),e.ok(a.stack[0].overlay.hasLoadError,"first overlay has load error"),i.emit("route",{path:"test/1"}),e.strictEqual(a.stack.length,2,"stack is correct size"),e.notOk(a.stack[0].overlay.hasLoadError,"second overlay loads successfully"),i.emit("route",{path:"test/0"}),e.strictEqual(a.stack.length,1,"stack decreases when going back to already visited overlay"),e.notOk(a.stack[0].overlay.hasLoadError,"Failed attempt is not cached and new overlay is loaded")}),QUnit.test("replace overlay when route event path is equal to current path",function(e){var t,n=this.createFakeOverlay(),s=this.createFakeOverlay();n.hasLoadError=!0,(t=o.stub()).onCall(0).returns(n),t.onCall(1).returns(s),a.add(/^test\/(\d+)$/,t),i.emit("route",{path:"test/0"}),e.strictEqual(a.stack.length,1,"stack is correct size"),e.ok(a.stack[0].overlay.hasLoadError,"overlay has load error"),i.emit("route",{path:"test/0"}),e.strictEqual(a.stack.length,1,"stack is correct size (did not increase upon reload)"),e.notOk(a.stack[0].overlay.hasLoadError,"overlay retry loads successfully")})}).call(this,n(3))},function(e,t,n){(function(e){var t,i,a,o,s,r,l=n(8),c=n(10),u=n(5),d=n(4),h='<div class="mw-parser-output">';QUnit.module("MobileFrontend Page",{beforeEach:function(){var p=function(e){return'<div class="ambox">'+e+"</div>"},f=function(e){return'<h2 class="section-heading">'+e+"</h2>"},m=function(e,t){var n=t||"h3";return"<"+n+">"+e+"</"+n+">"},g=function(e,t){return'<div class="mf-section-'+e+'">'+t+"</div>"};i=d.sandbox.create(),c.setUp(i,e),e.mw.config.set("wgMFMobileFormatterHeadings",["h1","h2","h3","h4","h5","h6"]),l.setUp(i,e),u.setUp(i,e),t=n(9),a=new t({el:$(h).html("<p>lead</p>"+p("a0"))}),o=new t({el:$(h).html(g(0,p("a0")+'<p>lead</p><div class="toc-mobile view-border-box"><h2></h2><div></div></div>')+f("1")+g(1,p("a1")+m("1.1")+p("a1.1")))}),s=new t({el:$(h).html("<p>lead</p>"+p("a0")+m("1","h2")+p("a1")+m("1.1")+p("a1.1"))}),r=new t({el:$(h).html(g(0,"<p>lead</p>"+p("a0"))+f("1")+g(1,p("a1")+m("1.1")+p("a1.1")+m("1.1.1","h4")+p("a1.1.1")+m("1.1.2","h4")+p("a1.1.2")+m("1.2")+p("a1.1"))+f("2")+g(6,p("a2"))+f("3")+g(7,p("a3"))+f("Section with nested Ambox")+g(8,p("<p>nested-ambox-parent,</p>"+p("nested-ambox-1,")+p("nested-ambox-2")))+f("Sub-section with nested Ambox")+g(9,p("<p>nested-ambox-parent,</p>"+p("nested-ambox-1,")+p("nested-ambox-2"))+m("subsection heading")+m("Another subsection heading")))})},afterEach:function(){i.restore()}}),QUnit.test("#findInSectionLead",function(e){[[0,"a0","lead section"],[1,"a1","h2"],[2,"a1.1","h3"],[3,"","h4","selector does not match",".foo"],[111,"","Non-existent section"]].forEach(function(t,n){var i=t[0],a=t[1],o=t[2],r=t[3]||".ambox";e.strictEqual(s.findChildInSectionLead(i,r).text(),a,"Found correct text in desktop test "+n+" case: "+o)}),[[0,"a0","lead section"],[3,"","h4","selector does not match",".foo"],[111,"","Non-existent section"]].forEach(function(t){e.strictEqual(a.findChildInSectionLead(t[0],t[3]||".ambox").text(),t[1],"Stub: Found correct text in desktop test case:"+t[2])}),[[0,"a0","lead section"],[1,"a1","h2"],[2,"a1.1","h3"],[3,"a1.1.1","h4"],[3,"","h4","selector does not match",".foo"],[7,"a3","h2 later"],[111,"","Non-existent section"]].forEach(function(t){e.strictEqual(r.findChildInSectionLead(t[0],t[3]||".ambox").text(),t[1],"Mobile: Found correct text in test case:"+t[2])}),[[0,"a0","lead section"],[1,"a1","h2"],[2,"a1.1","h3"],[111,"","Non-existent section"]].forEach(function(t){e.strictEqual(o.findChildInSectionLead(t[0],t[3]||".ambox").text(),t[1],"Mobile with table of contents: Found correct text in test case:"+t[2])}),[[8,".ambox","nested-ambox-parent,nested-ambox-1,nested-ambox-2","Nested elements in section"],[9,".ambox","nested-ambox-parent,nested-ambox-1,nested-ambox-2","Nested elements in subsection"]].forEach(function(t){var n=r.findChildInSectionLead(t[0],t[1]);e.strictEqual(n.not(n.children()).text(),t[2],"Mobile: Found correct text in test case:"+t[3])})}),QUnit.test("#isMainPage",function(e){var n=new t({title:"Main Page",isMainPage:!0}),i=new t({title:"Foo"});e.strictEqual(n.isMainPage(),!0,"check main page flag is updated"),e.strictEqual(i.isMainPage(),!1,"check not marked as main page")}),QUnit.test("#getThumbnails",function(e){var n,i,a,o,s,r,l,c,u,d;n=new t({el:$('<div><a href="/wiki/File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" class="image view-border-box"><img alt="Cyanolimnas cerverai by Allan Brooks cropped.jpg" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg/300px-Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" width="300" height="303" data-file-width="454" data-file-height="459"></a></div>')}),i=new t({el:$("<div>")}),a=new t({el:$('<div><a href="/wikpa/index.php?title=File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" class="image view-border-box"><img alt="Cyanolimnas cerverai by Allan Brooks cropped.jpg" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg/300px-Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" width="300" height="303" data-file-width="454" data-file-height="459"></a></div>')}),o=n.getThumbnails(),s=new t({el:$('<div><a href="/wikpa/index.php?title=File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" class="image view-border-box noviewer"><img alt="Cyanolimnas cerverai by Allan Brooks cropped.jpg" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg/300px-Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" width="300" height="303" data-file-width="454" data-file-height="459"></a></div>')}),r=new t({el:$('<div><a href="/wikpa/index.php?title=File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" class="image view-border-box"><img alt="Cyanolimnas cerverai by Allan Brooks cropped.jpg" class="metadata" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg/300px-Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" width="300" height="303" data-file-width="454" data-file-height="459"></a></div>')}),d=new t({el:$('<div class="noviewer"><a href="/wikpa/index.php?title=File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" class="image view-border-box"><img alt="Cyanolimnas cerverai by Allan Brooks cropped.jpg" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg/300px-Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg" width="300" height="303" data-file-width="454" data-file-height="459"></a></div>')}),l=new t({el:$('<div><a href="/wiki/File:Design_portal_logo.jpg" class="image"><noscript><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Design_portal_logo.jpg/28px-Design_portal_logo.jpg" width="28" height="28" class="noviewer" data-file-width="151" data-file-height="151"></noscript><span class="lazy-image-placeholder" style="width: 28px;height: 28px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Design_portal_logo.jpg/28px-Design_portal_logo.jpg" data-alt="icon" data-width="28" data-height="28" data-class="noviewer">&nbsp;</span></a></div>')}),u=new t({el:$('<div><a href="/wiki/File:Design_portal_logo.jpg" class="image"><noscript><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Design_portal_logo.jpg/28px-Design_portal_logo.jpg" width="28" height="28" class="noviewer" data-file-width="151" data-file-height="151"></noscript><span class="lazy-image-placeholder" style="width: 28px;height: 28px;" data-src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Design_portal_logo.jpg/28px-Design_portal_logo.jpg" data-alt="icon" data-width="28" data-height="28" data-class="wot noviewerz bar">&nbsp;</span></a></div>')}),c=new t({el:$('<div><table class="plainlinks metadata ambox ambox-content ambox-Unreferenced" role="presentation"><tr><td class="mbox-image"><div style="width:52px"><a href="/wiki/File:Question_book-new.svg" class="image"><noscript><img alt="" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" width="50" height="39" data-file-width="262" data-file-height="204"></noscript><span class="lazy-image-placeholder" style="width: 50px;height: 39px;" data-src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png" data-alt="" data-width="50" data-height="39" data-srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x"> </span></a></div></td></tr></table>')}),e.strictEqual(o.length,1,"Found expected number of thumbnails."),e.strictEqual(o[0].getFileName(),"File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg","Found expected filename."),o=i.getThumbnails(),e.strictEqual(o.length,0,"This page has no thumbnails."),o=a.getThumbnails(),e.strictEqual(o.length,1,"Found expected number of thumbnails."),e.strictEqual(o[0].getFileName(),"File:Cyanolimnas_cerverai_by_Allan_Brooks_cropped.jpg","Found expected filename."),o=s.getThumbnails(),e.strictEqual(o.length,0,"This page has no thumbnails."),o=r.getThumbnails(),e.strictEqual(o.length,0,"This page has no thumbnails."),o=d.getThumbnails(),e.strictEqual(o.length,0,"Images inside a container with the class are not included. Images inside tables for example."),o=l.getThumbnails(),e.strictEqual(o.length,0,"Consider whether the class is on an image which has not been lazy loaded."),o=c.getThumbnails(),e.strictEqual(o.length,0,"Consider whether the lazy loaded image is inside a .metadata container."),o=u.getThumbnails(),e.strictEqual(o.length,1,"Thumbnail found if there is a typo.")}),QUnit.test("#getNamespaceId",function(e){[["Main Page",0],["San Francisco",0],["San Francisco: Talk:2",0],["San Francisco: The Sequel",0],["Talk:Foo",1],["Project:Bar",4],["User talk:Jon",3],["Special:Nearby",-1]].forEach(function(n){var i=new t({title:n[0]});e.strictEqual(i.getNamespaceId(),n[1],"Check namespace is as expected")})}),QUnit.test("#isTalkPage",function(e){[["Main Page",!1],["San Francisco",!1],["San Francisco: Talk:2",!1],["San Francisco: The Sequel",!1],["Talk:Foo",!0],["Project talk:Bar",!0],["User talk:Jon",!0],["Special:Nearby",!1]].forEach(function(n){var i=new t({title:n[0]});e.strictEqual(i.isTalkPage(),n[1],"Check test is as expected")})}),QUnit.test("#isMissing",function(e){var n,i;n=[new t({title:"Hello",id:0}),new t({title:"Hello",id:5,isMissing:!0}),new t({title:"Hello",isMissing:!0})],i=[new t({title:"Hello",id:4}),new t({title:"Hello",id:4,isMissing:!1}),new t({title:"Hello",isMissing:!1}),new t({title:"Hello",id:0,isMissing:!1})],n.forEach(function(t,n){e.strictEqual(t.isMissing,!0,"page "+n+" is missing")}),i.forEach(function(t,n){e.strictEqual(t.isMissing,!1,"page "+n+" is not missing")})}),QUnit.test("#allowsXSS",function(e){var n=new t({title:'<script>alert("oops, XSS possible!");<\/script>'});e.strictEqual(n.getDisplayTitle(),"&lt;script&gt;alert(&quot;oops, XSS possible!&quot;);&lt;/script&gt;","Check against XSS in Page.js constructor displaytitle (when title set)"),[{thumbnail:!1,title:'<script>alert("oops, XSS possible!");<\/script>',terms:!1,testDesc:"Check against XSS in Page.newFromJSON displaytitle (when title set)"},{thumbnail:!1,pageprops:[],terms:{label:['<script>alert("oops, XSS possible!");<\/script>']},testDesc:"Check against XSS in Page.newFromJSON displaytitle (when Wikibase label set)"}].forEach(function(i){n=t.newFromJSON(i),e.strictEqual(n.getDisplayTitle(),"&lt;script&gt;alert(&quot;oops, XSS possible!&quot;);&lt;/script&gt;",i.testDesc)})})}).call(this,n(3))},function(e,t,n){(function(e){var t,i,a=n(40),o=n(8),s=n(13),r=n(10),l=n(5),c=n(4),u=n(1);QUnit.module("MobileFrontend Skin.js",{beforeEach:function(){var a,d={getReferencesLists:function(){},getReferencesList:function(){}};t=c.sandbox.create(),s.setUp(t,e),o.setUp(t,e),l.setUp(t,e),r.setUp(t,e),i=n(23),a=new(n(9))({title:"Foo"}),t.stub(mw.loader,"using").returns(u.Deferred().resolve()),t.stub(d,"getReferencesLists").returns(u.Deferred().resolve({})),t.stub(d,"getReferencesList").withArgs(a,"Notes_and_references").returns(u.Deferred().resolve(u.parseHTML("<p>").text("P"))).withArgs(a,"Notes").returns(u.Deferred().resolve(u.parseHTML("<p>").text("A"))).withArgs(a,"Refs").returns(u.Deferred().resolve(u.parseHTML("<p>").text("B"))).withArgs(a,"More_refs").returns(u.Deferred().resolve(u.parseHTML("<p>").html("<p>E</p><p>F</p>").children())),this.skin=new i({referencesGateway:d,page:a})},afterEach:function(){t.restore()}}),QUnit.test("#loadImagesList (success)",function(e){var n=t.stub(this.skin,"loadImage").returns(u.Deferred().resolve());return this.skin.loadImagesList([u.parseHTML("<div>"),u.parseHTML("<div>")]).then(function(){e.strictEqual(n.callCount,2,"Stub was called twice and resolves successfully.")})}),QUnit.test("#loadImagesList (one image fails)",function(e){var n=t.stub(this.skin,"loadImage");return n.onCall(0).returns(u.Deferred().resolve()),n.onCall(1).returns(u.Deferred().reject()),this.skin.loadImagesList([u.parseHTML("<div>"),u.parseHTML("<div>")]).catch(function(){e.strictEqual(n.callCount,2,"Stub was called twice and overall result was failure.")})}),QUnit.test("#loadImagesList (empty list)",function(e){return this.skin.loadImagesList([]).then(function(){e.ok(!0,"An empty list always resolves successfully")})}),QUnit.test("#lazyLoadReferences",function(e){var t=a.get("tests/qunit/tests.mobilefrontend/skinPage.html").render(),n=u.parseHTML("<div>").append(t);return this.skin.lazyLoadReferences({wasExpanded:!1,page:this.skin.page,isReferenceSection:!0,$heading:n.find("#Notes_and_references").parent()}).then(function(){e.strictEqual(n.find(".mf-section-2").text().replace(/[\t\n]/g,""),"TextPNotesARefsBno forgetMore refs1E2F3","Check all the references section is populated correctly.")})}),QUnit.test("#getSectionId",function(e){var t=u.parseHTML(["<div>",'<h2><span class="mw-headline" id="heading">H</span></h2>',"<div>",'<h3><span class="mw-headline" id="subheading">Subh</span></h3>','<a class="element"></a>',"</div>","</div>"].join("")),n=u.parseHTML(["<div>",'<h2><span class="mw-headline" id="Notes_and_references">Notes and references</span></h2>',"<div>",'<h3 class="in-block"><span class="mw-headline" id="Notes">Notes</span></h3>','<div class="reflist"><a class="element"></a></div>',"</div>","</div>"].join("")),a=u.parseHTML(['<div id="mw-content-text">','<h2><span class="mw-headline" id="heading">Heading</span></h2>','<div><a class="element"></a></div>',"</div>"].join("")),o=u.parseHTML(['<div id="mw-content-text">','<div><a class="element"></a></div>'].join("")),s=u.parseHTML(['<div id="mw-content-text">','<h2><span class="mw-headline" id="Foo">Foo</span></h2>',"<div>","<p>Foo content.</p>","</div>",'<h2><span class="mw-headline" id="Bar">Bar</span></h2>','<div class="reflist"><a class="element"></a></div>',"</div>","</div>"].join(""));e.strictEqual(i.getSectionId(t.find(".element")),"subheading"),e.strictEqual(i.getSectionId(n.find(".element")),"Notes","https://phabricator.wikimedia.org/T146394"),e.strictEqual(i.getSectionId(a.find(".element")),"heading"),e.strictEqual(i.getSectionId(o.find(".element")),null),e.strictEqual(i.getSectionId(s.find(".element")),"Bar")})}).call(this,n(3))},function(e,t,n){(function(t){var i,a="object"!=typeof window,o=n(17),s=n(41),r=n(42);i={html:function(e){return{render:function(){return e}}},hogan:function(e){return o.compile(e)}},e.exports={get:function(e){var n,o,l,c,u,d;if(!a)return o=(n=e.split("/"))[n.length-2],l=n[n.length-1],mw.template.get(o,l);if(u=s.extname(e).split(".").pop(),!i[u])throw new Error("Template compiler not found for extension '"+u+"'. Please add one to templateReader.js");return c=s.resolve(t,"../../../"),d=r.readFileSync(s.join(c,e),"utf8"),i[u](d)}}}).call(this,"/")},function(e,t){!function(){e.exports=this.path}()},function(e,t){!function(){e.exports=this.fs}()},function(e,t,n){var i=n(11);QUnit.module("MobileFrontend time.js"),QUnit.test("timeAgo()",function(e){e.deepEqual(i.timeAgo(40),{value:40,unit:"seconds"}),e.deepEqual(i.timeAgo(149),{value:2,unit:"minutes"}),e.deepEqual(i.timeAgo(150),{value:3,unit:"minutes"}),e.deepEqual(i.timeAgo(7500),{value:2,unit:"hours"}),e.deepEqual(i.timeAgo(9e4),{value:1,unit:"days"}),e.deepEqual(i.timeAgo(9e6),{value:3,unit:"months"}),e.deepEqual(i.timeAgo(32e6),{value:1,unit:"years"}),e.deepEqual(i.timeAgo(102e6),{value:3,unit:"years"})})},function(e,t,n){(function(e){var t,i,a=n(13),o=n(10),s=n(8),r=n(5),l=n(4);QUnit.module("MobileFrontend util.js",{beforeEach:function(){i=l.sandbox.create(),a.setUp(i,e),o.setUp(i,e),s.setUp(i,e),r.setUp(i,e),t=n(1)},afterEach:function(){s.tearDown(),i.restore()}}),QUnit.test("escapeSelector()",function(e){e.strictEqual(t.escapeSelector("#selector-starts-with-hash"),"\\#selector-starts-with-hash")}),QUnit.test("grep()",function(e){e.deepEqual(t.grep([1,2],function(e){return e>1}),[2])}),QUnit.test("docReady()",function(e){var n=t.docReady();e.strictEqual(n instanceof $,!0)}),QUnit.test("when()",function(e){return t.when({resolved:!0}).then(function(t){e.strictEqual(t.resolved,!0)})}),QUnit.test("Deferred() - resolve",function(e){var n=new t.Deferred;return n.resolve("response"),n.then(function(t){e.strictEqual(t,"response")})}),QUnit.test("Deferred() - reject",function(e){var n=new t.Deferred;return n.reject("response"),n.catch(function(t){e.strictEqual(t,"response")})}),QUnit.test("getDocument()",function(e){e.strictEqual(t.getDocument().length,1)}),QUnit.test("getWindow()",function(e){e.strictEqual(t.getWindow().length,1)}),QUnit.test("parseHTML()",function(e){var n=t.parseHTML("<p>element content</p>",document);e.strictEqual("object"==typeof n,!0),e.strictEqual(n[0].innerHTML,"element content")}),QUnit.test("isNumeric()",function(e){e.strictEqual(t.isNumeric(123),!0),e.strictEqual(t.isNumeric("123"),!0),e.strictEqual(t.isNumeric("The string 123 is true? I don't like it."),!1),e.strictEqual(t.isNumeric(NaN),!1)}),QUnit.test("extend()",function(e){var n={a:"apple"};t.extend(n,{b:"banana"}),e.strictEqual(JSON.stringify(n),'{"a":"apple","b":"banana"}')}),QUnit.test("escapeHash()",function(e){e.strictEqual(t.escapeHash("#escape:...hash"),"#escape\\:\\.\\.\\.hash")}),QUnit.test("isModifiedEvent() - true",function(e){var n=document.createElement("div");n.addEventListener("click",function(n){e.strictEqual(t.isModifiedEvent(n),!0)}),n.dispatchEvent(new window.MouseEvent("click",{ctrlKey:!0}))}),QUnit.test("isModifiedEvent() - false",function(e){var n=document.createElement("div");n.addEventListener("click",function(n){e.strictEqual(t.isModifiedEvent(n),!1)}),n.dispatchEvent(new window.MouseEvent("click"))}),QUnit.test("repeatEvent",function(e){var n=new OO.EventEmitter,i=new OO.EventEmitter;t.repeatEvent(i,n,"test"),n.on("test",function(t){e.strictEqual(t,"test data","proxy responds to source events correctly")}),i.emit("test","test data")})}).call(this,n(3))},function(e,t,n){(function(e){var t,i,a=n(17),o=n(8),s=n(0),r=n(5),l=n(4);QUnit.module("MobileFrontend mobile.startup/View",{beforeEach:function(){i=l.sandbox.create(),o.setUp(i,e),r.setUp(i,e),t=n(2)},afterEach:function(){i.restore()}}),QUnit.test("View",function(e){var n=new t({el:"body"});e.ok(n.$el instanceof $,"assign jQuery object to $el"),e.strictEqual(n.$el[0].tagName.toUpperCase(),"BODY","assign proper jQuery object to $el")}),QUnit.test("View, jQuery proxy functions",function(e){var n=new t({el:"body"});["append","prepend","appendTo","prependTo","after","before","insertAfter","insertBefore","remove","detach"].forEach(function(t){var a=i.stub(n.$el,t);n[t]("test",1),e.ok(a.calledWith("test",1)),a.restore()})}),QUnit.test("View#preRender",function(e){var n;function i(){t.apply(this,arguments)}s(i,t,{template:a.compile("<p>{{text}}</p>"),preRender:function(){this.options.text="hello"}}),n=new i,e.strictEqual(n.$el.html(),"<p>hello</p>","manipulate template data")}),QUnit.test("View#postRender",function(e){var n=i.spy();function a(){t.apply(this,arguments)}s(a,t,{postRender:function(){n()}}),new a,e.strictEqual(n.callCount,1,"invoke postRender")}),QUnit.test("View#delegateEvents",function(e){var n;function i(){t.apply(this,arguments)}s(i,t,{template:a.compile("<p><span>test</span></p>"),events:{"click p span":function(t){t.preventDefault(),e.ok(!0,"Span was clicked and handled")},"click p":"onParagraphClick",click:"onClick"},onParagraphClick:function(t){t.preventDefault(),e.ok(!0,"Paragraph was clicked and handled")},onClick:function(t){t.preventDefault(),e.ok(!0,"View was clicked and handled")}}),(n=new i).appendTo("body"),n.$el.find("span").trigger("click"),n.$el.find("p").trigger("click"),n.$el.trigger("click"),n.undelegateEvents(),n.$el.find("span").trigger("click"),n.$el.find("p").trigger("click"),n.$el.trigger("click")}),QUnit.test("View#render (with isTemplateMode)",function(e){var n,i;function o(){t.apply(this,arguments)}function r(){t.apply(this,arguments)}s(o,t,{template:a.compile('<p class="foo"><span>test</span></p>'),isTemplateMode:!0}),s(r,t,{className:"bar",template:a.compile('<p class="foo"><span>test</span></p>')}),n=new o,i=new r,n.render(),i.render(),e.ok(n.$el.hasClass("foo")),e.ok(i.$el.hasClass("bar"))}),QUnit.test("View#render events (with isTemplateMode)",function(e){var n;function i(){t.apply(this,arguments)}s(i,t,{events:{"click span":"onClick"},onClick:function(){this.$el.empty().text("hello world")},template:a.compile('<p class="foo"><span>test</span></p>'),isTemplateMode:!0}),(n=new i).$("span").trigger("click"),e.strictEqual(n.$el.text(),"hello world","event was called"),e.strictEqual(n.$("span").length,0,"span disappeared"),(n=new i).render(),n.$("span").trigger("click"),e.strictEqual(n.$el.text(),"hello world","event was called"),e.strictEqual(n.$("span").length,0,"span disappeared")})}).call(this,n(3))}],[[29,0]]]);
//# sourceMappingURL=tests.mobilefrontend.js.map.json

Zerion Mini Shell 1.0