You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
34 KiB
10 lines
34 KiB
(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,26486,e=>{"use strict";var t=e.i(391398),r=e.i(927494),i=e.i(977892),n=e.i(191788),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},s=e.i(117716);function l(){return(l=Object.assign.bind()).apply(this,arguments)}let o=n.forwardRef((e,t)=>n.createElement(s.default,l({},e,{ref:t,icon:a})));var c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"};function d(){return(d=Object.assign.bind()).apply(this,arguments)}let u=n.forwardRef((e,t)=>n.createElement(s.default,d({},e,{ref:t,icon:c})));var h=e.i(82275),p=e.i(313367),f=e.i(946077),m=e.i(76820),g=e.i(900195),y=e.i(882474),v=e.i(326440),b=e.i(245538),x=e.i(847942),R=e.i(543330);e.i(49949);var $=e.i(760705),S=e.i(874384),w=e.i(244628),T=e.i(184897);e.i(113297);var E=e.i(134124);async function C(e){return(0,E.request)("/api/fake_list",{params:e})}let I=(0,e.i(827830).createStyles)(({token:e})=>({listItemMetaTitle:{color:e.colorTextHeading},listItemExtra:{width:"272px",height:"1px",[`@media screen and (max-width: ${e.screenLG}px)`]:{width:"0",height:"1px"}},selfTrigger:{marginLeft:"12px",[`@media screen and (max-width: ${e.screenXS}px)`]:{display:"block",marginLeft:"0"},[`@media screen and (max-width: ${e.screenMD}px)`]:{display:"block",marginLeft:"0"}}})),j=y.Form.Item,Q=({type:e,text:i})=>{switch(e){case"star-o":return(0,t.jsxs)("span",{children:[(0,t.jsx)(u,{style:{marginRight:8}}),i]});case"like-o":return(0,t.jsxs)("span",{children:[(0,t.jsx)(r.LikeOutlined,{style:{marginRight:8}}),i]});case"message":return(0,t.jsxs)("span",{children:[(0,t.jsx)(o,{style:{marginRight:8}}),i]});default:return null}};var M=()=>{let[e]=y.Form.useForm(),{styles:r}=I(),a=(0,n.useRef)({}),{data:s,isLoading:l,isFetching:o,refetch:c}=(0,h.useQuery)({queryKey:["search-articles",5,a.current],queryFn:()=>C({count:5,...a.current}).then(e=>e.data)}),d=s?.list||[],u=[{id:"wzj",name:"我自己"},{id:"wjh",name:"吴家豪"},{id:"zxx",name:"周星星"},{id:"zly",name:"赵丽颖"},{id:"ym",name:"姚明"}],E={wrapperCol:{xs:{span:24},sm:{span:24},md:{span:12}}},M=d.length>0&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:16},children:(0,t.jsx)(p.Button,{onClick:()=>{c()},style:{paddingLeft:48,paddingRight:48},children:o?(0,t.jsxs)("span",{children:[(0,t.jsx)(i.LoadingOutlined,{})," 加载中..."]}):"加载更多"})}),L=(0,n.useMemo)(()=>u.map(e=>({label:e.name,value:e.id})),[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Card,{variant:"borderless",children:(0,t.jsxs)(y.Form,{layout:"inline",form:e,initialValues:{owner:["wjh","zxx"]},onValuesChange:()=>{a.current=e.getFieldsValue(),c()},children:[(0,t.jsx)(S.StandardFormRow,{title:"所属类目",block:!0,style:{paddingBottom:11},children:(0,t.jsx)(j,{name:"category",children:(0,t.jsx)(w.TagSelect,{expandable:!0,children:T.categoryOptions.filter(e=>void 0!==e.value&&null!==e.value).map(e=>(0,t.jsx)(w.TagSelect.Option,{value:e.value,children:e.label},e.value))})})}),(0,t.jsxs)(S.StandardFormRow,{title:"owner",grid:!0,children:[(0,t.jsx)(j,{name:"owner",noStyle:!0,children:(0,t.jsx)(x.Select,{mode:"multiple",placeholder:"选择 owner",style:{minWidth:"6rem"},options:L})}),(0,t.jsx)("a",{className:r.selfTrigger,onClick:()=>{e.setFieldsValue({owner:["wzj"]})},children:"只看自己的"})]}),(0,t.jsx)(S.StandardFormRow,{title:"其它选项",grid:!0,last:!0,children:(0,t.jsxs)(b.Row,{gutter:16,children:[(0,t.jsx)(m.Col,{xl:8,lg:10,md:12,sm:24,xs:24,children:(0,t.jsx)(j,{...E,label:"活跃用户",name:"user",children:(0,t.jsx)(x.Select,{placeholder:"不限",style:{maxWidth:200,width:"100%"},options:[{label:"李三",value:"lisa"}]})})}),(0,t.jsx)(m.Col,{xl:8,lg:10,md:12,sm:24,xs:24,children:(0,t.jsx)(j,{...E,label:"好评度",name:"rate",children:(0,t.jsx)(x.Select,{placeholder:"不限",style:{maxWidth:200,width:"100%"},options:[{label:"优秀",value:"good"}]})})})]})})]})}),(0,t.jsx)(f.Card,{style:{marginTop:24},variant:"borderless",styles:{body:{padding:"8px 32px 32px 32px"}},children:(0,t.jsx)(v.List,{size:"large",loading:l,rowKey:"id",itemLayout:"vertical",loadMore:M,dataSource:d,renderItem:e=>(0,t.jsxs)(v.List.Item,{actions:[(0,t.jsx)(Q,{type:"star-o",text:e.star},"star"),(0,t.jsx)(Q,{type:"like-o",text:e.like},"like"),(0,t.jsx)(Q,{type:"message",text:e.message},"message")],extra:(0,t.jsx)("div",{className:r.listItemExtra}),children:[(0,t.jsx)(v.List.Item.Meta,{title:(0,t.jsx)("a",{className:r.listItemMetaTitle,href:e.href,children:e.title}),description:(0,t.jsxs)(g.Flex,{wrap:!0,gap:"small",children:[(0,t.jsx)(R.Tag,{children:"Ant Design"}),(0,t.jsx)(R.Tag,{children:"设计语言"}),(0,t.jsx)(R.Tag,{children:"蚂蚁集团"})]})}),(0,t.jsx)($.ArticleListContent,{data:e})]},e.id)})})]})};e.s(["default",()=>M],26486)},76820,245538,e=>{"use strict";var t=e.i(84443).Col;e.s(["Col",()=>t],76820);var r=e.i(247699).Row;e.s(["Row",()=>r],245538)},82275,e=>{"use strict";let t;var r=e.i(879971),i=e.i(114070),n=e.i(465235),a=e.i(84813),s=e.i(895564),l=e.i(492363),o=e.i(456298),c=e.i(974233),d=class extends s.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,l.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#i=void 0;#n=void 0;#a=void 0;#s;#l;#r;#t;#o;#c;#d;#u;#h;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),u(this.#i,this.options)?this.#m():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#v(),this.#i.removeObserver(this)}setOptions(e){let t=this.options,r=this.#i;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveQueryBoolean)(this.options.enabled,this.#i))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#i.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});let i=this.hasListeners();i&&p(this.#i,r,this.options,t)&&this.#m(),this.updateResult(),i&&(this.#i!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#i)!==(0,o.resolveQueryBoolean)(t.enabled,this.#i)||(0,o.resolveStaleTime)(this.options.staleTime,this.#i)!==(0,o.resolveStaleTime)(t.staleTime,this.#i))&&this.#x();let n=this.#R();i&&(this.#i!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#i)!==(0,o.resolveQueryBoolean)(t.enabled,this.#i)||n!==this.#p)&&this.#$(n)}getOptimisticResult(e){var t,r;let i=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(i,e);return t=this,r=n,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#a=n,this.#l=this.options,this.#s=this.#i.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#i}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#m(e){this.#b();let t=this.#i.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#x(){this.#y();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#i);if(i.environmentManager.isServer()||this.#a.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#a.dataUpdatedAt,e);this.#u=c.timeoutManager.setTimeout(()=>{this.#a.isStale||this.updateResult()},t+1)}#R(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#$(e){this.#v(),this.#p=e,!i.environmentManager.isServer()&&!1!==(0,o.resolveQueryBoolean)(this.options.enabled,this.#i)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=c.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#m()},this.#p))}#g(){this.#x(),this.#$(this.#R())}#y(){void 0!==this.#u&&(c.timeoutManager.clearTimeout(this.#u),this.#u=void 0)}#v(){void 0!==this.#h&&(c.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let r,i=this.#i,n=this.options,s=this.#a,c=this.#s,d=this.#l,h=e!==i?e.state:this.#n,{state:m}=e,g={...m},y=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&u(e,t),l=r&&p(e,i,t,n);(s||l)&&(g={...g,...(0,a.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:x}=g;r=g.data;let R=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===x){let e;s?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=s.data,R=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,void 0!==e&&(x="success",r=(0,o.replaceData)(s?.data,e,t),y=!0)}if(t.select&&void 0!==r&&!R)if(s&&r===c?.data&&t.select===this.#o)r=this.#c;else try{this.#o=t.select,r=t.select(r),r=(0,o.replaceData)(s?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(v=this.#t,r=this.#c,b=Date.now(),x="error");let $="fetching"===g.fetchStatus,S="pending"===x,w="error"===x,T=S&&$,E=void 0!==r,C={status:x,fetchStatus:g.fetchStatus,isPending:S,isSuccess:"success"===x,isError:w,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:$,isRefetching:$&&!S,isLoadingError:w&&!E,isPaused:"paused"===g.fetchStatus,isPlaceholderData:y,isRefetchError:w&&E,isStale:f(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==C.data,r="error"===C.status&&!t,n=e=>{r?e.reject(C.error):t&&e.resolve(C.data)},a=()=>{n(this.#r=C.promise=(0,l.pendingThenable)())},s=this.#r;switch(s.status){case"pending":e.queryHash===i.queryHash&&n(s);break;case"fulfilled":(r||C.data!==s.value)&&a();break;case"rejected":r&&C.error===s.reason||a()}}return C}updateResult(){let e=this.#a,t=this.createResult(this.#i,this.options);if(this.#s=this.#i.state,this.#l=this.options,void 0!==this.#s.data&&(this.#d=this.#i),(0,o.shallowEqualObjects)(t,e))return;this.#a=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#f.size)return!0;let i=new Set(r??this.#f);return this.options.throwOnError&&i.add("error"),Object.keys(this.#a).some(t=>this.#a[t]!==e[t]&&i.has(t))};this.#S({listeners:r()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#i)return;let t=this.#i;this.#i=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#S(e){n.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#a)}),this.#e.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,o.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&f(e,t)}return!1}function p(e,t,r,i){return(e!==t||!1===(0,o.resolveQueryBoolean)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}var m=e.i(191788),g=e.i(755224);e.i(391398);var y=m.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=m.createContext(!1);v.Provider;var b=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});e.s(["useQuery",0,function(e,t){return function(e,t,r){var a,s,l,c;let d,u=m.useContext(v),h=m.useContext(y),p=(0,g.useQueryClient)(r),f=p.defaultQueryOptions(e);null==(s=null==(a=p.getDefaultOptions().queries)?void 0:a._experimental_beforeQuery)||s.call(a,f);let x=p.getQueryCache().get(f.queryHash);if(f._optimisticResults=u?"isRestoring":"optimistic",f.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=f.staleTime;f.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof f.gcTime&&(f.gcTime=Math.max(f.gcTime,1e3))}d=(null==x?void 0:x.state.error)&&"function"==typeof f.throwOnError?(0,o.shouldThrowError)(f.throwOnError,[x.state.error,x]):f.throwOnError,(f.suspense||f.experimental_prefetchInRender||d)&&!h.isReset()&&(f.retryOnMount=!1),m.useEffect(()=>{h.clearReset()},[h]);let R=!p.getQueryCache().get(f.queryHash),[$]=m.useState(()=>new t(p,f)),S=$.getOptimisticResult(f),w=!u&&!1!==e.subscribed;if(m.useSyncExternalStore(m.useCallback(e=>{let t=w?$.subscribe(n.notifyManager.batchCalls(e)):o.noop;return $.updateResult(),t},[$,w]),()=>$.getCurrentResult(),()=>$.getCurrentResult()),m.useEffect(()=>{$.setOptions(f)},[f,$]),(null==f?void 0:f.suspense)&&S.isPending)throw b(f,$,h);if((({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(n&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,i])))({result:S,errorResetBoundary:h,throwOnError:f.throwOnError,query:x,suspense:f.suspense}))throw S.error;if(null==(c=null==(l=p.getDefaultOptions().queries)?void 0:l._experimental_afterQuery)||c.call(l,f,S),f.experimental_prefetchInRender&&!i.environmentManager.isServer()&&S.isLoading&&S.isFetching&&!u){let e=R?b(f,$,h):null==x?void 0:x.promise;null==e||e.catch(o.noop).finally(()=>{$.updateResult()})}return f.notifyOnChangeProps?S:$.trackResult(S)}(e,d,t)}],82275)},439214,e=>{"use strict";var t=e.i(191788),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},i=e.i(117716);function n(){return(n=Object.assign.bind()).apply(this,arguments)}let a=t.forwardRef((e,a)=>t.createElement(i.default,n({},e,{ref:a,icon:r})));e.s(["default",()=>a],439214)},749344,236107,e=>{"use strict";var t=e.i(191788);e.i(117327);var r=e.i(226150),r=r,i=e.i(938667);let n=e=>"object"==typeof e&&null!=e&&1===e.nodeType,a=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,s=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let r,i=getComputedStyle(e,null);return a(i.overflowY,t)||a(i.overflowX,t)||!!(r=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(r.clientHeight<e.scrollHeight||r.clientWidth<e.scrollWidth)}return!1},l=(e,t,r,i,n,a,s,l)=>a<e&&s>t||a>e&&s<t?0:a<=e&&l<=r||s>=t&&l>=r?a-e-i:s>t&&l<r||a<e&&l>r?s-t+n:0,o=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},c=(e,t)=>{var r,i,a,c;let d;if("u"<typeof document)return[];let{scrollMode:u,block:h,inline:p,boundary:f,skipOverflowHiddenElements:m}=t,g="function"==typeof f?f:e=>e!==f;if(!n(e))throw TypeError("Invalid target");let y=document.scrollingElement||document.documentElement,v=[],b=e;for(;n(b)&&g(b);){if((b=o(b))===y){v.push(b);break}null!=b&&b===document.body&&s(b)&&!s(document.documentElement)||null!=b&&s(b,m)&&v.push(b)}let x=null!=(i=null==(r=window.visualViewport)?void 0:r.width)?i:innerWidth,R=null!=(c=null==(a=window.visualViewport)?void 0:a.height)?c:innerHeight,{scrollX:$,scrollY:S}=window,{height:w,width:T,top:E,right:C,bottom:I,left:j}=e.getBoundingClientRect(),{top:Q,right:M,bottom:L,left:O}={top:parseFloat((d=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(d.scrollMarginRight)||0,bottom:parseFloat(d.scrollMarginBottom)||0,left:parseFloat(d.scrollMarginLeft)||0},F="start"===h||"nearest"===h?E-Q:"end"===h?I+L:E+w/2-Q+L,k="center"===p?j+T/2-O+M:"end"===p?C+M:j-O,z=[];for(let e=0;e<v.length;e++){let t=v[e],{height:r,width:i,top:n,right:a,bottom:o,left:c}=t.getBoundingClientRect();if("if-needed"===u&&E>=0&&j>=0&&I<=R&&C<=x&&(t===y&&!s(t)||E>=n&&I<=o&&j>=c&&C<=a))break;let d=getComputedStyle(t),f=parseInt(d.borderLeftWidth,10),m=parseInt(d.borderTopWidth,10),g=parseInt(d.borderRightWidth,10),b=parseInt(d.borderBottomWidth,10),Q=0,M=0,L="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-g:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-b:0,B="offsetWidth"in t?0===t.offsetWidth?0:i/t.offsetWidth:0,W="offsetHeight"in t?0===t.offsetHeight?0:r/t.offsetHeight:0;if(y===t)Q="start"===h?F:"end"===h?F-R:"nearest"===h?l(S,S+R,R,m,b,S+F,S+F+w,w):F-R/2,M="start"===p?k:"center"===p?k-x/2:"end"===p?k-x:l($,$+x,x,f,g,$+k,$+k+T,T),Q=Math.max(0,Q+S),M=Math.max(0,M+$);else{Q="start"===h?F-n-m:"end"===h?F-o+b+O:"nearest"===h?l(n,o,r,m,b+O,F,F+w,w):F-(n+r/2)+O/2,M="start"===p?k-c-f:"center"===p?k-(c+i/2)+L/2:"end"===p?k-a+g+L:l(c,a,i,f,g+L,k,k+T,T);let{scrollLeft:e,scrollTop:s}=t;Q=0===W?0:Math.max(0,Math.min(s+Q/W,t.scrollHeight-r/W+O)),M=0===B?0:Math.max(0,Math.min(e+M/B,t.scrollWidth-i/B+L)),F+=s-Q,k+=e-M}z.push({el:t,top:Q,left:M})}return z},d=["parentNode"];function u(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function h(e,t){if(!e.length)return;let r=e.join("_");return t?`${t}_${r}`:d.includes(r)?`form_item_${r}`:r}function p(e){return u(e).join("_")}function f(e,t){let r=t.getFieldInstance(e),n=(0,i.getDOM)(r);if(n)return n;let a=h(u(e),t.__INTERNAL__.name);if(a)return document.getElementById(a)}e.s(["getFieldId",0,h,"getStatus",0,function(e,t,r,i,n,a){let s=i;return void 0!==a?s=a:r.validating?s="validating":e.length?s="error":t.length?s="warning":(r.touched||n&&r.validated)&&(s="success"),s},"toArray",0,u],236107),e.s(["default",0,function(e){let[i]=(0,r.default)(),n=t.useRef({}),a=t.useMemo(()=>e??{...i,__INTERNAL__:{itemRef:e=>t=>{let r=p(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:r,...i}=t,n=f(e,a);n&&(!function(e,t){let r;if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let i={top:parseFloat((r=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(r.scrollMarginRight)||0,bottom:parseFloat(r.scrollMarginBottom)||0,left:parseFloat(r.scrollMarginLeft)||0};if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(c(e,t));let n="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:r,top:a,left:s}of c(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=a-i.top+i.bottom,t=s-i.left+i.right;r.scroll({top:e,left:t,behavior:n})}}(n,{scrollMode:"if-needed",block:"nearest",...i}),r&&a.focusField(e))},focusField:e=>{let t=a.getFieldInstance(e);"function"==typeof t?.focus?t.focus():f(e,a)?.focus?.()},getFieldInstance:e=>{let t=p(e);return n.current[t]}},[e,i]);return[a]},"toNamePathStr",0,p],749344)},874384,244628,184897,e=>{"use strict";var t=e.i(808436);e.s(["StandardFormRow",()=>t.default],874384);var r=e.i(601547);e.s(["TagSelect",()=>r.default],244628);let i=Array.from({length:12}).map((e,t)=>({value:`cat${t+1}`,label:`类目${t+1}`}));e.s(["categoryOptions",0,i],184897)},900195,e=>{"use strict";var t=e.i(191788);e.i(957562);var r=e.i(191248),i=e.i(56206),n=e.i(239988),a=e.i(497630),s=e.i(934854),l=e.i(993175),o=e.i(352050),c=e.i(104616);let d=["wrap","nowrap","wrap-reverse"],u=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],h=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"];var p=(0,o.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:i}=e,n=(0,c.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:i});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(n),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(n),(e=>{let{componentCls:t}=e,r={};return d.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(n),(e=>{let{componentCls:t}=e,r={};return h.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(n),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(n)]},()=>({}),{resetStyle:!1});let f=t.default.forwardRef((e,o)=>{var c;let f,m,g,{prefixCls:y,rootClassName:v,className:b,style:x,flex:R,gap:$,vertical:S,orientation:w,component:T="div",children:E,...C}=e,{flex:I,direction:j,getPrefixCls:Q}=t.default.useContext(l.ConfigContext),M=Q("flex",y),[L,O]=p(M),[,F]=(0,a.useOrientation)(w,S??I?.vertical),k=(0,i.clsx)(b,v,I?.className,M,L,O,(c={...e,vertical:F},(0,i.clsx)({...(f=!0===c.wrap?"wrap":c.wrap,{[`${M}-wrap-${f}`]:f&&d.includes(f)}),...(m={},h.forEach(e=>{m[`${M}-align-${e}`]=c.align===e}),m[`${M}-align-stretch`]=!c.align&&!!c.vertical,m),...(g={},u.forEach(e=>{g[`${M}-justify-${e}`]=c.justify===e}),g)})),{[`${M}-rtl`]:"rtl"===j,[`${M}-gap-${$}`]:(0,n.isPresetSize)($),[`${M}-vertical`]:F}),z={...I?.style,...x};return(0,s.isNonNullable)(R)&&(z.flex=R),(0,s.isNonNullable)($)&&!(0,n.isPresetSize)($)&&(z.gap=$),t.default.createElement(T,{ref:o,className:k,style:z,...(0,r.omit)(C,["justify","wrap","align"])},E)});e.s(["Flex",()=>f],900195)},927494,760705,e=>{"use strict";var t=e.i(191788),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},i=e.i(117716);function n(){return(n=Object.assign.bind()).apply(this,arguments)}let a=t.forwardRef((e,a)=>t.createElement(i.default,n({},e,{ref:a,icon:r})));e.s(["LikeOutlined",()=>a],927494);var s=e.i(377572);e.s(["ArticleListContent",()=>s.default],760705)},946077,e=>{"use strict";var t=e.i(191788);e.i(957562);var r=e.i(191248),i=e.i(531983),n=e.i(56206),a=e.i(430898),s=e.i(993175),l=e.i(625263),o=e.i(536995),c=e.i(106422),d=e.i(267226),u=({prefixCls:e,className:r,hoverable:i=!0,...a})=>{let{getPrefixCls:l}=t.useContext(s.ConfigContext),o=l("card",e),c=(0,n.clsx)(`${o}-grid`,r,{[`${o}-grid-hoverable`]:i});return t.createElement("div",{...a,className:c})};e.i(290586);var h=e.i(774778),p=e.i(307441),f=e.i(352050),m=e.i(104616),g=(0,f.genStyleHooks)("Card",e=>{let t=(0,m.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:i,colorBorderSecondary:n,boxShadowTertiary:a,bodyPadding:s,extraColor:l,motionDurationMid:o}=e;return{[t]:{...(0,p.resetComponent)(e),position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:i,headerPadding:n,tabsMarginBottom:a}=e;return{display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,h.unit)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)} 0 0`,...(0,p.clearFix)(),"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":{display:"inline-block",flex:1,...p.textEllipsis,[`
|
|
> ${r}-typography,
|
|
> ${r}-typography-edit-content
|
|
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:"both",marginBottom:a,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:i,lineWidth:n}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
|
|
${(0,h.unit)(n)} 0 0 0 ${r},
|
|
0 ${(0,h.unit)(n)} 0 0 ${r},
|
|
${(0,h.unit)(n)} ${(0,h.unit)(n)} 0 0 ${r},
|
|
${(0,h.unit)(n)} 0 0 0 ${r} inset,
|
|
0 ${(0,h.unit)(n)} 0 0 ${r} inset;
|
|
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:i,cardActionsIconSize:n,colorBorderSecondary:a,actionsBg:s}=e;return{margin:0,padding:0,listStyle:"none",background:s,borderTop:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${a}`,display:"flex",borderRadius:`0 0 ${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)}`,...(0,p.clearFix)(),"& > li":{margin:i,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,h.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:n,lineHeight:(0,h.unit)(e.calc(n).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${a}`}}}})(e),[`${t}-meta`]:{margin:`${(0,h.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex",...(0,p.clearFix)(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...p.textEllipsis},"&-description":{color:e.colorTextDescription}}},[`${t}-bordered`]:{border:`${(0,h.unit)(e.lineWidth)} ${e.lineType} ${n}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:["box-shadow","border-color"].map(e=>`${e} ${o}`).join(", "),"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${(0,h.unit)(e.borderRadiusLG)} ${(0,h.unit)(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:i,bodyPadding:n}=e;return{[`${t}-head`]:{padding:`0 ${(0,h.unit)(i)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,h.unit)(e.padding)} ${(0,h.unit)(n)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:r,headerPaddingSM:i,headerHeightSM:n,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:n,padding:`0 ${(0,h.unit)(i)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG}));let y=e=>{let{actionClasses:r,actions:i=[],actionStyle:n}=e;return t.createElement("ul",{className:r,style:n},i.map((e,r)=>{let n=`action-${r}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:n},t.createElement("span",null,e))}))},v=t.forwardRef((e,h)=>{let p,{prefixCls:f,className:m,rootClassName:v,style:b,extra:x,headStyle:R={},bodyStyle:$={},title:S,loading:w,bordered:T,variant:E,size:C,type:I,cover:j,actions:Q,tabList:M,children:L,activeTabKey:O,defaultActiveTabKey:F,tabBarExtraContent:k,hoverable:z,tabProps:B={},classNames:W,styles:H,...N}=e,{getPrefixCls:D,direction:_,className:G,style:q,classNames:P,styles:A}=(0,s.useComponentConfig)("card"),[V]=(0,o.default)("card",E,T),U=(0,l.default)(C),X={...e,size:U,variant:V},[K,Y]=(0,a.useMergeSemantic)([P,W],[A,H],{props:X}),J=t.useMemo(()=>(0,i.toArray)(L),[L]),Z=t.useMemo(()=>J.some(e=>t.isValidElement(e)&&e.type===u),[J]),ee=D("card",f),[et,er]=g(ee),ei=t.createElement(c.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),en=void 0!==O,ea={...B,[en?"activeKey":"defaultActiveKey"]:en?O:F,tabBarExtraContent:k},es=M?t.createElement(d.default,{size:"small"!==U?"large":U,...ea,className:`${ee}-head-tabs`,onChange:t=>{e.onTabChange?.(t)},items:M.map(({tab:e,...t})=>({label:e,...t}))}):null;if(S||x||es){let e=(0,n.clsx)(`${ee}-head`,K.header),r=(0,n.clsx)(`${ee}-head-title`,K.title),i=(0,n.clsx)(`${ee}-extra`,K.extra),a={...R,...Y.header};p=t.createElement("div",{className:e,style:a},t.createElement("div",{className:`${ee}-head-wrapper`},S&&t.createElement("div",{className:r,style:Y.title},S),x&&t.createElement("div",{className:i,style:Y.extra},x)),es)}let el=(0,n.clsx)(`${ee}-cover`,K.cover),eo=j?t.createElement("div",{className:el,style:Y.cover},j):null,ec=(0,n.clsx)(`${ee}-body`,K.body),ed={...$,...Y.body},eu=w||J.length?t.createElement("div",{className:ec,style:ed},w?ei:L):null,eh=(0,n.clsx)(`${ee}-actions`,K.actions),ep=Q?.length?t.createElement(y,{actionClasses:eh,actionStyle:Y.actions,actions:Q}):null,ef=(0,r.omit)(N,["onTabChange"]),em=(0,n.clsx)(ee,G,{[`${ee}-loading`]:w,[`${ee}-bordered`]:"borderless"!==V,[`${ee}-hoverable`]:z,[`${ee}-contain-grid`]:Z,[`${ee}-contain-tabs`]:M?.length,[`${ee}-small`]:"small"===U,[`${ee}-type-${I}`]:!!I,[`${ee}-rtl`]:"rtl"===_},m,v,et,er,K.root),eg={...Y.root,...q,...b};return t.createElement("div",{ref:h,...ef,className:em,style:eg},p,eo,eu,ep)});v.Grid=u,v.Meta=e=>{let{prefixCls:r,className:i,avatar:l,title:o,description:c,style:d,classNames:u,styles:h,...p}=e,{getPrefixCls:f,className:m,style:g,classNames:y,styles:v}=(0,s.useComponentConfig)("cardMeta"),b=f("card",r),x=`${b}-meta`,[R,$]=(0,a.useMergeSemantic)([y,u],[v,h],{props:e}),S=(0,n.clsx)(x,i,m,R.root),w={...g,...$.root,...d},T=(0,n.clsx)(`${x}-avatar`,R.avatar),E=(0,n.clsx)(`${x}-title`,R.title),C=(0,n.clsx)(`${x}-description`,R.description),I=(0,n.clsx)(`${x}-section`,R.section),j=l?t.createElement("div",{className:T,style:$.avatar},l):null,Q=o?t.createElement("div",{className:E,style:$.title},o):null,M=c?t.createElement("div",{className:C,style:$.description},c):null,L=Q||M?t.createElement("div",{className:I,style:$.section},Q,M):null;return t.createElement("div",{...p,className:S,style:w},j,L)},e.s(["Card",()=>v],946077)},977892,e=>{"use strict";var t=e.i(677057);e.s(["LoadingOutlined",()=>t.default])}]);
|