mirror of
https://github.com/owncast/owncast.git
synced 2024-12-23 09:40:49 +03:00
1 line
No EOL
7.8 KiB
JavaScript
Vendored
1 line
No EOL
7.8 KiB
JavaScript
Vendored
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3013],{18562:function(e,t,n){n.d(t,{Z:function(){return x}});var o=n(87462),r=n(71002),i=n(4942),a=n(97685),l=n(18073),s=n(94184),c=n.n(s),u=n(60057),p=n(66680),f=n(21770),m=n(67294),d=n(66516),v=n(53124),g=n(76529),y=n(80636),b=n(96159),C=n(93355),h=n(89705),w=n(71577),Z=n(4173),E=n(26713),O=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},N=function(e){var t=m.useContext(v.E_),n=t.getPopupContainer,r=t.getPrefixCls,i=t.direction,l=e.prefixCls,s=e.type,u=void 0===s?"default":s,p=e.danger,f=e.disabled,d=e.loading,g=e.onClick,y=e.htmlType,b=e.children,C=e.className,N=e.menu,P=e.arrow,k=e.autoFocus,R=e.overlay,A=e.trigger,L=e.align,T=e.visible,S=e.open,V=e.onVisibleChange,D=e.onOpenChange,j=e.placement,_=e.getPopupContainer,F=e.href,B=e.icon,H=void 0===B?m.createElement(h.Z,null):B,I=e.title,M=e.buttonsRender,W=e.mouseEnterDelay,z=e.mouseLeaveDelay,J=e.overlayClassName,U=e.overlayStyle,X=e.destroyPopupOnHide,Y=O(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","visible","open","onVisibleChange","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide"]),q=r("dropdown-button",l),G={menu:N,arrow:P,autoFocus:k,align:L,disabled:f,trigger:f?[]:A,onOpenChange:D||V,getPopupContainer:_||n,mouseEnterDelay:W,mouseLeaveDelay:z,overlayClassName:J,overlayStyle:U,destroyPopupOnHide:X},K=(0,Z.ri)(q,i),Q=K.compactSize,$=K.compactItemClassnames,ee=c()(q,$,C);"overlay"in e&&(G.overlay=R),"open"in e?G.open=S:"visible"in e&&(G.open=T),"placement"in e?G.placement=j:G.placement="rtl"===i?"bottomLeft":"bottomRight";var et=(void 0===M?function(e){return e}:M)([m.createElement(w.Z,{type:u,danger:p,disabled:f,loading:d,onClick:g,htmlType:y,href:F,title:I},b),m.createElement(w.Z,{type:u,danger:p,icon:H})]),en=(0,a.Z)(et,2),eo=en[0],er=en[1];return m.createElement(E.Z.Compact,(0,o.Z)({className:ee,size:Q,block:!0},Y),eo,m.createElement(x,(0,o.Z)({},G),er))};N.__ANT_BUTTON=!0,(0,C.b)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","top","bottom");var P=function(e){var t,n,s,C,h,w=m.useContext(v.E_),E=w.getPopupContainer,O=w.getPrefixCls,N=w.direction,P=e.menu,x=e.arrow,k=e.prefixCls,R=e.children,A=e.trigger,L=e.disabled,T=e.dropdownRender,S=e.getPopupContainer,V=e.overlayClassName,D=e.visible,j=e.open,_=e.onVisibleChange,F=e.onOpenChange,B=e.mouseEnterDelay,H=e.mouseLeaveDelay,I=e.autoAdjustOverflow,M=O("dropdown",k),W=m.Children.only(R),z=(0,b.Tm)(W,{className:c()("".concat(M,"-trigger"),(0,i.Z)({},"".concat(M,"-rtl"),"rtl"===N),W.props.className),disabled:L}),J=L?[]:A;J&&J.includes("contextMenu")&&(h=!0);var U=(0,f.Z)(!1,{value:void 0!==j?j:D}),X=(0,a.Z)(U,2),Y=X[0],q=X[1],G=(0,p.Z)(function(e){null==_||_(e),null==F||F(e),q(e)}),K=c()(V,(0,i.Z)({},"".concat(M,"-rtl"),"rtl"===N)),Q=(0,y.Z)({arrowPointAtCenter:"object"===(0,r.Z)(x)&&x.pointAtCenter,autoAdjustOverflow:void 0===I||I}),$=m.useCallback(function(){q(!1)},[]);return m.createElement(u.Z,(0,o.Z)({alignPoint:h},e,{mouseEnterDelay:void 0===B?.15:B,mouseLeaveDelay:void 0===H?.1:H,visible:Y,builtinPlacements:Q,arrow:!!x,overlayClassName:K,prefixCls:M,getPopupContainer:S||E,transitionName:(t=O(),n=e.placement,void 0!==(s=e.transitionName)?s:(void 0===n?"":n).includes("top")?"".concat(t,"-slide-down"):"".concat(t,"-slide-up")),trigger:J,overlay:function(){var t,n=e.overlay;return t=(null==P?void 0:P.items)?m.createElement(d.Z,(0,o.Z)({},P)):"function"==typeof n?n():n,T&&(t=T(t)),t=m.Children.only("string"==typeof t?m.createElement("span",null,t):t),m.createElement(g.J,{prefixCls:"".concat(M,"-menu"),expandIcon:m.createElement("span",{className:"".concat(M,"-menu-submenu-arrow")},m.createElement(l.Z,{className:"".concat(M,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:$,validator:function(e){e.mode}},m.createElement(Z.BR,null,t))},placement:(C=e.placement)?C.includes("Center")?C.slice(0,C.indexOf("Center")):C:"rtl"===N?"bottomRight":"bottomLeft",onVisibleChange:G}),z)};P.Button=N;var x=P},13013:function(e,t,n){var o=n(18562);t.Z=o.Z},60057:function(e,t,n){n.d(t,{Z:function(){return h}});var o=n(4942),r=n(1413),i=n(97685),a=n(45987),l=n(67294),s=n(81263),c=n(94184),u=n.n(c),p={adjustX:1,adjustY:1},f=[0,0],m={topLeft:{points:["bl","tl"],overflow:p,offset:[0,-4],targetOffset:f},topCenter:{points:["bc","tc"],overflow:p,offset:[0,-4],targetOffset:f},topRight:{points:["br","tr"],overflow:p,offset:[0,-4],targetOffset:f},bottomLeft:{points:["tl","bl"],overflow:p,offset:[0,4],targetOffset:f},bottomCenter:{points:["tc","bc"],overflow:p,offset:[0,4],targetOffset:f},bottomRight:{points:["tr","br"],overflow:p,offset:[0,4],targetOffset:f}},d=n(15105),v=n(75164),g=n(88603),y=d.Z.ESC,b=d.Z.TAB,C=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"],h=l.forwardRef(function(e,t){var n,c,p,f,d,h,w,Z,E,O,N,P,x,k,R,A,L=e.arrow,T=void 0!==L&&L,S=e.prefixCls,V=void 0===S?"rc-dropdown":S,D=e.transitionName,j=e.animation,_=e.align,F=e.placement,B=e.placements,H=e.getPopupContainer,I=e.showAction,M=e.hideAction,W=e.overlayClassName,z=e.overlayStyle,J=e.visible,U=e.trigger,X=void 0===U?["hover"]:U,Y=e.autoFocus,q=(0,a.Z)(e,C),G=l.useState(),K=(0,i.Z)(G,2),Q=K[0],$=K[1],ee="visible"in e?J:Q,et=l.useRef(null);l.useImperativeHandle(t,function(){return et.current}),p=(c={visible:ee,setTriggerVisible:$,triggerRef:et,onVisibleChange:e.onVisibleChange,autoFocus:Y}).visible,f=c.setTriggerVisible,d=c.triggerRef,h=c.onVisibleChange,w=c.autoFocus,Z=l.useRef(!1),E=function(){if(p&&d.current){var e,t,n,o;null===(e=d.current)||void 0===e||null===(t=e.triggerRef)||void 0===t||null===(n=t.current)||void 0===n||null===(o=n.focus)||void 0===o||o.call(n),f(!1),"function"==typeof h&&h(!1)}},O=function(){var e,t,n,o,r=(0,g.tS)(null===(e=d.current)||void 0===e?void 0:null===(t=e.popupRef)||void 0===t?void 0:null===(n=t.current)||void 0===n?void 0:null===(o=n.getElement)||void 0===o?void 0:o.call(n))[0];return null!=r&&!!r.focus&&(r.focus(),Z.current=!0,!0)},N=function(e){switch(e.keyCode){case y:E();break;case b:var t=!1;Z.current||(t=O()),t?e.preventDefault():E()}},l.useEffect(function(){return p?(window.addEventListener("keydown",N),w&&(0,v.Z)(O,3),function(){window.removeEventListener("keydown",N),Z.current=!1}):function(){Z.current=!1}},[p]);var en=function(){var t=e.overlay;return"function"==typeof t?t():t},eo=function(){var e=en();return l.createElement(l.Fragment,null,T&&l.createElement("div",{className:"".concat(V,"-arrow")}),e)},er=M;return er||-1===X.indexOf("contextMenu")||(er=["click"]),l.createElement(s.Z,(0,r.Z)((0,r.Z)({builtinPlacements:void 0===B?m:B},q),{},{prefixCls:V,ref:et,popupClassName:u()(W,(0,o.Z)({},"".concat(V,"-show-arrow"),T)),popupStyle:z,action:X,showAction:I,hideAction:er||[],popupPlacement:void 0===F?"bottomLeft":F,popupAlign:_,popupTransitionName:D,popupAnimation:j,popupVisible:ee,stretch:(P=e.minOverlayWidthMatchTrigger,x=e.alignPoint,"minOverlayWidthMatchTrigger"in e?P:!x)?"minWidth":"",popup:"function"==typeof e.overlay?eo:eo(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;$(t),"function"==typeof n&&n(t)},onPopupClick:function(t){var n=e.onOverlayClick;$(!1),n&&n(t)},getPopupContainer:H}),(R=(k=e.children).props?k.props:{},A=u()(R.className,void 0!==(n=e.openClassName)?n:"".concat(V,"-open")),ee&&k?l.cloneElement(k,{className:A}):k))})}}]); |