typeof JSON!="undefined"&&(window._vwdJSON=JSON);typeof define!="undefined"&&(window._vwdDefine=define,define=null);typeof onbeforeunload!="undefined"&&(window._vwdonbeforeunload=window.onbeforeunload); ; /* NUGET: BEGIN LICENSE TEXT * * Microsoft grants you the right to use these script files for the sole * purpose of either: (i) interacting through your browser with the Microsoft * website or online service, subject to the applicable licensing or use * terms; or (ii) using the files as included with a Microsoft product subject * to that product's license terms. Microsoft reserves all other rights to the * files not expressly granted by Microsoft, whether by implication, estoppel * or otherwise. Insofar as a script file is dual licensed under GPL, * Microsoft neither took the code under GPL nor distributes it thereunder but * under the terms set out in this paragraph. All notices and licenses * below are for informational purposes only. * * JQUERY CORE 1.8.2; Copyright 2012 jQuery Foundation and other contributors; http://jquery.org/license * Includes Sizzle CSS Selector Engine; Copyright 2012 jQuery Foundation and other contributors; http://opensource.org/licenses/MIT * * NUGET: END LICENSE TEXT */ /*! jQuery v1.8.2 jquery.com | jquery.org/license */ (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
t
",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;be.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="
",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="

",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); ; /* NUGET: BEGIN LICENSE TEXT * * Microsoft grants you the right to use these script files for the sole * purpose of either: (i) interacting through your browser with the Microsoft * website or online service, subject to the applicable licensing or use * terms; or (ii) using the files as included with a Microsoft product subject * to that product's license terms. Microsoft reserves all other rights to the * files not expressly granted by Microsoft, whether by implication, estoppel * or otherwise. Insofar as a script file is dual licensed under GPL, * Microsoft neither took the code under GPL nor distributes it thereunder but * under the terms set out in this paragraph. All notices and licenses * below are for informational purposes only. * * ASP.NET SignalR JavaScript Library v2.0.2; Copyright (C) Microsoft Corporation; https://github.com/SignalR/SignalR/blob/master/LICENSE.md * * NUGET: END LICENSE TEXT */ /*! * ASP.NET SignalR JavaScript Library v2.0.2 * http://signalr.net/ * * Copyright (C) Microsoft Corporation. All rights reserved. * */ (function(n,t,i){"use strict";function p(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function w(n){return n==="http:"?80:n==="https:"?443:void 0}function l(n,t){return t.match(/:\d+$/)?t:t+":"+w(n)}function b(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server. Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting."};if(typeof n!="function")throw new Error(f.nojQuery);var r,h,s=t.document.readyState==="complete",e=n(t),c="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},a=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},o=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},v=function(n){return n.state===r.connectionState.disconnected},y=function(n){var i,u;n._.configuredStopReconnectingTimeout||(u=function(n){n.log("Couldn't reconnect within the configured timeout ("+n.disconnectTimeout+"ms), disconnecting.");n.stop(!1,!1)},n.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(i=t.setTimeout(function(){u(n)},n.disconnectTimeout))}),n.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(i)}),n._.configuredStopReconnectingTimeout=!0)};r=function(n,t,i){return new r.fn.init(n,t,i)};r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<\/script>.");}};e.load(function(){s=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this._={keepAliveData:{},connectingMessageBuffer:new b(this,function(n){f.triggerHandler(u.onReceived,[n])}),onFailedTimeoutHandle:null,lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null};typeof r=="boolean"&&(this.logging=r)},_parseResponse:function(n){var t=this;return n?typeof n=="string"?t.json.parse(n):n:n},json:t.JSON,isCrossDomain:function(i,r){var u;return(i=n.trim(i),r=r||t.location,i.indexOf("http")!==0)?!1:(u=t.document.createElement("a"),u.href=i,u.protocol+l(u.protocol,u.host)!==r.protocol+l(r.protocol,r.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:r.connectionState.disconnected,clientProtocol:"1.3",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,h){var l=this,a={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},k,v=l._deferral||n.Deferred(),w=t.document.createElement("a"),b,d;if(l._deferral=v,!l.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if(n.type(i)==="function"?h=i:n.type(i)==="object"&&(n.extend(a,i),n.type(a.callback)==="function"&&(h=a.callback)),a.transport=p(a.transport,l),!a.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");return(l._.config=a,!s&&a.waitForPageLoad===!0)?(l._.deferredStartHandler=function(){l.start(i,h)},e.bind("load",l._.deferredStartHandler),v.promise()):l.state===r.connectionState.connecting?v.promise():o(l,r.connectionState.disconnected,r.connectionState.connecting)===!1?(v.resolve(l),v.promise()):(y(l),w.href=l.url,w.protocol&&w.protocol!==":"?(l.protocol=w.protocol,l.host=w.host,l.baseUrl=w.protocol+"//"+w.host):(l.protocol=t.document.location.protocol,l.host=t.document.location.host,l.baseUrl=l.protocol+"//"+l.host),l.wsProtocol=l.protocol==="https:"?"wss://":"ws://",a.transport==="auto"&&a.jsonp===!0&&(a.transport="longPolling"),l.url.indexOf("//")===0&&(l.url=t.location.protocol+l.url,l.log("Protocol relative URL detected, normalizing it to '"+l.url+"'.")),this.isCrossDomain(l.url)&&(l.log("Auto detected cross domain url."),a.transport==="auto"&&(a.transport=["webSockets","longPolling"]),typeof a.withCredentials=="undefined"&&(a.withCredentials=!0),a.jsonp||(a.jsonp=!n.support.cors,a.jsonp&&l.log("Using jsonp because this browser doesn't support CORS.")),l.contentType=r._.defaultContentType),l.withCredentials=a.withCredentials,l.ajaxDataType=a.jsonp?"jsonp":"text",n(l).bind(u.onStart,function(){n.type(h)==="function"&&h.call(l);v.resolve(l)}),k=function(i,s){var y=r._.error(f.noTransportOnInit);if(s=s||0,s>=i.length){n(l).triggerHandler(u.onError,[y]);v.reject(y);l.stop();return}if(l.state!==r.connectionState.disconnected){var p=i[s],h=r.transports[p],c=!1,a=function(){c||(c=!0,t.clearTimeout(l._.onFailedTimeoutHandle),h.stop(l),k(i,s+1))};l.transport=h;try{l._.onFailedTimeoutHandle=t.setTimeout(function(){l.log(h.name+" timed out when trying to connect.");a()},l.transportConnectTimeout);h.start(l,function(){var i=r._.firefoxMajorVersion(t.navigator.userAgent)>=11,f=!!l.withCredentials&&i;l.state!==r.connectionState.disconnected&&(c||(c=!0,t.clearTimeout(l._.onFailedTimeoutHandle),h.supportsKeepAlive&&l._.keepAliveData.activated&&r.transports._logic.monitorKeepAlive(l),r.transports._logic.startHeartbeat(l),r._.configurePingInterval(l),o(l,r.connectionState.connecting,r.connectionState.connected),l._.connectingMessageBuffer.drain(),n(l).triggerHandler(u.onStart),e.bind("unload",function(){l.log("Window unloading, stopping the connection.");l.stop(f)}),i&&e.bind("beforeunload",function(){t.setTimeout(function(){l.stop(f)},0)})))},a)}catch(w){l.log(h.name+" transport threw '"+w.message+"' when attempting to start.");a()}}},b=l.url+"/negotiate",d=function(t,i){var e=r._.error(f.errorOnNegotiate,t,i._.negotiateRequest);n(i).triggerHandler(u.onError,e);v.reject(e);i.stop()},n(l).triggerHandler(u.onStarting),b=r.transports._logic.prepareQueryString(l,b),b=r.transports._logic.addQs(b,{clientProtocol:l.clientProtocol}),l.log("Negotiating with '"+b+"'."),l._.negotiateRequest=n.ajax(n.extend({},n.signalR.ajaxDefaults,{xhrFields:{withCredentials:l.withCredentials},url:b,type:"GET",contentType:l.contentType,data:{},dataType:l.ajaxDataType,error:function(n,t){t!==c?d(n,l):v.reject(r._.error(f.stoppedWhileNegotiating,null,l._.negotiateRequest))},success:function(t){var i,e,h,o=[],s=[];try{i=l._parseResponse(t)}catch(c){d(r._.error(f.errorParsingNegotiateResponse,c),l);return}if(e=l._.keepAliveData,l.appRelativeUrl=i.Url,l.id=i.ConnectionId,l.token=i.ConnectionToken,l.webSocketServerUrl=i.WebSocketServerUrl,l.disconnectTimeout=i.DisconnectTimeout*1e3,l.transportConnectTimeout=l.transportConnectTimeout+i.TransportConnectTimeout*1e3,i.KeepAliveTimeout?(e.activated=!0,e.timeout=i.KeepAliveTimeout*1e3,e.timeoutWarning=e.timeout*l.keepAliveWarnAt,l._.beatInterval=(e.timeout-e.timeoutWarning)/3):e.activated=!1,l.reconnectWindow=l.disconnectTimeout+(e.timeout||0),!i.ProtocolVersion||i.ProtocolVersion!==l.clientProtocol){h=r._.error(r._.format(f.protocolIncompatible,l.clientProtocol,i.ProtocolVersion));n(l).triggerHandler(u.onError,[h]);v.reject(h);return}n.each(r.transports,function(n){if(n.indexOf("_")===0||n==="webSockets"&&!i.TryWebSockets)return!0;s.push(n)});n.isArray(a.transport)?n.each(a.transport,function(t,i){n.inArray(i,s)>=0&&o.push(i)}):a.transport==="auto"?o=s:n.inArray(a.transport,s)>=0&&o.push(a.transport);k(o)}})),v.promise())},starting:function(t){var i=this;return n(i).bind(u.onStarting,function(){t.call(i)}),i},send:function(n){var t=this;if(t.state===r.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===r.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,n),t},received:function(t){var i=this;return n(i).bind(u.onReceived,function(n,r){t.call(i,r)}),i},stateChanged:function(t){var i=this;return n(i).bind(u.onStateChanged,function(n,r){t.call(i,r)}),i},error:function(t){var i=this;return n(i).bind(u.onError,function(n,r,u){t.call(i,r,u)}),i},disconnected:function(t){var i=this;return n(i).bind(u.onDisconnect,function(){t.call(i)}),i},connectionSlow:function(t){var i=this;return n(i).bind(u.onConnectionSlow,function(){t.call(i)}),i},reconnecting:function(t){var i=this;return n(i).bind(u.onReconnecting,function(){t.call(i)}),i},reconnected:function(t){var i=this;return n(i).bind(u.onReconnect,function(){t.call(i)}),i},stop:function(i,h){var l=this,a=l._deferral;if(l._.deferredStartHandler&&e.unbind("load",l._.deferredStartHandler),delete l._deferral,delete l._.config,delete l._.deferredStartHandler,!s&&(!l._.config||l._.config.waitForPageLoad===!0)){l.log("Stopping connection prior to negotiate.");a&&a.reject(r._.error(f.stoppedWhileLoading));return}if(l.state!==r.connectionState.disconnected)return l.log("Stopping connection."),o(l,l.state,r.connectionState.disconnected),t.clearTimeout(l._.beatHandle),t.clearTimeout(l._.onFailedTimeoutHandle),t.clearInterval(l._.pingIntervalId),l.transport&&(l.transport.stop(l),h!==!1&&l.transport.abort(l,i),l.transport.supportsKeepAlive&&l._.keepAliveData.activated&&r.transports._logic.stopMonitoringKeepAlive(l),l.transport=null),l._.negotiateRequest&&(l._.negotiateRequest.abort(c),delete l._.negotiateRequest),n(l).triggerHandler(u.onDisconnect),delete l.messageId,delete l.groupsToken,delete l.id,delete l._.pingIntervalId,delete l._.lastMessageAt,delete l._.lastActiveAt,l._.connectingMessageBuffer.clear(),l},log:function(n){a(n,this.logging)}};r.fn.init.prototype=r.fn;r.noConflict=function(){return n.connection===r&&(n.connection=h),r};n.connection&&(h=n.connection);n.connection=n.signalR=r})(window.jQuery,window),function(n,t){"use strict";function f(n){n._.keepAliveData.monitoring&&o(n);r.markActive(n)&&(n._.beatHandle=t.setTimeout(function(){f(n)},n._.beatInterval))}function o(t){var r=t._.keepAliveData,f;t.state===i.connectionState.connected&&(f=(new Date).getTime()-t._.lastMessageAt,f>=r.timeout?(t.log("Keep alive timed out. Notifying transport that connection has been lost."),t.transport.lostConnection(t)):f>=r.timeoutWarning?r.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),n(t).triggerHandler(u.onConnectionSlow),r.userNotified=!0):r.userNotified=!1)}function s(n){return n.state===i.connectionState.connected||n.state===i.connectionState.reconnecting}function h(n,i){var r=n.indexOf("?")!==-1?"&":"?";return i&&(n+=r+"connectionData="+t.encodeURIComponent(i)),n}var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,r;i.transports={};r=i.transports._logic={pingServer:function(t){var e,u=n.Deferred(),f;return t.transport?(e=t.url+"/ping",e=r.addQs(e,t.qs),f=n.ajax(n.extend({},n.signalR.ajaxDefaults,{xhrFields:{withCredentials:t.withCredentials},url:e,type:"GET",contentType:t.contentType,data:{},dataType:t.ajaxDataType,success:function(n){var r;try{r=t._parseResponse(n)}catch(e){u.reject(i._.transportError(i.resources.pingServerFailedParse,t.transport,e,f));t.stop();return}r.Response==="pong"?u.resolve():u.reject(i._.transportError(i._.format(i.resources.pingServerFailedInvalidResponse,n.responseText),t.transport,null,f))},error:function(n){n.status===401||n.status===403?(u.reject(i._.transportError(i._.format(i.resources.pingServerFailedStatusCode,n.status),t.transport,n,f)),t.stop()):u.reject(i._.transportError(i.resources.pingServerFailed,t.transport,n,f))}}))):u.reject(i._.transportError(i.resources.noConnectionTransport,t.transport)),u.promise()},prepareQueryString:function(n,t){return t=r.addQs(t,n.qs),h(t,n.data)},addQs:function(t,i){var r=t.indexOf("?")!==-1?"&":"?",u;if(!i)return t;if(typeof i=="object")return t+r+n.param(i);if(typeof i=="string")return u=i.charAt(0),(u==="?"||u==="&")&&(r=""),t+r+i;throw new Error("Query string property must be either a string or object.");},getUrl:function(n,i,u,f){var s=i==="webSockets"?"":n.baseUrl,e=s+n.appRelativeUrl,o="transport="+i+"&connectionToken="+t.encodeURIComponent(n.token);return n.groupsToken&&(o+="&groupsToken="+t.encodeURIComponent(n.groupsToken)),u?(e+=f?"/poll":"/reconnect",n.messageId&&(o+="&messageId="+t.encodeURIComponent(n.messageId))):e+="/connect",e+="?"+o,e=r.prepareQueryString(n,e),e+("&tid="+Math.floor(Math.random()*11))},maximizePersistentResponse:function(n){return{MessageId:n.C,Messages:n.M,Initialized:typeof n.S!="undefined"?!0:!1,Disconnect:typeof n.D!="undefined"?!0:!1,ShouldReconnect:typeof n.T!="undefined"?!0:!1,LongPollDelay:n.L,GroupsToken:n.G}},updateGroups:function(n,t){t&&(n.groupsToken=t)},stringifySend:function(n,t){return typeof t=="string"||typeof t=="undefined"||t===null?t:n.json.stringify(t)},ajaxSend:function(f,e){var c=r.stringifySend(f,e),o=f.url+"/send?transport="+f.transport.name+"&connectionToken="+t.encodeURIComponent(f.token),s,h=function(t,r){n(r).triggerHandler(u.onError,[i._.transportError(i.resources.sendFailed,r.transport,t,s),e])};return o=r.prepareQueryString(f,o),s=n.ajax(n.extend({},n.signalR.ajaxDefaults,{xhrFields:{withCredentials:f.withCredentials},url:o,type:f.ajaxDataType==="jsonp"?"GET":"POST",contentType:i._.defaultContentType,dataType:f.ajaxDataType,data:{data:c},success:function(n){var t;if(n){try{t=f._parseResponse(n)}catch(i){h(i,f);f.stop();return}r.triggerReceived(f,t)}},error:function(n,t){t!=="abort"&&t!=="parsererror"&&h(n,f)}}))},ajaxAbort:function(i,u){if(typeof i.transport!="undefined"){u=typeof u=="undefined"?!0:u;var f=i.url+"/abort?transport="+i.transport.name+"&connectionToken="+t.encodeURIComponent(i.token);f=r.prepareQueryString(i,f);n.ajax(n.extend({},n.signalR.ajaxDefaults,{xhrFields:{withCredentials:i.withCredentials},url:f,async:u,timeout:1e3,type:"POST",contentType:i.contentType,dataType:i.ajaxDataType,data:{}}));i.log("Fired ajax abort async = "+u+".")}},tryInitialize:function(n,t){n.Initialized&&t()},triggerReceived:function(t,i){t._.connectingMessageBuffer.tryBuffer(i)||n(t).triggerHandler(u.onReceived,[i])},processMessages:function(t,i,u){var f;if(r.markLastMessage(t),i){if(f=r.maximizePersistentResponse(i),f.Disconnect){t.log("Disconnect command received from server.");t.stop(!1,!1);return}r.updateGroups(t,f.GroupsToken);f.MessageId&&(t.messageId=f.MessageId);f.Messages&&(n.each(f.Messages,function(n,i){r.triggerReceived(t,i)}),r.tryInitialize(f,u))}},monitorKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,r.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){r.markLastMessage(t)},n(t).bind(u.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+" and a connection lost timeout of "+i.timeout+"."))},stopMonitoringKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring&&(i.monitoring=!1,n(t).unbind(u.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(n){f(n)},markLastMessage:function(n){n._.lastMessageAt=(new Date).getTime()},markActive:function(n){return r.verifyLastActive(n)?(n._.lastActiveAt=(new Date).getTime(),!0):!1},ensureReconnectingState:function(t){return e(t,i.connectionState.connected,i.connectionState.reconnecting)===!0&&n(t).triggerHandler(u.onReconnecting),t.state===i.connectionState.reconnecting},clearReconnectTimeout:function(n){n&&n._.reconnectTimeout&&(t.clearTimeout(n._.reconnectTimeout),delete n._.reconnectTimeout)},verifyLastActive:function(n){return(new Date).getTime()-n._.lastActiveAt>=n.reconnectWindow?(n.log("There has not been an active server connection for an extended period of time. Stopping connection."),n.stop(),!1):!0},reconnect:function(n,u){var f=i.transports[u];if(s(n)&&!n._.reconnectTimeout){if(!r.verifyLastActive(n))return;n._.reconnectTimeout=t.setTimeout(function(){r.verifyLastActive(n)&&(f.stop(n),r.ensureReconnectingState(n)&&(n.log(u+" reconnecting."),f.start(n)))},n.reconnectDelay)}},handleParseFailure:function(t,r,f,e,o){t.state===i.connectionState.connecting?(t.log("Failed to parse server response while attempting to connect."),e()):(n(t).triggerHandler(u.onError,[i._.transportError(i._.format(i.resources.parseFailed,r),t.transport,f,o)]),t.stop())},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(n,t){"use strict";var r=n.signalR,u=n.signalR.events,f=n.signalR.changeState,i=r.transports._logic;r.transports.webSockets={name:"webSockets",supportsKeepAlive:!0,send:function(t,f){var e=i.stringifySend(t,f);try{t.socket.send(e)}catch(o){n(t).triggerHandler(u.onError,[r._.transportError(r.resources.webSocketsInvalidState,t.transport,o,t.socket),f])}},start:function(e,o,s){var h,c=!1,l=this,a=!o,v=n(e);if(!t.WebSocket){s();return}e.socket||(h=e.webSocketServerUrl?e.webSocketServerUrl:e.wsProtocol+e.host,h+=i.getUrl(e,this.name,a),e.log("Connecting to websocket endpoint '"+h+"'."),e.socket=new t.WebSocket(h),e.socket.onopen=function(){c=!0;e.log("Websocket opened.");i.clearReconnectTimeout(e);f(e,r.connectionState.reconnecting,r.connectionState.connected)===!0&&v.triggerHandler(u.onReconnect)},e.socket.onclose=function(t){if(this===e.socket){if(c)typeof t.wasClean!="undefined"&&t.wasClean===!1?(n(e).triggerHandler(u.onError,[r._.transportError(r.resources.webSocketClosed,e.transport,t)]),e.log("Unclean disconnect from websocket: "+t.reason||"[no reason given].")):e.log("Websocket closed.");else{s?s():a&&l.reconnect(e);return}l.reconnect(e)}},e.socket.onmessage=function(t){var r;try{r=e._parseResponse(t.data)}catch(u){i.handleParseFailure(e,t.data,u,s,t);return}r&&(n.isEmptyObject(r)||r.M?i.processMessages(e,r,o):i.triggerReceived(e,r))})},reconnect:function(n){i.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},stop:function(n){i.clearReconnectTimeout(n);n.socket&&(n.log("Closing the Websocket."),n.socket.close(),n.socket=null)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){"use strict";var i=n.signalR,u=n.signalR.events,f=n.signalR.changeState,r=i.transports._logic;i.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:!0,timeOut:3e3,start:function(e,o,s){var h=this,c=!1,l=n(e),a=!o,v,y;if(e.eventSource&&(e.log("The connection already has an event source. Stopping it."),e.stop()),!t.EventSource){s&&(e.log("This browser doesn't support SSE."),s());return}v=r.getUrl(e,this.name,a);try{e.log("Attempting to connect to SSE endpoint '"+v+"'.");e.eventSource=new t.EventSource(v)}catch(p){e.log("EventSource failed trying to connect with error "+p.Message+".");s?s():(l.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceFailedToConnect,e.transport,p)]),a&&h.reconnect(e));return}a&&(y=t.setTimeout(function(){c===!1&&e.eventSource.readyState!==t.EventSource.OPEN&&h.reconnect(e)},h.timeOut));e.eventSource.addEventListener("open",function(){e.log("EventSource connected.");y&&t.clearTimeout(y);r.clearReconnectTimeout(e);c===!1&&(c=!0,f(e,i.connectionState.reconnecting,i.connectionState.connected)===!0&&l.triggerHandler(u.onReconnect))},!1);e.eventSource.addEventListener("message",function(n){var t;if(n.data!=="initialized"){try{t=e._parseResponse(n.data)}catch(i){r.handleParseFailure(e,n.data,i,s,n);return}r.processMessages(e,t,o)}},!1);e.eventSource.addEventListener("error",function(n){if(this===e.eventSource){if(!c){s&&s();return}e.log("EventSource readyState: "+e.eventSource.readyState+".");n.eventPhase===t.EventSource.CLOSED?(e.log("EventSource reconnecting due to the server connection ending."),h.reconnect(e)):(e.log("EventSource error."),l.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceError,e.transport,n)]))}},!1)},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){r.clearReconnectTimeout(n);n&&n.eventSource&&(n.log("EventSource calling close()."),n.eventSource.close(),n.eventSource=null,delete n.eventSource)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){"use strict";var r=n.signalR,e=n.signalR.events,o=n.signalR.changeState,i=r.transports._logic,u=function(){var n=t.document.createElement("iframe");return n.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),n},f=function(){var i=null,f=1e3,n=0;return{prevent:function(){r._.ieVersion<=8&&(n===0&&(i=t.setInterval(function(){var n=u();t.document.body.appendChild(n);t.document.body.removeChild(n);n=null},f)),n++)},cancel:function(){n===1&&t.clearInterval(i);n>0&&n--}}}();r.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:!0,iframeClearThreshold:50,start:function(n,r,e){var l=this,s=i.foreverFrame.count+=1,h,o=u(),c=function(){n.log("Forever frame iframe finished loading and is no longer receiving messages, reconnecting.");l.reconnect(n)};if(t.EventSource){e&&(n.log("This browser supports SSE, skipping Forever Frame."),e());return}o.setAttribute("data-signalr-connection-id",n.id);f.prevent();h=i.getUrl(n,this.name);h+="&frameId="+s;t.document.body.appendChild(o);n.log("Binding to iframe's load event.");o.addEventListener?o.addEventListener("load",c,!1):o.attachEvent&&o.attachEvent("onload",c);o.src=h;i.foreverFrame.connections[s]=n;n.frame=o;n.frameId=s;r&&(n.onSuccess=function(){n.log("Iframe transport started.");r()})},reconnect:function(n){var r=this;i.verifyLastActive(n)&&t.setTimeout(function(){if(i.verifyLastActive(n)&&n.frame&&i.ensureReconnectingState(n)){var u=n.frame,t=i.getUrl(n,r.name,!0)+"&frameId="+n.frameId;n.log("Updating iframe src to '"+t+"'.");u.src=t}},n.reconnectDelay)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){i.ajaxSend(n,t)},receive:function(t,u){var f,e;if(i.processMessages(t,u,t.onSuccess),t.state===n.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>r.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,f=t.frame.contentWindow||t.frame.contentDocument,f&&f.document&&f.document.body)))for(e=f.document.body;e.firstChild;)e.removeChild(e.firstChild)},stop:function(n){var r=null;if(f.cancel(),n.frame){if(n.frame.stop)n.frame.stop();else try{r=n.frame.contentWindow||n.frame.contentDocument;r.document&&r.document.execCommand&&r.document.execCommand("Stop")}catch(u){n.log("Error occured when stopping foreverFrame transport. Message = "+u.message+".")}n.frame.parentNode===t.document.body&&t.document.body.removeChild(n.frame);delete i.foreverFrame.connections[n.frameId];n.frame=null;n.frameId=null;delete n.frame;delete n.frameId;delete n.onSuccess;delete n.frameMessageCount;n.log("Stopping forever frame.")}},abort:function(n,t){i.ajaxAbort(n,t)},getConnection:function(n){return i.foreverFrame.connections[n]},started:function(t){o(t,r.connectionState.reconnecting,r.connectionState.connected)===!0&&n(t).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(n,t){"use strict";var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,f=n.signalR.isDisconnecting,r=i.transports._logic;i.transports.longPolling={name:"longPolling",supportsKeepAlive:!1,reconnectDelay:3e3,start:function(o,s,h){var a=this,v=function(){v=n.noop;o.log("LongPolling connected.");s();h=null},y=function(){return h?(h(),h=null,o.log("LongPolling failed to connect."),!0):!1},c=o._,l=0,p=function(r){t.clearTimeout(c.reconnectTimeoutId);c.reconnectTimeoutId=null;e(r,i.connectionState.reconnecting,i.connectionState.connected)===!0&&(r.log("Raising the reconnect event"),n(r).triggerHandler(u.onReconnect))},w=36e5;o.pollXhr&&(o.log("Polling xhr requests already exists, aborting."),o.stop());o.messageId=null;c.reconnectTimeoutId=null;c.pollTimeoutId=t.setTimeout(function(){(function e(s,h){var d=s.messageId,g=d===null,b=!g,nt=!h,k=r.getUrl(s,a.name,b,nt);f(s)!==!0&&(o.log("Opening long polling request to '"+k+"'."),s.pollXhr=n.ajax(n.extend({},n.signalR.ajaxDefaults,{xhrFields:{withCredentials:o.withCredentials},url:k,type:"GET",dataType:o.ajaxDataType,contentType:o.contentType,success:function(i){var h,w=0,u,a;o.log("Long poll complete.");l=0;try{h=o._parseResponse(i)}catch(b){r.handleParseFailure(s,i,b,y,s.pollXhr);return}(c.reconnectTimeoutId!==null&&p(s),h&&(u=r.maximizePersistentResponse(h)),r.processMessages(s,h,v),u&&n.type(u.LongPollDelay)==="number"&&(w=u.LongPollDelay),u&&u.Disconnect)||f(s)!==!0&&(a=u&&u.ShouldReconnect,!a||r.ensureReconnectingState(s))&&(w>0?c.pollTimeoutId=t.setTimeout(function(){e(s,a)},w):e(s,a))},error:function(f,h){if(t.clearTimeout(c.reconnectTimeoutId),c.reconnectTimeoutId=null,h==="abort"){o.log("Aborted xhr request.");return}if(!y()){if(l++,o.state!==i.connectionState.reconnecting&&(o.log("An error occurred using longPolling. Status = "+h+". Response = "+f.responseText+"."),n(s).triggerHandler(u.onError,[i._.transportError(i.resources.longPollFailed,o.transport,f,s.pollXhr)])),(o.state===i.connectionState.connected||o.state===i.connectionState.reconnecting)&&!r.verifyLastActive(o))return;if(!r.ensureReconnectingState(s))return;c.pollTimeoutId=t.setTimeout(function(){e(s,!0)},a.reconnectDelay)}}})),b&&h===!0&&(c.reconnectTimeoutId=t.setTimeout(function(){p(s)},Math.min(1e3*(Math.pow(2,l)-1),w))))})(o)},250)},lostConnection:function(){throw new Error("Lost Connection not handled for LongPolling");},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){t.clearTimeout(n._.pollTimeoutId);t.clearTimeout(n._.reconnectTimeoutId);delete n._.pollTimeoutId;delete n._.reconnectTimeoutId;n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n){"use strict";function r(n){return n+e}function s(n,t,i){for(var f=n.length,u=[],r=0;r=0&&(t&&typeof t.then=="function"&&typeof t.catch=="function"?t.then(function(t){f(n,t)}).catch(function(t){s(n,t)}):t&&t.continueWith?t.continueWith(function(t){f(n,t)}):i.invoke("sys.callback",!1,[n,t]))},s=function(n,t){i.invoke("sys.callbackException",!1,[n,t])},e,o,i;typeof Promise=="function"?(o=function(n){n.continueWith=function(t){var i=n.then(t);return o(i),i}},e=function(){var n={id:i.generateId()};return n.promise=new Promise(function(t,i){n.setResult=t;n.setException=i}),o(n.promise),n}):e=function(){var n={id:i.generateId(),callback:null,promise:{continueWith:function(t){if(typeof t=="function")if(n.callback){var i=n.callback;n.callback=function(n){return t(i(n))}}else n.callback=t;return n.promise}},setResult:function(n){this.callback!==null&&this.callback(n)},setException:function(){}};return n};i={extensions:[],inits:[],callbackTable:[],nextId:0,connection:null,isReconnecting:!1,isUnloading:!1,extractName:function(n){var t=n.lastIndexOf("."),i=null,r=null;return t>0&&(i=n.substr(0,t).toLowerCase(),r=n.substr(t+1)),{factoryName:i,methodName:r}},log:function(){typeof console!="undefined"&&(window.console.debug?window.console.debug.apply(null,arguments):window.console.log&&window.console.log.apply(null,arguments))},invoke:function(n,i,r){var u={},h,f,c,o,l,s,a;u.name=n;u.args=r;u.callbackId=-1;i&&(f=e(),c=f.promise,this.callbackTable[f.id]=f,u.callbackId=f.id);h=t.stringify(u);try{for(o=this.breakIntoSegments(h),l=o.length>1?this.generateId():0,s=0;s0;)i=t>u?u:t,f.push(n.substring(r,r+i)),r+=i,t-=i;return f},dispatchCallback:function(n,t,i){var r=this.extractName(n),e,u,o,c;if(r.factoryName&&r.methodName){if(r.factoryName==="sys"){if(r.methodName==="callback"){e=t[0];u=t[1];try{this.callbackTable[e].setResult(u)}catch(h){this.log("Failed to invoke return value callback:\n"+h.toString())}this.removeTask(e)}if(r.methodName==="callbackException"){e=t[0];u=t[1];try{this.callbackTable[e].setException(new Error(u).toString())}catch(h){this.log("Failed to invoke exception handler callback:\n"+h.toString())}this.removeTask(e)}return}if(o=this.extensions[r.factoryName],!o||!o[r.methodName]){this.log("Failed to match method call "+n);return}for(c=t.length;c<15;c++)t[c]=null;try{u=o[r.methodName](t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14])}catch(h){u=undefined;this.log("Exception thrown in callback method "+r.methodName+": %o",h);s(i,h.toString())}typeof u!="undefined"&&f(i,u)}},addExtensions:function(){try {{ var extension = (function(n){"use strict";return{log:function(t){n.log(t)}}});; this.addExtension("Microsoft.WebTools.BrowserLink.CoreExtensionFactory", extension); }} catch(e) {{ this.log("Invalid extension script encountered for extension 'Microsoft.WebTools.BrowserLink.CoreExtensionFactory'."); return; }} try {{ var extension = (function(n,t){"use strict";var f=[],i=[],h=function(n){for(var i,t=0;t=i.originalStart&&t<=i.originalStart+i.originalLength},o=function(n,t){return e(n,function(n){return n.type!=1?!1:y(n,t)})},it=function(n,t,i){return e(n,function(n){var u=r(n);return u&&typeof u.originalStart!="undefined"&&u.originalStart==t&&u.originalLength==i})},p=function(n){var t=s(n);return{index:t.length,source:n,collection:t}},w=function(n,t){var r=n.index-1,i;return r>=0&&(i=n.collection[r],i.type==4&&y(i,t))?(n=p(i),w(n,t)):n},rt=function(n,t){var i=e(n,function(n){var i=r(n);return i&&typeof i.originalStart!="undefined"&&t=0;r--)if(f=t.children[r],u=n(f,i),u)return u;return t.getDomNode()===i?{logicalNode:t}:t.getDomNode()?{foundOtherDomNode:!0}:null},u=function(t,r){for(var o,f,e=t.parent,s=e.children.indexOf(t),u=s-1;u>=0;u--)if(o=e.children[u],f=n(o,r),i,f)return f;return null},t=function(n,i){var r=u(n,i);return r?r:n.parent?n.parent.getDomNode()===i?{logicalNode:n.parent}:n.parent.getDomNode()?{foundOtherDomNode:!0}:t(n.parent,i):null},r=function(n){return o.innerHTML=n,o.innerHTML},f=function(n){for(var f,t=n.__browserLink_LogicalNodes.slice(),u="",i=0;i1&&u==n.textContent?!0:!1},e=function(n){for(var f,e,t=n.__browserLink_LogicalNodes.slice(),i=n,u=0;u0&&(t=n.indexOf(this),t>=0&&n.splice(t,1))};this.setupRelatedDomNode=function(){var n,i;this.domNode.__browserLink_LogicalNodes?(n=t(this,this.domNode),n&&n.logicalNode?(i=this.domNode.__browserLink_LogicalNodes.indexOf(n.logicalNode),this.domNode.__browserLink_LogicalNodes.splice(i+1,0,this)):this.domNode.__browserLink_LogicalNodes.splice(0,0,this),this.domNode.nodeType===Node.TEXT_NODE&&f(this.domNode)&&e(this.domNode)):this.domNode.__browserLink_LogicalNodes=[this]};this.setDomNode=function(n){this.domNode!==n&&(this.domNode&&this.disconnectRelatedDomNode(),this.domNode=n,this.domNode&&this.setupRelatedDomNode())}}function ht(){var f,e;this.root={};var u="\0",s=1,h={},k=this;this.createNewLogicalNode=function(n,t,i,r){var u=new d,f,e;return n&&(u.type=n),t&&u.setDomNode(t),i&&(u.parent=i,n===st.Attribute?i.attributes.push(u):(f=r?i.children.indexOf(r):-1,f>=0?(e=f+1,i.children.splice(e,0,u)):i.children.splice(0,0,u))),u};var c=function(n){var r=t.extend(new d,n),i,u,f;if(n.children)for(i=0;i0&&(r=h[i],n.setDomNode(r)),n.children)for(t=0;t=i?e>=o?(u=i,f=0,s=0):e>u?(u=i,f=o-e,s=e>=h?0:h-e):u+=r:h>i?(e>h?s=i-u:s+=r,e>o?f=i-u:f+=r):o>i&&(e>o?f=i-u:f+=r);n.start.position=u;n.length=f;n.startTagLength&&(n.startTagLength=s);w(n,t,i,r)}};this.buildDocumentBlockList=function(){var t=[];y(document,t);n.invoke("UpdateBlockListFromDOM",n.initializationData.requestId,t)};this.initialize=function(t){o==null&&(o=document.createElement("textarea"));this.root=c(t.root);v(this.root);g();a=!0;n.sourceMapping.ensureUpToDateAsync(null)};this.applyChangesInFile=function(n,t){while(t.length>=2){var i=t.shift(),r=t.shift();b(this.root,n,i,r)}};this.getLogicalNodesFromDomNode=function(n){return n&&n.__browserLink_LogicalNodes?n.__browserLink_LogicalNodes:[]};this.getFirstLogicalNodeFromDomNode=function(n){var t=this.getLogicalNodesFromDomNode(n);return t&&t.length>0?t[0]:null};this.getAllNodesStartingAtPosition=function(n,t){var i=[];return f(n,t,this.root,i),i};f=function(n,t,i,r){var e,u,o;if(i){if(i.start&&t===i.start.position&&n===i.start.path&&r.push(i),i.children)for(u=0;u=i.start.position&&t=f.length)&&(r=f);if(i.attributes)for(u=0;u=f.length)&&(r=f);return r}}function ct(){var o=this,l=function(n){return w(n)},v=function(n,t,r){if(n0)return i.Task;for(u=c,c=[],t=0;t0?t.Task:f.length==0?t.Task:(ot(function(){var t=f,n;for(f=[],n=0;n=t-u.start)return i.cssRules[r];break}return null};this.getAllSourcePaths=function(){return i};this.internal={addMappingRangeForObject:function(n,t){var r=e(t.sourcePath||t.sourceUrl),i={sourceIndex:r,start:t.startPosition,length:t.length};b(n,i);u.push(i)}};t=5e3;s=[];this.validateStyleSheet=function(i){var u=s.indexOf(i.href)>=0,r;return u?!1:(r=function(n){var u=0,f,e;try{if(n&&n.cssRules&&(u+=i.cssRules.length,u>t))return u;for(f=0;ft))break;return u}catch(o){return t+1}},r(i)>t)?(s.push(i.href),n.log(`CSS Hot Reload ignoring ${i.href} because it was inaccessible or had more than ${t} rules.`),!1):!0}}var i=[],s={},h=!1,a=!1,r=0,f=[],c=[],u=[],v={},y=function(){var n=[];this.complete=function(){for(var t=null;n.length;)t=n.shift()(t)};this.Task={continueWith:function(t){n.push(t)}}},rt=function(n){return n.selectorText||n.media},p=function(n){var r=rt(n),t,i,u;if(!r)return{value:null};for(t=v[r],t||(t=[],v[r]=t),i=0;i=t?f>=o?(r=t,u=0,e=0):f>r?(u=o-f,r=t,e=f>=s?0:s-f):r+=i:s>t?(f>s?e=t-r:e+=i,f>o?u=t-r:u+=i):o>t&&(f>o?u=t-r:u+=i);n.start=r;n.length=u;n.startTag&&(n.startTag=e)},et=function(n,t){for(var f,e,i,r;t.length>=2;)for(f=t.shift(),e=t.shift(),i=0;i=2?s[1]:{},i={selectorData:r,sourceIndex:f[0]+t,start:f[1],length:f[2],isLiteral:f[3],startTag:f.length>=5?f[4]:null,children:g(l.children,t),ancestors:g(l.ancestors,t)},l.templateLike&&o.length==2&&(r.isTemplateLike=!0,r.isInTemplateLike=!0),e=0;e0))for(i=document.styleSheets,t=0;t=0?(et(r,t),!0):!1},applyChangesInFileToLogicalTree:function(t,i){n.logicalTree.applyChangesInFile(t,i)},onConnected:function(){Array.prototype.indexOf&&(n.logicalTree.buildDocumentBlockList(),n.sourceMapping.ensureUpToDateAsync(null))},setLogicalTree:function(t,r){i=i.concat(r);n.logicalTree.initialize(t)}}});; this.addExtension("Microsoft.WebTools.BrowserLink.SourceMappingExtensionFactory", extension); }} catch(e) {{ this.log("Invalid extension script encountered for extension 'Microsoft.WebTools.BrowserLink.SourceMappingExtensionFactory'."); return; }} try {{ var extension = (function(){"use strict";return{refresh:function(){location.reload(!0)},navigate:function(n){location.href=n}}});; this.addExtension("Microsoft.WebTools.BrowserLink.Package.RefreshExtensionFactory", extension); }} catch(e) {{ this.log("Invalid extension script encountered for extension 'Microsoft.WebTools.BrowserLink.Package.RefreshExtensionFactory'."); return; }} try {{ var extension = /*! For license information please see tools_bundle.js.LICENSE.txt */ (function(){var e={514:function(e,t,i){"use strict";i.d(t,{default:function(){return eb}});var o={};i.r(o);var n=i(993);function r(e){return new s(e)}class s{constructor(e){if(this.node=e,!e)throw Error("node must not be null or undefined.")}get isUnsupported(){return this.node.properties&&this.node.properties[s.isUnsupportedPropertyName]}set isUnsupported(e){this.verifyPropertyBagExists(),this.node.properties[s.isUnsupportedPropertyName]=e}get mapsToDom(){var e;return!1!==(null===(e=this.node.properties)||void 0===e?void 0:e[s.mapsToDomPropertyName])}set mapsToDom(e){this.verifyPropertyBagExists(),this.node.properties[s.mapsToDomPropertyName]=e}get codeBlockType(){var e;return this.convertToCodeBlockType(null===(e=this.node.properties)||void 0===e?void 0:e[s.codeBlockTypePropertyName])}set codeBlockType(e){this.verifyPropertyBagExists();const t=this.convertStringToCodeBlockType(e);this.node.properties[s.codeBlockTypePropertyName]=t}convertToCodeBlockType(e){return 1===e?"SelfContained":2===e?"Conditional":3===e?"Loop":4===e?"Block":"None"}convertStringToCodeBlockType(e){return"SelfContained"===e?1:"Conditional"===e?2:"Loop"===e?3:"Block"===e?4:0}verifyPropertyBagExists(){this.node.properties||(this.node.properties={})}}function a(e){return void 0!==e.getBoundingClientRect}function l(e){let t=1/0,i=1/0,o=-1/0,n=-1/0;for(const r of e)r&&r.left!==1/0&&r.top!==1/0&&r.right!==-1/0&&r.bottom!==-1/0&&0!==r.height&&0!==r.width&&(t=r.lefto?r.right:o,n=r.bottom>n?r.bottom:n);return function(e,t,i,o){return e!==1/0&&t!==1/0&&i!==-1/0&&o!==-1/0}(t,i,o,n)?DOMRect.fromRect({x:t,y:i,width:o-t,height:n-i}):null}function c(...e){const t=e.map((e=>{if(!e)return null;if(e.nodeType==Node.TEXT_NODE){const t=e;if(t.parentNode){const e=document.createRange();e.selectNode(t);return l(e.getClientRects())}return null}if(e.nodeType==Node.ELEMENT_NODE){return e.getBoundingClientRect()}}));return l(t)}s.isUnsupportedPropertyName="IsUnsupportedProperty",s.mapsToDomPropertyName="MapsToDomProperty",s.codeBlockTypePropertyName="CodeBlockTypeProperty";class d{constructor(){this.isMouseCloserToBoundingClientRectLeftThanRight=(e,t)=>e<(2*t.left+t.width)/2}getBoundingClientRect(e){if(a(e))return e.getBoundingClientRect();const t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect()}hasNonZeroArea(e){const t=this.getBoundingClientRect(e);return t&&t.width>0&&t.height>0}getBoundingRectForLogicalNode(e){const t=e.getDomNode();if(t)return this.getBoundingClientRect(t);return c(...this.getClosestAncestorDomNodes(e))}areCoordinatesInsideLogicalNode(e,t,i){const o=this.getBoundingRectForLogicalNode(i);return this.areCoordinatesInsideBoundingClientRect(e,t,o)}areCoordinatesInsideBoundingClientRect(e,t,i){const o=e>=i.left&&e<=i.right,n=t>=i.top&&t<=i.bottom;return o&&n}getClosestAncestorDomNodes(e){const t=[];if(!e)return t;const i=e.getDomNode();return i?(t.push(i),t):e.children?e.children.map((e=>this.getClosestAncestorDomNodes(e))).flat():t}}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function u(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function p(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};g(this,e),this.init(t,i)}return v(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||k,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i1?t-1:0),o=1;o-1?e.replace(/###/g,"."):e}function n(){return!e||"string"==typeof e}for(var r="string"!=typeof t?[].concat(t):t.split(".");r.length>1;){if(n())return{};var s=o(r.shift());!e[s]&&i&&(e[s]=new i),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return n()?{}:{obj:e,k:o(r.shift())}}function O(e,t,i){var o=T(e,t,Object);o.obj[o.k]=i}function R(e,t){var i=T(e,t),o=i.obj,n=i.k;if(o)return o[n]}function _(e,t,i){var o=R(e,i);return void 0!==o?o:R(t,i)}function D(e,t,i){for(var o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?"string"==typeof e[o]||e[o]instanceof String||"string"==typeof t[o]||t[o]instanceof String?i&&(e[o]=t[o]):D(e[o],t[o],i):e[o]=t[o]);return e}function I(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var P={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function A(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return P[e]})):e}var B="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,F=function(e){function t(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return g(this,t),i=m(this,y(t).call(this)),B&&N.call(b(i)),i.data=e||{},i.options=o,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i}return x(t,e),v(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,r=[e,t];return i&&"string"!=typeof i&&(r=r.concat(i)),i&&"string"==typeof i&&(r=r.concat(n?i.split(n):i)),e.indexOf(".")>-1&&(r=e.split(".")),R(this.data,r)}},{key:"addResource",value:function(e,t,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=this.options.keySeparator;void 0===r&&(r=".");var s=[e,t];i&&(s=s.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=t,t=(s=e.split("."))[1]),this.addNamespaces(t),O(this.data,s,o),n.silent||this.emit("added",e,t,i,o)}},{key:"addResources",value:function(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var n in i)"string"!=typeof i[n]&&"[object Array]"!==Object.prototype.toString.apply(i[n])||this.addResource(e,t,n,i[n],{silent:!0});o.silent||this.emit("added",e,t,i)}},{key:"addResourceBundle",value:function(e,t,i,o,n){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(o=i,i=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=R(this.data,s)||{};o?D(a,i,n):a=p({},a,i),O(this.data,s,a),r.silent||this.emit("added",e,t,i)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?p({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(N),M={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,i,o,n){var r=this;return e.forEach((function(e){r.processors[e]&&(t=r.processors[e].process(t,i,o,n))})),t}},V={},j=function(e){function t(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return g(this,t),i=m(this,y(t).call(this)),B&&N.call(b(i)),L(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,b(i)),i.options=o,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=C.create("translator"),i}return x(t,e),v(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},i=this.resolve(e,t);return i&&void 0!==i.res}},{key:"extractFromKey",value:function(e,t){var i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");var o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,n=t.ns||this.options.defaultNS;if(i&&e.indexOf(i)>-1){var r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:n};var s=e.split(i);(i!==o||i===o&&this.options.ns.indexOf(s[0])>-1)&&(n=s.shift()),e=s.join(o)}return"string"==typeof n&&(n=[n]),{key:e,namespaces:n}}},{key:"translate",value:function(e,i,o){var n=this;if("object"!==h(i)&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],i),a=s.key,l=s.namespaces,c=l[l.length-1],d=i.lng||this.language,u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(u){var g=i.nsSeparator||this.options.nsSeparator;return c+g+a}return a}var f=this.resolve(e,i),v=f&&f.res,b=f&&f.usedKey||a,m=f&&f.exactUsedKey||a,y=Object.prototype.toString.apply(v),w=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(k&&v&&S&&w.indexOf(y)<0&&("string"!=typeof x||"[object Array]"!==y)){if(!i.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,v,i):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(r){var C="[object Array]"===y,N=C?[]:{},E=C?m:b;for(var $ in v)if(Object.prototype.hasOwnProperty.call(v,$)){var L="".concat(E).concat(r).concat($);N[$]=this.translate(L,p({},i,{joinArrays:!1,ns:l})),N[$]===L&&(N[$]=v[$])}v=N}}else if(k&&"string"==typeof x&&"[object Array]"===y)(v=v.join(x))&&(v=this.extendTranslation(v,e,i,o));else{var T=!1,O=!1,R=void 0!==i.count&&"string"!=typeof i.count,_=t.hasDefaultValue(i),D=R?this.pluralResolver.getSuffix(d,i.count):"",I=i["defaultValue".concat(D)]||i.defaultValue;!this.isValidLookup(v)&&_&&(T=!0,v=I),this.isValidLookup(v)||(O=!0,v=a);var P=_&&I!==v&&this.options.updateMissing;if(O||T||P){if(this.logger.log(P?"updateKey":"missingKey",d,c,a,P?I:v),r){var A=this.resolve(a,p({},i,{keySeparator:!1}));A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var M=0;M1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;i=c;var d=l.namespaces;s.options.fallbackNS&&(d=d.concat(s.options.fallbackNS));var h=void 0!==a.count&&"string"!=typeof a.count,u=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,p=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);d.forEach((function(e){s.isValidLookup(t)||(r=e,!V["".concat(p[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(r)&&(V["".concat(p[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(i,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(i){if(!s.isValidLookup(t)){n=i;var r,l,d=c,p=[d];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(p,c,i,e,a);else h&&(r=s.pluralResolver.getSuffix(i,a.count)),h&&u&&p.push(d+r),u&&p.push(d+="".concat(s.options.contextSeparator).concat(a.context)),h&&p.push(d+=r);for(;l=p.pop();)s.isValidLookup(t)||(o=l,t=s.getResource(i,e,l,a))}})))}))}})),{res:t,usedKey:i,exactUsedKey:o,usedLng:n,usedNS:r}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,o):this.resourceStore.getResource(e,t,i,o)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}]),t}(N);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var U=function(){function e(t){g(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=C.create("languageUtils")}return v(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],i=e.split("-");return this.options.lowerCaseLng?i=i.map((function(e){return e.toLowerCase()})):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=z(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=z(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=z(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,i=this;return e?(e.forEach((function(e){if(!t){var o=i.formatLanguageCode(e);i.options.supportedLngs&&!i.isSupportedCode(o)||(t=o)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var o=i.getLanguagePartFromCode(e);if(i.isSupportedCode(o))return t=o;t=i.options.supportedLngs.find((function(e){if(0===e.indexOf(o))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e["default"]||[];var i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e["default"]),i||[]}},{key:"toResolveHierarchy",value:function(e,t){var i=this,o=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],r=function(e){e&&(i.isSupportedCode(e)?n.push(e):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),o.forEach((function(e){n.indexOf(e)<0&&r(i.formatLanguageCode(e))})),n}}]),e}(),H=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],W={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function q(){var e={};return H.forEach((function(t){t.lngs.forEach((function(i){e[i]={numbers:t.nr,plurals:W[t.fc]}}))})),e}var K=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(this,e),this.languageUtils=t,this.options=i,this.logger=C.create("pluralResolver"),this.rules=q()}return v(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,i=this.getRule(e);return i?i.numbers.map((function(i){return t.getSuffix(e,i)})):[]}},{key:"getSuffix",value:function(e,t){var i=this,o=this.getRule(e);if(o){var n=o.noAbs?o.plurals(t):o.plurals(Math.abs(t)),r=o.numbers[n];this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var s=function(){return i.options.prepend&&r.toString()?i.options.prepend+r.toString():r.toString()};return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_".concat(r.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),G=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};g(this,e),this.logger=C.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return v(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:A,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?I(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?I(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?I(t.nestingPrefix):t.nestingPrefixEscaped||I("$t("),this.nestingSuffix=t.nestingSuffix?I(t.nestingSuffix):t.nestingSuffixEscaped||I(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(e,t,i,o){var n,r,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var d=function(e){if(e.indexOf(a.formatSeparator)<0){var n=_(t,l,e);return a.alwaysFormat?a.format(n,void 0,i):n}var r=e.split(a.formatSeparator),s=r.shift().trim(),c=r.join(a.formatSeparator).trim();return a.format(_(t,l,s),c,i,o)};this.resetRegExp();var h=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,u=o&&o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;n=t.regex.exec(e);){if(void 0===(r=d(n[1].trim())))if("function"==typeof h){var i=h(e,n,o);r="string"==typeof i?i:""}else{if(u){r=n[0];continue}a.logger.warn("missed to pass in variable ".concat(n[1]," for interpolating ").concat(e)),r=""}else"string"==typeof r||a.useRawValueToEscape||(r=$(r));if(e=e.replace(n[0],t.safeValue(r)),t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var i,o,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=p({},r);function a(e,t){var i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;var o=e.split(new RegExp("".concat(i,"[ ]*{"))),n="{".concat(o[1]);e=o[0],n=(n=this.interpolate(n,s)).replace(/'/g,'"');try{s=JSON.parse(n),t&&(s=p({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(i).concat(n)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;i=this.nestingRegexp.exec(e);){var l=[],c=!1;if(i[0].includes(this.formatSeparator)&&!/{.*}/.test(i[1])){var d=i[1].split(this.formatSeparator).map((function(e){return e.trim()}));i[1]=d.shift(),l=d,c=!0}if((o=t(a.call(this,i[1].trim(),s),s))&&i[0]===e&&"string"!=typeof o)return o;"string"!=typeof o&&(o=$(o)),o||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(e)),o=""),c&&(o=l.reduce((function(e,t){return n.format(e,t,r.lng,r)}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}}]),e}();var X=function(e){function t(e,i,o){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return g(this,t),n=m(this,y(t).call(this)),B&&N.call(b(n)),n.backend=e,n.store=i,n.services=o,n.languageUtils=o.languageUtils,n.options=r,n.logger=C.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(o,r.backend,r),n}return x(t,e),v(t,[{key:"queueLoad",value:function(e,t,i,o){var n=this,r=[],s=[],a=[],l=[];return e.forEach((function(e){var o=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!i.reload&&n.store.hasResourceBundle(e,t)?n.state[a]=2:n.state[a]<0||(1===n.state[a]?s.indexOf(a)<0&&s.push(a):(n.state[a]=1,o=!1,s.indexOf(a)<0&&s.push(a),r.indexOf(a)<0&&r.push(a),l.indexOf(t)<0&&l.push(t)))})),o||a.push(e)})),(r.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:o}),{toLoad:r,pending:s,toLoadLanguages:a,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,i){var o=e.split("|"),n=o[0],r=o[1];t&&this.emit("failedLoading",n,r,t),i&&this.store.addResourceBundle(n,r,i),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(i){!function(e,t,i,o){var n=T(e,t,Object),r=n.obj,s=n.k;r[s]=r[s]||[],o&&(r[s]=r[s].concat(i)),o||r[s].push(i)}(i.loaded,[n],r),function(e,t){for(var i=e.indexOf(t);-1!==i;)e.splice(i,1),i=e.indexOf(t)}(i.pending,e),t&&i.errors.push(t),0!==i.pending.length||i.done||(Object.keys(i.loaded).forEach((function(e){s[e]||(s[e]=[]),i.loaded[e].length&&i.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,i){var o=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[i](e,t,(function(a,l){a&&l&&n<5?setTimeout((function(){o.read.call(o,e,t,i,n+1,2*r,s)}),r):s(a,l)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var r=this.queueLoad(e,t,o,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach((function(e){i.loadOne(e)}))}},{key:"load",value:function(e,t,i){this.prepareLoading(e,t,{},i)}},{key:"reload",value:function(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}},{key:"loadOne",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=e.split("|"),n=o[0],r=o[1];this.read(n,r,"read",void 0,void 0,(function(o,s){o&&t.logger.warn("".concat(i,"loading namespace ").concat(r," for language ").concat(n," failed"),o),!o&&s&&t.logger.log("".concat(i,"loaded namespace ").concat(r," for language ").concat(n),s),t.loaded(e,o,s)}))}},{key:"saveMissing",value:function(e,t,i,o,n){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=i&&""!==i&&(this.backend&&this.backend.create&&this.backend.create(e,t,i,o,null,p({},r,{isUpdate:n})),e&&e[0]&&this.store.addResource(e[0],t,i,o))}}]),t}(N);function Y(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===h(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===h(e[2])||"object"===h(e[3])){var i=e[3]||e[2];Object.keys(i).forEach((function(e){t[e]=i[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,i,o){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Z(){}var J=function(e){function t(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(g(this,t),e=m(this,y(t).call(this)),B&&N.call(b(e)),e.options=Q(i),e.services={},e.logger=C,e.modules={external:[]},o&&!e.isInitialized&&!i.isClone){if(!e.options.initImmediate)return e.init(i,o),m(e,b(e));setTimeout((function(){e.init(i,o)}),0)}return e}return x(t,e),v(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(i=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=p({},Y(),this.options,Q(t)),this.format=this.options.interpolation.format,i||(i=Z),!this.options.isClone){this.modules.logger?C.init(o(this.modules.logger),this.options):C.init(null,this.options);var n=new U(this.options);this.store=new F(this.options.resources,this.options);var r=this.services;r.logger=C,r.resourceStore=this.store,r.languageUtils=n,r.pluralResolver=new K(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r.interpolator=new G(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new X(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(t){for(var i=arguments.length,o=new Array(i>1?i-1:0),n=1;n1?i-1:0),n=1;n0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var a=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var i;return(i=e.store)[t].apply(i,arguments)}}));var l=["addResource","addResources","addResourceBundle","removeResourceBundle"];l.forEach((function(t){e[t]=function(){var i;return(i=e.store)[t].apply(i,arguments),e}}));var c=E(),d=function(){var t=function(t,o){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(o),i(t,o)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z,o=i,n="string"==typeof e?e:this.language;if("function"==typeof e&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return o();var r=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(n)s(n);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(r,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(e,t,i){var o=E();return e||(e=this.languages),t||(t=this.options.ns),i||(i=Z),this.services.backendConnector.reload(e,t,(function(e){o.resolve(),i(e)})),o}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&M.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var i=this;this.isLanguageChangingTo=e;var o=E();this.emit("languageChanging",e);var n=function(e){var n="string"==typeof e?e:i.services.languageUtils.getBestMatchFromCodes(e);n&&(i.language||(i.language=n,i.languages=i.services.languageUtils.toResolveHierarchy(n)),i.translator.language||i.translator.changeLanguage(n),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(n)),i.loadResources(n,(function(e){!function(e,n){n?(i.language=n,i.languages=i.services.languageUtils.toResolveHierarchy(n),i.translator.changeLanguage(n),i.isLanguageChangingTo=void 0,i.emit("languageChanged",n),i.logger.log("languageChanged",n)):i.isLanguageChangingTo=void 0,o.resolve((function(){return i.t.apply(i,arguments)})),t&&t(e,(function(){return i.t.apply(i,arguments)}))}(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(n):n(e):n(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(e,t){var i=this,o=function e(t,o){var n;if("object"!==h(o)){for(var r=arguments.length,s=new Array(r>2?r-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],n=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;var s=function(e,i){var o=t.services.backendConnector.state["".concat(e,"|").concat(i)];return-1===o||2===o};if(i.precheck){var a=i.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(o,e)||(!this.services.backendConnector.backend||!(!s(o,e)||n&&!s(r,e)))}},{key:"loadNamespaces",value:function(e,t){var i=this,o=E();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){i.options.ns.indexOf(e)<0&&i.options.ns.push(e)})),this.loadResources((function(e){o.resolve(),t&&t(e)})),o):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var i=E();"string"==typeof e&&(e=[e]);var o=this.options.preload||[],n=e.filter((function(e){return o.indexOf(e)<0}));return n.length?(this.options.preload=o.concat(n),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new t(e,i)}},{key:"cloneInstance",value:function(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z,n=p({},this.options,i,{isClone:!0}),r=new t(n),s=["store","services","language"];return s.forEach((function(t){r[t]=e[t]})),r.services=p({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r.translator=new j(r.services,r.options),r.translator.on("*",(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o0){var r=o.maxAge-0;if(isNaN(r))throw new Error("maxAge should be a Number");n+="; Max-Age="+Math.floor(r)}if(o.domain){if(!re.test(o.domain))throw new TypeError("option domain is invalid");n+="; Domain="+o.domain}if(o.path){if(!re.test(o.path))throw new TypeError("option path is invalid");n+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw new TypeError("option expires is invalid");n+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(n+="; HttpOnly"),o.secure&&(n+="; Secure"),o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:n+="; SameSite=Strict";break;case"lax":n+="; SameSite=Lax";break;case"strict":n+="; SameSite=Strict";break;case"none":n+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n},ae=function(e,t,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(n.expires=new Date,n.expires.setTime(n.expires.getTime()+60*i*1e3)),o&&(n.domain=o),document.cookie=se(e,encodeURIComponent(t),n)},le=function(e){for(var t=e+"=",i=document.cookie.split(";"),o=0;o-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=i.substring(1).split("&"),n=0;n0)o[n].substring(0,r)===e.lookupQuerystring&&(t=o[n].substring(r+1))}}return t}},he=null,ue=function(){if(null!==he)return he;try{he="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){he=!1}return he},pe={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&ue()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&ue()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},ge=null,fe=function(){if(null!==ge)return ge;try{ge="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){ge=!1}return ge},ve={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&fe()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&fe()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},be={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var i=0;i0?t:void 0}},me={name:"htmlTag",lookup:function(e){var t,i=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return i&&"function"==typeof i.getAttribute&&(t=i.getAttribute("lang")),t}},ye={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof i[e.lookupFromPathIndex])return;t=i[e.lookupFromPathIndex].replace("/","")}else t=i[0].replace("/","")}return t}},we={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var i=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);i instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?i[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):i[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var xe=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(this,e),this.type="languageDetector",this.detectors={},this.init(t,i)}return v(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=ne(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(ce),this.addDetector(de),this.addDetector(pe),this.addDetector(ve),this.addDetector(be),this.addDetector(me),this.addDetector(ye),this.addDetector(we)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var i=[];return e.forEach((function(e){if(t.detectors[e]){var o=t.detectors[e].lookup(t.options);o&&"string"==typeof o&&(o=[o]),o&&(i=i.concat(o))}})),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var i=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){i.detectors[t]&&i.detectors[t].cacheUserLanguage(e,i.options)})))}}]),e}();xe.type="languageDetector";var ke=JSON.parse('{"translation":{"buttons":{"cancel":"Cancel","confirm":"Confirm"},"blockedUrlToast":{"externalResourcesBlocked":"External Resources Blocked","totalBlockedUrlStatusFormat":"{{blockedResourceCount}} resource(s) were blocked from {{blockedDomainCount}} external domain(s):","blockedResourcesFromUrlFormat":"{{blockedResourceCount}} from {{- baseUrl}}","allowDomains":"To allow these domain(s) - ","_allowDomains.comment":"after the \'-\' is a \'click here\' link. The link always needs to be on the right of the string, so the string should be phrased such that it makes sense in all languages","manageAllowedDomains":"To manage these settings, go to Tools > Options > ","_manageAllowedDomains.comment":"To the right of this string will always be a link worded \'Web Live Preview - external domains\'. The string should be phrased such that it makes sense in all langs","clickHere":"click here","webLivePreviewExternalDomains":"Web Live Preview - external domains","domainsAddedToAllowList":"The following domain(s) were added to the allow list:","learnMore":"Learn more about why external resources were blocked"},"closeDialog":{"choice_pageSession":"On the next page load","choice_permanent":"Never","choice_visualStudioSession":"The next time I open Visual Studio","details":"When would you like to see Web Live Preview again?","header":"Confirm close?"},"menu":{"close":"Close","disableInspector":"Disable Inspector","enableInspector":"Enable Inspector","showEmptyElements":"Show Empty Elements","ariaLabel":"Web Live Preview"},"quickTextEditing":{"duplicateElementOperation":"Duplicate Element","createNewParagraphOperation":"Create New Paragraph","addTableRowOperation":"Add Table Row"},"status":{"connectingToVisualStudio":"Connecting to Visual Studio...","generatingLogicalTree":"Generating Logical Tree...","updating":"Updating...","upToDate":"Up To Date","disconnectedShortMessage":"Disconnected","disconnectedFullMessage":"The browser has been disconnected from Visual Studio. Please refresh the browser to reconnect.","connectionTimeOut":"Connection timed out."},"simpleTextEditing":{"editableText_ariaLabel":"Text Editing Mode. Press ESC to escape."},"nodes":{"code":"Code","root":"Root"},"tagNavigator":{"leftScroller_ariaLabel":"Left Scroller","rightScroller_ariaLabel":"Right Scroller"},"selectorDecorator":{"elementOutline_ariaLabel":"Selected Element","actionPanel_ariaLabel":"Action Panel Indicator"},"menuButton":{"image_ariaLabel":"Web Live Preview Menu"},"logicalNodeShortNames":{"genericContainer":"Generic Container","root":"Root","unknown":"Unknown"},"actionPanel":{"title":"{{nodeName}} Tasks","_title.comment":"nodeName is the ID or tag name of the node for which the action panel is being displayed.","readOnlyProperty":"This property is read-only"},"screenReader":{"inspectorEnabled":"Inspector enabled.","inspectorDisabled":"Inspector disabled."}}}');var Se=function(){this.__data__=[],this.size=0};var Ce=function(e,t){return e===t||e!=e&&t!=t};var Ne=function(e,t){for(var i=e.length;i--;)if(Ce(e[i][0],t))return i;return-1},Ee=Array.prototype.splice;var $e=function(e){var t=this.__data__,i=Ne(t,e);return!(i<0)&&(i==t.length-1?t.pop():Ee.call(t,i,1),--this.size,!0)};var Le=function(e){var t=this.__data__,i=Ne(t,e);return i<0?void 0:t[i][1]};var Te=function(e){return Ne(this.__data__,e)>-1};var Oe=function(e,t){var i=this.__data__,o=Ne(i,e);return o<0?(++this.size,i.push([e,t])):i[o][1]=t,this};function Re(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=fi},bi={};bi["[object Float32Array]"]=bi["[object Float64Array]"]=bi["[object Int8Array]"]=bi["[object Int16Array]"]=bi["[object Int32Array]"]=bi["[object Uint8Array]"]=bi["[object Uint8ClampedArray]"]=bi["[object Uint16Array]"]=bi["[object Uint32Array]"]=!0,bi["[object Arguments]"]=bi["[object Array]"]=bi["[object ArrayBuffer]"]=bi["[object Boolean]"]=bi["[object DataView]"]=bi["[object Date]"]=bi["[object Error]"]=bi["[object Function]"]=bi["[object Map]"]=bi["[object Number]"]=bi["[object Object]"]=bi["[object RegExp]"]=bi["[object Set]"]=bi["[object String]"]=bi["[object WeakMap]"]=!1;var mi=function(e){return Zt(e)&&vi(e.length)&&!!bi[Qe(e)]};var yi=function(e){return function(t){return e(t)}},wi="object"==typeof exports&&exports&&!exports.nodeType&&exports,xi=wi&&"object"==typeof module&&module&&!module.nodeType&&module,ki=xi&&xi.exports===wi&&Be.process,Si=function(){try{var e=xi&&xi.require&&xi.require("util").types;return e||ki&&ki.binding&&ki.binding("util")}catch(e){}}(),Ci=Si&&Si.isTypedArray,Ni=Ci?yi(Ci):mi,Ei=Object.prototype.hasOwnProperty;var $i=function(e,t){var i=si(e),o=!i&&ri(e),n=!i&&!o&&hi(e),r=!i&&!o&&!n&&Ni(e),s=i||o||n||r,a=s?Qt(e.length,String):[],l=a.length;for(var c in e)!t&&!Ei.call(e,c)||s&&("length"==c||n&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gi(c,l))||a.push(c);return a},Li=Object.prototype;var Ti=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Li)};var Oi=function(e,t){return function(i){return e(t(i))}},Ri=Oi(Object.keys,Object),_i=Object.prototype.hasOwnProperty;var Di=function(e){if(!Ti(e))return Ri(e);var t=[];for(var i in Object(e))_i.call(e,i)&&"constructor"!=i&&t.push(i);return t};var Ii=function(e){return null!=e&&vi(e.length)&&!nt(e)};var Pi=function(e){return Ii(e)?$i(e):Di(e)};var Ai=function(e,t){return e&&Yt(t,Pi(t),e)};var Bi=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t},Fi=Object.prototype.hasOwnProperty;var Mi=function(e){if(!Ze(e))return Bi(e);var t=Ti(e),i=[];for(var o in e)("constructor"!=o||!t&&Fi.call(e,o))&&i.push(o);return i};var Vi=function(e){return Ii(e)?$i(e,!0):Mi(e)};var ji=function(e,t){return e&&Yt(t,Vi(t),e)},zi="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ui=zi&&"object"==typeof module&&module&&!module.nodeType&&module,Hi=Ui&&Ui.exports===zi?Me.Buffer:void 0,Wi=Hi?Hi.allocUnsafe:void 0;var qi=function(e,t){if(t)return e.slice();var i=e.length,o=Wi?Wi(i):new e.constructor(i);return e.copy(o),o};var Ki=function(e,t){var i=-1,o=e.length;for(t||(t=Array(o));++i{const o=i[0],n=i[1];"string"==typeof n||n instanceof String?t[o]=n.split("").reverse().join(""):e(n)}))}(Nn);const En={en:ke,dev:Nn};function $n(e,t){return ee.t(e,t)}ee.use(xe),ee.init({resources:En,fallbackLng:"en",detection:{excludeCacheFor:["cimode","dev"]}});var Ln=i(441),Tn=i.n(Ln);class On{}On.toggleInteractiveMode="ctrl+alt+i",On.toggleExpandEmptyElementsSetting="ctrl+alt+x",On.refreshBrowser="ctrl+alt+enter",On.tagNavigationBarSelectionLeft="shift+alt+left",On.tagNavigationBarSelectionRight="shift+alt+right",On.arrowUp="up",On.arrowDown="down",On.arrowLeft="left",On.arrowRight="right",On.enterTextEditingMode="ctrl+alt+e",On.escape="escape",On.enter="enter";class Rn{}Rn.normalNavigation=[On.arrowUp,On.arrowDown,On.arrowLeft,On.arrowRight],Rn.menuNavigation=[On.arrowUp,On.arrowDown],Rn.tagNavBarNavigation=[On.arrowLeft,On.arrowRight],Rn.tagNavBarSelection=[On.tagNavigationBarSelectionLeft,On.tagNavigationBarSelectionRight];const _n=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"],Dn=new d;function In(e,t){var i,o;const n=null===(i=e.statusService)||void 0===i?void 0:i.targetFilePath;for(;Un(t);)t=t.parent;return!n||n==(null===(o=t.start)||void 0===o?void 0:o.path)}function Pn(e){return e.event.detail}async function An(e,t,i,o,n){let r="";try{if(o)return function(e,t,i,o){if(Dn.areCoordinatesInsideLogicalNode(t.clientX,t.clientY,e.selectionService.selectedLogicalNode))return;o?e.logicalTreeEditingService.moveNodeAfterSiblingNode(o,e.selectionService.selectedLogicalNode):e.logicalTreeEditingService.moveNodeAsFirstChild(i,e.selectionService.selectedLogicalNode)}(e,n,t,i);if(r=n.dataTransfer.getData("text/html"),!r){return void Fn(e,"handleDrop() failed - no dropData exists in text/html format.","")}var s;if(i)r=await e.dragAndDropHtmlFormatService.fillTagPrefixOn3rdPartyWebControlDrop(r,null===(s=i.start)||void 0===s?void 0:s.path),e.logicalTreeEditingService.dragAndDropAfterSiblingNode(i,r);else if(t){var a;r=await e.dragAndDropHtmlFormatService.fillTagPrefixOn3rdPartyWebControlDrop(r,null===(a=t.start)||void 0===a?void 0:a.path),e.logicalTreeEditingService.dragAndDropAsFirstChild(t,r)}}catch(t){let i=t instanceof Error?t.message+"\r\n"+t.stack:"Unknown Error";i="handleDrop() failed - "+i,Fn(e,i,r)}}function Bn(e,t){return function(e,t){return e.dataTransfer.types.includes("text/html")&&function(e){var t,i;if(e.children)for(const t of e.children)if(Un(t))return!1;const o=null===(t=e.getDomNode())||void 0===t?void 0:t.nodeType;if(o&&1!==o)return!1;return!_n.includes(null===(i=e.tagName)||void 0===i?void 0:i.toLowerCase())}(t)}(e,t)?(e.dataTransfer.dropEffect="copy",e.dataTransfer.effectAllowed="copy",!0):(e.dataTransfer.dropEffect="none",e.dataTransfer.effectAllowed="none",!1)}function Fn(e,t,i){e.diagnosticLog.writeMessageForEvent(7549,t+" dropData is: "+i,2),e.telemetryService.sendDragAndDropFailed(i,t)}class Mn{constructor(e){this.browserLink=e,this._expansionStyle=`\n .${Mn.WhitespaceOnlyCssClassName}::before,\n :not(area, base, br, col, hr, img, input, link, meta, param, command, keygen, source, live-preview-root, .${Mn.SkipEmptyExpansionClassName}):empty::before {\n content:" ";\n font-size: 12px;\n white-space: pre;\n }\n\n .${Mn.WhitespaceOnlyCssClassName},\n :not(area, base, br, col, hr, img, input, link, meta, param, command, keygen, source, live-preview-root, .${Mn.SkipEmptyExpansionClassName}):empty {\n outline: dashed 2px rgba(0, 0, 0, 0.8);\n box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.8);\n }\n `,this._mutationObserverConfig={attributes:!0,childList:!0,subtree:!0},this._mutationObserver=new MutationObserver(this.mutationCallback.bind(this)),this._isExpansionEnabledChanged=new n.FK,this._isExpansionEnabled=!1,Tn().bind(On.toggleExpandEmptyElementsSetting,(()=>{this.isExpansionOnEmptyElementsEnabled=!this.isExpansionOnEmptyElementsEnabled}),"keydown")}get isExpansionOnEmptyElementsEnabledChanged(){return this._isExpansionEnabledChanged.asEvent()}get isExpansionOnEmptyElementsEnabled(){return this._isExpansionEnabled}set isExpansionOnEmptyElementsEnabled(e){const t=this._isExpansionEnabled;this._isExpansionEnabled=e,t!==e&&(e?(this._mutationObserver.observe(document,this._mutationObserverConfig),this.ensureAllWhitespaceOnlyElementsClassApplied(),this.addExpansionStyle()):(this.removeExpansionStyle(),this.ensureAllWhitespaceOnlyClassNameRemoved(),this._mutationObserver.disconnect()),this._isExpansionEnabledChanged.dispatch(this._isExpansionEnabled),this.browserLink.expandEmptyElementsHostService.setExpandEmptyElementsSettingInVS(this._isExpansionEnabled))}mutationCallback(e,t){this.ensureAllWhitespaceOnlyElementsClassApplied()}ensureAllWhitespaceOnlyClassNameRemoved(){this._shouldReensureWhitespaceOnlyClass=!1;document.documentElement.querySelectorAll(`.${Mn.WhitespaceOnlyCssClassName}, .${Mn.SkipEmptyExpansionClassName}`).forEach((e=>{const t=e;t.classList.remove(Mn.WhitespaceOnlyCssClassName),t.classList.remove(Mn.SkipEmptyExpansionClassName)}))}ensureAllWhitespaceOnlyElementsClassApplied(){const e=new MutationObserver(this.tempMutationObserverCallback.bind(this));this._mutationObserver.disconnect(),e.observe(document.documentElement,this._mutationObserverConfig);document.documentElement.querySelectorAll("*").forEach((e=>{const t=e;0!==e.childNodes.length||this.shouldExpandNode(e)?0!==e.childNodes.length&&(this.shouldExpandNode(t)&&this.isEmptyOrHasOnlyWhitespaceChildren(t)?t.classList.add(Mn.WhitespaceOnlyCssClassName):t.classList.remove(Mn.WhitespaceOnlyCssClassName)):t.classList.add(Mn.SkipEmptyExpansionClassName)})),e.disconnect(),this._shouldReensureWhitespaceOnlyClass&&this.ensureAllWhitespaceOnlyElementsClassApplied(),this._mutationObserver.observe(document,this._mutationObserverConfig)}isEmptyOrHasOnlyWhitespaceChildren(e){if(0==e.childNodes.length)return!0;for(const t of e.childNodes){if(t.nodeType!==Node.TEXT_NODE)return!1;if(t.textContent&&t.textContent.trim())return!1}return!0}tempMutationObserverCallback(e,t){this._shouldReensureWhitespaceOnlyClass=!0}addExpansionStyle(){this._currentExpansionStyleElement=document.createElement("style"),this._currentExpansionStyleElement.innerHTML=this._expansionStyle,document.body.appendChild(this._currentExpansionStyleElement)}removeExpansionStyle(){document.body.removeChild(this._currentExpansionStyleElement)}shouldExpandNode(e){const t=this.browserLink.logicalTree.getFirstLogicalNodeFromDomNode(e);return t&&In(this.browserLink,t)&&!Un(t)}}function Vn(e){const t={truncatedText:"",fullText:""};if(!e)return t;if(r(e).mapsToDom){const t=e.getDomNode();if(t)return function(e){const t={truncatedText:"",fullText:""};if(null==e||!e.nodeName)return t;if(t.fullText=e.nodeName.toLowerCase(),t.truncatedText=e.nodeName.toLowerCase(),e.nodeType===Node.ELEMENT_NODE){var i,o,n;const r=e;t.fullText+=r.id&&r.id.length>0?"#"+r.id:"";const s=null!==(i=null===(o=r.className)||void 0===o||null===(n=o.replace(Mn.WhitespaceOnlyCssClassName,""))||void 0===n?void 0:n.trim())&&void 0!==i?i:"";t.fullText+=s&&s.length>0?"."+s.split(" ").join("."):"","html"!==t.truncatedText&&(t.truncatedText+=jn(r.id,"#"),t.truncatedText+=jn(s&&s.split(" ").join("."),"."))}return t}(t)}if("Element"===e.type?t.fullText=e.tagName.toLowerCase():"Attribute"===e.type?t.fullText=e.name.toLowerCase():"GenericContainer"===e.type?(t.fullText=e.description,t.truncatedText=function(e){const t=null==e?void 0:e.match(/^<%@\s*(\w+)/i);if(2==(null==t?void 0:t.length))return t[1];return e}(t.fullText)):"CodeBlock"===e.type?t.fullText=`${$n("nodes.code")}: ${r(e).codeBlockType}`:"Root"===e.type&&(t.fullText=$n("nodes.root")),t.truncatedText||(t.truncatedText=t.fullText),e.attributes)for(const o of e.attributes){var i;if("ID"===(null===(i=o.name)||void 0===i?void 0:i.toUpperCase())&&o.value&&o.value.length>0){t.fullText+="#"+o.value,t.truncatedText+=jn(o.value,"#");break}}return t}function jn(e,t){return e&&e.length>0?t+(e.length>30?e.substr(0,29)+"…":e):""}function zn(e){const t=e.getDomNode();if(t)return[t];let i=[];for(let t=0;t0)));var t}function Wn(e,t){if(!e)return null;let i=t.logicalTree.getFirstLogicalNodeFromDomNode(e);for(;!i&&e;)e=e.parentElement,i=t.logicalTree.getFirstLogicalNodeFromDomNode(e);for(;i&&!Hn(i);)i=i.parent;return i}Mn.WhitespaceOnlyCssClassName="wlp-whitespace-only-element-expansion",Mn.SkipEmptyExpansionClassName="wlp-skip-empty-expansion";class qn{constructor(e,t){this.requiredAncestorForSelectability="body",this.nodeBoundingClientRectUtil=e||new d,this._browserLink=t}findValidInsertionPoint(e,t,i){var o;if(!e)throw Error("parentNode must not be null or undefined.");const n=this.getParentsUntilDefault(e);if(!n.modifiedParentNode)throw Error("No default ancestor found.");null!==(o=i)&&void 0!==o||(i=[]);const r=this.findFirstDefaultPreviousSibling(t,n,i);return new Kn(n.modifiedParentNode,r)}findLeftMostSelectableLeaf(e){return e?this.findLeftMostSelectableLeafInternal(e,!1):null}getParentsUntilDefault(e){if(!e)throw Error("firstParent must not be null or undefined.");const t=new Gn;for(t.push(e);t.modifiedParentNode&&!r(t.modifiedParentNode).mapsToDom;)t.push(t.modifiedParentNode.parent);return t}findFirstDefaultPreviousSibling(e,t,i){for(let o=e?0:1;o=0;n--){const i=e.children[n];if(r(i).mapsToDom&&!t.includes(i))return i;const o=this.findRightMostDefaultDescendant(i,t);if(o)return o}return null}findLeftMostSelectableLeafInternal(e,t){if(t=t||this.isBodyTag(e),e.children)for(const i of e.children){const e=this.findLeftMostSelectableLeafInternal(i,t);if(e)return e}return t&&this.isInitiallySelectable(e)?e:null}isBodyTag(e){var t;return(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())===this.requiredAncestorForSelectability}isInitiallySelectable(e){if(this._browserLink&&!In(this._browserLink,e))return!1;if(!Hn(e))return!1;const t=zn(e);for(const e of t)if(this.nodeBoundingClientRectUtil.hasNonZeroArea(e))return!0;return!1}}class Kn{constructor(e=null,t=null){this.modifiedParentNode=e,this.modifiedInsertAfterLogicalNode=t}}class Gn{constructor(){this.parentNodeList=[]}get modifiedParentNode(){return 0===this.parentNodeList.length?null:this.parentNodeList[this.parentNodeList.length-1]}push(e){this.parentNodeList.push(e)}}function Xn(e,t){return 0===(null==e?void 0:e.localeCompare(t,void 0,{sensitivity:"accent"}))}class Yn{constructor(e){var t;this._selectionChanged=new n.pB,this._nodeBoundingClientRectUtil=new d,this._browserLink=e,null!==(t=this._browserLink)&&void 0!==t&&t.selectionHostingService&&(this._selectionHostingService=this._browserLink.selectionHostingService,this._selectionHostingService.editorSelectionChanged.subscribe(this.onEditorSelectionChanged.bind(this)))}initialize(){var e,t;null!==(e=this._browserLink)&&void 0!==e&&e.autoSyncService&&this._browserLink.autoSyncService.changesApplied.subscribe(this.onChangesApplied.bind(this)),null===(t=this._browserLink)||void 0===t||t.sourceMapping.ensureUpToDateAsync((()=>this.setInitialSelection()))}uninitialize(){var e;null!==(e=this._browserLink)&&void 0!==e&&e.autoSyncService&&this._browserLink.autoSyncService.changesApplied.unsubscribe(this.onChangesApplied.bind(this))}isNodeSelectableByMouse(e){var t;return!!("Text"===e.type||"Element"===e.type&&(Xn("input",e.tagName)||Xn("button",e.tagName)||Xn("img",e.tagName)||Xn("textarea",e.tagName)||(null===(t=e.tagName)||void 0===t?void 0:t.indexOf(":"))>=0))}onChangesApplied(e){for(const t of e.removed)t===this.selectedLogicalNode&&this.select(null,null,null)}async setInitialSelection(){if(this._browserLink.logicalTree.root){const e=await this._browserLink.currentEditorStateService.getCurrentEditorSelectionPosition();if(null!==e){if(this._browserLink.selectionHostingService.setSelectedLogicalNodeBySourceSpan(e.FileName,e.Position,e.Length))return}const t=new qn(void 0,this._browserLink).findLeftMostSelectableLeaf(this._browserLink.logicalTree.root);this._selectedNode=t,this.select(null,t,null)}}onEditorSelectionChanged(e,t){const i=t.selection;if(i&&(i.parentNode!==this._parentNode||i.priorSiblingNode!==this._priorSiblingNode||i.selectedNode!==this._selectedNode)){var o,n;const e=null!==(o=null!==(n=i.selectedNode)&&void 0!==n?n:i.priorSiblingNode)&&void 0!==o?o:i.parentNode;if(e){if(!In(this._browserLink,e))return;this.select(i.parentNode,i.selectedNode,i.priorSiblingNode,!1),t.handled=!0}}}get parentNode(){return this._parentNode}get priorSiblingNode(){return this._priorSiblingNode}get selectionChanged(){return this._selectionChanged.asEvent()}get selectedLogicalNode(){return this._selectedNode}selectLogicalNode(e,t){if(In(this._browserLink,e)){if(!t)for(;e&&!Hn(e);)e=e.parent;e!==this._selectedNode&&this.setupSelection(e)}}selectAtLocation(e,t,i){const o=Wn(e,this._browserLink);In(this._browserLink,o)&&o&&this.setupSelection(o,t,i)}selectDomNode(e){const t=Wn(e,this._browserLink);In(this._browserLink,t)&&t&&this.setupSelection(t)}selectPosition(e,t){const i=null!=t?t:e;In(this._browserLink,i)&&this.select(null!=e?e:this.getFirstAncestorThatMapsToDom(t),null,t)}select(e,t,i,o=!0){const n=this._selectedNode,r=this._priorSiblingNode,s=this._parentNode;if(this._selectedNode=t,this._priorSiblingNode=i,this._parentNode=e,n!==this._selectedNode||r!==this._priorSiblingNode||s!==this._parentNode){var a,l;const e={previousSelectedNode:n,previousParentNode:s,previousPriorSiblingNode:r,newSelectedNode:this._selectedNode,newParentNode:this._parentNode,newPriorSiblingNode:this._priorSiblingNode};this._selectionChanged.dispatch(this,e),this._selectionHostingService&&o&&this._selectionHostingService.selectTextInVSEditor(this._selectedNode,this._parentNode,this._priorSiblingNode),this._browserLink.diagnosticLog.writeEvent(7533,null!==(a=null===(l=this._selectedNode)||void 0===l?void 0:l.type)&&void 0!==a?a:"null")}}getFirstAncestorThatMapsToDom(e){let t=null==e?void 0:e.parent;for(;t&&!r(t).mapsToDom;)t=t.parent;return t}setupSelection(e,t=null,i=null){let o=null,n=null,r=null;if(e){(t&&i?this.isNodeSelectableByMouse(e):Hn(e))?(n=e,o=this.getFirstAncestorThatMapsToDom(e)):(o=e,n=null,r=this.findFirstChildToTheLeft(e,t,i))}this.select(o,n,r)}findFirstChildToTheLeft(e,t,i){let o=0,n=null;for(const r of e.children){const e=this._nodeBoundingClientRectUtil.getBoundingRectForLogicalNode(r);e&&(i>=e.top&&i<=e.bottom&&t>e.right&&e.right>o&&(o=e.right,n=r))}return n}getFirstSelectedDomNode(){const e=this.getAllSelectedDomNodes();return e.length>0?e[0]:null}getAllSelectedDomNodes(){return this.selectedLogicalNode?zn(this.selectedLogicalNode):[]}}class Qn{constructor(e,t,i){this.parentNode=e,this.priorSiblingNode=t,this.selectedNode=i}get hasSelectedNode(){return!!this.selectedNode}get hasSelectedPosition(){return!(!this.parentNode&&!this.priorSiblingNode)}get nextSiblingNode(){let e=null,t=-1;if(this.hasSelectedNode?(e=this.selectedNode.parent,t=e.children.indexOf(this.selectedNode)):this.hasSelectedPosition&&(e=this.parentNode,t=e.children.indexOf(this.priorSiblingNode)),t+1=0&&e.parent.children.length>n+1?e.parent.children[n+1]:null}function er(e){var t,i,o;const n=null!==(t=null==e||null===(i=e.parent)||void 0===i||null===(o=i.children)||void 0===o?void 0:o.indexOf(e))&&void 0!==t?t:-1;return n>0?e.parent.children[n-1]:null}function tr(e){var t;return"Text"==(null==e?void 0:e.type)&&""===(null===(t=e.text)||void 0===t?void 0:t.trim())}function ir(e){const t=zn(e);return t.length>0?t[0]:null}function or(e,t=!1){let i=null;return e.hasSelectedNode?i=e.selectedNode:e.hasSelectedPosition&&t?i=e.nextSiblingNode:e.hasSelectedPosition&&!t&&e.priorSiblingNode?i=e.priorSiblingNode:e.hasSelectedPosition&&(i=e.parentNode),i}function nr(e,t,i){let o=null;if(ar(e,t)){if(lr(i,e)){const o=sr(e,t,i);return Qn.asSelectedPosition(o.parent,null)}if(cr(i,e)){const o=rr(e,t,i);return Qn.asSelectedPosition(o.parent,o)}if(function(e,t){return 0===t.children.length&&e===t.start.position+t.startTagLength}(i,e))return Qn.asSelectedPosition(e,null);(function(e,t){return e>t.start.position&&e=e.selectedNode.length)){n.foundNewMatch=!0,n.newMatch=e;break}}return n}(e.children,o,t,i);return n.foundExactMatch||n.foundNewMatch?n.newMatch:o}function rr(e,t,i){const o=ar(e,t)&&cr(i,e);for(const o of e.children){const e=rr(o,t,i);if(e)return e}return o?e:null}function sr(e,t,i){const o=ar(e,t)&&lr(i,e);for(const o of e.children){const e=sr(o,t,i);if(e)return e}return o?e:null}function ar(e,t){var i;return(null===(i=e.start)||void 0===i?void 0:i.path)&&t&&Xn(t,e.start.path)}function lr(e,t){return e===t.start.position}function cr(e,t){return e===t.start.position+t.length}class dr{constructor(e){this.browserLink=e,this._editorSelectionChanged=new n.pB,this._selectingFromEditor=!1}get editorSelectionChanged(){return this._editorSelectionChanged.asEvent()}setSelectedLogicalNodeFromEditor(e){try{this._selectingFromEditor=!0;const t={selection:e,handled:!1};return this._editorSelectionChanged.dispatch(this,t),t.handled}finally{this._selectingFromEditor=!1}}setSelectedLogicalNodeBySourceSpan(e,t,i){const o=Zn(this.browserLink.logicalTree.root,e,t,i);return!(!o||!this.setSelectedLogicalNodeFromEditor(o))}selectTextInVSEditor(e,t,i){var o,n;this._selectingFromEditor||(!0!==(null==e||null===(o=e.start)||void 0===o||null===(n=o.path)||void 0===n?void 0:n.includes("vseditor"))?e?this.browserLink.sourceMapping.selectCompleteRangeFromLogicalNode(e):i?this.browserLink.sourceMapping.selectPositionAfterLogicalNode(i):t&&this.browserLink.sourceMapping.selectPositionAfterStartTagOfLogicalNode(t):this.browserLink.log(`Trying to select in ${e.start.path}`))}}class hr{get isPriorSiblingNodeLastSibling(){return this.parentNode.children.indexOf(this.priorSiblingNode)===this.parentNode.children.length-1}get nextSiblingNodeFromPriorSibling(){if(this.priorSiblingNode){const e=this.priorSiblingNode.parent.children.indexOf(this.priorSiblingNode);if(e0)return this.parentNode.children[0];return null}get priorSiblingNodeFromSelectedNode(){const e=this.selectedNode.parent.children.indexOf(this.selectedNode);return e>0?this.selectedNode.parent.children[e-1]:null}get parentHasChildren(){return this.parentNode.children.length>0}get isSelectedNodeFirstSibling(){return 0===this.selectedNode.parent.children.indexOf(this.selectedNode)}get lastChildOfPriorSibling(){return this.priorSiblingNode.children.length>0?this.priorSiblingNode.children[this.priorSiblingNode.children.length-1]:null}constructor(e,t,i){this.parentNode=e,this.priorSiblingNode=t,this.selectedNode=i}moveRight(){return this.selectedNode?ur(this.selectedNode)?Qn.asSelectedPosition(this.selectedNode,null):Qn.asSelectedPosition(this.selectedNode.parent,this.selectedNode):this.priorSiblingNode?this.isPriorSiblingNodeLastSibling?Qn.asSelectedPosition(this.parentNode.parent,this.parentNode):Qn.asSelectedNode(this.nextSiblingNodeFromPriorSibling):this.parentNode?this.parentHasChildren?Qn.asSelectedNode(this.nextSiblingNodeFromPriorSibling):Qn.asSelectedPosition(this.parentNode.parent,this.parentNode):null}moveLeft(){return this.selectedNode?this.isSelectedNodeFirstSibling?Qn.asSelectedPosition(this.selectedNode.parent,null):Qn.asSelectedPosition(this.selectedNode.parent,this.priorSiblingNodeFromSelectedNode):this.priorSiblingNode?ur(this.priorSiblingNode)?Qn.asSelectedPosition(this.priorSiblingNode,this.lastChildOfPriorSibling):Qn.asSelectedNode(this.priorSiblingNode):this.parentNode?Qn.asSelectedNode(this.parentNode):null}}function ur(e){if(!e.children||0===e.children.length)return!1;const t=e.getDomNode();if(t&&"Text"===e.children[0].type&&Hn(e.children[0])){const e=document.createRange();e.selectNodeContents(t);const i=e.getBoundingClientRect();if(i.width>0&&i.height>0)return!0}for(const t of e.children){if(Hn(t))return!0;if(ur(t))return!0}return!1}class pr{constructor(e){this.serviceInitialized=!1,this._browserLink=e}updatePositionMap(e){this.positionMap=new Map,this._selectableNonLeafLogicalNodes=[],e?this._selectableLeafLogicalNodes=e:(this._selectableLeafLogicalNodes=[],this.TreeTraverseToFetchAllSelectableNodes(document)),this.setScrollOffset(),this.calculatePositionMap(),this.serviceInitialized=!0}onArrowKeyDown(e){var t,i;const o=this._browserLink.selectionService.selectedLogicalNode,n=this._browserLink.selectionService.priorSiblingNode,r=this._browserLink.selectionService.parentNode,s=this.positionMap;if(!s)return;let a=null,l=null,c=null;const d=new hr(r,n,o);let h,u;switch(e.key){case"ArrowRight":h=d.moveRight(),a=h.parentNode,c=h.priorSiblingNode,l=h.selectedNode;break;case"ArrowLeft":h=d.moveLeft(),a=h.parentNode,c=h.priorSiblingNode,l=h.selectedNode;break;case"ArrowUp":var p;if(u=null!==(t=null!=o?o:n)&&void 0!==t?t:r,u)l=null===(p=s.get(u))||void 0===p?void 0:p.upNode;break;case"ArrowDown":var g;if(u=null!==(i=null!=o?o:n)&&void 0!==i?i:r,u)l=null===(g=s.get(u))||void 0===g?void 0:g.downNode}l?this._browserLink.selectionService.selectLogicalNode(l,!0):(a||c)&&this._browserLink.selectionService.selectPosition(a,c)}setScrollOffset(){this._scrollTop=window.scrollY||window.pageYOffset||document.body.scrollTop+(document.documentElement&&document.documentElement.scrollTop||0),this._scrollLeft=window.scrollX||window.pageXOffset||document.body.scrollLeft+(document.documentElement&&document.documentElement.scrollLeft||0)}calculatePositionMap(){for(let e=0;e0&&pr.isDist2Smaller(l,e)&&(l=e,i.downNodeIndex=o)}}return i}static isPossibleUpDownNode(e,t,i,o){if(0==i)return!1;const n=i*Math.tan(o/2*Math.PI/180);return t.bottom<=e.top||t.top>=e.bottom||t.trisection1e.left-n||t.trisection2e.left-n}getAbsolutePosFromBoundingRect(e){return{x:this._scrollLeft+e.left+e.width/2,y:this._scrollTop+e.top+e.height/2,left:this._scrollLeft+e.left,right:this._scrollLeft+e.right,top:this._scrollTop+e.top,bottom:this._scrollTop+e.bottom}}static isDist2Smaller(e,t){return t.rectDiste.right,n=t.top>e.bottom,r=t.bottom0&&i.height>0)return!0}const t=e.getElementsByTagName("*");for(let e=0;e0&&i.height>0&&(o=window.getComputedStyle(t))&&"visible"===o.getPropertyValue("visibility")&&0!=o.getPropertyValue("opacity")&&"none"!==o.getPropertyValue("display"))}TreeTraverseToFetchAllSelectableNodes(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_TEXT,{acceptNode:function(e){return this._browserLink.logicalTree.getFirstLogicalNodeFromDomNode(e)?e.nodeType!==e.TEXT_NODE&&e.nodeType!==Node.ELEMENT_NODE||!pr.IsSelectable(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}.bind(this)});for(;t.nextNode();){const e=t.currentNode;let i=this._browserLink.logicalTree.getFirstLogicalNodeFromDomNode(e);for(;i&&!Hn(i);)i=i.parent;pr.hasSelectableChildNode(e)?this._selectableNonLeafLogicalNodes.push(i):this._selectableLeafLogicalNodes.push(i)}}getOrCreatePositionInfo(e,t){if(!e)return null;let i=this.positionMap.get(e);var o;i||(t=null!==(o=t)&&void 0!==o?o:e.getDomNode(),i={upNode:null,downNode:null},this.positionMap.set(e,i));return i}}class gr{constructor(){this._statusChanged=new n.pB;const e=$n("status.connectingToVisualStudio");this._currentStatus={messageType:0,displayText:e,fullText:e},this._targetFilePath=null}get statusChanged(){return this._statusChanged.asEvent()}get targetFilePath(){return this._targetFilePath}set targetFilePath(e){this._targetFilePath=e}get currentStatus(){return this._currentStatus}set currentStatus(e){this._currentStatus!==e&&(this._currentStatus=e,this._statusChanged.dispatch(this,e))}}class fr{constructor(e){this._tagHierarchyChanged=new n.pB,this._browserLink=e,this._tagItemList=[]}initialize(){var e;null!==(e=this._browserLink)&&void 0!==e&&e.autoSyncService&&this._browserLink.autoSyncService.changesApplied.subscribe(this.onChangesApplied.bind(this)),this._browserLink.selectionService.selectionChanged.subscribe(this.onSelectionChanged.bind(this))}get tagItemList(){return this._tagItemList}get selectedTagItem(){return this._selectedTagItem}get parentTagItem(){return this._parentTagItem}get tagHierarchyChanged(){return this._tagHierarchyChanged.asEvent()}getUpdatedTagItem(e){const t=Vn(e.logicalNode);return{logicalNode:e.logicalNode,truncatedText:t.truncatedText,fullText:t.fullText,isSelectable:In(this._browserLink,e.logicalNode)}}updateTagItemList(){for(let t=0;te.logicalNode===t));-1!==e&&(this._selectedTagItem===this._tagItemList[e]&&(this._selectedTagItem=null),this._tagItemList.splice(e,1))}const t={tagItemList:this.tagItemList,selectedTagItem:this.selectedTagItem,parentTagItem:this.parentTagItem};this._tagHierarchyChanged.dispatch(this,t)}onNavigateHotKeyPressed(e){if(this._selectedTagItem&&this._selectedTagItem)switch(e.key){case"ArrowLeft":{const e=this._tagItemList.indexOf(this._selectedTagItem);e>0&&this._browserLink.selectionService.selectLogicalNode(this._tagItemList[e-1].logicalNode)}break;case"ArrowRight":{const e=this._tagItemList.indexOf(this._selectedTagItem);e{e(this.selectedDomNode)}))}}class mr{constructor(e){this.selection=new br(e.selectionService)}}class yr{constructor(){this._isConnectedChanged=new n.pB}get isConnected(){return this._isConnected}set isConnected(e){this._isConnected!==e&&(this._isConnected=e,this._isConnectedChanged.dispatch(this,e))}get isConnectedChanged(){return this._isConnectedChanged.asEvent()}}class wr{constructor(){this._isInitialized=!1,this._isInitializedChanged=new n.pB}get isInitialized(){return this._isInitialized}set isInitialized(e){this._isInitialized!==e&&(this._isInitialized=e,this._isInitializedChanged.dispatch(this,e))}get isInitializedChanged(){return this._isInitializedChanged.asEvent()}}const xr={max:2147483647,maxMinus1:2147483646,maxMinus2:2147483645},kr={browserLinkScriptElementId:"__browserLink_initializationData",livePreviewRootTagName:"live-preview-root",editableTextParent:"editable-text-parent"},Sr="wlp-temp-new-text-node",Cr="default",Nr="text";class Er{constructor(e){this.browserLink=e,this._isEnabled=!1,this._isEnabledChanged=new n.FK,this._isReady=!1,this._isReadyChanged=new n.FK,this._selectionOverlayElementChanged=new n.FK,this.isEnabled=this.isEnabledOnLoad}initialize(){Ln.bind(On.toggleInteractiveMode,(()=>{this.isEnabled=!this.isEnabled}),"keydown"),this.browserLink.designSurfaceHostService.setDesignSurfaceEnabledSettingInVS(this.isEnabled)}uninitialize(){Ln.unbind(On.toggleInteractiveMode,"keydown")}get isEnabled(){return this._isEnabled}set isEnabled(e){if(this._isEnabled!==e){this._isEnabled=e,this.isEnabledByStorage=e,this.raiseIsEnabledChanged(),this.browserLink.designSurfaceHostService&&this.browserLink.designSurfaceHostService.setDesignSurfaceEnabledSettingInVS(e);!function(e,t){const i=document.createElement("div"),o="speak-"+Date.now();i.setAttribute("id",o),i.setAttribute("aria-live",t||"polite"),i.classList.add("sr-only"),document.querySelector(kr.livePreviewRootTagName)&&(document.body.appendChild(i),window.setTimeout((function(){document.getElementById(o).innerHTML=e}),100),window.setTimeout((function(){document.body.removeChild(document.getElementById(o))}),1e3))}($n(e?"screenReader.inspectorEnabled":"screenReader.inspectorDisabled"),"assertive")}}get isEnabledChanged(){return this._isEnabledChanged.asEvent()}get isReady(){return this._isReady}set isReady(e){this._isReady!==e&&(this._isReady=e,this.raiseIsReadyChanged())}get isReadyChanged(){return this._isReadyChanged.asEvent()}get selectionOverlayElementChanged(){return this._selectionOverlayElementChanged.asEvent()}set selectionOverlayElement(e){this._selectionOverlayElement!==e&&(this._selectionOverlayElement=e,this.raiseSelectionOverlayElementChanged())}get selectionOverlayElement(){return this._selectionOverlayElement}get isEnabledOnLoad(){return this.isEnabledByUrl&&!this.isDisabledByStorage||this.isEnabledByStorage}raiseIsEnabledChanged(){this._isEnabledChanged.dispatch(this._isEnabled)}raiseIsReadyChanged(){this._isReadyChanged.dispatch(this._isReady)}raiseSelectionOverlayElementChanged(){this._selectionOverlayElementChanged.dispatch(this._selectionOverlayElement)}get isEnabledByUrl(){return"true"===new URLSearchParams(new URL(window.location.href).search).get(Er.SearchParameterName)}get isEnabledByStorage(){return window.sessionStorage.getItem(Er.SessionStorageKey)===(!0).toString()}set isEnabledByStorage(e){window.sessionStorage.setItem(Er.SessionStorageKey,e.toString())}get isDisabledByStorage(){return window.sessionStorage.getItem(Er.SessionStorageKey)===(!1).toString()}}Er.SearchParameterName="vsedit",Er.SessionStorageKey="weblivepreview-designsurface-enabled";class $r{constructor(e){this._isEmbeddedActionPanelSupported=!1,this._isVisibleChanged=new n.FK,this._isVisible=!1,this._browserLink=e}initialize(){this._browserLink.actionPanelService.isEmbeddedActionPanelSupported().then((e=>this._isEmbeddedActionPanelSupported=e))}uninitialize(){this._isEmbeddedActionPanelSupported=!1}set selectionTag(e){this._selectionTag=e}get selectionTag(){return this._selectionTag}set isVisible(e){this._isVisible!==e&&(this._isVisible=e,this.handleIsVisibleChanged())}get isVisible(){return this._isVisible}onActionPanelClosed(){this._isVisible=!1}handleIsVisibleChanged(){this._isEmbeddedActionPanelSupported?this.handleEmbeddedActionPanelVisibilityChanged():this.raiseIsVisibleChanged()}handleEmbeddedActionPanelVisibilityChanged(){this._isVisible?this._browserLink.actionPanelService.showEmbeddedActionPanel(this._selectionTag,this._browserLink.selectionService.selectedLogicalNode):this._browserLink.actionPanelService.hideEmbeddedActionPanel()}raiseIsVisibleChanged(){this._isVisibleChanged.dispatch(this._isVisible)}get isVisibleChanged(){return this._isVisibleChanged.asEvent()}makeVisible(){this.isVisible=!0}toggleVisibleState(){this.isVisible=!this.isVisible}}class Lr{createCSS(){return""}createBehavior(){}}const Tr=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(e){return{}}}();void 0===Tr.trustedTypes&&(Tr.trustedTypes={createPolicy:(e,t)=>t});const Or={configurable:!1,enumerable:!1,writable:!1};void 0===Tr.FAST&&Reflect.defineProperty(Tr,"FAST",Object.assign({value:Object.create(null)},Or));const Rr=Tr.FAST;if(void 0===Rr.getById){const e=Object.create(null);Reflect.defineProperty(Rr,"getById",Object.assign({value(t,i){let o=e[t];return void 0===o&&(o=i?e[t]=i():null),o}},Or))}const _r=Object.freeze([]),Dr=Tr.FAST.getById(1,(()=>{const e=[],t=[];function i(){if(t.length)throw t.shift()}function o(e){try{e.call()}catch(e){t.push(e),setTimeout(i,0)}}function n(){const t=1024;let i=0;for(;it){for(let t=0,o=e.length-i;te});let Pr=Ir;const Ar=`fast-${Math.random().toString(36).substring(2,8)}`,Br=`${Ar}{`,Fr=`}${Ar}`,Mr=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(e){if(Pr!==Ir)throw new Error("The HTML policy can only be set once.");Pr=e},createHTML:e=>Pr.createHTML(e),isMarker:e=>e&&8===e.nodeType&&e.data.startsWith(Ar),extractDirectiveIndexFromMarker:e=>parseInt(e.data.replace(`${Ar}:`,"")),createInterpolationPlaceholder:e=>`${Br}${e}${Fr}`,createCustomAttributePlaceholder(e,t){return`${e}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder:e=>`\x3c!--${Ar}:${e}--\x3e`,queueUpdate:Dr.enqueue,processUpdates:Dr.process,nextUpdate:()=>new Promise(Dr.enqueue),setAttribute(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i)},setBooleanAttribute(e,t,i){i?e.setAttribute(t,""):e.removeAttribute(t)},removeChildNodes(e){for(let t=e.firstChild;null!==t;t=e.firstChild)e.removeChild(t)},createTemplateWalker:e=>document.createTreeWalker(e,133,null,!1)});class Vr{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}}function jr(e){return e.map((e=>e instanceof Vr?jr(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}function zr(e){return e.map((e=>e instanceof Vr?e.behaviors:null)).reduce(((e,t)=>null===t?e:(null===e&&(e=[]),e.concat(t))),null)}Vr.create=(()=>{if(Mr.supportsAdoptedStyleSheets){const e=new Map;return t=>new Ur(t,e)}return e=>new Wr(e)})();class Ur extends Vr{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=zr(e)}get styleSheets(){if(void 0===this._styleSheets){const e=this.styles,t=this.styleSheetCache;this._styleSheets=jr(e).map((e=>{if(e instanceof CSSStyleSheet)return e;let i=t.get(e);return void 0===i&&(i=new CSSStyleSheet,i.replaceSync(e),t.set(e,i)),i}))}return this._styleSheets}addStylesTo(e){e.adoptedStyleSheets=[...e.adoptedStyleSheets,...this.styleSheets],super.addStylesTo(e)}removeStylesFrom(e){const t=this.styleSheets;e.adoptedStyleSheets=e.adoptedStyleSheets.filter((e=>-1===t.indexOf(e))),super.removeStylesFrom(e)}}let Hr=0;class Wr extends Vr{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=zr(e),this.styleSheets=jr(e),this.styleClass=`fast-style-class-${++Hr}`}addStylesTo(e){const t=this.styleSheets,i=this.styleClass;e=this.normalizeTarget(e);for(let o=0;o("string"==typeof t?this.css+=t:e.push(t),e)),[]);i.length&&(this.styles=Vr.create(i))}createBehavior(){return this}createCSS(){return this.css}bind(e){this.styles&&e.$fastController.addStyles(this.styles),this.behaviors.length&&e.$fastController.addBehaviors(this.behaviors)}unbind(e){this.styles&&e.$fastController.removeStyles(this.styles),this.behaviors.length&&e.$fastController.removeBehaviors(this.behaviors)}}class Xr{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const i=t.indexOf(e);-1!==i&&t.splice(i,1)}}notify(e){const t=this.spillover,i=this.source;if(void 0===t){const t=this.sub1,o=this.sub2;void 0!==t&&t.handleChange(i,e),void 0!==o&&o.handleChange(i,e)}else for(let o=0,n=t.length;o{const e=/(:|&&|\|\||if)/,t=new WeakMap,i=new WeakMap,o=Mr.queueUpdate;let n,r=e=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function s(e){let i=e.$fastController||t.get(e);return void 0===i&&(Array.isArray(e)?i=r(e):t.set(e,i=new Yr(e))),i}function a(e){let t=i.get(e);if(void 0===t){let o=Reflect.getPrototypeOf(e);for(;void 0===t&&null!==o;)t=i.get(o),o=Reflect.getPrototypeOf(o);t=void 0===t?[]:t.slice(0),i.set(e,t)}return t}class l{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==n&&n.watch(e,this.name),e[this.field]}setValue(e,t){const i=this.field,o=e[i];if(o!==t){e[i]=t;const n=e[this.callback];"function"==typeof n&&n.call(e,o,t),s(e).notify(this.name)}}}class c extends Xr{constructor(e,t,i=!1){super(e,t),this.binding=e,this.isVolatileBinding=i,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(e,t){this.needsRefresh&&null!==this.last&&this.disconnect();const i=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(e,t);return n=i,o}disconnect(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(e,t){const i=this.last,o=s(e),r=null===i?this.first:{};if(r.propertySource=e,r.propertyName=t,r.notifier=o,o.subscribe(this,t),null!==i){if(!this.needsRefresh){let t;n=void 0,t=i.propertySource[i.propertyName],n=this,e===t&&(this.needsRefresh=!0)}i.next=r}this.last=r}handleChange(){this.needsQueue&&(this.needsQueue=!1,o(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let e=this.first;return{next:()=>{const t=e;return void 0===t?{value:void 0,done:!0}:(e=e.next,{value:t,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(e){r=e},getNotifier:s,track(e,t){void 0!==n&&n.watch(e,t)},trackVolatile(){void 0!==n&&(n.needsRefresh=!0)},notify(e,t){s(e).notify(t)},defineProperty(e,t){"string"==typeof t&&(t=new l(t)),a(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get:function(){return t.getValue(this)},set:function(e){t.setValue(this,e)}})},getAccessors:a,binding(e,t,i=this.isVolatileBinding(e)){return new c(e,t,i)},isVolatileBinding:t=>e.test(t.toString())})}));function Zr(e,t){Qr.defineProperty(e,t)}function Jr(e,t,i){return Object.assign({},i,{get:function(){return Qr.trackVolatile(),i.get.apply(this)}})}const es=Rr.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}}));class ts{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return es.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){es.set(e)}}Qr.defineProperty(ts.prototype,"index"),Qr.defineProperty(ts.prototype,"length");const is=Object.seal(new ts);class os{constructor(){this.targetIndex=0}}class ns extends os{constructor(){super(...arguments),this.createPlaceholder=Mr.createInterpolationPlaceholder}}class rs extends os{constructor(e,t,i){super(),this.name=e,this.behavior=t,this.options=i}createPlaceholder(e){return Mr.createCustomAttributePlaceholder(this.name,e)}createBehavior(e){return new this.behavior(e,this.options)}}function ss(e,t){this.source=e,this.context=t,null===this.bindingObserver&&(this.bindingObserver=Qr.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(e,t))}function as(e,t){this.source=e,this.context=t,this.target.addEventListener(this.targetName,this)}function ls(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function cs(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.unbind(),e.needsBindOnly=!0)}function ds(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function hs(e){Mr.setAttribute(this.target,this.targetName,e)}function us(e){Mr.setBooleanAttribute(this.target,this.targetName,e)}function ps(e){if(null==e&&(e=""),e.create){this.target.textContent="";let t=this.target.$fastView;void 0===t?t=e.create():this.target.$fastTemplate!==e&&(t.isComposed&&(t.remove(),t.unbind()),t=e.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=e)}else{const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=e}}function gs(e){this.target[this.targetName]=e}function fs(e){const t=this.classVersions||Object.create(null),i=this.target;let o=this.version||0;if(null!=e&&e.length){const n=e.split(/\s+/);for(let e=0,r=n.length;eMr.createHTML(e(t,i))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=us;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=as,this.unbind=ds;break;default:this.cleanedTargetName=e,"class"===e&&(this.updateTarget=fs)}}targetAtContent(){this.updateTarget=ps,this.unbind=cs}createBehavior(e){return new bs(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class bs{constructor(e,t,i,o,n,r,s){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=i,this.bind=o,this.unbind=n,this.updateTarget=r,this.targetName=s}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){ts.setEvent(e);const t=this.binding(this.source,this.context);ts.setEvent(null),!0!==t&&e.preventDefault()}}let ms=null;class ys{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){ms=this}static borrow(e){const t=ms||new ys;return t.directives=e,t.reset(),ms=null,t}}function ws(e){if(1===e.length)return e[0];let t;const i=e.length,o=e.map((e=>"string"==typeof e?()=>e:(t=e.targetName||t,e.binding))),n=new vs(((e,t)=>{let n="";for(let r=0;ra)),c.targetName=s.name):c=ws(l),null!==c&&(t.removeAttributeNode(s),n--,r--,e.addFactory(c))}}function Cs(e,t,i){const o=ks(e,t.textContent);if(null!==o){let n=t;for(let r=0,s=o.length;r0}const t=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,o=new Array(this.behaviorCount),n=Mr.createTemplateWalker(t);let r=0,s=this.targetOffset,a=n.nextNode();for(let e=i.length;r=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Ts(e,...t){const i=[];let o="";for(let n=0,r=e.length-1;ne}if("function"==typeof s&&(s=new vs(s)),s instanceof ns){const e=Ls.exec(r);null!==e&&(s.targetName=e[2])}s instanceof os?(o+=s.createPlaceholder(i.length),i.push(s)):o+=s}return o+=e[e.length-1],new $s(o,i)}function Os(e,t){const i="function"==typeof t?t:()=>t;return(t,o)=>e(t,o)?i(t,o):null}class Rs{constructor(e,t){this.target=e,this.propertyName=t}bind(e){e[this.propertyName]=this.target}unbind(){}}function _s(e){return new rs("fast-ref",Rs,e)}const Ds={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e},Is={toView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t.toString()},fromView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}};class Ps{constructor(e,t,i=t.toLowerCase(),o="reflect",n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=i,this.mode=o,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===o&&void 0===n&&(this.converter=Ds)}setValue(e,t){const i=e[this.fieldName],o=this.converter;void 0!==o&&(t=o.fromView(t)),i!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](i,t),e.$fastController.notify(this.name))}getValue(e){return Qr.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,i=this.guards;i.has(e)||"fromView"===t||Mr.queueUpdate((()=>{i.add(e);const o=e[this.fieldName];switch(t){case"reflect":const t=this.converter;Mr.setAttribute(e,this.attribute,void 0!==t?t.toView(o):o);break;case"boolean":Mr.setBooleanAttribute(e,this.attribute,o)}i.delete(e)}))}static collect(e,...t){const i=[];t.push(e.attributes);for(let o=0,n=t.length;o1&&(i.property=t);const o=e.constructor.attributes||(e.constructor.attributes=[]);o.push(i)}return arguments.length>1?(i={},void o(e,t)):(i=void 0===e?{}:e,o)}const Bs={mode:"open"},Fs={},Ms=Rr.getById(4,(()=>{const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t)})}));class Vs{constructor(e,t=e.definition){"string"==typeof t&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const i=Ps.collect(e,t.attributes),o=new Array(i.length),n={},r={};for(let e=0,t=i.length;e0){const t=this.boundObservables=Object.create(null);for(let i=0,n=o.length;iWs(e),define:(e,t)=>new Vs(e,t).define().type});function Ks(e){return function(t){new Vs(t,e).define()}}const Gs=new Map;"metadata"in Reflect||(Reflect.metadata=function(e,t){return function(i){Reflect.defineMetadata(e,t,i)}},Reflect.defineMetadata=function(e,t,i){let o=Gs.get(i);void 0===o&&Gs.set(i,o=new Map),o.set(e,t)},Reflect.getOwnMetadata=function(e,t){const i=Gs.get(t);if(void 0!==i)return i.get(e)});class Xs{constructor(e,t){this.container=e,this.key=t}instance(e){return this.registerResolver(0,e)}singleton(e){return this.registerResolver(1,e)}transient(e){return this.registerResolver(2,e)}callback(e){return this.registerResolver(3,e)}cachedCallback(e){return this.registerResolver(3,xa(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){const{container:i,key:o}=this;return this.container=this.key=void 0,i.registerResolver(o,new ca(o,e,t))}}function Ys(e){const t=e.slice(),i=Object.keys(e),o=i.length;let n;for(let r=0;rnew ca(e,1,e),transient:e=>new ca(e,2,e)}),Zs=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:Qs.singleton})}),Js=new Map;function ea(e){return t=>Reflect.getOwnMetadata(e,t)}let ta=null;const ia=Object.freeze({createContainer:e=>new ya(null,Object.assign({},Zs.default,e)),findResponsibleContainer(e){const t=e.$$container$$;return t&&t.responsibleForOwnerRequests?t:ia.findParentContainer(e)},findParentContainer(e){const t=new CustomEvent(ba,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return e.dispatchEvent(t),t.detail.container||ia.getOrCreateDOMContainer()},getOrCreateDOMContainer:(e,t)=>e?e.$$container$$||new ya(e,Object.assign({},Zs.default,t,{parentLocator:ia.findParentContainer})):ta||(ta=new ya(null,Object.assign({},Zs.default,t,{parentLocator:()=>null}))),getDesignParamtypes:ea("design:paramtypes"),getAnnotationParamtypes:ea("di:paramtypes"),getOrCreateAnnotationParamTypes(e){let t=this.getAnnotationParamtypes(e);return void 0===t&&Reflect.defineMetadata("di:paramtypes",t=[],e),t},getDependencies(e){let t=Js.get(e);if(void 0===t){const i=e.inject;if(void 0===i){const i=ia.getDesignParamtypes(e),o=ia.getAnnotationParamtypes(e);if(void 0===i)if(void 0===o){const i=Object.getPrototypeOf(e);t="function"==typeof i&&i!==Function.prototype?Ys(ia.getDependencies(i)):[]}else t=Ys(o);else if(void 0===o)t=Ys(i);else{t=Ys(i);let e,n=o.length;for(let i=0;i{ia.findResponsibleContainer(this).get(i)!==this[n]&&(this[n]=e,o.notify(t))};o.subscribe({handleChange:r},"isConnected")}}return e}})},createInterface(e,t){const i="function"==typeof e?e:t,o="string"==typeof e?e:e&&"friendlyName"in e&&e.friendlyName||Na,n="string"!=typeof e&&(e&&"respectConnection"in e&&e.respectConnection||!1),r=function(e,t,i){if(null==e||void 0!==new.target)throw new Error(`No registration for interface: '${r.friendlyName}'`);if(t)ia.defineProperty(e,t,r,n);else{ia.getOrCreateAnnotationParamTypes(e)[i]=r}};return r.$isInterface=!0,r.friendlyName=null==o?"(anonymous)":o,null!=i&&(r.register=function(e,t){return i(new Xs(e,null!=t?t:r))}),r.toString=function(){return`InterfaceSymbol<${r.friendlyName}>`},r},inject:(...e)=>function(t,i,o){if("number"==typeof o){const i=ia.getOrCreateAnnotationParamTypes(t),n=e[0];void 0!==n&&(i[o]=n)}else if(i)ia.defineProperty(t,i,e[0]);else{const i=o?ia.getOrCreateAnnotationParamTypes(o.value):ia.getOrCreateAnnotationParamTypes(t);let n;for(let t=0;t(e.register=function(t){return ka.transient(e,e).register(t)},e.registerInRequestor=!1,e),singleton:(e,t=ra)=>(e.register=function(t){return ka.singleton(e,e).register(t)},e.registerInRequestor=t.scoped,e)}),oa=ia.createInterface("Container");function na(e){return function(t){const i=function(e,t,o){ia.inject(i)(e,t,o)};return i.$isResolver=!0,i.resolve=function(i,o){return e(t,i,o)},i}}ia.inject;const ra={scoped:!1};sa=(e,t,i,o)=>i.getAll(e,o);var sa;na(((e,t,i)=>()=>i.get(e))),na(((e,t,i)=>i.has(e,!0)?i.get(e):void 0));function aa(e,t,i){ia.inject(aa)(e,t,i)}aa.$isResolver=!0,aa.resolve=()=>{};na(((e,t,i)=>{const o=la(e,t),n=new ca(e,0,o);return i.registerResolver(e,n),o})),na(((e,t,i)=>la(e,t)));function la(e,t){return t.getFactory(e).construct(t)}class ca{constructor(e,t,i){this.key=e,this.strategy=t,this.state=i,this.resolving=!1}get $isResolver(){return!0}register(e){return e.registerResolver(this.key,this)}resolve(e,t){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=e.getFactory(this.state).construct(t),this.strategy=0,this.resolving=!1,this.state;case 2:{const i=e.getFactory(this.state);if(null===i)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.construct(t)}case 3:return this.state(e,t,this);case 4:return this.state[0].resolve(e,t);case 5:return t.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(e){var t,i,o;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return null!==(o=null===(i=null===(t=e.getResolver(this.state))||void 0===t?void 0:t.getFactory)||void 0===i?void 0:i.call(t,e))&&void 0!==o?o:null;default:return null}}}function da(e){return this.get(e)}function ha(e,t){return t(e)}class ua{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let i;return i=void 0===t?new this.Type(...this.dependencies.map(da,e)):new this.Type(...this.dependencies.map(da,e),...t),null==this.transformers?i:this.transformers.reduce(ha,i)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}}const pa={$isResolver:!0,resolve:(e,t)=>t};function ga(e){return"function"==typeof e.register}function fa(e){return function(e){return ga(e)&&"boolean"==typeof e.registerInRequestor}(e)&&e.registerInRequestor}const va=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),ba="__DI_LOCATE_PARENT__",ma=new Map;class ya{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,null!==e&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(oa,pa),e instanceof Node&&e.addEventListener(ba,(e=>{e.composedPath()[0]!==this.owner&&(e.detail.container=this,e.stopImmediatePropagation())}))}get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(e,...t){return this.context=e,this.register(...t),this.context=null,this}register(...e){if(100==++this.registerDepth)throw new Error("Unable to autoregister dependency");let t,i,o,n,r;const s=this.context;for(let a=0,l=e.length;athis}))}jitRegister(e,t){if("function"!=typeof e)throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(va.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(ga(e)){const i=e.register(t);if(!(i instanceof Object)||null==i.resolve){const i=t.resolvers.get(e);if(null!=i)return i;throw new Error("A valid resolver was not returned from the static register method")}return i}if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{const i=this.config.defaultResolver(e,t);return t.resolvers.set(e,i),i}}}const wa=new WeakMap;function xa(e){return function(t,i,o){if(wa.has(o))return wa.get(o);const n=e(t,i,o);return wa.set(o,n),n}}const ka=Object.freeze({instance:(e,t)=>new ca(e,0,t),singleton:(e,t)=>new ca(e,1,t),transient:(e,t)=>new ca(e,2,t),callback:(e,t)=>new ca(e,3,t),cachedCallback:(e,t)=>new ca(e,3,xa(t)),aliasTo:(e,t)=>new ca(t,5,e)});function Sa(e){if(null==e)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function Ca(e,t,i){if(e instanceof ca&&4===e.strategy){const o=e.state;let n=o.length;const r=new Array(n);for(;n--;)r[n]=o[n].resolve(t,i);return r}return[e.resolve(t,i)]}const Na="(anonymous)";function Ea(e){return"object"==typeof e&&null!==e||"function"==typeof e}const $a=function(){const e=new WeakMap;let t=!1,i="",o=0;return function(n){return t=e.get(n),void 0===t&&(i=n.toString(),o=i.length,t=o>=29&&o<=100&&125===i.charCodeAt(o-1)&&i.charCodeAt(o-2)<=32&&93===i.charCodeAt(o-3)&&101===i.charCodeAt(o-4)&&100===i.charCodeAt(o-5)&&111===i.charCodeAt(o-6)&&99===i.charCodeAt(o-7)&&32===i.charCodeAt(o-8)&&101===i.charCodeAt(o-9)&&118===i.charCodeAt(o-10)&&105===i.charCodeAt(o-11)&&116===i.charCodeAt(o-12)&&97===i.charCodeAt(o-13)&&110===i.charCodeAt(o-14)&&88===i.charCodeAt(o-15),e.set(n,t)),t}}(),La={};function Ta(e){switch(typeof e){case"number":return e>=0&&(0|e)===e;case"string":{const t=La[e];if(void 0!==t)return t;const i=e.length;if(0===i)return La[e]=!1;let o=0;for(let t=0;t1||o<48||o>57)return La[e]=!1;return La[e]=!0}default:return!1}}const Oa=ia.createInterface(),Ra=ia.createInterface(),_a=ia.createInterface(),Da=ia.createInterface(),Ia=ia.createInterface(),Pa=ia.createInterface(),Aa=ia.createInterface(),Ba=ia.createInterface(),Fa=ia.createInterface(),Ma=ia.createInterface(),Va=ia.createInterface(),ja=ia.createInterface(),za=ia.createInterface(),Ua=ia.createInterface(),Ha=ia.createInterface(),Wa=ia.createInterface(),qa=ia.createInterface(),Ka=ia.createInterface(),Ga=ia.createInterface(),Xa=ia.createInterface();var Ya=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Qa=void 0&&(void 0).__param||function(e,t){return function(i,o){t(i,o,e)}};let Za=class{constructor(e){this.elementsFromPoint=(e,t)=>this.browserLink.disableUserPageInteractionsService.runUserPageInteractionFunction((()=>this.elementsFromPointInternal(e,t)),[]),this.elementsFromPointInternal=(e,t)=>document.elementsFromPoint?document.elementsFromPoint(e,t):document["msElementsFromPoint"]?document["msElementsFromPoint"](e,t):null,this.nodeFromPoint=(e,t)=>{const i=this.elementsFromPoint(e,t);if(!i)return null;const o=i[1];for(let i=0;ii.left&&ei.top&&t{let n=null,r=Number.MAX_VALUE;for(let s=0;sl.right&&(c=e-l.right),tl.bottom&&(d=t-l.bottom);const h=c*c+d*d;h!a(e)&&"#text"===e.nodeName.toLowerCase(),this.browserLink=e}getDroppableLogicalContainerNodeAtPoint(e,t,i){const o=this.elementsFromPoint(e,t);let n;for(let e=0;e=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const el=Kr` :host { z-index: var(--wlp-zIndex); position: absolute; left: 0; top: 0; } .disconnectedOverlay { position: fixed; background-color: black; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.7; } .blocked-resources-toast { position: relative } `,tl=Ts` ${Os((e=>e.isDesignSurfaceEnabled),Ts` ${Os((e=>e.isInitializingLogicalTree||!e.isBrowserLinkConnected),Ts`
`)} ${Os((e=>!e.isInitializingLogicalTree),Ts` `)} e.handleDrag(t.event)} @dragover=${(e,t)=>e.handleDrag(t.event)}> `)} `;let il=class extends qs{constructor(){super(...arguments),this.handleDesignSurfaceIsEnabledChanged=()=>{this.isDesignSurfaceEnabled=this.designSurfaceService.isEnabled},this.handleDesignSurfaceIsReadyChanged=()=>{this.isDesignSurfaceReady=this.designSurfaceService.isReady},this.handleIsInitializedChanged=(e,t)=>{this.isInitializingLogicalTree=!t},this.handleIsBrowserLinkConnectedChanged=(e,t)=>{this.isBrowserLinkConnected=t}}connectedCallback(){super.connectedCallback(),this.checkBrowserLinkState(),this.attachBrowserLinkEvents()}disconnectedCallback(){super.disconnectedCallback(),this.detachBrowserLinkEvents()}handleDrag(e){e.dataTransfer.dropEffect="none",e.dataTransfer.effectAllowed="none"}checkBrowserLinkState(){this.isInitializingLogicalTree=!this.logicalTreeInitializedStatusService.isInitialized,this.isBrowserLinkConnected=this.browserLinkConnectionStatusService.isConnected,this.isDesignSurfaceEnabled=this.designSurfaceService.isEnabled,this.isDesignSurfaceReady=this.designSurfaceService.isReady}attachBrowserLinkEvents(){this.browserLinkConnectionStatusService.isConnectedChanged.subscribe(this.handleIsBrowserLinkConnectedChanged),this.logicalTreeInitializedStatusService.isInitializedChanged.subscribe(this.handleIsInitializedChanged),this.designSurfaceService.isEnabledChanged.subscribe(this.handleDesignSurfaceIsEnabledChanged),this.designSurfaceService.isReadyChanged.subscribe(this.handleDesignSurfaceIsReadyChanged)}detachBrowserLinkEvents(){this.browserLinkConnectionStatusService.isConnectedChanged.unsubscribe(this.handleIsBrowserLinkConnectedChanged),this.logicalTreeInitializedStatusService.isInitializedChanged.unsubscribe(this.handleIsInitializedChanged),this.designSurfaceService.isEnabledChanged.unsubscribe(this.handleDesignSurfaceIsEnabledChanged),this.designSurfaceService.isReadyChanged.unsubscribe(this.handleDesignSurfaceIsReadyChanged)}};function ol(e,t,i){return isNaN(e)||e<=t?t:e>=i?i:e}function nl(e,t,i){return isNaN(e)||e<=t?0:e>=i?1:e/(i-t)}function rl(e,t,i){return isNaN(e)?t:t+e*(i-t)}function sl(e){return e*(Math.PI/180)}function al(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:t+e*(i-t)}function ll(e,t,i){if(e<=0)return t%360;if(e>=1)return i%360;const o=(t-i+360)%360;return o<=(i-t+360)%360?(t-o*e+360)%360:(t+o*e+360)%360}Ja([Aa],il.prototype,"logicalTreeInitializedStatusService",void 0),Ja([Pa],il.prototype,"browserLinkConnectionStatusService",void 0),Ja([Ua],il.prototype,"designSurfaceService",void 0),Ja([qa],il.prototype,"nodesFromAreaUtil",void 0),Ja([Ka],il.prototype,"nodeBoundingClientRectUtil",void 0),Ja([Zr],il.prototype,"isBrowserLinkConnected",void 0),Ja([Zr],il.prototype,"isInitializingLogicalTree",void 0),Ja([Zr],il.prototype,"isDesignSurfaceEnabled",void 0),Ja([Zr],il.prototype,"isDesignSurfaceReady",void 0),il=Ja([Ks({name:kr.livePreviewRootTagName,template:tl,styles:el})],il);Math.PI;function cl(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}class dl{constructor(e,t,i,o){this.r=e,this.g=t,this.b=i,this.a="number"!=typeof o||isNaN(o)?1:o}static fromObject(e){return!e||isNaN(e.r)||isNaN(e.g)||isNaN(e.b)?null:new dl(e.r,e.g,e.b,e.a)}equalValue(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}toStringHexRGB(){return"#"+[this.r,this.g,this.b].map(this.formatHexValue).join("")}toStringHexRGBA(){return this.toStringHexRGB()+this.formatHexValue(this.a)}toStringHexARGB(){return"#"+[this.a,this.r,this.g,this.b].map(this.formatHexValue).join("")}toStringWebRGB(){return`rgb(${Math.round(rl(this.r,0,255))},${Math.round(rl(this.g,0,255))},${Math.round(rl(this.b,0,255))})`}toStringWebRGBA(){return`rgba(${Math.round(rl(this.r,0,255))},${Math.round(rl(this.g,0,255))},${Math.round(rl(this.b,0,255))},${ol(this.a,0,1)})`}roundToPrecision(e){return new dl(cl(this.r,e),cl(this.g,e),cl(this.b,e),cl(this.a,e))}clamp(){return new dl(ol(this.r,0,1),ol(this.g,0,1),ol(this.b,0,1),ol(this.a,0,1))}toObject(){return{r:this.r,g:this.g,b:this.b,a:this.a}}formatHexValue(e){return function(e){const t=Math.round(ol(e,0,255)).toString(16);return 1===t.length?"0"+t:t}(rl(e,0,255))}}class hl{constructor(e,t,i){this.h=e,this.s=t,this.l=i}static fromObject(e){return!e||isNaN(e.h)||isNaN(e.s)||isNaN(e.l)?null:new hl(e.h,e.s,e.l)}equalValue(e){return this.h===e.h&&this.s===e.s&&this.l===e.l}roundToPrecision(e){return new hl(cl(this.h,e),cl(this.s,e),cl(this.l,e))}toObject(){return{h:this.h,s:this.s,l:this.l}}}class ul{constructor(e,t,i){this.h=e,this.s=t,this.v=i}static fromObject(e){return!e||isNaN(e.h)||isNaN(e.s)||isNaN(e.v)?null:new ul(e.h,e.s,e.v)}equalValue(e){return this.h===e.h&&this.s===e.s&&this.v===e.v}roundToPrecision(e){return new ul(cl(this.h,e),cl(this.s,e),cl(this.v,e))}toObject(){return{h:this.h,s:this.s,v:this.v}}}class pl{constructor(e,t,i){this.l=e,this.a=t,this.b=i}static fromObject(e){return!e||isNaN(e.l)||isNaN(e.a)||isNaN(e.b)?null:new pl(e.l,e.a,e.b)}equalValue(e){return this.l===e.l&&this.a===e.a&&this.b===e.b}roundToPrecision(e){return new pl(cl(this.l,e),cl(this.a,e),cl(this.b,e))}toObject(){return{l:this.l,a:this.a,b:this.b}}}pl.epsilon=216/24389,pl.kappa=24389/27;class gl{constructor(e,t,i){this.l=e,this.c=t,this.h=i}static fromObject(e){return!e||isNaN(e.l)||isNaN(e.c)||isNaN(e.h)?null:new gl(e.l,e.c,e.h)}equalValue(e){return this.l===e.l&&this.c===e.c&&this.h===e.h}roundToPrecision(e){return new gl(cl(this.l,e),cl(this.c,e),cl(this.h,e))}toObject(){return{l:this.l,c:this.c,h:this.h}}}class fl{constructor(e,t,i){this.x=e,this.y=t,this.z=i}static fromObject(e){return!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.z)?null:new fl(e.x,e.y,e.z)}equalValue(e){return this.x===e.x&&this.y===e.y&&this.z===e.z}roundToPrecision(e){return new fl(cl(this.x,e),cl(this.y,e),cl(this.z,e))}toObject(){return{x:this.x,y:this.y,z:this.z}}}function vl(e){return.2126*e.r+.7152*e.g+.0722*e.b}function bl(e){function t(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}return vl(new dl(t(e.r),t(e.g),t(e.b),1))}fl.whitePoint=new fl(.95047,1,1.08883);const ml=(e,t)=>(e+.05)/(t+.05);function yl(e,t){const i=bl(e),o=bl(t);return i>o?ml(i,o):ml(o,i)}function wl(e){const t=Math.max(e.r,e.g,e.b),i=Math.min(e.r,e.g,e.b),o=t-i;let n=0;0!==o&&(n=t===e.r?60*((e.g-e.b)/o%6):t===e.g?60*((e.b-e.r)/o+2):60*((e.r-e.g)/o+4)),n<0&&(n+=360);const r=(t+i)/2;let s=0;return 0!==o&&(s=o/(1-Math.abs(2*r-1))),new hl(n,s,r)}function xl(e,t=1){const i=(1-Math.abs(2*e.l-1))*e.s,o=i*(1-Math.abs(e.h/60%2-1)),n=e.l-i/2;let r=0,s=0,a=0;return e.h<60?(r=i,s=o,a=0):e.h<120?(r=o,s=i,a=0):e.h<180?(r=0,s=i,a=o):e.h<240?(r=0,s=o,a=i):e.h<300?(r=o,s=0,a=i):e.h<360&&(r=i,s=0,a=o),new dl(r+n,s+n,a+n,t)}function kl(e){const t=Math.max(e.r,e.g,e.b),i=t-Math.min(e.r,e.g,e.b);let o=0;0!==i&&(o=t===e.r?60*((e.g-e.b)/i%6):t===e.g?60*((e.b-e.r)/i+2):60*((e.r-e.g)/i+4)),o<0&&(o+=360);let n=0;return 0!==t&&(n=i/t),new ul(o,n,t)}function Sl(e){let t=0;(Math.abs(e.b)>.001||Math.abs(e.a)>.001)&&(t=Math.atan2(e.b,e.a)*(180/Math.PI)),t<0&&(t+=360);const i=Math.sqrt(e.a*e.a+e.b*e.b);return new gl(e.l,i,t)}function Cl(e){function t(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}const i=t(e.r),o=t(e.g),n=t(e.b);return new fl(.4124564*i+.3575761*o+.1804375*n,.2126729*i+.7151522*o+.072175*n,.0193339*i+.119192*o+.9503041*n)}function Nl(e,t=1){function i(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}const o=i(3.2404542*e.x-1.5371385*e.y-.4985314*e.z),n=i(-.969266*e.x+1.8760108*e.y+.041556*e.z),r=i(.0556434*e.x-.2040259*e.y+1.0572252*e.z);return new dl(o,n,r,t)}function El(e){return function(e){function t(e){return e>pl.epsilon?Math.pow(e,1/3):(pl.kappa*e+16)/116}const i=t(e.x/fl.whitePoint.x),o=t(e.y/fl.whitePoint.y),n=t(e.z/fl.whitePoint.z);return new pl(116*o-16,500*(i-o),200*(o-n))}(Cl(e))}function $l(e,t=1){return Nl(function(e){const t=(e.l+16)/116,i=t+e.a/500,o=t-e.b/200,n=Math.pow(i,3),r=Math.pow(t,3),s=Math.pow(o,3);let a=0;a=n>pl.epsilon?n:(116*i-16)/pl.kappa;let l=0;l=e.l>pl.epsilon*pl.kappa?r:e.l/pl.kappa;let c=0;return c=s>pl.epsilon?s:(116*o-16)/pl.kappa,a=fl.whitePoint.x*a,l=fl.whitePoint.y*l,c=fl.whitePoint.z*c,new fl(a,l,c)}(e),t)}function Ll(e){return Sl(El(e))}function Tl(e,t=1){return $l(function(e){let t=0,i=0;return 0!==e.h&&(t=Math.cos(sl(e.h))*e.c,i=Math.sin(sl(e.h))*e.c),new pl(e.l,t,i)}(e),t)}function Ol(e,t){const i=e.relativeLuminance>t.relativeLuminance?e:t,o=e.relativeLuminance>t.relativeLuminance?t:e;return(i.relativeLuminance+.05)/(o.relativeLuminance+.05)}const Rl=Object.freeze({create:(e,t,i)=>new _l(e,t,i),from:e=>new _l(e.r,e.g,e.b)});class _l extends dl{constructor(e,t,i){super(e,t,i,1),this.toColorString=this.toStringHexRGB,this.contrast=Ol.bind(null,this),this.createCSS=this.toColorString,this.relativeLuminance=bl(this)}static fromObject(e){return new _l(e.r,e.g,e.b)}}function Dl(e){return Rl.create(e,e,e)}const Il=1,Pl=.23;function Al(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function Bl(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}const Fl=document.createElement("div");class Ml{setProperty(e,t){Mr.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){Mr.queueUpdate((()=>this.target.removeProperty(e)))}}class Vl extends Ml{constructor(){super();const e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}}class jl extends Ml{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:e}=this.style;if(e){const t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}}class zl{constructor(e){this.store=new Map,this.target=null;const t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),Qr.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(null!==this.target)for(const[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),Mr.queueUpdate((()=>{null!==this.target&&this.target.setProperty(e,t)}))}removeProperty(e){this.store.delete(e),Mr.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(e)}))}handleChange(e,t){const{sheet:i}=this.style;if(i){const e=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[e].style}else this.target=null}}Al([Zr],zl.prototype,"target",void 0);class Ul{constructor(e){this.target=e.style}setProperty(e,t){Mr.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){Mr.queueUpdate((()=>this.target.removeProperty(e)))}}class Hl{setProperty(e,t){Hl.properties[e]=t;for(const i of Hl.roots.values())Kl.getOrCreate(Hl.normalizeRoot(i)).setProperty(e,t)}removeProperty(e){delete Hl.properties[e];for(const t of Hl.roots.values())Kl.getOrCreate(Hl.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){const{roots:t}=Hl;if(!t.has(e)){t.add(e);const i=Kl.getOrCreate(this.normalizeRoot(e));for(const e in Hl.properties)i.setProperty(e,Hl.properties[e])}}static unregisterRoot(e){const{roots:t}=Hl;if(t.has(e)){t.delete(e);const i=Kl.getOrCreate(Hl.normalizeRoot(e));for(const e in Hl.properties)i.removeProperty(e)}}static normalizeRoot(e){return e===Fl?document:e}}Hl.roots=new Set,Hl.properties={};const Wl=new WeakMap,ql=Mr.supportsAdoptedStyleSheets?class extends Ml{constructor(e){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(Vr.create([t]))}}:zl,Kl=Object.freeze({getOrCreate(e){if(Wl.has(e))return Wl.get(e);let t;return e===Fl?t=new Hl:e instanceof Document?t=Mr.supportsAdoptedStyleSheets?new Vl:new jl:t=e instanceof qs?new ql(e):new Ul(e),Wl.set(e,t),t}});class Gl extends Lr{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,null!==e.cssCustomPropertyName&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=Gl.uniqueId(),Gl.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new Gl({name:"string"==typeof e?e:e.name,cssCustomPropertyName:"string"==typeof e?e:void 0===e.cssCustomPropertyName?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return"string"==typeof e.cssCustomProperty}static isDerivedDesignTokenValue(e){return"function"==typeof e}static getTokenById(e){return Gl.tokensById.get(e)}getOrCreateSubscriberSet(e=this){return this.subscribers.get(e)||this.subscribers.set(e,new Set)&&this.subscribers.get(e)}createCSS(){return this.cssVar||""}getValueFor(e){const t=Jl.getOrCreate(e).get(this);if(void 0!==t)return t;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${e} or an ancestor of ${e}.`)}setValueFor(e,t){return this._appliedTo.add(e),t instanceof Gl&&(t=this.alias(t)),Jl.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),Jl.existsFor(e)&&Jl.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(Fl,e),this}subscribe(e,t){const i=this.getOrCreateSubscriberSet(t);t&&!Jl.existsFor(t)&&Jl.getOrCreate(t),i.has(e)||i.add(e)}unsubscribe(e,t){const i=this.subscribers.get(t||this);i&&i.has(e)&&i.delete(e)}notify(e){const t=Object.freeze({token:this,target:e});this.subscribers.has(this)&&this.subscribers.get(this).forEach((e=>e.handleChange(t))),this.subscribers.has(e)&&this.subscribers.get(e).forEach((e=>e.handleChange(t)))}alias(e){return t=>e.getValueFor(t)}}Gl.uniqueId=(()=>{let e=0;return()=>(e++,e.toString(16))})(),Gl.tokensById=new Map;class Xl{constructor(e,t,i){this.source=e,this.token=t,this.node=i,this.dependencies=new Set,this.observer=Qr.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){this.node.store.set(this.token,this.observer.observe(this.node.target,is))}}class Yl{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),Qr.getNotifier(this).notify(e.id))}get(e){return Qr.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e)}all(){return this.values.entries()}}const Ql=new WeakMap,Zl=new WeakMap;class Jl{constructor(e){this.target=e,this.store=new Yl,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,t)=>{const i=Gl.getTokenById(t);if(i&&(i.notify(this.target),Gl.isCSSDesignToken(i))){const t=this.parent,o=this.isReflecting(i);if(t){const n=t.get(i),r=e.get(i);n===r||o?n===r&&o&&this.stopReflectToCSS(i):this.reflectToCSS(i)}else o||this.reflectToCSS(i)}}},Ql.set(e,this),Qr.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof qs?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return Ql.get(e)||new Jl(e)}static existsFor(e){return Ql.has(e)}static findParent(e){if(Fl!==e.target){let t=Bl(e.target);for(;null!==t;){if(Ql.has(t))return Ql.get(t);t=Bl(t)}return Jl.getOrCreate(Fl)}return null}static findClosestAssignedNode(e,t){let i=t;do{if(i.has(e))return i;i=i.parent?i.parent:i.target!==Fl?Jl.getOrCreate(Fl):null}while(null!==i);return null}get parent(){return Zl.get(this)||null}has(e){return this.assignedValues.has(e)}get(e){const t=this.store.get(e);if(void 0!==t)return t;const i=this.getRaw(e);return void 0!==i?(this.hydrate(e,i),this.get(e)):void 0}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):null===(t=Jl.findClosestAssignedNode(e,this))||void 0===t?void 0:t.getRaw(e)}set(e,t){Gl.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),Gl.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);const t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){const e=Jl.findParent(this);e&&e.appendChild(this);for(const e of this.assignedValues.keys())e.notify(this.target)}unbind(){if(this.parent){Zl.get(this).removeChild(this)}}appendChild(e){e.parent&&Zl.get(e).removeChild(e);const t=this.children.filter((t=>e.contains(t)));Zl.set(e,this),this.children.push(e),t.forEach((t=>e.appendChild(t))),Qr.getNotifier(this.store).subscribe(e);for(const[t,i]of this.store.all())e.hydrate(t,this.bindingObservers.has(t)?this.getRaw(t):i)}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),Qr.getNotifier(this.store).unsubscribe(e),e.parent===this&&Zl.delete(e)}contains(e){return function(e,t){let i=t;for(;null!==i;){if(i===e)return!0;i=Bl(i)}return!1}(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),Jl.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),Jl.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){const i=Gl.getTokenById(t);i&&this.hydrate(i,this.getRaw(i))}hydrate(e,t){if(!this.has(e)){const i=this.bindingObservers.get(e);Gl.isDerivedDesignTokenValue(t)?i?i.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(i&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){const i=new Xl(t,e,this);return this.bindingObservers.set(e,i),i}tearDownBindingObserver(e){return!!this.bindingObservers.has(e)&&(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0)}}Jl.cssCustomPropertyReflector=new class{startReflection(e,t){e.subscribe(this,t),this.handleChange({token:e,target:t})}stopReflection(e,t){e.unsubscribe(this,t),this.remove(e,t)}handleChange(e){const{token:t,target:i}=e;this.add(t,i)}add(e,t){Kl.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(Jl.getOrCreate(t).get(e)))}remove(e,t){Kl.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&"function"==typeof e.createCSS?e.createCSS():e}},Al([Zr],Jl.prototype,"children",void 0);const ec=Object.freeze({create:function(e){return Gl.from(e)},notifyConnection:e=>!(!e.isConnected||!Jl.existsFor(e))&&(Jl.getOrCreate(e).bind(),!0),notifyDisconnection:e=>!(e.isConnected||!Jl.existsFor(e))&&(Jl.getOrCreate(e).unbind(),!0),registerRoot(e=Fl){Hl.registerRoot(e)},unregisterRoot(e=Fl){Hl.unregisterRoot(e)}});var tc,ic,oc;function nc(e,t,i=18){const o=Ll(e);let n=o.c+t*i;return n<0&&(n=0),Tl(new gl(o.l,n,o.h))}function rc(e,t){return e*t}function sc(e,t){return new dl(rc(e.r,t.r),rc(e.g,t.g),rc(e.b,t.b),1)}function ac(e,t){return ol(e<.5?2*t*e:1-2*(1-t)*(1-e),0,1)}function lc(e,t){return new dl(ac(e.r,t.r),ac(e.g,t.g),ac(e.b,t.b),1)}function cc(e,t,i,o){if(isNaN(e)||e<=0)return i;if(e>=1)return o;switch(t){case oc.HSL:return xl(function(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:new hl(ll(e,t.h,i.h),al(e,t.s,i.s),al(e,t.l,i.l))}(e,wl(i),wl(o)));case oc.HSV:return function(e,t=1){const i=e.s*e.v,o=i*(1-Math.abs(e.h/60%2-1)),n=e.v-i;let r=0,s=0,a=0;return e.h<60?(r=i,s=o,a=0):e.h<120?(r=o,s=i,a=0):e.h<180?(r=0,s=i,a=o):e.h<240?(r=0,s=o,a=i):e.h<300?(r=o,s=0,a=i):e.h<360&&(r=i,s=0,a=o),new dl(r+n,s+n,a+n,t)}(function(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:new ul(ll(e,t.h,i.h),al(e,t.s,i.s),al(e,t.v,i.v))}(e,kl(i),kl(o)));case oc.XYZ:return Nl(function(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:new fl(al(e,t.x,i.x),al(e,t.y,i.y),al(e,t.z,i.z))}(e,Cl(i),Cl(o)));case oc.LAB:return $l(function(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:new pl(al(e,t.l,i.l),al(e,t.a,i.a),al(e,t.b,i.b))}(e,El(i),El(o)));case oc.LCH:return Tl(function(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:new gl(al(e,t.l,i.l),al(e,t.c,i.c),ll(e,t.h,i.h))}(e,Ll(i),Ll(o)));default:return function(e,t,i){return isNaN(e)||e<=0?t:e>=1?i:new dl(al(e,t.r,i.r),al(e,t.g,i.g),al(e,t.b,i.b),al(e,t.a,i.a))}(e,i,o)}}!function(e){e["ltr"]="ltr",e["rtl"]="rtl"}(tc||(tc={})),function(e){e[e["Burn"]=0]="Burn",e[e["Color"]=1]="Color",e[e["Darken"]=2]="Darken",e[e["Dodge"]=3]="Dodge",e[e["Lighten"]=4]="Lighten",e[e["Multiply"]=5]="Multiply",e[e["Overlay"]=6]="Overlay",e[e["Screen"]=7]="Screen"}(ic||(ic={})),function(e){e[e["RGB"]=0]="RGB",e[e["HSL"]=1]="HSL",e[e["HSV"]=2]="HSV",e[e["XYZ"]=3]="XYZ",e[e["LAB"]=4]="LAB",e[e["LCH"]=5]="LCH"}(oc||(oc={}));class dc{constructor(e){if(null==e||0===e.length)throw new Error("The stops argument must be non-empty");this.stops=this.sortColorScaleStops(e)}static createBalancedColorScale(e){if(null==e||0===e.length)throw new Error("The colors argument must be non-empty");const t=new Array(e.length);for(let i=0;i=1)return this.stops[this.stops.length-1].color;let i=0;for(let t=0;t=this.stops.length&&(o=this.stops.length-1);return cc((e-this.stops[i].position)*(1/(this.stops[o].position-this.stops[i].position)),t,this.stops[i].color,this.stops[o].color)}trim(e,t,i=oc.RGB){if(e<0||t>1||t=e&&this.stops[i].position<=t&&o.push(this.stops[i]);if(0===o.length)return new dc([{color:this.getColor(e),position:e},{color:this.getColor(t),position:t}]);o[0].position!==e&&o.unshift({color:this.getColor(e),position:e}),o[o.length-1].position!==t&&o.push({color:this.getColor(t),position:t});const n=t-e,r=new Array(o.length);for(let t=0;t=1&&(e=1);const s=this.getColor(e,o),a=i?0:1;if(yl(s,this.getColor(a,o))<=t)return a;let l=i?0:e,c=i?e:0,d=a,h=0;for(;h<=r;){d=Math.abs(c-l)/2+l;const e=yl(s,this.getColor(d,o));if(Math.abs(e-t)<=n)return d;e>t?i?l=d:c=d:i?c=d:l=d,h++}return d}clone(){const e=new Array(this.stops.length);for(let t=0;t{const i=e.position,o=t.position;return io?1:0}))}}const hc=/^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;function uc(e){const t=hc.exec(e);if(null===t)return null;let i=t[1];if(3===i.length){const e=i.charAt(0),t=i.charAt(1),o=i.charAt(2);i=e.concat(e,t,t,o,o)}const o=parseInt(i,16);return isNaN(o)?null:new dl(nl((16711680&o)>>>16,0,255),nl((65280&o)>>>8,0,255),nl(255&o,0,255),1)}class pc{constructor(e){this.config=Object.assign({},pc.defaultPaletteConfig,e),this.palette=[],this.updatePaletteColors()}updatePaletteGenerationValues(e){let t=!1;for(const i in e)this.config[i]&&(this.config[i].equalValue?this.config[i].equalValue(e[i])||(this.config[i]=e[i],t=!0):e[i]!==this.config[i]&&(this.config[i]=e[i],t=!0));return t&&this.updatePaletteColors(),t}updatePaletteColors(){const e=this.generatePaletteColorScale();for(let t=0;t=this.config.saturationAdjustmentCutoff&&(i=nc(i,this.config.saturationLight),o=nc(o,this.config.saturationDark)),0!==this.config.multiplyLight){const e=sc(this.config.baseColor,i);i=cc(this.config.multiplyLight,this.config.interpolationMode,i,e)}if(0!==this.config.multiplyDark){const e=sc(this.config.baseColor,o);o=cc(this.config.multiplyDark,this.config.interpolationMode,o,e)}if(0!==this.config.overlayLight){const e=lc(this.config.baseColor,i);i=cc(this.config.overlayLight,this.config.interpolationMode,i,e)}if(0!==this.config.overlayDark){const e=lc(this.config.baseColor,o);o=cc(this.config.overlayDark,this.config.interpolationMode,o,e)}return this.config.baseScalePosition?this.config.baseScalePosition<=0?new dc([{position:0,color:this.config.baseColor},{position:1,color:o.clamp()}]):this.config.baseScalePosition>=1?new dc([{position:0,color:i.clamp()},{position:1,color:this.config.baseColor}]):new dc([{position:0,color:i.clamp()},{position:this.config.baseScalePosition,color:this.config.baseColor},{position:1,color:o.clamp()}]):new dc([{position:0,color:i.clamp()},{position:.5,color:this.config.baseColor},{position:1,color:o.clamp()}])}}pc.defaultPaletteConfig={baseColor:uc("#808080"),steps:11,interpolationMode:oc.RGB,scaleColorLight:new dl(1,1,1,1),scaleColorDark:new dl(0,0,0,1),clipLight:.185,clipDark:.16,saturationAdjustmentCutoff:.05,saturationLight:.35,saturationDark:1.25,overlayLight:0,overlayDark:.25,multiplyLight:0,multiplyDark:0,baseScalePosition:.5},pc.greyscalePaletteConfig={baseColor:uc("#808080"),steps:11,interpolationMode:oc.RGB,scaleColorLight:new dl(1,1,1,1),scaleColorDark:new dl(0,0,0,1),clipLight:0,clipDark:0,saturationAdjustmentCutoff:0,saturationLight:0,saturationDark:0,overlayLight:0,overlayDark:0,multiplyLight:0,multiplyDark:0,baseScalePosition:.5};pc.defaultPaletteConfig.scaleColorLight,pc.defaultPaletteConfig.scaleColorDark;class gc{constructor(e){this.palette=[],this.config=Object.assign({},gc.defaultPaletteConfig,e),this.regenPalettes()}regenPalettes(){let e=this.config.steps;(isNaN(e)||e<3)&&(e=3);const t=.14,i=new dl(t,t,t,1),o=new pc(Object.assign(Object.assign({},pc.greyscalePaletteConfig),{baseColor:i,baseScalePosition:100*(1-t)/94,steps:e})).palette,n=(vl(this.config.baseColor)+wl(this.config.baseColor).l)/2,r=this.matchRelativeLuminanceIndex(n,o)/(e-1),s=this.matchRelativeLuminanceIndex(t,o)/(e-1),a=wl(this.config.baseColor),l=xl(hl.fromObject({h:a.h,s:a.s,l:t})),c=xl(hl.fromObject({h:a.h,s:a.s,l:.06})),d=new Array(5);d[0]={position:0,color:new dl(1,1,1,1)},d[1]={position:r,color:this.config.baseColor},d[2]={position:s,color:l},d[3]={position:.99,color:c},d[4]={position:1,color:new dl(0,0,0,1)};const h=new dc(d);this.palette=new Array(e);for(let t=0;t"",contrast:()=>0,relativeLuminance:0};for(const i in t)if(typeof t[i]!=typeof e[i])return!1;return!0}(e)?yc.from(e):yc.from(Rl.create(e.r,e.g,e.b))}});class yc{constructor(e,t){this.closestIndexCache=new Map,this.source=e,this.swatches=t,this.reversedSwatches=Object.freeze([...this.swatches].reverse()),this.lastIndex=this.swatches.length-1}colorContrast(e,t,i,o){void 0===i&&(i=this.closestIndexOf(e));let n=this.swatches;const r=this.lastIndex;let s=i;void 0===o&&(o=bc(e));return-1===o&&(n=this.reversedSwatches,s=r-s),fc(n,(i=>Ol(e,i)>=t),s,r)}get(e){return this.swatches[e]||this.swatches[ol(e,0,this.lastIndex)]}closestIndexOf(e){if(this.closestIndexCache.has(e.relativeLuminance))return this.closestIndexCache.get(e.relativeLuminance);let t=this.swatches.indexOf(e);if(-1!==t)return this.closestIndexCache.set(e.relativeLuminance,t),t;const i=this.swatches.reduce(((t,i)=>Math.abs(i.relativeLuminance-e.relativeLuminance){const t=uc(e.toStringHexRGB());return Rl.create(t.r,t.g,t.b)}))))}}const wc=Rl.create(1,1,1),xc=Rl.create(0,0,0),kc=Rl.from(uc("#808080")),Sc=Rl.from(uc("#DA1A5F"));function Cc(e,t,i,o,n,r){return Math.max(e.closestIndexOf(Dl(t))+i,o,n,r)}const{create:Nc}=ec;function Ec(e){return ec.create({name:e,cssCustomPropertyName:null})}const $c=Nc("body-font").withDefault('aktiv-grotesk, "Segoe UI", Arial, Helvetica, sans-serif'),Lc=Nc("base-height-multiplier").withDefault(10),Tc=Nc("base-horizontal-spacing-multiplier").withDefault(3),Oc=Nc("base-layer-luminance").withDefault(Pl),Rc=Nc("control-corner-radius").withDefault(4),_c=Nc("density").withDefault(0),Dc=Nc("design-unit").withDefault(4),Ic=Nc("direction").withDefault(tc.ltr),Pc=Nc("disabled-opacity").withDefault(.3),Ac=Nc("stroke-width").withDefault(1),Bc=Nc("focus-stroke-width").withDefault(2),Fc=Nc("type-ramp-base-font-size").withDefault("14px"),Mc=Nc("type-ramp-base-line-height").withDefault("20px"),Vc=Nc("type-ramp-minus-1-font-size").withDefault("12px"),jc=Nc("type-ramp-minus-1-line-height").withDefault("16px"),zc=Nc("type-ramp-minus-2-font-size").withDefault("10px"),Uc=Nc("type-ramp-minus-2-line-height").withDefault("16px"),Hc=Nc("type-ramp-plus-1-font-size").withDefault("16px"),Wc=Nc("type-ramp-plus-1-line-height").withDefault("24px"),qc=Nc("type-ramp-plus-2-font-size").withDefault("20px"),Kc=Nc("type-ramp-plus-2-line-height").withDefault("28px"),Gc=Nc("type-ramp-plus-3-font-size").withDefault("28px"),Xc=Nc("type-ramp-plus-3-line-height").withDefault("36px"),Yc=Nc("type-ramp-plus-4-font-size").withDefault("34px"),Qc=Nc("type-ramp-plus-4-line-height").withDefault("44px"),Zc=Nc("type-ramp-plus-5-font-size").withDefault("46px"),Jc=Nc("type-ramp-plus-5-line-height").withDefault("56px"),ed=Nc("type-ramp-plus-6-font-size").withDefault("60px"),td=Nc("type-ramp-plus-6-line-height").withDefault("72px"),id=Ec("accent-fill-rest-delta").withDefault(0),od=Ec("accent-fill-hover-delta").withDefault(4),nd=Ec("accent-fill-active-delta").withDefault(-5),rd=Ec("accent-fill-focus-delta").withDefault(0),sd=Ec("accent-foreground-rest-delta").withDefault(0),ad=Ec("accent-foreground-hover-delta").withDefault(6),ld=Ec("accent-foreground-active-delta").withDefault(-4),cd=Ec("accent-foreground-focus-delta").withDefault(0),dd=Ec("neutral-fill-rest-delta").withDefault(7),hd=Ec("neutral-fill-hover-delta").withDefault(10),ud=Ec("neutral-fill-active-delta").withDefault(5),pd=Ec("neutral-fill-focus-delta").withDefault(0),gd=Ec("neutral-fill-input-rest-delta").withDefault(0),fd=Ec("neutral-fill-input-hover-delta").withDefault(0),vd=Ec("neutral-fill-input-active-delta").withDefault(0),bd=Ec("neutral-fill-input-focus-delta").withDefault(0),md=Ec("neutral-fill-stealth-rest-delta").withDefault(0),yd=Ec("neutral-fill-stealth-hover-delta").withDefault(5),wd=Ec("neutral-fill-stealth-active-delta").withDefault(3),xd=Ec("neutral-fill-stealth-focus-delta").withDefault(0),kd=Ec("neutral-fill-strong-rest-delta").withDefault(0),Sd=Ec("neutral-fill-strong-hover-delta").withDefault(8),Cd=Ec("neutral-fill-strong-active-delta").withDefault(-5),Nd=Ec("neutral-fill-strong-focus-delta").withDefault(0),Ed=Ec("neutral-fill-layer-rest-delta").withDefault(3),$d=Ec("neutral-stroke-rest-delta").withDefault(25),Ld=Ec("neutral-stroke-hover-delta").withDefault(40),Td=Ec("neutral-stroke-active-delta").withDefault(16),Od=Ec("neutral-stroke-focus-delta").withDefault(25),Rd=Ec("neutral-stroke-divider-rest-delta").withDefault(8),_d=Nc("neutral-color").withDefault(kc),Dd=Ec("neutral-palette").withDefault((e=>mc.from(_d.getValueFor(e)))),Id=Nc("accent-color").withDefault(Sc),Pd=Ec("accent-palette").withDefault((e=>mc.from(Id.getValueFor(e)))),Ad=Ec("neutral-layer-card-container-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=Oc.getValueFor(e),o=Ed.getValueFor(e),t.get(t.closestIndexOf(Dl(i))+o);var t,i,o}}),Bd=(Nc("neutral-layer-card-container").withDefault((e=>Ad.getValueFor(e).evaluate(e))),Ec("neutral-layer-floating-recipe").withDefault({evaluate:e=>function(e,t,i){const o=e.closestIndexOf(Dl(t))-i;return e.get(o-i)}(Dd.getValueFor(e),Oc.getValueFor(e),Ed.getValueFor(e))})),Fd=Nc("neutral-layer-floating").withDefault((e=>Bd.getValueFor(e).evaluate(e))),Md=Ec("neutral-layer-1-recipe").withDefault({evaluate:e=>function(e,t){return e.get(e.closestIndexOf(Dl(t)))}(Dd.getValueFor(e),Oc.getValueFor(e))}),Vd=Nc("neutral-layer-1").withDefault((e=>Md.getValueFor(e).evaluate(e))),jd=Ec("neutral-layer-2-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=Oc.getValueFor(e),o=Ed.getValueFor(e),n=dd.getValueFor(e),r=hd.getValueFor(e),s=ud.getValueFor(e),t.get(Cc(t,i,o,n,r,s));var t,i,o,n,r,s}}),zd=(Nc("neutral-layer-2").withDefault((e=>jd.getValueFor(e).evaluate(e))),Ec("neutral-layer-3-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=Oc.getValueFor(e),o=Ed.getValueFor(e),n=dd.getValueFor(e),r=hd.getValueFor(e),s=ud.getValueFor(e),t.get(Cc(t,i,o,n,r,s)+o);var t,i,o,n,r,s}})),Ud=Nc("neutral-layer-3").withDefault((e=>zd.getValueFor(e).evaluate(e))),Hd=Ec("neutral-layer-4-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=Oc.getValueFor(e),o=Ed.getValueFor(e),n=dd.getValueFor(e),r=hd.getValueFor(e),s=ud.getValueFor(e),t.get(Cc(t,i,o,n,r,s)+2*o);var t,i,o,n,r,s}}),Wd=Nc("neutral-layer-4").withDefault((e=>Hd.getValueFor(e).evaluate(e))),qd=Nc("fill-color").withDefault((e=>Vd.getValueFor(e)));var Kd;!function(e){e[e["normal"]=4.5]="normal",e[e["large"]=7]="large"}(Kd||(Kd={}));const Gd=Nc({name:"accent-fill-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,i,o,n,r,s,a,l){const c=e.source,d=t.closestIndexOf(i)>=Math.max(s,a,l)?-1:1,h=e.closestIndexOf(c),u=h+-1*d*o,p=u+d*n,g=u+d*r;return{rest:e.get(u),hover:e.get(h),active:e.get(p),focus:e.get(g)}}(Pd.getValueFor(e),Dd.getValueFor(e),t||qd.getValueFor(e),od.getValueFor(e),nd.getValueFor(e),rd.getValueFor(e),dd.getValueFor(e),hd.getValueFor(e),ud.getValueFor(e))}),Xd=Nc("accent-fill-rest").withDefault((e=>Gd.getValueFor(e).evaluate(e).rest)),Yd=Nc("accent-fill-hover").withDefault((e=>Gd.getValueFor(e).evaluate(e).hover)),Qd=Nc("accent-fill-active").withDefault((e=>Gd.getValueFor(e).evaluate(e).active)),Zd=Nc("accent-fill-focus").withDefault((e=>Gd.getValueFor(e).evaluate(e).focus)),Jd=e=>(t,i)=>function(e,t){return e.contrast(wc)>=t?wc:xc}(i||Xd.getValueFor(t),e),eh=Ec("foreground-on-accent-recipe").withDefault({evaluate:(e,t)=>Jd(Kd.normal)(e,t)}),th=Nc("foreground-on-accent-rest").withDefault((e=>eh.getValueFor(e).evaluate(e,Xd.getValueFor(e)))),ih=Nc("foreground-on-accent-hover").withDefault((e=>eh.getValueFor(e).evaluate(e,Yd.getValueFor(e)))),oh=Nc("foreground-on-accent-active").withDefault((e=>eh.getValueFor(e).evaluate(e,Qd.getValueFor(e)))),nh=Nc("foreground-on-accent-focus").withDefault((e=>eh.getValueFor(e).evaluate(e,Zd.getValueFor(e)))),rh=Ec("foreground-on-accent-large-recipe").withDefault({evaluate:(e,t)=>Jd(Kd.large)(e,t)}),sh=(Nc("foreground-on-accent-rest-large").withDefault((e=>rh.getValueFor(e).evaluate(e,Xd.getValueFor(e)))),Nc("foreground-on-accent-hover-large").withDefault((e=>rh.getValueFor(e).evaluate(e,Yd.getValueFor(e)))),Nc("foreground-on-accent-active-large").withDefault((e=>rh.getValueFor(e).evaluate(e,Qd.getValueFor(e)))),Nc("foreground-on-accent-focus-large").withDefault((e=>rh.getValueFor(e).evaluate(e,Zd.getValueFor(e)))),e=>(t,i)=>function(e,t,i,o,n,r,s){const a=e.source,l=e.closestIndexOf(a),c=bc(t),d=l+(1===c?Math.min(o,n):Math.max(c*o,c*n)),h=e.colorContrast(t,i,d,c),u=e.closestIndexOf(h),p=u+c*Math.abs(o-n);let g,f;return(1===c?oc*n)?(g=u,f=p):(g=p,f=u),{rest:e.get(g),hover:e.get(f),active:e.get(g+c*r),focus:e.get(g+c*s)}}(Pd.getValueFor(t),i||qd.getValueFor(t),e,sd.getValueFor(t),ad.getValueFor(t),ld.getValueFor(t),cd.getValueFor(t))),ah=Nc({name:"accent-foreground-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>sh(Kd.normal)(e,t)}),lh=Nc("accent-foreground-rest").withDefault((e=>ah.getValueFor(e).evaluate(e).rest)),ch=Nc("accent-foreground-hover").withDefault((e=>ah.getValueFor(e).evaluate(e).hover)),dh=Nc("accent-foreground-active").withDefault((e=>ah.getValueFor(e).evaluate(e).active)),hh=(Nc("accent-foreground-focus").withDefault((e=>ah.getValueFor(e).evaluate(e).focus)),Nc({name:"neutral-fill-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,i,o,n,r){const s=e.closestIndexOf(t),a=s>=Math.max(i,o,n,r)?-1:1;return{rest:e.get(s+a*i),hover:e.get(s+a*o),active:e.get(s+a*n),focus:e.get(s+a*r)}}(Dd.getValueFor(e),t||qd.getValueFor(e),dd.getValueFor(e),hd.getValueFor(e),ud.getValueFor(e),pd.getValueFor(e))})),uh=Nc("neutral-fill-rest").withDefault((e=>hh.getValueFor(e).evaluate(e).rest)),ph=Nc("neutral-fill-hover").withDefault((e=>hh.getValueFor(e).evaluate(e).hover)),gh=Nc("neutral-fill-active").withDefault((e=>hh.getValueFor(e).evaluate(e).active)),fh=(Nc("neutral-fill-focus").withDefault((e=>hh.getValueFor(e).evaluate(e).focus)),Nc({name:"neutral-fill-input-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,i,o,n,r){const s=bc(t),a=e.closestIndexOf(t);return{rest:e.get(a-s*i),hover:e.get(a-s*o),active:e.get(a-s*n),focus:e.get(a-s*r)}}(Dd.getValueFor(e),t||qd.getValueFor(e),gd.getValueFor(e),fd.getValueFor(e),vd.getValueFor(e),bd.getValueFor(e))})),vh=Nc("neutral-fill-input-rest").withDefault((e=>fh.getValueFor(e).evaluate(e).rest)),bh=Nc("neutral-fill-input-hover").withDefault((e=>fh.getValueFor(e).evaluate(e).hover)),mh=Nc("neutral-fill-input-active").withDefault((e=>fh.getValueFor(e).evaluate(e).active)),yh=(Nc("neutral-fill-input-focus").withDefault((e=>fh.getValueFor(e).evaluate(e).focus)),Nc({name:"neutral-fill-stealth-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,i,o,n,r,s,a,l,c){const d=Math.max(i,o,n,r,s,a,l,c),h=e.closestIndexOf(t),u=h>=d?-1:1;return{rest:e.get(h+u*i),hover:e.get(h+u*o),active:e.get(h+u*n),focus:e.get(h+u*r)}}(Dd.getValueFor(e),t||qd.getValueFor(e),md.getValueFor(e),yd.getValueFor(e),wd.getValueFor(e),xd.getValueFor(e),dd.getValueFor(e),hd.getValueFor(e),ud.getValueFor(e),pd.getValueFor(e))})),wh=Nc("neutral-fill-stealth-rest").withDefault((e=>yh.getValueFor(e).evaluate(e).rest)),xh=Nc("neutral-fill-stealth-hover").withDefault((e=>yh.getValueFor(e).evaluate(e).hover)),kh=Nc("neutral-fill-stealth-active").withDefault((e=>yh.getValueFor(e).evaluate(e).active)),Sh=Nc("neutral-fill-stealth-focus").withDefault((e=>yh.getValueFor(e).evaluate(e).focus)),Ch=Nc({name:"neutral-fill-strong-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,i,o,n,r){const s=bc(t),a=e.closestIndexOf(e.colorContrast(t,4.5)),l=a+s*Math.abs(i-o);let c,d;return(1===s?is*o)?(c=a,d=l):(c=l,d=a),{rest:e.get(c),hover:e.get(d),active:e.get(c+s*n),focus:e.get(c+s*r)}}(Dd.getValueFor(e),t||qd.getValueFor(e),kd.getValueFor(e),Sd.getValueFor(e),Cd.getValueFor(e),Nd.getValueFor(e))}),Nh=(Nc("neutral-fill-strong-rest").withDefault((e=>Ch.getValueFor(e).evaluate(e).rest)),Nc("neutral-fill-strong-hover").withDefault((e=>Ch.getValueFor(e).evaluate(e).hover)),Nc("neutral-fill-strong-active").withDefault((e=>Ch.getValueFor(e).evaluate(e).active)),Nc("neutral-fill-strong-focus").withDefault((e=>Ch.getValueFor(e).evaluate(e).focus)),Ec("neutral-fill-layer-recipe").withDefault({evaluate:(e,t)=>function(e,t,i){const o=e.closestIndexOf(t);return e.get(o-(oNh.getValueFor(e).evaluate(e))),Ec("focus-stroke-outer-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=qd.getValueFor(e),t.colorContrast(i,3.5);var t,i}})),$h=Nc("focus-stroke-outer").withDefault((e=>Eh.getValueFor(e).evaluate(e))),Lh=Ec("focus-stroke-inner-recipe").withDefault({evaluate:e=>{return t=Pd.getValueFor(e),i=qd.getValueFor(e),o=$h.getValueFor(e),t.colorContrast(o,3.5,t.closestIndexOf(t.source),-1*bc(i));var t,i,o}}),Th=Nc("focus-stroke-inner").withDefault((e=>Lh.getValueFor(e).evaluate(e))),Oh=Ec("neutral-foreground-hint-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=qd.getValueFor(e),t.colorContrast(i,4.5);var t,i}}),Rh=Nc("neutral-foreground-hint").withDefault((e=>Oh.getValueFor(e).evaluate(e))),_h=Ec("neutral-foreground-recipe").withDefault({evaluate:e=>{return t=Dd.getValueFor(e),i=qd.getValueFor(e),t.colorContrast(i,14);var t,i}}),Dh=Nc("neutral-foreground-rest").withDefault((e=>_h.getValueFor(e).evaluate(e))),Ih=Nc({name:"neutral-stroke-recipe",cssCustomPropertyName:null}).withDefault({evaluate:e=>function(e,t,i,o,n,r){const s=e.closestIndexOf(t),a=bc(t),l=s+a*i,c=l+a*(o-i),d=l+a*(n-i),h=l+a*(r-i);return{rest:e.get(l),hover:e.get(c),active:e.get(d),focus:e.get(h)}}(Dd.getValueFor(e),qd.getValueFor(e),$d.getValueFor(e),Ld.getValueFor(e),Td.getValueFor(e),Od.getValueFor(e))}),Ph=Nc("neutral-stroke-rest").withDefault((e=>Ih.getValueFor(e).evaluate(e).rest)),Ah=Nc("neutral-stroke-hover").withDefault((e=>Ih.getValueFor(e).evaluate(e).hover)),Bh=Nc("neutral-stroke-active").withDefault((e=>Ih.getValueFor(e).evaluate(e).active)),Fh=(Nc("neutral-stroke-focus").withDefault((e=>Ih.getValueFor(e).evaluate(e).focus)),Ec("neutral-stroke-divider-recipe").withDefault({evaluate:(e,t)=>function(e,t,i){return e.get(e.closestIndexOf(t)+bc(t)*i)}(Dd.getValueFor(e),t||qd.getValueFor(e),Rd.getValueFor(e))})),Mh=Nc("neutral-stroke-divider-rest").withDefault((e=>Fh.getValueFor(e).evaluate(e))),Vh=ec.create({name:"height-number",cssCustomPropertyName:null}).withDefault((e=>(Lc.getValueFor(e)+_c.getValueFor(e))*Dc.getValueFor(e)));var jh=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const zh={name:"",neutralBaseColor:"",accentColor:"#007ACC",baseLayerLuminance:Pl,backgroundToken:null,useThemeColors:!0,selectionColor:"",textHighlightColor:"",tagTextColor:"",linkColor:""};function Uh(){return Gh}class Hh{}jh([Zr],Hh.prototype,"name",void 0),jh([Zr],Hh.prototype,"neutralBaseColor",void 0),jh([Zr],Hh.prototype,"accentColor",void 0),jh([Zr],Hh.prototype,"baseLayerLuminance",void 0),jh([Zr],Hh.prototype,"backgroundToken",void 0),jh([Zr],Hh.prototype,"useThemeColors",void 0),jh([Zr],Hh.prototype,"selectionColor",void 0),jh([Zr],Hh.prototype,"textHighlightColor",void 0),jh([Zr],Hh.prototype,"tagTextColor",void 0),jh([Zr],Hh.prototype,"linkColor",void 0);const Wh={...zh,name:"Light",neutralBaseColor:"#F5F5F5",baseLayerLuminance:Il,backgroundToken:Ud,linkColor:"#006CBE"},qh={...zh,name:"Dark",neutralBaseColor:"#252526",baseLayerLuminance:Pl,backgroundToken:Wd,linkColor:"#83BEEB"},Kh={...zh,name:"Blue",neutralBaseColor:"#CCD5F0",accentColor:"#F5CC84",baseLayerLuminance:Il,backgroundToken:Wd,linkColor:"#006CBE"},Gh=new Hh;function Xh(e){"Light"===e.themeName?Object.assign(Gh,Wh):"Blue"===e.themeName?Object.assign(Gh,Kh):Object.assign(Gh,qh),Object.assign(Gh,e)}function Yh(e){return`${e.toLowerCase()}:presentation`}Xh({themeName:"Dark"});const Qh=new Map,Zh=Object.freeze({define(e,t,i){const o=Yh(e);void 0===Qh.get(o)?Qh.set(o,t):Qh.set(o,!1),i.register(ka.instance(o,t))},forTag(e,t){const i=Yh(e),o=Qh.get(i);if(!1===o){return ia.findResponsibleContainer(t).get(i)}return o||null}});class Jh{constructor(e,t){this.template=e||null,this.styles=void 0===t?null:Array.isArray(t)?Vr.create(t):t instanceof Vr?t:Vr.create([t])}applyTo(e){const t=e.$fastController;null===t.template&&(t.template=this.template),null===t.styles&&(t.styles=this.styles)}}class eu extends qs{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Zh.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new iu(this===eu?class extends eu{}:this,e,t)}}function tu(e,t,i){return"function"==typeof e?e(t,i):e}Al([Zr],eu.prototype,"template",void 0),Al([Zr],eu.prototype,"styles",void 0);class iu{constructor(e,t,i){this.type=e,this.elementDefinition=t,this.overrideDefinition=i,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){const i=this.definition,o=this.overrideDefinition,n=`${i.prefix||t.elementPrefix}-${i.baseName}`;t.tryDefineElement({name:n,type:this.type,baseClass:this.elementDefinition.baseClass,callback:e=>{const t=new Jh(tu(i.template,e,i),tu(i.styles,e,i));e.definePresentation(t);let n=tu(i.shadowOptions,e,i);e.shadowRootMode&&(n?o.shadowOptions||(n.mode=e.shadowRootMode):null!==n&&(n={mode:e.shadowRootMode})),e.defineElement({elementOptions:tu(i.elementOptions,e,i),shadowOptions:n,attributes:tu(i.attributes,e,i)})}})}}const ou=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),nu=new Map,ru=new Map;let su=null;const au=ia.createInterface((e=>e.cachedCallback((e=>(null===su&&(su=new cu(null,e)),su))))),lu=Object.freeze({tagFor:e=>ru.get(e),responsibleFor(e){const t=e.$$designSystem$$;if(t)return t;return ia.findResponsibleContainer(e).get(au)},getOrCreate(e){if(!e)return null===su&&(su=ia.getOrCreateDOMContainer().get(au)),su;const t=e.$$designSystem$$;if(t)return t;const i=ia.getOrCreateDOMContainer(e);if(i.has(au,!1))return i.get(au);{const t=new cu(e,i);return i.register(ka.instance(au,t)),t}}});class cu{constructor(e,t){this.owner=e,this.container=t,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>ou.definitionCallbackOnly,null!==e&&(e.$$designSystem$$=this)}withPrefix(e){return this.prefix=e,this}withShadowRootMode(e){return this.shadowRootMode=e,this}withElementDisambiguation(e){return this.disambiguate=e,this}withDesignTokenRoot(e){return this.designTokenRoot=e,this}register(...e){const t=this.container,i=[],o=this.disambiguate,n=this.shadowRootMode,r={elementPrefix:this.prefix,tryDefineElement(e,r,s){const a=function(e,t,i){return"string"==typeof e?{name:e,type:t,callback:i}:e}(e,r,s),{name:l,callback:c,baseClass:d}=a;let{type:h}=a,u=l,p=nu.get(u),g=!0;for(;p;){const e=o(u,h,p);switch(e){case ou.ignoreDuplicate:return;case ou.definitionCallbackOnly:g=!1,p=void 0;break;default:u=e,p=nu.get(u)}}g&&((ru.has(h)||h===eu)&&(h=class extends h{}),nu.set(u,h),ru.set(h,u),d&&ru.set(d,u)),i.push(new du(t,u,h,n,c,g))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&ec.registerRoot(this.designTokenRoot)),t.registerWithContext(r,...e);for(const e of i)e.callback(e),e.willDefine&&null!==e.definition&&e.definition.define();return this}}class du{constructor(e,t,i,o,n,r){this.container=e,this.name=t,this.type=i,this.shadowRootMode=o,this.callback=n,this.willDefine=r,this.definition=null}definePresentation(e){Zh.define(this.name,e,this.container)}defineElement(e){this.definition=new Vs(this.type,Object.assign(Object.assign({},e),{name:this.name}))}tagFor(e){return lu.tagFor(e)}}const hu="resize",uu="scroll",pu=e=>{const t=e.closest("[dir]");return null!==t&&"rtl"===t.dir?tc.rtl:tc.ltr};class gu extends eu{constructor(){super(...arguments),this.anchor="",this.viewport="",this.horizontalPositioningMode="uncontrolled",this.horizontalDefaultPosition="unset",this.horizontalViewportLock=!1,this.horizontalInset=!1,this.horizontalScaling="content",this.verticalPositioningMode="uncontrolled",this.verticalDefaultPosition="unset",this.verticalViewportLock=!1,this.verticalInset=!1,this.verticalScaling="content",this.fixedPlacement=!1,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.initialLayoutComplete=!1,this.resizeDetector=null,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.pendingPositioningUpdate=!1,this.pendingReset=!1,this.currentDirection=tc.ltr,this.regionVisible=!1,this.forceUpdate=!1,this.updateThreshold=.5,this.update=()=>{this.pendingPositioningUpdate||this.requestPositionUpdates()},this.startObservers=()=>{this.stopObservers(),null!==this.anchorElement&&(this.requestPositionUpdates(),null!==this.resizeDetector&&(this.resizeDetector.observe(this.anchorElement),this.resizeDetector.observe(this)))},this.requestPositionUpdates=()=>{null===this.anchorElement||this.pendingPositioningUpdate||(gu.intersectionService.requestPosition(this,this.handleIntersection),gu.intersectionService.requestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&gu.intersectionService.requestPosition(this.viewportElement,this.handleIntersection),this.pendingPositioningUpdate=!0)},this.stopObservers=()=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,gu.intersectionService.cancelRequestPosition(this,this.handleIntersection),null!==this.anchorElement&&gu.intersectionService.cancelRequestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&gu.intersectionService.cancelRequestPosition(this.viewportElement,this.handleIntersection)),null!==this.resizeDetector&&this.resizeDetector.disconnect()},this.getViewport=()=>"string"!=typeof this.viewport||""===this.viewport?document.documentElement:document.getElementById(this.viewport),this.getAnchor=()=>document.getElementById(this.anchor),this.handleIntersection=e=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,this.applyIntersectionEntries(e)&&this.updateLayout())},this.applyIntersectionEntries=e=>{const t=e.find((e=>e.target===this)),i=e.find((e=>e.target===this.anchorElement)),o=e.find((e=>e.target===this.viewportElement));return void 0!==t&&void 0!==o&&void 0!==i&&(!!(!this.regionVisible||this.forceUpdate||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect||this.isRectDifferent(this.anchorRect,i.boundingClientRect)||this.isRectDifferent(this.viewportRect,o.boundingClientRect)||this.isRectDifferent(this.regionRect,t.boundingClientRect))&&(this.regionRect=t.boundingClientRect,this.anchorRect=i.boundingClientRect,this.viewportElement===document.documentElement?this.viewportRect=new DOMRectReadOnly(o.boundingClientRect.x+document.documentElement.scrollLeft,o.boundingClientRect.y+document.documentElement.scrollTop,o.boundingClientRect.width,o.boundingClientRect.height):this.viewportRect=o.boundingClientRect,this.updateRegionOffset(),this.forceUpdate=!1,!0))},this.updateRegionOffset=()=>{this.anchorRect&&this.regionRect&&(this.baseHorizontalOffset=this.baseHorizontalOffset+(this.anchorRect.left-this.regionRect.left)+(this.translateX-this.baseHorizontalOffset),this.baseVerticalOffset=this.baseVerticalOffset+(this.anchorRect.top-this.regionRect.top)+(this.translateY-this.baseVerticalOffset))},this.isRectDifferent=(e,t)=>Math.abs(e.top-t.top)>this.updateThreshold||Math.abs(e.right-t.right)>this.updateThreshold||Math.abs(e.bottom-t.bottom)>this.updateThreshold||Math.abs(e.left-t.left)>this.updateThreshold,this.handleResize=e=>{this.update()},this.reset=()=>{this.pendingReset&&(this.pendingReset=!1,null===this.anchorElement&&(this.anchorElement=this.getAnchor()),null===this.viewportElement&&(this.viewportElement=this.getViewport()),this.currentDirection=pu(this),this.startObservers())},this.updateLayout=()=>{let e,t;if("uncontrolled"!==this.horizontalPositioningMode){const e=this.getPositioningOptions(this.horizontalInset);if("center"===this.horizontalDefaultPosition)t="center";else if("unset"!==this.horizontalDefaultPosition){let e=this.horizontalDefaultPosition;if("start"===e||"end"===e){const t=pu(this);if(t!==this.currentDirection)return this.currentDirection=t,void this.initialize();e=this.currentDirection===tc.ltr?"start"===e?"left":"right":"start"===e?"right":"left"}switch(e){case"left":t=this.horizontalInset?"insetStart":"start";break;case"right":t=this.horizontalInset?"insetEnd":"end"}}const i=void 0!==this.horizontalThreshold?this.horizontalThreshold:void 0!==this.regionRect?this.regionRect.width:0,o=void 0!==this.anchorRect?this.anchorRect.left:0,n=void 0!==this.anchorRect?this.anchorRect.right:0,r=void 0!==this.anchorRect?this.anchorRect.width:0,s=void 0!==this.viewportRect?this.viewportRect.left:0,a=void 0!==this.viewportRect?this.viewportRect.right:0;(void 0===t||"locktodefault"!==this.horizontalPositioningMode&&this.getAvailableSpace(t,o,n,r,s,a)this.getAvailableSpace(e[1],o,n,r,s,a)?e[0]:e[1])}if("uncontrolled"!==this.verticalPositioningMode){const t=this.getPositioningOptions(this.verticalInset);if("center"===this.verticalDefaultPosition)e="center";else if("unset"!==this.verticalDefaultPosition)switch(this.verticalDefaultPosition){case"top":e=this.verticalInset?"insetStart":"start";break;case"bottom":e=this.verticalInset?"insetEnd":"end"}const i=void 0!==this.verticalThreshold?this.verticalThreshold:void 0!==this.regionRect?this.regionRect.height:0,o=void 0!==this.anchorRect?this.anchorRect.top:0,n=void 0!==this.anchorRect?this.anchorRect.bottom:0,r=void 0!==this.anchorRect?this.anchorRect.height:0,s=void 0!==this.viewportRect?this.viewportRect.top:0,a=void 0!==this.viewportRect?this.viewportRect.bottom:0;(void 0===e||"locktodefault"!==this.verticalPositioningMode&&this.getAvailableSpace(e,o,n,r,s,a)this.getAvailableSpace(t[1],o,n,r,s,a)?t[0]:t[1])}const i=this.getNextRegionDimension(t,e),o=this.horizontalPosition!==t||this.verticalPosition!==e;if(this.setHorizontalPosition(t,i),this.setVerticalPosition(e,i),this.updateRegionStyle(),!this.initialLayoutComplete)return this.initialLayoutComplete=!0,void this.requestPositionUpdates();this.regionVisible||(this.regionVisible=!0,this.style.removeProperty("pointer-events"),this.style.removeProperty("opacity"),this.classList.toggle("loaded",!0),this.$emit("loaded",this,{bubbles:!1})),this.updatePositionClasses(),o&&this.$emit("positionchange",this,{bubbles:!1})},this.updateRegionStyle=()=>{this.style.width=this.regionWidth,this.style.height=this.regionHeight,this.style.transform=`translate(${this.translateX}px, ${this.translateY}px)`},this.updatePositionClasses=()=>{this.classList.toggle("top","start"===this.verticalPosition),this.classList.toggle("bottom","end"===this.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.verticalPosition),this.classList.toggle("vertical-center","center"===this.verticalPosition),this.classList.toggle("left","start"===this.horizontalPosition),this.classList.toggle("right","end"===this.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.horizontalPosition),this.classList.toggle("horizontal-center","center"===this.horizontalPosition)},this.setHorizontalPosition=(e,t)=>{if(void 0===e||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.horizontalScaling){case"anchor":case"fill":i=this.horizontalViewportLock?this.viewportRect.width:t.width,this.regionWidth=`${i}px`;break;case"content":i=this.regionRect.width,this.regionWidth="unset"}let o=0;switch(e){case"start":this.translateX=this.baseHorizontalOffset-i,this.horizontalViewportLock&&this.anchorRect.left>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.right));break;case"insetStart":this.translateX=this.baseHorizontalOffset-i+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.right));break;case"insetEnd":this.translateX=this.baseHorizontalOffset,this.horizontalViewportLock&&this.anchorRect.leftthis.viewportRect.right)?this.translateX=this.translateX-(e-this.viewportRect.left):t>this.viewportRect.right&&!(e{if(void 0===e||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.verticalScaling){case"anchor":case"fill":i=this.verticalViewportLock?this.viewportRect.height:t.height,this.regionHeight=`${i}px`;break;case"content":i=this.regionRect.height,this.regionHeight="unset"}let o=0;switch(e){case"start":this.translateY=this.baseVerticalOffset-i,this.verticalViewportLock&&this.anchorRect.top>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.bottom));break;case"insetStart":this.translateY=this.baseVerticalOffset-i+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.bottom));break;case"insetEnd":this.translateY=this.baseVerticalOffset,this.verticalViewportLock&&this.anchorRect.topthis.viewportRect.bottom)?this.translateY=this.translateY-(e-this.viewportRect.top):t>this.viewportRect.bottom&&!(ee?["insetStart","insetEnd"]:["start","end"],this.getAvailableSpace=(e,t,i,o,n,r)=>{const s=t-n,a=r-(t+o);switch(e){case"start":return s;case"insetStart":return s+o;case"insetEnd":return a+o;case"end":return a;case"center":return 2*Math.min(s,a)+o}},this.getNextRegionDimension=(e,t)=>{const i={height:void 0!==this.regionRect?this.regionRect.height:0,width:void 0!==this.regionRect?this.regionRect.width:0};return void 0!==e&&"fill"===this.horizontalScaling?i.width=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(i.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==t&&"fill"===this.verticalScaling?i.height=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(i.height=void 0!==this.anchorRect?this.anchorRect.height:0),i},this.startAutoUpdateEventListeners=()=>{window.addEventListener(hu,this.update,{passive:!0}),window.addEventListener(uu,this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener(hu,this.update),window.removeEventListener(uu,this.update),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(e,t){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===e&&this.stopAutoUpdateEventListeners(),"auto"===t&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),Mr.queueUpdate((()=>this.reset())),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}gu.intersectionService=new class{constructor(){this.intersectionDetector=null,this.observedElements=new Map,this.requestPosition=(e,t)=>{var i;null!==this.intersectionDetector&&(this.observedElements.has(e)?null===(i=this.observedElements.get(e))||void 0===i||i.push(t):(this.observedElements.set(e,[t]),this.intersectionDetector.observe(e)))},this.cancelRequestPosition=(e,t)=>{const i=this.observedElements.get(e);if(void 0!==i){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}},this.initializeIntersectionDetector=()=>{Tr.IntersectionObserver&&(this.intersectionDetector=new IntersectionObserver(this.handleIntersection,{root:null,rootMargin:"0px",threshold:[0,1]}))},this.handleIntersection=e=>{if(null===this.intersectionDetector)return;const t=[],i=[];e.forEach((e=>{var o;null===(o=this.intersectionDetector)||void 0===o||o.unobserve(e.target);const n=this.observedElements.get(e.target);void 0!==n&&(n.forEach((o=>{let n=t.indexOf(o);-1===n&&(n=t.length,t.push(o),i.push([])),i[n].push(e)})),this.observedElements.delete(e.target))})),t.forEach(((e,t)=>{e(i[t])}))},this.initializeIntersectionDetector()}},Al([As],gu.prototype,"anchor",void 0),Al([As],gu.prototype,"viewport",void 0),Al([As({attribute:"horizontal-positioning-mode"})],gu.prototype,"horizontalPositioningMode",void 0),Al([As({attribute:"horizontal-default-position"})],gu.prototype,"horizontalDefaultPosition",void 0),Al([As({attribute:"horizontal-viewport-lock",mode:"boolean"})],gu.prototype,"horizontalViewportLock",void 0),Al([As({attribute:"horizontal-inset",mode:"boolean"})],gu.prototype,"horizontalInset",void 0),Al([As({attribute:"horizontal-threshold"})],gu.prototype,"horizontalThreshold",void 0),Al([As({attribute:"horizontal-scaling"})],gu.prototype,"horizontalScaling",void 0),Al([As({attribute:"vertical-positioning-mode"})],gu.prototype,"verticalPositioningMode",void 0),Al([As({attribute:"vertical-default-position"})],gu.prototype,"verticalDefaultPosition",void 0),Al([As({attribute:"vertical-viewport-lock",mode:"boolean"})],gu.prototype,"verticalViewportLock",void 0),Al([As({attribute:"vertical-inset",mode:"boolean"})],gu.prototype,"verticalInset",void 0),Al([As({attribute:"vertical-threshold"})],gu.prototype,"verticalThreshold",void 0),Al([As({attribute:"vertical-scaling"})],gu.prototype,"verticalScaling",void 0),Al([As({attribute:"fixed-placement",mode:"boolean"})],gu.prototype,"fixedPlacement",void 0),Al([As({attribute:"auto-update-mode"})],gu.prototype,"autoUpdateMode",void 0),Al([Zr],gu.prototype,"anchorElement",void 0),Al([Zr],gu.prototype,"viewportElement",void 0),Al([Zr],gu.prototype,"initialLayoutComplete",void 0);const fu=gu.compose({baseName:"anchored-region",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` :host { contain: layout; display: block; } `});class vu{}Al([As({attribute:"aria-atomic"})],vu.prototype,"ariaAtomic",void 0),Al([As({attribute:"aria-busy"})],vu.prototype,"ariaBusy",void 0),Al([As({attribute:"aria-controls"})],vu.prototype,"ariaControls",void 0),Al([As({attribute:"aria-current"})],vu.prototype,"ariaCurrent",void 0),Al([As({attribute:"aria-describedby"})],vu.prototype,"ariaDescribedby",void 0),Al([As({attribute:"aria-details"})],vu.prototype,"ariaDetails",void 0),Al([As({attribute:"aria-disabled"})],vu.prototype,"ariaDisabled",void 0),Al([As({attribute:"aria-errormessage"})],vu.prototype,"ariaErrormessage",void 0),Al([As({attribute:"aria-flowto"})],vu.prototype,"ariaFlowto",void 0),Al([As({attribute:"aria-haspopup"})],vu.prototype,"ariaHaspopup",void 0),Al([As({attribute:"aria-hidden"})],vu.prototype,"ariaHidden",void 0),Al([As({attribute:"aria-invalid"})],vu.prototype,"ariaInvalid",void 0),Al([As({attribute:"aria-keyshortcuts"})],vu.prototype,"ariaKeyshortcuts",void 0),Al([As({attribute:"aria-label"})],vu.prototype,"ariaLabel",void 0),Al([As({attribute:"aria-labelledby"})],vu.prototype,"ariaLabelledby",void 0),Al([As({attribute:"aria-live"})],vu.prototype,"ariaLive",void 0),Al([As({attribute:"aria-owns"})],vu.prototype,"ariaOwns",void 0),Al([As({attribute:"aria-relevant"})],vu.prototype,"ariaRelevant",void 0),Al([As({attribute:"aria-roledescription"})],vu.prototype,"ariaRoledescription",void 0);class bu{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const mu=(e,t)=>Ts` t.end?"end":void 0} > ${t.end||""} `,yu=(e,t)=>Ts` ${t.start||""} `;Ts` `,Ts` `;function wu(e,...t){t.forEach((t=>{if(Object.getOwnPropertyNames(t.prototype).forEach((i=>{"constructor"!==i&&Object.defineProperty(e.prototype,i,Object.getOwnPropertyDescriptor(t.prototype,i))})),t.attributes){const i=e.attributes||[];e.attributes=i.concat(t.attributes)}}))}var xu;!function(e){e[e["alt"]=18]="alt",e[e["arrowDown"]=40]="arrowDown",e[e["arrowLeft"]=37]="arrowLeft",e[e["arrowRight"]=39]="arrowRight",e[e["arrowUp"]=38]="arrowUp",e[e["back"]=8]="back",e[e["backSlash"]=220]="backSlash",e[e["break"]=19]="break",e[e["capsLock"]=20]="capsLock",e[e["closeBracket"]=221]="closeBracket",e[e["colon"]=186]="colon",e[e["colon2"]=59]="colon2",e[e["comma"]=188]="comma",e[e["ctrl"]=17]="ctrl",e[e["delete"]=46]="delete",e[e["end"]=35]="end",e[e["enter"]=13]="enter",e[e["equals"]=187]="equals",e[e["equals2"]=61]="equals2",e[e["equals3"]=107]="equals3",e[e["escape"]=27]="escape",e[e["forwardSlash"]=191]="forwardSlash",e[e["function1"]=112]="function1",e[e["function10"]=121]="function10",e[e["function11"]=122]="function11",e[e["function12"]=123]="function12",e[e["function2"]=113]="function2",e[e["function3"]=114]="function3",e[e["function4"]=115]="function4",e[e["function5"]=116]="function5",e[e["function6"]=117]="function6",e[e["function7"]=118]="function7",e[e["function8"]=119]="function8",e[e["function9"]=120]="function9",e[e["home"]=36]="home",e[e["insert"]=45]="insert",e[e["menu"]=93]="menu",e[e["minus"]=189]="minus",e[e["minus2"]=109]="minus2",e[e["numLock"]=144]="numLock",e[e["numPad0"]=96]="numPad0",e[e["numPad1"]=97]="numPad1",e[e["numPad2"]=98]="numPad2",e[e["numPad3"]=99]="numPad3",e[e["numPad4"]=100]="numPad4",e[e["numPad5"]=101]="numPad5",e[e["numPad6"]=102]="numPad6",e[e["numPad7"]=103]="numPad7",e[e["numPad8"]=104]="numPad8",e[e["numPad9"]=105]="numPad9",e[e["numPadDivide"]=111]="numPadDivide",e[e["numPadDot"]=110]="numPadDot",e[e["numPadMinus"]=109]="numPadMinus",e[e["numPadMultiply"]=106]="numPadMultiply",e[e["numPadPlus"]=107]="numPadPlus",e[e["openBracket"]=219]="openBracket",e[e["pageDown"]=34]="pageDown",e[e["pageUp"]=33]="pageUp",e[e["period"]=190]="period",e[e["print"]=44]="print",e[e["quote"]=222]="quote",e[e["scrollLock"]=145]="scrollLock",e[e["shift"]=16]="shift",e[e["space"]=32]="space",e[e["tab"]=9]="tab",e[e["tilde"]=192]="tilde",e[e["windowsLeft"]=91]="windowsLeft",e[e["windowsOpera"]=219]="windowsOpera",e[e["windowsRight"]=92]="windowsRight"}(xu||(xu={}));const ku="ArrowDown",Su="ArrowLeft",Cu="ArrowRight",Nu="ArrowUp",Eu="Enter",$u="Escape",Lu="Home",Tu="End",Ou=" ",Ru="Tab",_u={ArrowDown:ku,ArrowLeft:Su,ArrowRight:Cu,ArrowUp:Nu},Du="form-associated-proxy",Iu="ElementInternals",Pu=Iu in window&&"setFormValue"in window[Iu].prototype,Au=new WeakMap;function Bu(e){const t=class extends e{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return Pu}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const e=this.proxy.labels,t=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),i=e?t.concat(Array.from(e)):t;return Object.freeze(i)}return _r}valueChanged(e,t){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),Mr.queueUpdate((()=>this.classList.toggle("disabled",this.disabled)))}nameChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),Mr.queueUpdate((()=>this.classList.toggle("required",this.required))),this.validate()}get elementInternals(){if(!Pu)return null;let e=Au.get(this);return e||(e=this.attachInternals(),Au.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){this.proxyEventsToBlock.forEach((e=>this.proxy.removeEventListener(e,this.stopPropagation))),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,t,i){this.elementInternals?this.elementInternals.setValidity(e,t,i):"string"==typeof t&&this.proxy.setCustomValidity(t)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach((e=>this.proxy.addEventListener(e,this.stopPropagation))),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",Du),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",Du)),null===(e=this.shadowRoot)||void 0===e||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),null===(e=this.shadowRoot)||void 0===e||e.removeChild(this.proxySlot)}validate(){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage)}setFormValue(e,t){this.elementInternals&&this.elementInternals.setFormValue(e,t||e)}_keypressHandler(e){if(e.key===Eu)if(this.form instanceof HTMLFormElement){const e=this.form.querySelector("[type=submit]");null==e||e.click()}}stopPropagation(e){e.stopPropagation()}};return As({mode:"boolean"})(t.prototype,"disabled"),As({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),As({attribute:"current-value"})(t.prototype,"currentValue"),As(t.prototype,"name"),As({mode:"boolean"})(t.prototype,"required"),Zr(t.prototype,"value"),t}function Fu(e){class t extends(Bu(e)){}class i extends t{constructor(...e){super(e),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(e,t){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),void 0!==e&&this.$emit("change"),this.validate()}currentCheckedChanged(e,t){this.checked=this.currentChecked}updateForm(){const e=this.checked?this.value:null;this.setFormValue(e,e)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return As({attribute:"checked",mode:"boolean"})(i.prototype,"checkedAttribute"),As({attribute:"current-checked",converter:Ds})(i.prototype,"currentChecked"),Zr(i.prototype,"defaultChecked"),Zr(i.prototype,"checked"),i}class Mu extends eu{}class Vu extends(Bu(Mu)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class ju extends Vu{constructor(){super(...arguments),this.handleClick=e=>{var t;this.disabled&&(null===(t=this.defaultSlottedContent)||void 0===t?void 0:t.length)<=1&&e.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const e=this.proxy.isConnected;e||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),e||this.detachProxy()},this.handleFormReset=()=>{var e;null===(e=this.form)||void 0===e||e.reset()},this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===e?void 0:e.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(e,t){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),"submit"===t&&this.addEventListener("click",this.handleSubmission),"submit"===e&&this.removeEventListener("click",this.handleSubmission),"reset"===t&&this.addEventListener("click",this.handleFormReset),"reset"===e&&this.removeEventListener("click",this.handleFormReset)}connectedCallback(){var e;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach((e=>{e.addEventListener("click",this.handleClick)}))}disconnectedCallback(){var e;super.disconnectedCallback();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach((e=>{e.removeEventListener("click",this.handleClick)}))}}Al([As({mode:"boolean"})],ju.prototype,"autofocus",void 0),Al([As({attribute:"form"})],ju.prototype,"formId",void 0),Al([As],ju.prototype,"formaction",void 0),Al([As],ju.prototype,"formenctype",void 0),Al([As],ju.prototype,"formmethod",void 0),Al([As({mode:"boolean"})],ju.prototype,"formnovalidate",void 0),Al([As],ju.prototype,"formtarget",void 0),Al([As],ju.prototype,"type",void 0),Al([Zr],ju.prototype,"defaultSlottedContent",void 0);class zu{}Al([As({attribute:"aria-expanded"})],zu.prototype,"ariaExpanded",void 0),Al([As({attribute:"aria-pressed"})],zu.prototype,"ariaPressed",void 0),wu(zu,vu),wu(ju,bu,zu);class Uu extends class{constructor(e,t){this.target=e,this.options=t,this.source=null}bind(e){const t=this.options.property;this.shouldUpdate=Qr.getAccessors(e).some((e=>e.name===t)),this.source=e,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(_r),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let e=this.getNodes();return void 0!==this.options.filter&&(e=e.filter(this.options.filter)),e}updateTarget(e){this.source[this.options.property]=e}}{constructor(e,t){super(e,t)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function Hu(e){return"string"==typeof e&&(e={property:e}),new rs("fast-slotted",Uu,e)}const Wu="not-allowed";class qu extends class{constructor(e){this.listenerCache=new WeakMap,this.query=e}bind(e){const{query:t}=this,i=this.constructListener(e);i.bind(t)(),t.addListener(i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeListener(t),this.listenerCache.delete(e))}}{constructor(e,t){super(e),this.styles=t}static with(e){return t=>new qu(e,t)}constructListener(e){let t=!1;const i=this.styles;return function(){const{matches:o}=this;o&&!t?(e.$fastController.addStyles(i),t=o):!o&&t&&(e.$fastController.removeStyles(i),t=o)}}unbind(e){super.unbind(e),e.$fastController.removeStyles(this.styles)}}const Ku=qu.with(window.matchMedia("(forced-colors)"));qu.with(window.matchMedia("(prefers-color-scheme: dark)")),qu.with(window.matchMedia("(prefers-color-scheme: light)"));var Gu;!function(e){e["Canvas"]="Canvas",e["CanvasText"]="CanvasText",e["LinkText"]="LinkText",e["VisitedText"]="VisitedText",e["ActiveText"]="ActiveText",e["ButtonFace"]="ButtonFace",e["ButtonText"]="ButtonText",e["Field"]="Field",e["FieldText"]="FieldText",e["Highlight"]="Highlight",e["HighlightText"]="HighlightText",e["GrayText"]="GrayText"}(Gu||(Gu={}));const Xu=`:host([hidden]){display:none}`;function Yu(e){return`${Xu}:host{display:${e}}`}function Qu(...e){return e.every((e=>e instanceof HTMLElement))}let Zu;const Ju=function(){if("boolean"==typeof Zu)return Zu;if("undefined"==typeof window||!window.document||!window.document.createElement)return Zu=!1,Zu;const e=document.createElement("style"),t=function(){const e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}();null!==t&&e.setAttribute("nonce",t),document.head.appendChild(e);try{e.sheet.insertRule("foo:focus-visible {color:inherit}",0),Zu=!0}catch(e){Zu=!1}finally{document.head.removeChild(e)}return Zu}()?"focus-visible":"focus",ep=(function(e,...t){const{styles:i,behaviors:o}=qr(e,t);return new Gr(i,o)})`(${Lc} + ${_c}) * ${Dc}`,tp=Kr` ${Yu("inline-flex")} :host { font-family: ${$c}; outline: none; font-size: ${Fc}; line-height: ${Mc}; height: calc(${ep} * 1px); min-width: calc(${ep} * 1px); background-color: ${uh}; color: ${Dh}; border-radius: calc(${Rc} * 1px); fill: currentcolor; cursor: pointer; } .control { background: transparent; height: inherit; flex-grow: 1; box-sizing: border-box; display: inline-flex; justify-content: center; align-items: baseline; padding: 0 calc((10 + (${Dc} * 2 * ${_c})) * 1px); white-space: nowrap; outline: none; text-decoration: none; border: calc(${Ac} * 1px) solid transparent; color: inherit; border-radius: inherit; fill: inherit; cursor: inherit; font-weight: inherit; font-family: inherit; font-size: inherit; line-height: inherit; } :host(:hover) { background-color: ${ph}; } :host(:active) { background-color: ${gh}; } .control:${Ju} { border-color: ${$h}; box-shadow: 0 0 0 calc((${Bc} - ${Ac}) * 1px) ${$h} inset; } .control::-moz-focus-inner { border: 0; } .start, .content, .end { align-self: center; } .start, .end { display: flex; } .control.icon-only { padding: 0; line-height: 0; } ::slotted(svg) { ${""} width: 16px; height: 16px; pointer-events: none; } .start { margin-inline-end: 11px; } .end { margin-inline-start: 11px; } `.withBehaviors(Ku(Kr` :host .control { background-color: ${Gu.ButtonFace}; border-color: ${Gu.ButtonText}; color: ${Gu.ButtonText}; fill: currentColor; } :host(:hover) .control { forced-color-adjust: none; background-color: ${Gu.Highlight}; color: ${Gu.HighlightText}; } .control:${Ju} { forced-color-adjust: none; background-color: ${Gu.Highlight}; border-color: ${Gu.ButtonText}; box-shadow: 0 0 0 calc((${Bc} - ${Ac}) * 1px) ${Gu.ButtonText} inset; color: ${Gu.HighlightText}; } .control:hover, :host([appearance="outline"]) .control:hover { border-color: ${Gu.ButtonText}; } :host([href]) .control { border-color: ${Gu.LinkText}; color: ${Gu.LinkText}; } :host([href]) .control:hover, :host([href]) .control:${Ju}{ forced-color-adjust: none; background: ${Gu.ButtonFace}; border-color: ${Gu.LinkText}; box-shadow: 0 0 0 1px ${Gu.LinkText} inset; color: ${Gu.LinkText}; fill: currentColor; } `)),ip=Kr` :host([appearance="accent"]) { background: ${Xd}; color: ${th}; } :host([appearance="accent"]:hover) { background: ${Yd}; color: ${ih}; } :host([appearance="accent"]:active) .control:active { background: ${Qd}; color: ${oh}; } :host([appearance="accent"]) .control:${Ju} { box-shadow: 0 0 0 calc((${Bc} - ${Ac}) * 1px) ${$h} inset, 0 0 0 calc((${Bc} + ${Ac}) * 1px) ${Th} inset; } `.withBehaviors(Ku(Kr` :host([appearance="accent"]) .control { forced-color-adjust: none; background: ${Gu.Highlight}; color: ${Gu.HighlightText}; } :host([appearance="accent"]) .control:hover, :host([appearance="accent"]:active) .control:active { background: ${Gu.HighlightText}; border-color: ${Gu.Highlight}; color: ${Gu.Highlight}; } :host([appearance="accent"]) .control:${Ju} { border-color: ${Gu.Highlight}; box-shadow: 0 0 0 calc(${Bc} * 1px) ${Gu.HighlightText} inset; } :host([appearance="accent"][href]) .control{ background: ${Gu.LinkText}; color: ${Gu.HighlightText}; } :host([appearance="accent"][href]) .control:hover { background: ${Gu.ButtonFace}; border-color: ${Gu.LinkText}; box-shadow: none; color: ${Gu.LinkText}; fill: currentColor; } :host([appearance="accent"][href]) .control:${Ju} { border-color: ${Gu.LinkText}; box-shadow: 0 0 0 calc(${Bc} * 1px) ${Gu.HighlightText} inset; } `)),op=(Kr` :host([appearance="hypertext"]) { font-size: inherit; line-height: inherit; height: auto; min-width: 0; background: transparent; } :host([appearance="hypertext"]) .control { display: inline; padding: 0; border: none; box-shadow: none; border-radius: 0; line-height: 1; } :host a.control:not(:link) { background-color: transparent; cursor: default; } :host([appearance="hypertext"]) .control:link, :host([appearance="hypertext"]) .control:visited { background: transparent; color: ${lh}; border-bottom: calc(${Ac} * 1px) solid ${lh}; } :host([appearance="hypertext"]:hover), :host([appearance="hypertext"]) .control:hover { background: transparent; border-bottom-color: ${ch}; } :host([appearance="hypertext"]:active), :host([appearance="hypertext"]) .control:active { background: transparent; border-bottom-color: ${dh}; } :host([appearance="hypertext"]) .control:${Ju} { border-bottom: calc(${Bc} * 1px) solid ${$h}; margin-bottom: calc(calc(${Ac} - ${Bc}) * 1px); } `.withBehaviors(Ku(Kr` :host([appearance="hypertext"]:hover) { background-color: ${Gu.ButtonFace}; color: ${Gu.ButtonText}; } :host([appearance="hypertext"][href]) .control:hover, :host([appearance="hypertext"][href]) .control:active, :host([appearance="hypertext"][href]) .control:${Ju} { color: ${Gu.LinkText}; border-bottom-color: ${Gu.LinkText}; box-shadow: none; } `)),Kr` :host([appearance="lightweight"]) { background: transparent; color: ${lh}; } :host([appearance="lightweight"]) .control { padding: 0; height: initial; border: none; box-shadow: none; border-radius: 0; } :host([appearance="lightweight"]:hover) { background: transparent; color: ${ch}; } :host([appearance="lightweight"]:active) { background: transparent; color: ${dh}; } :host([appearance="lightweight"]) .content { position: relative; } :host([appearance="lightweight"]) .content::before { content: ""; display: block; height: calc(${Ac} * 1px); position: absolute; top: calc(1em + 4px); width: 100%; } :host([appearance="lightweight"]:hover) .content::before { background: ${ch}; } :host([appearance="lightweight"]:active) .content::before { background: ${dh}; } :host([appearance="lightweight"]) .control:${Ju} .content::before { background: ${Dh}; height: calc(${Bc} * 1px); } `.withBehaviors(Ku(Kr` :host([appearance="lightweight"]) .control:hover, :host([appearance="lightweight"]) .control:${Ju} { forced-color-adjust: none; background: ${Gu.ButtonFace}; color: ${Gu.Highlight}; } :host([appearance="lightweight"]) .control:hover .content::before, :host([appearance="lightweight"]) .control:${Ju} .content::before { background: ${Gu.Highlight}; } :host([appearance="lightweight"][href]) .control:hover, :host([appearance="lightweight"][href]) .control:${Ju} { background: ${Gu.ButtonFace}; box-shadow: none; color: ${Gu.LinkText}; } :host([appearance="lightweight"][href]) .control:hover .content::before, :host([appearance="lightweight"][href]) .control:${Ju} .content::before { background: ${Gu.LinkText}; } `))),np=Kr` :host([appearance="outline"]) { background: transparent; border-color: ${Xd}; } :host([appearance="outline"]:hover) { border-color: ${Yd}; } :host([appearance="outline"]:active) { border-color: ${Qd}; } :host([appearance="outline"]) .control { border-color: inherit; } :host([appearance="outline"]) .control:${Ju} { box-shadow: 0 0 0 calc((${Bc} - ${Ac}) * 1px) ${$h} inset; border-color: ${$h}; } `.withBehaviors(Ku(Kr` :host([appearance="outline"]) .control { border-color: ${Gu.ButtonText}; } :host([appearance="outline"]) .control:${Ju} { forced-color-adjust: none; background-color: ${Gu.Highlight}; border-color: ${Gu.ButtonText}; box-shadow: 0 0 0 calc((${Bc} - ${Ac}) * 1px) ${Gu.ButtonText} inset; color: ${Gu.HighlightText}; fill: currentColor; } :host([appearance="outline"][href]) .control { background: ${Gu.ButtonFace}; border-color: ${Gu.LinkText}; color: ${Gu.LinkText}; fill: currentColor; } :host([appearance="outline"][href]) .control:hover, :host([appearance="outline"][href]) .control:${Ju} { forced-color-adjust: none; border-color: ${Gu.LinkText}; box-shadow: 0 0 0 1px ${Gu.LinkText} inset; } `)),rp=Kr` :host([appearance="stealth"]) { background: ${wh}; } :host([appearance="stealth"]:hover) { background: ${xh}; } :host([appearance="stealth"]:active) { background: ${kh}; } `.withBehaviors(Ku(Kr` :host([appearance="stealth"]), :host([appearance="stealth"]) .control { forced-color-adjust: none; background: ${Gu.ButtonFace}; border-color: transparent; color: ${Gu.ButtonText}; fill: currentColor; } :host([appearance="stealth"]:hover) .control { background: ${Gu.Highlight}; border-color: ${Gu.Highlight}; color: ${Gu.HighlightText}; fill: currentColor; } :host([appearance="stealth"]:${Ju}) .control { background: ${Gu.Highlight}; box-shadow: 0 0 0 1px ${Gu.Highlight}; color: ${Gu.HighlightText}; fill: currentColor; } :host([appearance="stealth"][href]) .control { color: ${Gu.LinkText}; } :host([appearance="stealth"][href]:hover) .control, :host([appearance="stealth"][href]:${Ju}) .control { background: ${Gu.LinkText}; border-color: ${Gu.LinkText}; color: ${Gu.HighlightText}; fill: currentColor; } :host([appearance="stealth"][href]:${Ju}) .control { forced-color-adjust: none; box-shadow: 0 0 0 1px ${Gu.LinkText}; } `));class sp{constructor(e,t,i){this.propertyName=e,this.value=t,this.styles=i}bind(e){Qr.getNotifier(e).subscribe(this,this.propertyName),this.handleChange(e,this.propertyName)}unbind(e){Qr.getNotifier(e).unsubscribe(this,this.propertyName),e.$fastController.removeStyles(this.styles)}handleChange(e,t){e[t]===this.value?e.$fastController.addStyles(this.styles):e.$fastController.removeStyles(this.styles)}}function ap(e,t){return new sp("appearance",e,t)}class lp extends ju{constructor(){super(...arguments),this.appearance="neutral"}defaultSlottedContentChanged(e,t){const i=this.defaultSlottedContent.filter((e=>e.nodeType===Node.ELEMENT_NODE));1===i.length&&i[0]instanceof SVGElement?this.control.classList.add("icon-only"):this.control.classList.remove("icon-only")}}Al([As],lp.prototype,"appearance",void 0);const cp=lp.compose({baseName:"button",baseClass:ju,template:(e,t)=>Ts` `,styles:(e,t)=>Kr` :host([disabled]), :host([disabled]:hover), :host([disabled]:active) { opacity: ${Pc}; background-color: ${uh}; cursor: ${Wu}; } ${tp} `.withBehaviors(Ku(Kr` :host([disabled]), :host([disabled]) .control, :host([disabled]:hover), :host([disabled]:active) { forced-color-adjust: none; background-color: ${Gu.ButtonFace}; border-color: ${Gu.GrayText}; color: ${Gu.GrayText}; cursor: ${Wu}; opacity: 1; } `),ap("accent",Kr` :host([appearance="accent"][disabled]), :host([appearance="accent"][disabled]:hover), :host([appearance="accent"][disabled]:active) { background: ${Xd}; } ${ip} `.withBehaviors(Ku(Kr` :host([appearance="accent"][disabled]) .control, :host([appearance="accent"][disabled]) .control:hover { background: ${Gu.ButtonFace}; border-color: ${Gu.GrayText}; color: ${Gu.GrayText}; } `))),ap("lightweight",Kr` :host([appearance="lightweight"][disabled]:hover), :host([appearance="lightweight"][disabled]:active) { background-color: transparent; color: ${lh}; } :host([appearance="lightweight"][disabled]) .content::before, :host([appearance="lightweight"][disabled]:hover) .content::before, :host([appearance="lightweight"][disabled]:active) .content::before { background: transparent; } ${op} `.withBehaviors(Ku(Kr` :host([appearance="lightweight"].disabled) .control { forced-color-adjust: none; color: ${Gu.GrayText}; } :host([appearance="lightweight"].disabled) .control:hover .content::before { background: none; } `))),ap("outline",Kr` :host([appearance="outline"][disabled]), :host([appearance="outline"][disabled]:hover), :host([appearance="outline"][disabled]:active) { background: transparent; border-color: ${Xd}; } ${np} `.withBehaviors(Ku(Kr` :host([appearance="outline"][disabled]) .control { border-color: ${Gu.GrayText}; } `))),ap("stealth",Kr` :host([appearance="stealth"][disabled]), :host([appearance="stealth"][disabled]:hover), :host([appearance="stealth"][disabled]:active) { background: ${wh}; } ${rp} `.withBehaviors(Ku(Kr` :host([appearance="stealth"][disabled]) { background: ${Gu.ButtonFace}; } :host([appearance="stealth"][disabled]) .control { background: ${Gu.ButtonFace}; border-color: transparent; color: ${Gu.GrayText}; } `)))),shadowOptions:{delegatesFocus:!0}});class dp extends eu{}class hp extends(Fu(dp)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class up extends hp{constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=e=>{if(!this.readOnly&&e.key===Ou)this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked},this.clickHandler=e=>{this.disabled||this.readOnly||(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}}Al([As({attribute:"readonly",mode:"boolean"})],up.prototype,"readOnly",void 0),Al([Zr],up.prototype,"defaultSlottedNodes",void 0),Al([Zr],up.prototype,"indeterminate",void 0);const pp=up.compose({baseName:"checkbox",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("inline-flex")} :host { align-items: center; outline: none; margin: calc(${Dc} * 1px) 0; /* Chromium likes to select label text or the default slot when the checkbox is clicked. Maybe there is a better solution here? */ user-select: none; } .control { position: relative; width: calc((${ep} / 2 + ${Dc}) * 1px); height: calc((${ep} / 2 + ${Dc}) * 1px); box-sizing: border-box; border-radius: calc(${Rc} * 1px); border: calc(${Ac} * 1px) solid ${Ph}; background: ${vh}; outline: none; cursor: pointer; } .label { font-family: ${$c}; color: ${Dh}; padding-inline-start: calc(${Dc} * 2px + 2px); margin-inline-end: calc(${Dc} * 2px + 2px); cursor: pointer; font-size: ${Fc}; line-height: ${Mc}; } .label__hidden { display: none; visibility: hidden; } .checked-indicator { width: 100%; height: 100%; display: block; fill: ${th}; opacity: 0; pointer-events: none; } .indeterminate-indicator { border-radius: calc(${Rc} * 1px); background: ${th}; position: absolute; top: 50%; left: 50%; width: 50%; height: 50%; transform: translate(-50%, -50%); opacity: 0; } :host(:not([disabled])) .control:hover { background: ${bh}; border-color: ${Ah}; } :host(:not([disabled])) .control:active { background: ${mh}; border-color: ${Bh}; } :host(:${Ju}) .control { box-shadow: 0 0 0 2px ${qd}, 0 0 0 4px ${$h}; } :host([aria-checked="true"]) .control { background: ${Xd}; border: calc(${Ac} * 1px) solid ${Xd}; } :host([aria-checked="true"]:not([disabled])) .control:hover { background: ${Yd}; border: calc(${Ac} * 1px) solid ${Yd}; } :host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator { fill: ${ih}; } :host([aria-checked="true"]:not([disabled])) .control:hover .indeterminate-indicator { background: ${ih}; } :host([aria-checked="true"]:not([disabled])) .control:active { background: ${Qd}; border: calc(${Ac} * 1px) solid ${Qd}; } :host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator { fill: ${oh}; } :host([aria-checked="true"]:not([disabled])) .control:active .indeterminate-indicator { background: ${oh}; } :host([aria-checked="true"]:${Ju}:not([disabled])) .control { box-shadow: 0 0 0 2px ${qd}, 0 0 0 4px ${$h}; } :host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control { cursor: ${Wu}; } :host([aria-checked="true"]:not(.indeterminate)) .checked-indicator, :host(.indeterminate) .indeterminate-indicator { opacity: 1; } :host([disabled]) { opacity: ${Pc}; } `.withBehaviors(Ku(Kr` .control { forced-color-adjust: none; border-color: ${Gu.FieldText}; background: ${Gu.Field}; } .checked-indicator { fill: ${Gu.FieldText}; } .indeterminate-indicator { background: ${Gu.FieldText}; } :host(:not([disabled])) .control:hover, .control:active { border-color: ${Gu.Highlight}; background: ${Gu.Field}; } :host(:${Ju}) .control { box-shadow: 0 0 0 2px ${Gu.Field}, 0 0 0 4px ${Gu.FieldText}; } :host([aria-checked="true"]:${Ju}:not([disabled])) .control { box-shadow: 0 0 0 2px ${Gu.Field}, 0 0 0 4px ${Gu.FieldText}; } :host([aria-checked="true"]) .control { background: ${Gu.Highlight}; border-color: ${Gu.Highlight}; } :host([aria-checked="true"]:not([disabled])) .control:hover, .control:active { border-color: ${Gu.Highlight}; background: ${Gu.HighlightText}; } :host([aria-checked="true"]) .checked-indicator { fill: ${Gu.HighlightText}; } :host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator { fill: ${Gu.Highlight} } :host([aria-checked="true"]) .indeterminate-indicator { background: ${Gu.HighlightText}; } :host([aria-checked="true"]) .control:hover .indeterminate-indicator { background: ${Gu.Highlight} } :host([disabled]) { opacity: 1; } :host([disabled]) .control { forced-color-adjust: none; border-color: ${Gu.GrayText}; background: ${Gu.Field}; } :host([disabled]) .indeterminate-indicator, :host([aria-checked="true"][disabled]) .control:hover .indeterminate-indicator { forced-color-adjust: none; background: ${Gu.GrayText}; } :host([disabled]) .checked-indicator, :host([aria-checked="true"][disabled]) .control:hover .checked-indicator { forced-color-adjust: none; fill: ${Gu.GrayText}; } `)),checkedIndicator:`\n \n \n \n `,indeterminateIndicator:`\n
\n `}),gp={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=uc(e);return t?Rl.create(t.r,t.g,t.b):null}},fp=Kr` :host { background-color: ${qd}; color: ${Dh}; } `.withBehaviors(Ku(Kr` :host { background-color: ${Gu.ButtonFace}; box-shadow: 0 0 0 1px ${Gu.CanvasText}; color: ${Gu.ButtonText}; } `));function vp(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}class bp extends eu{constructor(){super(),this.noPaint=!1;const e={handleChange:this.noPaintChanged.bind(this)};Qr.getNotifier(this).subscribe(e,"fillColor"),Qr.getNotifier(this).subscribe(e,"baseLayerLuminance")}noPaintChanged(){this.noPaint||void 0===this.fillColor&&!this.baseLayerLuminance?this.$fastController.removeStyles(fp):this.$fastController.addStyles(fp)}}Al([As({attribute:"no-paint",mode:"boolean"})],bp.prototype,"noPaint",void 0),Al([As({attribute:"fill-color",converter:gp}),vp(qd)],bp.prototype,"fillColor",void 0),Al([As({attribute:"accent-color",converter:gp,mode:"fromView"}),vp(Id)],bp.prototype,"accentColor",void 0),Al([As({attribute:"neutral-color",converter:gp,mode:"fromView"}),vp(_d)],bp.prototype,"neutralColor",void 0),Al([As({converter:Is}),vp(_c)],bp.prototype,"density",void 0),Al([As({attribute:"design-unit",converter:Is}),vp(Dc)],bp.prototype,"designUnit",void 0),Al([As({attribute:"direction"}),vp(Ic)],bp.prototype,"direction",void 0),Al([As({attribute:"base-height-multiplier",converter:Is}),vp(Lc)],bp.prototype,"baseHeightMultiplier",void 0),Al([As({attribute:"base-horizontal-spacing-multiplier",converter:Is}),vp(Tc)],bp.prototype,"baseHorizontalSpacingMultiplier",void 0),Al([As({attribute:"control-corner-radius",converter:Is}),vp(Rc)],bp.prototype,"controlCornerRadius",void 0),Al([As({attribute:"stroke-width",converter:Is}),vp(Ac)],bp.prototype,"strokeWidth",void 0),Al([As({attribute:"focus-stroke-width",converter:Is}),vp(Bc)],bp.prototype,"focusStrokeWidth",void 0),Al([As({attribute:"disabled-opacity",converter:Is}),vp(Pc)],bp.prototype,"disabledOpacity",void 0),Al([As({attribute:"type-ramp-minus-2-font-size"}),vp(zc)],bp.prototype,"typeRampMinus2FontSize",void 0),Al([As({attribute:"type-ramp-minus-2-line-height"}),vp(Uc)],bp.prototype,"typeRampMinus2LineHeight",void 0),Al([As({attribute:"type-ramp-minus-1-font-size"}),vp(Vc)],bp.prototype,"typeRampMinus1FontSize",void 0),Al([As({attribute:"type-ramp-minus-1-line-height"}),vp(jc)],bp.prototype,"typeRampMinus1LineHeight",void 0),Al([As({attribute:"type-ramp-base-font-size"}),vp(Fc)],bp.prototype,"typeRampBaseFontSize",void 0),Al([As({attribute:"type-ramp-base-line-height"}),vp(Mc)],bp.prototype,"typeRampBaseLineHeight",void 0),Al([As({attribute:"type-ramp-plus-1-font-size"}),vp(Hc)],bp.prototype,"typeRampPlus1FontSize",void 0),Al([As({attribute:"type-ramp-plus-1-line-height"}),vp(Wc)],bp.prototype,"typeRampPlus1LineHeight",void 0),Al([As({attribute:"type-ramp-plus-2-font-size"}),vp(qc)],bp.prototype,"typeRampPlus2FontSize",void 0),Al([As({attribute:"type-ramp-plus-2-line-height"}),vp(Kc)],bp.prototype,"typeRampPlus2LineHeight",void 0),Al([As({attribute:"type-ramp-plus-3-font-size"}),vp(Gc)],bp.prototype,"typeRampPlus3FontSize",void 0),Al([As({attribute:"type-ramp-plus-3-line-height"}),vp(Xc)],bp.prototype,"typeRampPlus3LineHeight",void 0),Al([As({attribute:"type-ramp-plus-4-font-size"}),vp(Yc)],bp.prototype,"typeRampPlus4FontSize",void 0),Al([As({attribute:"type-ramp-plus-4-line-height"}),vp(Qc)],bp.prototype,"typeRampPlus4LineHeight",void 0),Al([As({attribute:"type-ramp-plus-5-font-size"}),vp(Zc)],bp.prototype,"typeRampPlus5FontSize",void 0),Al([As({attribute:"type-ramp-plus-5-line-height"}),vp(Jc)],bp.prototype,"typeRampPlus5LineHeight",void 0),Al([As({attribute:"type-ramp-plus-6-font-size"}),vp(ed)],bp.prototype,"typeRampPlus6FontSize",void 0),Al([As({attribute:"type-ramp-plus-6-line-height"}),vp(td)],bp.prototype,"typeRampPlus6LineHeight",void 0),Al([As({attribute:"accent-fill-rest-delta",converter:Is}),vp(id)],bp.prototype,"accentFillRestDelta",void 0),Al([As({attribute:"accent-fill-hover-delta",converter:Is}),vp(od)],bp.prototype,"accentFillHoverDelta",void 0),Al([As({attribute:"accent-fill-active-delta",converter:Is}),vp(nd)],bp.prototype,"accentFillActiveDelta",void 0),Al([As({attribute:"accent-fill-focus-delta",converter:Is}),vp(rd)],bp.prototype,"accentFillFocusDelta",void 0),Al([As({attribute:"accent-foreground-rest-delta",converter:Is}),vp(sd)],bp.prototype,"accentForegroundRestDelta",void 0),Al([As({attribute:"accent-foreground-hover-delta",converter:Is}),vp(ad)],bp.prototype,"accentForegroundHoverDelta",void 0),Al([As({attribute:"accent-foreground-active-delta",converter:Is}),vp(ld)],bp.prototype,"accentForegroundActiveDelta",void 0),Al([As({attribute:"accent-foreground-focus-delta",converter:Is}),vp(cd)],bp.prototype,"accentForegroundFocusDelta",void 0),Al([As({attribute:"neutral-fill-rest-delta",converter:Is}),vp(dd)],bp.prototype,"neutralFillRestDelta",void 0),Al([As({attribute:"neutral-fill-hover-delta",converter:Is}),vp(hd)],bp.prototype,"neutralFillHoverDelta",void 0),Al([As({attribute:"neutral-fill-active-delta",converter:Is}),vp(ud)],bp.prototype,"neutralFillActiveDelta",void 0),Al([As({attribute:"neutral-fill-focus-delta",converter:Is}),vp(pd)],bp.prototype,"neutralFillFocusDelta",void 0),Al([As({attribute:"neutral-fill-input-rest-delta",converter:Is}),vp(gd)],bp.prototype,"neutralFillInputRestDelta",void 0),Al([As({attribute:"neutral-fill-input-hover-delta",converter:Is}),vp(fd)],bp.prototype,"neutralFillInputHoverDelta",void 0),Al([As({attribute:"neutral-fill-input-active-delta",converter:Is}),vp(vd)],bp.prototype,"neutralFillInputActiveDelta",void 0),Al([As({attribute:"neutral-fill-input-focus-delta",converter:Is}),vp(bd)],bp.prototype,"neutralFillInputFocusDelta",void 0),Al([As({attribute:"neutral-fill-stealth-rest-delta",converter:Is}),vp(md)],bp.prototype,"neutralFillStealthRestDelta",void 0),Al([As({attribute:"neutral-fill-stealth-hover-delta",converter:Is}),vp(yd)],bp.prototype,"neutralFillStealthHoverDelta",void 0),Al([As({attribute:"neutral-fill-stealth-active-delta",converter:Is}),vp(wd)],bp.prototype,"neutralFillStealthActiveDelta",void 0),Al([As({attribute:"neutral-fill-stealth-focus-delta",converter:Is}),vp(xd)],bp.prototype,"neutralFillStealthFocusDelta",void 0),Al([As({attribute:"neutral-fill-strong-hover-delta",converter:Is}),vp(Sd)],bp.prototype,"neutralFillStrongHoverDelta",void 0),Al([As({attribute:"neutral-fill-strong-active-delta",converter:Is}),vp(Cd)],bp.prototype,"neutralFillStrongActiveDelta",void 0),Al([As({attribute:"neutral-fill-strong-focus-delta",converter:Is}),vp(Nd)],bp.prototype,"neutralFillStrongFocusDelta",void 0),Al([As({attribute:"base-layer-luminance",converter:Is}),vp(Oc)],bp.prototype,"baseLayerLuminance",void 0),Al([As({attribute:"neutral-fill-layer-rest-delta",converter:Is}),vp(Ed)],bp.prototype,"neutralFillLayerRestDelta",void 0),Al([As({attribute:"neutral-stroke-divider-rest-delta",converter:Is}),vp(Rd)],bp.prototype,"neutralStrokeDividerRestDelta",void 0),Al([As({attribute:"neutral-stroke-rest-delta",converter:Is}),vp($d)],bp.prototype,"neutralStrokeRestDelta",void 0),Al([As({attribute:"neutral-stroke-hover-delta",converter:Is}),vp(Ld)],bp.prototype,"neutralStrokeHoverDelta",void 0),Al([As({attribute:"neutral-stroke-active-delta",converter:Is}),vp(Td)],bp.prototype,"neutralStrokeActiveDelta",void 0),Al([As({attribute:"neutral-stroke-focus-delta",converter:Is}),vp(Od)],bp.prototype,"neutralStrokeFocusDelta",void 0);const mp=bp.compose({baseName:"design-system-provider",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("block")} `});var yp=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],wp=yp.join(","),xp="undefined"==typeof Element,kp=xp?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Sp=!xp&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},Cp=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},Np=function(e){return"INPUT"===e.tagName},Ep=function(e){return function(e){return Np(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,i=e.form||Sp(e),o=function(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var i=0;isummary:first-of-type")?e.parentElement:e;if(kp.call(n,"details:not([open]) *"))return!0;var r=Sp(e).host,s=(null==r?void 0:r.ownerDocument.contains(r))||e.ownerDocument.contains(e);if(i&&"full"!==i){if("non-zero-area"===i)return $p(e)}else{if("function"==typeof o){for(var a=e;e;){var l=e.parentElement,c=Sp(e);if(l&&!l.shadowRoot&&!0===o(l))return $p(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var i=0;i{this.$fastController.isConnected&&this.updateTrapFocus()},this.isTrappingFocus=!1,this.handleDocumentKeydown=e=>{if(!e.defaultPrevented&&!this.hidden)switch(e.key){case $u:this.dismiss(),e.preventDefault();break;case Ru:this.handleTabKeyDown(e)}},this.handleDocumentFocus=e=>{!e.defaultPrevented&&this.shouldForceFocus(e.target)&&(this.focusFirstElement(),e.preventDefault())},this.handleTabKeyDown=e=>{if(!this.trapFocus||this.hidden)return;const t=this.getTabQueueBounds();return 0!==t.length?1===t.length?(t[0].focus(),void e.preventDefault()):void(e.shiftKey&&e.target===t[0]?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||e.target!==t[t.length-1]||(t[0].focus(),e.preventDefault())):void 0},this.getTabQueueBounds=()=>Rp.reduceTabbableItems([],this),this.focusFirstElement=()=>{const e=this.getTabQueueBounds();e.length>0?e[0].focus():this.dialog instanceof HTMLElement&&this.dialog.focus()},this.shouldForceFocus=e=>this.isTrappingFocus&&!this.contains(e),this.shouldTrapFocus=()=>this.trapFocus&&!this.hidden,this.updateTrapFocus=e=>{const t=void 0===e?this.shouldTrapFocus():e;t&&!this.isTrappingFocus?(this.isTrappingFocus=!0,document.addEventListener("focusin",this.handleDocumentFocus),Mr.queueUpdate((()=>{this.shouldForceFocus(document.activeElement)&&this.focusFirstElement()}))):!t&&this.isTrappingFocus&&(this.isTrappingFocus=!1,document.removeEventListener("focusin",this.handleDocumentFocus))}}dismiss(){this.$emit("dismiss"),this.$emit("cancel")}show(){this.hidden=!1}hide(){this.hidden=!0,this.$emit("close")}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleDocumentKeydown),this.notifier=Qr.getNotifier(this),this.notifier.subscribe(this,"hidden"),this.updateTrapFocus()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeydown),this.updateTrapFocus(!1),this.notifier.unsubscribe(this,"hidden")}handleChange(e,t){if("hidden"===t)this.updateTrapFocus()}static reduceTabbableItems(e,t){return"-1"===t.getAttribute("tabindex")?e:Op(t)||Rp.isFocusableFastElement(t)&&Rp.hasTabbableShadow(t)?(e.push(t),e):t.childElementCount?e.concat(Array.from(t.children).reduce(Rp.reduceTabbableItems,[])):e}static isFocusableFastElement(e){var t,i;return!!(null===(i=null===(t=e.$fastController)||void 0===t?void 0:t.definition.shadowOptions)||void 0===i?void 0:i.delegatesFocus)}static hasTabbableShadow(e){var t,i;return Array.from(null!==(i=null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelectorAll("*"))&&void 0!==i?i:[]).some((e=>Op(e)))}}Al([As({mode:"boolean"})],Rp.prototype,"modal",void 0),Al([As({mode:"boolean"})],Rp.prototype,"hidden",void 0),Al([As({attribute:"trap-focus",mode:"boolean"})],Rp.prototype,"trapFocus",void 0),Al([As({attribute:"aria-describedby"})],Rp.prototype,"ariaDescribedby",void 0),Al([As({attribute:"aria-labelledby"})],Rp.prototype,"ariaLabelledby",void 0),Al([As({attribute:"aria-label"})],Rp.prototype,"ariaLabel",void 0);const _p=`box-shadow: ${"0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(.11 * (2 - var(--background-luminance, 1))))"}, ${"0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(.13 * (2 - var(--background-luminance, 1))))"};`,Dp=Rp.compose({baseName:"dialog",template:(e,t)=>Ts`
${Os((e=>e.modal),Ts` `)}
`,styles:(e,t)=>Kr` :host([hidden]) { display: none; } :host { --elevation: 14; --dialog-height: 480px; --dialog-width: 640px; display: block; } .overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.3); touch-action: none; } .positioning-region { display: flex; justify-content: center; position: fixed; top: 0; bottom: 0; left: 0; right: 0; overflow: auto; } .control { ${_p} margin-top: auto; margin-bottom: auto; width: var(--dialog-width); height: var(--dialog-height); background-color: ${qd}; z-index: 1; border-radius: calc(${Rc} * 1px); border: calc(${Ac} * 1px) solid transparent; } `}),Ip="horizontal",Pp="separator";class Ap extends eu{constructor(){super(...arguments),this.role=Pp,this.orientation=Ip}}Al([As],Ap.prototype,"role",void 0),Al([As],Ap.prototype,"orientation",void 0);const Bp=Ap.compose({baseName:"divider",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("block")} :host { box-sizing: content-box; height: 0; margin: calc(${Dc} * 1px) 0; border-top: calc(${Ac} * 1px) solid ${Mh}; border-left: none; } :host([orientation="vertical"]) { height: 100%; margin: 0 calc(${Dc} * 1px); border-top: none; border-left: calc(${Ac} * 1px) solid ${Mh}; } `}),Fp="menuitem",Mp="menuitemcheckbox",Vp="menuitemradio",jp={[Fp]:"menuitem",[Mp]:"menuitemcheckbox",[Vp]:"menuitemradio"};class zp extends eu{constructor(){super(...arguments),this.role=Fp,this.hasSubmenu=!1,this.currentDirection=tc.ltr,this.focusSubmenuOnLoad=!1,this.handleMenuItemKeyDown=e=>{if(e.defaultPrevented)return!1;switch(e.key){case Eu:case Ou:return this.invoke(),!1;case Cu:return this.expandAndFocus(),!1;case Su:if(this.expanded)return this.expanded=!1,this.focus(),!1}return!0},this.handleMenuItemClick=e=>(e.defaultPrevented||this.disabled||this.invoke(),!1),this.submenuLoaded=()=>{this.focusSubmenuOnLoad&&(this.focusSubmenuOnLoad=!1,this.hasSubmenu&&(this.submenu.focus(),this.setAttribute("tabindex","-1")))},this.handleMouseOver=e=>(this.disabled||!this.hasSubmenu||this.expanded||(this.expanded=!0),!1),this.handleMouseOut=e=>(!this.expanded||this.contains(document.activeElement)||(this.expanded=!1),!1),this.expandAndFocus=()=>{this.hasSubmenu&&(this.focusSubmenuOnLoad=!0,this.expanded=!0)},this.invoke=()=>{if(!this.disabled)switch(this.role){case Mp:this.checked=!this.checked;break;case Fp:this.updateSubmenu(),this.hasSubmenu?this.expandAndFocus():this.$emit("change");break;case Vp:this.checked||(this.checked=!0)}},this.updateSubmenu=()=>{this.submenu=this.domChildren().find((e=>"menu"===e.getAttribute("role"))),this.hasSubmenu=void 0!==this.submenu}}expandedChanged(e){if(this.$fastController.isConnected){if(void 0===this.submenu)return;!1===this.expanded?this.submenu.collapseExpandedItem():this.currentDirection=pu(this),this.$emit("expanded-change",this,{bubbles:!1})}}checkedChanged(e,t){this.$fastController.isConnected&&this.$emit("change")}connectedCallback(){super.connectedCallback(),Mr.queueUpdate((()=>{this.updateSubmenu()})),this.startColumnCount||(this.startColumnCount=1),this.observer=new MutationObserver(this.updateSubmenu)}disconnectedCallback(){super.disconnectedCallback(),this.submenu=void 0,void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0)}domChildren(){return Array.from(this.children).filter((e=>!e.hasAttribute("hidden")))}}Al([As({mode:"boolean"})],zp.prototype,"disabled",void 0),Al([As({mode:"boolean"})],zp.prototype,"expanded",void 0),Al([Zr],zp.prototype,"startColumnCount",void 0),Al([As],zp.prototype,"role",void 0),Al([As({mode:"boolean"})],zp.prototype,"checked",void 0),Al([Zr],zp.prototype,"submenuRegion",void 0),Al([Zr],zp.prototype,"hasSubmenu",void 0),Al([Zr],zp.prototype,"currentDirection",void 0),Al([Zr],zp.prototype,"submenu",void 0),wu(zp,bu);class Up extends eu{constructor(){super(...arguments),this.expandedItem=null,this.focusIndex=-1,this.isNestedMenu=()=>null!==this.parentElement&&Qu(this.parentElement)&&"menuitem"===this.parentElement.getAttribute("role"),this.handleFocusOut=e=>{if(!this.contains(e.relatedTarget)&&void 0!==this.menuItems){this.collapseExpandedItem();const e=this.menuItems.findIndex(this.isFocusableElement);this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.menuItems[e].setAttribute("tabindex","0"),this.focusIndex=e}},this.handleItemFocus=e=>{const t=e.target;void 0!==this.menuItems&&t!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0"))},this.handleExpandedChanged=e=>{if(e.defaultPrevented||null===e.target||void 0===this.menuItems||this.menuItems.indexOf(e.target)<0)return;e.preventDefault();const t=e.target;null===this.expandedItem||t!==this.expandedItem||!1!==t.expanded?t.expanded&&(null!==this.expandedItem&&this.expandedItem!==t&&(this.expandedItem.expanded=!1),this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.expandedItem=t,this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0")):this.expandedItem=null},this.removeItemListeners=()=>{void 0!==this.menuItems&&this.menuItems.forEach((e=>{e.removeEventListener("expanded-change",this.handleExpandedChanged),e.removeEventListener("focus",this.handleItemFocus)}))},this.setItems=()=>{const e=this.domChildren();this.removeItemListeners(),this.menuItems=e;const t=this.menuItems.filter(this.isMenuItemElement);t.length&&(this.focusIndex=0);const i=t.reduce(((e,t)=>{const i=function(e){const t=e.getAttribute("role"),i=e.querySelector("[slot=start]");return t!==Fp&&null===i||t===Fp&&null!==i?1:t!==Fp&&null!==i?2:0}(t);return e>i?e:i}),0);t.forEach(((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),e.addEventListener("expanded-change",this.handleExpandedChanged),e.addEventListener("focus",this.handleItemFocus),e instanceof zp&&(e.startColumnCount=i)}))},this.changeHandler=e=>{if(void 0===this.menuItems)return;const t=e.target,i=this.menuItems.indexOf(t);if(-1!==i&&"menuitemradio"===t.role&&!0===t.checked){for(let e=i-1;e>=0;--e){const t=this.menuItems[e],i=t.getAttribute("role");if(i===Vp&&(t.checked=!1),"separator"===i)break}const e=this.menuItems.length-1;for(let t=i+1;t<=e;++t){const e=this.menuItems[t],i=e.getAttribute("role");if(i===Vp&&(e.checked=!1),"separator"===i)break}}},this.isMenuItemElement=e=>Qu(e)&&Up.focusableElementRoles.hasOwnProperty(e.getAttribute("role")),this.isFocusableElement=e=>this.isMenuItemElement(e)}itemsChanged(e,t){this.$fastController.isConnected&&void 0!==this.menuItems&&this.setItems()}connectedCallback(){super.connectedCallback(),Mr.queueUpdate((()=>{this.setItems()})),this.addEventListener("change",this.changeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changeHandler)}focus(){this.setFocus(0,1)}collapseExpandedItem(){null!==this.expandedItem&&(this.expandedItem.expanded=!1,this.expandedItem=null)}handleMenuKeyDown(e){if(!e.defaultPrevented&&void 0!==this.menuItems)switch(e.key){case ku:return void this.setFocus(this.focusIndex+1,1);case Nu:return void this.setFocus(this.focusIndex-1,-1);case Tu:return void this.setFocus(this.menuItems.length-1,-1);case Lu:return void this.setFocus(0,1);default:return!0}}domChildren(){return Array.from(this.children).filter((e=>!e.hasAttribute("hidden")))}setFocus(e,t){if(void 0!==this.menuItems)for(;e>=0&&e-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=e,i.setAttribute("tabindex","0"),i.focus();break}e+=t}}}Up.focusableElementRoles=jp,Al([Zr],Up.prototype,"items",void 0);const Hp=class extends Up{connectedCallback(){super.connectedCallback(),qd.setValueFor(this,Fd)}}.compose({baseName:"menu",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("block")} :host { --elevation: 11; background: ${qd}; border: calc(${Ac} * 1px) solid transparent; ${_p} margin: 0; border-radius: calc(${Rc} * 1px); padding: calc(${Dc} * 1px) 0; max-width: 368px; min-width: 64px; } :host([slot="submenu"]) { width: max-content; margin: 0 calc(${Dc} * 1px); } ::slotted(hr) { box-sizing: content-box; height: 0; margin: 0; border: none; border-top: calc(${Ac} * 1px) solid ${Mh}; } `.withBehaviors(Ku(Kr` :host { background: ${Gu.Canvas}; border-color: ${Gu.CanvasText}; } `))});class Wp{constructor(e,t){this.cache=new WeakMap,this.ltr=e,this.rtl=t}bind(e){this.attach(e)}unbind(e){const t=this.cache.get(e);t&&Ic.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new qp(this.ltr,this.rtl,e),i=Ic.getValueFor(e);Ic.subscribe(t),t.attach(i),this.cache.set(e,t)}}class qp{constructor(e,t,i){this.ltr=e,this.rtl=t,this.source=i,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const Kp=zp.compose({baseName:"menu-item",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("grid")} :host { contain: layout; overflow: visible; font-family: ${$c}; outline: none; box-sizing: border-box; height: calc(${ep} * 1px); grid-template-columns: minmax(42px, auto) 1fr minmax(42px, auto); grid-template-rows: auto; justify-items: center; align-items: center; padding: 0; margin: 0 calc(${Dc} * 1px); white-space: nowrap; background: ${wh}; color: ${Dh}; fill: currentcolor; cursor: pointer; font-size: ${Fc}; line-height: ${Mc}; border-radius: calc(${Rc} * 1px); border: calc(${Bc} * 1px) solid transparent; } :host(:hover) { position: relative; z-index: 1; } :host(.indent-0) { grid-template-columns: auto 1fr minmax(42px, auto); } :host(.indent-0) .content { grid-column: 1; grid-row: 1; margin-inline-start: 10px; } :host(.indent-0) .expand-collapse-glyph-container { grid-column: 5; grid-row: 1; } :host(.indent-2) { grid-template-columns: minmax(42px, auto) minmax(42px, auto) 1fr minmax(42px, auto) minmax(42px, auto); } :host(.indent-2) .content { grid-column: 3; grid-row: 1; margin-inline-start: 10px; } :host(.indent-2) .expand-collapse-glyph-container { grid-column: 5; grid-row: 1; } :host(.indent-2) .start { grid-column: 2; } :host(.indent-2) .end { grid-column: 4; } :host(:${Ju}) { border-color: ${$h}; background: ${Sh}; color: ${Dh}; } :host(:hover) { background: ${xh}; color: ${Dh}; } :host(:active) { background: ${kh}; } :host([aria-checked="true"]), :host(.expanded) { background: ${uh}; color: ${Dh}; } :host([disabled]) { cursor: ${Wu}; opacity: ${Pc}; } :host([disabled]:hover) { color: ${Dh}; fill: currentcolor; background: ${wh}; } :host([disabled]:hover) .start, :host([disabled]:hover) .end, :host([disabled]:hover)::slotted(svg) { fill: ${Dh}; } .expand-collapse-glyph { /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px; height: 16px; fill: currentcolor; } .content { grid-column-start: 2; justify-self: start; overflow: hidden; text-overflow: ellipsis; } .start, .end { display: flex; justify-content: center; } ::slotted(svg) { /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px; height: 16px; } :host(:hover) .start, :host(:hover) .end, :host(:hover)::slotted(svg), :host(:active) .start, :host(:active) .end, :host(:active)::slotted(svg) { fill: ${Dh}; } :host(.indent-0[aria-haspopup="menu"]) { display: grid; grid-template-columns: minmax(42px, auto) auto 1fr minmax(42px, auto) minmax(42px, auto); align-items: center; min-height: 32px; } :host(.indent-1[aria-haspopup="menu"]), :host(.indent-1[role="menuitemcheckbox"]), :host(.indent-1[role="menuitemradio"]) { display: grid; grid-template-columns: minmax(42px, auto) auto 1fr minmax(42px, auto) minmax(42px, auto); align-items: center; min-height: 32px; } :host(.indent-2:not([aria-haspopup="menu"])) .end { grid-column: 5; } :host .input-container, :host .expand-collapse-glyph-container { display: none; } :host([aria-haspopup="menu"]) .expand-collapse-glyph-container, :host([role="menuitemcheckbox"]) .input-container, :host([role="menuitemradio"]) .input-container { display: grid; margin-inline-end: 10px; } :host([aria-haspopup="menu"]) .content, :host([role="menuitemcheckbox"]) .content, :host([role="menuitemradio"]) .content { grid-column-start: 3; } :host([aria-haspopup="menu"].indent-0) .content { grid-column-start: 1; } :host([aria-haspopup="menu"]) .end, :host([role="menuitemcheckbox"]) .end, :host([role="menuitemradio"]) .end { grid-column-start: 4; } :host .expand-collapse, :host .checkbox, :host .radio { display: flex; align-items: center; justify-content: center; position: relative; width: 20px; height: 20px; box-sizing: border-box; outline: none; margin-inline-start: 10px; } :host .checkbox, :host .radio { border: calc(${Ac} * 1px) solid ${Dh}; } :host([aria-checked="true"]) .checkbox, :host([aria-checked="true"]) .radio { background: ${Xd}; border-color: ${Xd}; } :host .checkbox { border-radius: calc(${Rc} * 1px); } :host .radio { border-radius: 999px; } :host .checkbox-indicator, :host .radio-indicator, :host .expand-collapse-indicator, ::slotted([slot="checkbox-indicator"]), ::slotted([slot="radio-indicator"]), ::slotted([slot="expand-collapse-indicator"]) { display: none; } ::slotted([slot="end"]:not(svg)) { margin-inline-end: 10px; color: ${Rh} } :host([aria-checked="true"]) .checkbox-indicator, :host([aria-checked="true"]) ::slotted([slot="checkbox-indicator"]) { width: 100%; height: 100%; display: block; fill: ${th}; pointer-events: none; } :host([aria-checked="true"]) .radio-indicator { position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px; border-radius: 999px; display: block; background: ${th}; pointer-events: none; } :host([aria-checked="true"]) ::slotted([slot="radio-indicator"]) { display: block; pointer-events: none; } `.withBehaviors(Ku(Kr` :host { border-color: transparent; color: ${Gu.ButtonText}; forced-color-adjust: none; } :host(:hover) { background: ${Gu.Highlight}; color: ${Gu.HighlightText}; } :host(:hover) .start, :host(:hover) .end, :host(:hover)::slotted(svg), :host(:active) .start, :host(:active) .end, :host(:active)::slotted(svg) { fill: ${Gu.HighlightText}; } :host(.expanded) { background: ${Gu.Highlight}; border-color: ${Gu.Highlight}; color: ${Gu.HighlightText}; } :host(:${Ju}) { background: ${Gu.Highlight}; border-color: ${Gu.ButtonText}; box-shadow: 0 0 0 calc(${Bc} * 1px) inset ${Gu.HighlightText}; color: ${Gu.HighlightText}; fill: currentcolor; } :host([disabled]), :host([disabled]:hover), :host([disabled]:hover) .start, :host([disabled]:hover) .end, :host([disabled]:hover)::slotted(svg) { background: ${Gu.Canvas}; color: ${Gu.GrayText}; fill: currentcolor; opacity: 1; } :host .expanded-toggle, :host .checkbox, :host .radio{ border-color: ${Gu.ButtonText}; background: ${Gu.HighlightText}; } :host([checked="true"]) .checkbox, :host([checked="true"]) .radio { background: ${Gu.HighlightText}; border-color: ${Gu.HighlightText}; } :host(:hover) .expanded-toggle, :host(:hover) .checkbox, :host(:hover) .radio, :host(:${Ju}) .expanded-toggle, :host(:${Ju}) .checkbox, :host(:${Ju}) .radio, :host([checked="true"]:hover) .checkbox, :host([checked="true"]:hover) .radio, :host([checked="true"]:${Ju}) .checkbox, :host([checked="true"]:${Ju}) .radio { border-color: ${Gu.HighlightText}; } :host([aria-checked="true"]) { background: ${Gu.Highlight}; color: ${Gu.HighlightText}; } :host([aria-checked="true"]) .checkbox-indicator, :host([aria-checked="true"]) ::slotted([slot="checkbox-indicator"]), :host([aria-checked="true"]) ::slotted([slot="radio-indicator"]) { fill: ${Gu.Highlight}; } :host([aria-checked="true"]) .radio-indicator { background: ${Gu.Highlight}; } ::slotted([slot="end"]:not(svg)) { color: ${Gu.ButtonText}; } :host(:hover) ::slotted([slot="end"]:not(svg)), :host(:${Ju}) ::slotted([slot="end"]:not(svg)) { color: ${Gu.HighlightText}; } `),new Wp(Kr` .expand-collapse-glyph { transform: rotate(0deg); } `,Kr` .expand-collapse-glyph { transform: rotate(180deg); } `)),checkboxIndicator:`\n \n \n \n `,expandCollapseGlyph:`\n \n \n \n `,radioIndicator:`\n \n `});function Gp(e){return Qu(e)&&("option"===e.getAttribute("role")||e instanceof HTMLOptionElement)}class Xp extends eu{constructor(e,t,i,o){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,e&&(this.textContent=e),t&&(this.initialValue=t),i&&(this.defaultSelected=i),o&&(this.selected=o),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(e,t){this.ariaChecked="boolean"!=typeof t?null:t?"true":"false"}contentChanged(e,t){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(e,t){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var e;return null!==(e=this.value)&&void 0!==e?e:this.text}get text(){var e,t;return null!==(t=null===(e=this.textContent)||void 0===e?void 0:e.replace(/\s+/g," ").trim())&&void 0!==t?t:""}set value(e){const t=`${null!=e?e:""}`;this._value=t,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=t),Qr.notify(this,"value")}get value(){var e;return Qr.track(this,"value"),null!==(e=this._value)&&void 0!==e?e:this.text}get form(){return this.proxy?this.proxy.form:null}}Al([Zr],Xp.prototype,"checked",void 0),Al([Zr],Xp.prototype,"content",void 0),Al([Zr],Xp.prototype,"defaultSelected",void 0),Al([As({mode:"boolean"})],Xp.prototype,"disabled",void 0),Al([As({attribute:"selected",mode:"boolean"})],Xp.prototype,"selectedAttribute",void 0),Al([Zr],Xp.prototype,"selected",void 0),Al([As({attribute:"value",mode:"fromView"})],Xp.prototype,"initialValue",void 0);class Yp{}Al([Zr],Yp.prototype,"ariaChecked",void 0),Al([Zr],Yp.prototype,"ariaPosInSet",void 0),Al([Zr],Yp.prototype,"ariaSelected",void 0),Al([Zr],Yp.prototype,"ariaSetSize",void 0),wu(Yp,vu),wu(Xp,bu,Yp);const Qp=Xp.compose({baseName:"option",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("inline-flex")} :host { align-items: center; font-family: ${$c}; border-radius: calc(${Rc} * 1px); border: calc(${Bc} * 1px) solid transparent; box-sizing: border-box; background: ${wh}; color: ${Dh}; cursor: pointer; flex: 0 0 auto; fill: currentcolor; font-size: ${Fc}; height: calc(${ep} * 1px); line-height: ${Mc}; margin: 0 calc((${Dc} - ${Bc}) * 1px); outline: none; overflow: hidden; padding: 0 1ch; user-select: none; white-space: nowrap; } :host(:not([disabled]):not([aria-selected="true"]):hover) { background: ${xh}; } :host(:not([disabled]):not([aria-selected="true"]):active) { background: ${kh}; } :host([aria-selected="true"]) { background: ${Xd}; color: ${th}; } :host(:not([disabled])[aria-selected="true"]:hover) { background: ${Yd}; color: ${ih}; } :host(:not([disabled])[aria-selected="true"]:active) { background: ${Qd}; color: ${oh}; } :host([disabled]) { cursor: ${Wu}; opacity: ${Pc}; } .content { grid-column-start: 2; justify-self: start; overflow: hidden; text-overflow: ellipsis; } .start, .end, ::slotted(svg) { display: flex; } ::slotted(svg) { /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ height: calc(${Dc} * 4px); width: calc(${Dc} * 4px); } ::slotted([slot="end"]) { margin-inline-start: 1ch; } ::slotted([slot="start"]) { margin-inline-end: 1ch; } :host([aria-checked="true"][aria-selected="false"]) { border-color: ${$h}; } :host([aria-checked="true"][aria-selected="true"]) { border-color: ${$h}; box-shadow: 0 0 0 calc(${Bc} * 2 * 1px) inset ${Th}; } `.withBehaviors(Ku(Kr` :host { border-color: transparent; forced-color-adjust: none; color: ${Gu.ButtonText}; fill: currentcolor; } :host(:not([aria-selected="true"]):hover), :host([aria-selected="true"]) { background: ${Gu.Highlight}; color: ${Gu.HighlightText}; } :host([disabled]), :host([disabled][aria-selected="false"]:hover) { background: ${Gu.Canvas}; color: ${Gu.GrayText}; fill: currentcolor; opacity: 1; } :host([aria-checked="true"][aria-selected="false"]) { background: ${Gu.ButtonFace}; color: ${Gu.ButtonText}; border-color: ${Gu.ButtonText}; } :host([aria-checked="true"][aria-selected="true"]), :host([aria-checked="true"][aria-selected="true"]:hover) { background: ${Gu.Highlight}; color: ${Gu.HighlightText}; border-color: ${Gu.ButtonText}; } `))});class Zp extends eu{}class Jp extends(Fu(Zp)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class eg extends Jp{constructor(){super(),this.initialValue="on",this.keypressHandler=e=>{if(e.key!==Ou)return!0;this.checked||this.readOnly||(this.checked=!0)},this.proxy.setAttribute("type","radio")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){var e;this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=null!==(e=this.defaultChecked)&&void 0!==e&&e,this.dirtyChecked=!1))}connectedCallback(){var e,t;super.connectedCallback(),this.validate(),"radiogroup"!==(null===(e=this.parentElement)||void 0===e?void 0:e.getAttribute("role"))&&null===this.getAttribute("tabindex")&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=null!==(t=this.defaultChecked)&&void 0!==t&&t,this.dirtyChecked=!1))}isInsideRadioGroup(){return null!==this.closest("[role=radiogroup]")}clickHandler(e){this.disabled||this.readOnly||this.checked||(this.checked=!0)}}Al([As({attribute:"readonly",mode:"boolean"})],eg.prototype,"readOnly",void 0),Al([Zr],eg.prototype,"name",void 0),Al([Zr],eg.prototype,"defaultSlottedNodes",void 0);const tg=eg.compose({baseName:"radio",template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("inline-flex")} :host { --input-size: calc((${ep} / 2) + ${Dc}); align-items: center; outline: none; margin: calc(${Dc} * 1px) 0; /* Chromium likes to select label text or the default slot when the radio is clicked. Maybe there is a better solution here? */ user-select: none; position: relative; flex-direction: row; transition: all 0.2s ease-in-out; } .control { position: relative; width: calc((${ep} / 2 + ${Dc}) * 1px); height: calc((${ep} / 2 + ${Dc}) * 1px); box-sizing: border-box; border-radius: 999px; border: calc(${Ac} * 1px) solid ${Ph}; background: ${vh}; outline: none; cursor: pointer; } .label { font-family: ${$c}; color: ${Dh}; padding-inline-start: calc(${Dc} * 2px + 2px); margin-inline-end: calc(${Dc} * 2px + 2px); cursor: pointer; font-size: ${Fc}; line-height: ${Mc}; } .label__hidden { display: none; visibility: hidden; } .control, .checked-indicator { flex-shrink: 0; } .checked-indicator { position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px; border-radius: 999px; display: inline-block; background: ${th}; fill: ${th}; opacity: 0; pointer-events: none; } :host(:not([disabled])) .control:hover{ background: ${bh}; border-color: ${Ah}; } :host(:not([disabled])) .control:active { background: ${mh}; border-color: ${Bh}; } :host(:${Ju}) .control { box-shadow: 0 0 0 2px ${qd}, 0 0 0 4px ${$h}; } :host([aria-checked="true"]) .control { background: ${Xd}; border: calc(${Ac} * 1px) solid ${Xd}; } :host([aria-checked="true"]:not([disabled])) .control:hover { background: ${Yd}; border: calc(${Ac} * 1px) solid ${Yd}; } :host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator { background: ${ih}; fill: ${ih}; } :host([aria-checked="true"]:not([disabled])) .control:active { background: ${Qd}; border: calc(${Ac} * 1px) solid ${Qd}; } :host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator { background: ${oh}; fill: ${oh}; } :host([aria-checked="true"]:${Ju}:not([disabled])) .control { box-shadow: 0 0 0 2px ${qd}, 0 0 0 4px ${$h}; } :host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control { cursor: ${Wu}; } :host([aria-checked="true"]) .checked-indicator { opacity: 1; } :host([disabled]) { opacity: ${Pc}; } `.withBehaviors(Ku(Kr` .control, :host([aria-checked="true"]:not([disabled])) .control { forced-color-adjust: none; border-color: ${Gu.FieldText}; background: ${Gu.Field}; } :host(:not([disabled])) .control:hover { border-color: ${Gu.Highlight}; background: ${Gu.Field}; } :host([aria-checked="true"]:not([disabled])) .control:hover, :host([aria-checked="true"]:not([disabled])) .control:active { border-color: ${Gu.Highlight}; background: ${Gu.Highlight}; } :host([aria-checked="true"]) .checked-indicator { background: ${Gu.Highlight}; fill: ${Gu.Highlight}; } :host([aria-checked="true"]:not([disabled])) .control:hover .checked-indicator, :host([aria-checked="true"]:not([disabled])) .control:active .checked-indicator { background: ${Gu.HighlightText}; fill: ${Gu.HighlightText}; } :host(:${Ju}) .control { border-color: ${Gu.Highlight}; box-shadow: 0 0 0 2px ${Gu.Field}, 0 0 0 4px ${Gu.FieldText}; } :host([aria-checked="true"]:${Ju}:not([disabled])) .control { border-color: ${Gu.Highlight}; box-shadow: 0 0 0 2px ${Gu.Field}, 0 0 0 4px ${Gu.FieldText}; } :host([disabled]) { forced-color-adjust: none; opacity: 1; } :host([disabled]) .label { color: ${Gu.GrayText}; } :host([disabled]) .control, :host([aria-checked="true"][disabled]) .control:hover, .control:active { background: ${Gu.Field}; border-color: ${Gu.GrayText}; } :host([disabled]) .checked-indicator, :host([aria-checked="true"][disabled]) .control:hover .checked-indicator { fill: ${Gu.GrayText}; background: ${Gu.GrayText}; } `)),checkedIndicator:`\n
\n `});class ig extends eu{constructor(){super(...arguments),this.orientation=Ip,this.radioChangeHandler=e=>{const t=e.target;t.checked&&(this.slottedRadioButtons.forEach((e=>{e!==t&&(e.checked=!1,this.isInsideFoundationToolbar||e.setAttribute("tabindex","-1"))})),this.selectedRadio=t,this.value=t.value,t.setAttribute("tabindex","0"),this.focusedRadio=t),e.stopPropagation()},this.moveToRadioByIndex=(e,t)=>{const i=e[t];this.isInsideToolbar||(i.setAttribute("tabindex","0"),i.readOnly?this.slottedRadioButtons.forEach((e=>{e!==i&&e.setAttribute("tabindex","-1")})):(i.checked=!0,this.selectedRadio=i)),this.focusedRadio=i,i.focus()},this.moveRightOffGroup=()=>{var e;null===(e=this.nextElementSibling)||void 0===e||e.focus()},this.moveLeftOffGroup=()=>{var e;null===(e=this.previousElementSibling)||void 0===e||e.focus()},this.focusOutHandler=e=>{const t=this.slottedRadioButtons,i=e.target,o=null!==i?t.indexOf(i):0,n=this.focusedRadio?t.indexOf(this.focusedRadio):-1;return(0===n&&o===n||n===t.length-1&&n===o)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),t.forEach((e=>{e!==this.selectedRadio&&e.setAttribute("tabindex","-1")})))):(this.focusedRadio=t[0],this.focusedRadio.setAttribute("tabindex","0"),t.forEach((e=>{e!==this.focusedRadio&&e.setAttribute("tabindex","-1")})))),!0},this.clickHandler=e=>{const t=e.target;if(t){const e=this.slottedRadioButtons;t.checked||0===e.indexOf(t)?(t.setAttribute("tabindex","0"),this.selectedRadio=t):(t.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=t}e.preventDefault()},this.shouldMoveOffGroupToTheRight=(e,t,i)=>e===t.length&&this.isInsideToolbar&&i===Cu,this.shouldMoveOffGroupToTheLeft=(e,t)=>(this.focusedRadio?e.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&t===Su,this.checkFocusedRadio=()=>{null===this.focusedRadio||this.focusedRadio.readOnly||this.focusedRadio.checked||(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=e=>{const t=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?t.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(i,t,e.key))this.moveRightOffGroup();else for(i===t.length&&(i=0);i1;){if(!t[i].disabled){this.moveToRadioByIndex(t,i);break}if(this.focusedRadio&&i===t.indexOf(this.focusedRadio))break;if(i+1>=t.length){if(this.isInsideToolbar)break;i=0}else i+=1}},this.moveLeft=e=>{const t=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?t.indexOf(this.focusedRadio)-1:0,i=i<0?t.length-1:i,this.shouldMoveOffGroupToTheLeft(t,e.key))this.moveLeftOffGroup();else for(;i>=0&&t.length>1;){if(!t[i].disabled){this.moveToRadioByIndex(t,i);break}if(this.focusedRadio&&i===t.indexOf(this.focusedRadio))break;i-1<0?i=t.length-1:i-=1}},this.keydownHandler=e=>{const t=e.key;if(t in _u&&this.isInsideFoundationToolbar)return!0;switch(t){case Eu:this.checkFocusedRadio();break;case Cu:case ku:this.direction===tc.ltr?this.moveRight(e):this.moveLeft(e);break;case Su:case Nu:this.direction===tc.ltr?this.moveLeft(e):this.moveRight(e);break;default:return!0}}}readOnlyChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{this.readOnly?e.readOnly=!0:e.readOnly=!1}))}disabledChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{this.disabled?e.disabled=!0:e.disabled=!1}))}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{e.setAttribute("name",this.name)}))}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{e.value===this.value&&(e.checked=!0,this.selectedRadio=e)})),this.$emit("change")}slottedRadioButtonsChanged(e,t){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){var e;return null!==(e=this.parentToolbar)&&void 0!==e&&e}get isInsideFoundationToolbar(){var e;return!!(null===(e=this.parentToolbar)||void 0===e?void 0:e["$fastController"])}connectedCallback(){super.connectedCallback(),this.direction=pu(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach((e=>{e.removeEventListener("change",this.radioChangeHandler)}))}setupRadioButtons(){const e=this.slottedRadioButtons.filter((e=>e.hasAttribute("checked"))),t=e?e.length:0;if(t>1){e[t-1].checked=!0}let i=!1;if(this.slottedRadioButtons.forEach((e=>{void 0!==this.name&&e.setAttribute("name",this.name),this.disabled&&(e.disabled=!0),this.readOnly&&(e.readOnly=!0),this.value&&this.value===e.value?(this.selectedRadio=e,this.focusedRadio=e,e.checked=!0,e.setAttribute("tabindex","0"),i=!0):(this.isInsideFoundationToolbar||e.setAttribute("tabindex","-1"),e.checked=!1),e.addEventListener("change",this.radioChangeHandler)})),void 0===this.value&&this.slottedRadioButtons.length>0){const e=this.slottedRadioButtons.filter((e=>e.hasAttribute("checked"))),t=null!==e?e.length:0;if(t>0&&!i){const i=e[t-1];i.checked=!0,this.focusedRadio=i,i.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}}Al([As({attribute:"readonly",mode:"boolean"})],ig.prototype,"readOnly",void 0),Al([As({attribute:"disabled",mode:"boolean"})],ig.prototype,"disabled",void 0),Al([As],ig.prototype,"name",void 0),Al([As],ig.prototype,"value",void 0),Al([As],ig.prototype,"orientation",void 0),Al([Zr],ig.prototype,"childItems",void 0),Al([Zr],ig.prototype,"slottedRadioButtons",void 0);const og=ig.compose({baseName:"radio-group",template:(e,t)=>{return Ts` `;var i},styles:(e,t)=>Kr` ${Yu("flex")} :host { align-items: flex-start; margin: calc(${Dc} * 1px) 0; flex-direction: column; } .positioning-region { display: flex; flex-wrap: wrap; } :host([orientation="vertical"]) .positioning-region { flex-direction: column; } :host([orientation="horizontal"]) .positioning-region { flex-direction: row; } `});let ng=0;function rg(e=""){return`${e}${ng++}`}class sg extends eu{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var e;return null!==(e=this.selectedOptions[0])&&void 0!==e?e:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every((e=>e.disabled))}get length(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.length)&&void 0!==t?t:0}get options(){return Qr.track(this,"options"),this._options}set options(e){this._options=e,Qr.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(e){this.typeaheadExpired=e}clickHandler(e){const t=e.target.closest(`option,[role=option]`);if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&null!==e&&(e.focus(),requestAnimationFrame((()=>{e.scrollIntoView({block:"nearest"})})))}focusinHandler(e){this.shouldSkipFocus||e.target!==e.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^${e}`,"gi");return this.options.filter((e=>e.text.trim().match(t)))}getSelectableIndex(e=this.selectedIndex,t){const i=e>t?-1:e!e&&!t.disabled&&i!e&&!t.disabled&&i>o?t:e),n)}return this.options.indexOf(n)}handleChange(e,t){if("selected"===t)sg.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions()}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout((()=>this.typeaheadExpired=!0),sg.TYPE_AHEAD_TIMEOUT_MS),e.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${e}`)}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;const t=e.key;switch(t){case Lu:e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case ku:e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case Nu:e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case Tu:e.preventDefault(),this.selectLastOption();break;case Ru:return this.focusAndScrollOptionIntoView(),!0;case Eu:case $u:return!0;case Ou:if(this.typeaheadExpired)return!0;default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(e,t){this.ariaMultiSelectable=t?"true":null}selectedIndexChanged(e,t){var i;if(this.hasSelectableOptions){if((null===(i=this.options[this.selectedIndex])||void 0===i?void 0:i.disabled)&&"number"==typeof e){const i=this.getSelectableIndex(e,t),o=i>-1?i:e;return this.selectedIndex=o,void(t===o&&this.selectedIndexChanged(t,o))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(e,t){var i;const o=t.filter(sg.slottedOptionFilter);null===(i=this.options)||void 0===i||i.forEach((e=>{const t=Qr.getNotifier(e);t.unsubscribe(this,"selected"),e.selected=o.includes(e),t.subscribe(this,"selected")}))}selectFirstOption(){var e,t;this.disabled||(this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex((e=>!e.disabled)))&&void 0!==t?t:-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(e,t){let i=e.length;for(;i--;)if(t(e[i],i,e))return i;return-1}(this.options,(e=>!e.disabled)))}selectNextOption(){!this.disabled&&this.selectedIndex0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var e,t;this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex((e=>e.defaultSelected)))&&void 0!==t?t:-1}setSelectedOptions(){var e,t,i;(null===(e=this.options)||void 0===e?void 0:e.length)&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=null!==(i=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.id)&&void 0!==i?i:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(e,t){this.options=t.reduce(((e,t)=>(Gp(t)&&e.push(t),e)),[]);const i=`${this.options.length}`;this.options.forEach(((e,t)=>{e.id||(e.id=rg("option-")),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=i})),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches();if(e.length){const t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}}sg.slottedOptionFilter=e=>Gp(e)&&!e.hidden,sg.TYPE_AHEAD_TIMEOUT_MS=1e3,Al([As({mode:"boolean"})],sg.prototype,"disabled",void 0),Al([Zr],sg.prototype,"selectedIndex",void 0),Al([Zr],sg.prototype,"selectedOptions",void 0),Al([Zr],sg.prototype,"slottedOptions",void 0),Al([Zr],sg.prototype,"typeaheadBuffer",void 0);class ag{}function lg(e,t,i=0){return[t,i]=[t,i].sort(((e,t)=>e-t)),t<=e&&ee.checked))}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(e,t){var i,o;this.ariaActiveDescendant=null!==(o=null===(i=this.options[t])||void 0===i?void 0:i.id)&&void 0!==o?o:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const e=this.activeOption;e&&(e.checked=!0)}checkFirstOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach(((e,t)=>{e.checked=lg(t,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((e,t)=>{e.checked=lg(t,this.rangeStartIndex,this.options.length)}))):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((e,t)=>{e.checked=lg(t,this.rangeStartIndex,this.activeIndex+1)}))):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex{e.checked=lg(t,this.activeIndex,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(e){var t;if(!this.multiple)return super.clickHandler(e);const i=null===(t=e.target)||void 0===t?void 0:t.closest(`[role=option]`);return i&&!i.disabled?(this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(i),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0):void 0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(e){if(!this.multiple)return super.focusinHandler(e);this.shouldSkipFocus||e.target!==e.currentTarget||(this.uncheckAllOptions(),-1===this.activeIndex&&(this.activeIndex=-1!==this.firstSelectedOptionIndex?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(e){this.multiple&&this.uncheckAllOptions()}keydownHandler(e){if(!this.multiple)return super.keydownHandler(e);if(this.disabled)return!0;const{key:t,shiftKey:i}=e;switch(this.shouldSkipFocus=!1,t){case Lu:return void this.checkFirstOption(i);case ku:return void this.checkNextOption(i);case Nu:return void this.checkPreviousOption(i);case Tu:return void this.checkLastOption(i);case Ru:return this.focusAndScrollOptionIntoView(),!0;case $u:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case Ou:if(e.preventDefault(),this.typeAheadExpired)return void this.toggleSelectedForAllCheckedOptions();default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){if(e.offsetX>=0&&e.offsetX<=this.scrollWidth)return super.mousedownHandler(e)}multipleChanged(e,t){var i;this.ariaMultiSelectable=t?"true":null,null===(i=this.options)||void 0===i||i.forEach((e=>{e.checked=!t&&void 0})),this.setSelectedOptions()}setSelectedOptions(){this.multiple?this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter((e=>e.selected)),this.focusAndScrollOptionIntoView()):super.setSelectedOptions()}sizeChanged(e,t){var i;const o=Math.max(0,parseInt(null!==(i=null==t?void 0:t.toFixed())&&void 0!==i?i:"",10));o!==t&&Mr.queueUpdate((()=>{this.size=o}))}toggleSelectedForAllCheckedOptions(){const e=this.checkedOptions.filter((e=>!e.disabled)),t=!e.every((e=>e.selected));e.forEach((e=>e.selected=t)),this.selectedIndex=this.options.indexOf(e[e.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(e,t){if(this.multiple){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches(),t=this.options.indexOf(e[0]);t>-1&&(this.activeIndex=t,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}else super.typeaheadBufferChanged(e,t)}uncheckAllOptions(e=!1){this.options.forEach((e=>e.checked=!this.multiple&&void 0)),e||(this.rangeStartIndex=-1)}}Al([Zr],cg.prototype,"activeIndex",void 0),Al([As({mode:"boolean"})],cg.prototype,"multiple",void 0),Al([As({converter:Is})],cg.prototype,"size",void 0);class dg extends cg{}class hg extends(Bu(dg)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const ug="above",pg="below";class gg extends hg{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=rg("listbox-"),this.maxHeight=0}openChanged(e,t){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void Mr.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get value(){return Qr.track(this,"value"),this._value}set value(e){var t,i,o,n,r,s,a;const l=`${this._value}`;if(null===(t=this._options)||void 0===t?void 0:t.length){const t=this._options.findIndex((t=>t.value===e)),l=null!==(o=null===(i=this._options[this.selectedIndex])||void 0===i?void 0:i.value)&&void 0!==o?o:null,c=null!==(r=null===(n=this._options[t])||void 0===n?void 0:n.value)&&void 0!==r?r:null;-1!==t&&l===c||(e="",this.selectedIndex=t),e=null!==(a=null===(s=this.firstSelectedOption)||void 0===s?void 0:s.value)&&void 0!==a?a:e}l!==e&&(this._value=e,super.valueChanged(l,e),Qr.notify(this,"value"),this.updateDisplayValue())}updateValue(e){var t,i;this.$fastController.isConnected&&(this.value=null!==(i=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value)&&void 0!==i?i:""),e&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(e,t){super.selectedIndexChanged(e,t),this.updateValue()}positionChanged(e,t){this.positionAttribute=t,this.setPositioning()}setPositioning(){const e=this.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.position=this.forcedPosition?this.positionAttribute:e.top>t?ug:pg,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===ug?~~e.top:~~t}get displayValue(){var e,t;return Qr.track(this,"displayValue"),null!==(t=null===(e=this.firstSelectedOption)||void 0===e?void 0:e.text)&&void 0!==t?t:""}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest(`option,[role=option]`);if(t&&t.disabled)return}return super.clickHandler(e),this.open=this.collapsible&&!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(e){var t;if(super.focusoutHandler(e),!this.open)return!0;const i=e.relatedTarget;this.isSameNode(i)?this.focus():(null===(t=this.options)||void 0===t?void 0:t.includes(i))||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(e,t){super.handleChange(e,t),"value"===t&&this.updateValue()}slottedOptionsChanged(e,t){this.options.forEach((e=>{Qr.getNotifier(e).unsubscribe(this,"value")})),super.slottedOptionsChanged(e,t),this.options.forEach((e=>{Qr.getNotifier(e).subscribe(this,"value")})),this.setProxyOptions(),this.updateValue()}mousedownHandler(e){var t;return e.offsetX>=0&&e.offsetX<=(null===(t=this.listbox)||void 0===t?void 0:t.scrollWidth)?super.mousedownHandler(e):this.collapsible}multipleChanged(e,t){super.multipleChanged(e,t),this.proxy&&(this.proxy.multiple=t)}selectedOptionsChanged(e,t){var i;super.selectedOptionsChanged(e,t),null===(i=this.options)||void 0===i||i.forEach(((e,t)=>{var i;const o=null===(i=this.proxy)||void 0===i?void 0:i.options.item(t);o&&(o.selected=e.selected)}))}setDefaultSelectedOption(){var e;const t=null!==(e=this.options)&&void 0!==e?e:Array.from(this.children).filter(sg.slottedOptionFilter),i=null==t?void 0:t.findIndex((e=>e.hasAttribute("selected")||e.selected||e.value===this.value));this.selectedIndex=-1===i?0:i}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((e=>{const t=e.proxy||(e instanceof HTMLOptionElement?e.cloneNode():null);t&&this.proxy.options.add(t)})))}keydownHandler(e){super.keydownHandler(e);const t=e.key||e.key.charCodeAt(0);switch(t){case Ou:e.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break;case Lu:case Tu:e.preventDefault();break;case Eu:e.preventDefault(),this.open=!this.open;break;case $u:this.collapsible&&this.open&&(e.preventDefault(),this.open=!1);break;case Ru:return this.collapsible&&this.open&&(e.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(t===ku||t===Nu)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(e,t){super.sizeChanged(e,t),this.proxy&&(this.proxy.size=t)}updateDisplayValue(){this.collapsible&&Qr.notify(this,"displayValue")}}Al([As({attribute:"open",mode:"boolean"})],gg.prototype,"open",void 0),Al([Jr],gg.prototype,"collapsible",null),Al([Zr],gg.prototype,"control",void 0),Al([As({attribute:"position"})],gg.prototype,"positionAttribute",void 0),Al([Zr],gg.prototype,"position",void 0),Al([Zr],gg.prototype,"maxHeight",void 0);class fg{}Al([Zr],fg.prototype,"ariaControls",void 0),wu(fg,ag),wu(gg,bu,fg);class vg extends gg{constructor(){super(...arguments),this.listboxScrollWidth=""}connectedCallback(){super.connectedCallback(),this.listbox&&qd.setValueFor(this.listbox,Fd)}get listboxMaxHeight(){return Math.floor(this.maxHeight/Vh.getValueFor(this)).toString()}listboxScrollWidthChanged(){this.updateComputedStylesheet()}get selectSize(){var e;return`${null!==(e=this.size)&&void 0!==e?e:this.multiple?4:0}`}multipleChanged(e,t){super.multipleChanged(e,t),this.updateComputedStylesheet()}maxHeightChanged(e,t){this.collapsible&&this.updateComputedStylesheet()}setPositioning(){super.setPositioning(),this.updateComputedStylesheet()}sizeChanged(e,t){super.sizeChanged(e,t),this.updateComputedStylesheet(),this.collapsible?requestAnimationFrame((()=>{this.listbox.style.setProperty("display","flex"),this.listbox.style.setProperty("overflow","visible"),this.listbox.style.setProperty("visibility","hidden"),this.listbox.style.setProperty("width","auto"),this.listbox.hidden=!1,this.listboxScrollWidth=`${this.listbox.scrollWidth}`,this.listbox.hidden=!0,this.listbox.style.removeProperty("display"),this.listbox.style.removeProperty("overflow"),this.listbox.style.removeProperty("visibility"),this.listbox.style.removeProperty("width")})):this.listboxScrollWidth=""}updateComputedStylesheet(){this.computedStylesheet&&this.$fastController.removeStyles(this.computedStylesheet),this.computedStylesheet=Kr` :host { --listbox-max-height: ${this.listboxMaxHeight}; --listbox-scroll-width: ${this.listboxScrollWidth}; --size: ${this.selectSize}; } `,this.$fastController.addStyles(this.computedStylesheet)}}Al([Zr],vg.prototype,"listboxScrollWidth",void 0);const bg=vg.compose({baseName:"select",baseClass:gg,template:(e,t)=>Ts` `,styles:(e,t)=>{const i=e.name===e.tagFor(gg);return Kr` ${Yu("inline-flex")} :host { --elevation: 14; background: ${vh}; border-radius: calc(${Rc} * 1px); border: calc(${Ac} * 1px) solid ${Xd}; box-sizing: border-box; color: ${Dh}; font-family: ${$c}; height: calc(${ep} * 1px); position: relative; user-select: none; min-width: 250px; outline: none; vertical-align: top; } ${i?Kr` :host(:not([aria-haspopup])) { --elevation: 0; border: 0; height: auto; min-width: 0; } `:""} ${((e,t)=>{const i=e.tagFor(Xp),o=e.name===e.tagFor(cg)?"":".listbox";return Kr` ${o?"":Yu("inline-flex")} :host ${o} { background: ${qd}; border: calc(${Ac} * 1px) solid ${Ph}; border-radius: calc(${Rc} * 1px); box-sizing: border-box; flex-direction: column; padding: calc(${Dc} * 1px) 0; } ${o?``:Kr` :host(:focus-within:not([disabled])) { border-color: ${$h}; box-shadow: 0 0 0 calc((${Bc} - ${Ac}) * 1px) ${$h} inset; } :host([disabled]) ::slotted(*) { cursor: ${Wu}; opacity: ${Pc}; pointer-events: none; } `} ${o||`:host([size])`} { max-height: calc( (var(--size) * ${ep} + (${Dc} * ${Ac} * 2)) * 1px ); overflow-y: auto; } :host([size="0"]) ${o} { max-height: none; } `.withBehaviors(Ku(Kr` :host(:not([multiple]):${Ju}) ::slotted(${i}[aria-selected="true"]), :host([multiple]:${Ju}) ::slotted(${i}[aria-checked="true"]) { border-color: ${Gu.ButtonText}; box-shadow: 0 0 0 calc(${Bc} * 1px) inset ${Gu.HighlightText}; } :host(:not([multiple]):${Ju}) ::slotted(${i}[aria-selected="true"]) { background: ${Gu.Highlight}; color: ${Gu.HighlightText}; fill: currentcolor; } ::slotted(${i}[aria-selected="true"]:not([aria-checked="true"])) { background: ${Gu.Highlight}; border-color: ${Gu.HighlightText}; color: ${Gu.HighlightText}; } `))})(e)} :host .listbox { ${_p} border: none; display: flex; left: 0; position: absolute; width: 100%; z-index: 1; } .control + .listbox { --stroke-size: calc(${Dc} * ${Ac} * 2); max-height: calc( (var(--listbox-max-height) * ${ep} + var(--stroke-size)) * 1px ); } ${i?Kr` :host(:not([aria-haspopup])) .listbox { left: auto; position: static; z-index: auto; } `:""} .listbox[hidden] { display: none; } .control { align-items: center; box-sizing: border-box; cursor: pointer; display: flex; font-size: ${Fc}; font-family: inherit; line-height: ${Mc}; min-height: 100%; padding: 0 calc(${Dc} * 2.25px); width: 100%; } :host(:not([disabled]):hover) { background: ${bh}; border-color: ${Yd}; } :host(:${Ju}) { border-color: ${$h}; } :host(:not([size]):not([multiple]):not([open]):${Ju}), :host([multiple]:${Ju}), :host([size]:${Ju}) { box-shadow: 0 0 0 calc(${Bc} * 1px) ${$h}; } :host(:not([multiple]):not([size]):${Ju}) ::slotted(${e.tagFor(Xp)}[aria-selected="true"]:not([disabled])) { box-shadow: 0 0 0 calc(${Bc} * 1px) inset ${Th}; border-color: ${$h}; background: ${Zd}; color: ${nh}; } :host([disabled]) { cursor: ${Wu}; opacity: ${Pc}; } :host([disabled]) .control { cursor: ${Wu}; user-select: none; } :host([disabled]:hover) { background: ${wh}; color: ${Dh}; fill: currentcolor; } :host(:not([disabled])) .control:active { background: ${mh}; border-color: ${Qd}; border-radius: calc(${Rc} * 1px); } :host([open][position="above"]) .listbox { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; bottom: calc(${ep} * 1px); } :host([open][position="below"]) .listbox { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; top: calc(${ep} * 1px); } .selected-value { flex: 1 1 auto; font-family: inherit; min-width: calc(var(--listbox-scroll-width, 0) - (${Dc} * 4) * 1px); overflow: hidden; text-align: start; text-overflow: ellipsis; white-space: nowrap; } .indicator { flex: 0 0 auto; margin-inline-start: 1em; } slot[name="listbox"] { display: none; width: 100%; } :host([open]) slot[name="listbox"] { display: flex; position: absolute; ${_p} } .end { margin-inline-start: auto; } .start, .end, .indicator, .select-indicator, ::slotted(svg) { /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ fill: currentcolor; height: 1em; min-height: calc(${Dc} * 4px); min-width: calc(${Dc} * 4px); width: 1em; } ::slotted([role="option"]), ::slotted(option) { flex: 0 0 auto; } `.withBehaviors(Ku(Kr` :host(:not([disabled]):hover), :host(:not([disabled]):active) { border-color: ${Gu.Highlight}; } :host(:not([disabled]):${Ju}) { background-color: ${Gu.ButtonFace}; box-shadow: 0 0 0 calc(${Bc} * 1px) ${Gu.Highlight}; color: ${Gu.ButtonText}; fill: currentcolor; forced-color-adjust: none; } :host(:not([disabled]):${Ju}) .listbox { background: ${Gu.ButtonFace}; } :host([disabled]) { border-color: ${Gu.GrayText}; background-color: ${Gu.ButtonFace}; color: ${Gu.GrayText}; fill: currentcolor; opacity: 1; forced-color-adjust: none; } :host([disabled]:hover) { background: ${Gu.ButtonFace}; } :host([disabled]) .control { color: ${Gu.GrayText}; border-color: ${Gu.GrayText}; } :host([disabled]) .control .select-indicator { fill: ${Gu.GrayText}; } :host(:${Ju}) ::slotted([aria-selected="true"][role="option"]), :host(:${Ju}) ::slotted(option[aria-selected="true"]), :host(:${Ju}) ::slotted([aria-selected="true"][role="option"]:not([disabled])) { background: ${Gu.Highlight}; border-color: ${Gu.ButtonText}; box-shadow: 0 0 0 calc(${Bc} * 1px) inset ${Gu.HighlightText}; color: ${Gu.HighlightText}; fill: currentcolor; } .start, .end, .indicator, .select-indicator, ::slotted(svg) { color: ${Gu.ButtonText}; fill: currentcolor; } `))},indicator:`\n \n \n \n `});class mg extends eu{}class yg extends(Bu(mg)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const wg="text";class xg extends yg{constructor(){super(...arguments),this.type=wg}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&Mr.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}}Al([As({attribute:"readonly",mode:"boolean"})],xg.prototype,"readOnly",void 0),Al([As({mode:"boolean"})],xg.prototype,"autofocus",void 0),Al([As],xg.prototype,"placeholder",void 0),Al([As],xg.prototype,"type",void 0),Al([As],xg.prototype,"list",void 0),Al([As({converter:Is})],xg.prototype,"maxlength",void 0),Al([As({converter:Is})],xg.prototype,"minlength",void 0),Al([As],xg.prototype,"pattern",void 0),Al([As({converter:Is})],xg.prototype,"size",void 0),Al([As({mode:"boolean"})],xg.prototype,"spellcheck",void 0),Al([Zr],xg.prototype,"defaultSlottedNodes",void 0);class kg{}function Sg(e,t,i){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&!!e.nodeValue.trim().length}wu(kg,vu),wu(xg,bu,kg);class Cg extends xg{constructor(){super(...arguments),this.appearance="outline"}}Al([As],Cg.prototype,"appearance",void 0);const Ng=Cg.compose({baseName:"text-field",baseClass:xg,template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("inline-block")} :host { font-family: ${$c}; outline: none; user-select: none; } .root { box-sizing: border-box; position: relative; display: flex; flex-direction: row; color: ${Dh}; background: ${vh}; border-radius: calc(${Rc} * 1px); border: calc(${Ac} * 1px) solid ${Xd}; height: calc(${ep} * 1px); align-items: baseline; } .control { -webkit-appearance: none; font: inherit; background: transparent; border: 0; color: inherit; height: calc(100% - 4px); width: 100%; margin-top: auto; margin-bottom: auto; border: none; padding: 0 calc(${Dc} * 2px + 1px); font-size: ${Fc}; line-height: ${Mc}; } .control:hover, .control:${Ju}, .control:disabled, .control:active { outline: none; } .label { display: block; color: ${Dh}; cursor: pointer; font-size: ${Fc}; line-height: ${Mc}; margin-bottom: 4px; } .label__hidden { display: none; visibility: hidden; } .start, .control, .end { align-self: center; } .start, .end { display: flex; margin: auto; fill: currentcolor; } ::slotted(svg) { /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */ width: 16px; height: 16px; } .start { margin-inline-start: 11px; } .end { margin-inline-end: 11px; } :host(:hover:not([disabled])) .root { background: ${bh}; border-color: ${Yd}; } :host(:active:not([disabled])) .root { background: ${bh}; border-color: ${Qd}; } :host(:focus-within:not([disabled])) .root { border-color: ${$h}; box-shadow: 0 0 0 calc(${Bc} * 1px) ${$h} inset; } :host([appearance="filled"]) .root { background: ${uh}; } :host([appearance="filled"]:hover:not([disabled])) .root { background: ${ph}; } :host([disabled]) .label, :host([readonly]) .label, :host([readonly]) .control, :host([disabled]) .control { cursor: ${Wu}; } :host([disabled]) { opacity: ${Pc}; } :host([disabled]) .control { border-color: ${Ph}; } `.withBehaviors(Ku(Kr` .root, :host([appearance="filled"]) .root { forced-color-adjust: none; background: ${Gu.Field}; border-color: ${Gu.FieldText}; } :host(:hover:not([disabled])) .root, :host([appearance="filled"]:hover:not([disabled])) .root, :host([appearance="filled"]:hover) .root { background: ${Gu.Field}; border-color: ${Gu.Highlight}; } .start, .end { fill: currentcolor; } :host([disabled]) { opacity: 1; } :host([disabled]) .root, :host([appearance="filled"]:hover[disabled]) .root { border-color: ${Gu.GrayText}; background: ${Gu.Field}; } :host(:focus-within:enabled) .root { border-color: ${Gu.Highlight}; box-shadow: 0 0 0 1px ${Gu.Highlight} inset; } input::placeholder { color: ${Gu.GrayText}; } `)),shadowOptions:{delegatesFocus:!0}});class Eg extends eu{}const $g=class extends Eg{connectedCallback(){super.connectedCallback();const e=Bl(this);e&&qd.setValueFor(this,(t=>Nh.getValueFor(t).evaluate(t,qd.getValueFor(e))))}}.compose({baseName:"card",baseClass:Eg,template:(e,t)=>Ts` `,styles:(e,t)=>Kr` ${Yu("block")} :host { --elevation: 4; display: block; contain: content; height: var(--card-height, 100%); width: var(--card-width, 100%); box-sizing: border-box; background: ${qd}; border-radius: calc(${Rc} * 1px); ${_p} } `.withBehaviors(Ku(Kr` :host { forced-color-adjust: none; background: ${Gu.Canvas}; box-shadow: 0 0 0 1px ${Gu.CanvasText}; } `))}),Lg=ec.create("wlp-box-shadow"),Tg=ec.create("wlp-status-bar-height"),Og=ec.create("wlp-status-bar-padding"),Rg=ec.create("wlp-status-bordered-item-padding"),_g=ec.create("wlp-text-highlight-color"),Dg=ec.create("wlp-zIndex"),Ig=ec.create("wlp-alert-zIndex"),Pg=ec.create("wlp-selection-color"),Ag=ec.create("wlp-tag-text-color"),Bg=ec.create("wlp-code-font");function Fg(e){lu.getOrCreate().withDesignTokenRoot(e).register(fu(),cp(),pp(),mp(),Dp(),Bp(),Hp(),Kp(),Qp(),tg(),og(),bg(),Ng(),$g()),Lg.withDefault("0px -1px 4px rgba(0, 0, 0, 0.5)"),Tg.withDefault("30px"),Og.withDefault("6px"),Rg.withDefault("4px"),Dg.withDefault(xr.maxMinus1.toString()),Ig.withDefault(xr.max.toString()),Fc.withDefault("12px"),Mc.withDefault("16px"),$c.withDefault("'Segoe UI', sans-serif"),Bg.withDefault("'Cascadia Code', 'Consolas', monospace"),Mg()}function Mg(){const e=Uh(),t=Rl.from(uc(e.neutralBaseColor)),i=mc.from(t);Dd.withDefault(i);const o=Rl.from(uc(e.accentColor)),n=mc.from(o);if(Pd.withDefault(n),Oc.withDefault(e.baseLayerLuminance),qd.withDefault(e.backgroundToken),e.useThemeColors)Pg.withDefault(Xd),_g.withDefault("#007ACC30"),Ag.withDefault(th);else{const t=Rl.from(uc(e.selectionColor));Pg.withDefault(t),_g.withDefault(e.textHighlightColor+"30");const i=Rl.from(uc(e.tagTextColor));Ag.withDefault(i)}}class Vg{constructor(e){this._browserLink=e}initialize(){this._browserLink.log("Initializing tools services..."),this._browserLink.browserLinkConnectionStatusService.isConnected=!0,this._browserLink.log("Initializing tools design surface service"),this._browserLink.designSurfaceService.initialize();const e=$n("status.generatingLogicalTree");this._browserLink.statusService.currentStatus={messageType:0,displayText:e,fullText:e},this._browserLink.log("Initializing tools selection service"),this._browserLink.selectionService.initialize(),this._browserLink.log("Initializing tools tag navigation service"),this._browserLink.tagNavigationService.initialize(),this._browserLink.log("Initializing tools hotkey manager service"),this._browserLink.hotkeyManagerService.initialize(),this._browserLink.toolsActionPanelService.initialize(),this._browserLink.sourceMapping.ensureUpToDateAsync((async()=>{this._browserLink.log("Logical tree initialization detected in tools extension"),this._browserLink.logicalTreeInitializedStatusService.isInitialized=!0,this._browserLink.log("Setting current status");const e=await this._browserLink.currentUpdateStatusService.getCurrentMessageType(),t=await this._browserLink.currentUpdateStatusService.getCurrentUpdateFullStatus(),i=await this._browserLink.currentUpdateStatusService.getCurrentUpdateShortStatus(),o=function(e,t){switch(e){case"Warning":return 1;case"Error":return 2;case"Info":return 0;default:return t.log("Error: setStatus() message type isn't expected. The message type value is: "+e),0}}(e,this._browserLink);this._browserLink.statusService.currentStatus={messageType:o,fullText:t,displayText:i},this._browserLink.log(`Current status set: ${t}/${i}`),this._browserLink.keyboardNavigationService.updatePositionMap(),this._browserLink.greyOutOverlayService.updateOverlayRectList(),this._browserLink.log("Tools service initialization finished"),this._browserLink.designSurfaceService.isReady=!0}))}uninitialize(){this._browserLink.toolsActionPanelService.uninitialize(),this._browserLink.designSurfaceService.uninitialize(),this._browserLink.selectionService.uninitialize(),this._rootElement&&this._rootElement.remove()}renderLivePreviewBrowserUI(){this._rootElement=new il,Fg(this._rootElement),function(e,t){ia.getOrCreateDOMContainer(e,{responsibleForOwnerRequests:!0}).register(ka.instance(Oa,t),ka.instance(Ra,t.selectionHostingService),ka.instance(_a,t.toolsLifetimeService),ka.instance(Da,t.toolsActionPanelService),ka.instance(Ia,t.selectionService),ka.instance(Pa,t.browserLinkConnectionStatusService),ka.instance(Aa,t.logicalTreeInitializedStatusService),ka.instance(Ba,t.simpleTextEditingService),ka.instance(Fa,t.keyboardNavigationService),ka.instance(Ma,t.statusService),ka.instance(Va,t.tagNavigationService),ka.instance(ja,t.hotkeyManagerService),ka.instance(za,t.updateBrowserButtonService),ka.instance(Ua,t.designSurfaceService),ka.instance(Wa,t.disableUserPageInteractionsService),ka.instance(Ha,t.expandEmptyElementsService),ka.singleton(qa,Za),ka.singleton(Ka,d),ka.instance(Ga,t.quickEditingService),ka.instance(Xa,t.resourcesUiStateService))}(this._rootElement,this._browserLink),document.body.appendChild(this._rootElement)}updateToolsTheme(e){!function(e){Xh(e)}(e),Mg()}}class jg{createElement(e,t){return document.createElement(e,t)}}var zg;!function(e){e[e["NORMAL_NAVIGATION"]=1]="NORMAL_NAVIGATION",e[e["MENU_NAVIGATION"]=2]="MENU_NAVIGATION",e[e["CLOSE_DIALOG_NAVIGATION"]=3]="CLOSE_DIALOG_NAVIGATION"}(zg||(zg={}));class Ug{constructor(e){this._arrowKeyMode=zg.NORMAL_NAVIGATION,this._arrowKeyHandlers=new Map,this._arrowKeyModeAssociatedNode=new Map,this._browserLink=e}initialize(){this._arrowKeyHandlers.set(zg.NORMAL_NAVIGATION,this._browserLink.keyboardNavigationService.onArrowKeyDown.bind(this._browserLink.keyboardNavigationService))}get arrowKeyMode(){return this._arrowKeyMode}set arrowKeyMode(e){if(this._arrowKeyMode=e,this._arrowKeyMode&&this._arrowKeyModeAssociatedNode.has(this._arrowKeyMode)){const e=this._arrowKeyModeAssociatedNode.get(this._arrowKeyMode);e&&e.focus()}}setArrowKeyModeAssociatedNode(e,t){this._arrowKeyModeAssociatedNode.set(e,t)}onArrowKeyPressed(e){this._arrowKeyMode&&this._arrowKeyHandlers.has(this._arrowKeyMode)&&this._arrowKeyHandlers.get(this._arrowKeyMode)(e)}}class Hg{constructor(e){var t;this._textNodeBeingEditedChanged=new n.pB,this._escapingEditingWithoutSave=new n.FK,this._browserLink=e,this._documentWrapper=new jg,this._textNodeBeingEdited=null,this._editableTempWrapper=null,this._focusOutEventListener=null,null!==(t=this._browserLink)&&void 0!==t&&t.selectionService&&this._browserLink.selectionService.selectionChanged.subscribe(this.onSelectionChanged.bind(this))}get textNodeBeingEditedChanged(){return this._textNodeBeingEditedChanged.asEvent()}get escapingEditingWithoutSave(){return this._escapingEditingWithoutSave.asEvent()}get textNodeBeingEdited(){return this._textNodeBeingEdited}set textNodeBeingEdited(e){const t={prevEditedNode:this._textNodeBeingEdited,newEditedNode:null,isTextEditModeEnabled:!1};if(null===e){if(null===this._textNodeBeingEdited)return;this.escapeEditingMode(),t.newEditedNode=null,t.isTextEditModeEnabled=!1}else{if(!1===this.shouldEnableEditingMode(e))return;this.enableEditingMode(e),t.newEditedNode=this._textNodeBeingEdited,t.isTextEditModeEnabled=!0}this._textNodeBeingEditedChanged.dispatch(this,t)}onSelectionChanged(e,t){if(null===this._textNodeBeingEdited)return;if(this._browserLink.logicalTree.getFirstLogicalNodeFromDomNode(this._textNodeBeingEdited)===t.newSelectedNode)throw Error("Nodes under simple text editing mode should not be newly selected node.");this.textNodeBeingEdited=null}onEscapeEditingModeWithoutSave(e){if(e.preventDefault(),null===this.textNodeBeingEdited)return;this._escapingEditingWithoutSave.dispatch(this);const t=this._editableTempWrapper,i=t.parentElement;this._focusOutEventListener&&(t.removeEventListener("focusout",this._focusOutEventListener),this._focusOutEventListener=null),i.insertBefore(this._textNodeBeingEdited,t),this._textNodeBeingEdited.textContent=this._textNodeContentPreEditing,t.remove(),Dg.withDefault(xr.maxMinus1.toString()),!this._browserLink.selectionService.selectedLogicalNode&&this._textNodeBeingEdited.parentNode&&this._textNodeBeingEdited.parentNode.removeChild(this._textNodeBeingEdited),this._textNodeBeingEdited=null,this._textNodeContentPreEditing=null,this._editableTempWrapper=null,this._browserLink.hotkeyManagerService.arrowKeyMode=zg.NORMAL_NAVIGATION,this._browserLink.disableUserPageInteractionsService.disableUserInteractionsOnUserPageRoots()}onEscapeEditingModeWithHotkey(e){e.preventDefault(),this.escapeEditingMode()}escapeEditingMode(){const e=this._editableTempWrapper,t=e.parentElement,i=this._browserLink.logicalTree.getFirstLogicalNodeFromDomNode(this._textNodeBeingEdited);let o="";if(this._textNodeBeingEdited.parentNode===e&&(o=e.textContent),i)this._browserLink.logicalTreeEditingService.replaceTextInTextNode(i,o);else if(!this._browserLink.selectionService.selectedLogicalNode){var n;if(null===(n=this._browserLink.tempTextNodeToDeleteOnAutoSyncService)||void 0===n||n.addTempNodeToDelete(this._textNodeBeingEdited),this._browserLink.selectionService.priorSiblingNode){const e=this.getSourcePathAndRangeToSelectAfterNewTextNodeCreation();this._browserLink.logicalTreeEditingService.insertTextAfterSiblingNode(this._browserLink.selectionService.priorSiblingNode,o).continueWith((()=>{this.SelectRangeAndSendNewTextInsertionTelemetry(e)}))}else if(this._browserLink.selectionService.parentNode){const e=this.getSourcePathAndRangeToSelectAfterNewTextNodeCreation();this._browserLink.logicalTreeEditingService.insertTextAsFirstChild(this._browserLink.selectionService.parentNode,o).continueWith((()=>{this.SelectRangeAndSendNewTextInsertionTelemetry(e)}))}}this._textNodeBeingEdited.textContent=e.textContent,this._focusOutEventListener&&(e.removeEventListener("focusout",this._focusOutEventListener),this._focusOutEventListener=null),t.insertBefore(this._textNodeBeingEdited,e),e.remove(),Dg.withDefault(xr.maxMinus1.toString()),this._textNodeBeingEdited=null,this._textNodeContentPreEditing=null,this._editableTempWrapper=null,this._browserLink.hotkeyManagerService.arrowKeyMode=zg.NORMAL_NAVIGATION,this._browserLink.disableUserPageInteractionsService.disableUserInteractionsOnUserPageRoots()}SelectRangeAndSendNewTextInsertionTelemetry(e){this._browserLink.sourceMapping.selectRange(e),this._browserLink.telemetryService.sendNewTextNodeInserted(e.sourcePath)}enableEditingMode(e){this._browserLink.disableUserPageInteractionsService.enableUserInteractionsOnUserPageRoots();const t=this._documentWrapper.createElement("span");t.setAttribute("contentEditable","true"),t.id=kr.editableTextParent,e.parentElement.insertBefore(t,e),t.appendChild(e);const i=Ln(t);i&&(i.bind(On.escape,this.onEscapeEditingModeWithoutSave.bind(this)),i.bind(On.enter,this.onEscapeEditingModeWithHotkey.bind(this))),this._textNodeBeingEdited=e,this._textNodeContentPreEditing=e.textContent,this._editableTempWrapper=t,Dg.withDefault(xr.maxMinus2.toString()),t.style.zIndex=xr.maxMinus1.toString(),t.style.position="relative",t.style.outline="1px solid rgba(173, 216, 230, 0.8)",t.style.display="inline",t.style.cursor="text",t.setAttribute("role","textbox"),t.setAttribute("tabIndex","-1"),t.setAttribute("aria-label",$n("simpleTextEditing.editableText_ariaLabel")),this._focusOutEventListener=this.onTextEditingElementFocusOut.bind(this),t.addEventListener("focusout",this._focusOutEventListener),t.focus(),this.selectElementContents(t)}onTextEditingElementFocusOut(e){this.textNodeBeingEdited=null}selectElementContents(e){const t=window.getSelection(),i=document.createRange();i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i)}canEnableEditingMode(e){const t=null==e?void 0:e.getDomNode();return!!t&&this.shouldEnableEditingMode(t)}throwExpression(e){throw new Error(e)}editText(e){var t;const i=null!==(t=(null!=e?e:this.throwExpression("Argument logicalNode is null")).getDomNode())&&void 0!==t?t:this.throwExpression("Argument logicalNode doesn't have associated DOM node");this.textNodeBeingEdited=i}getSourcePathAndRangeToSelectAfterNewTextNodeCreation(){var e;if(this._browserLink.selectionService.selectedLogicalNode)return null;if("Text"===(null===(e=this._browserLink.selectionService.priorSiblingNode)||void 0===e?void 0:e.type)){const e=this._browserLink.selectionService.priorSiblingNode;return new Wg(e.start.path,e.start.position,e.length+this.textNodeBeingEdited.textContent.length)}const t=Jn(this._browserLink.selectionService.priorSiblingNode);if("Text"===(null==t?void 0:t.type))return new Wg(t.start.path,t.start.position,this.textNodeBeingEdited.textContent.length+t.length);const i=this.textNodeBeingEdited.textContent.length;if(this._browserLink.selectionService.priorSiblingNode){const e=this._browserLink.selectionService.priorSiblingNode;return new Wg(e.start.path,e.start.position+e.length,i)}if(t)return new Wg(t.start.path,t.start.position,i);const o=this._browserLink.selectionService.parentNode;return new Wg(o.start.path,o.start.position+o.startTagLength,i)}shouldEnableEditingMode(e){if(e===this._textNodeBeingEdited)return!1;if(e.nodeType===Node.TEXT_NODE&&e.textContent){const t=this._browserLink.logicalTree.getLogicalNodesFromDomNode(e);return!!e[Sr]||1===t.length&&!r(t[0]).isUnsupported}return!1}}class Wg{constructor(e,t,i){this.sourcePath=e,this.startPosition=t,this.length=i}}const qg=Kr` :host { font-family: var(--body-font); font-size: var(--type-ramp-base-font-size); line-height: var(--type-ramp-base-line-height); color: ${Dh}; position: fixed; } fast-anchored-region { overflow: auto; margin-left: 10px; } .container { border: 1px solid black; background-color: ${Fd}; box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5); } .header { background-color: ${uh}; color: ${Dh}; padding: 5px 10px; text-align: center; font-weight: bold; } .body { padding: calc(var(--design-unit) * 2px); } ul { list-style-type: none; padding: 0; margin-block-start: 0; margin-block-end: 0; } li + li { margin-top: 5px; } a { color: ${Dh}; text-decoration: underline; } .body fast-button { color: ${Dh}; text-decoration: underline; height: initial; } fast-checkbox { --design-unit: 3; } fast-select, fast-text-field { --design-unit: 2; min-width: 150px; width: 150px; } .textItem { font-weight: bold; } .propertyContainer { display: grid; grid-template-columns: auto 1fr; gap: 10px; } .propertyLabel { white-space: nowrap; } .propertyEditor { text-align: right; } `;function Kg(e,t,i){return{index:e,removed:t,addedCount:i}}const Gg=0,Xg=1,Yg=2,Qg=3;function Zg(e,t,i,o,n,r){let s=0,a=0;const l=Math.min(i-t,r-n);if(0===t&&0===n&&(s=function(e,t,i){for(let o=0;o0||i>0;){if(0===t){n.push(Yg),i--;continue}if(0===i){n.push(Qg),t--;continue}const r=e[t-1][i-1],s=e[t-1][i],a=e[t][i-1];let l;l=s=0){e.splice(t,1),t--,s-=i.addedCount-i.removed.length,n.addedCount+=i.addedCount-o;const a=n.removed.length+i.removed.length-o;if(n.addedCount||a){let e=i.removed;if(n.indexi.index+i.addedCount){const t=n.removed.slice(i.index+i.addedCount-n.index);Jg.apply(e,t)}n.removed=e,i.indexo?i=o-e.addedCount:i<0&&(i=o+e.removed.length+i-e.addedCount),i<0&&(i=0),e.index=i,e}class rf extends Xr{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(e,"$fastController",{value:this,enumerable:!1})}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.needsQueue&&(this.needsQueue=!1,Mr.queueUpdate(this))}reset(e){this.oldCollection=e,this.needsQueue&&(this.needsQueue=!1,Mr.queueUpdate(this))}flush(){const e=this.splices,t=this.oldCollection;if(void 0===e&&void 0===t)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const i=void 0===t?tf(this.source,e):Zg(this.source,0,this.source.length,t,0,t.length);this.notify(i)}}const sf=Object.freeze({positioning:!1,recycle:!0});function af(e,t,i,o){e.bind(t[i],o)}function lf(e,t,i,o){const n=Object.create(o);n.index=i,n.length=t.length,e.bind(t[i],n)}class cf{constructor(e,t,i,o,n,r){this.location=e,this.itemsBinding=t,this.templateBinding=o,this.options=r,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=af,this.itemsBindingObserver=Qr.binding(t,this,i),this.templateBindingObserver=Qr.binding(o,this,n),r.positioning&&(this.bindView=lf)}bind(e,t){this.source=e,this.originalContext=t,this.childContext=Object.create(t),this.childContext.parent=e,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(e,this.originalContext),this.template=this.templateBindingObserver.observe(e,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(e,t){e===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):e===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(t)}observeItems(e=!1){if(!this.items)return void(this.items=_r);const t=this.itemsObserver,i=this.itemsObserver=Qr.getNotifier(this.items),o=t!==i;o&&null!==t&&t.unsubscribe(this),(o||e)&&i.subscribe(this)}updateViews(e){const t=this.childContext,i=this.views,o=[],n=this.bindView;let r=0;for(let t=0,n=e.length;t0?o.shift():a.create();i.splice(c,0,l),n(l,s,c,t),l.insertBefore(r)}}for(let e=0,t=o.length;enew rf(e)));const e=Array.prototype;if(e.$fastPatch)return;Reflect.defineProperty(e,"$fastPatch",{value:1,enumerable:!1});const t=e.pop,i=e.push,o=e.reverse,n=e.shift,r=e.sort,s=e.splice,a=e.unshift;e.pop=function(){const e=this.length>0,i=t.apply(this,arguments),o=this.$fastController;return void 0!==o&&e&&o.addSplice(Kg(this.length,[i],0)),i},e.push=function(){const e=i.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(nf(Kg(this.length-arguments.length,[],arguments.length),this)),e},e.reverse=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const i=o.apply(this,arguments);return void 0!==t&&t.reset(e),i},e.shift=function(){const e=this.length>0,t=n.apply(this,arguments),i=this.$fastController;return void 0!==i&&e&&i.addSplice(Kg(0,[t],0)),t},e.sort=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const i=r.apply(this,arguments);return void 0!==t&&t.reset(e),i},e.splice=function(){const e=s.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(nf(Kg(+arguments[0],e,arguments.length>2?arguments.length-2:0),this)),e},e.unshift=function(){const e=a.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(nf(Kg(0,[],arguments.length),this)),e}}(),this.isItemsBindingVolatile=Qr.isVolatileBinding(e),this.isTemplateBindingVolatile=Qr.isVolatileBinding(t)}createBehavior(e){return new cf(e,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function hf(e,t,i=sf){return new df(e,"function"==typeof t?t:()=>t,i)}const uf=Ts`${e=>e.DisplayName}`,pf=Ts` t.parent.handleMethodClicked(e,t.event)}>${e=>e.DisplayName} `,gf=Ts` {var t;return"true"===(null===(t=e.Value)||void 0===t?void 0:t.toLowerCase())}} ?disabled=${e=>e.IsReadOnly} title=${e=>e.IsReadOnly?$n("actionPanel.readOnlyProperty"):""} @change=${(e,t)=>t.parent.handleUpdateProperty(e,`${t.event.target.checked}`)}> ${e=>e.DisplayName} `,ff=Ts`
${e=>e.DisplayName}
e.Value} position="below" aria-label=${e=>e.DisplayName} ?disabled=${e=>e.IsReadOnly} title=${e=>e.IsReadOnly?$n("actionPanel.readOnlyProperty"):""} @change=${(e,t)=>t.parent.handleUpdateProperty(e,t.event.target.value)}> ${hf((e=>e.StandardValues),Ts` e} ?selected=${(e,t)=>e===t.parent.Value}>${e=>e} `)}
`,vf=Ts`
${e=>e.DisplayName}
e.Value} aria-label=${e=>e.DisplayName} data-original-value=${e=>e.Value} ?disabled=${e=>e.IsReadOnly} title=${e=>e.IsReadOnly?$n("actionPanel.readOnlyProperty"):""} @keydown=${(e,t)=>t.parent.handleEditorKeyDown(e,t.event)}>
`,bf=Ts` ${e=>e.DisplayName} `,mf=Ts` ${Os((e=>"bool"===e.PropertyType),gf)} ${Os((e=>"dropdown"===e.PropertyType),ff)} ${Os((e=>"editor"===e.PropertyType),vf)} ${Os((e=>"textbox"===e.PropertyType),vf)} ${Os((e=>"unknown"===e.PropertyType),bf)} `,yf=Ts` e.anchorElement} @loaded=${e=>e.handleAnchoredRegionLoaded()} vertical-inset vertical-scaling="fill" vertical-positioning-mode="dynamic" vertical-default-position="bottom" horizontal-positioning-mode="locktodefault" horizontal-default-position="right" @click=${(e,t)=>t.event.stopPropagation()}>
${e=>e.header}
    ${hf((e=>e.actionItems),Ts`
  • ${Os((e=>"Text"===e.Type),uf)} ${Os((e=>"Method"===e.Type),pf)} ${Os((e=>"Property"===e.Type),mf)}
  • `)}
`;var wf=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let xf=class extends qs{constructor(){super(...arguments),this.header="Action Panel"}handleMethodClicked(e,t){t.stopPropagation(),this.$emit("methodExecuted",{memberName:e.MemberName,relatedComponentMemberName:e.RelatedComponentMemberName})}handleUpdateProperty(e,t){this.$emit("updateProperty",{memberName:e.MemberName,newValue:t,relatedComponentMemberName:e.RelatedComponentMemberName})}handleEditorKeyDown(e,t){const i=t.target;return"Enter"===t.key?(this.handleUpdateProperty(e,i.value),!1):"Escape"!==t.key||(i.value=i.dataset.originalValue,!1)}forceAnchorUpdate(){var e;null===(e=this.anchoredRegion)||void 0===e||e.update()}connectedCallback(){super.connectedCallback(),this.designSurfaceService&&this.setViewportElement(this.designSurfaceService)}setViewportElement(e){this.anchoredRegion.viewportElement=e.selectionOverlayElement}handleAnchoredRegionLoaded(){var e;null===(e=this.anchoredRegion.querySelector("fast-checkbox,fast-text-field,fast-select,fast-button"))||void 0===e||e.focus()}};wf([As],xf.prototype,"header",void 0),wf([Zr],xf.prototype,"actionItems",void 0),wf([Zr],xf.prototype,"anchorElement",void 0),wf([Ua],xf.prototype,"designSurfaceService",void 0),wf([Zr],xf.prototype,"anchoredRegion",void 0),xf=wf([Ks({name:"action-panel",template:yf,styles:qg})],xf);var kf=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class Sf{}kf([Zr],Sf.prototype,"height",void 0),kf([Zr],Sf.prototype,"width",void 0),kf([Zr],Sf.prototype,"top",void 0),kf([Zr],Sf.prototype,"left",void 0);const Cf=Kr` .blockedOverlayWrapper { position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; pointer-events: none; } `,Nf=Ts`
${hf((e=>e.blockedOverlayRects),Ts` e.height} width=${e=>e.width} top=${e=>e.top} left=${e=>e.left}> `,{positioning:!0})}
`;let Ef=class extends qs{constructor(){super(...arguments),this.onExpansionOnEmptyElementsChanged=()=>{this.updateBlockedOverlayRects()},this.onWindowResize=()=>{this.updateBlockedOverlayRects()},this.onChangesApplied=()=>{this.updateBlockedOverlayRects()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),this.attachBrowserLinkEvents(),this.updateBlockedOverlayRects()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.onWindowResize),this.detachBrowserLinkEvents()}attachBrowserLinkEvents(){this.browserLink.autoSyncService.changesApplied.subscribe(this.onChangesApplied),this.expandEmptyElementsService.isExpansionOnEmptyElementsEnabledChanged.subscribe(this.onExpansionOnEmptyElementsChanged)}detachBrowserLinkEvents(){this.browserLink.autoSyncService.changesApplied.unsubscribe(this.onChangesApplied),this.expandEmptyElementsService.isExpansionOnEmptyElementsEnabledChanged.unsubscribe(this.onExpansionOnEmptyElementsChanged)}updateBlockedOverlayRects(){this.blockedOverlayRects=[],this.browserLink.greyOutOverlayService.updateOverlayRectList();let e=this.browserLink.greyOutOverlayService.overlayRectList.headNode;for(;e;){const t=new Sf;t.height=e.Rect.h,t.left=e.Rect.x,t.top=e.Rect.y,t.width=e.Rect.w,this.blockedOverlayRects.push(t),e=e.nextRectNode}this.blockedOverlayWrapperNode.style.width=document.documentElement.scrollWidth+"px",this.blockedOverlayWrapperNode.style.height=document.documentElement.scrollHeight+"px"}};kf([Oa],Ef.prototype,"browserLink",void 0),kf([Zr],Ef.prototype,"blockedOverlayRects",void 0),kf([Ha],Ef.prototype,"expandEmptyElementsService",void 0),Ef=kf([Ks({name:"blocked-overlay",template:Nf,styles:Cf})],Ef);var $f=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Lf=Kr` .blockedOverlayRect { position: absolute; cursor: not-allowed; background-color: rgba(0, 0, 0, 0.3); pointer-events: auto; } `,Tf=Ts`
`;let Of=class extends qs{constructor(){super(...arguments),this.onWindowResize=()=>{this.updateBlockedOverlayRectsPosition()},this.onChangesApplied=()=>{this.updateBlockedOverlayRectsPosition()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),this.attachBrowserLinkEvents(),this.updateBlockedOverlayRectsPosition()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.onWindowResize),this.detachBrowserLinkEvents()}attachBrowserLinkEvents(){this.browserLink.autoSyncService.changesApplied.subscribe(this.onChangesApplied)}detachBrowserLinkEvents(){this.browserLink.autoSyncService.changesApplied.unsubscribe(this.onChangesApplied)}updateBlockedOverlayRectsPosition(){this.blockedOverlayRectNode.style.top=this.top+"px",this.blockedOverlayRectNode.style.left=this.left+"px",this.blockedOverlayRectNode.style.width=this.width+"px",this.blockedOverlayRectNode.style.height=this.height+"px"}};$f([Oa],Of.prototype,"browserLink",void 0),$f([As],Of.prototype,"top",void 0),$f([As],Of.prototype,"left",void 0),$f([As],Of.prototype,"height",void 0),$f([As],Of.prototype,"width",void 0),Of=$f([Ks({name:"blocked-overlay-rect",template:Tf,styles:Lf})],Of);const Rf=Kr` .resources-list-container { margin-top: 5px; margin-bottom: 5px; margin-left: 25px; width: 100%; display: block; } .url { margin: 0px; font-style: italic; } .ellipsis { margin-left: 0px; margin-top: -5px; margin-bottom: 0px; } `,_f=40;function Df(e){return e&&e.length>_f?e.substring(0,_f)+"…":e}var If=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Pf=Ts`
${hf((e=>Array.from(e.blockedUrls.slice(0,3))),Ts`

${e=>$n("blockedUrlToast.blockedResourcesFromUrlFormat",{blockedResourceCount:e.blockedResources.length.toString(),baseUrl:Df(e.baseUrl)})}

`)} ${Os((e=>e.blockedUrls.length>3),Ts`

\u2026

`)}
`;let Af=class extends qs{constructor(){super(),this.blockedUrls=[]}};If([Zr],Af.prototype,"blockedUrls",void 0),Af=If([Ks({name:"blocked-resources-list",template:Pf,styles:Rf})],Af);var Bf=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Ff=Ts`
${hf((e=>Array.from(e.allowedUrls.slice(0,3))),Ts`

${e=>Df(e)}

`)} ${Os((e=>e.allowedUrls.length>3),Ts`

\u2026

`)}
`;let Mf=class extends qs{constructor(){super(),this.allowedUrls=[]}};Bf([Zr],Mf.prototype,"allowedUrls",void 0),Mf=Bf([Ks({name:"allowed-resources-list",template:Ff,styles:Rf})],Mf);const Vf=Uh(),jf=Kr` :host { font-family: var(--body-font); font-size: var(--type-ramp-base-font-size); line-height: var(--type-ramp-base-line-height); z-index: var(--wlp-alert-zIndex); color: ${Dh}; } fast-card { background-color: ${Vf.backgroundToken}; width: 500px; height: auto; position: sticky; top: 5px; right: 5px; float: right; } .close-button { height: 13px; width: 13px; float: right; margin-right: 5px; margin-top: 6px; } .toast-banner { width: 100%; } .banner-element { display: inline-block; vertical-align: middle; margin-left: 10px; margin-top: 5px; margin-bottom: 5px; } .warning-image { height: 13px; width: 13px; margin-right: -8px; margin-top: 6px; } .toast { pointer-events: all; } .toast-container { position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; pointer-events: none; } h3 { margin: 0px; } .resources-summary { margin-left: 10px; margin-top: 0px; margin-bottom: 5px; font-weight: bold; } .link-button { border: 0; background-color: transparent; color: ${Vf.linkColor}; cursor: pointer; margin-left: -5px; font-size: var(--type-ramp-base-font-size); } .link-button:hover { text-decoration: underline; } .description { margin-top: 0px; margin-bottom: 0px; margin-left: 10px; } .description-container { margin-bottom: 5px; } .fade-out { animation: fadeOutAnimation ease 3s; animation-fill-mode: forwards; animation-delay: 5s; } @keyframes fadeOutAnimation { 0%{ opacity:1; } 100%{ opacity: 0; } } `;class zf{constructor(){this._rootUrl=null}get rootUrl(){return this._rootUrl||this.findRootUrl(),this._rootUrl}findRootUrl(){const e=document.getElementById(kr.browserLinkScriptElementId).src,t=e.substr(0,e.length-"browserLink".length);this._rootUrl=t}}var Uf=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Hf=Uh(),Wf=Ts` ${Os((e=>e.isBlockedResourcesToastVisible),Ts`
`${e.rootUrl}images/StatusWarningColor`} /> `${e.rootUrl}images/CloseButton_${Hf.name}`} alt="text">

${e=>$n("blockedUrlToast.totalBlockedUrlStatusFormat",{blockedResourceCount:e.getTotalBlockedResourceCount().toString(),blockedDomainCount:e.blockedUrls.length.toString()})}

e.blockedUrls}>

${$n("blockedUrlToast.allowDomains")}

${$n("blockedUrlToast.manageAllowedDomains")}

`)} `;let qf=class extends qs{constructor(){super(),this.onFadeOutEnd=e=>{this.toastContainer.removeEventListener("mouseover",this.onToastMouseOver),this.toastContainer.removeEventListener("animationend",this.onFadeOutEnd),this.isBlockedResourcesToastVisible=!1},this.onCloseClicked=e=>{this.isBlockedResourcesToastVisible=!1},this.onCloseButtonMouseOver=e=>{this.closeButton.src=this.rootUrl+"images/CloseButtonHover_"+Hf.name},this.onToastMouseOver=e=>{this.toastContainer.classList.remove("fade-out")},this.onMouseOut=e=>{this.closeButton.src=this.rootUrl+"images/CloseButton_"+Hf.name},this.onShowBlockedResourcesUiEvent=(e,t)=>{this.isBlockedResourcesToastVisible=!0,this.blockedUrls=t},this.onAllowDomainsClicked=e=>{this.browserLink.telemetryService.addBlockedDomainsToAllowListLinkClicked();const t=this.blockedUrls.map((e=>e.baseUrl));this.browserLink.allowedUrlsOptionsService.showAllowUrlsDialogWithNewEntries(t)},this.onLearnMoreClicked=e=>{window.open("https://go.microsoft.com/fwlink/?linkid=2218062&clcid=0x409"),this.browserLink.telemetryService.sendBlockedResourcesLearnMoreLinkClicked()},this.onExternalDomainsLinkClicked=e=>{this.browserLink.telemetryService.manageAllowedListLinkClicked(),this.browserLink.allowedUrlsOptionsService.showAllowUrlsDialog()},this.blockedUrls=[];const e=new zf;this.rootUrl=e.rootUrl,this.isBlockedResourcesToastVisible=!1}connectedCallback(){super.connectedCallback(),this.resourcesUiStateService.showBlockedResourcesUiEvent.subscribe(this.onShowBlockedResourcesUiEvent)}disconnectedCallback(){var e,t,i,o,n;super.disconnectedCallback(),null===(e=this.closeButton)||void 0===e||e.removeEventListener("click",this.onCloseClicked),null===(t=this.closeButton)||void 0===t||t.removeEventListener("mouseover",this.onCloseButtonMouseOver),null===(i=this.closeButton)||void 0===i||i.removeEventListener("mouseout",this.onMouseOut),null===(o=this.allowDomainsLink)||void 0===o||o.removeEventListener("click",this.onAllowDomainsClicked),null===(n=this.externalDomainsToolsOptionsLink)||void 0===n||n.removeEventListener("click",this.onExternalDomainsLinkClicked),this.resourcesUiStateService.showBlockedResourcesUiEvent.unsubscribe(this.onShowBlockedResourcesUiEvent)}closeButtonChanged(e,t){t&&(t.addEventListener("click",this.onCloseClicked),t.addEventListener("mouseover",this.onCloseButtonMouseOver),t.addEventListener("mouseout",this.onMouseOut))}allowDomainsLinkChanged(e,t){t&&t.addEventListener("click",this.onAllowDomainsClicked)}externalDomainsToolsOptionsLinkChanged(e,t){t&&t.addEventListener("click",this.onExternalDomainsLinkClicked)}toastContainerChanged(e,t){this.isBlockedResourcesToastVisible&&(this.toastContainer.classList.remove("fade-out"),this.toastContainer.classList.add("fade-out"),this.toastContainer.addEventListener("animationend",this.onFadeOutEnd),this.toastContainer.addEventListener("mouseover",this.onToastMouseOver))}learnMoreLinkChanged(e,t){t&&t.addEventListener("click",this.onLearnMoreClicked)}getTotalBlockedResourceCount(){let e=0;return this.blockedUrls.forEach((t=>{e+=t.blockedResources.length})),e}};Uf([Oa],qf.prototype,"browserLink",void 0),Uf([Xa],qf.prototype,"resourcesUiStateService",void 0),Uf([Zr],qf.prototype,"previousArrowKeyMode",void 0),Uf([Zr],qf.prototype,"isBlockedResourcesToastVisible",void 0),Uf([Zr],qf.prototype,"blockedUrls",void 0),Uf([Zr],qf.prototype,"closeButton",void 0),Uf([Zr],qf.prototype,"allowDomainsLink",void 0),Uf([Zr],qf.prototype,"learnMoreLink",void 0),Uf([Zr],qf.prototype,"externalDomainsToolsOptionsLink",void 0),Uf([Zr],qf.prototype,"toastContainer",void 0),Uf([As],qf.prototype,"rootUrl",void 0),qf=Uf([Ks({name:"blocked-resources-toast",template:Wf,styles:jf})],qf);const Kf=Ts`
e.customStyle}>
e.insertionCursor} horizontal-positioning-mode="dynamic" vertical-positioning-mode="dynamic" horizontal-default-position="right" vertical-default-position="top" horizontal-inset>
${e=>e.topInsertionMarkerText}
${e=>e.codeText}
`,Gf=Kr` :host(:not([isVisible])) .insertionCursor, :host(:not([isVisible])) fast-anchored-region { display: none; } :host([isVisible]) .insertionCursor { position: fixed; border-style: dashed; border-width: 1; border-color: blue; width: 1; } .insertionCursor { pointer-events: none; } .insertionTooltip { background-color: ${Pg}; font-weight: bold; padding: 2px 8px; border-radius: 3px; box-sizing: border-box; box-shadow: ${Lg}; color: ${Ag}; font-family: ${Bg}; font-size: ${Fc}; } .insertionMarker, .code { white-space: pre; } `;var Xf=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Yf=class extends qs{mouseXChanged(e,t){this.setup()}mouseYChanged(e,t){this.setup()}isVisibleChanged(e,t){this.setup()}clearAll(){this.topInsertionMarkerText="",this.codeText="",this.customStyle=""}getCustomStyle(e,t,i){return`height: ${e}px;`+`top: ${t}px;`+`left: ${i}px;`}setup(){var e,t;if(!this.isConnected||!this.isVisible)return void this.clearAll();const i=this.nodesFromAreaUtil.getDroppableLogicalContainerNodeAtPoint(this.mouseX,this.mouseY,this.browserLink.logicalTree,this.nodeBoundingClientRectUtil);if(!i)return void this.clearAll();const o=this.nodesFromAreaUtil.getClosestNonWhitespaceLogicalChildNodeAtPoint(this.mouseX,this.mouseY,i,this.nodeBoundingClientRectUtil);let n=(null!==(e=null===(t=i.tagName)||void 0===t?void 0:t.length)&&void 0!==e?e:0)+2,r="",s="";if(o){const e=this.nodeBoundingClientRectUtil.getBoundingRectForLogicalNode(o),t=this.nodeBoundingClientRectUtil.isMouseCloserToBoundingClientRectLeftThanRight(this.mouseX,e),c=this.getTextForNode(o);if(t){var a;const e=function(e){let t=er(e);for(;t&&tr(t);)t=er(t);return t}(o),t=this.getTextForNode(e);n+=null!==(a=null==t?void 0:t.length)&&void 0!==a?a:0,r=`<${i.tagName}>${t} ${c}`}else{var l;const e=function(e){let t=Jn(e);for(;t&&tr(t);)t=Jn(t);return t}(o),t=this.getTextForNode(e);n+=null!==(l=null==c?void 0:c.length)&&void 0!==l?l:0,r=`<${i.tagName}>${c} ${t}`}const d=t?e.left-2:e.left+e.width+1;s=this.getCustomStyle(e.height,e.top,d)}else{r=`<${i.tagName}> `;const e=this.nodeBoundingClientRectUtil.getBoundingClientRect(i.getDomNode());s=this.getCustomStyle(e.height-2,e.top+1,e.left+1)}this.topInsertionMarkerText="↓".padStart(n+1," "),this.codeText=r,this.customStyle=s}getTextForNode(e){if(!e)return"";if("Element"===e.type)return`<${e.tagName}>`;if("Text"===e.type){var t;const i=null===(t=e.text)||void 0===t?void 0:t.trim();if((null==i?void 0:i.length)>20)return i.slice(0,19)+"…";if(i)return i}return""}connectedCallback(){super.connectedCallback(),this.designSurfaceService&&this.designSurfaceService.selectionOverlayElementChanged.subscribe((()=>this.setViewportElement()))}disconnectedCallback(){super.disconnectedCallback(),this.designSurfaceService&&this.designSurfaceService.selectionOverlayElementChanged.unsubscribe((()=>this.setViewportElement()))}setViewportElement(){var e;null!==(e=this.designSurfaceService)&&void 0!==e&&e.selectionOverlayElement&&this.anchoredRegion.viewportElement!==this.designSurfaceService.selectionOverlayElement&&(this.anchoredRegion.viewportElement=this.designSurfaceService.selectionOverlayElement)}};Xf([As],Yf.prototype,"mouseX",void 0),Xf([As],Yf.prototype,"mouseY",void 0),Xf([As({mode:"boolean"})],Yf.prototype,"isVisible",void 0),Xf([qa],Yf.prototype,"nodesFromAreaUtil",void 0),Xf([Ka],Yf.prototype,"nodeBoundingClientRectUtil",void 0),Xf([Ua],Yf.prototype,"designSurfaceService",void 0),Xf([Oa],Yf.prototype,"browserLink",void 0),Xf([Zr],Yf.prototype,"topInsertionMarkerText",void 0),Xf([Zr],Yf.prototype,"codeText",void 0),Xf([Zr],Yf.prototype,"customStyle",void 0),Xf([Zr],Yf.prototype,"anchoredRegion",void 0),Yf=Xf([Ks({name:"drag-and-drop-insertion-point",template:Kf,styles:Gf})],Yf);const Qf=Kr` .overlay { position: fixed; top: 0px; left: 0px; right: 0px; bottom: var(--wlp-status-bar-height); font: var(--body-font); } `,Zf=Ts` `;var Jf=i(155),ev=i.n(Jf),tv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class iv{constructor(){this.actionItems=null}get hasActionItems(){var e;return(null===(e=this.actionItems)||void 0===e?void 0:e.length)>0}}tv([Zr],iv.prototype,"actionItems",void 0),tv([Zr],iv.prototype,"title",void 0),tv([Zr],iv.prototype,"anchorElement",void 0);let ov=class extends qs{constructor(){super(...arguments),this.dragMouseX=-1,this.dragMouseY=-1,this.isDragAndDropInsertionPointVisible=!1,this.isActionPanelVisible=!1,this.actionPanelDetails=new iv,this.onKeyDown=e=>{if(!ev()(e)||!this.selectionService.parentNode||this.selectionService.selectedLogicalNode)return;const t=this.selectionService.parentNode,i=document.createTextNode(e.key);if(i[Sr]=!0,this.selectionService.priorSiblingNode){const e=Jn(this.selectionService.priorSiblingNode),o=t.getDomNode();if(e){const t=ir(e);o.insertBefore(i,t)}else o.appendChild(i)}else{const e=t.children[0],o=e?ir(e):null;t.getDomNode().insertBefore(i,o)}this.browserLink.simpleTextEditingService.textNodeBeingEdited=i,window.removeEventListener("keydown",this.onKeyDown)},this.handleActionPanelIsVisibleChanged=e=>{this.isActionPanelVisible=e,this.actionPanelDetails.anchorElement=this.toolActionPanelService.selectionTag,1==this.isActionPanelVisible&&this.browserLink.telemetryService.sendActionPanelOpened(this.actionPanelDetails.anchorElement.textContent)},this.onSelectedNodeChanged=()=>{this.toolActionPanelService.isVisible=!1,this.configureForSelectedNode(this.selectionService.selectedLogicalNode)},this.onScroll=()=>{var e;null===(e=this.actionPanel)||void 0===e||e.forceAnchorUpdate()},this.onWindowResize=()=>{var e;null===(e=this.actionPanel)||void 0===e||e.forceAnchorUpdate()},this.handleTextEditingHotKey=e=>{e.preventDefault();const t=this.selectionService.selectedLogicalNode;t&&(this.simpleTextEditingService.textNodeBeingEdited=t.getDomNode())},this.handleEnterKey=e=>{var t,i;const o=null!==(t=this.selectionService.selectedLogicalNode)&&void 0!==t?t:this.selectionService.parentNode;o&&!0===(null===(i=this.quickEditingService)||void 0===i?void 0:i.createNewElementAfter(o))&&e.preventDefault()}}connectedCallback(){super.connectedCallback(),this.browserLink.selectionService.selectionChanged.subscribe(this.onSelectionChanged.bind(this)),window.addEventListener("resize",this.onWindowResize),window.addEventListener("scroll",this.onScroll),Ln.bind(On.enterTextEditingMode,this.handleTextEditingHotKey),Ln.bind(On.enter,this.handleEnterKey),this._overlaySurfaceMousetrapInstance=Ln(this),this.overlayDiv&&this.overlayDiv.focus(),this.designSurfaceService.selectionOverlayElement=this.overlayDiv,this.setArrowKeyMode(),this.attachBrowserLinkEvents(),this.configureForSelectedNode(this.selectionService.selectedLogicalNode)}disconnectedCallback(){var e;super.disconnectedCallback(),this.browserLink.selectionService.selectionChanged.unsubscribe(this.onSelectionChanged.bind(this)),this.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("scroll",this.onScroll),Ln.unbind(On.enterTextEditingMode),Ln.unbind(On.enter),null===(e=this._actionPanelMousetrapInstance)||void 0===e||e.unbind(On.escape),this.detachBrowserLinkEvents()}actionPanelChanged(e,t){if(null==e)this._actionPanelMousetrapInstance=Ln(this.actionPanel),this._actionPanelMousetrapInstance.bind(On.escape,(()=>this.toolActionPanelService.isVisible=!1));else if(null==t){var i;null===(i=this._actionPanelMousetrapInstance)||void 0===i||i.unbind(On.escape)}}onSelectionChanged(e,t){this.insertionDecorator.isConnected&&t.newParentNode&&!t.newSelectedNode?(this.removeEventListener("keydown",this.onKeyDown),this.addEventListener("keydown",this.onKeyDown)):this.addEventListener("keydown",this.onKeyDown)}setArrowKeyMode(){this.overlayDiv&&this.hotkeyManagerService.setArrowKeyModeAssociatedNode(zg.NORMAL_NAVIGATION,this.overlayDiv)}attachBrowserLinkEvents(){var e;this.selectionService.selectionChanged.subscribe(this.onSelectedNodeChanged),null===(e=this._overlaySurfaceMousetrapInstance)||void 0===e||e.bind(Rn.normalNavigation,this.hotkeyManagerService.onArrowKeyPressed.bind(this.hotkeyManagerService)),this.toolActionPanelService.isVisibleChanged.subscribe(this.handleActionPanelIsVisibleChanged)}detachBrowserLinkEvents(){var e;this.selectionService.selectionChanged.unsubscribe(this.onSelectedNodeChanged),null===(e=this._overlaySurfaceMousetrapInstance)||void 0===e||e.unbind(Rn.normalNavigation),this.toolActionPanelService.isVisibleChanged.unsubscribe(this.handleActionPanelIsVisibleChanged)}configureForSelectedNode(e){this.updateActionItems(e,!1)}async updateActionItems(e,t){t||(this.actionPanelDetails.actionItems=[],this.actionPanelDetails.title=""),e&&(this.actionPanelDetails.actionItems=await this.browserLink.actionPanelService.getActionItems(e),this.actionPanelDetails.hasActionItems&&(this.actionPanelDetails.title=function(e){let t="Unknown";if(e)if("Element"===e.type){let n=!1;if(e.attributes)for(const r of e.attributes){var i,o;if("ID"===(null===(i=r.name)||void 0===i?void 0:i.toUpperCase())&&(null===(o=r.value)||void 0===o?void 0:o.length)>0){t=r.value,n=!0;break}}!n&&e.tagName&&(t=e.tagName.replace("asp:",""))}else"CodeBlock"===e.type?t=r(e).codeBlockType:"GenericContainer"===e.type?t=$n("logicalNodeShortNames.genericContainer"):"Root"===e.type?t=$n("logicalNodeShortNames.root"):"Attribute"===e.type&&(t=e.name.toLowerCase());return $n("actionPanel.title",{nodeName:t})}(e)))}handleSelectionTagClicked(){this.toolActionPanelService.toggleVisibleState()}handleActionPanelMethodExecuted(e){const t=this.selectionService.selectedLogicalNode;t&&(this.browserLink.actionPanelService.executeMethod(t,e.memberName,e.relatedComponentMemberName),this.updateActionItems(t,!0))}handleActionPanelUpdateProperty(e){const t=this.selectionService.selectedLogicalNode;t&&(this.browserLink.actionPanelService.updateProperty(t,e.memberName,e.newValue,e.relatedComponentMemberName),this.updateActionItems(t,!0))}handleSelectorDecoratorLayoutUpdated(){var e;null===(e=this.actionPanel)||void 0===e||e.forceAnchorUpdate()}handleMouseMove(e){if(this.isConnected&&this.selectionService){const t=Wn(this.nodesFromAreaUtil.nodeFromPoint(e.clientX,e.clientY),this.browserLink);t&&this.selectionService.isNodeSelectableByMouse(t)?this.overlayDiv.style.cursor=Cr:this.overlayDiv.style.cursor=Nr}return!0}handleClick(e){this.browserLink.diagnosticLog.writeEvent(7536);const t=this.nodesFromAreaUtil.nodeFromPoint(e.clientX,e.clientY);t&&this.selectionService.selectAtLocation(t,e.clientX,e.clientY),this.overlayDiv&&this.overlayDiv.focus()}handleDoubleClick(e){e.preventDefault();const t=this.nodesFromAreaUtil.nodeFromPoint(e.clientX,e.clientY);if(t){this.selectionService.selectAtLocation(t,e.clientX,e.clientY);const i=this.selectionService.selectedLogicalNode;!i||"Text"===i.type&&!r(i).isUnsupported?this.simpleTextEditingService.textNodeBeingEdited=t:this.browserLink.defaultActionService.doDefaultAction(i)}}handleDragStart(e){const t=this.selectionService.getFirstSelectedDomNode();return!(!a(t)&&"Text"!==this.selectionService.selectedLogicalNode.type)&&(!!In(this.browserLink,this.selectionService.selectedLogicalNode)&&(a(t)&&e.dataTransfer.setDragImage(t,0,0),this.selectionService.isSelectedNodeDragging=!0,!0))}handleDrag(e){const t=this.nodesFromAreaUtil.getDroppableLogicalContainerNodeAtPoint(e.clientX,e.clientY,this.browserLink.logicalTree,this.nodeBoundingClientRectUtil);if(!In(this.browserLink,t))return e.dataTransfer.dropEffect="none",e.dataTransfer.effectAllowed="none",void(this.isDragAndDropInsertionPointVisible=!1);this.selectionService.isSelectedNodeDragging&&function(e,t){return Dn.areCoordinatesInsideLogicalNode(e.clientX,e.clientY,t)?(e.dataTransfer.dropEffect="none",e.dataTransfer.effectAllowed="none",!1):(e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",!0)}(e,this.selectionService.selectedLogicalNode)||Bn(e,t)?(this.dragMouseX=e.clientX,this.dragMouseY=e.clientY,this.isDragAndDropInsertionPointVisible=!0):this.isDragAndDropInsertionPointVisible=!1}handleDragLeave(){this.resetDragAndDropState(!1)}handleDragEnd(e){this.resetDragAndDropState()}handleDrop(e){let t="";try{t=e.dataTransfer.getData("text/html");const i=e.clientX,o=e.clientY,n=this.nodesFromAreaUtil.getDroppableLogicalContainerNodeAtPoint(i,o,this.browserLink.logicalTree,this.nodeBoundingClientRectUtil);if(!n){const e="handleDrop() failed - no parent container element to drop into could be found.";return void this.sendHandleDropFailed(e,t)}let r=this.nodesFromAreaUtil.getClosestNonWhitespaceLogicalChildNodeAtPoint(i,o,n,this.nodeBoundingClientRectUtil);if(r){const e=this.nodeBoundingClientRectUtil.getBoundingRectForLogicalNode(r);e&&this.nodeBoundingClientRectUtil.isMouseCloserToBoundingClientRectLeftThanRight(i,e)&&(r=this.getPrecedingNonWhitespaceSiblingLogicalNode(n,r))}An(this.browserLink,n,r,this.selectionService.isSelectedNodeDragging,e)}catch(e){let i=e instanceof Error?e.message+"\r\n"+e.stack:"Unknown Error";i="handleDrop() failed - "+i,this.sendHandleDropFailed(i,t)}finally{this.resetDragAndDropState()}}sendHandleDropFailed(e,t){this.browserLink.diagnosticLog.writeMessageForEvent(7549,e+" dropData is: "+t,2),this.browserLink.telemetryService.sendDragAndDropFailed(t,e)}resetDragAndDropState(e=!0){this.dragMouseX=-1,this.dragMouseY=-1,this.isDragAndDropInsertionPointVisible=!1,e&&(this.selectionService.isSelectedNodeDragging=!1)}getPrecedingNonWhitespaceSiblingLogicalNode(e,t){for(let i=1;i=0;t--){const i=e.children[t];if(i&&("Text"!==i.type||i.text.trim()))return i}break}return null}};tv([Oa],ov.prototype,"browserLink",void 0),tv([Ua],ov.prototype,"designSurfaceService",void 0),tv([Ia],ov.prototype,"selectionService",void 0),tv([ja],ov.prototype,"hotkeyManagerService",void 0),tv([Ba],ov.prototype,"simpleTextEditingService",void 0),tv([Da],ov.prototype,"toolActionPanelService",void 0),tv([qa],ov.prototype,"nodesFromAreaUtil",void 0),tv([Ka],ov.prototype,"nodeBoundingClientRectUtil",void 0),tv([Ga],ov.prototype,"quickEditingService",void 0),tv([Zr],ov.prototype,"dragMouseX",void 0),tv([Zr],ov.prototype,"dragMouseY",void 0),tv([Zr],ov.prototype,"isDragAndDropInsertionPointVisible",void 0),tv([Zr],ov.prototype,"actionPanel",void 0),tv([Zr],ov.prototype,"isActionPanelVisible",void 0),tv([Zr],ov.prototype,"actionPanelDetails",void 0),ov=tv([Ks({name:"selection-overlay",template:Zf,styles:Qf})],ov);const nv=Ts` ${Os((e=>!e.selectionIsText),Ts`
e.divStyle}>
`)} ${Os((e=>e.selectionIsText),Ts` ${hf((e=>e.highlights),Ts` e.tagLocation} displayText=${e=>e.displayText} contentPreview=${e=>e.contentPreview} height=${e=>e.height} width=${e=>e.width} top=${e=>e.top} left=${e=>e.left} hasTag=${(e,t)=>{return i=e,t.isFirst&&"Top"===i.tagLocation||function(e,t){return t.isLast&&"Bottom"===e.tagLocation}(e,t);var i}} @dblclick=${(e,t)=>t.parent.handleTextDoubleClick(t.event)}> `,{positioning:!0})} `)} `,rv=Kr` .selectionTag { background-color: ${Pg}; display: flex; position: absolute; font-weight: bold; white-space: nowrap; align-items: center; padding: 3px 10px; border-radius: 3px; box-sizing: border-box; box-shadow: var(--wlp-box-shadow); color: ${Ag}; font-family: var(--body-font); font-size: var(--type-ramp-base-font-size); cursor: default; pointer-events: all; } :host([tagLocation="Inside"]) .selectionTag { opacity: 0.85; } :host([tagLocation="Top"]) .selectionTag { top: calc(-1 * var(--wlp-status-bar-height)); left: 0; } :host([tagLocation="Top"]) .selectionTag::after { box-sizing: border-box; content: " "; position: absolute; left: 25%; margin-left: -5px; border-width: 5px; border-style: solid; top: 100%; border-color: ${Pg} transparent transparent transparent; } :host([tagLocation="Bottom"]) .selectionTag { bottom: calc(-1 * var(--wlp-status-bar-height)); left: 0; } :host([tagLocation="Bottom"]) .selectionTag::after { box-sizing: border-box; content: " "; position: absolute; left: 25%; margin-left: -5px; border-width: 5px; border-style: solid; bottom: 100%; border-color: transparent transparent ${Pg} transparent; } `,sv=Kr` #elementOutline { position: fixed; border-style: solid; border-width: 1px; border-color: ${Pg}; outline-style: none; height: 0px; width: 0px; top: 0px; left: -100px; } ${rv} :host([hasActionItems]) .selectionTag { cursor: pointer; } .actionPanelIndicator { display: none; margin-left: 5px; } :host([hasActionItems]) .actionPanelIndicator { display: inline; } `;function av(e){var t,i;return e?r(e).mapsToDom&&(null===(t=e.getDomNode())||void 0===t?void 0:t.nodeType)===Node.ELEMENT_NODE?e.getDomNode():null!==(i=lv(e))&&void 0!==i?i:function(e){var t,i;e=null===(t=e)||void 0===t?void 0:t.parent;for(;e&&!r(e).mapsToDom;)e=e.parent;for(;e&&e.getDomNode()&&e.getDomNode().nodeType!==Node.ELEMENT_NODE;)e=e.parent;return null===(i=e)||void 0===i?void 0:i.getDomNode()}(e):null}function lv(e){for(const i of e.children){var t;if(r(i).mapsToDom&&(null===(t=i.getDomNode())||void 0===t?void 0:t.nodeType)===Node.ELEMENT_NODE)return i.getDomNode();{const e=lv(i);if(e)return e}}return null}function cv(e){const t=av(e);if(t&&!function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}(t)){const e={block:(new d).getBoundingClientRect(t).height>document.documentElement.clientHeight?"start":"center",inline:"center"};t.scrollIntoView(e)}}var dv,hv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class uv{constructor(){this.contentPreview=""}}hv([Zr],uv.prototype,"displayText",void 0),hv([Zr],uv.prototype,"contentPreview",void 0),hv([Zr],uv.prototype,"height",void 0),hv([Zr],uv.prototype,"width",void 0),hv([Zr],uv.prototype,"top",void 0),hv([Zr],uv.prototype,"left",void 0),hv([Zr],uv.prototype,"tagLocation",void 0);let pv=dv=class extends qs{constructor(){super(...arguments),this.contentPreview="",this.tagLocation="Top",this.hasActionItems=!1,this.onExpansionOnEmptyElementsChanged=()=>{this.updateProperties()},this.onSelectedNodeChanged=()=>{this.configureForSelectedNode(!0)},this.onScroll=()=>{this.updateProperties()},this.onWindowResize=()=>{this.updateProperties(),this.keyboardNavigationService.serviceInitialized&&this.keyboardNavigationService.updatePositionMap()},this.onChangesApplied=()=>{this.configureForSelectedNode(!1),this.keyboardNavigationService.serviceInitialized&&this.keyboardNavigationService.updatePositionMap()}}handleSelectionTagClick(e){this.hasActionItems&&(e.stopPropagation(),e.preventDefault(),this.$emit("selectionTagClicked"))}getHighlights(e,t){const i=[];if(0===e.length)return i;const o=dv.selectionTagNameHeight;let n;const r=window.innerHeight-e[e.length-1].bottom;n=e[0].top0)if(1===this.selectedDomNodes.length&&this.selectedDomNodes[0].nodeType===Node.TEXT_NODE){this.tagLocation="Top",this.selectionIsText=!0;const e=this.selectedDomNodes[0];if(e.parentNode){const t=document.createRange();t.selectNode(e);const i=t.getClientRects();this.highlights=this.getHighlights(i,this.displayText)}else this.highlights=[]}else{this.selectionIsText=!1;const e=c(...this.selectedDomNodes);e&&(t.height=e.height+2,t.width=e.width+2,t.top=e.top-2,t.left=e.left-2);const i=dv.selectionTagNameHeight,o=window.innerHeight-(t.top+t.height);t.topdv.contentPreviewTrimLength?o.substring(0,dv.contentPreviewTrimLength-3)+"…":o)}configureForSelectedNode(e){const t=this.selectionService.selectedLogicalNode,i=Vn(t).truncatedText;this.displayText=i,this.setContentPreviewText(t),this.selectedDomNodes=this.selectionService.getAllSelectedDomNodes(),this.updateProperties(),this.toolsActionPanelService.selectionTag=this.selectionTag,e&&cv(this.selectionService.selectedLogicalNode)}selectionTagChanged(e,t){this.toolsActionPanelService.selectionTag=t}handleTextDoubleClick(e){e.preventDefault();const t=this.selectionService.selectedLogicalNode;if(!r(t).isUnsupported){const i=null==t?void 0:t.getDomNode();(null==i?void 0:i.nodeType)===Node.TEXT_NODE&&(this.simpleTextEditingService.textNodeBeingEdited=i,e.stopPropagation())}}};pv.selectionTagNameHeight=23,pv.contentPreviewTrimLength=40,hv([Zr],pv.prototype,"displayText",void 0),hv([Zr],pv.prototype,"contentPreview",void 0),hv([Zr],pv.prototype,"selectedDomNodes",void 0),hv([Oa],pv.prototype,"browserLink",void 0),hv([Ia],pv.prototype,"selectionService",void 0),hv([Da],pv.prototype,"toolsActionPanelService",void 0),hv([Ha],pv.prototype,"expandEmptyElementsService",void 0),hv([Fa],pv.prototype,"keyboardNavigationService",void 0),hv([Ba],pv.prototype,"simpleTextEditingService",void 0),hv([As],pv.prototype,"tagLocation",void 0),hv([Zr],pv.prototype,"divStyle",void 0),hv([Zr],pv.prototype,"highlights",void 0),hv([Zr],pv.prototype,"selectionIsText",void 0),hv([Zr],pv.prototype,"selectionTag",void 0),hv([As({mode:"boolean"})],pv.prototype,"hasActionItems",void 0),pv=dv=hv([Ks({name:"selector-decorator",template:nv,styles:sv})],pv);const gv=Ts`
e.customStyle}> ${Os((e=>e.hasTag),Ts` e.customTextStyle}>${e=>e.displayText} `)}
`,fv=Kr` ${rv} .highlight { position: fixed; background-color: ${_g}; } `;var vv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let bv=class extends qs{get customStyle(){return`height: ${this.height}px;`+`width: ${this.width}px;`+`top: ${this.top}px;`+`left: ${this.left}px;`}get customTextStyle(){return"Inside"===this.tagLocation?`top: ${2+this.top<0?-this.top:0}px;`+`left: ${2+this.left<0?-this.left:0}px;`:""}};vv([As],bv.prototype,"displayText",void 0),vv([As],bv.prototype,"contentPreview",void 0),vv([As],bv.prototype,"height",void 0),vv([As],bv.prototype,"width",void 0),vv([As],bv.prototype,"top",void 0),vv([As],bv.prototype,"left",void 0),vv([As],bv.prototype,"tagLocation",void 0),vv([As({mode:"boolean"})],bv.prototype,"hasTag",void 0),vv([Jr],bv.prototype,"customTextStyle",null),bv=vv([Ks({name:"selector-decorator-text-highlight",template:gv,styles:fv})],bv);const mv=Ts`
`,yv=Kr` :host(:not([isVisible])) .insertionCursor, :host(:not([isVisible])) fast-anchored-region { display: none; } :host([isVisible]) .insertionCursor { position: fixed; border-style: solid; border-width: 1; border-top-color: white; border-bottom-color: black; border-left-color: white; border-right-color: black; width: 0; animation: blink 1.0s steps(2) infinite; } .insertionCursor { pointer-events: none; } @keyframes blink { 0% { opacity: 0; } } `;var wv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class xv extends qs{constructor(){super(...arguments),this.onSelectedNodeChanged=()=>{this.configureForSelectedNode()},this.onScroll=()=>{this.updateProperties()},this.onWindowResize=()=>{this.updateProperties()},this.onChangesApplied=()=>{this.updateProperties()}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),window.addEventListener("scroll",this.onScroll),this.attachBrowserLinkEvents(),this.configureForSelectedNode()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("scroll",this.onScroll),this.detachBrowserLinkEvents()}attachBrowserLinkEvents(){this.selectionService.selectionChanged.subscribe(this.onSelectedNodeChanged),this.browserLink.autoSyncService.changesApplied.subscribe(this.onChangesApplied)}detachBrowserLinkEvents(){this.selectionService.selectionChanged.unsubscribe(this.onSelectedNodeChanged),this.browserLink.autoSyncService.changesApplied.unsubscribe(this.onChangesApplied)}configureForSelectedNode(){this.currentSelectedNode=this.selectionService.selectedLogicalNode,this.currentParent=this.selectionService.parentNode,this.currentPriorSibling=this.selectionService.priorSiblingNode,this.updateProperties()}updateProperties(){}}wv([Oa],xv.prototype,"browserLink",void 0),wv([Ia],xv.prototype,"selectionService",void 0);var kv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Sv=class extends xv{constructor(){super(...arguments),this.onEscapeEditingWithoutSave=()=>{this.updateProperties()}}connectedCallback(){super.connectedCallback(),this.browserLink.simpleTextEditingService.textNodeBeingEditedChanged.subscribe(this.onTextNodeBeingEditedChanged.bind(this)),this.browserLink.simpleTextEditingService.escapingEditingWithoutSave.subscribe(this.onEscapeEditingWithoutSave.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.browserLink.simpleTextEditingService.escapingEditingWithoutSave.unsubscribe(this.onEscapeEditingWithoutSave.bind(this))}updateProperties(){if(!this.isConnected||!this.currentParent||this.currentSelectedNode)return void(this.isVisible=!1);this.isVisible=!0;let e,t,i=null;if(this.currentPriorSibling&&Cv(this.currentPriorSibling)&&null===Jn(this.currentPriorSibling)?(i=this.currentParent,e=!0,t=!0):this.currentPriorSibling&&Cv(this.currentPriorSibling)?(i=Jn(this.currentPriorSibling),e=!1,t=!1):this.currentPriorSibling?(i=this.currentPriorSibling,e=!0,t=!1):(i=this.currentParent,e=!1,t=!0),i){const o=this.nodeBoundingClientRectUtil.getBoundingRectForLogicalNode(i);if(o){let i,n,r;t?(i=o.height-2,n=o.top+1,r=e?o.left+o.width-1:o.left+1):(i=o.height,n=o.top,r=e?o.left+o.width+1:o.left-1),this.setSizeAndLocation(i,n,r)}}}onTextNodeBeingEditedChanged(e,t){this.isVisible=!1}setSizeAndLocation(e,t,i){this.insertionCursor.style.height=`${e}px`,this.insertionCursor.style.top=`${t}px`,this.insertionCursor.style.left=`${i}px`}};function Cv(e){return"Text"===e.type&&(!e.text||null===e.text.match(/\S/))}kv([As({mode:"boolean"})],Sv.prototype,"isVisible",void 0),kv([qa],Sv.prototype,"nodesFromAreaUtil",void 0),kv([Ka],Sv.prototype,"nodeBoundingClientRectUtil",void 0),Sv=kv([Ks({name:"selector-insertion-decorator",template:mv,styles:yv})],Sv);const Nv=Ts`
e.handleOutlineClick(t.event)} id="outer-top">
e.handleOutlineClick(t.event)} id="outer-left">
e.handleOutlineClick(t.event)} id="outer-right">
e.handleOutlineClick(t.event)} id="outer-bottom">
`,Ev=5,$v=`${Ev}px`,Lv=Kr` #elementOutline { position: fixed; height: 0px; width: 0px; top: 0px; left: -100px; pointer-events: none; display: grid; grid-template-columns: ${$v} 1fr ${$v}; grid-template-rows: ${$v} 1fr ${$v}; } #outer-top, #outer-left, #outer-right, #outer-bottom { background-image: linear-gradient(to right top, black 10%, white 10%, white 40%, black 40%, black 60%, white 60%, white 90%, black 90%); background-size: ${$v} ${$v}; cursor: move; pointer-events: all; } #outer-top { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 1; } #outer-left { grid-column-start: 1; grid-column-end: 1; grid-row-start: 2; grid-row-end: 2; } #outer-right { grid-column-start: 3; grid-column-end: 3; grid-row-start: 2; grid-row-end: 2; } #outer-bottom { grid-column-start: 1; grid-column-end: 4; grid-row-start: 3; grid-row-end: 3; } `;var Tv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Ov=class extends xv{updateProperties(){const e={top:0,left:-100,height:0,width:0};if(this.currentParent&&!this.currentSelectedNode){const t=this.currentParent.getDomNode();if(t){const i=c(t);i&&(e.top=i.top-Ev,e.left=i.left-Ev,e.height=i.height+2*Ev,e.width=i.width+2*Ev)}}this.setSizeAndLocation(e.top,e.left,e.height,e.width)}handleOutlineClick(e){this.selectionService.selectLogicalNode(this.currentParent),e.stopPropagation()}setSizeAndLocation(e,t,i,o){this.elementOutline.style.top=`${e}px`,this.elementOutline.style.left=`${t}px`,this.elementOutline.style.height=`${i}px`,this.elementOutline.style.width=`${o}px`}};Ov=Tv([Ks({name:"selector-parent-decorator",template:Nv,styles:Lv})],Ov);const Rv=Ts` `,_v=(Uh(),Kr` :host { user-select: none; border-left: calc(var(--outline-width) * 1px) solid ${Ph}; height: 100%; pointer-events: none; } :host(.interactive) { cursor: pointer; pointer-events: auto; } :host(.interactive:hover) { background-color: ${Yd}; color: ${th}; } .blinking-warning, .blinking-error { animation: blink 1s; animation-iteration-count: 3; color: black; font-weight: bold; } .blinking-error { background-color: #F55762; } .blinking-warning { background-color: #FFE39E; } .blinking-error:hover { background-color: #F8828A; } .blinking-warning:hover { background-color: #FFE9B3; } @keyframes blink { 50% { opacity: 0.3 } } img { height: 16px; width: 16px; margin-right: 5px; margin-top: 1px; } .child { display: flex; } .content { display: flex; align-items: center; height: 100%; padding: 0 calc((var(--base-horizontal-spacing-multiplier) + var(--density)) * var(--design-unit) * 1px); font-family: var(--body-font); font-size: var(--type-ramp-base-font-size); } `);var Dv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Iv=class extends qs{constructor(){super();const e=new zf;this.rootUrl=e.rootUrl}displayTextChanged(e,t){this.statusTextDiv.classList.remove("blinking-warning"),this.statusTextDiv.classList.remove("blinking-error"),2===this.messageType?this.statusTextDiv.classList.add("blinking-error"):1===this.messageType&&this.statusTextDiv.classList.add("blinking-warning")}};Dv([Zr],Iv.prototype,"displayText",void 0),Dv([Zr],Iv.prototype,"fullText",void 0),Dv([Zr],Iv.prototype,"isUpdateButtonEnabled",void 0),Dv([Zr],Iv.prototype,"messageType",void 0),Dv([As],Iv.prototype,"rootUrl",void 0),Iv=Dv([Ks({name:"status-text",template:Rv,styles:_v})],Iv);var Pv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Av=Kr` :host { display: grid; grid-template-columns: minmax(0, 1fr) max-content; position: fixed; box-shadow: var(--wlp-box-shadow); height: var(--wlp-status-bar-height); width: 100%; bottom: 0; left: 0; font: var(--body-font); background-color: ${Uh().backgroundToken}; color: ${Dh}; } :host([minimal]) { grid-template-columns: minmax(0, 1fr); } wlp-start-button { margin-right: 5px; } status-text { margin-left: 5px; } `,Bv=Ts` ${Os((e=>!e.minimal),Ts` {var t;return null===(t=e.currentStatus)||void 0===t?void 0:t.messageType}} :displayText=${e=>{var t;return null===(t=e.currentStatus)||void 0===t?void 0:t.displayText}} :fullText=${e=>{var t;return null===(t=e.currentStatus)||void 0===t?void 0:t.fullText}} :isUpdateButtonEnabled=${e=>e.isUpdateBrowserButtonEnabled} @click=${e=>e.handleClick()}> `)} `;let Fv=class extends qs{constructor(){super(...arguments),this.unsubscribedFromEvents=!1,this.handleStatusChanged=()=>{var e;const t=this.statusService.currentStatus;(null===(e=this.currentStatus)||void 0===e?void 0:e.displayText)!==$n("status.updating")||t.displayText!==$n("status.upToDate")?this.currentStatus=t:this.detachBrowserLinkEvents()},this.handleUpdateBrowserButtonEnabledChanged=()=>{this.isUpdateBrowserButtonEnabled=this.updateBrowserButtonService.isButtonEnabled}}connectedCallback(){super.connectedCallback(),this.currentStatus=this.statusService.currentStatus,this._statusBarMouseTrapInstance=Tn()(this),this._statusBarMouseTrapInstance.bind(Rn.tagNavBarNavigation,this.handleArrowKeyNavigation.bind(this)),this.attachBrowserLinkEvents()}handleArrowKeyNavigation(e){if(!this.tagNavigatorNode)return;e.stopPropagation(),e.preventDefault();const t=this.shadowRoot.activeElement;if(t==this.tagNavigatorNode){const t=this.tagNavigatorNode.shadowRoot.activeElement;if("tagNavBar_tagItem"!=t.className)return;if("ArrowRight"==e.key){const e=t.nextElementSibling;e?e.focus():this.isUpdateBrowserButtonEnabled&&this.statusTextNode.focus()}else if("ArrowLeft"==e.key){const e=t.previousElementSibling;e&&e.focus()}}else if(t==this.statusTextNode&&"ArrowLeft"==e.key){const e=this.tagNavigatorNode.content.childElementCount;this.tagNavigatorNode.content.children[e-1].focus()}}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._statusBarMouseTrapInstance)||void 0===e||e.unbind(Rn.tagNavBarNavigation),this.detachBrowserLinkEvents()}attachBrowserLinkEvents(){this.statusService.statusChanged.subscribe(this.handleStatusChanged),this.updateBrowserButtonService.isButtonEnabledChanged.subscribe(this.handleUpdateBrowserButtonEnabledChanged),this.unsubscribedFromEvents=!1}detachBrowserLinkEvents(){this.statusService.statusChanged.unsubscribe(this.handleStatusChanged),this.updateBrowserButtonService.isButtonEnabledChanged.unsubscribe(this.handleUpdateBrowserButtonEnabledChanged),this.unsubscribedFromEvents=!0}handleClick(){var e;null===(e=this.browserLink)||void 0===e||e.refreshBrowsersService.refreshAllBrowsers()}};Pv([As({mode:"boolean"})],Fv.prototype,"minimal",void 0),Pv([Zr],Fv.prototype,"currentStatus",void 0),Pv([Zr],Fv.prototype,"isUpdateBrowserButtonEnabled",void 0),Pv([Zr],Fv.prototype,"unsubscribedFromEvents",void 0),Pv([Oa],Fv.prototype,"browserLink",void 0),Pv([Ma],Fv.prototype,"statusService",void 0),Pv([za],Fv.prototype,"updateBrowserButtonService",void 0),Fv=Pv([Ks({name:"wlp-status-bar",template:Bv,styles:Av})],Fv);const Mv=Kr` :host { max-height: var(--wlp-status-bar-height); display: grid; grid-template-columns: max-content minmax(0, max-content) max-content; } .tagNavBar_container { max-height: var(--wlp-status-bar-height); white-space: nowrap; overflow-x: hidden; } .tagNavBar_contents { display: inline-block; } .tagNavBar_tagItem { cursor: pointer; } .tagNavBar_tagItem, .tagNavBar_scroller { user-select: none; display: inline-block; padding: var(--wlp-status-bar-padding); font-family: var(--body-font); font-size: var(--type-ramp-base-font-size); margin-top: 2px; margin-right: 2px; height: 14px; } .tagNavBar_tagItem:hover { background-color: ${Yd}; color: ${ih}; } .tagNavBar_tagItem[data-inactive]:hover { background-color: ${ph}; color: ${Dh}; cursor: not-allowed; } .tagNavBar_scroller { user-select: none; color: ${Rh}; } :host([overflow-direction="left"]) #leftScroller, :host([overflow-direction="both"]) #leftScroller, :host([overflow-direction="right"]) #rightScroller, :host([overflow-direction="both"]) #rightScroller { cursor: pointer; font-weight: 500; color: inherit; } :host([overflow-direction="left"]) #leftScroller:hover, :host([overflow-direction="both"]) #leftScroller:hover, :host([overflow-direction="right"]) #rightScroller:hover, :host([overflow-direction="both"]) #rightScroller:hover { background-color: ${Yd}; color: ${ih}; } div[data-selected="true"] { font-weight: bold; color: ${th}; background-color: ${Pg}; } div[data-outlined="true"] { font-weight: bold; outline: solid 2px ${Pg}; } `,Vv=Ts` ${Os((e=>e.hasSelection),Ts`
e.handleLeftScrollerClick()}><
${hf((e=>e.currentTagList),Ts`
t.parent.handleTagNavBarSelectionEvent(e,t.event)} @dragover=${(e,t)=>t.parent.handleDrag(e,t.event)} @drop=${(e,t)=>t.parent.handleDrop(e,t.event)} @keydown=${(e,t)=>t.parent.handleTagNavBarSelectionEvent(e,t.event)} title=${e=>e.fullText}> ${e=>e.truncatedText}
`)}
e.handleRightScrollerClick()}>>
`)} `;var jv=void 0&&(void 0).__decorate||function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let zv=class extends qs{constructor(){super(...arguments),this.tagNavBarOverflow="none",this.handleWindowResize=()=>{this.isLoaded&&(this.checkTagNavBarOverflowAndSetState(),this.scrollSelectedTagElementIntoView())},this.scrollSelectedTagElementIntoView=()=>{if(this.isLoaded){const e=this.container.querySelectorAll('div[data-selected="true"]')[0];e&&e.scrollIntoView({behavior:"smooth"})}},this.checkTagNavBarOverflowAndSetState=()=>{const e=this.determineNavBarOverflow();this.tagNavBarOverflow!==e&&(this.tagNavBarOverflow=e)},this.onTagNavBarChanged=(e,t)=>{this.setTagsAndSelection(t.tagItemList,t.selectedTagItem,t.parentTagItem),Mr.queueUpdate(this.tagNavBarUpdated)},this.tagNavBarUpdated=()=>{this.scrollSelectedTagElementIntoView(),this.checkTagNavBarOverflowAndSetState()}}get hasSelection(){var e;return!!((null===(e=this.currentTagList)||void 0===e?void 0:e.length)>0&&(this.selectedTagItem||this.parentTagItem))}get isLoaded(){return!!(this.container&&this.content&&this.hasSelection)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleWindowResize),this.isLoaded&&(this.checkTagNavBarOverflowAndSetState(),this.scrollSelectedTagElementIntoView()),this.setTagsAndSelection(this.tagNavigationService.tagItemList,this.tagNavigationService.selectedTagItem,this.tagNavigationService.parentTagItem),this.tagNavigationService.tagHierarchyChanged.subscribe(this.onTagNavBarChanged),Ln.bind(Rn.tagNavBarSelection,this.tagNavigationService.onNavigateHotKeyPressed.bind(this.tagNavigationService),"keyup")}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleWindowResize),this.tagNavigationService.tagHierarchyChanged.unsubscribe(this.onTagNavBarChanged),Ln.unbind(Rn.tagNavBarSelection,"keyup")}handleDrop(e,t){let i="";try{i=t.dataTransfer.getData("text/html");const o=e.logicalNode;let n;o.children&&o.children.length>0&&(n=this.getLastNonWhitespaceChild(o)),An(this.browserLink,o,n,this.selectionService.isSelectedNodeDragging,t)}catch(e){let t=e instanceof Error?e.message+"\r\n"+e.stack:"Unknown Error";t="tagNavigator handleDrop() failed - "+t,this.sendHandleDropFailed(t,i)}}handleDrag(e,t){var i,o,n;this.selectionService.isSelectedNodeDragging?(i=t.dataTransfer,o=e.logicalNode,n=this.selectionService.selectedLogicalNode,function(e,t){let i=e;do{if(i===t)return!1;i=i.parent}while(i);return!0}(o,n)?(i.dropEffect="move",i.effectAllowed="move"):(i.dropEffect="none",i.effectAllowed="none")):In(this.browserLink,e.logicalNode)?function(e,t){Bn(e,t)}(t,e.logicalNode):(t.dataTransfer.dropEffect="none",t.dataTransfer.effectAllowed="none"),t.stopPropagation()}handleTagNavBarSelectionEvent(e,t){if("keydown"===t.type){if("Enter"!==t.code)return!0}return e.logicalNode&&this.selectionService.selectLogicalNode(e.logicalNode),!1}handleLeftScrollerClick(){this.handleNavBarTranslateX(!0,15,70,10)}handleRightScrollerClick(){this.handleNavBarTranslateX(!1,15,70,10)}getLastNonWhitespaceChild(e){for(let t=e.children.length-1;t>=0;t--){const i=e.children[t];if("Text"!==i.type||i.text.trim())return i}return null}sendHandleDropFailed(e,t){this.browserLink.diagnosticLog.writeMessageForEvent(7549,e+" dropData is: "+t,2),this.browserLink.telemetryService.sendDragAndDropFailed(t,e)}handleNavBarTranslateX(e,t,i,o){if(this.isLoaded){let n=0;const r=setInterval(function(){e?this.container.scrollLeft-=o:this.container.scrollLeft+=o,n+=o,n>=i&&(window.clearInterval(r),this.checkTagNavBarOverflowAndSetState())}.bind(this),t)}}setTagsAndSelection(e,t,i){this.currentTagList=e,this.selectedTagItem=t,this.parentTagItem=i}determineNavBarOverflow(){if(this.isLoaded){const e=this.container.getBoundingClientRect(),t=Math.floor(e.right),i=Math.floor(e.left),o=this.content.getBoundingClientRect(),n=Math.floor(o.right),r=Math.floor(o.left);if(i>r&&tt)return"right"}return"none"}};jv([As({attribute:"overflow-direction"})],zv.prototype,"tagNavBarOverflow",void 0),jv([Zr],zv.prototype,"currentTagList",void 0),jv([Zr],zv.prototype,"selectedTagItem",void 0),jv([Zr],zv.prototype,"parentTagItem",void 0),jv([Va],zv.prototype,"tagNavigationService",void 0),jv([Ia],zv.prototype,"selectionService",void 0),jv([Oa],zv.prototype,"browserLink",void 0),jv([Jr],zv.prototype,"hasSelection",null),zv=jv([Ks({name:"wlp-tag-navigator",template:Vv,styles:Mv})],zv);i(102);class Uv{constructor(e){this.inertAttributeAddedByWlpAttributeName="inert-attribute-added-by-wlp",this.enableUserInteractionsCallCount=1,this.observer=new MutationObserver(this.mutationCallback.bind(this)),this.handleDesignSurfaceStateChanged=()=>{this.browserLink.designSurfaceService.isEnabled?this.disableUserInteractionsOnUserPageRoots():this.enableUserInteractionsOnUserPageRoots()},this.browserLink=e,this.browserLink.designSurfaceService.isEnabledChanged.subscribe(this.handleDesignSurfaceStateChanged),this.browserLink.designSurfaceService.isEnabled&&this.disableUserInteractionsOnUserPageRoots();const t=document.body;this.observer.observe(t,{childList:!0})}runUserPageInteractionFunction(e,t){if(this.browserLink.designSurfaceService.isEnabled){this.enableUserInteractionsOnUserPageRoots();let i=t;try{i=e()}catch{}return this.disableUserInteractionsOnUserPageRoots(),i}return e()}enableUserInteractionsOnUserPageRoots(){if(1!=++this.enableUserInteractionsCallCount)return;const e=document.body.children;if(e)for(const t of e)t.hasAttribute(this.inertAttributeAddedByWlpAttributeName)&&(t.removeAttribute(this.inertAttributeAddedByWlpAttributeName),t.hasAttribute("inert")&&t.removeAttribute("inert"))}disableUserInteractionsOnUserPageRoots(){if(0===this.enableUserInteractionsCallCount||0!=--this.enableUserInteractionsCallCount)return;const e=document.body.children;if(e)for(const t of e)t.tagName===kr.livePreviewRootTagName.toUpperCase()||t.id===kr.browserLinkScriptElementId||t.hasAttribute("inert")||(t.setAttribute(this.inertAttributeAddedByWlpAttributeName,"true"),t.setAttribute("inert",""))}mutationCallback(e,t){e.forEach((e=>{for(const t of e.addedNodes)this.bodyChildAdded(t)}))}bodyChildAdded(e){if(!this.browserLink.designSurfaceService.isEnabled||0!==this.enableUserInteractionsCallCount)return;const t=e;t.parentNode===document.body&&a(e)&&t.tagName!==kr.livePreviewRootTagName.toUpperCase()&&t.id!==kr.browserLinkScriptElementId&&(t.hasAttribute("inert")||(t.setAttribute(this.inertAttributeAddedByWlpAttributeName,"true"),t.setAttribute("inert","")))}}class Hv{constructor(){this.startTime=new Date}}class Wv{constructor(e){this.operations=new qv,this.browserLink=e}getCreateNewElementText(e){if(!e||!In(this.browserLink,e))return null;const t=this.operations.createNewElement(e);return null==t?void 0:t.operationText}createNewElementAfter(e){if(!In(this.browserLink,e))return!1;const t=this.operations.createNewElement(e);var i;return!(null==t||!t.insertAfterNode||null==t||!t.textToInsert)&&(null===(i=this.browserLink.logicalTreeEditingService)||void 0===i||i.insertTextAfterSiblingNode(t.insertAfterNode,t.textToInsert),!0)}}class qv{constructor(){this.elementsToDuplicatePattern=/(^p$|^div$|^li$)/i,this.elementsToCreateEmptyParagraphPattern=/^h\d+$/i,this.tableCellPattern=/^td$/i,this.tableRowPattern=/^tr$/i,this.blankSpace=" ",this.emptyParagraph=`

 

`}createNewElement(e){let t;if(t="Text"===e.type?e.parent:e,t){if(this.shouldDuplicate(t))return{insertAfterNode:t,textToInsert:this.duplicate(t),operationText:$n("quickTextEditing.duplicateElementOperation")};if(this.shouldCreateEmptyParagraphTag(t))return{insertAfterNode:t,textToInsert:this.createEmptyParagraphTag(),operationText:$n("quickTextEditing.createNewParagraphOperation")};if(this.shouldDuplicateTableRows(t)){const e=this.findTableRowAncestor(t);return{insertAfterNode:e,textToInsert:this.createTableRowShell(e),operationText:$n("quickTextEditing.addTableRowOperation")}}}return null}shouldDuplicate(e){return this.elementsToDuplicatePattern.test(e.tagName)}duplicate(e){const t=e.getDomNode();if(!t)return null;const i=Kv(t);return i.innerHTML=this.blankSpace,i.outerHTML}shouldCreateEmptyParagraphTag(e){return this.elementsToCreateEmptyParagraphPattern.test(e.tagName)}createEmptyParagraphTag(){return this.emptyParagraph}shouldDuplicateTableRows(e){if(this.tableCellPattern.test(e.tagName)){const t=e.getDomNode();if(!t.nextElementSibling){if(!t.parentElement.nextElementSibling)return!0}}return!1}findTableRowAncestor(e){do{let t=e.parent;const i=t.getDomNode();if(i&&this.tableRowPattern.test(i.tagName))return t;t=t.parent}while(parent);return null}createTableRowShell(e){const t=e.getDomNode(),i=Kv(t);for(const e of t.childNodes){let t;if(e.nodeType===Node.ELEMENT_NODE){const i=Kv(e);i.innerHTML=this.blankSpace,t=i}else t=e.cloneNode(!1);i.appendChild(t)}return i.outerHTML}}function Kv(e){const t=e.cloneNode(!1);return t.removeAttribute("id"),t}class Gv{constructor(e,t,i,o){this.setBound(e,t,i,o)}Right(){return this.x+this.w}Bottom(){return this.y+this.h}Empty(){this.setBound(0,0,0,0)}setBoundRect(e){this.setBound(e.x,e.y,e.w,e.h)}setBound(e,t,i,o){this.x=e,this.y=t,this.w=i,this.h=o}IsEmpty(){return 0==this.w||0==this.h}Intersects(e){return this.xt.Bottom()){const i=new Gv(e.x,t.Bottom(),e.w,e.Bottom()-t.Bottom());this.AppendRect(i),e.h=e.h-i.h}if(e.xt.Right()){const i=new Gv(t.Right(),e.y,e.Right()-t.Right(),e.h);this.AppendRect(i)}}SpliceInList(e,t){t.headNode!=t.tailNode?(this.tailNode==e&&(this.tailNode=t.tailNode),t.tailNode.nextRectNode=e.nextRectNode,e.Rect=t.headNode.Rect,e.nextRectNode=t.headNode.nextRectNode):e.Rect=t.headNode.Rect}RemoveNode(e){if(this.headNode==this.tailNode)return this.Empty(),null;if(this.headNode==e)return this.RemoveFirstNode(),this.headNode;if(this.tailNode==e)return this.RemoveLastNode(),null;const t=e.nextRectNode;return e.Rect=t.Rect,e.nextRectNode=t.nextRectNode,e}RemoveFirstNode(){null!=this.headNode&&(this.headNode=this.headNode.nextRectNode)}RemoveLastNode(){if(null==this.headNode)return;let e=this.headNode,t=null;for(;e.nextRectNode;)t=e,e=e.nextRectNode;t&&(t.nextRectNode=null),this.tailNode=t}Empty(){this.headNode=null,this.tailNode=null,this.boundingRect.Empty()}AppendRect(e){e.IsEmpty()||this.AppendNode(new Xv(e))}AppendNode(e){this.headNode||(this.headNode=e),this.tailNode&&(this.tailNode.nextRectNode=e),this.tailNode=e,e.nextRectNode=null,this.boundingRect.Union(e.Rect)}IsEmpty(){return this.boundingRect.IsEmpty()}MakeBound(){this.boundingRect.Empty();let e=this.headNode;for(;e;)this.boundingRect.Union(e.Rect),e=e.nextRectNode}}class Qv{constructor(e){this._nodeBoundingClientRectUtil=new d,this._browserLink=e,this._editableRectArray=[],this._overlayRectList=new Yv}get overlayRectList(){return this._overlayRectList}updateOverlayRectList(){if(this._browserLink.designSurfaceService){this._overlayRectList.Empty(),this._overlayRectList.AppendRect(new Gv(0,0,document.documentElement.scrollWidth,document.documentElement.scrollHeight)),this._editableRectArray=[],this.preOrderTravesalAndAddEditableRect(this._browserLink.logicalTree.root);for(const e of this._editableRectArray)this._overlayRectList.Difference(e)}}preOrderTravesalAndAddEditableRect(e){if(e){if(In(this._browserLink,e)){const t=e.getDomNode();if(!t){const t=new Gv(0,0,0,0);return this.addUnionRectOfDescendants(e,t),void this._editableRectArray.push(t)}this._editableRectArray.push(this.getQRectFromDomNode(t))}for(const t of e.children)this.preOrderTravesalAndAddEditableRect(t)}}getQRectFromDomNode(e){const t=this._nodeBoundingClientRectUtil.getBoundingClientRect(e);return new Gv(t.x+window.scrollX,t.y+window.scrollY,t.width,t.height)}addUnionRectHelper(e,t,i){const o=this.getQRectFromDomNode(t);"absolute"==e.style.position||"fixed"==e.style.position||"sticky"==e.style.position||"relative"==e.style.position?this._editableRectArray.push(o):i.Union(o)}addUnionRectOfDescendants(e,t){if(!e)return;const i=e.getDomNode();i&&(i.nodeType==Node.ELEMENT_NODE?this.addUnionRectHelper(i,i,t):i.nodeType==Node.TEXT_NODE&&this.addUnionRectHelper(i.parentElement,i,t));for(const i of e.children)this.addUnionRectOfDescendants(i,t)}}class Zv{constructor(){this.showBlockedResourcesUiEventDispatcher=new n.pB}get showBlockedResourcesUiEvent(){return this.showBlockedResourcesUiEventDispatcher.asEvent()}}class Jv{constructor(e){this._browserLink=e,this._listeningToBeforeChanges=!1,this._tempTextNodesToDelete=[]}addTempNodeToDelete(e){this._tempTextNodesToDelete.push(e),this.ensureListeningToBeforeChangesApplied()}ensureListeningToBeforeChangesApplied(){!this._listeningToBeforeChanges&&this._browserLink.autoSyncService&&(this._listeningToBeforeChanges=!0,this._browserLink.autoSyncService.beforeChangesApplied.subscribe(this.deleteAllTempNodes.bind(this)))}deleteAllTempNodes(){0!==this._tempTextNodesToDelete.length&&(this._tempTextNodesToDelete.forEach((e=>{e.parentNode&&e.parentNode.removeChild(e)})),this._tempTextNodesToDelete=[])}}function eb(e){const t=new Hv;if(function(){try{return window.self!==window.top}catch(e){return!0}}())return e.log("Skipping tools initialization due to IFrame detection"),{onConnected(){},themeChanged(e){},onResourcesBlocked(e){}};!function(e,t){const i=new dr(e);e.addSharedService("selectionHostingService",i),e.addSharedService("wlpInitStartInfoService",t),e.addSharedService("toolsActionPanelService",new $r(e)),e.addSharedService("toolsLifetimeService",new Vg(e)),e.addSharedService("selectionService",new Yn(e)),e.addSharedService("browserLinkConnectionStatusService",new yr),e.addSharedService("logicalTreeInitializedStatusService",new wr),e.addSharedService("simpleTextEditingService",new Hg(e)),e.addSharedService("keyboardNavigationService",new pr(e)),e.addSharedService("statusService",new gr),e.addSharedService("tagNavigationService",new fr(e)),e.addSharedService("hotkeyManagerService",new Ug(e)),e.addSharedService("updateBrowserButtonService",new vr),e.addSharedService("designSurfaceService",new Er(e)),e.addSharedService("expandEmptyElementsService",new Mn(e)),e.addSharedService("disableUserPageInteractionsService",new Uv(e)),e.addSharedService("quickEditingService",new Wv(e)),e.addSharedService("greyOutOverlayService",new Qv(e)),e.addSharedService("resourcesUiStateService",new Zv),e.addSharedService("tempTextNodeToDeleteOnAutoSyncService",new Jv(e)),window["livePreview"]=new mr(e)}(e,t),e.toolsLifetimeService.renderLivePreviewBrowserUI();return{onConnected:function(){e.log("Tools extension connected"),e.toolsLifetimeService.initialize()},themeChanged:function(t){e.toolsLifetimeService.updateToolsTheme(t)},onResourcesBlocked:function(t){const i=(e=>{const t=[];for(const[i,o]of Object.entries(e.blockedResources)){const e={baseUrl:i,blockedResources:o};t.push(e)}return t})(t);e.resourcesUiStateService.showBlockedResourcesUiEventDispatcher.dispatch(e.resourcesUiStateService,i)}}}},478:function(e,t,i){e.exports=i(514)["default"]},155:function(e){e.exports=function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),n=Object.keys(o.default).reduce((function(e,t){return e.concat(o.default[t])}),[]);t.default=function(e){return-1===n.indexOf(e.key)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={modifier:["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Symbol","SymbolLock"],legacyModifier:["Hyper","Super"],whiteSpace:["Enter","Tab"],navigation:["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp"],editing:["Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo"],ui:["Accept","Again","Attn","Cancel","ContextMenu","Escape","Execute","Find","Help","Pause","Play","Props","Select","ZoomIn","ZoomOut"],device:["BrightnessDown","BrightnessUp","Eject","LogOff","Power","PowerOff","PrintScreen","Hibernate","Standby","WakeUp"],imeCompositionKeys:["AllCandidates","Alphanumeric","CodeInput","Compose","Convert","Dead","FinalMode","GroupFirst","GroupLast","GroupNext","GroupPrevious","ModeChange","NextCandidate","NonConvert","PreviousCandidate","Process","SingleCandidate"],koreanSpecific:["HangulMode","HanjaMode","JunjaMode"],japaneseSpecific:["Eisu","Hankaku","Hiragana","HiraganaKatakana","KanaMode","KanjiMode","Katakana","Romaji","Zenkaku","ZenkakuHankaku"],commonFunction:["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Soft1","Soft2","Soft3","Soft4"],multimedia:["ChannelDown","ChannelUp","Close","MailForward","MailReply","MailSend","MediaClose","MediaFastForward","MediaPause","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaTrackNext","MediaTrackPrevious","New","Open","Print","Save","SpellCheck"],multimediaNumpad:["Key11","Key12"],audio:["AudioBalanceLeft","AudioBalanceRight","AudioBassBoostDown","AudioBassBoostToggle","AudioBassBoostUp","AudioFaderFront","AudioFaderRear","AudioSurroundModeNext","AudioTrebleDown","AudioTrebleUp","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","MicrophoneToggle","MicrophoneVolumeDown","MicrophoneVolumeUp","MicrophoneVolumeMute"],speech:["SpeechCorrectionList","SpeechInputToggle"],application:["LaunchApplication1","LaunchApplication2","LaunchCalendar","LaunchContacts","LaunchMail","LaunchMediaPlayer","LaunchMusicPlayer","LaunchPhone","LaunchScreenSaver","LaunchSpreadsheet","LaunchWebBrowser","LaunchWebCam","LaunchWordProcessor"],browser:["BrowserBack","BrowserFavorites","BrowserForward","BrowserHome","BrowserRefresh","BrowserSearch","BrowserStop"],mobilePhone:["AppSwitch","Call","Camera","CameraFocus","EndCall","GoBack","GoHome","HeadsetHook","LastNumberRedial","Notification","MannerMode","VoiceDial"],tv:["TV","TV3DMode","TVAntennaCable","TVAudioDescription","TVAudioDescriptionMixDown","TVAudioDescriptionMixUp","TVContentsMenu","TVDataService","TVInput","TVInputComponent1","TVInputComponent2","TVInputComposite1","TVInputComposite2","TVInputHDMI1","TVInputHDMI2","TVInputHDMI3","TVInputHDMI4","TVInputVGA1","TVMediaContext","TVNetwork","TVNumberEntry","TVPower","TVRadioService","TVSatellite","TVSatelliteBS","TVSatelliteCS","TVSatelliteToggle","TVTerrestrialAnalog","TVTerrestrialDigital","TVTimer"],mediaControls:["AVRInput","AVRPower","ColorF0Red","ColorF1Green","ColorF2Yellow","ColorF3Blue","ColorF4Grey","ColorF5Brown","ClosedCaptionToggle","Dimmer","DisplaySwap","DVR","Exit","FavoriteClear0","FavoriteClear1","FavoriteClear2","FavoriteClear3","FavoriteRecall0","FavoriteRecall1","FavoriteRecall2","FavoriteRecall3","FavoriteStore0","FavoriteStore1","FavoriteStore2","FavoriteStore3","Guide","GuideNextDay","GuidePreviousDay","Info","InstantReplay","Link","ListProgram","LiveContent","Lock","MediaApps","MediaAudioTrack","MediaLast","MediaSkipBackward","MediaSkipForward","MediaStepBackward","MediaStepForward","MediaTopMenu","NavigateIn","NavigateNext","NavigateOut","NavigatePrevious","NextFavoriteChannel","NextUserProfile","OnDemand","Pairing","PinPDown","PinPMove","PinPToggle","PinPUp","PlaySpeedDown","PlaySpeedReset","PlaySpeedUp","RandomToggle","RcLowBattery","RecordSpeedNext","RfBypass","ScanChannelsToggle","ScreenModeNext","Settings","SplitScreenToggle","STBInput","STBPower","Subtitle","Teletext","VideoModeNext","Wink","ZoomToggle"]}}]).default},441:function(e,t,i){var o;!function(n,r,s){if(n){for(var a,l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},c={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},d={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},h={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},u=1;u<20;++u)l[111+u]="f"+u;for(u=0;u<=9;++u)l[u+96]=u.toString();y.prototype.bind=function(e,t,i){var o=this;return e=e instanceof Array?e:[e],o._bindMultiple.call(o,e,t,i),o},y.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},y.prototype.trigger=function(e,t){var i=this;return i._directMap[e+":"+t]&&i._directMap[e+":"+t]({},e),i},y.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},y.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(m(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var i=e.composedPath()[0];i!==e.target&&(t=i)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},y.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},y.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(l[t]=e[t]);a=null},y.init=function(){var e=y(r);for(var t in e)"_"!==t.charAt(0)&&(y[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},y.init(),n.Mousetrap=y,1&&e.exports&&(e.exports=y),1&&(void 0===(o=function(){return y}.call(t,i,t,e))||(e.exports=o))}function p(e,t,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent("on"+t,i)}function g(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return l[e.which]?l[e.which]:c[e.which]?c[e.which]:String.fromCharCode(e.which).toLowerCase()}function f(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function v(e,t,i){return i||(i=function(){if(!a)for(var e in a={},l)e>95&&e<112||l.hasOwnProperty(e)&&(a[l[e]]=e);return a}()[e]?"keydown":"keypress"),"keypress"==i&&t.length&&(i="keydown"),i}function b(e,t){var i,o,n,r=[];for(i=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),n=0;n1?u(e,a,i,o):(s=b(e,o),t._callbacks[s.key]=t._callbacks[s.key]||[],c(s.key,s.modifiers,{type:s.action},n,e,r),t._callbacks[s.key][n?"unshift":"push"]({callback:i,modifiers:s.modifiers,action:s.action,seq:n,level:r,combo:e}))}t._handleKey=function(e,t,i){var o,n=c(e,t,i),r={},h=0,u=!1;for(o=0;o-1&&this._subscriptions.splice(t,1)}},e.prototype.asEvent=function(){return this._wrap},e.prototype.clear=function(){this._subscriptions.splice(0,this._subscriptions.length)},e}();t.DispatcherBase=s;var a=function(){function e(){this._events={}}return e.prototype.get=function(e){var t=this._events[e];return t||(t=this.createDispatcher(),this._events[e]=t,t)},e.prototype.remove=function(e){delete this._events[e]},e}();t.EventListBase=a;var l=function(){function e(e){this._subscribe=function(t){return e.subscribe(t)},this._unsubscribe=function(t){return e.unsubscribe(t)},this._one=function(t){return e.one(t)},this._has=function(t){return e.has(t)},this._clear=function(){return e.clear()},this._count=function(){return e.count}}return Object.defineProperty(e.prototype,"count",{get:function(){return this._count()},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){return this._subscribe(e)},e.prototype.sub=function(e){return this.subscribe(e)},e.prototype.unsubscribe=function(e){this._unsubscribe(e)},e.prototype.unsub=function(e){this.unsubscribe(e)},e.prototype.one=function(e){return this._one(e)},e.prototype.has=function(e){return this._has(e)},e.prototype.clear=function(){this._clear()},e}();t.DispatcherWrapper=l},210:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=t.EventListBase=t.DispatcherWrapper=t.DispatcherBase=void 0;var o=i(349);Object.defineProperty(t,"DispatcherBase",{enumerable:!0,get:function(){return o.DispatcherBase}}),Object.defineProperty(t,"DispatcherWrapper",{enumerable:!0,get:function(){return o.DispatcherWrapper}}),Object.defineProperty(t,"EventListBase",{enumerable:!0,get:function(){return o.EventListBase}});var n=i(422);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return n.Subscription}})},144:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventManagement=void 0;var i=function(){function e(e){this.unsub=e,this.propagationStopped=!1}return e.prototype.stopPropagation=function(){this.propagationStopped=!0},e}();t.EventManagement=i},422:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=void 0;var i=function(){function e(e,t){this.handler=e,this.isOnce=t,this.isExecuted=!1}return e.prototype.execute=function(e,t,i){if(!this.isOnce||!this.isExecuted){this.isExecuted=!0;var o=this.handler;e?setTimeout((function(){o.apply(t,i)}),1):o.apply(t,i)}},e}();t.Subscription=i},685:function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},o(e,t)},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandlingBase=t.EventList=t.NonUniformEventList=t.EventDispatcher=void 0;var r=i(210),s=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.dispatch=function(e,t){this._dispatch(!1,this,arguments)},t.prototype.dispatchAsync=function(e,t){this._dispatch(!0,this,arguments)},t.prototype.asEvent=function(){return e.prototype.asEvent.call(this)},t}(r.DispatcherBase);t.EventDispatcher=s;var a=function(){function e(){this._events={}}return e.prototype.get=function(e){if(this._events[e])return this._events[e];var t=this.createDispatcher();return this._events[e]=t,t},e.prototype.remove=function(e){delete this._events[e]},e.prototype.createDispatcher=function(){return new s},e}();t.NonUniformEventList=a;var l=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.createDispatcher=function(){return new s},t}(r.EventListBase);t.EventList=l;var c=function(){function e(){this._events=new l}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e,t){this._events.get(e).subscribe(t)},e.prototype.sub=function(e,t){this.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._events.get(e).unsubscribe(t)},e.prototype.unsub=function(e,t){this.unsubscribe(e,t)},e.prototype.one=function(e,t){this._events.get(e).one(t)},e.prototype.has=function(e,t){return this._events.get(e).has(t)},e}();t.EventHandlingBase=c},132:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformEventList=t.EventList=t.EventHandlingBase=t.EventDispatcher=void 0;var o=i(685);Object.defineProperty(t,"EventDispatcher",{enumerable:!0,get:function(){return o.EventDispatcher}}),Object.defineProperty(t,"EventHandlingBase",{enumerable:!0,get:function(){return o.EventHandlingBase}}),Object.defineProperty(t,"EventList",{enumerable:!0,get:function(){return o.EventList}}),Object.defineProperty(t,"NonUniformEventList",{enumerable:!0,get:function(){return o.NonUniformEventList}})},106:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignalList=t.SignalHandlingBase=t.SignalDispatcher=void 0;var o=i(141);Object.defineProperty(t,"SignalDispatcher",{enumerable:!0,get:function(){return o.SignalDispatcher}}),Object.defineProperty(t,"SignalHandlingBase",{enumerable:!0,get:function(){return o.SignalHandlingBase}}),Object.defineProperty(t,"SignalList",{enumerable:!0,get:function(){return o.SignalList}})},141:function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},o(e,t)},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.SignalHandlingBase=t.SignalList=t.SignalDispatcher=void 0;var r=i(210),s=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.dispatch=function(){this._dispatch(!1,this,arguments)},t.prototype.dispatchAsync=function(){this._dispatch(!0,this,arguments)},t.prototype.asEvent=function(){return e.prototype.asEvent.call(this)},t}(r.DispatcherBase);t.SignalDispatcher=s;var a=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.createDispatcher=function(){return new s},t}(r.EventListBase);t.SignalList=a;var l=function(){function e(){this._events=new a}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e.prototype.one=function(e,t){this._events.get(e).one(t)},e.prototype.has=function(e,t){return this._events.get(e).has(t)},e.prototype.subscribe=function(e,t){this._events.get(e).subscribe(t)},e.prototype.sub=function(e,t){this.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._events.get(e).unsubscribe(t)},e.prototype.unsub=function(e,t){this.unsubscribe(e,t)},e}();t.SignalHandlingBase=l},602:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformSimpleEventList=t.SimpleEventList=t.SimpleEventHandlingBase=t.SimpleEventDispatcher=void 0;var o=i(699);Object.defineProperty(t,"SimpleEventDispatcher",{enumerable:!0,get:function(){return o.SimpleEventDispatcher}}),Object.defineProperty(t,"SimpleEventHandlingBase",{enumerable:!0,get:function(){return o.SimpleEventHandlingBase}}),Object.defineProperty(t,"SimpleEventList",{enumerable:!0,get:function(){return o.SimpleEventList}}),Object.defineProperty(t,"NonUniformSimpleEventList",{enumerable:!0,get:function(){return o.NonUniformSimpleEventList}})},699:function(e,t,i){"use strict";var o,n=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},o(e,t)},function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleEventHandlingBase=t.SimpleEventList=t.NonUniformSimpleEventList=t.SimpleEventDispatcher=void 0;var r=i(210),s=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.dispatch=function(e){this._dispatch(!1,this,arguments)},t.prototype.dispatchAsync=function(e){this._dispatch(!0,this,arguments)},t.prototype.asEvent=function(){return e.prototype.asEvent.call(this)},t}(r.DispatcherBase);t.SimpleEventDispatcher=s;var a=function(){function e(){this._events={}}return e.prototype.get=function(e){if(this._events[e])return this._events[e];var t=this.createDispatcher();return this._events[e]=t,t},e.prototype.remove=function(e){delete this._events[e]},e.prototype.createDispatcher=function(){return new s},e}();t.NonUniformSimpleEventList=a;var l=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.createDispatcher=function(){return new s},t}(r.EventListBase);t.SimpleEventList=l;var c=function(){function e(){this._events=new l}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e,t){this._events.get(e).subscribe(t)},e.prototype.sub=function(e,t){this.subscribe(e,t)},e.prototype.one=function(e,t){this._events.get(e).one(t)},e.prototype.has=function(e,t){return this._events.get(e).has(t)},e.prototype.unsubscribe=function(e,t){this._events.get(e).unsubscribe(t)},e.prototype.unsub=function(e,t){this.unsubscribe(e,t)},e}();t.SimpleEventHandlingBase=c},993:function(e,t,i){"use strict";var o=i(210);o.DispatcherBase,o.DispatcherWrapper,o.EventListBase,o.Subscription;var n=i(132);t.pB=n.EventDispatcher,n.EventHandlingBase,n.EventList,n.NonUniformEventList;var r=i(602);t.FK=r.SimpleEventDispatcher,r.SimpleEventHandlingBase,r.SimpleEventList,r.NonUniformSimpleEventList;var s=i(106);s.SignalDispatcher,s.SignalHandlingBase,s.SignalList},102:function(){var e=function(){function e(e,t){for(var i=0;io?r.right:o,i=r.bottom>i?r.bottom:i);return function(e,t,n,o){return e!==1/0&&t!==1/0&&n!==-1/0&&o!==-1/0}(t,n,o,i)?DOMRect.fromRect({x:t,y:n,width:o-t,height:i-n}):null}i.isUnsupportedPropertyName="IsUnsupportedProperty",i.mapsToDomPropertyName="MapsToDomProperty",i.codeBlockTypePropertyName="CodeBlockTypeProperty";class s{constructor(){this.isMouseCloserToBoundingClientRectLeftThanRight=(e,t)=>e<(2*t.left+t.width)/2}getBoundingClientRect(e){if(void 0!==e.getBoundingClientRect)return e.getBoundingClientRect();const t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect()}hasNonZeroArea(e){const t=this.getBoundingClientRect(e);return t&&t.width>0&&t.height>0}getBoundingRectForLogicalNode(e){const t=e.getDomNode();if(t)return this.getBoundingClientRect(t);return function(...e){const t=e.map((e=>{if(!e)return null;if(e.nodeType==Node.TEXT_NODE){const t=e;if(t.parentNode){const e=document.createRange();return e.selectNode(t),r(e.getClientRects())}return null}return e.nodeType==Node.ELEMENT_NODE?e.getBoundingClientRect():void 0}));return r(t)}(...this.getClosestAncestorDomNodes(e))}areCoordinatesInsideLogicalNode(e,t,n){const o=this.getBoundingRectForLogicalNode(n);return this.areCoordinatesInsideBoundingClientRect(e,t,o)}areCoordinatesInsideBoundingClientRect(e,t,n){const o=e>=n.left&&e<=n.right,i=t>=n.top&&t<=n.bottom;return o&&i}getClosestAncestorDomNodes(e){const t=[];if(!e)return t;const n=e.getDomNode();return n?(t.push(n),t):e.children?e.children.map((e=>this.getClosestAncestorDomNodes(e))).flat():t}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.init(t,n)}return p(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||b,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),o=1;o-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var r="string"!=typeof t?[].concat(t):t.split(".");r.length>1;){if(i())return{};var s=o(r.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:o(r.shift())}}function L(e,t,n){var o=N(e,t,Object);o.obj[o.k]=n}function C(e,t){var n=N(e,t),o=n.obj,i=n.k;if(o)return o[i]}function O(e,t,n){var o=C(e,n);return void 0!==o?o:C(t,n)}function T(e,t,n){for(var o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?"string"==typeof e[o]||e[o]instanceof String||"string"==typeof t[o]||t[o]instanceof String?n&&(e[o]=t[o]):T(e[o],t[o],n):e[o]=t[o]);return e}function _(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function I(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return A[e]})):e}var P="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,D=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u(this,t),n=f(this,g(t).call(this)),P&&k.call(h(n)),n.data=e||{},n.options=o,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return m(t,e),p(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,r=[e,t];return n&&"string"!=typeof n&&(r=r.concat(n)),n&&"string"==typeof n&&(r=r.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=e.split(".")),C(this.data,r)}},{key:"addResource",value:function(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=this.options.keySeparator;void 0===r&&(r=".");var s=[e,t];n&&(s=s.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=t,t=(s=e.split("."))[1]),this.addNamespaces(t),L(this.data,s,o),i.silent||this.emit("added",e,t,n,o)}},{key:"addResources",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});o.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(o=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=C(this.data,s)||{};o?T(a,n,i):a=l({},a,n),L(this.data,s,a),r.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?l({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(k),j={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,o,i){var r=this;return e.forEach((function(e){r.processors[e]&&(t=r.processors[e].process(t,n,o,i))})),t}},F={},M=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,t),n=f(this,g(t).call(this)),P&&k.call(h(n)),x(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,h(n)),n.options=o,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=w.create("translator"),n}return m(t,e),p(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:i};var s=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(s[0])>-1)&&(i=s.shift()),e=s.join(o)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,n,o){var i=this;if("object"!==a(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],n),c=s.key,u=s.namespaces,d=u[u.length-1],p=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var f=n.nsSeparator||this.options.nsSeparator;return d+f+c}return c}var g=this.resolve(e,n),v=g&&g.res,m=g&&g.usedKey||c,b=g&&g.exactUsedKey||c,y=Object.prototype.toString.apply(v),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(S&&v&&E&&w.indexOf(y)<0&&("string"!=typeof k||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(r){var x="[object Array]"===y,N=x?[]:{},L=x?b:m;for(var C in v)if(Object.prototype.hasOwnProperty.call(v,C)){var O="".concat(L).concat(r).concat(C);N[C]=this.translate(O,l({},n,{joinArrays:!1,ns:u})),N[C]===O&&(N[C]=v[C])}v=N}}else if(S&&"string"==typeof k&&"[object Array]"===y)(v=v.join(k))&&(v=this.extendTranslation(v,e,n,o));else{var T=!1,_=!1,A=void 0!==n.count&&"string"!=typeof n.count,I=t.hasDefaultValue(n),P=A?this.pluralResolver.getSuffix(p,n.count):"",D=n["defaultValue".concat(P)]||n.defaultValue;!this.isValidLookup(v)&&I&&(T=!0,v=D),this.isValidLookup(v)||(_=!0,v=c);var j=I&&D!==v&&this.options.updateMissing;if(_||T||j){if(this.logger.log(j?"updateKey":"missingKey",p,d,c,j?D:v),r){var F=this.resolve(c,l({},n,{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&B&&B[0])for(var R=0;R1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var c=s.extractFromKey(e,a),l=c.key;n=l;var u=c.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,p=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,h=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(r=e,!F["".concat(h[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(r)&&(F["".concat(h[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((function(n){if(!s.isValidLookup(t)){i=n;var r,c,u=l,h=[u];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(h,l,n,e,a);else d&&(r=s.pluralResolver.getSuffix(n,a.count)),d&&p&&h.push(u+r),p&&h.push(u+="".concat(s.options.contextSeparator).concat(a.context)),d&&h.push(u+=r);for(;c=h.pop();)s.isValidLookup(t)||(o=c,t=s.getResource(n,e,c,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:r}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(k);function B(e){return e.charAt(0).toUpperCase()+e.slice(1)}var R=function(){function e(t){u(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=w.create("languageUtils")}return p(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=B(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=B(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=B(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var o=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(o)||(t=o)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var o=n.getLanguagePartFromCode(e);if(n.isSupportedCode(o))return t=o;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(o))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e["default"]||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e["default"]),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,o=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),o.forEach((function(e){i.indexOf(e)<0&&r(n.formatLanguageCode(e))})),i}}]),e}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],W={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function H(){var e={};return U.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:W[t.fc]}}))})),e}var V=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.languageUtils=t,this.options=n,this.logger=w.create("pluralResolver"),this.rules=H()}return p(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,o=this.getRule(e);if(o){var i=o.noAbs?o.plurals(t):o.plurals(Math.abs(t)),r=o.numbers[i];this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var s=function(){return n.options.prepend&&r.toString()?n.options.prepend+r.toString():r.toString()};return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_".concat(r.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=w.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return p(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:I,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?_(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?_(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?_(t.nestingPrefix):t.nestingPrefixEscaped||_("$t("),this.nestingSuffix=t.nestingSuffix?_(t.nestingSuffix):t.nestingSuffixEscaped||_(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,o){var i,r,s,a=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=O(t,c,e);return a.alwaysFormat?a.format(i,void 0,n):i}var r=e.split(a.formatSeparator),s=r.shift().trim(),l=r.join(a.formatSeparator).trim();return a.format(O(t,c,s),l,n,o)};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?l(a.escape(e)):l(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){if(void 0===(r=u(i[1].trim())))if("function"==typeof d){var n=d(e,i,o);r="string"==typeof n?n:""}else{if(p){r=i[0];continue}a.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),r=""}else"string"==typeof r||a.useRawValueToEscape||(r=E(r));if(e=e.replace(i[0],t.safeValue(r)),t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,o,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=l({},r);function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var o=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(o[1]);e=o[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),t&&(s=l({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],u=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=d.shift(),c=d,u=!0}if((o=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof o)return o;"string"!=typeof o&&(o=E(o)),o||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),o=""),u&&(o=c.reduce((function(e,t){return i.format(e,t,r.lng,r)}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}]),e}();var K=function(e){function t(e,n,o){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u(this,t),i=f(this,g(t).call(this)),P&&k.call(h(i)),i.backend=e,i.store=n,i.services=o,i.languageUtils=o.languageUtils,i.options=r,i.logger=w.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,r.backend,r),i}return m(t,e),p(t,[{key:"queueLoad",value:function(e,t,n,o){var i=this,r=[],s=[],a=[],c=[];return e.forEach((function(e){var o=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?s.indexOf(a)<0&&s.push(a):(i.state[a]=1,o=!1,s.indexOf(a)<0&&s.push(a),r.indexOf(a)<0&&r.push(a),c.indexOf(t)<0&&c.push(t)))})),o||a.push(e)})),(r.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:o}),{toLoad:r,pending:s,toLoadLanguages:a,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var o=e.split("|"),i=o[0],r=o[1];t&&this.emit("failedLoading",i,r,t),n&&this.store.addResourceBundle(i,r,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){!function(e,t,n,o){var i=N(e,t,Object),r=i.obj,s=i.k;r[s]=r[s]||[],o&&(r[s]=r[s].concat(n)),o||r[s].push(n)}(n.loaded,[i],r),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(a,c){a&&c&&i<5?setTimeout((function(){o.read.call(o,e,t,n,i+1,2*r,s)}),r):s(a,c)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var r=this.queueLoad(e,t,o,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=e.split("|"),i=o[0],r=o[1];this.read(i,r,"read",void 0,void 0,(function(o,s){o&&t.logger.warn("".concat(n,"loading namespace ").concat(r," for language ").concat(i," failed"),o),!o&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(r," for language ").concat(i),s),t.loaded(e,o,s)}))}},{key:"saveMissing",value:function(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,o,null,l({},r,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,o))}}]),t}(k);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===a(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===a(e[2])||"object"===a(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,o){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function G(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var J=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(u(this,t),e=f(this,g(t).call(this)),P&&k.call(h(e)),e.options=G(n),e.services={},e.logger=w,e.modules={external:[]},o&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,o),f(e,h(e));setTimeout((function(){e.init(n,o)}),0)}return e}return m(t,e),p(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=l({},q(),this.options,G(t)),this.format=this.options.interpolation.format,n||(n=$),!this.options.isClone){this.modules.logger?w.init(o(this.modules.logger),this.options):w.init(null,this.options);var i=new R(this.options);this.store=new D(this.options.resources,this.options);var r=this.services;r.logger=w,r.resourceStore=this.store,r.languageUtils=i,r.pluralResolver=new V(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r.interpolator=new z(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new K(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var a=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=S(),d=function(){var t=function(t,o){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(o),n(t,o)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,o=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return o();var r=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(r,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(e,t,n){var o=S();return e||(e=this.languages),t||(t=this.options.ns),n||(n=$),this.services.backendConnector.reload(e,t,(function(e){o.resolve(),n(e)})),o}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&j.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var o=S();this.emit("languageChanging",e);var i=function(e){var i="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);i&&(n.language||(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i)),n.translator.language||n.translator.changeLanguage(i),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(i)),n.loadResources(i,(function(e){!function(e,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,o.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,i)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var i;if("object"!==a(o)){for(var r=arguments.length,s=new Array(r>2?r-2:0),c=2;c1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;var s=function(e,n){var o=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===o||2===o};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(o,e)||(!this.services.backendConnector.backend||!(!s(o,e)||i&&!s(r,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,o=S();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){o.resolve(),t&&t(e)})),o):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=S();"string"==typeof e&&(e=[e]);var o=this.options.preload||[],i=e.filter((function(e){return o.indexOf(e)<0}));return i.length?(this.options.preload=o.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=l({},this.options,n,{isClone:!0}),r=new t(i),s=["store","services","language"];return s.forEach((function(t){r[t]=e[t]})),r.services=l({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r.translator=new M(r.services,r.options),r.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0){var r=o.maxAge-0;if(isNaN(r))throw new Error("maxAge should be a Number");i+="; Max-Age="+Math.floor(r)}if(o.domain){if(!te.test(o.domain))throw new TypeError("option domain is invalid");i+="; Domain="+o.domain}if(o.path){if(!te.test(o.path))throw new TypeError("option path is invalid");i+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(i+="; HttpOnly"),o.secure&&(i+="; Secure"),o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},oe=function(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),o&&(i.domain=o),document.cookie=ne(e,encodeURIComponent(t),i)},ie=function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=n.substring(1).split("&"),i=0;i0)o[i].substring(0,r)===e.lookupQuerystring&&(t=o[i].substring(r+1))}}return t}},ae=null,ce=function(){if(null!==ae)return ae;try{ae="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){ae=!1}return ae},le={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&ce()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&ce()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},ue=null,de=function(){if(null!==ue)return ue;try{ue="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){ue=!1}return ue},pe={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&de()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&de()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},he={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n0?t:void 0}},fe={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},ge={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},ve={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?n[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var me=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return p(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=ee(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(re),this.addDetector(se),this.addDetector(le),this.addDetector(pe),this.addDetector(he),this.addDetector(fe),this.addDetector(ge),this.addDetector(ve)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var o=t.detectors[e].lookup(t.options);o&&"string"==typeof o&&(o=[o]),o&&(n=n.concat(o))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();me.type="languageDetector";var be=JSON.parse('{"translation":{"buttons":{"cancel":"Cancel","confirm":"Confirm"},"blockedUrlToast":{"externalResourcesBlocked":"External Resources Blocked","totalBlockedUrlStatusFormat":"{{blockedResourceCount}} resource(s) were blocked from {{blockedDomainCount}} external domain(s):","blockedResourcesFromUrlFormat":"{{blockedResourceCount}} from {{- baseUrl}}","allowDomains":"To allow these domain(s) - ","_allowDomains.comment":"after the \'-\' is a \'click here\' link. The link always needs to be on the right of the string, so the string should be phrased such that it makes sense in all languages","manageAllowedDomains":"To manage these settings, go to Tools > Options > ","_manageAllowedDomains.comment":"To the right of this string will always be a link worded \'Web Live Preview - external domains\'. The string should be phrased such that it makes sense in all langs","clickHere":"click here","webLivePreviewExternalDomains":"Web Live Preview - external domains","domainsAddedToAllowList":"The following domain(s) were added to the allow list:","learnMore":"Learn more about why external resources were blocked"},"closeDialog":{"choice_pageSession":"On the next page load","choice_permanent":"Never","choice_visualStudioSession":"The next time I open Visual Studio","details":"When would you like to see Web Live Preview again?","header":"Confirm close?"},"menu":{"close":"Close","disableInspector":"Disable Inspector","enableInspector":"Enable Inspector","showEmptyElements":"Show Empty Elements","ariaLabel":"Web Live Preview"},"quickTextEditing":{"duplicateElementOperation":"Duplicate Element","createNewParagraphOperation":"Create New Paragraph","addTableRowOperation":"Add Table Row"},"status":{"connectingToVisualStudio":"Connecting to Visual Studio...","generatingLogicalTree":"Generating Logical Tree...","updating":"Updating...","upToDate":"Up To Date","disconnectedShortMessage":"Disconnected","disconnectedFullMessage":"The browser has been disconnected from Visual Studio. Please refresh the browser to reconnect.","connectionTimeOut":"Connection timed out."},"simpleTextEditing":{"editableText_ariaLabel":"Text Editing Mode. Press ESC to escape."},"nodes":{"code":"Code","root":"Root"},"tagNavigator":{"leftScroller_ariaLabel":"Left Scroller","rightScroller_ariaLabel":"Right Scroller"},"selectorDecorator":{"elementOutline_ariaLabel":"Selected Element","actionPanel_ariaLabel":"Action Panel Indicator"},"menuButton":{"image_ariaLabel":"Web Live Preview Menu"},"logicalNodeShortNames":{"genericContainer":"Generic Container","root":"Root","unknown":"Unknown"},"actionPanel":{"title":"{{nodeName}} Tasks","_title.comment":"nodeName is the ID or tag name of the node for which the action panel is being displayed.","readOnlyProperty":"This property is read-only"},"screenReader":{"inspectorEnabled":"Inspector enabled.","inspectorDisabled":"Inspector disabled."}}}');var ye=function(){this.__data__=[],this.size=0};var we=function(e,t){return e===t||e!=e&&t!=t};var ke=function(e,t){for(var n=e.length;n--;)if(we(e[n][0],t))return n;return-1},Se=Array.prototype.splice;var Ee=function(e){var t=this.__data__,n=ke(t,e);return!(n<0)&&(n==t.length-1?t.pop():Se.call(t,n,1),--this.size,!0)};var xe=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]};var Ne=function(e){return ke(this.__data__,e)>-1};var Le=function(e,t){var n=this.__data__,o=ke(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this};function Ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=pn},fn={};fn["[object Float32Array]"]=fn["[object Float64Array]"]=fn["[object Int8Array]"]=fn["[object Int16Array]"]=fn["[object Int32Array]"]=fn["[object Uint8Array]"]=fn["[object Uint8ClampedArray]"]=fn["[object Uint16Array]"]=fn["[object Uint32Array]"]=!0,fn["[object Arguments]"]=fn["[object Array]"]=fn["[object ArrayBuffer]"]=fn["[object Boolean]"]=fn["[object DataView]"]=fn["[object Date]"]=fn["[object Error]"]=fn["[object Function]"]=fn["[object Map]"]=fn["[object Number]"]=fn["[object Object]"]=fn["[object RegExp]"]=fn["[object Set]"]=fn["[object String]"]=fn["[object WeakMap]"]=!1;var gn=function(e){return $t(e)&&hn(e.length)&&!!fn[Ge(e)]};var vn=function(e){return function(t){return e(t)}},mn="object"==typeof exports&&exports&&!exports.nodeType&&exports,bn=mn&&"object"==typeof module&&module&&!module.nodeType&&module,yn=bn&&bn.exports===mn&&Pe.process,wn=function(){try{var e=bn&&bn.require&&bn.require("util").types;return e||yn&&yn.binding&&yn.binding("util")}catch(e){}}(),kn=wn&&wn.isTypedArray,Sn=kn?vn(kn):gn,En=Object.prototype.hasOwnProperty;var xn=function(e,t){var n=nn(e),o=!n&&tn(e),i=!n&&!o&&cn(e),r=!n&&!o&&!i&&Sn(e),s=n||o||i||r,a=s?Gt(e.length,String):[],c=a.length;for(var l in e)!t&&!En.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||dn(l,c))||a.push(l);return a},Nn=Object.prototype;var Ln=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Nn)};var Cn=function(e,t){return function(n){return e(t(n))}},On=Cn(Object.keys,Object),Tn=Object.prototype.hasOwnProperty;var _n=function(e){if(!Ln(e))return On(e);var t=[];for(var n in Object(e))Tn.call(e,n)&&"constructor"!=n&&t.push(n);return t};var An=function(e){return null!=e&&hn(e.length)&&!et(e)};var In=function(e){return An(e)?xn(e):_n(e)};var Pn=function(e,t){return e&&qt(t,In(t),e)};var Dn=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},jn=Object.prototype.hasOwnProperty;var Fn=function(e){if(!$e(e))return Dn(e);var t=Ln(e),n=[];for(var o in e)("constructor"!=o||!t&&jn.call(e,o))&&n.push(o);return n};var Mn=function(e){return An(e)?xn(e,!0):Fn(e)};var Bn=function(e,t){return e&&qt(t,Mn(t),e)},Rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Un=Rn&&"object"==typeof module&&module&&!module.nodeType&&module,Wn=Un&&Un.exports===Rn?je.Buffer:void 0,Hn=Wn?Wn.allocUnsafe:void 0;var Vn=function(e,t){if(t)return e.slice();var n=e.length,o=Hn?Hn(n):new e.constructor(n);return e.copy(o),o};var zn=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n{const o=n[0],i=n[1];"string"==typeof i||i instanceof String?t[o]=i.split("").reverse().join(""):e(i)}))}(ki);const Si={en:be,dev:ki};function Ei(e,t){return X.t(e,t)}X.use(me),X.init({resources:Si,fallbackLng:"en",detection:{excludeCacheFor:["cimode","dev"]}});var xi=n(441),Ni=n.n(xi),Li=n(993);class Ci{}Ci.toggleInteractiveMode="ctrl+alt+i",Ci.toggleExpandEmptyElementsSetting="ctrl+alt+x",Ci.refreshBrowser="ctrl+alt+enter",Ci.tagNavigationBarSelectionLeft="shift+alt+left",Ci.tagNavigationBarSelectionRight="shift+alt+right",Ci.arrowUp="up",Ci.arrowDown="down",Ci.arrowLeft="left",Ci.arrowRight="right",Ci.enterTextEditingMode="ctrl+alt+e",Ci.escape="escape",Ci.enter="enter";class Oi{}Oi.normalNavigation=[Ci.arrowUp,Ci.arrowDown,Ci.arrowLeft,Ci.arrowRight],Oi.menuNavigation=[Ci.arrowUp,Ci.arrowDown],Oi.tagNavBarNavigation=[Ci.arrowLeft,Ci.arrowRight],Oi.tagNavBarSelection=[Ci.tagNavigationBarSelectionLeft,Ci.tagNavigationBarSelectionRight];new s;function Ti(e,t){var n,o;const i=null===(n=e.statusService)||void 0===n?void 0:n.targetFilePath;for(;Ii(t);)t=t.parent;return!i||i==(null===(o=t.start)||void 0===o?void 0:o.path)}class _i{constructor(e){this.browserLink=e,this._expansionStyle=`\n .${_i.WhitespaceOnlyCssClassName}::before,\n :not(area, base, br, col, hr, img, input, link, meta, param, command, keygen, source, live-preview-root, .${_i.SkipEmptyExpansionClassName}):empty::before {\n content:" ";\n font-size: 12px;\n white-space: pre;\n }\n\n .${_i.WhitespaceOnlyCssClassName},\n :not(area, base, br, col, hr, img, input, link, meta, param, command, keygen, source, live-preview-root, .${_i.SkipEmptyExpansionClassName}):empty {\n outline: dashed 2px rgba(0, 0, 0, 0.8);\n box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.8);\n }\n `,this._mutationObserverConfig={attributes:!0,childList:!0,subtree:!0},this._mutationObserver=new MutationObserver(this.mutationCallback.bind(this)),this._isExpansionEnabledChanged=new Li.FK,this._isExpansionEnabled=!1,Ni().bind(Ci.toggleExpandEmptyElementsSetting,(()=>{this.isExpansionOnEmptyElementsEnabled=!this.isExpansionOnEmptyElementsEnabled}),"keydown")}get isExpansionOnEmptyElementsEnabledChanged(){return this._isExpansionEnabledChanged.asEvent()}get isExpansionOnEmptyElementsEnabled(){return this._isExpansionEnabled}set isExpansionOnEmptyElementsEnabled(e){const t=this._isExpansionEnabled;this._isExpansionEnabled=e,t!==e&&(e?(this._mutationObserver.observe(document,this._mutationObserverConfig),this.ensureAllWhitespaceOnlyElementsClassApplied(),this.addExpansionStyle()):(this.removeExpansionStyle(),this.ensureAllWhitespaceOnlyClassNameRemoved(),this._mutationObserver.disconnect()),this._isExpansionEnabledChanged.dispatch(this._isExpansionEnabled),this.browserLink.expandEmptyElementsHostService.setExpandEmptyElementsSettingInVS(this._isExpansionEnabled))}mutationCallback(e,t){this.ensureAllWhitespaceOnlyElementsClassApplied()}ensureAllWhitespaceOnlyClassNameRemoved(){this._shouldReensureWhitespaceOnlyClass=!1;document.documentElement.querySelectorAll(`.${_i.WhitespaceOnlyCssClassName}, .${_i.SkipEmptyExpansionClassName}`).forEach((e=>{const t=e;t.classList.remove(_i.WhitespaceOnlyCssClassName),t.classList.remove(_i.SkipEmptyExpansionClassName)}))}ensureAllWhitespaceOnlyElementsClassApplied(){const e=new MutationObserver(this.tempMutationObserverCallback.bind(this));this._mutationObserver.disconnect(),e.observe(document.documentElement,this._mutationObserverConfig);document.documentElement.querySelectorAll("*").forEach((e=>{const t=e;0!==e.childNodes.length||this.shouldExpandNode(e)?0!==e.childNodes.length&&(this.shouldExpandNode(t)&&this.isEmptyOrHasOnlyWhitespaceChildren(t)?t.classList.add(_i.WhitespaceOnlyCssClassName):t.classList.remove(_i.WhitespaceOnlyCssClassName)):t.classList.add(_i.SkipEmptyExpansionClassName)})),e.disconnect(),this._shouldReensureWhitespaceOnlyClass&&this.ensureAllWhitespaceOnlyElementsClassApplied(),this._mutationObserver.observe(document,this._mutationObserverConfig)}isEmptyOrHasOnlyWhitespaceChildren(e){if(0==e.childNodes.length)return!0;for(const t of e.childNodes){if(t.nodeType!==Node.TEXT_NODE)return!1;if(t.textContent&&t.textContent.trim())return!1}return!0}tempMutationObserverCallback(e,t){this._shouldReensureWhitespaceOnlyClass=!0}addExpansionStyle(){this._currentExpansionStyleElement=document.createElement("style"),this._currentExpansionStyleElement.innerHTML=this._expansionStyle,document.body.appendChild(this._currentExpansionStyleElement)}removeExpansionStyle(){document.body.removeChild(this._currentExpansionStyleElement)}shouldExpandNode(e){const t=this.browserLink.logicalTree.getFirstLogicalNodeFromDomNode(e);return t&&Ti(this.browserLink,t)&&!Ii(t)}}function Ai(e){const t=e.getDomNode();if(t)return[t];let n=[];for(let t=0;t0)));var t}_i.WhitespaceOnlyCssClassName="wlp-whitespace-only-element-expansion",_i.SkipEmptyExpansionClassName="wlp-skip-empty-expansion";class Di{constructor(e,t){this.requiredAncestorForSelectability="body",this.nodeBoundingClientRectUtil=e||new s,this._browserLink=t}findValidInsertionPoint(e,t,n){var o;if(!e)throw Error("parentNode must not be null or undefined.");const i=this.getParentsUntilDefault(e);if(!i.modifiedParentNode)throw Error("No default ancestor found.");null!==(o=n)&&void 0!==o||(n=[]);const r=this.findFirstDefaultPreviousSibling(t,i,n);return new ji(i.modifiedParentNode,r)}findLeftMostSelectableLeaf(e){return e?this.findLeftMostSelectableLeafInternal(e,!1):null}getParentsUntilDefault(e){if(!e)throw Error("firstParent must not be null or undefined.");const t=new Fi;for(t.push(e);t.modifiedParentNode&&!o(t.modifiedParentNode).mapsToDom;)t.push(t.modifiedParentNode.parent);return t}findFirstDefaultPreviousSibling(e,t,n){for(let o=e?0:1;o=0;r--){const n=e.children[r];if(o(n).mapsToDom&&!t.includes(n))return n;const i=this.findRightMostDefaultDescendant(n,t);if(i)return i}return null}findLeftMostSelectableLeafInternal(e,t){if(t=t||this.isBodyTag(e),e.children)for(const n of e.children){const e=this.findLeftMostSelectableLeafInternal(n,t);if(e)return e}return t&&this.isInitiallySelectable(e)?e:null}isBodyTag(e){var t;return(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())===this.requiredAncestorForSelectability}isInitiallySelectable(e){if(this._browserLink&&!Ti(this._browserLink,e))return!1;if(!Pi(e))return!1;const t=Ai(e);for(const e of t)if(this.nodeBoundingClientRectUtil.hasNonZeroArea(e))return!0;return!1}}class ji{constructor(e=null,t=null){this.modifiedParentNode=e,this.modifiedInsertAfterLogicalNode=t}}class Fi{constructor(){this.parentNodeList=[]}get modifiedParentNode(){return 0===this.parentNodeList.length?null:this.parentNodeList[this.parentNodeList.length-1]}push(e){this.parentNodeList.push(e)}}class Mi extends Error{constructor(e,t){super(e),this.name=this.constructor.name,this.change=t}}class Bi extends Mi{constructor(e){super("Validation failed for this change.",e)}}class Ri{static isNullOrUndefined(e){return null==e}static validateUpdatePositionChange(e){if(!(e&&e.nodeId&&e.startPosition>=0&&e.length>=0))throw new Bi(e)}static validateSetNodeIdChange(e){if(!(e&&e.newNodeId&&e.sourcePath&&e.startPosition>=0&&e.length>=1&&e.type))throw new Bi(e)}static validateInsertCodeBlockChange(e){if(!(e&&e.codeBlockType&&e.parentNodeId&&e.newNodeId&&e.sourcePath&&e.startPosition>=0&&e.length>0))throw new Bi(e)}static validateInsertGenericContainerChange(e){if(!(e&&e.parentNodeId&&e.newNodeId&&e.sourcePath&&e.startPosition>=0&&e.length>0))throw new Bi(e)}static validateInsertElementChange(e){if(!(e&&e.tagName&&e.parentNodeId&&e.newNodeId&&e.sourcePath&&e.startPosition>=0&&e.length>0))throw new Bi(e)}static validateInsertAttributeChange(e){if(!(e&&e.parentNodeId&&e.attributeName&&e.sourcePath&&e.startPosition>=0&&e.length>0))throw new Bi(e)}static validateInsertTextChange(e){if(!(e&&e.parentNodeId&&e.text&&e.sourcePath&&e.startPosition>=0&&e.length>0))throw new Bi(e)}static validateModifyElementChange(e){if(!e||!e.nodeId||this.isNullOrUndefined(e.tagName))throw new Bi(e)}static validateModifyAttributeChange(e){if(!e||!e.nodeId||this.isNullOrUndefined(e.oldAttributeValue)||this.isNullOrUndefined(e.newAttributeValue))throw new Bi(e)}static validateModifyTextChange(e){if(!e||!e.nodeId||this.isNullOrUndefined(e.oldText)||this.isNullOrUndefined(e.newText))throw new Bi(e)}static validateRemoveElementTreeChange(e){if(!e||!e.nodeId)throw new Bi(e)}static validateUnwrapElementsChange(e){if(!e||!e.nodeId)throw new Bi(e)}static validateRemoveAttributeChange(e){if(!e||!e.nodeId)throw new Bi(e)}static validateRemoveTextChange(e){if(!e||!e.nodeId)throw new Bi(e)}static validateMoveElementChange(e){if(!e||!e.nodeId||!e.parentNodeId)throw new Bi(e)}static validateMoveTextChange(e){if(!e||!e.nodeId||!e.parentNodeId)throw new Bi(e)}}class Ui{constructor(){this.successes=new Wi,this.failures=new Wi}addResult(e,t){switch(t){case"InsertElement":e.InsertElement++;break;case"ModifyElement":e.ModifyElement++;break;case"RemoveElementTree":e.RemoveElementTree++;break;case"UnwrapElements":e.UnwrapElements++;break;case"MoveElement":e.MoveElement++;break;case"InsertText":e.InsertText++;break;case"ModifyText":e.ModifyText++;break;case"RemoveText":e.RemoveText++;break;case"InsertAttribute":e.InsertAttribute++;break;case"ModifyAttribute":e.ModifyAttribute++;break;case"RemoveAttribute":e.RemoveAttribute++;break;case"MoveAttribute":e.MoveAttribute++;break;case"InsertCodeBlock":e.InsertCodeBlock++;break;case"InsertGenericContainer":e.InsertGenericContainer++;break;case"SetNodeId":e.SetNodeId++;break;case"UpdatePositions":e.UpdatePositions++}}addSuccess(e){this.addResult(this.successes,e)}addFailure(e){this.addResult(this.failures,e)}}class Wi{constructor(){this.InsertElement=0,this.ModifyElement=0,this.RemoveElementTree=0,this.UnwrapElements=0,this.MoveElement=0,this.InsertText=0,this.ModifyText=0,this.RemoveText=0,this.InsertAttribute=0,this.ModifyAttribute=0,this.RemoveAttribute=0,this.MoveAttribute=0,this.InsertCodeBlock=0,this.InsertGenericContainer=0,this.SetNodeId=0,this.UpdatePositions=0}}class Hi{constructor(){this.inserted=[],this.removed=[]}}class Vi{get changesApplied(){return this._changesApplied.asEvent()}get beforeChangesApplied(){return this._beforeChangesApplied.asEvent()}get hasChangeError(){return this.changeErrorCount>0}constructor(e,t){this.applyChangesFunctions={},this.idMapping={},this.logicalTreeTraverser=new Di,this.areHtmlFilesTracked=!1,this.changeErrorCount=0,this._changesApplied=new Li.FK,this._beforeChangesApplied=new Li.nz,this.logNoisyChanges=!1,this.documentWrapper=t,this.browserLink=e,this.textModificationElement=this.documentWrapper.createElement("textarea"),this.applyChangesFunctions["InsertElement"]=(e,t)=>this.insertElement(e,t),this.applyChangesFunctions["RemoveElementTree"]=(e,t)=>this.removeElementTree(e,t),this.applyChangesFunctions["MoveElement"]=(e,t)=>this.moveElement(t),this.applyChangesFunctions["InsertAttribute"]=(e,t)=>this.insertAttribute(e,t),this.applyChangesFunctions["RemoveAttribute"]=(e,t)=>this.removeAttribute(e,t),this.applyChangesFunctions["ModifyAttribute"]=(e,t)=>this.modifyAttribute(t),this.applyChangesFunctions["MoveAttribute"]=(e,t)=>this.moveAttribute(t),this.applyChangesFunctions["ModifyElement"]=(e,t)=>this.modifyElement(t),this.applyChangesFunctions["ModifyText"]=(e,t)=>this.modifyText(t),this.applyChangesFunctions["InsertText"]=(e,t)=>this.insertText(e,t),this.applyChangesFunctions["RemoveText"]=(e,t)=>this.removeText(e,t),this.applyChangesFunctions["MoveText"]=(e,t)=>this.moveText(t),this.applyChangesFunctions["SplitElement"]=(e,t)=>this.noOp(),this.applyChangesFunctions["MergeElements"]=(e,t)=>this.noOp(),this.applyChangesFunctions["WrapElements"]=(e,t)=>this.noOp(),this.applyChangesFunctions["UnwrapElements"]=(e,t)=>this.unwrapElements(e,t),this.applyChangesFunctions["SetNodeId"]=(e,t)=>this.setNodeId(t),this.applyChangesFunctions["UpdatePositions"]=(e,t)=>this.updatePositions(t),this.applyChangesFunctions["InsertCodeBlock"]=(e,t)=>this.insertCodeBlock(e,t),this.applyChangesFunctions["InsertGenericContainer"]=(e,t)=>this.insertGenericContainer(e,t),this.applyChangesFunctions["AutoSyncChangeProcessStartTime"]=(e,t)=>this.noOp(),this.applyChangesFunctions["UpdateSourcePath"]=(e,t)=>this.updateSourcePath(t),this.applyChangesFunctions["Unsupported"]=(e,t)=>this.noOp()}initialize(){this.browserLink.designSurfaceService.isEnabled?this.ensureHtmlFilesAreTracked():this.browserLink.designSurfaceService.isEnabledChanged.one(this.onIsDesignSurfaceEnabledChanged.bind(this))}onIsDesignSurfaceEnabledChanged(){this.ensureHtmlFilesAreTracked()}ensureHtmlFilesAreTracked(){this.areHtmlFilesTracked||(this.areHtmlFilesTracked=!0,this.browserLink.sourceMapping.ensureUpToDateAsync((()=>{this.browserLink.invoke("TrackDocumentsForHtmlAutoSync",this.browserLink.sourceMapping.getAllSourcePaths())})))}shouldLogChange(e){return this.logNoisyChanges||"SetNodeId"!==e&&"UpdatePositions"!==e}logChange(e){this.shouldLogChange(e.type)&&this.browserLink.log("Applying change: %o",e)}getLogicalNodesFromNodeId(e){return this.idMapping[e]||[]}mapIdToLogicalNode(e,t){this.idMapping[e]||(this.idMapping[e]=[]);-1===this.idMapping[e].indexOf(t)&&(this.idMapping[e].push(t),t.nodeId=e)}clearIdMappingForId(e){this.idMapping[e]=[]}removeNodeAndDescendantsFromIdMapping(e){if(this.removeNodeFromIdMapping(e),e.children)for(const t of e.children)this.removeNodeAndDescendantsFromIdMapping(t);if(e.attributes)for(const t of e.attributes)this.removeNodeFromIdMapping(t)}removeNodeFromIdMapping(e){const t=this.idMapping[e.nodeId];if(t){const n=t.indexOf(e);n>=0&&t.splice(n,1)}}createLogicalNode(e,t,n,o,i,r){const s=this.browserLink.logicalTree.createNewLogicalNode(t,n,i,r);return this.mapIdToLogicalNode(e,s),s.start.path=o,s}forEachLogicalNodeWithId(e,t,n){const o=this.getLogicalNodesFromNodeId(e).slice();if(0===o.length)throw new Mi("No logical node found.",t);for(const e of o)n(t,e)}sortLogicalNodesBasedOnDomTextOrder(e,t){return e.sort(((e,n)=>t.indexOf(this.fixTextForDomComparison(e.text))-t.indexOf(this.fixTextForDomComparison(n.text))))}breakUpDomTextNode(e,t){const n=t,o=n.textContent,i=this.browserLink.logicalTree.getLogicalNodesFromDomNode(n);if(i.length>1){const t=this.sortLogicalNodesBasedOnDomTextOrder(i,o);if(e!==t[t.length-1]){const o=t.indexOf(e);let i=0;for(let e=0;e<=o;e++)i+=this.fixTextForDomComparison(t[e].text).length;const r=n.splitText(i);for(let e=0;e=0&&(e.splice(n,1),!0)}findPreviousSibling(e){if(!e||!e.parent||!e.parent.children)return null;const t=e.parent.children.indexOf(e);return 0===t?null:e.parent.children[t-1]}fixTextForDomComparison(e){return this.textModificationElement.innerHTML=e,this.textModificationElement.textContent}handleApplyChangeError(e){this.browserLink.log("Failed to apply change %o with error %o",e.change,e),this.changeErrorCount++}handleUnknownChange(e){this.browserLink.log("Unknown change type in %o",e),this.changeErrorCount++}applyHtmlChanges(e){try{return this.browserLink.log("Got changes: %o",e),this._beforeChangesApplied.dispatch(),this.applyChanges(e),!0}catch(e){return this.browserLink.log("Failed to apply HTML changes: %o",e),!1}}applyChanges(e){if(!e)return void this.browserLink.log("No changes to apply.");const t=new Hi,n=new Ui;let o;for(let i=0;ithis.insertCodeBlockInternal(e,t,n.parent,n))):this.forEachLogicalNodeWithId(t.parentNodeId,t,((t,n)=>this.insertCodeBlockInternal(e,t,n,null)))}insertCodeBlockInternal(e,t,n,i){const r=this.createLogicalNode(t.newNodeId,qi.CodeBlock,null,t.sourcePath,n,i);r.start.position=t.startPosition,r.length=t.length;const s=o(r);s.mapsToDom=!1,s.codeBlockType=t.codeBlockType,e.inserted.push(r)}insertGenericContainer(e,t){Ri.validateInsertGenericContainerChange(t),t.insertAfterNodeId?this.forEachLogicalNodeWithId(t.insertAfterNodeId,t,((t,n)=>this.insertGenericContainerInternal(e,t,n.parent,n))):this.forEachLogicalNodeWithId(t.parentNodeId,t,((t,n)=>this.insertGenericContainerInternal(e,t,n,null)))}insertGenericContainerInternal(e,t,n,i){const r=this.createLogicalNode(t.newNodeId,qi.GenericContainer,null,t.sourcePath,n,i);r.description=t.description,r.start.position=t.startPosition,r.length=t.length,o(r).mapsToDom=!1,e.inserted.push(r)}insertElement(e,t){Ri.validateInsertElementChange(t),t.insertAfterNodeId?this.forEachLogicalNodeWithId(t.insertAfterNodeId,t,((t,n)=>this.insertElementInternal(e,t,t.tagName,n.parent,n))):this.forEachLogicalNodeWithId(t.parentNodeId,t,((t,n)=>this.insertElementInternal(e,t,t.tagName,n,null)))}insertElementInternal(e,t,n,i,r){let s=null;if(t.mapsToDom){const e=this.logicalTreeTraverser.findValidInsertionPoint(i,r);if(!e||!e.modifiedParentNode)throw new Mi("Failed to find logical tree insertion point.",t);const o=e.modifiedParentNode.getDomNode(),a=e.modifiedInsertAfterLogicalNode?e.modifiedInsertAfterLogicalNode.getDomNode():null;if(!o||e.modifiedInsertAfterLogicalNode&&!a)throw new Mi("Failed to find DOM insertion point.",t);a&&a.nodeType===Node.TEXT_NODE&&this.breakUpDomTextNode(e.modifiedInsertAfterLogicalNode,a),s=document.createElement(n),e.modifiedInsertAfterLogicalNode?zi(s,a):Ki(s,o)}const a=this.createLogicalNode(t.newNodeId,qi.Element,s,t.sourcePath,i,r);a.tagName=t.tagName,a.start.position=t.startPosition,a.length=t.length,o(a).mapsToDom=t.mapsToDom,e.inserted.push(a)}insertAttribute(e,t){Ri.validateInsertAttributeChange(t);const n=this.getLogicalNodesFromNodeId(t.parentNodeId);if(0===n.length)throw new Mi("Failed to find parent for new attribute.",t);for(const o of n)this.insertAttributeInParent(e,t,o)}insertAttributeInParent(e,t,n){if(!n)throw new Mi("Invalid parent for attribute.",t);let i=null;const r=o(n).mapsToDom;if(t.mapsToDom!==r)throw new Mi("If the new attribute maps to the DOM, the parent must as well.",t);if(r){const e=n?n.getDomNode():null;if(!e)throw new Mi("Failed to find parent DOM element.",t);e.setAttribute(t.attributeName,t.attributeValue);i=e.getAttributeNode(t.attributeName)}const s=this.createLogicalNode(t.newNodeId,qi.Attribute,i,t.sourcePath,n,null);s.name=t.attributeName,s.value=t.attributeValue,s.start.position=t.startPosition,s.length=t.length,o(s).mapsToDom=t.mapsToDom,e.inserted.push(s)}insertText(e,t){Ri.validateInsertTextChange(t),t.insertAfterNodeId?this.forEachLogicalNodeWithId(t.insertAfterNodeId,t,((t,n)=>this.insertTextInternal(e,t,n.parent,n))):this.forEachLogicalNodeWithId(t.parentNodeId,t,((t,n)=>this.insertTextInternal(e,t,n,null)))}insertTextInternal(e,t,n,i){let r=null;if(t.mapsToDom){const e=this.logicalTreeTraverser.findValidInsertionPoint(n,i);if(!e||!e.modifiedParentNode)throw new Mi("Failed to find logical tree insertion point.",t);const o=e.modifiedParentNode.getDomNode(),s=e.modifiedInsertAfterLogicalNode?e.modifiedInsertAfterLogicalNode.getDomNode():null;if(!o||e.modifiedInsertAfterLogicalNode&&!s)throw new Mi("Failed to find DOM insertion point.",t);s&&s.nodeType===Node.TEXT_NODE&&this.breakUpDomTextNode(e.modifiedInsertAfterLogicalNode,s),r=document.createTextNode(t.text),e.modifiedInsertAfterLogicalNode?zi(r,s):Ki(r,o)}const s=this.createLogicalNode(t.newNodeId,qi.Text,r,t.sourcePath,n,i);s.start.position=t.startPosition,s.length=t.length,s.text=t.text,o(s).mapsToDom=t.mapsToDom,e.inserted.push(s)}modifyElement(e){Ri.validateModifyElementChange(e),this.forEachLogicalNodeWithId(e.nodeId,e,((e,t)=>this.modifyElementByNode(e,t)))}modifyElementByNode(e,t){if(t.tagName=e.tagName,o(t).mapsToDom){const n=t.getDomNode(),o=n.parentElement;if(!n||!o)throw new Mi("Failed to find DOM element to modify or its parent.",e);const i=this.documentWrapper.createElement(e.tagName);for(;n.firstChild;){const e=n.firstChild;n.removeChild(e),i.appendChild(e)}for(let e=0;ethis.modifyAttributeByNode(e,t)))}modifyAttributeByNode(e,t){if(t.value=e.newAttributeValue,o(t).mapsToDom){const n=t.getDomNode();if(!n)throw new Mi("Failed to find DOM attribute to modify",e);if(n.value!==e.oldAttributeValue)throw new Mi("Existing attribute value does not match previous value.",e);n.value=e.newAttributeValue}}modifyText(e){Ri.validateModifyTextChange(e),this.forEachLogicalNodeWithId(e.nodeId,e,((e,t)=>this.modifyTextByNode(e,t)))}modifyTextByNode(e,t){if(t.text=e.newText,o(t).mapsToDom){const n=t.getDomNode();if(!n)throw new Mi("Failed to find DOM text to modify",e);const o=this.browserLink.logicalTree.getLogicalNodesFromDomNode(n);if(!o||0==o.length||-1==o.indexOf(t))throw new Mi("Failed to find related logical nodes for DOM node being modified.",e);let i="",r="";for(const n of o)n===t?(i+=e.oldText,r+=e.newText):n.text&&(i+=n.text,r+=n.text);if(i=this.fixTextForDomComparison(i),r=this.fixTextForDomComparison(r),n.textContent!==i){if(n.textContent===r)return;throw new Mi("Existing text does not match previous value.",e)}n.textContent=r}}removeElementTree(e,t){Ri.validateRemoveElementTreeChange(t),this.forEachLogicalNodeWithId(t.nodeId,t,((t,n)=>this.removeElementTreeByNode(e,t,n)))}removeElementTreeByNode(e,t,n){const o=n.parent;if(!o)throw new Mi("Failed to find parent logical node.",t);this.removeDescendantDomNodesIncludingSelf(n),this.removeLogicalNodeAndDescendants(e,o.children,n)}removeLogicalNodeAndDescendants(e,t,n){this.removeLogicalNode(t,n),this.trackTreeRemoval(e,n),this.removeNodeAndDescendantsFromIdMapping(n)}trackTreeRemoval(e,t){if(e.removed.push(t),t.attributes)for(const n of t.attributes)this.trackTreeRemoval(e,n);if(t.children)for(const n of t.children)this.trackTreeRemoval(e,n)}removeDescendantDomNodesIncludingSelf(e){if(o(e).mapsToDom){const n=e.getDomNode();n&&null!=(t=n)&&t.parentNode&&t.parentNode.removeChild(t)}else for(const t of e.children)this.removeDescendantDomNodesIncludingSelf(t);var t}unwrapElements(e,t){Ri.validateUnwrapElementsChange(t),this.forEachLogicalNodeWithId(t.nodeId,t,((t,n)=>this.unwrapElementsByNode(e,t,n))),this.clearIdMappingForId(t.nodeId)}unwrapElementsByNode(e,t,n){const i=n.parent;if(!i)throw new Mi("Failed to find parent logical node.",t);if(o(n).mapsToDom){const e=n.getDomNode(),o=this.logicalTreeTraverser.findValidInsertionPoint(i,this.findPreviousSibling(i));if(!o||!o.modifiedParentNode)throw new Mi("Failed to find logical tree insertion point.",t);const r=o.modifiedParentNode.getDomNode();if(!r)throw new Mi("Failed to find parent DOM element.",t);for(;e.firstChild;){const t=e.firstChild;e.removeChild(t),r.insertBefore(t,e)}r.removeChild(e)}for(;n.children.length>0;){const e=n.children[n.children.length-1];this.removeLogicalNode(n.children,e),e.parent=i,this.insertLogicalNodeAfter(i.children,e,n)}this.removeLogicalNode(i.children,n),e.removed.push(n)}removeAttribute(e,t){Ri.validateRemoveAttributeChange(t),this.forEachLogicalNodeWithId(t.nodeId,t,((t,n)=>this.removeAttributeFromElement(e,t,n))),this.clearIdMappingForId(t.nodeId)}removeAttributeFromElement(e,t,n){const i=n.parent;if(!i)throw new Mi("Failed to find parent logical node.",t);if(o(n).mapsToDom&&o(i).mapsToDom){const e=n.getDomNode();if(!e)throw new Mi("Failed to find DOM attribute node to remove.",t);const o=e.ownerElement;if(!o)throw new Mi("Failed to find DOM attribute node's parent element.",t);o.removeAttribute(e.name)}this.removeLogicalNode(i.attributes,n),e.removed.push(n)}removeText(e,t){Ri.validateRemoveTextChange(t),this.forEachLogicalNodeWithId(t.nodeId,t,((t,n)=>this.removeTextByNode(e,t,n))),this.clearIdMappingForId(t.nodeId)}removeTextByNode(e,t,n){const i=n.parent;if(!i)throw new Mi("Failed to find parent logical node.",t);if(o(n).mapsToDom){const e=n.getDomNode();if(!e)throw new Mi("Failed to find DOM text node to remove.",t);const o=e.parentElement;if(!o)throw new Mi("Failed to find DOM text node's parent element.",t);o.removeChild(e)}this.removeLogicalNode(i.children,n),e.removed.push(n)}moveElement(e){Ri.validateMoveElementChange(e),this.moveNode(e,e.nodeId,e.parentNodeId,e.insertAfterNodeId)}moveText(e){Ri.validateMoveTextChange(e),this.moveNode(e,e.nodeId,e.parentNodeId,e.insertAfterNodeId)}moveNode(e,t,n,i){const r=this.getLogicalNodesFromNodeId(t),s=this.getLogicalNodesFromNodeId(n),a=i?this.getLogicalNodesFromNodeId(i):[];if(1!==r.length||1!==s.length||a.length>1)throw new Mi("Moving nodes with multiple logical nodes, multiple parents or multiple insert after nodes is not supported.",e);const c=r[0],l=c.parent,u=s[0],d=a.length>0?a[0]:null;if(!l)throw new Mi("Failed to find parent logical node.",e);o(c).mapsToDom?this.moveDomNode(e,c,u,d):this.moveDomDescendants(e,c,u,d),d?this.insertLogicalNodeAfter(u.children,c,d):this.insertLogicalNodeAtBeginning(u.children,c),c.parent=u,this.removeLogicalNode(l.children,c)}moveDomNode(e,t,n,o){const i=t.getDomNode();if(!i)throw new Mi("Failed to find DOM node to move.",e);const r=this.logicalTreeTraverser.findValidInsertionPoint(n,o,[t]);if(!r||!r.modifiedParentNode)throw new Mi("Failed to find logical tree insertion point.",e);const s=i.parentNode,a=r.modifiedParentNode.getDomNode(),c=r.modifiedInsertAfterLogicalNode?r.modifiedInsertAfterLogicalNode.getDomNode():null;if(!s||!a)throw new Mi("Failed to find parent DOM element or new parent DOM element.",e);c&&c.nodeType===Node.TEXT_NODE&&this.breakUpDomTextNode(r.modifiedInsertAfterLogicalNode,c),i&&s&&a&&(s.removeChild(i),c?zi(i,c):Ki(i,a))}moveDomDescendants(e,t,n,i){for(let r=t.children.length-1;r>=0;r--){const s=t.children[r];o(s).mapsToDom?this.moveDomNode(e,s,n,i):this.moveDomDescendants(e,s,n,i)}}moveAttribute(e){const t=this.getLogicalNodesFromNodeId(e.nodeId),n=this.getLogicalNodesFromNodeId(e.parentNodeId);if(1!==t.length||1!==n.length)throw new Mi("Moving nodes with multiple logical nodes, multiple parents or multiple insert after nodes is not supported.",e);const i=t[0],r=i.parent,s=n[0];if(!r)throw new Mi("Failed to find parent logical node.",e);if(o(i).mapsToDom){const t=i.getDomNode();if(!t)throw new Mi("Failed to find DOM node to move.",e);const n=r.getDomNode(),o=s.getDomNode();if(!n||!o)throw new Mi("Failed to find parent DOM element or new parent DOM element.",e);n.removeAttributeNode(t),o.setAttributeNode(t)}this.removeLogicalNode(r.attributes,i),i.parent=s,s.attributes.push(i)}updateSourcePath(e){this.updateSourcePathInternal(this.browserLink.logicalTree.root,e)}updateSourcePathInternal(e,t){if(e.start.path===t.originalSourcePath&&(e.start.path=t.newSourcePath),e.children)for(const n of e.children)this.updateSourcePathInternal(n,t);if(e.attributes)for(const n of e.attributes)this.updateSourcePathInternal(n,t)}}function zi(e,t){e&&null!=t&&t.parentNode&&t.parentNode.insertBefore(e,t.nextSibling)}function Ki(e,t){e&&t&&t.insertBefore(e,t.firstChild)}var qi;!function(e){e["Root"]="Root",e["Element"]="Element",e["Attribute"]="Attribute",e["Comment"]="Comment",e["Text"]="Text",e["CodeBlock"]="CodeBlock",e["GenericContainer"]="GenericContainer"}(qi||(qi={}));class Gi{constructor(e){this.browserLink=e}dragAndDropAfterSiblingNode(e,t){this.browserLink.invoke("DropControlTextInEditor",e.start.path,e.start.position,1,t)}moveNodeAfterSiblingNode(e,t){this.browserLink.invoke("MoveNodeInEditor",e.start.path,e.start.position+e.length,t.start.position,t.start.position+t.length)}moveNodeAsFirstChild(e,t){this.browserLink.invoke("MoveNodeInEditor",e.start.path,e.start.position+e.startTagLength,t.start.position,t.start.position+t.length)}insertTextAfterSiblingNode(e,t){return this.browserLink.invokeAsync("InsertTextInEditor",e.start.path,e.start.position,1,t)}dragAndDropAsFirstChild(e,t){this.browserLink.invoke("DropControlTextInEditor",e.start.path,e.start.position,4,t)}insertTextAsFirstChild(e,t){return this.browserLink.invokeAsync("InsertTextInEditor",e.start.path,e.start.position,4,t)}replaceTextInTextNode(e,t){this.browserLink.invoke("ReplaceTextInEditor",e.start.path,e.start.position,e.text.length,t)}}class $i{constructor(e){this.browserLink=e}refreshAllBrowsers(){this.browserLink.invoke("RefreshBrowsers")}}function Ji(e){return"function"==typeof e["then"]&&"function"==typeof e["catch"]&&"function"==typeof e["finally"]?e:new Promise((t=>e.continueWith(t)))}class Xi{constructor(e){this.browserLink=e}getCurrentUpdateFullStatus(){return Ji(this.browserLink.invokeAsync("GetCurrentUpdateState"))}getCurrentUpdateShortStatus(){return Ji(this.browserLink.invokeAsync("GetCurrentUpdateStateShortMsg"))}getCurrentMessageType(){return Ji(this.browserLink.invokeAsync("GetCurrentMessageType"))}}class Yi{constructor(e){var t;this.browserLink=e,this.handleIsInitializedChanged=(e,t)=>{t&&this.sendInitializationSucceeded()},null==e||null===(t=e.logicalTreeInitializedStatusService)||void 0===t||t.isInitializedChanged.subscribe(this.handleIsInitializedChanged)}sendInitializationSucceeded(){var e,t;if(this.initializationSucceededTelemetryFired||null===(e=this.browserLink)||void 0===e||null===(t=e.wlpInitStartInfoService)||void 0===t||!t.startTime)return;this.initializationSucceededTelemetryFired=!0;const n=(new Date).getTime(),o=this.browserLink.wlpInitStartInfoService.startTime.getTime();this.browserLink.invokeAsync("SendWlpSuccessfulInitTimeTelemetryEvent",o,n)}sendChangesApplied(e,t){let n=-1;if(t){const e=new Date,o=new Date(Date.parse(t));n=e.getTime()-o.getTime()}this.browserLink.invokeAsync("SendChangesAppliedTelemetryEvent",e,n)}sendDragAndDropFailed(e,t){this.browserLink.invokeAsync("SendDragAndDropFailedTelemetry",e,t)}sendDragAndDropSucceeded(e){this.browserLink.invokeAsync("SendDragAndDropSucceededTelemetry",e)}sendActionPanelOpened(e){this.browserLink.invokeAsync("SendActionPanelOpenedTelemetry",e)}addBlockedDomainsToAllowListLinkClicked(){this.browserLink.invokeAsync("SendAddBlockedDomainsToAllowListLinkClickedTelemetry")}manageAllowedListLinkClicked(){this.browserLink.invokeAsync("SendManageAllowedListLinkClickedTelemetry")}sendCloseDialogCanceled(){this.browserLink.invoke("CloseDialogCanceled")}sendBlockedResourcesLearnMoreLinkClicked(){this.browserLink.invoke("BlockedResourcesLearnMoreLinkClicked")}sendNewTextNodeInserted(e){this.browserLink.invoke("SendNewTextNodeInsertedTelemetry",e)}}class Zi{constructor(e){this.browserLink=e}getCurrentEditorSelectionPosition(){return Ji(this.browserLink.invokeAsync("GetCurrentEditorSelectionPosition"))}}class Qi{constructor(e){this.browserLink=e}fillTagPrefixOn3rdPartyWebControlDrop(e,t){return Ji(this.browserLink.invokeAsync("FillTagPrefixOn3rdPartyWebControlDrop",e,t))}}class er{createElement(e,t){return document.createElement(e,t)}}class tr{constructor(e){this.browserLink=e}initialize(){this.browserLink.log("Initializing host services..."),this.browserLink.autoSyncService.initialize(),xi.bind(Ci.refreshBrowser,(e=>{this.browserLink.refreshBrowsersService.refreshAllBrowsers()})),this.browserLink.sourceMapping.ensureUpToDateAsync((()=>{this.browserLink.log("Host service initialization finished")}))}uninitialize(e){xi.unbind(Ci.refreshBrowser)}}class nr{constructor(e){this.browserLink=e}writeMessage(e,t){this.browserLink.invoke("DiagnosticGenericBrowserMessage",e,t)}writeEvent(e,t){this.browserLink.invoke("DiagnosticEvent",e,t)}writeMessageForEvent(e,t,n){this.browserLink.invoke("DiagnosticMessage",e,t,n)}}class or{constructor(e){this.browserLink=e,this.anchorElement=null,this.onScroll=()=>{this.anchorElement&&(this.browserLink.toolsActionPanelService.isVisible=!1)},window.addEventListener("scroll",this.onScroll)}getActionItems(e){return Ji(this.browserLink.invokeAsync("GetActionPanelItems",e.start.path,e.start.position))}executeMethod(e,t,n){this.browserLink.invokeAsync("ExecuteActionMethodItem",e.start.path,e.start.position,t,n)}updateProperty(e,t,n,o){this.browserLink.invokeAsync("UpdateActionPropertyItem",e.start.path,e.start.position,t,n,o)}isEmbeddedActionPanelSupported(){return Ji(this.browserLink.invokeAsync("IsEmbeddedActionPanelSupported"))}showEmbeddedActionPanel(e,t){this.anchorElement=e;const n=e.getBoundingClientRect();this.browserLink.invoke("ShowEmbeddedActionPanel",t.start.path,t.start.position,n.top,n.left,n.bottom,n.right)}hideEmbeddedActionPanel(){this.anchorElement=null,this.browserLink.invoke("HideEmbeddedActionPanel")}onActionPanelClosed(){this.anchorElement=null}}class ir{constructor(e){this.browserLink=e}doDefaultAction(e){this.browserLink.invokeAsync("DoDefaultAction",e.start.path,e.start.position)}}class rr{constructor(e){this.browserLink=e}setDesignSurfaceEnabledSettingInVS(e){this.browserLink.invokeAsync("SetClientServerCommandState",256,e)}}class sr{constructor(e){this.browserLink=e}setExpandEmptyElementsSettingInVS(e){this.browserLink.invokeAsync("SetClientServerCommandState",259,e)}}class ar{constructor(e){this.browserLink=e,e.simpleTextEditingService.textNodeBeingEditedChanged.subscribe(this.onTextNodeBeingEditedChanged.bind(this))}onTextNodeBeingEditedChanged(e,t){this.browserLink.invokeAsync("SetTextEditingState",t.isTextEditModeEnabled)}}class cr{constructor(e){this.browserLink=e,e.selectionService.selectionChanged.subscribe(this.onSelectionChanged.bind(this))}onSelectionChanged(e,t){var n,o,i,r,s,a,c;const l=null!==(n=null!==(o=t.newSelectedNode)&&void 0!==o?o:t.newPriorSiblingNode)&&void 0!==n?n:t.newParentNode,u=null!==(i=null==l||null===(r=l.start)||void 0===r?void 0:r.position)&&void 0!==i?i:-1,d=null!==(s=null==l?void 0:l.length)&&void 0!==s?s:-1,p=null!==(a=t.newSelectedNode)&&void 0!==a?a:t.newParentNode,h=this.browserLink.quickEditingService.getCreateNewElementText(p),f=this.browserLink.simpleTextEditingService.canEnableEditingMode(l);this.browserLink.invokeAsync("SetSelectionState",null==l||null===(c=l.start)||void 0===c?void 0:c.path,u,d,h,f)}}function lr(e,t){switch(e){case"Warning":return 1;case"Error":return 2;case"Info":return 0;default:return t.log("Error: setStatus() message type isn't expected. The message type value is: "+e),0}}class ur{constructor(e){this.browserLink=e}showAllowUrlsDialogWithNewEntries(e){const t=e.join(" ");this.browserLink.invoke("AddAllowedUrls",t)}showAllowUrlsDialog(){this.browserLink.invoke("ShowAddAllowedUrlsDialog")}}function dr(e){if(function(){try{return window.self!==window.top}catch(e){return!0}}())return e.log("Skipping host initialization due to IFrame detection"),{applyHtmlChanges:e=>!1,createNewElement(){},editText(){},onEditorSelectionChanged:(e,t)=>!1,onEmbeddedActionPanelClosed(){},onUpdateNeededChanged(e){},setStatus:(e,t,n)=>!1,setDesignSurfaceEnabledSetting:e=>!1,setShowEmptyElementsSetting:e=>!1,setTargetFilePath(e){},showSmartTag(){},onConnected(){},onDisconnected(){}};const t=new Yi(e);e.addSharedService("telemetryService",t);const n=new nr(e);e.addSharedService("diagnosticLog",n);const o=new Vi(e,new er);e.addSharedService("autoSyncService",o);const i=new Gi(e);e.addSharedService("logicalTreeEditingService",i);const r=new $i(e);e.addSharedService("refreshBrowsersService",r);const s=new Xi(e);e.addSharedService("currentUpdateStatusService",s);const a=new Zi(e);e.addSharedService("currentEditorStateService",a);const c=new tr(e);e.addSharedService("hostLifetimeService",c);const l=new or(e);e.addSharedService("actionPanelService",l);const u=new ir(e);e.addSharedService("defaultActionService",u);const d=new rr(e);e.addSharedService("designSurfaceHostService",d);const p=new sr(e);e.addSharedService("expandEmptyElementsHostService",p);const h=new Qi(e);e.addSharedService("dragAndDropHtmlFormatService",h);const f=new ur(e);e.addSharedService("allowedUrlsOptionsService",f);new ar(e),new cr(e);return{applyHtmlChanges:e=>o.applyHtmlChanges(e),createNewElement(){var t;const n=null!==(t=e.selectionService.selectedLogicalNode)&&void 0!==t?t:e.selectionService.parentNode;n&&e.quickEditingService.createNewElementAfter(n)},editText(){const t=e.selectionService.selectedLogicalNode;e.simpleTextEditingService.editText(t)},setDesignSurfaceEnabledSetting:t=>(e.designSurfaceService.isEnabled=t,!0),setShowEmptyElementsSetting:t=>(e.expandEmptyElementsService.isExpansionOnEmptyElementsEnabled=t,!0),onEmbeddedActionPanelClosed:function(){e.actionPanelService.onActionPanelClosed(),e.toolsActionPanelService.onActionPanelClosed()},onEditorSelectionChanged:function(t,n,o){try{e.selectionHostingService.setSelectedLogicalNodeBySourceSpan(t,n,o)}catch(t){var i;const n=t instanceof Error?t.message+"\r\n"+t.stack:"Unknown Error";null===(i=e.diagnosticLog)||void 0===i||i.writeEvent(7548,n)}return!0},onUpdateNeededChanged:function(t){e.updateBrowserButtonService&&(e.updateBrowserButtonService.isButtonEnabled=t)},setStatus:function(t,n,o){var i;return!(null===(i=e.logicalTreeInitializedStatusService)||void 0===i||!i.isInitialized||!e.statusService)&&(e.statusService.currentStatus={messageType:lr(t,e),displayText:o,fullText:n},!0)},setTargetFilePath:function(t){e.statusService&&(e.statusService.targetFilePath=t)},showSmartTag:function(){var t;null===(t=e.toolsActionPanelService)||void 0===t||t.makeVisible()},onConnected(){e.log("Host extension connected"),c.initialize()},onDisconnected:function(){xi.unbind(Ci.refreshBrowser),this.setStatus("Warning",Ei("status.disconnectedFullMessage"),Ei("status.disconnectedShortMessage")),e.browserLinkConnectionStatusService.isConnected=!1}}}},555:function(e,t,n){e.exports=n(274)["default"]},441:function(e,t,n){var o;!function(i,r,s){if(i){for(var a,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},l={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},u={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},d={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();y.prototype.bind=function(e,t,n){var o=this;return e=e instanceof Array?e:[e],o._bindMultiple.call(o,e,t,n),o},y.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},y.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},y.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},y.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},y.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},y.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(c[t]=e[t]);a=null},y.init=function(){var e=y(r);for(var t in e)"_"!==t.charAt(0)&&(y[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},y.init(),i.Mousetrap=y,1&&e.exports&&(e.exports=y),1&&(void 0===(o=function(){return y}.call(t,n,t,e))||(e.exports=o))}function h(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function f(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return c[e.which]?c[e.which]:l[e.which]?l[e.which]:String.fromCharCode(e.which).toLowerCase()}function g(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function v(e,t,n){return n||(n=function(){if(!a)for(var e in a={},c)e>95&&e<112||c.hasOwnProperty(e)&&(a[c[e]]=e);return a}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function m(e,t){var n,o,i,r=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),i=0;i1?p(e,a,n,o):(s=m(e,o),t._callbacks[s.key]=t._callbacks[s.key]||[],l(s.key,s.modifiers,{type:s.action},i,e,r),t._callbacks[s.key][i?"unshift":"push"]({callback:n,modifiers:s.modifiers,action:s.action,seq:i,level:r,combo:e}))}t._handleKey=function(e,t,n){var o,i=l(e,t,n),r={},d=0,p=!1;for(o=0;o-1&&this._subscriptions.splice(t,1)}},e.prototype.asEvent=function(){return this._wrap},e.prototype.clear=function(){this._subscriptions.splice(0,this._subscriptions.length)},e}();t.DispatcherBase=s;var a=function(){function e(){this._events={}}return e.prototype.get=function(e){var t=this._events[e];return t||(t=this.createDispatcher(),this._events[e]=t,t)},e.prototype.remove=function(e){delete this._events[e]},e}();t.EventListBase=a;var c=function(){function e(e){this._subscribe=function(t){return e.subscribe(t)},this._unsubscribe=function(t){return e.unsubscribe(t)},this._one=function(t){return e.one(t)},this._has=function(t){return e.has(t)},this._clear=function(){return e.clear()},this._count=function(){return e.count}}return Object.defineProperty(e.prototype,"count",{get:function(){return this._count()},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){return this._subscribe(e)},e.prototype.sub=function(e){return this.subscribe(e)},e.prototype.unsubscribe=function(e){this._unsubscribe(e)},e.prototype.unsub=function(e){this.unsubscribe(e)},e.prototype.one=function(e){return this._one(e)},e.prototype.has=function(e){return this._has(e)},e.prototype.clear=function(){this._clear()},e}();t.DispatcherWrapper=c},210:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=t.EventListBase=t.DispatcherWrapper=t.DispatcherBase=void 0;var o=n(349);Object.defineProperty(t,"DispatcherBase",{enumerable:!0,get:function(){return o.DispatcherBase}}),Object.defineProperty(t,"DispatcherWrapper",{enumerable:!0,get:function(){return o.DispatcherWrapper}}),Object.defineProperty(t,"EventListBase",{enumerable:!0,get:function(){return o.EventListBase}});var i=n(422);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return i.Subscription}})},144:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventManagement=void 0;var n=function(){function e(e){this.unsub=e,this.propagationStopped=!1}return e.prototype.stopPropagation=function(){this.propagationStopped=!0},e}();t.EventManagement=n},422:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=void 0;var n=function(){function e(e,t){this.handler=e,this.isOnce=t,this.isExecuted=!1}return e.prototype.execute=function(e,t,n){if(!this.isOnce||!this.isExecuted){this.isExecuted=!0;var o=this.handler;e?setTimeout((function(){o.apply(t,n)}),1):o.apply(t,n)}},e}();t.Subscription=n},685:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandlingBase=t.EventList=t.NonUniformEventList=t.EventDispatcher=void 0;var r=n(210),s=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.dispatch=function(e,t){this._dispatch(!1,this,arguments)},t.prototype.dispatchAsync=function(e,t){this._dispatch(!0,this,arguments)},t.prototype.asEvent=function(){return e.prototype.asEvent.call(this)},t}(r.DispatcherBase);t.EventDispatcher=s;var a=function(){function e(){this._events={}}return e.prototype.get=function(e){if(this._events[e])return this._events[e];var t=this.createDispatcher();return this._events[e]=t,t},e.prototype.remove=function(e){delete this._events[e]},e.prototype.createDispatcher=function(){return new s},e}();t.NonUniformEventList=a;var c=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.createDispatcher=function(){return new s},t}(r.EventListBase);t.EventList=c;var l=function(){function e(){this._events=new c}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e,t){this._events.get(e).subscribe(t)},e.prototype.sub=function(e,t){this.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._events.get(e).unsubscribe(t)},e.prototype.unsub=function(e,t){this.unsubscribe(e,t)},e.prototype.one=function(e,t){this._events.get(e).one(t)},e.prototype.has=function(e,t){return this._events.get(e).has(t)},e}();t.EventHandlingBase=l},132:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformEventList=t.EventList=t.EventHandlingBase=t.EventDispatcher=void 0;var o=n(685);Object.defineProperty(t,"EventDispatcher",{enumerable:!0,get:function(){return o.EventDispatcher}}),Object.defineProperty(t,"EventHandlingBase",{enumerable:!0,get:function(){return o.EventHandlingBase}}),Object.defineProperty(t,"EventList",{enumerable:!0,get:function(){return o.EventList}}),Object.defineProperty(t,"NonUniformEventList",{enumerable:!0,get:function(){return o.NonUniformEventList}})},106:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignalList=t.SignalHandlingBase=t.SignalDispatcher=void 0;var o=n(141);Object.defineProperty(t,"SignalDispatcher",{enumerable:!0,get:function(){return o.SignalDispatcher}}),Object.defineProperty(t,"SignalHandlingBase",{enumerable:!0,get:function(){return o.SignalHandlingBase}}),Object.defineProperty(t,"SignalList",{enumerable:!0,get:function(){return o.SignalList}})},141:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SignalHandlingBase=t.SignalList=t.SignalDispatcher=void 0;var r=n(210),s=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.dispatch=function(){this._dispatch(!1,this,arguments)},t.prototype.dispatchAsync=function(){this._dispatch(!0,this,arguments)},t.prototype.asEvent=function(){return e.prototype.asEvent.call(this)},t}(r.DispatcherBase);t.SignalDispatcher=s;var a=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.createDispatcher=function(){return new s},t}(r.EventListBase);t.SignalList=a;var c=function(){function e(){this._events=new a}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e.prototype.one=function(e,t){this._events.get(e).one(t)},e.prototype.has=function(e,t){return this._events.get(e).has(t)},e.prototype.subscribe=function(e,t){this._events.get(e).subscribe(t)},e.prototype.sub=function(e,t){this.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._events.get(e).unsubscribe(t)},e.prototype.unsub=function(e,t){this.unsubscribe(e,t)},e}();t.SignalHandlingBase=c},602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformSimpleEventList=t.SimpleEventList=t.SimpleEventHandlingBase=t.SimpleEventDispatcher=void 0;var o=n(699);Object.defineProperty(t,"SimpleEventDispatcher",{enumerable:!0,get:function(){return o.SimpleEventDispatcher}}),Object.defineProperty(t,"SimpleEventHandlingBase",{enumerable:!0,get:function(){return o.SimpleEventHandlingBase}}),Object.defineProperty(t,"SimpleEventList",{enumerable:!0,get:function(){return o.SimpleEventList}}),Object.defineProperty(t,"NonUniformSimpleEventList",{enumerable:!0,get:function(){return o.NonUniformSimpleEventList}})},699:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleEventHandlingBase=t.SimpleEventList=t.NonUniformSimpleEventList=t.SimpleEventDispatcher=void 0;var r=n(210),s=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.dispatch=function(e){this._dispatch(!1,this,arguments)},t.prototype.dispatchAsync=function(e){this._dispatch(!0,this,arguments)},t.prototype.asEvent=function(){return e.prototype.asEvent.call(this)},t}(r.DispatcherBase);t.SimpleEventDispatcher=s;var a=function(){function e(){this._events={}}return e.prototype.get=function(e){if(this._events[e])return this._events[e];var t=this.createDispatcher();return this._events[e]=t,t},e.prototype.remove=function(e){delete this._events[e]},e.prototype.createDispatcher=function(){return new s},e}();t.NonUniformSimpleEventList=a;var c=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.createDispatcher=function(){return new s},t}(r.EventListBase);t.SimpleEventList=c;var l=function(){function e(){this._events=new c}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e,t){this._events.get(e).subscribe(t)},e.prototype.sub=function(e,t){this.subscribe(e,t)},e.prototype.one=function(e,t){this._events.get(e).one(t)},e.prototype.has=function(e,t){return this._events.get(e).has(t)},e.prototype.unsubscribe=function(e,t){this._events.get(e).unsubscribe(t)},e.prototype.unsub=function(e,t){this.unsubscribe(e,t)},e}();t.SimpleEventHandlingBase=l},993:function(e,t,n){"use strict";var o=n(210);o.DispatcherBase,o.DispatcherWrapper,o.EventListBase,o.Subscription;var i=n(132);i.EventDispatcher,i.EventHandlingBase,i.EventList,i.NonUniformEventList;var r=n(602);t.FK=r.SimpleEventDispatcher,r.SimpleEventHandlingBase,r.SimpleEventList,r.NonUniformSimpleEventList;var s=n(106);t.nz=s.SignalDispatcher,s.SignalHandlingBase,s.SignalList}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o=n(555);return o})();; this.addExtension("Microsoft.WebTools.BrowserLink.LivePreview.LivePreviewExtensionFactory", extension); }} catch(e) {{ this.log("Invalid extension script encountered for extension 'Microsoft.WebTools.BrowserLink.LivePreview.LivePreviewExtensionFactory'."); return; }} },generateId:function(){return this.nextId++,this.nextId<0&&(this.nextId=0),this.nextId},removeTask:function(n){delete this.callbackTable[n]},addExtension:function(f,e){var o={},s,h,c,l;if(typeof e!="function"){this.log("Extension function definition was not defined as a function object.");return}h=function(n,t){if(typeof n=="undefined")throw new Error("Browser Link: Method call failed, missing method name argument.");if(!t)throw new Error('Method call failed, missing class name. Use the format "namespace."methodName"');return t+"."+n};c=function(n){for(var i=[],t=1;t=0||navigator.userAgent.search(/trident/i)>=0?!0:!1},r()&&(u=window.location,t=window.document.createElement("a"),t.href=n,i=function(n){return n&&n.indexOf(".")<0?!0:!1},i(t.hostname)&&!i(u.hostname)))return!1;try{return f=new XMLHttpRequest,f.open("get",n),!0}catch(e){return!1}};o(i.connection.url)?i.connection.start().done(f):i.connection.start({transport:"longPolling",jsonp:!0}).done(f)}};n(window).on("beforeunload",function(){i.isUnloading=!0});if(i.initialize(),window._vwdonbeforeunload)n(window).on("beforeunload",window._vwdonbeforeunload)})($.noConflict(!0),JSON);window._vwdJSON&&(JSON=window._vwdJSON);window._vwdDefine&&(define=window._vwdDefine);