static.kuangkie.hydrogen.bundle.f250e3d152f2d4aa3e68.js Maven / Gradle / Ivy
The newest version!
/*! For license information please see bundle.f250e3d152f2d4aa3e68.js.LICENSE.txt */
(self.webpackChunkhydrogen_react=self.webpackChunkhydrogen_react||[]).push([[6819],{16575:function(e,t,n){"use strict";n.d(t,{TA:function(){return S}});var r=n(35466),i=n(97958),o=n(63123),a=n(76464),s=n(16881),l=n(52072),u=n(87773),c=n.n(u);function f(e){console.warn("loadable: "+e)}var h=r.createContext(),d="__LOADABLE_REQUIRED_CHUNKS__";var p={initialChunks:{}},m="PENDING",v="REJECTED",g=function(e){return e};function y(e){var t=e.defaultResolveComponent,n=void 0===t?g:t,u=e.render,f=e.onLoad;function d(e,t){void 0===t&&(t={});var d=function(e){return"function"==typeof e?{requireAsync:e,resolve:function(){},chunkName:function(){}}:e}(e),g={};function y(e){return t.cacheKey?t.cacheKey(e):d.resolve?d.resolve(e):"static"}function b(e,r,i){var o=t.resolveComponent?t.resolveComponent(e,r):n(e);if(t.resolveComponent&&!(0,l.isValidElementType)(o))throw new Error("resolveComponent returned something that is not a React component!");return c()(i,o,{preload:!0}),o}var k,x,Z=function(e){var t=y(e),n=g[t];return n&&n.status!==v||((n=d.requireAsync(e)).status=m,g[t]=n,n.then((function(){n.status="RESOLVED"}),(function(t){console.error("loadable-components: failed to asynchronously load component",{fileName:d.resolve(e),chunkName:d.chunkName(e),error:t?t.message:t}),n.status=v}))),n},C=function(e){function n(n){var r;return(r=e.call(this,n)||this).state={result:null,error:null,loading:!0,cacheKey:y(n)},function(e,t){if(!e){var n=new Error("loadable: "+t);throw n.framesToPop=1,n.name="Invariant Violation",n}}(!n.__chunkExtractor||d.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),n.__chunkExtractor?(!1===t.ssr||(d.requireAsync(n).catch((function(){return null})),r.loadSync(),n.__chunkExtractor.addChunk(d.chunkName(n))),(0,a.Z)(r)):(!1!==t.ssr&&(d.isReady&&d.isReady(n)||d.chunkName&&p.initialChunks[d.chunkName(n)])&&r.loadSync(),r)}(0,s.Z)(n,e),n.getDerivedStateFromProps=function(e,t){var n=y(e);return(0,o.Z)({},t,{cacheKey:n,loading:t.loading||t.cacheKey!==n})};var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0;var e=this.getCache();e&&e.status===v&&this.setCache(),this.state.loading&&this.loadAsync()},r.componentDidUpdate=function(e,t){t.cacheKey!==this.state.cacheKey&&this.loadAsync()},r.componentWillUnmount=function(){this.mounted=!1},r.safeSetState=function(e,t){this.mounted&&this.setState(e,t)},r.getCacheKey=function(){return y(this.props)},r.getCache=function(){return g[this.getCacheKey()]},r.setCache=function(e){void 0===e&&(e=void 0),g[this.getCacheKey()]=e},r.triggerOnLoad=function(){var e=this;f&&setTimeout((function(){f(e.state.result,e.props)}))},r.loadSync=function(){if(this.state.loading)try{var e=b(d.requireSync(this.props),this.props,E);this.state.result=e,this.state.loading=!1}catch(e){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:d.resolve(this.props),chunkName:d.chunkName(this.props),error:e?e.message:e}),this.state.error=e}},r.loadAsync=function(){var e=this,t=this.resolveAsync();return t.then((function(t){var n=b(t,e.props,E);e.safeSetState({result:n,loading:!1},(function(){return e.triggerOnLoad()}))})).catch((function(t){return e.safeSetState({error:t,loading:!1})})),t},r.resolveAsync=function(){var e=this.props,t=(e.__chunkExtractor,e.forwardedRef,(0,i.Z)(e,["__chunkExtractor","forwardedRef"]));return Z(t)},r.render=function(){var e=this.props,n=e.forwardedRef,r=e.fallback,a=(e.__chunkExtractor,(0,i.Z)(e,["forwardedRef","fallback","__chunkExtractor"])),s=this.state,l=s.error,c=s.loading,f=s.result;if(t.suspense&&(this.getCache()||this.loadAsync()).status===m)throw this.loadAsync();if(l)throw l;var h=r||t.fallback||null;return c?h:u({fallback:h,result:f,options:t,props:(0,o.Z)({},a,{ref:n})})},n}(r.Component),w=(x=function(e){return r.createElement(h.Consumer,null,(function(t){return r.createElement(k,Object.assign({__chunkExtractor:t},e))}))},(k=C).displayName&&(x.displayName=k.displayName+"WithChunkExtractor"),x),E=r.forwardRef((function(e,t){return r.createElement(w,Object.assign({forwardedRef:t},e))}));return E.displayName="Loadable",E.preload=function(e){E.load(e)},E.load=function(e){return Z(e)},E}return{loadable:d,lazy:function(e,t){return d(e,(0,o.Z)({},t,{suspense:!0}))}}}var b=y({defaultResolveComponent:function(e){return e.__esModule?e.default:e.default||e},render:function(e){var t=e.result,n=e.props;return r.createElement(t,n)}}),k=b.loadable,x=b.lazy,Z=y({onLoad:function(e,t){e&&t.forwardedRef&&("function"==typeof t.forwardedRef?t.forwardedRef(e):t.forwardedRef.current=e)},render:function(e){var t=e.result,n=e.props;return n.children?n.children(t):null}}),C=Z.loadable,w=Z.lazy,E="undefined"!=typeof window;function S(e,t){void 0===e&&(e=function(){});var n=void 0===t?{}:t,r=n.namespace,i=void 0===r?"":r,o=n.chunkLoadingGlobal,a=void 0===o?"__LOADABLE_LOADED_CHUNKS__":o;if(!E)return f("`loadableReady()` must be called in browser only"),e(),Promise.resolve();var s=null;if(E){var l=function(e){return""+e+d}(i),u=document.getElementById(l);if(u){s=JSON.parse(u.textContent);var c=document.getElementById(l+"_ext");if(!c)throw new Error("loadable-component: @loadable/server does not match @loadable/component");JSON.parse(c.textContent).namedChunks.forEach((function(e){p.initialChunks[e]=!0}))}}if(!s)return f("`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side"),e(),Promise.resolve();var h=!1;return new Promise((function(e){window[a]=window[a]||[];var t=window[a],n=t.push.bind(t);function r(){s.every((function(e){return t.some((function(t){return t[0].indexOf(e)>-1}))}))&&(h||(h=!0,e()))}t.push=function(){n.apply(void 0,arguments),r()},r()})).then(e)}var N=k;N.lib=C,x.lib=w,t.ZP=N},65972:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=(n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n?Symbol.for("react.fragment"):60107),i=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,l=(n&&Symbol.for("react.async_mode"),n?Symbol.for("react.concurrent_mode"):60111),u=n?Symbol.for("react.forward_ref"):60112,c=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116,p=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,g=n?Symbol.for("react.scope"):60119;t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===o||e===i||e===c||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m||e.$$typeof===v||e.$$typeof===g||e.$$typeof===p)}},52072:function(e,t,n){"use strict";e.exports=n(65972)},41818:function(e,t,n){"use strict";n.d(t,{kr:function(){return u},jM:function(){return d},qp:function(){return c}});var r=n(55043),i=n(76814),o=n(2610),a=n(32541),s=n(35466),l=n(46116);function u(e){var t=s.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,i=e.children,a=s.useRef(n);a.current=n;var u=s.useState((function(){return{getValue:function(){return a.current},listeners:new Set}})),c=(0,r.Z)(u,1)[0];return(0,o.Z)((function(){(0,l.unstable_batchedUpdates)((function(){c.listeners.forEach((function(e){e(n)}))}))}),[n]),s.createElement(t.Provider,{value:c},i)},defaultValue:e}}function c(e,t){var n=(0,i.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach((function(t){n[t]=e[t]})),n}),l=s.useContext(null==e?void 0:e.Context),u=l||{},c=u.listeners,f=u.getValue,h=s.useRef();h.current=n(l?f():null==e?void 0:e.defaultValue);var d=s.useState({}),p=(0,r.Z)(d,2)[1];return(0,o.Z)((function(){if(l)return c.add(e),function(){c.delete(e)};function e(e){var t=n(e);(0,a.Z)(h.current,t,!0)||p({})}}),[l]),h.current}var f=n(63123),h=n(6461);function d(){var e=s.createContext(null);function t(){return s.useContext(e)}return{makeImmutable:function(n,r){var i=(0,h.Yr)(n),o=function(o,a){var l=i?{ref:a}:{},u=s.useRef(0),c=s.useRef(o);return null!==t()?s.createElement(n,(0,f.Z)({},o,l)):(r&&!r(c.current,o)||(u.current+=1),c.current=o,s.createElement(e.Provider,{value:u.current},s.createElement(n,(0,f.Z)({},o,l))))};return i?s.forwardRef(o):o},responseImmutable:function(e,n){var r=(0,h.Yr)(e),i=function(n,i){var o=r?{ref:i}:{};return t(),s.createElement(e,(0,f.Z)({},n,o))};return r?s.memo(s.forwardRef(i),n):s.memo(i,n)},useImmutableMark:t}}var p=d();p.makeImmutable,p.responseImmutable,p.useImmutableMark},86418:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},FH:function(){return f}});var r=n(4913),i=n(64296),o=n(8270),a=n(19844),s=function(){function e(t){if((0,r.Z)(this,e),(0,o.Z)(this,"origin",""),(0,o.Z)(this,"negative",void 0),(0,o.Z)(this,"integer",void 0),(0,o.Z)(this,"decimal",void 0),(0,o.Z)(this,"decimalLen",void 0),(0,o.Z)(this,"empty",void 0),(0,o.Z)(this,"nan",void 0),(0,a.xb)(t))this.empty=!0;else if(this.origin=String(t),"-"===t||Number.isNaN(t))this.nan=!0;else{var n=t;if((0,a.CC)(n)&&(n=Number(n)),n="string"==typeof n?n:(0,a.vP)(n),(0,a.mE)(n)){var i=(0,a._V)(n);this.negative=i.negative;var s=i.trimStr.split(".");this.integer=BigInt(s[0]);var l=s[1]||"0";this.decimal=BigInt(l),this.decimalLen=l.length}else this.nan=!0}}return(0,i.Z)(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(e){var t="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(e,"0"));return BigInt(t)}},{key:"negate",value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:"cal",value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),o=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),s=r(i),l=(0,a._V)(o),u=l.negativeStr,c=l.trimStr,f="".concat(u).concat(c.padStart(s+1,"0"));return new e("".concat(f.slice(0,-s),".").concat(f.slice(-s)))}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,(function(e,t){return e+t}),(function(e){return e}))}},{key:"multi",value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,(function(e,t){return e*t}),(function(e){return 2*e}))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toString()===(null==e?void 0:e.toString())}},{key:"lessEquals",value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":(0,a._V)("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr}}]),e}(),l=function(){function e(t){(0,r.Z)(this,e),(0,o.Z)(this,"origin",""),(0,o.Z)(this,"number",void 0),(0,o.Z)(this,"empty",void 0),(0,a.xb)(t)?this.empty=!0:(this.origin=String(t),this.number=Number(t))}return(0,i.Z)(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(rNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":(0,a.vP)(this.number)}}]),e}(),u=n(68762);function c(e){return(0,u.L)()?new s(e):new l(e)}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var i=(0,a._V)(e),o=i.negativeStr,s=i.integerStr,l=i.decimalStr,u="".concat(t).concat(l),h="".concat(o).concat(s);if(n>=0){var d=Number(l[n]);return d>=5&&!r?f(c(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-d)).toString(),t,n,r):0===n?h:"".concat(h).concat(t).concat(l.padEnd(n,"0").slice(0,n))}return".0"===u?h:"".concat(h).concat(u)}},77615:function(e,t,n){"use strict";var r=n(86418);t.ZP=r.ZP},19844:function(e,t,n){"use strict";n.d(t,{CC:function(){return a},NX:function(){return s},_V:function(){return o},mE:function(){return u},vP:function(){return l},xb:function(){return i}});var r=n(68762);function i(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function o(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",i=r.split("."),o=i[0]||"0",a=i[1]||"0";"0"===o&&"0"===a&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:o,decimalStr:a,fullStr:"".concat(s).concat(r)}}function a(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function s(e){var t=String(e);if(a(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return null!=r&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&u(t)?t.length-t.indexOf(".")-1:0}function l(e){var t=String(e);if(a(e)){if(e>Number.MAX_SAFE_INTEGER)return String((0,r.L)()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,h.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),o)}else(0,h.jL)(o);return function(){(0,h.jL)(o)}}),[t,o])}(y&&n&&(0,a.Z)()&&(V===M||V===document.body));var _=null;Z&&(0,s.Yr)(Z)&&t&&(_=Z.ref);var L=(0,s.x1)(_,t);if(!N||!(0,a.Z)()||void 0===O)return null;var D=!1===V||v,z=Z;return t&&(z=i.cloneElement(Z,{ref:L})),i.createElement(l.Provider,{value:T},D?z:(0,o.createPortal)(z,V))}))},28766:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(36849),i=n(55043),o=n(17253),a=n(79112),s=n(92703),l=n.n(s),u=n(56415),c=n(11889),f=n(79129),h=n(76814),d=n(80289),p=n(2610),m=n(10984),v=n(35466),g=n(63123),y=n(45231),b=n(6461);function k(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,s=o.content,u=i.x,c=void 0===u?0:u,f=i.y,h=void 0===f?0:f,d=v.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(!1!==n.autoArrow){var m=n.points[0],g=n.points[1],y=m[0],b=m[1],k=g[0],x=g[1];y!==k&&["t","b"].includes(y)?"t"===y?p.top=0:p.bottom=0:p.top=h,b!==x&&["l","r"].includes(b)?"l"===b?p.left=0:p.right=0:p.left=c}return v.createElement("div",{ref:d,className:l()("".concat(t,"-arrow"),a),style:p},s)}function x(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?v.createElement(y.ZP,(0,g.Z)({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return v.createElement("div",{style:{zIndex:r},className:l()("".concat(t,"-mask"),n)})})):null}var Z=v.memo((function(e){return e.children}),(function(e,t){return t.cache})),C=v.forwardRef((function(e,t){var n=e.popup,o=e.className,a=e.prefixCls,s=e.style,c=e.target,f=e.onVisibleChanged,h=e.open,d=e.keepDom,m=e.fresh,C=e.onClick,w=e.mask,E=e.arrow,S=e.arrowPos,N=e.align,P=e.motion,R=e.maskMotion,O=e.forceRender,F=e.getPopupContainer,A=e.autoDestroy,I=e.portal,M=e.zIndex,T=e.onMouseEnter,V=e.onMouseLeave,_=e.onPointerEnter,L=e.ready,D=e.offsetX,z=e.offsetY,W=e.offsetR,$=e.offsetB,j=e.onAlign,B=e.onPrepare,U=e.stretch,X=e.targetWidth,Y=e.targetHeight,H="function"==typeof n?n():n,Q=h||d,K=(null==F?void 0:F.length)>0,q=v.useState(!F||!K),G=(0,i.Z)(q,2),J=G[0],ee=G[1];if((0,p.Z)((function(){!J&&K&&c&&ee(!0)}),[J,K,c]),!J)return null;var te="auto",ne={left:"-1000vw",top:"-1000vh",right:te,bottom:te};if(L||!h){var re,ie=N.points,oe=N.dynamicInset||(null===(re=N._experimental)||void 0===re?void 0:re.dynamicInset),ae=oe&&"r"===ie[0][1],se=oe&&"b"===ie[0][0];ae?(ne.right=W,ne.left=te):(ne.left=D,ne.right=te),se?(ne.bottom=$,ne.top=te):(ne.top=z,ne.bottom=te)}var le={};return U&&(U.includes("height")&&Y?le.height=Y:U.includes("minHeight")&&Y&&(le.minHeight=Y),U.includes("width")&&X?le.width=X:U.includes("minWidth")&&X&&(le.minWidth=X)),h||(le.pointerEvents="none"),v.createElement(I,{open:O||Q,getContainer:F&&function(){return F(c)},autoDestroy:A},v.createElement(x,{prefixCls:a,open:h,zIndex:M,mask:w,motion:R}),v.createElement(u.Z,{onResize:j,disabled:!h},(function(e){return v.createElement(y.ZP,(0,g.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:O,leavedClassName:"".concat(a,"-hidden")},P,{onAppearPrepare:B,onEnterPrepare:B,visible:h,onVisibleChanged:function(e){var t;null==P||null===(t=P.onVisibleChanged)||void 0===t||t.call(P,e),f(e)}}),(function(n,i){var u=n.className,c=n.style,f=l()(a,u,o);return v.createElement("div",{ref:(0,b.sQ)(e,t,i),className:f,style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({"--arrow-x":"".concat(S.x||0,"px"),"--arrow-y":"".concat(S.y||0,"px")},ne),le),c),{},{boxSizing:"border-box",zIndex:M},s),onMouseEnter:T,onMouseLeave:V,onPointerEnter:_,onClick:C},E&&v.createElement(k,{prefixCls:a,arrow:E,arrowPos:S,align:N}),v.createElement(Z,{cache:!h&&!m},H))}))})))})),w=v.forwardRef((function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=(0,b.Yr)(n),o=v.useCallback((function(e){(0,b.mH)(t,r?r(e):e)}),[r]),a=(0,b.x1)(o,n.ref);return i?v.cloneElement(n,{ref:a}):n})),E=v.createContext(null);function S(e){return e?Array.isArray(e)?e:[e]:[]}var N=n(16964);function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function R(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function O(e){return e.ownerDocument.defaultView}function F(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=O(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function I(e){return A(parseFloat(e),0)}function M(e,t){var n=(0,r.Z)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=O(e).getComputedStyle(e),r=t.overflow,i=t.overflowClipMargin,o=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.borderRightWidth,u=e.getBoundingClientRect(),c=e.offsetHeight,f=e.clientHeight,h=e.offsetWidth,d=e.clientWidth,p=I(o),m=I(a),v=I(s),g=I(l),y=A(Math.round(u.width/h*1e3)/1e3),b=A(Math.round(u.height/c*1e3)/1e3),k=(h-d-v-g)*y,x=(c-f-p-m)*b,Z=p*b,C=m*b,w=v*y,E=g*y,S=0,N=0;if("clip"===r){var P=I(i);S=P*y,N=P*b}var R=u.x+w-S,F=u.y+Z-N,M=R+u.width+2*S-w-E-k,T=F+u.height+2*N-Z-C-x;n.left=Math.max(n.left,R),n.top=Math.max(n.top,F),n.right=Math.min(n.right,M),n.bottom=Math.min(n.bottom,T)}})),n}function T(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function V(e,t){var n=t||[],r=(0,i.Z)(n,2),o=r[0],a=r[1];return[T(e.width,o),T(e.height,a)]}function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function L(e,t){var n,r=t[0],i=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===i?e.x:"r"===i?e.x+e.width:e.x+e.width/2,y:n}}function D(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var z=n(25206);n(39205);var W=n(61277),$=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"],j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z,t=v.forwardRef((function(t,n){var a=t.prefixCls,s=void 0===a?"rc-trigger-popup":a,g=t.children,y=t.action,b=void 0===y?"hover":y,k=t.showAction,x=t.hideAction,Z=t.popupVisible,I=t.defaultPopupVisible,T=t.onPopupVisibleChange,j=t.afterPopupVisibleChange,B=t.mouseEnterDelay,U=t.mouseLeaveDelay,X=void 0===U?.1:U,Y=t.focusDelay,H=t.blurDelay,Q=t.mask,K=t.maskClosable,q=void 0===K||K,G=t.getPopupContainer,J=t.forceRender,ee=t.autoDestroy,te=t.destroyPopupOnHide,ne=t.popup,re=t.popupClassName,ie=t.popupStyle,oe=t.popupPlacement,ae=t.builtinPlacements,se=void 0===ae?{}:ae,le=t.popupAlign,ue=t.zIndex,ce=t.stretch,fe=t.getPopupClassNameFromAlign,he=t.fresh,de=t.alignPoint,pe=t.onPopupClick,me=t.onPopupAlign,ve=t.arrow,ge=t.popupMotion,ye=t.maskMotion,be=t.popupTransitionName,ke=t.popupAnimation,xe=t.maskTransitionName,Ze=t.maskAnimation,Ce=t.className,we=t.getTriggerDOMNode,Ee=(0,o.Z)(t,$),Se=ee||te||!1,Ne=v.useState(!1),Pe=(0,i.Z)(Ne,2),Re=Pe[0],Oe=Pe[1];(0,p.Z)((function(){Oe((0,m.Z)())}),[]);var Fe=v.useRef({}),Ae=v.useContext(E),Ie=v.useMemo((function(){return{registerSubPopup:function(e,t){Fe.current[e]=t,null==Ae||Ae.registerSubPopup(e,t)}}}),[Ae]),Me=(0,d.Z)(),Te=v.useState(null),Ve=(0,i.Z)(Te,2),_e=Ve[0],Le=Ve[1],De=(0,h.Z)((function(e){(0,c.S)(e)&&_e!==e&&Le(e),null==Ae||Ae.registerSubPopup(Me,e)})),ze=v.useState(null),We=(0,i.Z)(ze,2),$e=We[0],je=We[1],Be=v.useRef(null),Ue=(0,h.Z)((function(e){(0,c.S)(e)&&$e!==e&&(je(e),Be.current=e)})),Xe=v.Children.only(g),Ye=(null==Xe?void 0:Xe.props)||{},He={},Qe=(0,h.Z)((function(e){var t,n,r=$e;return(null==r?void 0:r.contains(e))||(null===(t=(0,f.A)(r))||void 0===t?void 0:t.host)===e||e===r||(null==_e?void 0:_e.contains(e))||(null===(n=(0,f.A)(_e))||void 0===n?void 0:n.host)===e||e===_e||Object.values(Fe.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),Ke=R(s,ge,ke,be),qe=R(s,ye,Ze,xe),Ge=v.useState(I||!1),Je=(0,i.Z)(Ge,2),et=Je[0],tt=Je[1],nt=null!=Z?Z:et,rt=(0,h.Z)((function(e){void 0===Z&&tt(e)}));(0,p.Z)((function(){tt(Z||!1)}),[Z]);var it=v.useRef(nt);it.current=nt;var ot=v.useRef([]);ot.current=[];var at=(0,h.Z)((function(e){var t;rt(e),(null!==(t=ot.current[ot.current.length-1])&&void 0!==t?t:nt)!==e&&(ot.current.push(e),null==T||T(e))})),st=v.useRef(),lt=function(){clearTimeout(st.current)},ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;lt(),0===t?at(e):st.current=setTimeout((function(){at(e)}),1e3*t)};v.useEffect((function(){return lt}),[]);var ct=v.useState(!1),ft=(0,i.Z)(ct,2),ht=ft[0],dt=ft[1];(0,p.Z)((function(e){e&&!nt||dt(!0)}),[nt]);var pt=v.useState(null),mt=(0,i.Z)(pt,2),vt=mt[0],gt=mt[1],yt=v.useState([0,0]),bt=(0,i.Z)(yt,2),kt=bt[0],xt=bt[1],Zt=function(e){xt([e.clientX,e.clientY])},Ct=function(e,t,n,o,a,s,l){var u=v.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),f=(0,i.Z)(u,2),d=f[0],m=f[1],g=v.useRef(0),y=v.useMemo((function(){return t?F(t):[]}),[t]),b=v.useRef({});e||(b.current={});var k=(0,h.Z)((function(){if(t&&n&&e){var u,f,h,d=t,p=d.ownerDocument,v=O(d).getComputedStyle(d),g=v.width,k=v.height,x=v.position,Z=d.style.left,C=d.style.top,w=d.style.right,E=d.style.bottom,S=d.style.overflow,P=(0,r.Z)((0,r.Z)({},a[o]),s),R=p.createElement("div");if(null===(u=d.parentElement)||void 0===u||u.appendChild(R),R.style.left="".concat(d.offsetLeft,"px"),R.style.top="".concat(d.offsetTop,"px"),R.style.position=x,R.style.height="".concat(d.offsetHeight,"px"),R.style.width="".concat(d.offsetWidth,"px"),d.style.left="0",d.style.top="0",d.style.right="auto",d.style.bottom="auto",d.style.overflow="hidden",Array.isArray(n))h={x:n[0],y:n[1],width:0,height:0};else{var F=n.getBoundingClientRect();h={x:F.x,y:F.y,width:F.width,height:F.height}}var I=d.getBoundingClientRect(),T=p.documentElement,z=T.clientWidth,W=T.clientHeight,$=T.scrollWidth,j=T.scrollHeight,B=T.scrollTop,U=T.scrollLeft,X=I.height,Y=I.width,H=h.height,Q=h.width,K={left:0,top:0,right:z,bottom:W},q={left:-U,top:-B,right:$-U,bottom:j-B},G=P.htmlRegion,J="visible",ee="visibleFirst";"scroll"!==G&&G!==ee&&(G=J);var te=G===ee,ne=M(q,y),re=M(K,y),ie=G===J?re:ne,oe=te?re:ie;d.style.left="auto",d.style.top="auto",d.style.right="0",d.style.bottom="0";var ae=d.getBoundingClientRect();d.style.left=Z,d.style.top=C,d.style.right=w,d.style.bottom=E,d.style.overflow=S,null===(f=d.parentElement)||void 0===f||f.removeChild(R);var se=A(Math.round(Y/parseFloat(g)*1e3)/1e3),le=A(Math.round(X/parseFloat(k)*1e3)/1e3);if(0===se||0===le||(0,c.S)(n)&&!(0,N.Z)(n))return;var ue=P.offset,ce=P.targetOffset,fe=V(I,ue),he=(0,i.Z)(fe,2),de=he[0],pe=he[1],me=V(h,ce),ve=(0,i.Z)(me,2),ge=ve[0],ye=ve[1];h.x-=ge,h.y-=ye;var be=P.points||[],ke=(0,i.Z)(be,2),xe=ke[0],Ze=_(ke[1]),Ce=_(xe),we=L(h,Ze),Ee=L(I,Ce),Se=(0,r.Z)({},P),Ne=we.x-Ee.x+de,Pe=we.y-Ee.y+pe;function xt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ie,r=I.x+e,i=I.y+t,o=r+Y,a=i+X,s=Math.max(r,n.left),l=Math.max(i,n.top),u=Math.min(o,n.right),c=Math.min(a,n.bottom);return Math.max(0,(u-s)*(c-l))}var Re,Oe,Fe,Ae,Ie=xt(Ne,Pe),Me=xt(Ne,Pe,re),Te=L(h,["t","l"]),Ve=L(I,["t","l"]),_e=L(h,["b","r"]),Le=L(I,["b","r"]),De=P.overflow||{},ze=De.adjustX,We=De.adjustY,$e=De.shiftX,je=De.shiftY,Be=function(e){return"boolean"==typeof e?e:e>=0};function Zt(){Re=I.y+Pe,Oe=Re+X,Fe=I.x+Ne,Ae=Fe+Y}Zt();var Ue=Be(We),Xe=Ce[0]===Ze[0];if(Ue&&"t"===Ce[0]&&(Oe>oe.bottom||b.current.bt)){var Ye=Pe;Xe?Ye-=X-H:Ye=Te.y-Le.y-pe;var He=xt(Ne,Ye),Qe=xt(Ne,Ye,re);He>Ie||He===Ie&&(!te||Qe>=Me)?(b.current.bt=!0,Pe=Ye,pe=-pe,Se.points=[D(Ce,0),D(Ze,0)]):b.current.bt=!1}if(Ue&&"b"===Ce[0]&&(ReIe||qe===Ie&&(!te||Ge>=Me)?(b.current.tb=!0,Pe=Ke,pe=-pe,Se.points=[D(Ce,0),D(Ze,0)]):b.current.tb=!1}var Je=Be(ze),et=Ce[1]===Ze[1];if(Je&&"l"===Ce[1]&&(Ae>oe.right||b.current.rl)){var tt=Ne;et?tt-=Y-Q:tt=Te.x-Le.x-de;var nt=xt(tt,Pe),rt=xt(tt,Pe,re);nt>Ie||nt===Ie&&(!te||rt>=Me)?(b.current.rl=!0,Ne=tt,de=-de,Se.points=[D(Ce,1),D(Ze,1)]):b.current.rl=!1}if(Je&&"r"===Ce[1]&&(FeIe||ot===Ie&&(!te||at>=Me)?(b.current.lr=!0,Ne=it,de=-de,Se.points=[D(Ce,1),D(Ze,1)]):b.current.lr=!1}Zt();var st=!0===$e?0:$e;"number"==typeof st&&(Fere.right&&(Ne-=Ae-re.right-de,h.x>re.right-st&&(Ne+=h.x-re.right+st)));var lt=!0===je?0:je;"number"==typeof lt&&(Rere.bottom&&(Pe-=Oe-re.bottom-pe,h.y>re.bottom-lt&&(Pe+=h.y-re.bottom+lt)));var ut=I.x+Ne,ct=ut+Y,ft=I.y+Pe,ht=ft+X,dt=h.x,pt=dt+Q,mt=h.y,vt=mt+H,gt=(Math.max(ut,dt)+Math.min(ct,pt))/2-ut,yt=(Math.max(ft,mt)+Math.min(ht,vt))/2-ft;null==l||l(t,Se);var bt=ae.right-I.x-(Ne+I.width),kt=ae.bottom-I.y-(Pe+I.height);m({ready:!0,offsetX:Ne/se,offsetY:Pe/le,offsetR:bt/se,offsetB:kt/le,arrowX:gt/se,arrowY:yt/le,scaleX:se,scaleY:le,align:Se})}})),x=function(){m((function(e){return(0,r.Z)((0,r.Z)({},e),{},{ready:!1})}))};return(0,p.Z)(x,[o]),(0,p.Z)((function(){e||x()}),[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,function(){g.current+=1;var e=g.current;Promise.resolve().then((function(){g.current===e&&k()}))}]}(nt,_e,de?kt:$e,oe,se,le,me),wt=(0,i.Z)(Ct,11),Et=wt[0],St=wt[1],Nt=wt[2],Pt=wt[3],Rt=wt[4],Ot=wt[5],Ft=wt[6],At=wt[7],It=wt[8],Mt=wt[9],Tt=wt[10],Vt=function(e,t,n,r){return v.useMemo((function(){var i=S(null!=n?n:t),o=S(null!=r?r:t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[e,t,n,r])}(Re,b,k,x),_t=(0,i.Z)(Vt,2),Lt=_t[0],Dt=_t[1],zt=Lt.has("click"),Wt=Dt.has("click")||Dt.has("contextMenu"),$t=(0,h.Z)((function(){ht||Tt()}));!function(e,t,n,r,i){(0,p.Z)((function(){if(e&&t&&n){var i=n,o=F(t),a=F(i),s=O(i),l=new Set([s].concat((0,z.Z)(o),(0,z.Z)(a)));function u(){r(),it.current&&de&&Wt&&ut(!1)}return l.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),s.addEventListener("resize",u,{passive:!0}),r(),function(){l.forEach((function(e){e.removeEventListener("scroll",u),s.removeEventListener("resize",u)}))}}}),[e,t,n])}(nt,$e,_e,$t),(0,p.Z)((function(){$t()}),[kt,oe]),(0,p.Z)((function(){!nt||null!=se&&se[oe]||$t()}),[JSON.stringify(le)]);var jt=v.useMemo((function(){var e=function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a1?a-1:0),l=1;l1?n-1:0),i=1;i1?n-1:0),i=1;i=t||n<0||v&&e-p>=c}function k(){var e=i();if(b(e))return x(e);h=setTimeout(k,function(e){var n=t-(e-d);return v?s(n,c-(e-p)):n}(e))}function x(e){return h=void 0,g&&l?y(e):(l=u=void 0,f)}function Z(){var e=i(),n=b(e);if(l=arguments,u=this,d=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(k,t),m?y(e):f}(d);if(v)return clearTimeout(h),h=setTimeout(k,t),y(d)}return void 0===h&&(h=setTimeout(k,t)),f}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),Z.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=d=u=h=void 0},Z.flush=function(){return void 0===h?f:x(i())},Z}},70071:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},44939:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},34655:function(e,t,n){var r=n(1185),i=n(44939);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},55989:function(e,t,n){var r=n(44362);e.exports=function(){return r.Date.now()}},56705:function(e,t,n){var r=n(71432),i=n(70071),o=n(34655),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},43042:function(e){(function(){var t,n,r,i,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:{env:{}}.hrtime?(e.exports=function(){return(t()-o)/1e6},n={env:{}}.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),a=1e9*{env:{}}.uptime(),o=i-a):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},99656:function(e){var t=null,n=["Webkit","Moz","O","ms"];e.exports=function(e){t||(t=document.createElement("div"));var r=t.style;if(e in r)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),o=n.length;o>=0;o--){var a=n[o]+i;if(a in r)return a}return!1}},23433:function(e,t,n){"use strict";var r=n(6642);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},3074:function(e,t,n){e.exports=n(23433)()},6642:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},13757:function(e,t,n){"use strict";n.d(t,{s:function(){return K},default:function(){return J}});var r=n(63123),i=n(36849),o=n(25206),a=n(55043),s=n(17253),l=n(35570),u=n(76573),c=n(76814),f=n(78008),h=n(35466),d=h.createContext(null),p=n(31311),m=n(8270),v="__rc_cascader_search_mark__",g=function(e,t,n){var r=n.label;return t.some((function(t){return String(t[r]).toLowerCase().includes(e.toLowerCase())}))},y=function(e,t,n,r){return t.map((function(e){return e[r.label]})).join(" / ")},b="__RC_CASCADER_SPLIT__",k="SHOW_PARENT",x="SHOW_CHILD";function Z(e){return e.join(b)}function C(e){return e.map(Z)}function w(e){var t=e||{},n=t.label,r=t.value||"value";return{label:n||"label",value:r,key:r,children:t.children||"children"}}function E(e,t){var n,r;return null!==(n=e.isLeaf)&&void 0!==n?n:!(null!==(r=e[t.children])&&void 0!==r&&r.length)}function S(e){var t=e.parentElement;if(t){var n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}}function N(e,t){return e.map((function(e){var n;return null===(n=e[v])||void 0===n?void 0:n.map((function(e){return e[t.value]}))}))}function P(e){return e?function(e){return Array.isArray(e)&&Array.isArray(e[0])}(e)?e:(0===e.length?[]:[e]).map((function(e){return Array.isArray(e)?e:[e]})):[]}function R(e,t,n){var r=new Set(e),i=t();return e.filter((function(e){var t=i[e],o=t?t.parent:null,a=t?t.children:null;return!((!t||!t.node.disabled)&&(n===x?a&&a.some((function(e){return e.key&&r.has(e.key)})):o&&!o.node.disabled&&r.has(o.key)))}))}function O(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t,o=[],a=function(){var t,a,l,u=e[s],c=null===(t=i)||void 0===t?void 0:t.findIndex((function(e){var t=e[n.value];return r?String(t)===String(u):t===u})),f=-1!==c?null===(a=i)||void 0===a?void 0:a[c]:null;o.push({value:null!==(l=null==f?void 0:f[n.value])&&void 0!==l?l:u,index:c,option:f}),i=null==f?void 0:f[n.children]},s=0;s2&&void 0!==arguments[2]&&arguments[2];T(e),!c&&(t||M&&("hover"===W||n))&&p(!1)},oe=h.useMemo((function(){return f?V:R}),[f,V,R]),ae=h.useMemo((function(){for(var e=[{options:oe}],t=oe,n=N(t,I),r=function(){var r=ee[i],o=t.find((function(e,t){return(n[t]?Z(n[t]):e[I.value])===r})),a=null==o?void 0:o[I.children];if(null==a||!a.length)return 1;t=a,e.push({options:a})},i=0;i1){var e=y.slice(0,-1);C(e)}else f(!1)},E=function(){var e,t=((null===(e=k[b])||void 0===e?void 0:e[n.children])||[]).find((function(e){return!e.disabled}));if(t){var r=[].concat((0,o.Z)(y),[t[n.value]]);C(r)}};h.useImperativeHandle(e,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case B.Z.UP:case B.Z.DOWN:var r=0;t===B.Z.UP?r=-1:t===B.Z.DOWN&&(r=1),0!==r&&function(e){var t=k.length,r=b;-1===r&&e<0&&(r=t);for(var i=0;i":x,C=n.loadingIcon,E=n.direction,S=n.notFoundContent,N=void 0===S?"Not Found":S,R=!!u,A=(0,H.C8)(c,{value:f,postState:P}),I=(0,a.Z)(A,2),T=I[0],L=I[1],z=h.useMemo((function(){return w(p)}),[JSON.stringify(p)]),W=M(z,l),$=(0,a.Z)(W,3),j=$[0],B=$[1],U=$[2],Y=F(j,z),K=_(R,T,B,U,Y),q=(0,a.Z)(K,3),G=q[0],J=q[1],ee=q[2],te=(0,H.zX)((function(e){if(L(e),g){var t=P(e),n=t.map((function(e){return O(e,j,z).map((function(e){return e.option}))})),r=R?t:t[0],i=R?n:n[0];g(r,i)}})),ne=V(R,te,G,J,ee,B,U,y),re=(0,H.zX)((function(e){ne(e)})),ie=h.useMemo((function(){return{options:j,fieldNames:z,values:G,halfValues:J,changeOnSelect:v,onSelect:re,checkable:u,searchOptions:[],dropdownPrefixCls:null,loadData:b,expandTrigger:k,expandIcon:Z,loadingIcon:C,dropdownMenuColumnStyle:null}}),[j,z,G,J,v,re,u,b,k,Z,C]),oe="".concat(i,"-panel"),ae=!j.length;return h.createElement(d.Provider,{value:ie},h.createElement("div",{className:D()(oe,(t={},(0,m.Z)(t,"".concat(oe,"-rtl"),"rtl"===E),(0,m.Z)(t,"".concat(oe,"-empty"),ae),t),s),style:o},ae?N:h.createElement(X,{prefixCls:i,searchValue:null,multiple:R,toggleOpen:Q,open:!0,direction:E})))}var q=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"],G=h.forwardRef((function(e,t){var n=e.id,b=e.prefixCls,x=void 0===b?"rc-cascader":b,E=e.fieldNames,S=e.defaultValue,N=e.value,A=e.changeOnSelect,I=e.onChange,T=e.displayRender,L=e.checkable,D=e.autoClearSearchValue,z=void 0===D||D,W=e.searchValue,$=e.onSearch,j=e.showSearch,B=e.expandTrigger,U=e.options,X=e.dropdownPrefixCls,H=e.loadData,Q=e.popupVisible,K=e.open,G=e.popupClassName,J=e.dropdownClassName,ee=e.dropdownMenuColumnStyle,te=e.dropdownStyle,ne=e.popupPlacement,re=e.placement,ie=e.onDropdownVisibleChange,oe=e.onPopupVisibleChange,ae=e.expandIcon,se=void 0===ae?">":ae,le=e.loadingIcon,ue=e.children,ce=e.dropdownMatchSelectWidth,fe=void 0!==ce&&ce,he=e.showCheckedStrategy,de=void 0===he?k:he,pe=(0,s.Z)(e,q),me=(0,u.ZP)(n),ve=!!L,ge=(0,f.Z)(S,{value:N,postState:P}),ye=(0,a.Z)(ge,2),be=ye[0],ke=ye[1],xe=h.useMemo((function(){return w(E)}),[JSON.stringify(E)]),Ze=M(xe,U),Ce=(0,a.Z)(Ze,3),we=Ce[0],Ee=Ce[1],Se=Ce[2],Ne=(0,f.Z)("",{value:W,postState:function(e){return e||""}}),Pe=(0,a.Z)(Ne,2),Re=Pe[0],Oe=Pe[1],Fe=function(e){return h.useMemo((function(){if(!e)return[!1,{}];var t={matchInputWidth:!0,limit:50};return e&&"object"===(0,p.Z)(e)&&(t=(0,i.Z)((0,i.Z)({},t),e)),t.limit<=0&&delete t.limit,[!0,t]}),[e])}(j),Ae=(0,a.Z)(Fe,2),Ie=Ae[0],Me=Ae[1],Te=function(e,t,n,r,a,s){var l=a.filter,u=void 0===l?g:l,c=a.render,f=void 0===c?y:c,d=a.limit,p=void 0===d?50:d,b=a.sort;return h.useMemo((function(){var a=[];return e?(function t(l,c){var h=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l.forEach((function(l){if(!(!b&&!1!==p&&p>0&&a.length>=p)){var d,g=[].concat((0,o.Z)(c),[l]),y=l[n.children],k=h||l.disabled;y&&0!==y.length&&!s||u(e,g,{label:n.label})&&a.push((0,i.Z)((0,i.Z)({},l),{},(d={disabled:k},(0,m.Z)(d,n.label,f(e,g,r,n)),(0,m.Z)(d,v,g),(0,m.Z)(d,n.children,void 0),d))),y&&t(l[n.children],g,k)}}))}(t,[]),b&&a.sort((function(t,r){return b(t[v],r[v],e,n)})),!1!==p&&p>0?a.slice(0,p):a):[]}),[e,t,n,r,f,s,u,b,p])}(Re,we,xe,X||x,Me,A),Ve=F(we,xe),_e=_(ve,be,Ee,Se,Ve),Le=(0,a.Z)(_e,3),De=Le[0],ze=Le[1],We=Le[2],$e=function(e,t,n,r,i){return h.useMemo((function(){var a=i||function(e){var t=r?e.slice(-1):e;return t.every((function(e){return["string","number"].includes((0,p.Z)(e))}))?t.join(" / "):t.reduce((function(e,t,n){var r=h.isValidElement(t)?h.cloneElement(t,{key:n}):t;return 0===n?[r]:[].concat((0,o.Z)(e),[" / ",r])}),[])};return e.map((function(e){var r,i=O(e,t,n),o=a(i.map((function(e){var t,r=e.option,i=e.value;return null!==(t=null==r?void 0:r[n.label])&&void 0!==t?t:i})),i.map((function(e){return e.option}))),s=Z(e);return{label:o,value:s,key:s,valueCells:e,disabled:null===(r=i[i.length-1])||void 0===r||null===(r=r.option)||void 0===r?void 0:r.disabled}}))}),[e,t,n,i,r])}(h.useMemo((function(){var e=R(C(De),Ee,de);return[].concat((0,o.Z)(We),(0,o.Z)(Se(e)))}),[De,Ee,Se,We,de]),we,xe,ve,T),je=(0,c.Z)((function(e){if(ke(e),I){var t=P(e),n=t.map((function(e){return O(e,we,xe).map((function(e){return e.option}))})),r=ve?t:t[0],i=ve?n:n[0];I(r,i)}})),Be=V(ve,je,De,ze,We,Ee,Se,de),Ue=(0,c.Z)((function(e){ve&&!z||Oe(""),Be(e)})),Xe=void 0!==K?K:Q,Ye=J||G,He=re||ne,Qe=h.useMemo((function(){return{options:we,fieldNames:xe,values:De,halfValues:ze,changeOnSelect:A,onSelect:Ue,checkable:L,searchOptions:Te,dropdownPrefixCls:X,loadData:H,expandTrigger:B,expandIcon:se,loadingIcon:le,dropdownMenuColumnStyle:ee}}),[we,xe,De,ze,A,Ue,L,Te,X,H,B,se,le,ee]),Ke=!(Re?Te:we).length,qe=Re&&Me.matchInputWidth||Ke?{}:{minWidth:"auto"};return h.createElement(d.Provider,{value:Qe},h.createElement(l.Ac,(0,r.Z)({},pe,{ref:t,id:me,prefixCls:x,autoClearSearchValue:z,dropdownMatchSelectWidth:fe,dropdownStyle:(0,i.Z)((0,i.Z)({},qe),te),displayValues:$e,onDisplayValuesChange:function(e,t){if("clear"!==t.type){var n=t.values[0].valueCells;Ue(n)}else je([])},mode:ve?"multiple":void 0,searchValue:Re,onSearch:function(e,t){Oe(e),"blur"!==t.source&&$&&$(e)},showSearch:Ie,OptionList:Y,emptyOptions:Ke,open:Xe,dropdownClassName:Ye,placement:He,onDropdownVisibleChange:function(e){null==ie||ie(e),null==oe||oe(e)},getRawInputElement:function(){return ue}})))}));G.SHOW_PARENT=k,G.SHOW_CHILD=x,G.Panel=K;var J=G},34376:function(e,t,n){"use strict";var r=n(63123),i=n(36849),o=n(8270),a=n(55043),s=n(17253),l=n(92703),u=n.n(l),c=n(78008),f=n(35466),h=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d=(0,f.forwardRef)((function(e,t){var n,l=e.prefixCls,d=void 0===l?"rc-checkbox":l,p=e.className,m=e.style,v=e.checked,g=e.disabled,y=e.defaultChecked,b=void 0!==y&&y,k=e.type,x=void 0===k?"checkbox":k,Z=e.title,C=e.onChange,w=(0,s.Z)(e,h),E=(0,f.useRef)(null),S=(0,c.Z)(b,{value:v}),N=(0,a.Z)(S,2),P=N[0],R=N[1];(0,f.useImperativeHandle)(t,(function(){return{focus:function(){var e;null===(e=E.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=E.current)||void 0===e||e.blur()},input:E.current}}));var O=u()(d,p,(n={},(0,o.Z)(n,"".concat(d,"-checked"),P),(0,o.Z)(n,"".concat(d,"-disabled"),g),n));return f.createElement("span",{className:O,title:Z,style:m},f.createElement("input",(0,r.Z)({},w,{className:"".concat(d,"-input"),ref:E,onChange:function(t){g||("checked"in e||R(t.target.checked),null==C||C({target:(0,i.Z)((0,i.Z)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:g,checked:!!P,type:x})),f.createElement("span",{className:"".concat(d,"-inner")}))}));t.Z=d},69484:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(25206),i=n(55043),o=n(31311),a=n(92703),s=n.n(a),l=n(78008),u=n(39205),c=n(35466),f=n(63123),h=n(17253),d=n(25227),p=n(8270),m=n(45231),v=n(19110),g=c.forwardRef((function(e,t){var n,r=e.prefixCls,o=e.forceRender,a=e.className,l=e.style,u=e.children,f=e.isActive,h=e.role,d=c.useState(f||o),m=(0,i.Z)(d,2),v=m[0],g=m[1];return c.useEffect((function(){(o||f)&&g(!0)}),[o,f]),v?c.createElement("div",{ref:t,className:s()("".concat(r,"-content"),(n={},(0,p.Z)(n,"".concat(r,"-content-active"),f),(0,p.Z)(n,"".concat(r,"-content-inactive"),!f),n),a),style:l,role:h},c.createElement("div",{className:"".concat(r,"-content-box")},u)):null}));g.displayName="PanelContent";var y=g,b=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],k=c.forwardRef((function(e,t){var n,r,i=e.showArrow,o=void 0===i||i,a=e.headerClass,l=e.isActive,u=e.onItemClick,d=e.forceRender,g=e.className,k=e.prefixCls,x=e.collapsible,Z=e.accordion,C=e.panelKey,w=e.extra,E=e.header,S=e.expandIcon,N=e.openMotion,P=e.destroyInactivePanel,R=e.children,O=(0,h.Z)(e,b),F="disabled"===x,A="header"===x,I="icon"===x,M=null!=w&&"boolean"!=typeof w,T=function(){null==u||u(C)},V="function"==typeof S?S(e):c.createElement("i",{className:"arrow"});V&&(V=c.createElement("div",{className:"".concat(k,"-expand-icon"),onClick:["header","icon"].includes(x)?T:void 0},V));var _=s()((n={},(0,p.Z)(n,"".concat(k,"-item"),!0),(0,p.Z)(n,"".concat(k,"-item-active"),l),(0,p.Z)(n,"".concat(k,"-item-disabled"),F),n),g),L={className:s()(a,(r={},(0,p.Z)(r,"".concat(k,"-header"),!0),(0,p.Z)(r,"".concat(k,"-header-collapsible-only"),A),(0,p.Z)(r,"".concat(k,"-icon-collapsible-only"),I),r)),"aria-expanded":l,"aria-disabled":F,onKeyDown:function(e){"Enter"!==e.key&&e.keyCode!==v.Z.ENTER&&e.which!==v.Z.ENTER||T()}};return A||I||(L.onClick=T,L.role=Z?"tab":"button",L.tabIndex=F?-1:0),c.createElement("div",(0,f.Z)({},O,{ref:t,className:_}),c.createElement("div",L,o&&V,c.createElement("span",{className:"".concat(k,"-header-text"),onClick:"header"===x?T:void 0},E),M&&c.createElement("div",{className:"".concat(k,"-extra")},w)),c.createElement(m.ZP,(0,f.Z)({visible:l,leavedClassName:"".concat(k,"-content-hidden")},N,{forceRender:d,removeOnLeave:P}),(function(e,t){var n=e.className,r=e.style;return c.createElement(y,{ref:t,prefixCls:k,className:n,style:r,isActive:l,forceRender:d,role:Z?"tabpanel":void 0},R)})))})),x=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];function Z(e){var t=e;if(!Array.isArray(t)){var n=(0,o.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map((function(e){return String(e)}))}var C=c.forwardRef((function(e,t){var n=e.prefixCls,o=void 0===n?"rc-collapse":n,a=e.destroyInactivePanel,p=void 0!==a&&a,m=e.style,v=e.accordion,g=e.className,y=e.children,b=e.collapsible,C=e.openMotion,w=e.expandIcon,E=e.activeKey,S=e.defaultActiveKey,N=e.onChange,P=e.items,R=s()(o,g),O=(0,l.Z)([],{value:E,onChange:function(e){return null==N?void 0:N(e)},defaultValue:S,postState:Z}),F=(0,i.Z)(O,2),A=F[0],I=F[1];(0,u.ZP)(!y,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var M=function(e,t,n){return Array.isArray(e)?function(e,t){var n=t.prefixCls,r=t.accordion,i=t.collapsible,o=t.destroyInactivePanel,a=t.onItemClick,s=t.activeKey,l=t.openMotion,u=t.expandIcon;return e.map((function(e,t){var d,p=e.children,m=e.label,v=e.key,g=e.collapsible,y=e.onItemClick,b=e.destroyInactivePanel,Z=(0,h.Z)(e,x),C=String(null!=v?v:t),w=null!=g?g:i,E=null!=b?b:o;return d=r?s[0]===C:s.indexOf(C)>-1,c.createElement(k,(0,f.Z)({},Z,{prefixCls:n,key:C,panelKey:C,isActive:d,accordion:r,openMotion:l,expandIcon:u,header:m,collapsible:w,onItemClick:function(e){"disabled"!==w&&(a(e),null==y||y(e))},destroyInactivePanel:E}),p)}))}(e,n):(0,d.Z)(t).map((function(e,t){return function(e,t,n){if(!e)return null;var r,i=n.prefixCls,o=n.accordion,a=n.collapsible,s=n.destroyInactivePanel,l=n.onItemClick,u=n.activeKey,f=n.openMotion,h=n.expandIcon,d=e.key||String(t),p=e.props,m=p.header,v=p.headerClass,g=p.destroyInactivePanel,y=p.collapsible,b=p.onItemClick;r=o?u[0]===d:u.indexOf(d)>-1;var k=null!=y?y:a,x={key:d,panelKey:d,header:m,headerClass:v,isActive:r,prefixCls:i,destroyInactivePanel:null!=g?g:s,openMotion:f,accordion:o,children:e.props.children,onItemClick:function(e){"disabled"!==k&&(l(e),null==b||b(e))},expandIcon:h,collapsible:k};return"string"==typeof e.type?e:(Object.keys(x).forEach((function(e){void 0===x[e]&&delete x[e]})),c.cloneElement(e,x))}(e,t,n)}))}(P,y,{prefixCls:o,accordion:v,openMotion:C,expandIcon:w,collapsible:b,destroyInactivePanel:p,onItemClick:function(e){return I((function(){return v?A[0]===e?[]:[e]:A.indexOf(e)>-1?A.filter((function(t){return t!==e})):[].concat((0,r.Z)(A),[e])}))},activeKey:A});return c.createElement("div",{ref:t,className:R,style:m,role:v?"tablist":void 0},M)})),w=Object.assign(C,{Panel:k}),E=w;w.Panel},50365:function(e,t,n){"use strict";n.d(t,{s:function(){return x},Z:function(){return N}});var r=n(63123),i=n(55043),o=n(79112),a=n(35466),s=a.createContext({}),l=n(36849),u=n(92703),c=n.n(u),f=n(12619),h=n(80289),d=n(19110),p=n(40875);function m(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function v(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var i=e.document;"number"!=typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}var g=n(45231),y=n(6461),b=a.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate})),k={width:0,height:0,overflow:"hidden",outline:"none"},x=a.forwardRef((function(e,t){var n=e.prefixCls,i=e.className,o=e.style,u=e.title,f=e.ariaId,h=e.footer,d=e.closable,p=e.closeIcon,m=e.onClose,v=e.children,g=e.bodyStyle,x=e.bodyProps,Z=e.modalRender,C=e.onMouseDown,w=e.onMouseUp,E=e.holderRef,S=e.visible,N=e.forceRender,P=e.width,R=e.height,O=e.classNames,F=e.styles,A=a.useContext(s).panel,I=(0,y.x1)(E,A),M=(0,a.useRef)(),T=(0,a.useRef)();a.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=M.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===T.current?M.current.focus():e||t!==M.current||T.current.focus()}}}));var V,_,L,D={};void 0!==P&&(D.width=P),void 0!==R&&(D.height=R),h&&(V=a.createElement("div",{className:c()("".concat(n,"-footer"),null==O?void 0:O.footer),style:(0,l.Z)({},null==F?void 0:F.footer)},h)),u&&(_=a.createElement("div",{className:c()("".concat(n,"-header"),null==O?void 0:O.header),style:(0,l.Z)({},null==F?void 0:F.header)},a.createElement("div",{className:"".concat(n,"-title"),id:f},u))),d&&(L=a.createElement("button",{type:"button",onClick:m,"aria-label":"Close",className:"".concat(n,"-close")},p||a.createElement("span",{className:"".concat(n,"-close-x")})));var z=a.createElement("div",{className:c()("".concat(n,"-content"),null==O?void 0:O.content),style:null==F?void 0:F.content},L,_,a.createElement("div",(0,r.Z)({className:c()("".concat(n,"-body"),null==O?void 0:O.body),style:(0,l.Z)((0,l.Z)({},g),null==F?void 0:F.body)},x),v),V);return a.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":u?f:null,"aria-modal":"true",ref:I,style:(0,l.Z)((0,l.Z)({},o),D),className:c()(n,i),onMouseDown:C,onMouseUp:w},a.createElement("div",{tabIndex:0,ref:M,style:k,"aria-hidden":"true"}),a.createElement(b,{shouldUpdate:S||N},Z?Z(z):z),a.createElement("div",{tabIndex:0,ref:T,style:k,"aria-hidden":"true"}))})),Z=a.forwardRef((function(e,t){var n=e.prefixCls,o=e.title,s=e.style,u=e.className,f=e.visible,h=e.forceRender,d=e.destroyOnClose,p=e.motionName,m=e.ariaId,y=e.onVisibleChanged,b=e.mousePosition,k=(0,a.useRef)(),Z=a.useState(),C=(0,i.Z)(Z,2),w=C[0],E=C[1],S={};function N(){var e,t,n,r,i,o=(n={left:(t=(e=k.current).getBoundingClientRect()).left,top:t.top},i=(r=e.ownerDocument).defaultView||r.parentWindow,n.left+=v(i),n.top+=v(i,!0),n);E(b?"".concat(b.x-o.left,"px ").concat(b.y-o.top,"px"):"")}return w&&(S.transformOrigin=w),a.createElement(g.ZP,{visible:f,onVisibleChanged:y,onAppearPrepare:N,onEnterPrepare:N,forceRender:h,motionName:p,removeOnLeave:d,ref:k},(function(i,f){var h=i.className,d=i.style;return a.createElement(x,(0,r.Z)({},e,{ref:t,title:o,ariaId:m,prefixCls:n,holderRef:f,style:(0,l.Z)((0,l.Z)((0,l.Z)({},d),s),S),className:c()(u,h)}))}))}));Z.displayName="Content";var C=Z;function w(e){var t=e.prefixCls,n=e.style,i=e.visible,o=e.maskProps,s=e.motionName,u=e.className;return a.createElement(g.ZP,{key:"mask",visible:i,motionName:s,leavedClassName:"".concat(t,"-mask-hidden")},(function(e,i){var s=e.className,f=e.style;return a.createElement("div",(0,r.Z)({ref:i,style:(0,l.Z)((0,l.Z)({},f),n),className:c()("".concat(t,"-mask"),s,u)},o))}))}function E(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,o=e.zIndex,s=e.visible,u=void 0!==s&&s,v=e.keyboard,g=void 0===v||v,y=e.focusTriggerAfterClose,b=void 0===y||y,k=e.wrapStyle,x=e.wrapClassName,Z=e.wrapProps,E=e.onClose,S=e.afterOpenChange,N=e.afterClose,P=e.transitionName,R=e.animation,O=e.closable,F=void 0===O||O,A=e.mask,I=void 0===A||A,M=e.maskTransitionName,T=e.maskAnimation,V=e.maskClosable,_=void 0===V||V,L=e.maskStyle,D=e.maskProps,z=e.rootClassName,W=e.classNames,$=e.styles,j=(0,a.useRef)(),B=(0,a.useRef)(),U=(0,a.useRef)(),X=a.useState(u),Y=(0,i.Z)(X,2),H=Y[0],Q=Y[1],K=(0,h.Z)();function q(e){null==E||E(e)}var G=(0,a.useRef)(!1),J=(0,a.useRef)(),ee=null;return _&&(ee=function(e){G.current?G.current=!1:B.current===e.target&&q(e)}),(0,a.useEffect)((function(){u&&(Q(!0),(0,f.Z)(B.current,document.activeElement)||(j.current=document.activeElement))}),[u]),(0,a.useEffect)((function(){return function(){clearTimeout(J.current)}}),[]),a.createElement("div",(0,r.Z)({className:c()("".concat(n,"-root"),z)},(0,p.Z)(e,{data:!0})),a.createElement(w,{prefixCls:n,visible:I&&u,motionName:m(n,M,T),style:(0,l.Z)((0,l.Z)({zIndex:o},L),null==$?void 0:$.mask),maskProps:D,className:null==W?void 0:W.mask}),a.createElement("div",(0,r.Z)({tabIndex:-1,onKeyDown:function(e){if(g&&e.keyCode===d.Z.ESC)return e.stopPropagation(),void q(e);u&&e.keyCode===d.Z.TAB&&U.current.changeActive(!e.shiftKey)},className:c()("".concat(n,"-wrap"),x,null==W?void 0:W.wrapper),ref:B,onClick:ee,style:(0,l.Z)((0,l.Z)((0,l.Z)({zIndex:o},k),null==$?void 0:$.wrapper),{},{display:H?null:"none"})},Z),a.createElement(C,(0,r.Z)({},e,{onMouseDown:function(){clearTimeout(J.current),G.current=!0},onMouseUp:function(){J.current=setTimeout((function(){G.current=!1}))},ref:U,closable:F,ariaId:K,prefixCls:n,visible:u&&H,onClose:q,onVisibleChanged:function(e){if(e)(0,f.Z)(B.current,document.activeElement)||null===(t=U.current)||void 0===t||t.focus();else{if(Q(!1),I&&j.current&&b){try{j.current.focus({preventScroll:!0})}catch(e){}j.current=null}H&&(null==N||N())}var t;null==S||S(e)},motionName:m(n,P,R)}))))}n(39205);var S=function(e){var t=e.visible,n=e.getContainer,l=e.forceRender,u=e.destroyOnClose,c=void 0!==u&&u,f=e.afterClose,h=e.panelRef,d=a.useState(t),p=(0,i.Z)(d,2),m=p[0],v=p[1],g=a.useMemo((function(){return{panel:h}}),[h]);return a.useEffect((function(){t&&v(!0)}),[t]),l||!c||m?a.createElement(s.Provider,{value:g},a.createElement(o.Z,{open:t||l||m,autoDestroy:!1,getContainer:n,autoLock:t||m},a.createElement(E,(0,r.Z)({},e,{destroyOnClose:c,afterClose:function(){null==f||f(),v(!1)}})))):null};S.displayName="Dialog";var N=S},45886:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(36849),i=n(55043),o=n(79112),a=n(2610),s=n(35466),l=s.createContext(null),u=s.createContext({}),c=l,f=n(8270),h=n(63123),d=n(92703),p=n.n(d),m=n(45231),v=n(19110),g=n(40875),y=n(76983),b=function(e){var t=e.prefixCls,n=e.className,i=e.style,o=e.children,a=e.containerRef,l=e.id,c={onMouseEnter:e.onMouseEnter,onMouseOver:e.onMouseOver,onMouseLeave:e.onMouseLeave,onClick:e.onClick,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp},f=s.useContext(u).panel,d=(0,y.x1)(f,a);return s.createElement(s.Fragment,null,s.createElement("div",(0,h.Z)({id:l,className:p()("".concat(t,"-content"),n),style:(0,r.Z)({},i),"aria-modal":"true",role:"dialog",ref:d},c),o))},k=n(39205);function x(e){return"string"==typeof e&&String(Number(e))===e?((0,k.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var Z={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function C(e,t){var n,o,a,l,u=e.prefixCls,d=e.open,y=e.placement,k=e.inline,C=e.push,w=e.forceRender,E=e.autoFocus,S=e.keyboard,N=e.classNames,P=e.rootClassName,R=e.rootStyle,O=e.zIndex,F=e.className,A=e.id,I=e.style,M=e.motion,T=e.width,V=e.height,_=e.children,L=e.contentWrapperStyle,D=e.mask,z=e.maskClosable,W=e.maskMotion,$=e.maskClassName,j=e.maskStyle,B=e.afterOpenChange,U=e.onClose,X=e.onMouseEnter,Y=e.onMouseOver,H=e.onMouseLeave,Q=e.onClick,K=e.onKeyDown,q=e.onKeyUp,G=e.styles,J=s.useRef(),ee=s.useRef(),te=s.useRef();s.useImperativeHandle(t,(function(){return J.current})),s.useEffect((function(){var e;d&&E&&(null===(e=J.current)||void 0===e||e.focus({preventScroll:!0}))}),[d]);var ne=s.useState(!1),re=(0,i.Z)(ne,2),ie=re[0],oe=re[1],ae=s.useContext(c),se=null!==(n=null!==(o=null===(a=!1===C?{distance:0}:!0===C?{}:C||{})||void 0===a?void 0:a.distance)&&void 0!==o?o:null==ae?void 0:ae.pushDistance)&&void 0!==n?n:180,le=s.useMemo((function(){return{pushDistance:se,push:function(){oe(!0)},pull:function(){oe(!1)}}}),[se]);s.useEffect((function(){var e,t;d?null==ae||null===(e=ae.push)||void 0===e||e.call(ae):null==ae||null===(t=ae.pull)||void 0===t||t.call(ae)}),[d]),s.useEffect((function(){return function(){var e;null==ae||null===(e=ae.pull)||void 0===e||e.call(ae)}}),[]);var ue=D&&s.createElement(m.ZP,(0,h.Z)({key:"mask"},W,{visible:d}),(function(e,t){var n=e.className,i=e.style;return s.createElement("div",{className:p()("".concat(u,"-mask"),n,null==N?void 0:N.mask,$),style:(0,r.Z)((0,r.Z)((0,r.Z)({},i),j),null==G?void 0:G.mask),onClick:z&&d?U:void 0,ref:t})})),ce="function"==typeof M?M(y):M,fe={};if(ie&&se)switch(y){case"top":fe.transform="translateY(".concat(se,"px)");break;case"bottom":fe.transform="translateY(".concat(-se,"px)");break;case"left":fe.transform="translateX(".concat(se,"px)");break;default:fe.transform="translateX(".concat(-se,"px)")}"left"===y||"right"===y?fe.width=x(T):fe.height=x(V);var he={onMouseEnter:X,onMouseOver:Y,onMouseLeave:H,onClick:Q,onKeyDown:K,onKeyUp:q},de=s.createElement(m.ZP,(0,h.Z)({key:"panel"},ce,{visible:d,forceRender:w,onVisibleChanged:function(e){null==B||B(e)},removeOnLeave:!1,leavedClassName:"".concat(u,"-content-wrapper-hidden")}),(function(t,n){var i=t.className,o=t.style;return s.createElement("div",(0,h.Z)({className:p()("".concat(u,"-content-wrapper"),null==N?void 0:N.wrapper,i),style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},fe),o),L),null==G?void 0:G.wrapper)},(0,g.Z)(e,{data:!0})),s.createElement(b,(0,h.Z)({id:A,containerRef:n,prefixCls:u,className:p()(F,null==N?void 0:N.content),style:(0,r.Z)((0,r.Z)({},I),null==G?void 0:G.content)},he),_))})),pe=(0,r.Z)({},R);return O&&(pe.zIndex=O),s.createElement(c.Provider,{value:le},s.createElement("div",{className:p()(u,"".concat(u,"-").concat(y),P,(l={},(0,f.Z)(l,"".concat(u,"-open"),d),(0,f.Z)(l,"".concat(u,"-inline"),k),l)),style:pe,tabIndex:-1,ref:J,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey;switch(t){case v.Z.TAB:var r;if(t===v.Z.TAB)if(n||document.activeElement!==te.current){if(n&&document.activeElement===ee.current){var i;null===(i=te.current)||void 0===i||i.focus({preventScroll:!0})}}else null===(r=ee.current)||void 0===r||r.focus({preventScroll:!0});break;case v.Z.ESC:U&&S&&(e.stopPropagation(),U(e))}}},ue,s.createElement("div",{tabIndex:0,ref:ee,style:Z,"aria-hidden":"true","data-sentinel":"start"}),de,s.createElement("div",{tabIndex:0,ref:te,style:Z,"aria-hidden":"true","data-sentinel":"end"})))}var w=s.forwardRef(C),E=function(e){var t=e.open,n=void 0!==t&&t,l=e.prefixCls,c=void 0===l?"rc-drawer":l,f=e.placement,h=void 0===f?"right":f,d=e.autoFocus,p=void 0===d||d,m=e.keyboard,v=void 0===m||m,g=e.width,y=void 0===g?378:g,b=e.mask,k=void 0===b||b,x=e.maskClosable,Z=void 0===x||x,C=e.getContainer,E=e.forceRender,S=e.afterOpenChange,N=e.destroyOnClose,P=e.onMouseEnter,R=e.onMouseOver,O=e.onMouseLeave,F=e.onClick,A=e.onKeyDown,I=e.onKeyUp,M=e.panelRef,T=s.useState(!1),V=(0,i.Z)(T,2),_=V[0],L=V[1],D=s.useState(!1),z=(0,i.Z)(D,2),W=z[0],$=z[1];(0,a.Z)((function(){$(!0)}),[]);var j=!!W&&n,B=s.useRef(),U=s.useRef();(0,a.Z)((function(){j&&(U.current=document.activeElement)}),[j]);var X=s.useMemo((function(){return{panel:M}}),[M]);if(!E&&!_&&!j&&N)return null;var Y={onMouseEnter:P,onMouseOver:R,onMouseLeave:O,onClick:F,onKeyDown:A,onKeyUp:I},H=(0,r.Z)((0,r.Z)({},e),{},{open:j,prefixCls:c,placement:h,autoFocus:p,keyboard:v,width:y,mask:k,maskClosable:Z,inline:!1===C,afterOpenChange:function(e){var t,n;L(e),null==S||S(e),e||!U.current||null!==(t=B.current)&&void 0!==t&&t.contains(U.current)||null===(n=U.current)||void 0===n||n.focus({preventScroll:!0})},ref:B},Y);return s.createElement(u.Provider,{value:X},s.createElement(o.Z,{open:j||E||_,autoDestroy:!1,getContainer:C,autoLock:k&&(j||_)},s.createElement(w,H)))}},53394:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(63123),i=n(8270),o=n(55043),a=n(17253),s=n(28766),l=n(92703),u=n.n(l),c=n(6461),f=n(35466),h=n(19110),d=n(61277),p=h.Z.ESC,m=h.Z.TAB,v=(0,f.forwardRef)((function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=(0,f.useMemo)((function(){return"function"==typeof n?n():n}),[n]),a=(0,c.sQ)(t,null==o?void 0:o.ref);return f.createElement(f.Fragment,null,r&&f.createElement("div",{className:"".concat(i,"-arrow")}),f.cloneElement(o,{ref:(0,c.Yr)(o)?a:void 0}))})),g={adjustX:1,adjustY:1},y=[0,0],b={topLeft:{points:["bl","tl"],overflow:g,offset:[0,-4],targetOffset:y},top:{points:["bc","tc"],overflow:g,offset:[0,-4],targetOffset:y},topRight:{points:["br","tr"],overflow:g,offset:[0,-4],targetOffset:y},bottomLeft:{points:["tl","bl"],overflow:g,offset:[0,4],targetOffset:y},bottom:{points:["tc","bc"],overflow:g,offset:[0,4],targetOffset:y},bottomRight:{points:["tr","br"],overflow:g,offset:[0,4],targetOffset:y}},k=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function x(e,t){var n,l=e.arrow,h=void 0!==l&&l,g=e.prefixCls,y=void 0===g?"rc-dropdown":g,x=e.transitionName,Z=e.animation,C=e.align,w=e.placement,E=void 0===w?"bottomLeft":w,S=e.placements,N=void 0===S?b:S,P=e.getPopupContainer,R=e.showAction,O=e.hideAction,F=e.overlayClassName,A=e.overlayStyle,I=e.visible,M=e.trigger,T=void 0===M?["hover"]:M,V=e.autoFocus,_=e.overlay,L=e.children,D=e.onVisibleChange,z=(0,a.Z)(e,k),W=f.useState(),$=(0,o.Z)(W,2),j=$[0],B=$[1],U="visible"in e?I:j,X=f.useRef(null),Y=f.useRef(null),H=f.useRef(null);f.useImperativeHandle(t,(function(){return X.current}));var Q=function(e){B(e),null==D||D(e)};!function(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=f.useRef(!1),s=function(){var e,i;t&&(null===(e=n.current)||void 0===e||null===(i=e.focus)||void 0===i||i.call(e),null==r||r(!1))},l=function(){var e;return!(null===(e=o.current)||void 0===e||!e.focus||(o.current.focus(),a.current=!0,0))},u=function(e){switch(e.keyCode){case p:s();break;case m:var t=!1;a.current||(t=l()),t?e.preventDefault():s()}};f.useEffect((function(){return t?(window.addEventListener("keydown",u),i&&(0,d.Z)(l,3),function(){window.removeEventListener("keydown",u),a.current=!1}):function(){a.current=!1}}),[t])}({visible:U,triggerRef:H,onVisibleChange:Q,autoFocus:V,overlayRef:Y});var K,q,G,J=function(){return f.createElement(v,{ref:Y,overlay:_,prefixCls:y,arrow:h})},ee=f.cloneElement(L,{className:u()(null===(n=L.props)||void 0===n?void 0:n.className,U&&(K=e.openClassName,void 0!==K?K:"".concat(y,"-open"))),ref:(0,c.Yr)(L)?(0,c.sQ)(H,L.ref):void 0}),te=O;return te||-1===T.indexOf("contextMenu")||(te=["click"]),f.createElement(s.Z,(0,r.Z)({builtinPlacements:N},z,{prefixCls:y,ref:X,popupClassName:u()(F,(0,i.Z)({},"".concat(y,"-show-arrow"),h)),popupStyle:A,action:T,showAction:R,hideAction:te,popupPlacement:E,popupAlign:C,popupTransitionName:x,popupAnimation:Z,popupVisible:U,stretch:(q=e.minOverlayWidthMatchTrigger,G=e.alignPoint,("minOverlayWidthMatchTrigger"in e?q:!G)?"minWidth":""),popup:"function"==typeof _?J:J(),onPopupVisibleChange:Q,onPopupClick:function(t){var n=e.onOverlayClick;B(!1),n&&n(t)},getPopupContainer:P}),ee)}var Z=f.forwardRef(x)},23717:function(e,t,n){"use strict";n.d(t,{gN:function(){return H},zb:function(){return x},RV:function(){return ie},aV:function(){return Q},ZM:function(){return Z},ZP:function(){return fe},cI:function(){return ne},qo:function(){return ue}});var r=n(35466),i=n(63123),o=n(17253),a=n(63319),s=n(54390),l=n(36849),u=n(25206),c=n(4913),f=n(64296),h=n(76464),d=n(81928),p=n(76044),m=n(8270),v=n(25227),g=n(32541),y=n(39205),b="RC_FORM_INTERNAL_HOOKS",k=function(){(0,y.ZP)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},x=r.createContext({getFieldValue:k,getFieldsValue:k,getFieldError:k,getFieldWarning:k,getFieldsError:k,isFieldsTouched:k,isFieldTouched:k,isFieldValidating:k,isFieldsValidating:k,resetFields:k,setFields:k,setFieldValue:k,setFieldsValue:k,validateFields:k,submit:k,getInternalHooks:function(){return k(),{dispatch:k,initEntityValue:k,registerField:k,useSubscribe:k,setInitialValues:k,destroyForm:k,setCallbacks:k,registerWatch:k,getFields:k,setValidateMessages:k,setPreserve:k,getInitialValue:k}}}),Z=r.createContext(null);function C(e){return null==e?[]:Array.isArray(e)?e:[e]}var w=n(33771),E="'${name}' is not a valid ${type}",S={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:E,method:E,array:E,object:E,number:E,date:E,boolean:E,integer:E,float:E,regexp:E,email:E,url:E,hex:E},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},N=n(13305),P=w.Z;function R(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}var O="CODE_LOGIC_ERROR";function F(e,t,n,r,i){return A.apply(this,arguments)}function A(){return A=(0,s.Z)((0,a.Z)().mark((function e(t,n,i,o,s){var c,f,h,d,p,v,g,y,b;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(c=(0,l.Z)({},i)).ruleIndex,P.warning=function(){},c.validator&&(f=c.validator,c.validator=function(){try{return f.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(O)}}),h=null,c&&"array"===c.type&&c.defaultField&&(h=c.defaultField,delete c.defaultField),d=new P((0,m.Z)({},t,[c])),p=(0,N.T)(S,o.validateMessages),d.messages(p),v=[],e.prev=10,e.next=13,Promise.resolve(d.validate((0,m.Z)({},t,n),(0,l.Z)({},o)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(v=e.t0.errors.map((function(e,t){var n=e.message,i=n===O?p.default:n;return r.isValidElement(i)?r.cloneElement(i,{key:"error_".concat(t)}):i})));case 18:if(v.length||!h){e.next=23;break}return e.next=21,Promise.all(n.map((function(e,n){return F("".concat(t,".").concat(n),e,h,o,s)})));case 21:return g=e.sent,e.abrupt("return",g.reduce((function(e,t){return[].concat((0,u.Z)(e),(0,u.Z)(t))}),[]));case 23:return y=(0,l.Z)((0,l.Z)({},i),{},{name:t,enum:(i.enum||[]).join(", ")},s),b=v.map((function(e){return"string"==typeof e?R(e,y):e})),e.abrupt("return",b);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),A.apply(this,arguments)}function I(e,t,n,r,i,o){var u,c=e.join("."),f=n.map((function(e,t){var n=e.validator,r=(0,l.Z)((0,l.Z)({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var i=!1,o=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return W(t,e,n)}))}function W(e,t){return!(!e||!t)&&!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t}))}function $(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,V.Z)(t.target)&&e in t.target?t.target[e]:t}function j(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat((0,u.Z)(e.slice(0,n)),[i],(0,u.Z)(e.slice(n,t)),(0,u.Z)(e.slice(t+1,r))):o<0?[].concat((0,u.Z)(e.slice(0,t)),(0,u.Z)(e.slice(t+1,n+1)),[i],(0,u.Z)(e.slice(n+1,r))):e}var B=["name"],U=[];function X(e,t,n,r,i,o){return"function"==typeof e?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var Y=function(e){(0,d.Z)(n,e);var t=(0,p.Z)(n);function n(e){var i;return(0,c.Z)(this,n),i=t.call(this,e),(0,m.Z)((0,h.Z)(i),"state",{resetCount:0}),(0,m.Z)((0,h.Z)(i),"cancelRegisterFunc",null),(0,m.Z)((0,h.Z)(i),"mounted",!1),(0,m.Z)((0,h.Z)(i),"touched",!1),(0,m.Z)((0,h.Z)(i),"dirty",!1),(0,m.Z)((0,h.Z)(i),"validatePromise",void 0),(0,m.Z)((0,h.Z)(i),"prevValidating",void 0),(0,m.Z)((0,h.Z)(i),"errors",U),(0,m.Z)((0,h.Z)(i),"warnings",U),(0,m.Z)((0,h.Z)(i),"cancelRegister",(function(){var e=i.props,t=e.preserve,n=e.isListField,r=e.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(n,t,L(r)),i.cancelRegisterFunc=null})),(0,m.Z)((0,h.Z)(i),"getNamePath",(function(){var e=i.props,t=e.name,n=e.fieldContext.prefixName,r=void 0===n?[]:n;return void 0!==t?[].concat((0,u.Z)(r),(0,u.Z)(t)):[]})),(0,m.Z)((0,h.Z)(i),"getRules",(function(){var e=i.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(r):e}))})),(0,m.Z)((0,h.Z)(i),"refresh",(function(){i.mounted&&i.setState((function(e){return{resetCount:e.resetCount+1}}))})),(0,m.Z)((0,h.Z)(i),"metaCache",null),(0,m.Z)((0,h.Z)(i),"triggerMetaEvent",(function(e){var t=i.props.onMetaChange;if(t){var n=(0,l.Z)((0,l.Z)({},i.getMeta()),{},{destroy:e});(0,g.Z)(i.metaCache,n)||t(n),i.metaCache=n}else i.metaCache=null})),(0,m.Z)((0,h.Z)(i),"onStoreChange",(function(e,t,n){var r=i.props,o=r.shouldUpdate,a=r.dependencies,s=void 0===a?[]:a,l=r.onReset,u=n.store,c=i.getNamePath(),f=i.getValue(e),h=i.getValue(u),d=t&&z(t,c);switch("valueUpdate"===n.type&&"external"===n.source&&f!==h&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=U,i.warnings=U,i.triggerMetaEvent()),n.type){case"reset":if(!t||d)return i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=U,i.warnings=U,i.triggerMetaEvent(),null==l||l(),void i.refresh();break;case"remove":if(o)return void i.reRender();break;case"setField":var p=n.data;if(d)return"touched"in p&&(i.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(i.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(i.errors=p.errors||U),"warnings"in p&&(i.warnings=p.warnings||U),i.dirty=!0,i.triggerMetaEvent(),void i.reRender();if("value"in p&&z(t,c,!0))return void i.reRender();if(o&&!c.length&&X(o,e,u,f,h,n))return void i.reRender();break;case"dependenciesUpdate":if(s.map(L).some((function(e){return z(n.relatedFields,e)})))return void i.reRender();break;default:if(d||(!s.length||c.length||o)&&X(o,e,u,f,h,n))return void i.reRender()}!0===o&&i.reRender()})),(0,m.Z)((0,h.Z)(i),"validateRules",(function(e){var t=i.getNamePath(),n=i.getValue(),r=e||{},o=r.triggerName,l=r.validateOnly,c=void 0!==l&&l,f=Promise.resolve().then((0,s.Z)((0,a.Z)().mark((function r(){var s,l,c,h,d,p,m;return(0,a.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(s=i.props,l=s.validateFirst,c=void 0!==l&&l,h=s.messageVariables,d=s.validateDebounce,p=i.getRules(),o&&(p=p.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||C(t).includes(o)}))),!d||!o){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(i.validatePromise===f){r.next=10;break}return r.abrupt("return",[]);case 10:return(m=I(t,n,p,e,c,h)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;if(i.validatePromise===f){var t;i.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors,o=void 0===i?U:i;t?r.push.apply(r,(0,u.Z)(o)):n.push.apply(n,(0,u.Z)(o))})),i.errors=n,i.warnings=r,i.triggerMetaEvent(),i.reRender()}})),r.abrupt("return",m);case 13:case"end":return r.stop()}}),r)}))));return c||(i.validatePromise=f,i.dirty=!0,i.errors=U,i.warnings=U,i.triggerMetaEvent(),i.reRender()),f})),(0,m.Z)((0,h.Z)(i),"isFieldValidating",(function(){return!!i.validatePromise})),(0,m.Z)((0,h.Z)(i),"isFieldTouched",(function(){return i.touched})),(0,m.Z)((0,h.Z)(i),"isFieldDirty",(function(){return!(!i.dirty&&void 0===i.props.initialValue)||void 0!==(0,i.props.fieldContext.getInternalHooks(b).getInitialValue)(i.getNamePath())})),(0,m.Z)((0,h.Z)(i),"getErrors",(function(){return i.errors})),(0,m.Z)((0,h.Z)(i),"getWarnings",(function(){return i.warnings})),(0,m.Z)((0,h.Z)(i),"isListField",(function(){return i.props.isListField})),(0,m.Z)((0,h.Z)(i),"isList",(function(){return i.props.isList})),(0,m.Z)((0,h.Z)(i),"isPreserve",(function(){return i.props.preserve})),(0,m.Z)((0,h.Z)(i),"getMeta",(function(){return i.prevValidating=i.isFieldValidating(),{touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:null===i.validatePromise}})),(0,m.Z)((0,h.Z)(i),"getOnlyChild",(function(e){if("function"==typeof e){var t=i.getMeta();return(0,l.Z)((0,l.Z)({},i.getOnlyChild(e(i.getControlled(),t,i.props.fieldContext))),{},{isFunction:!0})}var n=(0,v.Z)(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}})),(0,m.Z)((0,h.Z)(i),"getValue",(function(e){var t=i.props.fieldContext.getFieldsValue,n=i.getNamePath();return(0,_.Z)(e||t(!0),n)})),(0,m.Z)((0,h.Z)(i),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.props,n=t.trigger,r=t.validateTrigger,o=t.getValueFromEvent,a=t.normalize,s=t.valuePropName,u=t.getValueProps,c=t.fieldContext,f=void 0!==r?r:c.validateTrigger,h=i.getNamePath(),d=c.getInternalHooks,p=c.getFieldsValue,v=d(b).dispatch,g=i.getValue(),y=u||function(e){return(0,m.Z)({},s,e)},k=e[n],x=(0,l.Z)((0,l.Z)({},e),y(g));return x[n]=function(){var e;i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r=0&&t<=n.length?(h.keys=[].concat((0,u.Z)(h.keys.slice(0,t)),[h.id],(0,u.Z)(h.keys.slice(t))),o([].concat((0,u.Z)(n.slice(0,t)),[e],(0,u.Z)(n.slice(t))))):(h.keys=[].concat((0,u.Z)(h.keys),[h.id]),o([].concat((0,u.Z)(n),[e]))),h.id+=1},remove:function(e){var t=s(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(h.keys=h.keys.filter((function(e,t){return!n.has(t)})),o(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=s();e<0||e>=n.length||t<0||t>=n.length||(h.keys=j(h.keys,e,t),o(j(n,e,t)))}}},f=r||[];return Array.isArray(f)||(f=[]),i(f.map((function(e,t){var n=h.keys[t];return void 0===n&&(h.keys[t]=h.id,n=h.keys[t],h.id+=1),{name:t,key:n,isListField:!0}})),l,t)}))))},K=n(55043),q="__@field_split__";function G(e){return e.map((function(e){return"".concat((0,V.Z)(e),":").concat(e)})).join(q)}var J=function(){function e(){(0,c.Z)(this,e),(0,m.Z)(this,"kvs",new Map)}return(0,f.Z)(e,[{key:"set",value:function(e,t){this.kvs.set(G(e),t)}},{key:"get",value:function(e){return this.kvs.get(G(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(G(e))}},{key:"map",value:function(e){return(0,u.Z)(this.kvs.entries()).map((function(t){var n=(0,K.Z)(t,2),r=n[0],i=n[1],o=r.split(q);return e({key:o.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,K.Z)(t,3),r=n[1],i=n[2];return"number"===r?Number(i):i})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}(),ee=["name"],te=(0,f.Z)((function e(t){var n=this;(0,c.Z)(this,e),(0,m.Z)(this,"formHooked",!1),(0,m.Z)(this,"forceRootUpdate",void 0),(0,m.Z)(this,"subscribable",!0),(0,m.Z)(this,"store",{}),(0,m.Z)(this,"fieldEntities",[]),(0,m.Z)(this,"initialValues",{}),(0,m.Z)(this,"callbacks",{}),(0,m.Z)(this,"validateMessages",null),(0,m.Z)(this,"preserve",null),(0,m.Z)(this,"lastValidatePromise",null),(0,m.Z)(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),(0,m.Z)(this,"getInternalHooks",(function(e){return e===b?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,y.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),(0,m.Z)(this,"useSubscribe",(function(e){n.subscribable=e})),(0,m.Z)(this,"prevWithoutPreserves",null),(0,m.Z)(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,i=(0,N.T)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;i=(0,N.Z)(i,n,(0,_.Z)(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}})),(0,m.Z)(this,"destroyForm",(function(){var e=new J;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e})),(0,m.Z)(this,"getInitialValue",(function(e){var t=(0,_.Z)(n.initialValues,e);return e.length?(0,N.T)(t):t})),(0,m.Z)(this,"setCallbacks",(function(e){n.callbacks=e})),(0,m.Z)(this,"setValidateMessages",(function(e){n.validateMessages=e})),(0,m.Z)(this,"setPreserve",(function(e){n.preserve=e})),(0,m.Z)(this,"watchList",[]),(0,m.Z)(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),(0,m.Z)(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),(0,m.Z)(this,"timeoutId",null),(0,m.Z)(this,"warningUnhooked",(function(){})),(0,m.Z)(this,"updateStore",(function(e){n.store=e})),(0,m.Z)(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),(0,m.Z)(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new J;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),(0,m.Z)(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=L(e);return t.get(n)||{INVALIDATE_NAME_PATH:L(e)}}))})),(0,m.Z)(this,"getFieldsValue",(function(e,t){var r,i,o;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,i=t):e&&"object"===(0,V.Z)(e)&&(o=e.strict,i=e.filter),!0===r&&!i)return n.store;var a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return a.forEach((function(e){var t,n,a,l,u="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(o){if(null!==(a=(l=e).isList)&&void 0!==a&&a.call(l))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(i){var c="getMeta"in e?e.getMeta():null;i(c)&&s.push(u)}else s.push(u)})),D(n.store,s.map(L))})),(0,m.Z)(this,"getFieldValue",(function(e){n.warningUnhooked();var t=L(e);return(0,_.Z)(n.store,t)})),(0,m.Z)(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:L(e[n]),errors:[],warnings:[]}}))})),(0,m.Z)(this,"getFieldError",(function(e){n.warningUnhooked();var t=L(e);return n.getFieldsError([t])[0].errors})),(0,m.Z)(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=L(e);return n.getFieldsError([t])[0].warnings})),(0,m.Z)(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=new J,i=n.getFieldEntities(!0);i.forEach((function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var i=r.get(n)||new Set;i.add({entity:e,value:t}),r.set(n,i)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var n,i=r.get(t);i&&(n=e).push.apply(n,(0,u.Z)((0,u.Z)(i).map((function(e){return e.entity}))))}))):e=i,e.forEach((function(e){if(void 0!==e.props.initialValue){var i=e.getNamePath();if(void 0!==n.getInitialValue(i))(0,y.ZP)(!1,"Form already set 'initialValues' with path '".concat(i.join("."),"'. Field can not overwrite it."));else{var o=r.get(i);if(o&&o.size>1)(0,y.ZP)(!1,"Multiple Field with path '".concat(i.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(o){var a=n.getFieldValue(i);e.isListField()||t.skipExist&&void 0!==a||n.updateStore((0,N.Z)(n.store,i,(0,u.Z)(o)[0].value))}}}}))})),(0,m.Z)(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore((0,N.T)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(L);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore((0,N.Z)(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),(0,m.Z)(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var i=e.name,a=(0,o.Z)(e,ee),s=L(i);r.push(s),"value"in a&&n.updateStore((0,N.Z)(n.store,s,a.value)),n.notifyObservers(t,[s],{type:"setField",data:e})})),n.notifyWatch(r)})),(0,m.Z)(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),i=(0,l.Z)((0,l.Z)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(i,"originRCField",{value:!0}),i}))})),(0,m.Z)(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,_.Z)(n.store,r)&&n.updateStore((0,N.Z)(n.store,r,t))}})),(0,m.Z)(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null==t||t})),(0,m.Z)(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!r||o.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every((function(e){return!W(e.getNamePath(),t)}))){var s=n.store;n.updateStore((0,N.Z)(s,t,a,!0)),n.notifyObservers(s,[t],{type:"remove"}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}})),(0,m.Z)(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var i=e.namePath,o=e.triggerName;n.validateFields([i],{triggerName:o})}})),(0,m.Z)(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var i=(0,l.Z)((0,l.Z)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()})),(0,m.Z)(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,u.Z)(r))}),r})),(0,m.Z)(this,"updateValue",(function(e,t){var r=L(e),i=n.store;n.updateStore((0,N.Z)(n.store,r,t)),n.notifyObservers(i,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var o=n.triggerDependenciesUpdate(i,r),a=n.callbacks.onValuesChange;a&&a(D(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat((0,u.Z)(o)))})),(0,m.Z)(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,N.T)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),(0,m.Z)(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t}])})),(0,m.Z)(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],i=new J;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=L(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(r.push(i),e(i))}}))}(e),r})),(0,m.Z)(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var i=n.getFields();if(t){var o=new J;t.forEach((function(e){var t=e.name,n=e.errors;o.set(t,n)})),i.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}var a=i.filter((function(t){var n=t.name;return z(e,n)}));a.length&&r(a,i)}})),(0,m.Z)(this,"validateFields",(function(e,t){var r,i;n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(r=e,i=t):i=e;var o=!!r,a=o?r.map(L):[],s=[],c=String(Date.now()),f=new Set,h=i||{},d=h.recursive,p=h.dirty;n.getFieldEntities(!0).forEach((function(e){if(o||a.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!p||e.isFieldDirty())){var t=e.getNamePath();if(f.add(t.join(c)),!o||z(a,t,d)){var r=e.validateRules((0,l.Z)({validateMessages:(0,l.Z)((0,l.Z)({},S),n.validateMessages)},i));s.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],i=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?i.push.apply(i,(0,u.Z)(n)):r.push.apply(r,(0,u.Z)(n))})),r.length?Promise.reject({name:t,errors:r,warnings:i}):{name:t,errors:r,warnings:i}})))}}}));var m=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(i,o){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&o(r),i(r))}))}))})):Promise.resolve([])}(s);n.lastValidatePromise=m,m.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var v=m.then((function(){return n.lastValidatePromise===m?Promise.resolve(n.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(a),errorFields:t,outOfDate:n.lastValidatePromise!==m})}));v.catch((function(e){return e}));var g=a.filter((function(e){return f.has(e.join(c))}));return n.triggerOnFieldsChange(g),v})),(0,m.Z)(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t})),ne=function(e){var t=r.useRef(),n=r.useState({}),i=(0,K.Z)(n,2)[1];if(!t.current)if(e)t.current=e;else{var o=new te((function(){i({})}));t.current=o.getForm()}return[t.current]},re=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),ie=function(e){var t=e.validateMessages,n=e.onFormChange,i=e.onFormFinish,o=e.children,a=r.useContext(re),s=r.useRef({});return r.createElement(re.Provider,{value:(0,l.Z)((0,l.Z)({},a),{},{validateMessages:(0,l.Z)((0,l.Z)({},a.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){i&&i(e,{values:t,forms:s.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=(0,l.Z)((0,l.Z)({},s.current),{},(0,m.Z)({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=(0,l.Z)({},s.current);delete t[e],s.current=t,a.unregisterForm(e)}})},o)},oe=re,ae=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],se=function(e,t){var n=e.name,a=e.initialValues,s=e.fields,c=e.form,f=e.preserve,h=e.children,d=e.component,p=void 0===d?"form":d,m=e.validateMessages,v=e.validateTrigger,g=void 0===v?"onChange":v,y=e.onValuesChange,k=e.onFieldsChange,C=e.onFinish,w=e.onFinishFailed,E=(0,o.Z)(e,ae),S=r.useContext(oe),N=ne(c),P=(0,K.Z)(N,1)[0],R=P.getInternalHooks(b),O=R.useSubscribe,F=R.setInitialValues,A=R.setCallbacks,I=R.setValidateMessages,M=R.setPreserve,T=R.destroyForm;r.useImperativeHandle(t,(function(){return P})),r.useEffect((function(){return S.registerForm(n,P),function(){S.unregisterForm(n)}}),[S,P,n]),I((0,l.Z)((0,l.Z)({},S.validateMessages),m)),A({onValuesChange:y,onFieldsChange:function(e){if(S.triggerFormChange(n,e),k){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;ir){if(t>0)return(0,o.Z)({},e,a);if(t<0&&ir)return(0,o.Z)({},e,t<0?a:-a);return{}}function S(e,t,n,r){var o=(0,f.g1)(),a=o.width,s=o.height,l=null;return e<=a&&t<=s?l={x:0,y:0}:(e>a||t>s)&&(l=(0,i.Z)((0,i.Z)({},E("x",n,e,a)),E("y",r,t,s))),l}function N(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}var P=n(79112),R=n(45231),O=function(e){var t=e.visible,n=e.maskTransitionName,r=e.getContainer,a=e.prefixCls,s=e.rootClassName,l=e.icons,u=e.countRender,f=e.showSwitch,h=e.showProgress,p=e.current,v=e.transform,g=e.count,y=e.scale,b=e.minScale,x=e.maxScale,Z=e.closeIcon,C=e.onSwitchLeft,w=e.onSwitchRight,E=e.onClose,S=e.onZoomIn,N=e.onZoomOut,O=e.onRotateRight,F=e.onRotateLeft,A=e.onFlipX,I=e.onFlipY,M=e.toolbarRender,T=e.zIndex,V=(0,d.useContext)(m),_=l.rotateLeft,L=l.rotateRight,D=l.zoomIn,z=l.zoomOut,W=l.close,$=l.left,j=l.right,B=l.flipX,U=l.flipY,X="".concat(a,"-operations-operation");d.useEffect((function(){var e=function(e){e.keyCode===k.Z.ESC&&E()};return t&&window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t]);var Y=[{icon:U,onClick:I,type:"flipY"},{icon:B,onClick:A,type:"flipX"},{icon:_,onClick:F,type:"rotateLeft"},{icon:L,onClick:O,type:"rotateRight"},{icon:z,onClick:N,type:"zoomOut",disabled:y<=b},{icon:D,onClick:S,type:"zoomIn",disabled:y===x}].map((function(e){var t,n=e.icon,r=e.onClick,i=e.type,s=e.disabled;return d.createElement("div",{className:c()(X,(t={},(0,o.Z)(t,"".concat(a,"-operations-operation-").concat(i),!0),(0,o.Z)(t,"".concat(a,"-operations-operation-disabled"),!!s),t)),onClick:r,key:i},n)})),H=d.createElement("div",{className:"".concat(a,"-operations")},Y);return d.createElement(R.ZP,{visible:t,motionName:n},(function(e){var t=e.className,n=e.style;return d.createElement(P.Z,{open:!0,getContainer:null!=r?r:document.body},d.createElement("div",{className:c()("".concat(a,"-operations-wrapper"),t,s),style:(0,i.Z)((0,i.Z)({},n),{},{zIndex:T})},null===Z?null:d.createElement("button",{className:"".concat(a,"-close"),onClick:E},Z||W),f&&d.createElement(d.Fragment,null,d.createElement("div",{className:c()("".concat(a,"-switch-left"),(0,o.Z)({},"".concat(a,"-switch-left-disabled"),0===p)),onClick:C},$),d.createElement("div",{className:c()("".concat(a,"-switch-right"),(0,o.Z)({},"".concat(a,"-switch-right-disabled"),p===g-1)),onClick:w},j)),d.createElement("div",{className:"".concat(a,"-footer")},h&&d.createElement("div",{className:"".concat(a,"-progress")},u?u(p+1,g):"".concat(p+1," / ").concat(g)),M?M(H,(0,i.Z)({icons:{flipYIcon:Y[0],flipXIcon:Y[1],rotateLeftIcon:Y[2],rotateRightIcon:Y[3],zoomOutIcon:Y[4],zoomInIcon:Y[5]},actions:{onFlipY:I,onFlipX:A,onRotateLeft:F,onRotateRight:O,onZoomOut:N,onZoomIn:S},transform:v},V?{current:p,total:g}:{})):H)))}))},F=["fallback","src","imgRef"],A=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],I=function(e){var t=e.fallback,n=e.src,i=e.imgRef,o=(0,l.Z)(e,F),s=g({src:n,fallback:t}),u=(0,a.Z)(s,2),c=u[0],f=u[1];return d.createElement("img",(0,r.Z)({ref:function(e){i.current=e,c(e)}},o,f))},M=function(e){var t=e.prefixCls,n=e.src,s=e.alt,u=e.fallback,h=e.movable,p=void 0===h||h,v=e.onClose,g=e.visible,E=e.icons,P=void 0===E?{}:E,R=e.rootClassName,F=e.closeIcon,M=e.getContainer,T=e.current,V=void 0===T?0:T,_=e.count,L=void 0===_?1:_,D=e.countRender,z=e.scaleStep,W=void 0===z?.5:z,$=e.minScale,j=void 0===$?1:$,B=e.maxScale,U=void 0===B?50:B,X=e.transitionName,Y=void 0===X?"zoom":X,H=e.maskTransitionName,Q=void 0===H?"fade":H,K=e.imageRender,q=e.imgCommonProps,G=e.toolbarRender,J=e.onTransform,ee=e.onChange,te=(0,l.Z)(e,A),ne=(0,d.useRef)(),re=(0,d.useContext)(m),ie=re&&L>1,oe=re&&L>=1,ae=(0,d.useState)(!0),se=(0,a.Z)(ae,2),le=se[0],ue=se[1],ce=function(e,t,n,r){var o=(0,d.useRef)(null),s=(0,d.useRef)([]),l=(0,d.useState)(C),u=(0,a.Z)(l,2),c=u[0],h=u[1],p=function(e,t){null===o.current&&(s.current=[],o.current=(0,Z.Z)((function(){h((function(e){var n=e;return s.current.forEach((function(e){n=(0,i.Z)((0,i.Z)({},n),e)})),o.current=null,null==r||r({transform:n,action:t}),n}))}))),s.current.push((0,i.Z)((0,i.Z)({},c),e))};return{transform:c,resetTransform:function(e){h(C),r&&!(0,x.Z)(C,c)&&r({transform:C,action:e})},updateTransform:p,dispatchZoomChange:function(r,i,o,a,s){var l=e.current,u=l.width,h=l.height,d=l.offsetWidth,m=l.offsetHeight,v=l.offsetLeft,g=l.offsetTop,y=r,b=c.scale*r;b>n?(b=n,y=n/c.scale):b0&&(i=1/i),l(i,"wheel",e.clientX,e.clientY)}}}}(ne,p,g,W,fe,de,pe),ve=me.isMoving,ge=me.onMouseDown,ye=me.onWheel,be=function(e,t,n,r,o,s,l){var u=o.rotate,c=o.scale,f=o.x,h=o.y,p=(0,d.useState)(!1),m=(0,a.Z)(p,2),v=m[0],g=m[1],y=(0,d.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),k=function(e){y.current=(0,i.Z)((0,i.Z)({},y.current),e)};return(0,d.useEffect)((function(){var e;return n&&t&&(e=(0,b.Z)(window,"touchmove",(function(e){return e.preventDefault()}),{passive:!1})),function(){var t;null===(t=e)||void 0===t||t.remove()}}),[n,t]),{isTouching:v,onTouchStart:function(e){if(t){e.stopPropagation(),g(!0);var n=e.touches,r=void 0===n?[]:n;r.length>1?k({point1:{x:r[0].clientX,y:r[0].clientY},point2:{x:r[1].clientX,y:r[1].clientY},eventType:"touchZoom"}):k({point1:{x:r[0].clientX-f,y:r[0].clientY-h},eventType:"move"})}},onTouchMove:function(e){var t=e.touches,n=void 0===t?[]:t,r=y.current,i=r.point1,o=r.point2,u=r.eventType;if(n.length>1&&"touchZoom"===u){var c={x:n[0].clientX,y:n[0].clientY},f={x:n[1].clientX,y:n[1].clientY},h=function(e,t,n,r){var i=N(e,n),o=N(t,r);if(0===i&&0===o)return[e.x,e.y];var a=i/(i+o);return[e.x+a*(t.x-e.x),e.y+a*(t.y-e.y)]}(i,o,c,f),d=(0,a.Z)(h,2),p=d[0],m=d[1],v=N(c,f)/N(i,o);l(v,"touchZoom",p,m,!0),k({point1:c,point2:f,eventType:"touchZoom"})}else"move"===u&&(s({x:n[0].clientX-i.x,y:n[0].clientY-i.y},"move"),k({eventType:"move"}))},onTouchEnd:function(){if(n){if(v&&g(!1),k({eventType:"none"}),r>c)return s({x:0,y:0,scale:r},"touchZoom");var t=e.current.offsetWidth*c,o=e.current.offsetHeight*c,a=e.current.getBoundingClientRect(),l=a.left,f=a.top,h=u%180!=0,d=S(h?o:t,h?t:o,l,f);d&&s((0,i.Z)({},d),"dragRebound")}}}}(ne,p,g,j,fe,de,pe),ke=be.isTouching,xe=be.onTouchStart,Ze=be.onTouchMove,Ce=be.onTouchEnd,we=fe.rotate,Ee=fe.scale,Se=c()((0,o.Z)({},"".concat(t,"-moving"),ve));(0,d.useEffect)((function(){le||ue(!0)}),[le]);var Ne=function(e){null==e||e.preventDefault(),null==e||e.stopPropagation(),V>0&&(ue(!1),he("prev"),null==ee||ee(V-1,V))},Pe=function(e){null==e||e.preventDefault(),null==e||e.stopPropagation(),V{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=u.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}a.closedBy=new a({deserialize:e=>e.split(" ")}),a.openedBy=new a({deserialize:e=>e.split(" ")}),a.group=new a({deserialize:e=>e.split(" ")}),a.contextHash=new a({perNode:!0}),a.lookAhead=new a({perNode:!0}),a.mounted=new a({perNode:!0});class s{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[a.mounted.id]}}const l=Object.create(null);class u{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):l,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new u(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(a.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(a.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}u.none=new u("",Object.create(null),0,8);class c{constructor(e){this.types=e;for(let t=0;t=t){let a=new k(o.tree,o.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(y(a,t,n,!1))}}return i?E(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,o=e.mode||0,a=(o&d.IncludeAnonymous)>0;for(let e=this.cursor(o|d.IncludeAnonymous);;){let o=!1;if(e.from<=i&&e.to>=r&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;o=!0}for(;o&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:F(u.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new p(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new p(u.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:o=r,reused:s=[],minRepeatType:l=i.types.length}=e,u=Array.isArray(n)?new m(n,n.length):n,c=i.types,f=0,h=0;function d(e,t,n,r,m,x){let{id:Z,start:C,end:w,size:E}=u,S=h;for(;E<0;){if(u.next(),-1==E){let t=s[Z];return n.push(t),void r.push(C-e)}if(-3==E)return void(f=Z);if(-4==E)return void(h=Z);throw new RangeError(`Unrecognized record size: ${E}`)}let N,P,R=c[Z],O=C-e;if(w-C<=o&&(P=function(e,t){let n=u.fork(),r=0,i=0,a=0,s=n.end-o,c={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){c.size=r,c.start=i,c.skip=a,a+=4,r+=4,n.next();continue}let u=n.pos-e;if(e<0||u=l?4:0,h=n.start;for(n.next();n.pos>u;){if(n.size<0){if(-3!=n.size)break e;f+=4}else n.id>=l&&(f+=4);n.next()}i=h,r+=e,a+=f}return(t<0||r==e)&&(c.size=r,c.start=i,c.skip=a),c.size>4?c:void 0}(u.pos-t,m))){let t=new Uint16Array(P.size-P.skip),n=u.pos-P.size,r=t.length;for(;u.pos>n;)r=k(P.start,t,r);N=new v(t,w-P.start,i),O=P.start-e}else{let e=u.pos-E;u.next();let t=[],n=[],r=Z>=l?Z:-1,i=0,s=w;for(;u.pos>e;)r>=0&&u.id==r&&u.size>=0?(u.end<=s-o&&(y(t,n,C,i,u.end,s,r,S),i=t.length,s=u.end),u.next()):x>2500?g(C,e,t,n):d(C,e,t,n,r,x+1);if(r>=0&&i>0&&i-1&&i>0){let e=function(e){return(t,n,r)=>{let i,o,s=0,l=t.length-1;if(l>=0&&(i=t[l])instanceof p){if(!l&&i.type==e&&i.length==r)return i;(o=i.prop(a.lookAhead))&&(s=n[l]+i.length+o)}return b(e,t,n,r,s)}}(R);N=F(R,t,n,0,t.length,0,w-C,e,e)}else N=b(R,t,n,w-C,S-w)}n.push(N),r.push(O)}function g(e,t,n,r){let a=[],s=0,l=-1;for(;u.pos>t;){let{id:e,start:t,end:n,size:r}=u;if(r>4)u.next();else{if(l>-1&&t=0;e-=3)t[n++]=a[e],t[n++]=a[e+1]-o,t[n++]=a[e+2]-o,t[n++]=n;n.push(new v(t,a[2]-o,i)),r.push(o-e)}}function y(e,t,n,r,o,a,s,l){let u=[],c=[];for(;e.length>r;)u.push(e.pop()),c.push(t.pop()+n-o);e.push(b(i.types[s],u,c,a-o,l-a)),t.push(o-n)}function b(e,t,n,r,i=0,o){if(f){let e=[a.contextHash,f];o=o?[e].concat(o):[e]}if(i>25){let e=[a.lookAhead,i];o=o?[e].concat(o):[e]}return new p(e,t,n,r,o)}function k(e,t,n){let{id:r,start:i,end:o,size:a}=u;if(u.next(),a>=0&&r4){let r=u.pos-(a-4);for(;u.pos>r;)n=k(e,t,n)}t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==a?f=r:-4==a&&(h=r);return n}let x=[],Z=[];for(;u.pos>0;)d(e.start||0,e.bufferStart||0,x,Z,-1,0);let C=null!==(t=e.length)&&void 0!==t?t:x.length?Z[0]+x[0].length:0;return new p(c[e.topID],x.reverse(),Z.reverse(),C)}(e)}}p.empty=new p(u.none,[],[],0);class m{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new m(this.buffer,this.index)}}class v{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return u.none}toString(){let e=[];for(let t=0;t0));s=o[s+3]);return a}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let a=e,s=0;a=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function y(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?a.length:-1;e!=u;e+=t){let u=a[e],c=l[e]+o.from;if(g(r,n,c,c+u.length))if(u instanceof v){if(i&d.ExcludeBuffers)continue;let a=u.findChild(0,u.buffer.length,t,n-c,r);if(a>-1)return new w(new C(o,u,e,c),null,a)}else if(i&d.IncludeAnonymous||!u.type.isAnonymous||P(u)){let a;if(!(i&d.IgnoreMounts)&&(a=s.get(u))&&!a.overlay)return new k(a.tree,c,e,o);let l=new k(u,c,e,o);return i&d.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?u.children.length-1:0,t,n,r)}}if(i&d.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&d.IgnoreOverlays)&&(r=s.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e=n:i>n))return new k(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function x(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function Z(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class C{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class w extends b{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new w(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&d.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new w(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new w(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new w(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new p(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function E(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||i.to0){if(this.index-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&d.IncludeAnonymous||e instanceof v||!e.type.isAnonymous||P(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(let e=n;e=0;i--){if(i<0)return Z(this.node,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function P(e){return e.children.some((e=>e instanceof v||!e.type.isAnonymous||P(e)))}const R=new WeakMap;function O(e,t){if(!e.isAnonymous||t instanceof v||t.type!=e)return 1;let n=R.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof p)){n=1;break}n+=O(e,r)}R.set(t,n)}return n}function F(e,t,n,r,i,o,a,s,l){let u=0;for(let n=r;n=c)break;p+=t}if(u==i+1){if(p>c){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+s);continue}f.push(n[i])}else{let t=r[u-1]+n[u-1].length-d;f.push(F(e,n,r,i,u,d,t,null,l))}h.push(d+s-o)}}(t,n,r,i,0),(s||l)(f,h,a)}class A{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new A(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let u=a=n)for(;o&&o.from=t.from||c<=t.to||l){let e=Math.max(t.from,s)-l,n=Math.min(t.to,c)-l;t=e>=n?null:new A(e,n,t.tree,t.offset+l,a>0,!!u)}if(t&&r.push(t),o.to>c)break;o=inew o(e.from,e.to))):[new o(0,0)]:[new o(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class M{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new a({perNode:!0})},17550:function(e,t,n){"use strict";n.d(t,{Gv:function(){return l},QR:function(){return f},bW:function(){return h},pJ:function(){return R}});var r=n(37979);let i=0;class o{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=i++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new o([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new s;return t=>t.modified.indexOf(e)>-1?t:s.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let a=0;class s{constructor(){this.instances=[],this.id=a++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>{return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every(((e,t)=>e==i[t])));var r,i}));if(n)return n;let r=[],i=new o(r,e,t);for(let e of t)e.instances.push(i);let a=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of a)r.push(s.get(t,e));return i}}function l(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){i=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let a=n.length-1,s=n[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new c(r,i,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return u.add(t)}const u=new r.md;class c{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function h(e,t,n,r=0,i=e.length){let o=new d(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}c.empty=new c([],2,null);class d{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,o){let{type:a,from:s,to:l}=e;if(s>=n||l<=t)return;a.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(a))));let f=i,h=function(e){let t=e.type.prop(u);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||c.empty,d=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(o,h.tags);if(d&&(f&&(f+=" "),f+=d,1==h.mode&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(t,s),f),h.opaque)return;let p=e.tree&&e.tree.prop(r.md.mounted);if(p&&p.overlay){let r=e.node.enter(p.overlay[0].from+s,1),a=this.highlighters.filter((e=>!e.scope||e.scope(p.tree.type))),u=e.firstChild();for(let c=0,h=s;;c++){let d=c=m)&&e.nextSibling()););if(!d||m>n)break;h=d.to+s,h>t&&(this.highlightRange(r.cursor(),Math.max(t,d.from+s),Math.min(n,h),"",a),this.startSpan(Math.min(n,h),f))}u&&e.parent()}else if(e.firstChild()){p&&(i="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,o),this.startSpan(Math.min(n,e.to),f)}}while(e.nextSibling());e.parent()}}}const p=o.define,m=p(),v=p(),g=p(v),y=p(v),b=p(),k=p(b),x=p(b),Z=p(),C=p(Z),w=p(),E=p(),S=p(),N=p(S),P=p(),R={comment:m,lineComment:p(m),blockComment:p(m),docComment:p(m),name:v,variableName:p(v),typeName:g,tagName:p(g),propertyName:y,attributeName:p(y),className:p(v),labelName:p(v),namespace:p(v),macroName:p(v),literal:b,string:k,docString:p(k),character:p(k),attributeValue:p(k),number:x,integer:p(x),float:p(x),bool:p(b),regexp:p(b),escape:p(b),color:p(b),url:p(b),keyword:w,self:p(w),null:p(w),atom:p(w),unit:p(w),modifier:p(w),operatorKeyword:p(w),controlKeyword:p(w),definitionKeyword:p(w),moduleKeyword:p(w),operator:E,derefOperator:p(E),arithmeticOperator:p(E),logicOperator:p(E),bitwiseOperator:p(E),compareOperator:p(E),updateOperator:p(E),definitionOperator:p(E),typeOperator:p(E),controlOperator:p(E),punctuation:S,separator:p(S),bracket:N,angleBracket:p(N),squareBracket:p(N),paren:p(N),brace:p(N),content:Z,heading:C,heading1:p(C),heading2:p(C),heading3:p(C),heading4:p(C),heading5:p(C),heading6:p(C),contentSeparator:p(Z),list:p(Z),quote:p(Z),emphasis:p(Z),strong:p(Z),link:p(Z),monospace:p(Z),strikethrough:p(Z),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:P,documentMeta:p(P),annotation:p(P),processingInstruction:p(P),definition:o.defineModifier(),constant:o.defineModifier(),function:o.defineModifier(),standard:o.defineModifier(),local:o.defineModifier(),special:o.defineModifier()};f([{tag:R.link,class:"tok-link"},{tag:R.heading,class:"tok-heading"},{tag:R.emphasis,class:"tok-emphasis"},{tag:R.strong,class:"tok-strong"},{tag:R.keyword,class:"tok-keyword"},{tag:R.atom,class:"tok-atom"},{tag:R.bool,class:"tok-bool"},{tag:R.url,class:"tok-url"},{tag:R.labelName,class:"tok-labelName"},{tag:R.inserted,class:"tok-inserted"},{tag:R.deleted,class:"tok-deleted"},{tag:R.literal,class:"tok-literal"},{tag:R.string,class:"tok-string"},{tag:R.number,class:"tok-number"},{tag:[R.regexp,R.escape,R.special(R.string)],class:"tok-string2"},{tag:R.variableName,class:"tok-variableName"},{tag:R.local(R.variableName),class:"tok-variableName tok-local"},{tag:R.definition(R.variableName),class:"tok-variableName tok-definition"},{tag:R.special(R.variableName),class:"tok-variableName2"},{tag:R.definition(R.propertyName),class:"tok-propertyName tok-definition"},{tag:R.typeName,class:"tok-typeName"},{tag:R.namespace,class:"tok-namespace"},{tag:R.className,class:"tok-className"},{tag:R.macroName,class:"tok-macroName"},{tag:R.propertyName,class:"tok-propertyName"},{tag:R.operator,class:"tok-operator"},{tag:R.comment,class:"tok-comment"},{tag:R.meta,class:"tok-meta"},{tag:R.invalid,class:"tok-invalid"},{tag:R.punctuation,class:"tok-punctuation"}])},53528:function(e,t,n){"use strict";n.d(t,{E:function(){return a}});var r=n(91770),i=n(17550);const o=(0,i.Gv)({String:i.pJ.string,Number:i.pJ.number,"True False":i.pJ.bool,PropertyName:i.pJ.propertyName,Null:i.pJ.null,",":i.pJ.separator,"[ ]":i.pJ.squareBracket,"{ }":i.pJ.brace}),a=r.WQ.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[o],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0})},91770:function(e,t,n){"use strict";n.d(t,{Jq:function(){return d},WQ:function(){return w}});var r=n(37979);class i{constructor(e,t,n,r,i,o,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=o,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new i(e,[],t,n,n,0,[],0,r?new o(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,s)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let i=e,{parser:o}=this.p;(r>this.pos||t<=o.maxNode)&&(this.pos=r,o.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new i(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new a(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,i=0;i1&t&&e==r))||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class o{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class a{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class s{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new s(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new s(this.stack,this.pos,this.index)}}function l(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class u{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const c=new u;class f{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=c,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=c,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class h{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;!function(e,t,n,r,i,o){let a=0,s=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||m(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,u=0,c=e[a+2];if(!(t.next<0&&c>u&&65535==e[n+3*c-3])){for(;u>1,o=n+i+(i<<1),s=e[o],l=e[o+1]||65536;if(r=l)){a=e[o+2],t.advance();continue e}u=i+1}}break}a=e[n+3*c-1]}}(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}h.prototype.contextual=h.prototype.fallback=h.prototype.extend=!1,h.prototype.fallback=h.prototype.extend=!1;class d{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function p(e,t,n){for(let r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function m(e,t,n,r){let i=p(n,r,t);return i<0||p(n,r,e)t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}class b{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?y(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?y(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof r.mp){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+o.length}}}class k{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new u))}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;ru.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){let r=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||(n=new u,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new u,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(i>>1)){0==(1&i)?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new b(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;or)i.push(a);else{if(this.advanceStack(a,i,n))continue;{e||(e=[],t=[]),e.push(a);let n=this.tokens.getMainToken(a);t.push(n.value,n.end)}}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return v&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort(((e,t)=>t.score-e.score));i.length>e;)i.pop();i.some((e=>e.reducePos>r))&&this.recovering--}else if(i.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){i.splice(e--,1);continue e}i.splice(n--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let s=this.fragments.nodeAt(i);s;){let i=this.parser.nodeSet.types[s.type.id]==s.type?o.getGoto(e.state,s.type.id):-1;if(i>-1&&s.length&&(!t||(s.prop(r.md.contextHash)||0)==n))return e.useNode(s,i),v&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(s.type.id)})`),!0;if(!(s instanceof r.mp)||0==s.children.length||s.positions[0]>0)break;let l=s.children[0];if(!(l instanceof r.mp&&0==s.positions[0]))break;s=l}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),v&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(65535&s)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let r=0;ri?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Z(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),v&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}let c=a.split(),f=u;for(let e=0;c.forceReduce()&&e<10&&(v&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));e++)v&&(f=this.stackID(c)+" -> ");for(let e of a.recoverByInsert(s))v&&console.log(u+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),v&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),Z(a,n)):(!r||r.scoree.topRules[t][1])),i=[];for(let e=0;e=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let a=-r;a>0;a--)o(t[n++],e,i);n++}}}this.nodeSet=new r.Lj(t.map(((t,o)=>r.Jq.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:i[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r.L3;let a=l(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new h(a,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new x(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],o=1&t,a=r[i++];if(o&&n)return a;for(let n=i+(t>>1);i0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=E(this.data,n+2)}r=t(E(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=E(this.data,n+2)}if(0==(1&this.data[n+2])){let e=this.data[n+1];t.some(((t,n)=>1&n&&t==e))||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(w.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let n=e.tokenizers.find((e=>e.from==t));return n?n.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((n,r)=>{let i=e.specializers.find((e=>e.from==n.external));if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=S(o),o}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map((()=>!1));if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee.external(n,r)<<1|t}return e.get}}}]);