You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
17 KiB

5 years ago
(function(){'use strict';var h;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}var ca="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},k;
if("function"==typeof Object.setPrototypeOf)k=Object.setPrototypeOf;else{var l;a:{var da={D:!0},ea={};try{ea.__proto__=da;l=ea.D;break a}catch(a){}l=!1}k=l?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var fa=k;
function ha(a,b){a.prototype=ca(b.prototype);a.prototype.constructor=a;if(fa)fa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.o=b.prototype}var m="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,ia="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
function ja(a,b){if(b){var c=m;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ia(c,a,{configurable:!0,writable:!0,value:b})}}
ja("Array.from",function(a){return a?a:function(a,c,d){c=null!=c?c:function(a){return a};var b=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if("function"==typeof f){a=f.call(a);for(var g=0;!(f=a.next()).done;)b.push(c.call(d,f.value,g++))}else for(f=a.length,g=0;g<f;g++)b.push(c.call(d,a[g],g));return b}});var n=this;function q(a){return"string"==typeof a}function r(){}
function t(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function u(a){return"array"==t(a)}function v(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}
function la(a,b){function c(){}c.prototype=b.prototype;a.o=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.I=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};function w(a){var b=HTMLElement.call(this)||this;a&&(q(a)&&(a=[a]),document.body.dispatchEvent(new CustomEvent("devsite-load-custom-elements",{bubbles:!0,detail:a})));return b}ha(w,HTMLElement);h=w.prototype;h.connectedCallback=function(){ma(this)};h.w=function(){return""};function ma(a){var b=a.w();!a.hasAttribute("ds-is")&&b&&a.setAttribute("ds-is",b)}h.aa=function(){console.warn(this.tagName,"has not implemented update")};
h.J=function(a){a=void 0===a?"":a;return document.createRange().createContextualFragment(a||"")};h.Y=function(a,b){a&&b?a.parentNode.replaceChild(document.importNode(b,!0),a):!b&&a?a.parentNode.removeChild(a):!a&&b&&this.appendChild(document.importNode(b,!0))};w.prototype.connectedCallback=w.prototype.connectedCallback;var na=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(q(a))return q(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};var oa=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};function x(a,b){return a<b?-1:a>b?1:0};var y;a:{var pa=n.navigator;if(pa){var qa=pa.userAgent;if(qa){y=qa;break a}}y=""};function ra(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function sa(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1};function z(a){z[" "](a);return a}z[" "]=r;function ta(a){var b=ua;return Object.prototype.hasOwnProperty.call(b,"9")?b["9"]:b["9"]=a("9")};var va=-1!=y.indexOf("Opera"),A=-1!=y.indexOf("Trident")||-1!=y.indexOf("MSIE"),wa=-1!=y.indexOf("Edge"),xa=-1!=y.indexOf("Gecko")&&!(-1!=y.toLowerCase().indexOf("webkit")&&-1==y.indexOf("Edge"))&&!(-1!=y.indexOf("Trident")||-1!=y.indexOf("MSIE"))&&-1==y.indexOf("Edge"),B=-1!=y.toLowerCase().indexOf("webkit")&&-1==y.indexOf("Edge"),ya=-1!=y.indexOf("Macintosh");function za(){var a=n.document;return a?a.documentMode:void 0}var C;
a:{var D="",E=function(){var a=y;if(xa)return/rv:([^\);]+)(\)|;)/.exec(a);if(wa)return/Edge\/([\d\.]+)/.exec(a);if(A)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(B)return/WebKit\/(\S+)/.exec(a);if(va)return/(?:Version)[ \/]?(\S+)/.exec(a)}();E&&(D=E?E[1]:"");if(A){var F=za();if(null!=F&&F>parseFloat(D)){C=String(F);break a}}C=D}var Aa=C,ua={};
function Ba(){return ta(function(){for(var a=0,b=oa(String(Aa)).split("."),c=oa("9").split("."),d=Math.max(b.length,c.length),e=0;0==a&&e<d;e++){var f=b[e]||"",g=c[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;a=x(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||x(0==f[2].length,0==g[2].length)||x(f[2],g[2]);f=f[3];g=g[3]}while(0==a)}return 0<=a})}var G;var Ca=n.document;
G=Ca&&A?za()||("CSS1Compat"==Ca.compatMode?parseInt(Aa,10):5):void 0;function Da(a,b){var c=[];Ea(a,b,c,!1);return c}function Ea(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||Ea(a,b,c,d))return!0;a=a.nextSibling}return!1}function Fa(a){return A&&!Ba()?(a=a.getAttributeNode("tabindex"),null!=a&&a.specified):a.hasAttribute("tabindex")}function Ga(a){a=a.tabIndex;return"number"==typeof a&&0<=a&&32768>a}function Ha(a){return Ia(a,function(a){if(a="DEVSITE-DIALOG"==a.nodeName)a=!0;return a})}
function Ia(a,b){for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null};var Ja=!A||9<=Number(G),Ka=!A||9<=Number(G),La=A&&!Ba(),Ma=function(){if(!n.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{n.addEventListener("test",r,b),n.removeEventListener("test",r,b)}catch(c){}return a}();function H(){this.f=this.f;this.b=this.b}h=H.prototype;h.f=!1;h.F=function(){return this.f};h.K=H.prototype.F;h.v=function(){this.f||(this.f=!0,this.u())};h.X=function(a){a=ka(Na,a);this.f?a():(this.b||(this.b=[]),this.b.push(a))};h.u=function(){if(this.b)for(;this.b.length;)this.b.shift()()};function Na(a){a&&"function"==typeof a.v&&a.v()};function I(a,b){this.type=a;this.b=this.target=b;this.C=this.c=!1;this.H=!0}I.prototype.g=function(){this.c=!0};I.prototype.h=function(){this.C=!0;this.H=!1};function J(a,b){I.call(this,a?a.type:"");this.relatedTarget=this.b=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.m=this.l=0;this.key="";this.j=this.A=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.B=null;this.G=!1;this.pointerId=0;this.pointerType="";this.a=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.b=b;if(b=a.relatedTarget){if(xa){a:{try{z(b.nodeName);
var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.l=B||void 0!==a.offsetX?a.offsetX:a.layerX,this.m=B||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||
0,this.screenY=a.screenY||0);this.button=a.button;this.A=a.keyCode||0;this.key=a.key||"";this.j=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.G=ya?a.metaKey:a.ctrlKey;this.pointerId=a.pointerId||0;this.pointerType=q(a.pointerType)?a.pointerType:Oa[a.pointerType]||"";this.B=a.state;this.a=a;a.defaultPrevented&&this.h()}}la(J,I);var Pa=[1,4,2],Oa={2:"touch",3:"pen",4:"mouse"};
J.prototype.ba=function(){return(Ja?0==this.a.button:"click"==this.type?!0:!!(this.a.button&Pa[0]))&&!(B&&ya&&this.ctrlKey)};J.prototype.g=function(){J.o.g.call(this);this.a.stopPropagation?this.a.stopPropagation():this.a.cancelBubble=!0};J.prototype.h=function(){J.o.h.call(this);var a=this.a;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,La)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};J.prototype.Z=function(){return this.a};var K="closure_listenable_"+(1E6*Math.random()|0),Qa=0;function Ra(a,b,c,d,e){this.listener=a;this.a=null;this.src=b;this.type=c;this.capture=!!d;this.b=e;this.key=++Qa;this.i=this.s=!1}function L(a){a.i=!0;a.listener=null;a.a=null;a.src=null;a.b=null};function M(a){this.src=a;this.a={};this.b=0}h=M.prototype;h.O=function(){var a=0,b;for(b in this.a)a+=this.a[b].length;return a};h.add=function(a,b,c,d,e){var f=a.toString();a=this.a[f];a||(a=this.a[f]=[],this.b++);var g=N(a,b,d,e);-1<g?(b=a[g],c||(b.s=!1)):(b=new Ra(b,this.src,f,!!d,e),b.s=c,a.push(b));return b};
h.R=function(a,b,c,d){a=a.toString();if(!(a in this.a))return!1;var e=this.a[a];b=N(e,b,c,d);return-1<b?(L(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.a[a],this.b--),!0):!1};h.S=function(a){a=a&&a.toString();var b=0,c;for(c in this.a)if(!a||c==a){for(var d=this.a[c],e=0;e<d.length;e++)++b,L(d[e]);delete this.a[c];this.b--}return b};h.L=function(a,b){a=this.a[a.toString()];var c=[];if(a)for(var d=0;d<a.length;++d){var e=a[d];e.capture==b&&c.push(e)}return c};
h.P=function(a,b){var c=void 0!==a,d=c?a.toString():"",e=void 0!==b;return sa(this.a,function(a){for(var f=0;f<a.length;++f)if(!(c&&a[f].type!=d||e&&a[f].capture!=b))return!0;return!1})};function N(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.i&&f.listener==b&&f.capture==!!c&&f.b==d)return e}return-1};var O="closure_lm_"+(1E6*Math.random()|0),P={},Sa=0;function Ta(a,b,c,d,e){if(d&&d.once)return Q(a,b,c,d,e);if(u(b)){for(var f=0;f<b.length;f++)Ta(a,b[f],c,d,e);return null}c=R(c);return a&&a[K]?S(a,b,c,v(d)?!!d.capture:!!d,e):Ua(a,b,c,!1,d,e)}
function Ua(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=v(e)?!!e.capture:!!e,p=T(a);p||(a[O]=p=new M(a));c=p.add(b,c,d,g,f);if(c.a)return c;d=Va();c.a=d;d.src=a;d.listener=c;if(a.addEventListener)Ma||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(Wa(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");Sa++;return c}
function Va(){var a=Xa,b=Ka?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b}function Q(a,b,c,d,e){if(u(b)){for(var f=0;f<b.length;f++)Q(a,b[f],c,d,e);return null}c=R(c);return a&&a[K]?a.C(b,c,v(d)?!!d.capture:!!d,e):Ua(a,b,c,!0,d,e)}
function U(a){if("number"!=typeof a&&a&&!a.i){var b=a.src;if(b&&b[K])b.a(a);else{var c=a.type,d=a.a;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(Wa(c),d):b.addListener&&b.removeListener&&b.removeListener(d);Sa--;if(c=T(b)){d=a.type;if(d in c.a){var e=c.a[d],f=na(e,a),g;(g=0<=f)&&Array.prototype.splice.call(e,f,1);g&&(L(a),0==c.a[d].length&&(delete c.a[d],c.b--))}0==c.b&&(c.src=null,b[O]=null)}else L(a)}}}function Wa(a){return a in P?P[a]:P[a]="on"+a}
function Ya(a,b,c,d){var e=!0;if(a=T(a))if(b=a.a[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.i&&(f=Za(f,d),e=e&&!1!==f)}return e}function Za(a,b){var c=a.listener,d=a.b||a.src;a.s&&U(a);return c.call(d,b)}
function Xa(a,b){if(a.i)return!0;if(!Ka){if(!b)a:{b=["window","event"];for(var c=n,d=0;d<b.length;d++)if(c=c[b[d]],null==c){b=null;break a}b=c}d=b;b=new J(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.b;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.c&&0<=e;e--){b.b=d[e];var f=Ya(d[e],a,!0,b);c=c&&f}for(e=0;!b.c&&e<d.length;e++)b.b=d[e],f=Ya(d[e],a,!1,b),c=
c&&f}return c}return Za(a,new J(b,this))}function T(a){a=a[O];return a instanceof M?a:null}var V="__closure_events_fn_"+(1E9*Math.random()>>>0);function R(a){if("function"==t(a))return a;a[V]||(a[V]=function(b){return a.handleEvent(b)});return a[V]};function W(a){H.call(this);this.c=a;this.a={}}la(W,H);var $a=[];function X(a,b,c,d){S(a,b,c,d,void 0)}h=W.prototype;h.U=function(a,b,c,d,e){return S(this,a,b,c,d,e)};function S(a,b,c,d,e,f){u(c)||(c&&($a[0]=c.toString()),c=$a);for(var g=0;g<c.length;g++){var p=Ta(b,c[g],d||a.handleEvent,e||!1,f||a.c||a);if(!p)break;a.a[p.key]=p}return a}h.N=function(a,b,c,d){return Y(this,a,b,c,d)};h.T=function(a,b,c,d,e){return Y(this,a,b,c,d,e)};
function Y(a,b,c,d,e,f){if(u(c))for(var g=0;g<c.length;g++)Y(a,b,c[g],d,e,f);else{b=Q(b,c,d||a.handleEvent,e,f||a.c||a);if(!b)return a;a.a[b.key]=b}return a}h.V=function(a,b,c,d){S(b,a,c,d,this.c||this);return this};h.W=function(a,b,c,d,e){S(b,a,c,d,e||this.c||this);return this};h.M=function(){var a=0,b;for(b in this.a)Object.prototype.hasOwnProperty.call(this.a,b)&&a++;return a};
function ab(a,b,c,d,e,f){if(u(c))for(var g=0;g<c.length;g++)ab(a,b,c[g],d,e,f);else d=d||a.handleEvent,e=v(e)?!!e.capture:!!e,f=f||a.c||a,d=R(d),e=!!e,b&&b[K]?c=b.B(c,d,e,f):b?(b=T(b))?(c=b.a[c.toString()],b=-1,c&&(b=N(c,d,e,f)),c=-1<b?c[b]:null):c=null:c=null,c&&(U(c),delete a.a[c.key])}h.$=function(a,b,c,d,e){ab(b,a,c,d,e||this.c||this,this);return this};function bb(a){ra(a.a,function(a,c){this.a.hasOwnProperty(c)&&U(a)},a);a.a={}}h.u=function(){W.o.u.call(this);bb(this)};
h.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var cb=!1;function db(a){if((a=a.target)&&1==a.nodeType){var b=a.getAttribute("data-modal-dialog-id");b?(b=document.getElementById(b))&&"devsite-dialog"===b.tagName.toLowerCase()&&(b.g=a,b.open=!0):a.classList.contains("devsite-dialog-close")&&(a=Ha(a))&&(a.open=!1)}}function Z(){var a=w.call(this)||this;a.m=!1;a.l=null;a.j=null;a.a=null;a.c=null;a.g=null;a.b=new W;return a}ha(Z,w);Z.prototype.w=function(){return"dialog"};
Z.prototype.attributeChangedCallback=function(a,b,c){"open"===a&&(null!==c?(this.setAttribute("aria-modal","true"),this.setAttribute("aria-role","dialog"),this.dispatchEvent(new CustomEvent("devsite-sitemask-show",{bubbles:!0})),this.dispatchEvent(new CustomEvent("devsite-dialog-show",{bubbles:!0})),this.l=this.parentElement,this.j=this.nextElementSibling,document.body.appendChild(this),(a=this.querySelector("h3"))&&this.scrollHeight>this.clientHeight?(a.setAttribute("tabindex",-1),a.focus()):this.a&&
this.a.focus()):(this.removeAttribute("aria-modal"),this.removeAttribute("aria-role"),this.dispatchEvent(new CustomEvent("devsite-sitemask-hide",{bubbles:!0})),this.dispatchEvent(new CustomEvent("devsite-dialog-hide",{bubbles:!0})),this.l.insertBefore(this,this.j),(a=this.querySelector("h3"))&&a.removeAttribute("tabindex"),this.g&&this.g.focus()))};
Z.prototype.connectedCallback=function(){var a=this;ma(this);X(this.b,document.body,"devsite-before-page-change",function(){a.open=!1});X(this.b,document.body,"devsite-sitemask-hidden",function(){a.open=!1});cb||(cb=!0,document.addEventListener("click",db));if(!this.m){this.m=!0;var b=null;Array.from(this.children).some(function(a){if(a.classList.contains("devsite-dialog"))return b=a,!0});b&&(eb(this,b),this.removeChild(b));for(var c=ba(this.querySelectorAll(".devsite-dialog-buttons > a")),d=c.next();!d.done;d=
c.next())d.value.setAttribute("tabindex",0)}(c=this.querySelector("h3"))&&this.setAttribute("aria-label",c.innerText);fb(this);X(this.b,this,"keydown",function(b){if("Tab"==b.key||9==b.A)b.shiftKey?document.activeElement===a.a&&a.c&&(a.c.focus(),b.h()):document.activeElement===a.c&&a.a&&(a.a.focus(),b.h())})};function eb(a,b){var c=b.getAttribute("id");c&&a.setAttribute("id",c);a.className=b.className;for(a.classList.remove("devsite-dialog");b.childNodes[0];)a.appendChild(b.childNodes[0])}
function fb(a){var b=Da(a,function(a){var b;if(b=a instanceof Element){b="A"==a.tagName&&a.hasAttribute("href")||"INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"BUTTON"==a.tagName?!a.disabled&&(!Fa(a)||Ga(a)):Fa(a)&&Ga(a);var c;b&&A?("function"!=t(a.getBoundingClientRect)||A&&null==a.parentElement?c={height:a.offsetHeight,width:a.offsetWidth}:c=a.getBoundingClientRect(),c=null!=c&&0<c.height&&0<c.width):c=b;b=c||a.hasAttribute("tabindex")}return b});b&&(a.a=b[0],a.c=b.pop())}
Z.prototype.disconnectedCallback=function(){bb(this.b)};m.Object.defineProperties(Z.prototype,{open:{configurable:!0,enumerable:!0,set:function(a){a?this.setAttribute("open",this.getAttribute("open")||""):this.removeAttribute("open")}}});m.Object.defineProperties(Z,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return["open"]}}});Z.prototype.disconnectedCallback=Z.prototype.disconnectedCallback;Z.prototype.connectedCallback=Z.prototype.connectedCallback;
Z.prototype.attributeChangedCallback=Z.prototype.attributeChangedCallback;try{window.customElements.define("devsite-dialog",Z)}catch(a){console.warn("devsite.app.customElement.DevsiteDialog",a)};}).call(this);