@kong-ui-public/app-layout 4.6.2 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-layout.es.js +3 -2
- package/dist/app-layout.umd.js +3 -3
- package/package.json +5 -5
package/dist/app-layout.es.js
CHANGED
|
@@ -1046,8 +1046,8 @@ var Ht = {
|
|
|
1046
1046
|
}), f.updateContainerElements(t), f;
|
|
1047
1047
|
};
|
|
1048
1048
|
/*!
|
|
1049
|
-
* focus-trap-vue v4.0.
|
|
1050
|
-
* (c)
|
|
1049
|
+
* focus-trap-vue v4.0.3
|
|
1050
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
1051
1051
|
* @license MIT
|
|
1052
1052
|
*/
|
|
1053
1053
|
const Gr = {
|
|
@@ -1077,6 +1077,7 @@ const Gr = {
|
|
|
1077
1077
|
setReturnFocus: [Object, String, Boolean, Function],
|
|
1078
1078
|
tabbableOptions: Object
|
|
1079
1079
|
}, Ur = Q({
|
|
1080
|
+
name: "FocusTrap",
|
|
1080
1081
|
props: Object.assign({
|
|
1081
1082
|
active: {
|
|
1082
1083
|
// TODO: could be options for activate but what about the options for deactivating?
|
package/dist/app-layout.umd.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
7
7
|
*/function Ve(o,a){(a==null||a>o.length)&&(a=o.length);for(var r=0,n=Array(a);r<a;r++)n[r]=o[r];return n}function La(o){if(Array.isArray(o))return Ve(o)}function Ma(o,a,r){return(a=Ha(a))in o?Object.defineProperty(o,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[a]=r,o}function Pa(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function ja(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
8
8
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function at(o,a){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);a&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable})),r.push.apply(r,n)}return r}function nt(o){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?at(Object(r),!0).forEach(function(n){Ma(o,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(r,n))})}return o}function Za(o){return La(o)||Pa(o)||za(o)||ja()}function Ka(o,a){if(typeof o!="object"||!o)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var n=r.call(o,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}function Ha(o){var a=Ka(o,"string");return typeof a=="symbol"?a:a+""}function za(o,a){if(o){if(typeof o=="string")return Ve(o,a);var r={}.toString.call(o).slice(8,-1);return r==="Object"&&o.constructor&&(r=o.constructor.name),r==="Map"||r==="Set"?Array.from(o):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ve(o,a):void 0}}var ot={activateTrap:function(a,r){if(a.length>0){var n=a[a.length-1];n!==r&&n._setPausedState(!0)}var s=a.indexOf(r);s===-1||a.splice(s,1),a.push(r)},deactivateTrap:function(a,r){var n=a.indexOf(r);n!==-1&&a.splice(n,1),a.length>0&&!a[a.length-1]._isManuallyPaused()&&a[a.length-1]._setPausedState(!1)}},Wa=function(a){return a.tagName&&a.tagName.toLowerCase()==="input"&&typeof a.select=="function"},Ua=function(a){return(a==null?void 0:a.key)==="Escape"||(a==null?void 0:a.key)==="Esc"||(a==null?void 0:a.keyCode)===27},ue=function(a){return(a==null?void 0:a.key)==="Tab"||(a==null?void 0:a.keyCode)===9},Ga=function(a){return ue(a)&&!a.shiftKey},qa=function(a){return ue(a)&&a.shiftKey},rt=function(a){return setTimeout(a,0)},fe=function(a){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return typeof a=="function"?a.apply(void 0,n):a},we=function(a){return a.target.shadowRoot&&typeof a.composedPath=="function"?a.composedPath()[0]:a.target},Xa=[],Ya=function(a,r){var n=(r==null?void 0:r.document)||document,s=(r==null?void 0:r.trapStack)||Xa,u=nt({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ga,isKeyBackward:qa},r),c={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},m,y=function(d,f,v){return d&&d[f]!==void 0?d[f]:u[v||f]},E=function(d,f){var v=typeof(f==null?void 0:f.composedPath)=="function"?f.composedPath():void 0;return c.containerGroups.findIndex(function(p){var k=p.container,b=p.tabbableNodes;return k.contains(d)||(v==null?void 0:v.includes(k))||b.find(function(w){return w===d})})},B=function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=f.hasFallback,p=v===void 0?!1:v,k=f.params,b=k===void 0?[]:k,w=u[d];if(typeof w=="function"&&(w=w.apply(void 0,Za(b))),w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(d,"` was specified but was not a node, or did not return a node"))}var g=w;if(typeof w=="string"){try{g=n.querySelector(w)}catch(T){throw new Error("`".concat(d,'` appears to be an invalid selector; error="').concat(T.message,'"'))}if(!g&&!p)throw new Error("`".concat(d,"` as selector refers to no known node"))}return g},N=function(){var d=B("initialFocus",{hasFallback:!0});if(d===!1)return!1;if(d===void 0||d&&!De(d,u.tabbableOptions))if(E(n.activeElement)>=0)d=n.activeElement;else{var f=c.tabbableGroups[0],v=f&&f.firstTabbableNode;d=v||B("fallbackFocus")}else d===null&&(d=B("fallbackFocus"));if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},I=function(){if(c.containerGroups=c.containers.map(function(d){var f=Va(d,u.tabbableOptions),v=xa(d,u.tabbableOptions),p=f.length>0?f[0]:void 0,k=f.length>0?f[f.length-1]:void 0,b=v.find(function(T){return ie(T)}),w=v.slice().reverse().find(function(T){return ie(T)}),g=!!f.find(function(T){return ae(T)>0});return{container:d,tabbableNodes:f,focusableNodes:v,posTabIndexesFound:g,firstTabbableNode:p,lastTabbableNode:k,firstDomTabbableNode:b,lastDomTabbableNode:w,nextTabbableNode:function(F){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,U=f.indexOf(F);return U<0?P?v.slice(v.indexOf(F)+1).find(function(Q){return ie(Q)}):v.slice(0,v.indexOf(F)).reverse().find(function(Q){return ie(Q)}):f[U+(P?1:-1)]}}}),c.tabbableGroups=c.containerGroups.filter(function(d){return d.tabbableNodes.length>0}),c.tabbableGroups.length<=0&&!B("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(c.containerGroups.find(function(d){return d.posTabIndexesFound})&&c.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},O=function(d){var f=d.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?O(f.shadowRoot):f},C=function(d){if(d!==!1&&d!==O(document)){if(!d||!d.focus){C(N());return}d.focus({preventScroll:!!u.preventScroll}),c.mostRecentlyFocusedNode=d,Wa(d)&&d.select()}},x=function(d){var f=B("setReturnFocus",{params:[d]});return f||(f===!1?!1:d)},D=function(d){var f=d.target,v=d.event,p=d.isBackward,k=p===void 0?!1:p;f=f||we(v),I();var b=null;if(c.tabbableGroups.length>0){var w=E(f,v),g=w>=0?c.containerGroups[w]:void 0;if(w<0)k?b=c.tabbableGroups[c.tabbableGroups.length-1].lastTabbableNode:b=c.tabbableGroups[0].firstTabbableNode;else if(k){var T=c.tabbableGroups.findIndex(function(me){var pe=me.firstTabbableNode;return f===pe});if(T<0&&(g.container===f||De(f,u.tabbableOptions)&&!ie(f,u.tabbableOptions)&&!g.nextTabbableNode(f,!1))&&(T=w),T>=0){var F=T===0?c.tabbableGroups.length-1:T-1,P=c.tabbableGroups[F];b=ae(f)>=0?P.lastTabbableNode:P.lastDomTabbableNode}else ue(v)||(b=g.nextTabbableNode(f,!1))}else{var U=c.tabbableGroups.findIndex(function(me){var pe=me.lastTabbableNode;return f===pe});if(U<0&&(g.container===f||De(f,u.tabbableOptions)&&!ie(f,u.tabbableOptions)&&!g.nextTabbableNode(f))&&(U=w),U>=0){var Q=U===c.tabbableGroups.length-1?0:U+1,_e=c.tabbableGroups[Q];b=ae(f)>=0?_e.firstTabbableNode:_e.firstDomTabbableNode}else ue(v)||(b=g.nextTabbableNode(f))}}else b=B("fallbackFocus");return b},$=function(d){var f=we(d);if(!(E(f,d)>=0)){if(fe(u.clickOutsideDeactivates,d)){m.deactivate({returnFocus:u.returnFocusOnDeactivate});return}fe(u.allowOutsideClick,d)||d.preventDefault()}},G=function(d){var f=we(d),v=E(f,d)>=0;if(v||f instanceof Document)v&&(c.mostRecentlyFocusedNode=f);else{d.stopImmediatePropagation();var p,k=!0;if(c.mostRecentlyFocusedNode)if(ae(c.mostRecentlyFocusedNode)>0){var b=E(c.mostRecentlyFocusedNode),w=c.containerGroups[b].tabbableNodes;if(w.length>0){var g=w.findIndex(function(T){return T===c.mostRecentlyFocusedNode});g>=0&&(u.isKeyForward(c.recentNavEvent)?g+1<w.length&&(p=w[g+1],k=!1):g-1>=0&&(p=w[g-1],k=!1))}}else c.containerGroups.some(function(T){return T.tabbableNodes.some(function(F){return ae(F)>0})})||(k=!1);else k=!1;k&&(p=D({target:c.mostRecentlyFocusedNode,isBackward:u.isKeyBackward(c.recentNavEvent)})),C(p||c.mostRecentlyFocusedNode||N())}c.recentNavEvent=void 0},q=function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;c.recentNavEvent=d;var v=D({event:d,isBackward:f});v&&(ue(d)&&d.preventDefault(),C(v))},W=function(d){(u.isKeyForward(d)||u.isKeyBackward(d))&&q(d,u.isKeyBackward(d))},X=function(d){Ua(d)&&fe(u.escapeDeactivates,d)!==!1&&(d.preventDefault(),m.deactivate())},j=function(d){var f=we(d);E(f,d)>=0||fe(u.clickOutsideDeactivates,d)||fe(u.allowOutsideClick,d)||(d.preventDefault(),d.stopImmediatePropagation())},Z=function(){if(c.active)return ot.activateTrap(s,m),c.delayInitialFocusTimer=u.delayInitialFocus?rt(function(){C(N())}):C(N()),n.addEventListener("focusin",G,!0),n.addEventListener("mousedown",$,{capture:!0,passive:!1}),n.addEventListener("touchstart",$,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",W,{capture:!0,passive:!1}),n.addEventListener("keydown",X),m},S=function(){if(c.active)return n.removeEventListener("focusin",G,!0),n.removeEventListener("mousedown",$,!0),n.removeEventListener("touchstart",$,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",W,!0),n.removeEventListener("keydown",X),m},R=function(d){var f=d.some(function(v){var p=Array.from(v.removedNodes);return p.some(function(k){return k===c.mostRecentlyFocusedNode})});f&&C(N())},M=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(R):void 0,L=function(){M&&(M.disconnect(),c.active&&!c.paused&&c.containers.map(function(d){M.observe(d,{subtree:!0,childList:!0})}))};return m={get active(){return c.active},get paused(){return c.paused},activate:function(d){if(c.active)return this;var f=y(d,"onActivate"),v=y(d,"onPostActivate"),p=y(d,"checkCanFocusTrap");p||I(),c.active=!0,c.paused=!1,c.nodeFocusedBeforeActivation=O(n),f==null||f();var k=function(){p&&I(),Z(),L(),v==null||v()};return p?(p(c.containers.concat()).then(k,k),this):(k(),this)},deactivate:function(d){if(!c.active)return this;var f=nt({onDeactivate:u.onDeactivate,onPostDeactivate:u.onPostDeactivate,checkCanReturnFocus:u.checkCanReturnFocus},d);clearTimeout(c.delayInitialFocusTimer),c.delayInitialFocusTimer=void 0,S(),c.active=!1,c.paused=!1,L(),ot.deactivateTrap(s,m);var v=y(f,"onDeactivate"),p=y(f,"onPostDeactivate"),k=y(f,"checkCanReturnFocus"),b=y(f,"returnFocus","returnFocusOnDeactivate");v==null||v();var w=function(){rt(function(){b&&C(x(c.nodeFocusedBeforeActivation)),p==null||p()})};return b&&k?(k(x(c.nodeFocusedBeforeActivation)).then(w,w),this):(w(),this)},pause:function(d){return c.active?(c.manuallyPaused=!0,this._setPausedState(!0,d)):this},unpause:function(d){return c.active?(c.manuallyPaused=!1,s[s.length-1]!==this?this:this._setPausedState(!1,d)):this},updateContainerElements:function(d){var f=[].concat(d).filter(Boolean);return c.containers=f.map(function(v){return typeof v=="string"?n.querySelector(v):v}),c.active&&I(),L(),this}},Object.defineProperties(m,{_isManuallyPaused:{value:function(){return c.manuallyPaused}},_setPausedState:{value:function(d,f){if(c.paused===d)return this;if(c.paused=d,d){var v=y(f,"onPause"),p=y(f,"onPostPause");v==null||v(),S(),L(),p==null||p()}else{var k=y(f,"onUnpause"),b=y(f,"onPostUnpause");k==null||k(),I(),Z(),L(),b==null||b()}return this}}}),m.updateContainerElements(a),m};/*!
|
|
9
|
-
* focus-trap-vue v4.0.
|
|
10
|
-
* (c)
|
|
9
|
+
* focus-trap-vue v4.0.3
|
|
10
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
11
11
|
* @license MIT
|
|
12
|
-
*/function sr(o){return o}const Ja={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},Qa=e.defineComponent({props:Object.assign({active:{type:Boolean,default:!0}},Ja),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(o,{slots:a,emit:r}){let n;const s=e.ref(null),u=e.computed(()=>{const m=s.value;return m&&(m instanceof HTMLElement?m:m.$el)});function c(){return n||(n=Ya(u.value,{escapeDeactivates:o.escapeDeactivates,allowOutsideClick:o.allowOutsideClick,returnFocusOnDeactivate:o.returnFocusOnDeactivate,clickOutsideDeactivates:o.clickOutsideDeactivates,onActivate:()=>{r("update:active",!0),r("activate")},onDeactivate:()=>{r("update:active",!1),r("deactivate")},onPostActivate:()=>r("postActivate"),onPostDeactivate:()=>r("postDeactivate"),initialFocus:o.initialFocus,fallbackFocus:o.fallbackFocus,tabbableOptions:o.tabbableOptions,delayInitialFocus:o.delayInitialFocus,preventScroll:o.preventScroll}))}return e.onMounted(()=>{e.watch(()=>o.active,m=>{m&&u.value?c().activate():n&&(n.deactivate(),(!u.value||u.value.nodeType===Node.COMMENT_NODE)&&(n=null))},{immediate:!0,flush:"post"})}),e.onUnmounted(()=>{n&&n.deactivate(),n=null}),{activate(){c().activate()},deactivate(){n&&n.deactivate()},renderImpl(){if(!a.default)return null;const m=a.default().filter(E=>E.type!==e.Comment);return!m||!m.length||m.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),m):e.cloneVNode(m[0],{ref:s})}}}});function it(){return{debounce:(a,r)=>{let n;return(...s)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{a(...s)},r)}}}}var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function en(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Se={exports:{}};Se.exports,function(o,a){var r=200,n="__lodash_hash_undefined__",s=9007199254740991,u="[object Arguments]",c="[object Array]",m="[object Boolean]",y="[object Date]",E="[object Error]",B="[object Function]",N="[object GeneratorFunction]",I="[object Map]",O="[object Number]",C="[object Object]",x="[object Promise]",D="[object RegExp]",$="[object Set]",G="[object String]",q="[object Symbol]",W="[object WeakMap]",X="[object ArrayBuffer]",j="[object DataView]",Z="[object Float32Array]",S="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",_="[object Uint8Array]",d="[object Uint8ClampedArray]",f="[object Uint16Array]",v="[object Uint32Array]",p=/[\\^$.*+?()[\]{}|]/g,k=/\w*$/,b=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,g={};g[u]=g[c]=g[X]=g[j]=g[m]=g[y]=g[Z]=g[S]=g[R]=g[M]=g[L]=g[I]=g[O]=g[C]=g[D]=g[$]=g[G]=g[q]=g[_]=g[d]=g[f]=g[v]=!0,g[E]=g[B]=g[W]=!1;var T=typeof Ce=="object"&&Ce&&Ce.Object===Object&&Ce,F=typeof self=="object"&&self&&self.Object===Object&&self,P=T||F||Function("return this")(),U=a&&!a.nodeType&&a,Q=U&&!0&&o&&!o.nodeType&&o,_e=Q&&Q.exports===U;function me(t,i){return t.set(i[0],i[1]),t}function pe(t,i){return t.add(i),t}function jn(t,i){for(var l=-1,h=t?t.length:0;++l<h&&i(t[l],l,t)!==!1;);return t}function Zn(t,i){for(var l=-1,h=i.length,V=t.length;++l<h;)t[V+l]=i[l];return t}function dt(t,i,l,h){for(var V=-1,K=t?t.length:0;++V<K;)l=i(l,t[V],V,t);return l}function Kn(t,i){for(var l=-1,h=Array(t);++l<t;)h[l]=i(l);return h}function Hn(t,i){return t==null?void 0:t[i]}function ut(t){var i=!1;if(t!=null&&typeof t.toString!="function")try{i=!!(t+"")}catch{}return i}function ft(t){var i=-1,l=Array(t.size);return t.forEach(function(h,V){l[++i]=[V,h]}),l}function xe(t,i){return function(l){return t(i(l))}}function mt(t){var i=-1,l=Array(t.size);return t.forEach(function(h){l[++i]=h}),l}var zn=Array.prototype,Wn=Function.prototype,Ne=Object.prototype,Re=P["__core-js_shared__"],pt=function(){var t=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),bt=Wn.toString,ee=Ne.hasOwnProperty,Be=Ne.toString,Un=RegExp("^"+bt.call(ee).replace(p,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=_e?P.Buffer:void 0,gt=P.Symbol,yt=P.Uint8Array,Gn=xe(Object.getPrototypeOf,Object),qn=Object.create,Xn=Ne.propertyIsEnumerable,Yn=zn.splice,vt=Object.getOwnPropertySymbols,Jn=ht?ht.isBuffer:void 0,Qn=xe(Object.keys,Object),Le=le(P,"DataView"),be=le(P,"Map"),Me=le(P,"Promise"),Pe=le(P,"Set"),je=le(P,"WeakMap"),he=le(Object,"create"),eo=re(Le),to=re(be),ao=re(Me),no=re(Pe),oo=re(je),kt=gt?gt.prototype:void 0,wt=kt?kt.valueOf:void 0;function ne(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var h=t[i];this.set(h[0],h[1])}}function ro(){this.__data__=he?he(null):{}}function io(t){return this.has(t)&&delete this.__data__[t]}function co(t){var i=this.__data__;if(he){var l=i[t];return l===n?void 0:l}return ee.call(i,t)?i[t]:void 0}function so(t){var i=this.__data__;return he?i[t]!==void 0:ee.call(i,t)}function lo(t,i){var l=this.__data__;return l[t]=he&&i===void 0?n:i,this}ne.prototype.clear=ro,ne.prototype.delete=io,ne.prototype.get=co,ne.prototype.has=so,ne.prototype.set=lo;function Y(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var h=t[i];this.set(h[0],h[1])}}function uo(){this.__data__=[]}function fo(t){var i=this.__data__,l=Te(i,t);if(l<0)return!1;var h=i.length-1;return l==h?i.pop():Yn.call(i,l,1),!0}function mo(t){var i=this.__data__,l=Te(i,t);return l<0?void 0:i[l][1]}function po(t){return Te(this.__data__,t)>-1}function bo(t,i){var l=this.__data__,h=Te(l,t);return h<0?l.push([t,i]):l[h][1]=i,this}Y.prototype.clear=uo,Y.prototype.delete=fo,Y.prototype.get=mo,Y.prototype.has=po,Y.prototype.set=bo;function ce(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var h=t[i];this.set(h[0],h[1])}}function ho(){this.__data__={hash:new ne,map:new(be||Y),string:new ne}}function go(t){return Ie(this,t).delete(t)}function yo(t){return Ie(this,t).get(t)}function vo(t){return Ie(this,t).has(t)}function ko(t,i){return Ie(this,t).set(t,i),this}ce.prototype.clear=ho,ce.prototype.delete=go,ce.prototype.get=yo,ce.prototype.has=vo,ce.prototype.set=ko;function se(t){this.__data__=new Y(t)}function wo(){this.__data__=new Y}function Co(t){return this.__data__.delete(t)}function So(t){return this.__data__.get(t)}function Eo(t){return this.__data__.has(t)}function _o(t,i){var l=this.__data__;if(l instanceof Y){var h=l.__data__;if(!be||h.length<r-1)return h.push([t,i]),this;l=this.__data__=new ce(h)}return l.set(t,i),this}se.prototype.clear=wo,se.prototype.delete=Co,se.prototype.get=So,se.prototype.has=Eo,se.prototype.set=_o;function No(t,i){var l=He(t)||Xo(t)?Kn(t.length,String):[],h=l.length,V=!!h;for(var K in t)ee.call(t,K)&&!(V&&(K=="length"||Wo(K,h)))&&l.push(K);return l}function Ct(t,i,l){var h=t[i];(!(ee.call(t,i)&&Nt(h,l))||l===void 0&&!(i in t))&&(t[i]=l)}function Te(t,i){for(var l=t.length;l--;)if(Nt(t[l][0],i))return l;return-1}function Bo(t,i){return t&&St(i,ze(i),t)}function Ze(t,i,l,h,V,K,J){var H;if(h&&(H=K?h(t,V,K,J):h(t)),H!==void 0)return H;if(!$e(t))return t;var It=He(t);if(It){if(H=Ko(t),!i)return Po(t,H)}else{var de=oe(t),$t=de==B||de==N;if(Jo(t))return Fo(t,i);if(de==C||de==u||$t&&!K){if(ut(t))return K?t:{};if(H=Ho($t?{}:t),!i)return jo(t,Bo(H,t))}else{if(!g[de])return K?t:{};H=zo(t,de,Ze,i)}}J||(J=new se);var Ot=J.get(t);if(Ot)return Ot;if(J.set(t,H),!It)var At=l?Zo(t):ze(t);return jn(At||t,function(We,Oe){At&&(Oe=We,We=t[Oe]),Ct(H,Oe,Ze(We,i,l,h,Oe,t,J))}),H}function To(t){return $e(t)?qn(t):{}}function Io(t,i,l){var h=i(t);return He(t)?h:Zn(h,l(t))}function $o(t){return Be.call(t)}function Oo(t){if(!$e(t)||Go(t))return!1;var i=Tt(t)||ut(t)?Un:b;return i.test(re(t))}function Ao(t){if(!_t(t))return Qn(t);var i=[];for(var l in Object(t))ee.call(t,l)&&l!="constructor"&&i.push(l);return i}function Fo(t,i){if(i)return t.slice();var l=new t.constructor(t.length);return t.copy(l),l}function Ke(t){var i=new t.constructor(t.byteLength);return new yt(i).set(new yt(t)),i}function Do(t,i){var l=i?Ke(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.byteLength)}function Vo(t,i,l){var h=i?l(ft(t),!0):ft(t);return dt(h,me,new t.constructor)}function xo(t){var i=new t.constructor(t.source,k.exec(t));return i.lastIndex=t.lastIndex,i}function Ro(t,i,l){var h=i?l(mt(t),!0):mt(t);return dt(h,pe,new t.constructor)}function Lo(t){return wt?Object(wt.call(t)):{}}function Mo(t,i){var l=i?Ke(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.length)}function Po(t,i){var l=-1,h=t.length;for(i||(i=Array(h));++l<h;)i[l]=t[l];return i}function St(t,i,l,h){l||(l={});for(var V=-1,K=i.length;++V<K;){var J=i[V],H=void 0;Ct(l,J,H===void 0?t[J]:H)}return l}function jo(t,i){return St(t,Et(t),i)}function Zo(t){return Io(t,ze,Et)}function Ie(t,i){var l=t.__data__;return Uo(i)?l[typeof i=="string"?"string":"hash"]:l.map}function le(t,i){var l=Hn(t,i);return Oo(l)?l:void 0}var Et=vt?xe(vt,Object):tr,oe=$o;(Le&&oe(new Le(new ArrayBuffer(1)))!=j||be&&oe(new be)!=I||Me&&oe(Me.resolve())!=x||Pe&&oe(new Pe)!=$||je&&oe(new je)!=W)&&(oe=function(t){var i=Be.call(t),l=i==C?t.constructor:void 0,h=l?re(l):void 0;if(h)switch(h){case eo:return j;case to:return I;case ao:return x;case no:return $;case oo:return W}return i});function Ko(t){var i=t.length,l=t.constructor(i);return i&&typeof t[0]=="string"&&ee.call(t,"index")&&(l.index=t.index,l.input=t.input),l}function Ho(t){return typeof t.constructor=="function"&&!_t(t)?To(Gn(t)):{}}function zo(t,i,l,h){var V=t.constructor;switch(i){case X:return Ke(t);case m:case y:return new V(+t);case j:return Do(t,h);case Z:case S:case R:case M:case L:case _:case d:case f:case v:return Mo(t,h);case I:return Vo(t,h,l);case O:case G:return new V(t);case D:return xo(t);case $:return Ro(t,h,l);case q:return Lo(t)}}function Wo(t,i){return i=i??s,!!i&&(typeof t=="number"||w.test(t))&&t>-1&&t%1==0&&t<i}function Uo(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}function Go(t){return!!pt&&pt in t}function _t(t){var i=t&&t.constructor,l=typeof i=="function"&&i.prototype||Ne;return t===l}function re(t){if(t!=null){try{return bt.call(t)}catch{}try{return t+""}catch{}}return""}function qo(t){return Ze(t,!0,!0)}function Nt(t,i){return t===i||t!==t&&i!==i}function Xo(t){return Yo(t)&&ee.call(t,"callee")&&(!Xn.call(t,"callee")||Be.call(t)==u)}var He=Array.isArray;function Bt(t){return t!=null&&Qo(t.length)&&!Tt(t)}function Yo(t){return er(t)&&Bt(t)}var Jo=Jn||ar;function Tt(t){var i=$e(t)?Be.call(t):"";return i==B||i==N}function Qo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=s}function $e(t){var i=typeof t;return!!t&&(i=="object"||i=="function")}function er(t){return!!t&&typeof t=="object"}function ze(t){return Bt(t)?No(t):Ao(t)}function tr(){return[]}function ar(){return!1}o.exports=qo}(Se,Se.exports);var tn=Se.exports;const an=en(tn),nn={key:0,class:"sidebar-header"},on={class:"sidebar-content-container"},rn={key:0,class:"sidebar-top"},cn={"aria-label":"Main menu"},sn=["id"],ln=["aria-labelledby"],dn={key:1,class:"sidebar-level-divider",role:"separator"},un={key:2,class:"level-primary bottom-items"},fn={class:"sidebar-footer"},Ee="_ungrouped",ct=z(e.defineComponent({__name:"AppSidebar",props:{topItems:{type:Array,default:()=>[]},bottomItems:{type:Array,default:()=>[]},headerHeight:{type:Number,default:60},topOffset:{type:Number,default:0},zIndex:{type:Number,default:3},open:{type:Boolean,default:!1},mobileEnabled:{type:Boolean,default:!1},mobileTopOffset:{type:Number,default:0},mobileHeaderVisible:{type:Boolean,default:!1},mobileCloseDelay:{type:Number,default:350},mobileOverlay:{type:Boolean,default:!0},mobileOverlayZIndex:{type:Number,default:null},mobileOverlayCloseOnClick:{type:Boolean,default:!0}},emits:["click","toggle"],setup(o,{emit:a}){e.useCssVars(p=>({f4fb3cae:m.value.mobileHeight,"0a139013":m.value.mobileTop,"52aa6542":o.zIndex,"30e65667":m.value.height,"546c0415":m.value.top,f7e0f72e:E.value.marginTop,"1392bb60":f.value,"633f46fa":y.value.display,bdfa14cc:y.value.minHeight,50713838:B.value.top,74679389:B.value.zIndex}));const r=a,n=o,s=e.useSlots(),u=e.computed(()=>!!s.header),c=e.computed(()=>!!s.top),m=e.computed(()=>({mobileTop:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:n.topOffset?`${n.topOffset}px`:"0",top:n.topOffset?`${n.topOffset}px`:"0",mobileHeight:n.mobileTopOffset&&n.mobileEnabled?`calc(100% - ${n.mobileTopOffset}px)`:"100%",height:n.topOffset?`calc(100% - ${n.topOffset}px)`:"100%"})),y=e.computed(()=>({display:!n.mobileHeaderVisible&&n.mobileEnabled?"none":"flex",minHeight:`${n.headerHeight}px`})),E=e.computed(()=>({marginTop:u.value?`${n.headerHeight}px`:"0"})),B=e.computed(()=>({top:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:"0",zIndex:n.mobileOverlayZIndex!==null?n.mobileOverlayZIndex:n.zIndex>1?n.zIndex-1:1})),N=p=>an(p).map(b=>{var w,g,T;if(b){(!b.key||!((w=b.key)!=null&&w.trim()))&&(b.key=String(b.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-")),(!b.testId||!((g=b.testId)!=null&&g.trim()))&&(b.testId=String(b.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"));for(const F of b.items||[])F.parentKey=b.key,(!F.testId||!((T=F.testId)!=null&&T.trim()))&&(F.testId=String(F.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"))}return b}),I=e.computed(()=>n.topItems.length?N(n.topItems):[]),O=e.computed(()=>n.bottomItems.length?N(n.bottomItems):[]),C=(p="")=>p.trim().replace(" ","").replace(/[^a-z0-9]+/gi,"-").toLowerCase(),x=e.computed(()=>{var k;const p=new Map;p.set(Ee,[]);for(const b of I.value){const w=b.group||Ee;p.has(w)||p.set(w,[]),(k=p.get(w))==null||k.push(b)}return p}),D=e.ref(n.open),$=p=>{var k,b;D.value!==p&&(D.value=p,r("toggle",p)),p?(k=document==null?void 0:document.body)==null||k.classList.add("kong-ui-app-sidebar-open"):(b=document==null?void 0:document.body)==null||b.classList.remove("kong-ui-app-sidebar-open"),q.value=!1},G=()=>{n.mobileOverlayCloseOnClick&&$(!1)},q=e.ref(!1),W=p=>{q.value=!0,r("click",p),setTimeout(()=>{$(!1)},n.mobileCloseDelay)};e.watch(()=>n.open,p=>{$(p)});const{debounce:X}=it(),j=X(()=>{D.value&&Z.value!==(window==null?void 0:window.innerWidth)&&(Z.value=window==null?void 0:window.innerWidth,$(!1))},200),Z=e.ref(),S=e.ref(!1),R=e.ref(),M=()=>{S.value||(S.value=!0,clearTimeout(R.value),R.value=setTimeout(()=>S.value=!1,1300))},L=e.ref(null),_=e.computed(()=>D.value&&n.mobileEnabled),d=async p=>{var k,b;p?(await e.nextTick(),await new Promise(w=>setTimeout(w,300)),(k=L.value)==null||k.activate()):(b=L.value)==null||b.deactivate()};e.watch(_,async p=>{p?await d(!0):await d(!1)},{immediate:!0});const f=e.ref("0px"),v=()=>{var F;if(!(/Mac|iPhone|iPod|iPad/i.test(navigator==null?void 0:navigator.platform)||/macOS|Mac|iPhone|iPod|iPad/i.test((F=navigator==null?void 0:navigator.userAgentData)==null?void 0:F.platform)))return;const k=document.createElement("div");k.style.visibility="hidden",k.style.width="100px",document.body.appendChild(k);const b=k.offsetWidth;k.style.overflow="scroll";const w=document.createElement("div");w.style.width="100%",k.appendChild(w);const g=w.offsetWidth;k.parentNode&&k.parentNode.removeChild(k),b-g===0&&(f.value="8px")};return e.onMounted(async()=>{Z.value=window==null?void 0:window.innerWidth,window.addEventListener("resize",j),window.addEventListener("resize",M),await e.nextTick(),v()}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",j),window.removeEventListener("resize",M)}),(p,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.value&&o.mobileOverlay&&o.mobileEnabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"kong-ui-app-sidebar-overlay",onClick:G})):e.createCommentVNode("",!0),e.createVNode(e.unref(Qa),{ref_key:"focusTrap",ref:L,active:!1,"allow-outside-click":"","fallback-focus":".kong-ui-app-sidebar"},{default:e.withCtx(()=>[e.createElementVNode("aside",{class:e.normalizeClass(["kong-ui-app-sidebar",{"sidebar-open":D.value,"no-sidebar-header":!u.value,"mobile-header-hidden":o.mobileEnabled&&(!u.value||!o.mobileHeaderVisible),"mobile-disabled":!o.mobileEnabled,"disable-transitions":S.value}]),tabindex:"-1"},[u.value?(e.openBlock(),e.createElementBlock("div",nn,[e.renderSlot(p.$slots,"header",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",on,[c.value?(e.openBlock(),e.createElementBlock("div",rn,[e.renderSlot(p.$slots,"top",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("nav",cn,[x.value.size>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(x.value,([b,w])=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b},[b!==Ee?(e.openBlock(),e.createElementBlock("div",{key:0,id:`level-primary-group-${C(b)}`,class:"level-primary-group-name","data-testid":"level-primary-group-name",role:"presentation"},e.toDisplayString(b),9,sn)):e.createCommentVNode("",!0),e.createElementVNode("ul",{"aria-labelledby":b!==Ee?`level-primary-group-${C(b)}`:void 0,class:"level-primary top-items"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w,g=>(e.openBlock(),e.createBlock(Ge,{key:g.name,item:g,onClick:W},{[`sidebar-icon-${g.key}`]:e.withCtx(()=>[e.renderSlot(p.$slots,`sidebar-icon-${g.key}`,{},void 0,!0)]),_:2},1032,["item"]))),128))],8,ln)],64))),128)):e.createCommentVNode("",!0),x.value.size>0&&O.value.length?(e.openBlock(),e.createElementBlock("div",dn)):e.createCommentVNode("",!0),O.value.length?(e.openBlock(),e.createElementBlock("ul",un,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,b=>(e.openBlock(),e.createBlock(Ge,{key:b.name,item:b,onClick:W},{[`sidebar-icon-${b.key}`]:e.withCtx(()=>[e.renderSlot(p.$slots,`sidebar-icon-${b.key}`,{},void 0,!0)]),_:2},1032,["item"]))),128))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",fn,[e.renderSlot(p.$slots,"footer",{},void 0,!0)])],2)]),_:3},512)],64))}}),[["__scopeId","data-v-2505f054"]]),mn=["aria-label"],st=z(e.defineComponent({__name:"SidebarToggle",props:{active:{type:Boolean,default:!1}},emits:["toggle"],setup(o,{emit:a}){const r=a,n=o,s=e.ref(n.active||!1),u=c=>{c.preventDefault(),s.value=!s.value,r("toggle",s.value)};return e.watch(()=>n.active,c=>{s.value=c}),(c,m)=>(e.openBlock(),e.createElementBlock("a",{"aria-haspopup":"true","aria-label":s.value?"Close Main Menu":"Open Main Menu",class:e.normalizeClass(["sidebar-menu-toggle",{active:s.value}]),href:"#",role:"button",onClick:e.withModifiers(u,["prevent"])},m[0]||(m[0]=[e.createElementVNode("span",{class:"line"},null,-1),e.createElementVNode("span",{class:"line"},null,-1),e.createElementVNode("span",{class:"line"},null,-1)]),10,mn))}}),[["__scopeId","data-v-cbb41bbd"]]),pn="#ffffff",bn="#000933",hn="#000933",gn="#ffffff",yn="0px",vn="4px",kn={id:"kong-ui-app-layout-notification"},wn={class:"mobile-logo"},Cn={key:0,class:"navbar-logo"},Sn={class:"kong-ui-app-layout-main","data-testid":"kong-ui-app-layout-main"},En={class:"kong-ui-app-layout-content"},_n={class:"kong-ui-app-layout-content-inner"},lt=z(e.defineComponent({__name:"AppLayout",props:{hideDefaultSlot:{type:Boolean,default:!1},navbarHidden:{type:Boolean,default:!1},sidebarHidden:{type:Boolean,default:!1},sidebarOpen:{type:Boolean,default:!1},sidebarTopItems:{type:Array,default:()=>[]},sidebarBottomItems:{type:Array,default:()=>[]},theme:{type:String,default:"light",validator:o=>["light","dark"].includes(o)}},emits:["sidebar-click","update:topOffset"],setup(o,{emit:a}){e.useCssVars(S=>({"2235c6e4":$.value,"29d04344":G.value,"3d470f48":D.value,"81803d80":q.value,"64da7a33":W.value}));const r=o,n=a,s=e.useSlots(),u=e.reactive({navbarLeft:e.computed(()=>!!s["navbar-left"]),navbarCenter:e.computed(()=>!!s["navbar-center"]),navbarRight:e.computed(()=>!!s["navbar-right"]),navbarLogo:e.computed(()=>!!s["navbar-logo"]),navbarMobileLogo:e.computed(()=>!!s["navbar-mobile-logo"]),sidebarHeader:e.computed(()=>!!s["sidebar-header"]),sidebarTop:e.computed(()=>!!s["sidebar-top"]),sidebarFooter:e.computed(()=>!!s["sidebar-footer"])}),c=e.computed(()=>r.hideDefaultSlot),m=e.reactive({hidden:e.computed(()=>r.navbarHidden)}),y=e.reactive({topItems:e.computed(()=>r.sidebarTopItems),bottomItems:e.computed(()=>r.sidebarBottomItems),open:e.computed(()=>r.sidebarOpen),hidden:e.computed(()=>r.sidebarHidden)}),E=S=>{n("sidebar-click",S)},B=e.ref(!1),N=S=>{B.value=S};e.watchEffect(()=>{B.value=e.toRef(y,"open").value||!1});const I=e.ref(0),O=e.ref(60),C=e.ref(0),x=e.computed(()=>m.hidden?C.value:O.value+C.value),D=e.computed(()=>r.theme==="light"?hn:gn),$=e.computed(()=>r.theme==="light"?pn:bn),G=e.computed(()=>r.theme==="light"?"var(--kong-ui-app-layout-main-box-shadow, -30px 174px 250px #0023db)":"none"),q=e.computed(()=>`${x.value}px`),W=e.computed(()=>y.hidden||m.hidden?yn:vn),{debounce:X}=it(),j=X((S=!1)=>{if(S||I.value!==(window==null?void 0:window.innerWidth)){I.value=window==null?void 0:window.innerWidth;const R=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");R&&(C.value=R.offsetHeight)}},200),Z=e.ref();return e.watch(C,S=>{n("update:topOffset",S||0)},{immediate:!0}),e.onMounted(()=>{var R,M;(R=document==null?void 0:document.body)==null||R.classList.add("kong-ui-app-layout-body"),(M=document==null?void 0:document.documentElement)==null||M.classList.add("kong-ui-app-layout-html"),I.value=window==null?void 0:window.innerWidth,j(!0);const S=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");S&&(Z.value=new ResizeObserver(L=>{window.requestAnimationFrame(()=>{if(!(!Array.isArray(L)||!L.length))for(const _ of L){const d=_.contentRect.height;C.value!==d&&(C.value=d)}})}),Z.value.observe(S)),window.addEventListener("resize",j)}),e.onBeforeUnmount(()=>{Z.value&&Z.value.disconnect(),window.removeEventListener("resize",j)}),(S,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-app-layout",[{"navbar-hidden":m.hidden},{"sidebar-hidden":y.hidden}]])},[e.createElementVNode("div",kn,[e.renderSlot(S.$slots,"notification",{},void 0,!0)]),m.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue,{key:String(y.hidden),"left-offset":y.hidden?0:void 0,"top-offset":C.value},e.createSlots({"mobile-sidebar-toggle":e.withCtx(()=>[y.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(st,{key:0,active:B.value,onToggle:N},null,8,["active"]))]),_:2},[u.navbarMobileLogo?{name:"mobile-logo",fn:e.withCtx(()=>[e.createElementVNode("div",wn,[e.renderSlot(S.$slots,"navbar-mobile-logo",{},void 0,!0)])]),key:"0"}:void 0,u.navbarLogo?{name:"logo",fn:e.withCtx(()=>[y.hidden?(e.openBlock(),e.createElementBlock("div",Cn,[e.renderSlot(S.$slots,"navbar-logo",{},void 0,!0)])):e.createCommentVNode("",!0)]),key:"1"}:void 0,u.navbarLeft?{name:"left",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-left",{},void 0,!0)]),key:"2"}:void 0,u.navbarCenter?{name:"center",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-center",{},void 0,!0)]),key:"3"}:void 0,u.navbarRight?{name:"right",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-right",{},void 0,!0)]),key:"4"}:void 0]),1032,["left-offset","top-offset"])),y.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ct,{key:1,"bottom-items":y.bottomItems,"header-height":O.value,"mobile-enabled":"","mobile-header-visible":!1,"mobile-top-offset":x.value,open:B.value,"top-items":y.topItems,"top-offset":C.value,onClick:E,onToggle:N},e.createSlots({_:2},[u.sidebarHeader?{name:"header",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-header",{},void 0,!0)]),key:"0"}:void 0,u.sidebarTop?{name:"top",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-top",{},void 0,!0)]),key:"1"}:void 0,u.sidebarFooter?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-footer",{},void 0,!0)]),key:"2"}:void 0,e.renderList([...y.topItems||[],...y.bottomItems||[]],M=>({name:`sidebar-icon-${M.key}`,fn:e.withCtx(()=>[e.renderSlot(S.$slots,`sidebar-icon-${M.key}`,{},void 0,!0)])}))]),1032,["bottom-items","header-height","mobile-top-offset","open","top-items","top-offset"])),e.createElementVNode("main",Sn,[e.createElementVNode("div",En,[e.createElementVNode("div",_n,[R[0]||(R[0]=e.createElementVNode("div",{id:"kong-ui-app-layout-teleport-default-slot"},null,-1)),e.renderSlot(S.$slots,"app-error",{},void 0,!0),c.value?e.createCommentVNode("",!0):e.renderSlot(S.$slots,"default",{key:0},void 0,!0)])])])],2))}}),[["__scopeId","data-v-8e8c270a"]]),Nn={class:"kong-ui-app-page-header"},Bn={key:0,class:"page-header-breadcrumbs","data-testid":"page-header-breadcrumbs"},Tn={class:"page-header-title-section"},In={class:"page-header-title-wrapper"},$n={key:0,class:"page-header-title-before","data-testid":"page-header-title-before"},On=["title"],An={key:1,class:"page-header-title-after","data-testid":"page-header-title-after"},Fn={key:0,class:"page-header-actions","data-testid":"page-header-actions"},Dn={key:1,class:"page-header-section-below","data-testid":"page-header-section-below"},Vn=z(e.defineComponent({__name:"AppPageHeader",props:{title:{type:String,default:""},breadcrumbs:{type:Array,default:()=>[]}},setup(o){const a=o,r=e.useSlots(),n=e.computed(()=>{var u;return!!((u=a.breadcrumbs)!=null&&u.length)}),s=e.computed(()=>Object.keys(r).filter(u=>u.startsWith("icon-")));return(u,c)=>{const m=e.resolveComponent("KBreadcrumbs");return e.openBlock(),e.createElementBlock("div",Nn,[n.value?(e.openBlock(),e.createElementBlock("div",Bn,[e.createVNode(m,{"item-max-width":"150",items:o.breadcrumbs},e.createSlots({_:2},[e.renderList(s.value,y=>({name:y,fn:e.withCtx(()=>[e.renderSlot(u.$slots,y,{},void 0,!0)])}))]),1032,["items"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Tn,[e.createElementVNode("div",In,[u.$slots["title-before"]?(e.openBlock(),e.createElementBlock("div",$n,[e.renderSlot(u.$slots,"title-before",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("h1",{class:"page-header-title","data-testid":"page-header-title",title:o.title},e.toDisplayString(o.title),9,On),u.$slots["title-after"]?(e.openBlock(),e.createElementBlock("div",An,[e.renderSlot(u.$slots,"title-after",{},void 0,!0)])):e.createCommentVNode("",!0)]),u.$slots.actions?(e.openBlock(),e.createElementBlock("div",Fn,[e.renderSlot(u.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),u.$slots.below?(e.openBlock(),e.createElementBlock("div",Dn,[e.renderSlot(u.$slots,"below",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-204b7f98"]]),xn={class:"app-page-info-section-default-header"},Rn={key:1,class:"app-page-info-section-description","data-testid":"app-page-info-section-description"},Ln={key:0,class:"app-page-info-section-content","data-testid":"app-page-info-section-content"},Mn=z(e.defineComponent({__name:"AppPageInfoSection",props:{collapsible:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""},titleTag:{type:String,default:"div",validator:o=>Dt.HeaderTags.includes(o)}},setup(o){return(a,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.collapsible?"details":"div"),{class:"app-page-info-section","data-testid":"app-page-info-section"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.collapsible?"summary":"div"),{class:"app-page-info-section-header","data-testid":"app-page-info-section-header"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"header",{},()=>[e.createElementVNode("div",xn,[o.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.titleTag),{key:0,class:"app-page-info-section-title","data-testid":"app-page-info-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]),_:1})):e.createCommentVNode("",!0),o.description?(e.openBlock(),e.createElementBlock("div",Rn,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0)])]),o.collapsible?(e.openBlock(),e.createBlock(e.unref(Ft.ChevronRightIcon),{key:0,class:"app-page-info-section-chevron-icon",decorative:""})):a.$slots.actions?e.renderSlot(a.$slots,"actions",{key:1}):e.createCommentVNode("",!0)]),_:3})),a.$slots.default?(e.openBlock(),e.createElementBlock("div",Ln,[e.renderSlot(a.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-62f17e32"]]),Pn={install:(o,a={})=>{o.component(a.name||"AppLayout",lt)}};A.AccountDropdown=xt,A.AppAboutSection=qt,A.AppError=na,A.AppLayout=lt,A.AppNavbar=Ue,A.AppPageHeader=Vn,A.AppPageInfoSection=Mn,A.AppSidebar=ct,A.SidebarToggle=st,A.default=Pn,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
12
|
+
*/function sr(o){return o}const Ja={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},Qa=e.defineComponent({name:"FocusTrap",props:Object.assign({active:{type:Boolean,default:!0}},Ja),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(o,{slots:a,emit:r}){let n;const s=e.ref(null),u=e.computed(()=>{const m=s.value;return m&&(m instanceof HTMLElement?m:m.$el)});function c(){return n||(n=Ya(u.value,{escapeDeactivates:o.escapeDeactivates,allowOutsideClick:o.allowOutsideClick,returnFocusOnDeactivate:o.returnFocusOnDeactivate,clickOutsideDeactivates:o.clickOutsideDeactivates,onActivate:()=>{r("update:active",!0),r("activate")},onDeactivate:()=>{r("update:active",!1),r("deactivate")},onPostActivate:()=>r("postActivate"),onPostDeactivate:()=>r("postDeactivate"),initialFocus:o.initialFocus,fallbackFocus:o.fallbackFocus,tabbableOptions:o.tabbableOptions,delayInitialFocus:o.delayInitialFocus,preventScroll:o.preventScroll}))}return e.onMounted(()=>{e.watch(()=>o.active,m=>{m&&u.value?c().activate():n&&(n.deactivate(),(!u.value||u.value.nodeType===Node.COMMENT_NODE)&&(n=null))},{immediate:!0,flush:"post"})}),e.onUnmounted(()=>{n&&n.deactivate(),n=null}),{activate(){c().activate()},deactivate(){n&&n.deactivate()},renderImpl(){if(!a.default)return null;const m=a.default().filter(E=>E.type!==e.Comment);return!m||!m.length||m.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),m):e.cloneVNode(m[0],{ref:s})}}}});function it(){return{debounce:(a,r)=>{let n;return(...s)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{a(...s)},r)}}}}var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function en(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Se={exports:{}};Se.exports,function(o,a){var r=200,n="__lodash_hash_undefined__",s=9007199254740991,u="[object Arguments]",c="[object Array]",m="[object Boolean]",y="[object Date]",E="[object Error]",B="[object Function]",N="[object GeneratorFunction]",I="[object Map]",O="[object Number]",C="[object Object]",x="[object Promise]",D="[object RegExp]",$="[object Set]",G="[object String]",q="[object Symbol]",W="[object WeakMap]",X="[object ArrayBuffer]",j="[object DataView]",Z="[object Float32Array]",S="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",_="[object Uint8Array]",d="[object Uint8ClampedArray]",f="[object Uint16Array]",v="[object Uint32Array]",p=/[\\^$.*+?()[\]{}|]/g,k=/\w*$/,b=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,g={};g[u]=g[c]=g[X]=g[j]=g[m]=g[y]=g[Z]=g[S]=g[R]=g[M]=g[L]=g[I]=g[O]=g[C]=g[D]=g[$]=g[G]=g[q]=g[_]=g[d]=g[f]=g[v]=!0,g[E]=g[B]=g[W]=!1;var T=typeof Ce=="object"&&Ce&&Ce.Object===Object&&Ce,F=typeof self=="object"&&self&&self.Object===Object&&self,P=T||F||Function("return this")(),U=a&&!a.nodeType&&a,Q=U&&!0&&o&&!o.nodeType&&o,_e=Q&&Q.exports===U;function me(t,i){return t.set(i[0],i[1]),t}function pe(t,i){return t.add(i),t}function jn(t,i){for(var l=-1,h=t?t.length:0;++l<h&&i(t[l],l,t)!==!1;);return t}function Zn(t,i){for(var l=-1,h=i.length,V=t.length;++l<h;)t[V+l]=i[l];return t}function dt(t,i,l,h){for(var V=-1,K=t?t.length:0;++V<K;)l=i(l,t[V],V,t);return l}function Kn(t,i){for(var l=-1,h=Array(t);++l<t;)h[l]=i(l);return h}function Hn(t,i){return t==null?void 0:t[i]}function ut(t){var i=!1;if(t!=null&&typeof t.toString!="function")try{i=!!(t+"")}catch{}return i}function ft(t){var i=-1,l=Array(t.size);return t.forEach(function(h,V){l[++i]=[V,h]}),l}function xe(t,i){return function(l){return t(i(l))}}function mt(t){var i=-1,l=Array(t.size);return t.forEach(function(h){l[++i]=h}),l}var zn=Array.prototype,Wn=Function.prototype,Ne=Object.prototype,Re=P["__core-js_shared__"],pt=function(){var t=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),bt=Wn.toString,ee=Ne.hasOwnProperty,Be=Ne.toString,Un=RegExp("^"+bt.call(ee).replace(p,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=_e?P.Buffer:void 0,gt=P.Symbol,yt=P.Uint8Array,Gn=xe(Object.getPrototypeOf,Object),qn=Object.create,Xn=Ne.propertyIsEnumerable,Yn=zn.splice,vt=Object.getOwnPropertySymbols,Jn=ht?ht.isBuffer:void 0,Qn=xe(Object.keys,Object),Le=le(P,"DataView"),be=le(P,"Map"),Me=le(P,"Promise"),Pe=le(P,"Set"),je=le(P,"WeakMap"),he=le(Object,"create"),eo=re(Le),to=re(be),ao=re(Me),no=re(Pe),oo=re(je),kt=gt?gt.prototype:void 0,wt=kt?kt.valueOf:void 0;function ne(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var h=t[i];this.set(h[0],h[1])}}function ro(){this.__data__=he?he(null):{}}function io(t){return this.has(t)&&delete this.__data__[t]}function co(t){var i=this.__data__;if(he){var l=i[t];return l===n?void 0:l}return ee.call(i,t)?i[t]:void 0}function so(t){var i=this.__data__;return he?i[t]!==void 0:ee.call(i,t)}function lo(t,i){var l=this.__data__;return l[t]=he&&i===void 0?n:i,this}ne.prototype.clear=ro,ne.prototype.delete=io,ne.prototype.get=co,ne.prototype.has=so,ne.prototype.set=lo;function Y(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var h=t[i];this.set(h[0],h[1])}}function uo(){this.__data__=[]}function fo(t){var i=this.__data__,l=Te(i,t);if(l<0)return!1;var h=i.length-1;return l==h?i.pop():Yn.call(i,l,1),!0}function mo(t){var i=this.__data__,l=Te(i,t);return l<0?void 0:i[l][1]}function po(t){return Te(this.__data__,t)>-1}function bo(t,i){var l=this.__data__,h=Te(l,t);return h<0?l.push([t,i]):l[h][1]=i,this}Y.prototype.clear=uo,Y.prototype.delete=fo,Y.prototype.get=mo,Y.prototype.has=po,Y.prototype.set=bo;function ce(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var h=t[i];this.set(h[0],h[1])}}function ho(){this.__data__={hash:new ne,map:new(be||Y),string:new ne}}function go(t){return Ie(this,t).delete(t)}function yo(t){return Ie(this,t).get(t)}function vo(t){return Ie(this,t).has(t)}function ko(t,i){return Ie(this,t).set(t,i),this}ce.prototype.clear=ho,ce.prototype.delete=go,ce.prototype.get=yo,ce.prototype.has=vo,ce.prototype.set=ko;function se(t){this.__data__=new Y(t)}function wo(){this.__data__=new Y}function Co(t){return this.__data__.delete(t)}function So(t){return this.__data__.get(t)}function Eo(t){return this.__data__.has(t)}function _o(t,i){var l=this.__data__;if(l instanceof Y){var h=l.__data__;if(!be||h.length<r-1)return h.push([t,i]),this;l=this.__data__=new ce(h)}return l.set(t,i),this}se.prototype.clear=wo,se.prototype.delete=Co,se.prototype.get=So,se.prototype.has=Eo,se.prototype.set=_o;function No(t,i){var l=He(t)||Xo(t)?Kn(t.length,String):[],h=l.length,V=!!h;for(var K in t)ee.call(t,K)&&!(V&&(K=="length"||Wo(K,h)))&&l.push(K);return l}function Ct(t,i,l){var h=t[i];(!(ee.call(t,i)&&Nt(h,l))||l===void 0&&!(i in t))&&(t[i]=l)}function Te(t,i){for(var l=t.length;l--;)if(Nt(t[l][0],i))return l;return-1}function Bo(t,i){return t&&St(i,ze(i),t)}function Ze(t,i,l,h,V,K,J){var H;if(h&&(H=K?h(t,V,K,J):h(t)),H!==void 0)return H;if(!$e(t))return t;var It=He(t);if(It){if(H=Ko(t),!i)return Po(t,H)}else{var de=oe(t),$t=de==B||de==N;if(Jo(t))return Fo(t,i);if(de==C||de==u||$t&&!K){if(ut(t))return K?t:{};if(H=Ho($t?{}:t),!i)return jo(t,Bo(H,t))}else{if(!g[de])return K?t:{};H=zo(t,de,Ze,i)}}J||(J=new se);var Ot=J.get(t);if(Ot)return Ot;if(J.set(t,H),!It)var At=l?Zo(t):ze(t);return jn(At||t,function(We,Oe){At&&(Oe=We,We=t[Oe]),Ct(H,Oe,Ze(We,i,l,h,Oe,t,J))}),H}function To(t){return $e(t)?qn(t):{}}function Io(t,i,l){var h=i(t);return He(t)?h:Zn(h,l(t))}function $o(t){return Be.call(t)}function Oo(t){if(!$e(t)||Go(t))return!1;var i=Tt(t)||ut(t)?Un:b;return i.test(re(t))}function Ao(t){if(!_t(t))return Qn(t);var i=[];for(var l in Object(t))ee.call(t,l)&&l!="constructor"&&i.push(l);return i}function Fo(t,i){if(i)return t.slice();var l=new t.constructor(t.length);return t.copy(l),l}function Ke(t){var i=new t.constructor(t.byteLength);return new yt(i).set(new yt(t)),i}function Do(t,i){var l=i?Ke(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.byteLength)}function Vo(t,i,l){var h=i?l(ft(t),!0):ft(t);return dt(h,me,new t.constructor)}function xo(t){var i=new t.constructor(t.source,k.exec(t));return i.lastIndex=t.lastIndex,i}function Ro(t,i,l){var h=i?l(mt(t),!0):mt(t);return dt(h,pe,new t.constructor)}function Lo(t){return wt?Object(wt.call(t)):{}}function Mo(t,i){var l=i?Ke(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.length)}function Po(t,i){var l=-1,h=t.length;for(i||(i=Array(h));++l<h;)i[l]=t[l];return i}function St(t,i,l,h){l||(l={});for(var V=-1,K=i.length;++V<K;){var J=i[V],H=void 0;Ct(l,J,H===void 0?t[J]:H)}return l}function jo(t,i){return St(t,Et(t),i)}function Zo(t){return Io(t,ze,Et)}function Ie(t,i){var l=t.__data__;return Uo(i)?l[typeof i=="string"?"string":"hash"]:l.map}function le(t,i){var l=Hn(t,i);return Oo(l)?l:void 0}var Et=vt?xe(vt,Object):tr,oe=$o;(Le&&oe(new Le(new ArrayBuffer(1)))!=j||be&&oe(new be)!=I||Me&&oe(Me.resolve())!=x||Pe&&oe(new Pe)!=$||je&&oe(new je)!=W)&&(oe=function(t){var i=Be.call(t),l=i==C?t.constructor:void 0,h=l?re(l):void 0;if(h)switch(h){case eo:return j;case to:return I;case ao:return x;case no:return $;case oo:return W}return i});function Ko(t){var i=t.length,l=t.constructor(i);return i&&typeof t[0]=="string"&&ee.call(t,"index")&&(l.index=t.index,l.input=t.input),l}function Ho(t){return typeof t.constructor=="function"&&!_t(t)?To(Gn(t)):{}}function zo(t,i,l,h){var V=t.constructor;switch(i){case X:return Ke(t);case m:case y:return new V(+t);case j:return Do(t,h);case Z:case S:case R:case M:case L:case _:case d:case f:case v:return Mo(t,h);case I:return Vo(t,h,l);case O:case G:return new V(t);case D:return xo(t);case $:return Ro(t,h,l);case q:return Lo(t)}}function Wo(t,i){return i=i??s,!!i&&(typeof t=="number"||w.test(t))&&t>-1&&t%1==0&&t<i}function Uo(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}function Go(t){return!!pt&&pt in t}function _t(t){var i=t&&t.constructor,l=typeof i=="function"&&i.prototype||Ne;return t===l}function re(t){if(t!=null){try{return bt.call(t)}catch{}try{return t+""}catch{}}return""}function qo(t){return Ze(t,!0,!0)}function Nt(t,i){return t===i||t!==t&&i!==i}function Xo(t){return Yo(t)&&ee.call(t,"callee")&&(!Xn.call(t,"callee")||Be.call(t)==u)}var He=Array.isArray;function Bt(t){return t!=null&&Qo(t.length)&&!Tt(t)}function Yo(t){return er(t)&&Bt(t)}var Jo=Jn||ar;function Tt(t){var i=$e(t)?Be.call(t):"";return i==B||i==N}function Qo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=s}function $e(t){var i=typeof t;return!!t&&(i=="object"||i=="function")}function er(t){return!!t&&typeof t=="object"}function ze(t){return Bt(t)?No(t):Ao(t)}function tr(){return[]}function ar(){return!1}o.exports=qo}(Se,Se.exports);var tn=Se.exports;const an=en(tn),nn={key:0,class:"sidebar-header"},on={class:"sidebar-content-container"},rn={key:0,class:"sidebar-top"},cn={"aria-label":"Main menu"},sn=["id"],ln=["aria-labelledby"],dn={key:1,class:"sidebar-level-divider",role:"separator"},un={key:2,class:"level-primary bottom-items"},fn={class:"sidebar-footer"},Ee="_ungrouped",ct=z(e.defineComponent({__name:"AppSidebar",props:{topItems:{type:Array,default:()=>[]},bottomItems:{type:Array,default:()=>[]},headerHeight:{type:Number,default:60},topOffset:{type:Number,default:0},zIndex:{type:Number,default:3},open:{type:Boolean,default:!1},mobileEnabled:{type:Boolean,default:!1},mobileTopOffset:{type:Number,default:0},mobileHeaderVisible:{type:Boolean,default:!1},mobileCloseDelay:{type:Number,default:350},mobileOverlay:{type:Boolean,default:!0},mobileOverlayZIndex:{type:Number,default:null},mobileOverlayCloseOnClick:{type:Boolean,default:!0}},emits:["click","toggle"],setup(o,{emit:a}){e.useCssVars(p=>({f4fb3cae:m.value.mobileHeight,"0a139013":m.value.mobileTop,"52aa6542":o.zIndex,"30e65667":m.value.height,"546c0415":m.value.top,f7e0f72e:E.value.marginTop,"1392bb60":f.value,"633f46fa":y.value.display,bdfa14cc:y.value.minHeight,50713838:B.value.top,74679389:B.value.zIndex}));const r=a,n=o,s=e.useSlots(),u=e.computed(()=>!!s.header),c=e.computed(()=>!!s.top),m=e.computed(()=>({mobileTop:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:n.topOffset?`${n.topOffset}px`:"0",top:n.topOffset?`${n.topOffset}px`:"0",mobileHeight:n.mobileTopOffset&&n.mobileEnabled?`calc(100% - ${n.mobileTopOffset}px)`:"100%",height:n.topOffset?`calc(100% - ${n.topOffset}px)`:"100%"})),y=e.computed(()=>({display:!n.mobileHeaderVisible&&n.mobileEnabled?"none":"flex",minHeight:`${n.headerHeight}px`})),E=e.computed(()=>({marginTop:u.value?`${n.headerHeight}px`:"0"})),B=e.computed(()=>({top:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:"0",zIndex:n.mobileOverlayZIndex!==null?n.mobileOverlayZIndex:n.zIndex>1?n.zIndex-1:1})),N=p=>an(p).map(b=>{var w,g,T;if(b){(!b.key||!((w=b.key)!=null&&w.trim()))&&(b.key=String(b.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-")),(!b.testId||!((g=b.testId)!=null&&g.trim()))&&(b.testId=String(b.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"));for(const F of b.items||[])F.parentKey=b.key,(!F.testId||!((T=F.testId)!=null&&T.trim()))&&(F.testId=String(F.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"))}return b}),I=e.computed(()=>n.topItems.length?N(n.topItems):[]),O=e.computed(()=>n.bottomItems.length?N(n.bottomItems):[]),C=(p="")=>p.trim().replace(" ","").replace(/[^a-z0-9]+/gi,"-").toLowerCase(),x=e.computed(()=>{var k;const p=new Map;p.set(Ee,[]);for(const b of I.value){const w=b.group||Ee;p.has(w)||p.set(w,[]),(k=p.get(w))==null||k.push(b)}return p}),D=e.ref(n.open),$=p=>{var k,b;D.value!==p&&(D.value=p,r("toggle",p)),p?(k=document==null?void 0:document.body)==null||k.classList.add("kong-ui-app-sidebar-open"):(b=document==null?void 0:document.body)==null||b.classList.remove("kong-ui-app-sidebar-open"),q.value=!1},G=()=>{n.mobileOverlayCloseOnClick&&$(!1)},q=e.ref(!1),W=p=>{q.value=!0,r("click",p),setTimeout(()=>{$(!1)},n.mobileCloseDelay)};e.watch(()=>n.open,p=>{$(p)});const{debounce:X}=it(),j=X(()=>{D.value&&Z.value!==(window==null?void 0:window.innerWidth)&&(Z.value=window==null?void 0:window.innerWidth,$(!1))},200),Z=e.ref(),S=e.ref(!1),R=e.ref(),M=()=>{S.value||(S.value=!0,clearTimeout(R.value),R.value=setTimeout(()=>S.value=!1,1300))},L=e.ref(null),_=e.computed(()=>D.value&&n.mobileEnabled),d=async p=>{var k,b;p?(await e.nextTick(),await new Promise(w=>setTimeout(w,300)),(k=L.value)==null||k.activate()):(b=L.value)==null||b.deactivate()};e.watch(_,async p=>{p?await d(!0):await d(!1)},{immediate:!0});const f=e.ref("0px"),v=()=>{var F;if(!(/Mac|iPhone|iPod|iPad/i.test(navigator==null?void 0:navigator.platform)||/macOS|Mac|iPhone|iPod|iPad/i.test((F=navigator==null?void 0:navigator.userAgentData)==null?void 0:F.platform)))return;const k=document.createElement("div");k.style.visibility="hidden",k.style.width="100px",document.body.appendChild(k);const b=k.offsetWidth;k.style.overflow="scroll";const w=document.createElement("div");w.style.width="100%",k.appendChild(w);const g=w.offsetWidth;k.parentNode&&k.parentNode.removeChild(k),b-g===0&&(f.value="8px")};return e.onMounted(async()=>{Z.value=window==null?void 0:window.innerWidth,window.addEventListener("resize",j),window.addEventListener("resize",M),await e.nextTick(),v()}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",j),window.removeEventListener("resize",M)}),(p,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.value&&o.mobileOverlay&&o.mobileEnabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"kong-ui-app-sidebar-overlay",onClick:G})):e.createCommentVNode("",!0),e.createVNode(e.unref(Qa),{ref_key:"focusTrap",ref:L,active:!1,"allow-outside-click":"","fallback-focus":".kong-ui-app-sidebar"},{default:e.withCtx(()=>[e.createElementVNode("aside",{class:e.normalizeClass(["kong-ui-app-sidebar",{"sidebar-open":D.value,"no-sidebar-header":!u.value,"mobile-header-hidden":o.mobileEnabled&&(!u.value||!o.mobileHeaderVisible),"mobile-disabled":!o.mobileEnabled,"disable-transitions":S.value}]),tabindex:"-1"},[u.value?(e.openBlock(),e.createElementBlock("div",nn,[e.renderSlot(p.$slots,"header",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",on,[c.value?(e.openBlock(),e.createElementBlock("div",rn,[e.renderSlot(p.$slots,"top",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("nav",cn,[x.value.size>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(x.value,([b,w])=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b},[b!==Ee?(e.openBlock(),e.createElementBlock("div",{key:0,id:`level-primary-group-${C(b)}`,class:"level-primary-group-name","data-testid":"level-primary-group-name",role:"presentation"},e.toDisplayString(b),9,sn)):e.createCommentVNode("",!0),e.createElementVNode("ul",{"aria-labelledby":b!==Ee?`level-primary-group-${C(b)}`:void 0,class:"level-primary top-items"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w,g=>(e.openBlock(),e.createBlock(Ge,{key:g.name,item:g,onClick:W},{[`sidebar-icon-${g.key}`]:e.withCtx(()=>[e.renderSlot(p.$slots,`sidebar-icon-${g.key}`,{},void 0,!0)]),_:2},1032,["item"]))),128))],8,ln)],64))),128)):e.createCommentVNode("",!0),x.value.size>0&&O.value.length?(e.openBlock(),e.createElementBlock("div",dn)):e.createCommentVNode("",!0),O.value.length?(e.openBlock(),e.createElementBlock("ul",un,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,b=>(e.openBlock(),e.createBlock(Ge,{key:b.name,item:b,onClick:W},{[`sidebar-icon-${b.key}`]:e.withCtx(()=>[e.renderSlot(p.$slots,`sidebar-icon-${b.key}`,{},void 0,!0)]),_:2},1032,["item"]))),128))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",fn,[e.renderSlot(p.$slots,"footer",{},void 0,!0)])],2)]),_:3},512)],64))}}),[["__scopeId","data-v-2505f054"]]),mn=["aria-label"],st=z(e.defineComponent({__name:"SidebarToggle",props:{active:{type:Boolean,default:!1}},emits:["toggle"],setup(o,{emit:a}){const r=a,n=o,s=e.ref(n.active||!1),u=c=>{c.preventDefault(),s.value=!s.value,r("toggle",s.value)};return e.watch(()=>n.active,c=>{s.value=c}),(c,m)=>(e.openBlock(),e.createElementBlock("a",{"aria-haspopup":"true","aria-label":s.value?"Close Main Menu":"Open Main Menu",class:e.normalizeClass(["sidebar-menu-toggle",{active:s.value}]),href:"#",role:"button",onClick:e.withModifiers(u,["prevent"])},m[0]||(m[0]=[e.createElementVNode("span",{class:"line"},null,-1),e.createElementVNode("span",{class:"line"},null,-1),e.createElementVNode("span",{class:"line"},null,-1)]),10,mn))}}),[["__scopeId","data-v-cbb41bbd"]]),pn="#ffffff",bn="#000933",hn="#000933",gn="#ffffff",yn="0px",vn="4px",kn={id:"kong-ui-app-layout-notification"},wn={class:"mobile-logo"},Cn={key:0,class:"navbar-logo"},Sn={class:"kong-ui-app-layout-main","data-testid":"kong-ui-app-layout-main"},En={class:"kong-ui-app-layout-content"},_n={class:"kong-ui-app-layout-content-inner"},lt=z(e.defineComponent({__name:"AppLayout",props:{hideDefaultSlot:{type:Boolean,default:!1},navbarHidden:{type:Boolean,default:!1},sidebarHidden:{type:Boolean,default:!1},sidebarOpen:{type:Boolean,default:!1},sidebarTopItems:{type:Array,default:()=>[]},sidebarBottomItems:{type:Array,default:()=>[]},theme:{type:String,default:"light",validator:o=>["light","dark"].includes(o)}},emits:["sidebar-click","update:topOffset"],setup(o,{emit:a}){e.useCssVars(S=>({"2235c6e4":$.value,"29d04344":G.value,"3d470f48":D.value,"81803d80":q.value,"64da7a33":W.value}));const r=o,n=a,s=e.useSlots(),u=e.reactive({navbarLeft:e.computed(()=>!!s["navbar-left"]),navbarCenter:e.computed(()=>!!s["navbar-center"]),navbarRight:e.computed(()=>!!s["navbar-right"]),navbarLogo:e.computed(()=>!!s["navbar-logo"]),navbarMobileLogo:e.computed(()=>!!s["navbar-mobile-logo"]),sidebarHeader:e.computed(()=>!!s["sidebar-header"]),sidebarTop:e.computed(()=>!!s["sidebar-top"]),sidebarFooter:e.computed(()=>!!s["sidebar-footer"])}),c=e.computed(()=>r.hideDefaultSlot),m=e.reactive({hidden:e.computed(()=>r.navbarHidden)}),y=e.reactive({topItems:e.computed(()=>r.sidebarTopItems),bottomItems:e.computed(()=>r.sidebarBottomItems),open:e.computed(()=>r.sidebarOpen),hidden:e.computed(()=>r.sidebarHidden)}),E=S=>{n("sidebar-click",S)},B=e.ref(!1),N=S=>{B.value=S};e.watchEffect(()=>{B.value=e.toRef(y,"open").value||!1});const I=e.ref(0),O=e.ref(60),C=e.ref(0),x=e.computed(()=>m.hidden?C.value:O.value+C.value),D=e.computed(()=>r.theme==="light"?hn:gn),$=e.computed(()=>r.theme==="light"?pn:bn),G=e.computed(()=>r.theme==="light"?"var(--kong-ui-app-layout-main-box-shadow, -30px 174px 250px #0023db)":"none"),q=e.computed(()=>`${x.value}px`),W=e.computed(()=>y.hidden||m.hidden?yn:vn),{debounce:X}=it(),j=X((S=!1)=>{if(S||I.value!==(window==null?void 0:window.innerWidth)){I.value=window==null?void 0:window.innerWidth;const R=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");R&&(C.value=R.offsetHeight)}},200),Z=e.ref();return e.watch(C,S=>{n("update:topOffset",S||0)},{immediate:!0}),e.onMounted(()=>{var R,M;(R=document==null?void 0:document.body)==null||R.classList.add("kong-ui-app-layout-body"),(M=document==null?void 0:document.documentElement)==null||M.classList.add("kong-ui-app-layout-html"),I.value=window==null?void 0:window.innerWidth,j(!0);const S=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");S&&(Z.value=new ResizeObserver(L=>{window.requestAnimationFrame(()=>{if(!(!Array.isArray(L)||!L.length))for(const _ of L){const d=_.contentRect.height;C.value!==d&&(C.value=d)}})}),Z.value.observe(S)),window.addEventListener("resize",j)}),e.onBeforeUnmount(()=>{Z.value&&Z.value.disconnect(),window.removeEventListener("resize",j)}),(S,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-app-layout",[{"navbar-hidden":m.hidden},{"sidebar-hidden":y.hidden}]])},[e.createElementVNode("div",kn,[e.renderSlot(S.$slots,"notification",{},void 0,!0)]),m.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue,{key:String(y.hidden),"left-offset":y.hidden?0:void 0,"top-offset":C.value},e.createSlots({"mobile-sidebar-toggle":e.withCtx(()=>[y.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(st,{key:0,active:B.value,onToggle:N},null,8,["active"]))]),_:2},[u.navbarMobileLogo?{name:"mobile-logo",fn:e.withCtx(()=>[e.createElementVNode("div",wn,[e.renderSlot(S.$slots,"navbar-mobile-logo",{},void 0,!0)])]),key:"0"}:void 0,u.navbarLogo?{name:"logo",fn:e.withCtx(()=>[y.hidden?(e.openBlock(),e.createElementBlock("div",Cn,[e.renderSlot(S.$slots,"navbar-logo",{},void 0,!0)])):e.createCommentVNode("",!0)]),key:"1"}:void 0,u.navbarLeft?{name:"left",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-left",{},void 0,!0)]),key:"2"}:void 0,u.navbarCenter?{name:"center",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-center",{},void 0,!0)]),key:"3"}:void 0,u.navbarRight?{name:"right",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-right",{},void 0,!0)]),key:"4"}:void 0]),1032,["left-offset","top-offset"])),y.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ct,{key:1,"bottom-items":y.bottomItems,"header-height":O.value,"mobile-enabled":"","mobile-header-visible":!1,"mobile-top-offset":x.value,open:B.value,"top-items":y.topItems,"top-offset":C.value,onClick:E,onToggle:N},e.createSlots({_:2},[u.sidebarHeader?{name:"header",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-header",{},void 0,!0)]),key:"0"}:void 0,u.sidebarTop?{name:"top",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-top",{},void 0,!0)]),key:"1"}:void 0,u.sidebarFooter?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-footer",{},void 0,!0)]),key:"2"}:void 0,e.renderList([...y.topItems||[],...y.bottomItems||[]],M=>({name:`sidebar-icon-${M.key}`,fn:e.withCtx(()=>[e.renderSlot(S.$slots,`sidebar-icon-${M.key}`,{},void 0,!0)])}))]),1032,["bottom-items","header-height","mobile-top-offset","open","top-items","top-offset"])),e.createElementVNode("main",Sn,[e.createElementVNode("div",En,[e.createElementVNode("div",_n,[R[0]||(R[0]=e.createElementVNode("div",{id:"kong-ui-app-layout-teleport-default-slot"},null,-1)),e.renderSlot(S.$slots,"app-error",{},void 0,!0),c.value?e.createCommentVNode("",!0):e.renderSlot(S.$slots,"default",{key:0},void 0,!0)])])])],2))}}),[["__scopeId","data-v-8e8c270a"]]),Nn={class:"kong-ui-app-page-header"},Bn={key:0,class:"page-header-breadcrumbs","data-testid":"page-header-breadcrumbs"},Tn={class:"page-header-title-section"},In={class:"page-header-title-wrapper"},$n={key:0,class:"page-header-title-before","data-testid":"page-header-title-before"},On=["title"],An={key:1,class:"page-header-title-after","data-testid":"page-header-title-after"},Fn={key:0,class:"page-header-actions","data-testid":"page-header-actions"},Dn={key:1,class:"page-header-section-below","data-testid":"page-header-section-below"},Vn=z(e.defineComponent({__name:"AppPageHeader",props:{title:{type:String,default:""},breadcrumbs:{type:Array,default:()=>[]}},setup(o){const a=o,r=e.useSlots(),n=e.computed(()=>{var u;return!!((u=a.breadcrumbs)!=null&&u.length)}),s=e.computed(()=>Object.keys(r).filter(u=>u.startsWith("icon-")));return(u,c)=>{const m=e.resolveComponent("KBreadcrumbs");return e.openBlock(),e.createElementBlock("div",Nn,[n.value?(e.openBlock(),e.createElementBlock("div",Bn,[e.createVNode(m,{"item-max-width":"150",items:o.breadcrumbs},e.createSlots({_:2},[e.renderList(s.value,y=>({name:y,fn:e.withCtx(()=>[e.renderSlot(u.$slots,y,{},void 0,!0)])}))]),1032,["items"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Tn,[e.createElementVNode("div",In,[u.$slots["title-before"]?(e.openBlock(),e.createElementBlock("div",$n,[e.renderSlot(u.$slots,"title-before",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("h1",{class:"page-header-title","data-testid":"page-header-title",title:o.title},e.toDisplayString(o.title),9,On),u.$slots["title-after"]?(e.openBlock(),e.createElementBlock("div",An,[e.renderSlot(u.$slots,"title-after",{},void 0,!0)])):e.createCommentVNode("",!0)]),u.$slots.actions?(e.openBlock(),e.createElementBlock("div",Fn,[e.renderSlot(u.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),u.$slots.below?(e.openBlock(),e.createElementBlock("div",Dn,[e.renderSlot(u.$slots,"below",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-204b7f98"]]),xn={class:"app-page-info-section-default-header"},Rn={key:1,class:"app-page-info-section-description","data-testid":"app-page-info-section-description"},Ln={key:0,class:"app-page-info-section-content","data-testid":"app-page-info-section-content"},Mn=z(e.defineComponent({__name:"AppPageInfoSection",props:{collapsible:{type:Boolean,default:!0},title:{type:String,default:""},description:{type:String,default:""},titleTag:{type:String,default:"div",validator:o=>Dt.HeaderTags.includes(o)}},setup(o){return(a,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.collapsible?"details":"div"),{class:"app-page-info-section","data-testid":"app-page-info-section"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.collapsible?"summary":"div"),{class:"app-page-info-section-header","data-testid":"app-page-info-section-header"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"header",{},()=>[e.createElementVNode("div",xn,[o.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.titleTag),{key:0,class:"app-page-info-section-title","data-testid":"app-page-info-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]),_:1})):e.createCommentVNode("",!0),o.description?(e.openBlock(),e.createElementBlock("div",Rn,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0)])]),o.collapsible?(e.openBlock(),e.createBlock(e.unref(Ft.ChevronRightIcon),{key:0,class:"app-page-info-section-chevron-icon",decorative:""})):a.$slots.actions?e.renderSlot(a.$slots,"actions",{key:1}):e.createCommentVNode("",!0)]),_:3})),a.$slots.default?(e.openBlock(),e.createElementBlock("div",Ln,[e.renderSlot(a.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-62f17e32"]]),Pn={install:(o,a={})=>{o.component(a.name||"AppLayout",lt)}};A.AccountDropdown=xt,A.AppAboutSection=qt,A.AppError=na,A.AppLayout=lt,A.AppNavbar=Ue,A.AppPageHeader=Vn,A.AppPageInfoSection=Mn,A.AppSidebar=ct,A.SidebarToggle=st,A.default=Pn,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/app-layout",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/app-layout.umd.js",
|
|
6
6
|
"module": "./dist/app-layout.es.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@kong/kongponents": "^9.
|
|
25
|
-
"vue": "
|
|
24
|
+
"@kong/kongponents": "^9.34.2",
|
|
25
|
+
"vue": ">= 3.3.13 < 4",
|
|
26
26
|
"vue-router": "^4.4.5"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"lodash.clonedeep": "^4.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@kong/design-tokens": "
|
|
36
|
-
"@kong/kongponents": "
|
|
35
|
+
"@kong/design-tokens": "1.18.0",
|
|
36
|
+
"@kong/kongponents": "9.38.3",
|
|
37
37
|
"@types/lodash.clonedeep": "^4.5.9",
|
|
38
38
|
"vue": "^3.5.13",
|
|
39
39
|
"vue-router": "^4.4.5"
|