fischer-agentkit/src/agentkit/server/static/assets/zoom-BFNOWbJv.js

15 lines
7.6 KiB
JavaScript

import{aP as Z,b8 as U,_ as c,R as _,b3 as A,bE as W,F as x,bg as H,H as V,b6 as g,bF as G,bG as $,f as R,d as j,P as Q,av as q,B as Y,i as X,C as k,Q as J,c as ee,bH as te,aq as ne,G as p,aL as s}from"./index-gqpFY6Qt.js";import{w as z}from"./_plugin-vue_export-helper-Da7nhmaa.js";let T=!1;try{const e=Object.defineProperty({},"passive",{get(){T=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function Se(e,n,o,t){if(e&&e.addEventListener){let r=t;r===void 0&&T&&(n==="touchstart"||n==="touchmove"||n==="wheel")&&(r={passive:!1}),e.addEventListener(n,o,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(n,o)}}}function oe(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=e;if(Array.isArray(e)&&(r=Z(e)[0]),!r)return null;const a=U(r,n,t);return a.props=o?c(c({},a.props),n):a.props,_(typeof a.props.class!="object"),a}function Le(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(t=>oe(t,n,o))}function $e(e,n,o){H(U(e,c({},n)),o)}const D=e=>(e||[]).some(n=>A(n)?!(n.type===W||n.type===x&&!D(n.children)):!0)?e:null;function ze(e,n,o,t){var r;const a=(r=e[n])===null||r===void 0?void 0:r.call(e,o);return D(a)?a:t==null?void 0:t()}let b;function M(e){if(typeof document>"u")return 0;if(b===void 0){const n=document.createElement("div");n.style.width="100%",n.style.height="200px";const o=document.createElement("div"),t=o.style;t.position="absolute",t.top="0",t.left="0",t.pointerEvents="none",t.visibility="hidden",t.width="200px",t.height="150px",t.overflow="hidden",o.appendChild(n),document.body.appendChild(o);const r=n.offsetWidth;o.style.overflow="scroll";let a=n.offsetWidth;r===a&&(a=o.clientWidth),document.body.removeChild(o),b=r-a}return b}function N(e){const n=e.match(/^(.*)px$/),o=Number(n==null?void 0:n[1]);return Number.isNaN(o)?M():o}function Ne(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:n,height:o}=getComputedStyle(e,"::-webkit-scrollbar");return{width:N(n),height:N(o)}}const ae=`vc-util-locker-${Date.now()}`;let P=0;function re(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function ie(e){const n=R(()=>!!e&&!!e.value);P+=1;const o=`${ae}_${P}`;V(t=>{if(g()){if(n.value){const r=M(),a=re();G(`
html body {
overflow-y: hidden;
${a?`width: calc(100% - ${r}px);`:""}
}`,o)}else $(o);t(()=>{$(o)})}},{flush:"post"})}let m=0;const v=g(),F=e=>{if(!v)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},Pe=j({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Q.any,visible:{type:Boolean,default:void 0},autoLock:ne(),didUpdate:Function},setup(e,n){let{slots:o}=n;const t=p(),r=p(),a=p(),E=p(1),y=g()&&document.createElement("div"),C=()=>{var i,l;t.value===y&&((l=(i=t.value)===null||i===void 0?void 0:i.parentNode)===null||l===void 0||l.removeChild(t.value)),t.value=null};let f=null;const h=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||t.value&&!t.value.parentNode?(f=F(e.getContainer),f?(f.appendChild(t.value),!0):!1):!0},S=()=>v?(t.value||(t.value=y,h(!0)),L(),t.value):null,L=()=>{const{wrapperClassName:i}=e;t.value&&i&&i!==t.value.className&&(t.value.className=i)};return q(()=>{L(),h()}),ie(R(()=>e.autoLock&&e.visible&&g()&&(t.value===document.body||t.value===y))),Y(()=>{let i=!1;X([()=>e.visible,()=>e.getContainer],(l,d)=>{let[w,u]=l,[B,O]=d;v&&(f=F(e.getContainer),f===document.body&&(w&&!B?m+=1:i&&(m-=1))),i&&(typeof u=="function"&&typeof O=="function"?u.toString()!==O.toString():u!==O)&&C(),i=!0},{immediate:!0,flush:"post"}),k(()=>{h()||(a.value=z(()=>{E.value+=1}))})}),J(()=>{const{visible:i}=e;v&&f===document.body&&(m=i&&m?m-1:m),C(),z.cancel(a.value)}),()=>{const{forceRender:i,visible:l}=e;let d=null;const w={getOpenCount:()=>m,getContainer:S};return E.value&&(i||l||r.value)&&(d=ee(te,{getContainer:S,ref:r,didUpdate:e.didUpdate},{default:()=>{var u;return(u=o.default)===null||u===void 0?void 0:u.call(o,w)}})),d}}}),Fe={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},se=e=>({animationDuration:e,animationFillMode:"both"}),le=e=>({animationDuration:e,animationFillMode:"both"}),ue=function(e,n,o,t){const a=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
${a}${e}-enter,
${a}${e}-appear
`]:c(c({},se(t)),{animationPlayState:"paused"}),[`${a}${e}-leave`]:c(c({},le(t)),{animationPlayState:"paused"}),[`
${a}${e}-enter${e}-enter-active,
${a}${e}-appear${e}-appear-active
`]:{animationName:n,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:o,animationPlayState:"running",pointerEvents:"none"}}},me=new s("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ce=new s("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),I=new s("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),K=new s("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),fe=new s("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),de=new s("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),pe=new s("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),ve=new s("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),ge=new s("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),ye=new s("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),he=new s("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),we=new s("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Oe={zoom:{inKeyframes:me,outKeyframes:ce},"zoom-big":{inKeyframes:I,outKeyframes:K},"zoom-big-fast":{inKeyframes:I,outKeyframes:K},"zoom-left":{inKeyframes:pe,outKeyframes:ve},"zoom-right":{inKeyframes:ge,outKeyframes:ye},"zoom-up":{inKeyframes:fe,outKeyframes:de},"zoom-down":{inKeyframes:he,outKeyframes:we}},Ie=(e,n)=>{const{antCls:o}=e,t=`${o}-${n}`,{inKeyframes:r,outKeyframes:a}=Oe[n];return[ue(t,r,a,n==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
${t}-enter,
${t}-appear
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${t}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};export{Fe as K,Pe as P,Le as a,ze as b,oe as c,Se as d,Ne as e,ue as f,M as g,Ie as i,T as s,$e as t,me as z};