szld-libs 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21121,7 +21121,7 @@ const NN = (v) => {
21121
21121
  const p = new URL(v), R = new URL(g);
21122
21122
  return p.protocol === R.protocol && p.host === R.host && p.port === R.port;
21123
21123
  }, WN = (v) => {
21124
- const g = new URL(v).href.split("/");
21124
+ const g = String(v).split("/");
21125
21125
  return g[g.length - 1];
21126
21126
  }, GN = (v) => {
21127
21127
  var p;
@@ -188,4 +188,4 @@ Check the render method of %s.`,je(tn)||"Unknown"));var m=lu(s,f);m.payload={ele
188
188
 
189
189
  let root = createRoot(domContainer);
190
190
  root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var f=ew(e,Qh,null,a,i,u,s);jh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Kd(h),new qS(f)}function Km(e){this._internalRoot=e}function GO(e){e&&ph(e)}Km.prototype.unstable_scheduleHydration=GO;function qO(e,t,a){if(!Zm(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");Tw(e),t===void 0&&S("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=a??null,u=a!=null&&a.hydratedSources||null,s=!1,f=!1,h="",m=Ew;a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onRecoverableError!==void 0&&(m=a.onRecoverableError));var C=tw(t,null,e,Qh,i,s,f,h,m);if(jh(C.current,e),Kd(e),u)for(var E=0;E<u.length;E++){var D=u[E];rD(C,D)}return new Km(C)}function Zm(e){return!!(e&&(e.nodeType===Er||e.nodeType===Ma||e.nodeType===kl||!dt))}function $p(e){return!!(e&&(e.nodeType===Er||e.nodeType===Ma||e.nodeType===kl||e.nodeType===nn&&e.nodeValue===" react-mount-point-unstable "))}function Tw(e){e.nodeType===Er&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),op(e)&&(e._reactRootContainer?S("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):S("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var XO=p.ReactCurrentOwner,ww;ww=function(e){if(e._reactRootContainer&&e.nodeType!==nn){var t=rw(e._reactRootContainer.current);t&&t.parentNode!==e&&S("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var a=!!e._reactRootContainer,i=XS(e),u=!!(i&&eo(i));u&&!a&&S("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Er&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function XS(e){return e?e.nodeType===Ma?e.documentElement:e.firstChild:null}function Rw(){}function KO(e,t,a,i,u){if(u){if(typeof i=="function"){var s=i;i=function(){var x=Xm(f);s.call(x)}}var f=tw(t,i,e,no,null,!1,!1,"",Rw);e._reactRootContainer=f,jh(f.current,e);var h=e.nodeType===nn?e.parentNode:e;return Kd(h),cu(),f}else{for(var m;m=e.lastChild;)e.removeChild(m);if(typeof i=="function"){var C=i;i=function(){var x=Xm(E);C.call(x)}}var E=ew(e,no,null,!1,!1,"",Rw);e._reactRootContainer=E,jh(E.current,e);var D=e.nodeType===nn?e.parentNode:e;return Kd(D),cu(function(){Ip(t,E,a,i)}),E}}function ZO(e,t){e!==null&&typeof e!="function"&&S("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function Jm(e,t,a,i,u){ww(a),ZO(u===void 0?null:u,"render");var s=a._reactRootContainer,f;if(!s)f=KO(a,t,e,u,i);else{if(f=s,typeof u=="function"){var h=u;u=function(){var m=Xm(f);h.call(m)}}Ip(t,f,e,u)}return Xm(f)}function JO(e){{var t=XO.current;if(t!==null&&t.stateNode!==null){var a=t.stateNode._warnedAboutRefsInRender;a||S("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Rt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Er?e:FO(e,"findDOMNode")}function eN(e,t,a){if(S("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!$p(t))throw new Error("Target container is not a DOM element.");{var i=op(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Jm(null,e,t,!0,a)}function tN(e,t,a){if(S("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!$p(t))throw new Error("Target container is not a DOM element.");{var i=op(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Jm(null,e,t,!1,a)}function nN(e,t,a,i){if(S("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!$p(a))throw new Error("Target container is not a DOM element.");if(e==null||!Vo(e))throw new Error("parentComponent must be a valid React Component");return Jm(e,t,a,!1,i)}function rN(e){if(!$p(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=op(e)&&e._reactRootContainer===void 0;t&&S("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var a=XS(e),i=a&&!eo(a);i&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return cu(function(){Jm(null,null,e,!1,function(){e._reactRootContainer=null,CC(e)})}),!0}else{{var u=XS(e),s=!!(u&&eo(u)),f=e.nodeType===Er&&$p(e.parentNode)&&!!e.parentNode._reactRootContainer;s&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",f?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}de(HO),uh(jO),ts(VO),Ld(va),sh(Zo),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&S("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Pv(lx),Xs(kS,q_,cu);function aN(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Zm(t))throw new Error("Target container is not a DOM element.");return AO(e,t,null,a)}function iN(e,t,a,i){return nN(e,t,a,i)}var KS={usingClientEntryPoint:!1,Events:[eo,Zc,Vh,qs,Fo,kS]};function lN(e,t){return KS.usingClientEntryPoint||S('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),WO(e,t)}function uN(e,t,a){return KS.usingClientEntryPoint||S('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),qO(e,t,a)}function oN(e){return LT()&&S("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),cu(e)}var sN=QO({findFiberByHostInstance:fs,bundleType:1,version:$S,rendererPackageName:"react-dom"});if(!sN&&Sn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var bw=window.location.protocol;/^(https?|file):$/.test(bw)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(bw==="file:"?`
191
- You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Jr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KS,Jr.createPortal=aN,Jr.createRoot=lN,Jr.findDOMNode=JO,Jr.flushSync=oN,Jr.hydrate=eN,Jr.hydrateRoot=uN,Jr.render=tN,Jr.unmountComponentAtNode=rN,Jr.unstable_batchedUpdates=kS,Jr.unstable_renderSubtreeIntoContainer=iN,Jr.version=$S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(v){function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(p){console.error(p)}}}process.env.NODE_ENV==="production"?(g(),v.exports=eb()):v.exports=tb()})(KR);const nb=v=>new Promise(g=>{const p=new FileReader;p.onloadend=R=>g(R.target.result),p.readAsDataURL(v)}),rb=v=>new Promise(g=>{const p=new Image;p.onload=()=>g(p),p.src=v}),ab=(v,g,p)=>new Promise(R=>v.toBlob(_=>R(_),g,p)),ib=v=>{const R=v.width,_=v.height;let A=v.width,S=v.height;return(R>1400||_>1400)&&(R/_>1400/1400?(A=1400,S=Math.round(1400*(_/R))):(S=1400,A=Math.round(1400*(R/_)))),{width:A,height:S}},lb=async(v,g="image/jpeg",p=.5,R=300)=>{const _=v.name;if(v.size/1024<R)return v;const A=document.createElement("canvas"),S=A.getContext("2d"),Q=await nb(v),H=await rb(Q),j=ib(H);A.width=j.width,A.height=j.height,S.clearRect(0,0,j.width,j.height),S.drawImage(H,0,0,j.width,j.height);const K=await ab(A,g,p);return new File([K],_,{type:g})},H1=[Ds.jpeg,Ds.jpg,Ds.png],j1=v=>{const{maxCount:g=1,listType:p="picture-card",fileList:R=[],maxSize:_=2,accept:A=H1.join(","),uploadBtnName:S="上传",uploadHint:Q=null,compression:H}=v,[j,K]=at.useState(!1),[G,ie]=at.useState(""),ae=()=>p!=="text"?un("div",{style:{position:"relative"},children:[un("div",{children:[Ce(OR,{}),Ce("div",{style:{marginTop:8},children:S})]}),Q]}):un(Wp,{children:[Ce(Qe.Button,{icon:Ce(AR,{}),children:S}),Q]}),Ue=Se=>new Promise((it,Be)=>{const Tt=A.split(","),Ie=Jp(Se.name)||"";Tt.includes(Ie)||(Qe.message.error(`只允许上传 ${A} 文件`),Be(!1)),Se.size/1024/1024<_||(Qe.message.error(`文件必须小于${_}MB`),Be(!1)),H&&it(lb(Se,H.type,H.quality,H.limit)),it(Se)}).catch(it=>Qe.Upload.LIST_IGNORE),Je=Se=>{v.onChange&&v.onChange(Se)},qe=Se=>{v.onPreview?v.onPreview(Se):Yt(Se)},Yt=async Se=>{let ze=Jp(Se.name)||"";if(ze||(ze=Jp(Se.name||Se.url)||""),ze===Ds.pdf)return Qe.Modal.info({title:"PDF",width:"60%",content:Ce("iframe",{title:"PDF预览",src:Se.url||Se.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});H1.includes(ze)&&(!Se.url&&!Se.thumbUrl&&!Se.preview&&(Se.preview=await N1(Se.originFileObj)),ie(Se.url||Se.thumbUrl||Se.preview),K(!0))};return un(Wp,{children:[Ce(Qe.Upload,{beforeUpload:Ue,onChange:Je,listType:p,...v,onPreview:qe,children:R.length>=g?null:ae()}),Ce(Qe.Image,{style:{display:"none"},preview:{visible:j,src:G,onVisibleChange:()=>{K(!1),ie("")}}})]})},ev={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},ub={labelCol:{span:4},wrapperCol:{span:20}},V1=v=>{switch(v){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},P1=v=>{const{items:g,rowProps:p,formProps:R,readonly:_=!1,hiddenTitle:A=!1}=v,S=(j,K)=>{var G,ie;if(K.btnType==="submit"){(G=R==null?void 0:R.form)==null||G.validateFields().then(ae=>{K.onClick&&K.onClick(ae)});return}if(K.btnType==="reset"){(ie=R==null?void 0:R.form)==null||ie.resetFields(),K.onClick&&K.onClick(j);return}K.btnType==="cancel"&&K.onClick&&K.onClick(j)},Q=j=>Array.isArray(j)?j:j&&j.fileList,H=j=>{var G;const K=R==null?void 0:R.initialValues;return j.dataIndex?((G=j.render)==null?void 0:G.call(j,K==null?void 0:K[j.dataIndex],K))||j.value||(K==null?void 0:K[j.dataIndex]):""};return Ce(Qe.Form,{layout:"horizontal",form:R==null?void 0:R.form,...ub,...R||{},children:Ce(Qe.Row,{gutter:16,...p,children:g.filter(j=>!j.hidden).map((j,K)=>Ce(Qe.Col,{...j.colProps||{span:24},children:Ce(Qe.Form.Item,{...j.valueType==="upload"?{getValueFromEvent:Q}:{},label:A?"":j.title,name:j.valueType==="btns"?void 0:j.dataIndex,...j.formItemProps,children:j.readonly?Ce("div",{children:H(j)}):j.readonly===void 0&&_?Ce("div",{children:H(j)}):Ce(B1,{onChange:G=>{var ie;return(ie=j==null?void 0:j.onChange)==null?void 0:ie.call(j,G)},valueType:j.valueType,onBtnClick:S,valueProps:j.valueProps})})},j.dataIndex||K))})})},B1=v=>{const{valueType:g,valueProps:p,value:R,onChange:_,onBtnClick:A,inputRef:S}=v,Q=at.useMemo(()=>{let H=Ce(Qe.Input,{placeholder:"请输入",...p,allowClear:!0});switch(g){case"rate":H=Ce(Qe.Rate,{...p});break;case"password":H=Ce(Qe.Input.Password,{...p});break;case"modal":H=Ce(ob,{...p});break;case"checkbox":H=Ce(Qe.Checkbox.Group,{...p});break;case"select":H=Ce(Qe.Select,{placeholder:"请选择",...p,allowClear:!0});break;case"inputNumber":H=Ce(Qe.InputNumber,{style:{width:"100%"},placeholder:"请输入",...p});break;case"textarea":H=Ce(Qe.Input.TextArea,{placeholder:"请输入",...p,allowClear:!0});break;case"radio":H=Ce(Qe.Radio.Group,{...p});break;case"switch":H=Ce(Qe.Switch,{...p});break;case"datePicker":H=Ce(Qe.DatePicker,{style:{width:"100%"},...p,allowClear:!0});break;case"rangePicker":H=Ce(Qe.DatePicker.RangePicker,{style:{width:"100%"},...p,allowClear:!0});break;case"timePicker":H=Ce(Qe.TimePicker,{style:{width:"100%"},...p,allowClear:!0});break;case"cascader":H=Ce(Qe.Cascader,{...p,allowClear:!0});break;case"upload":H=Ce(j1,{...p});break;case"btns":H=Ce(Qe.Space,{children:p==null?void 0:p.map(j=>at.createElement(Qe.Button,{type:j.btnType==="submit"?"primary":"default",...Rf.omit(j,["btnType"]),key:j.key||j.btnType,onClick:K=>{A==null||A(K,j)}},j.title||j.children))});break}return H},[g,p,_,R]);if(g==="custom"){const H=p;return at.cloneElement(H.children,{[V1(g||"input")]:R,onChange:_,ref:S})}return at.cloneElement(Q,{[V1(g||"input")]:R,onChange:_,ref:S})},ob=v=>{const{placeholder:g,labelKey:p,onToggle:R,value:_,onClear:A,className:S,style:Q}=v;return un("div",{className:[ev.fieldModal,S].filter(H=>H).join(" "),style:Q,children:[Ce("div",{className:ev.content,onClick:()=>R(!0),children:_?Ce("span",{children:_[p]}):Ce("span",{className:ev.placeholder,children:g})}),Ce("span",{className:ev.suffix,onClick:A,children:_&&Ce(RR,{})})]})},sb={search:"search-table-module_search_17add"};function cb(v){const{tableProps:g={},searchProps:p}=v,{columns:R=[],minColumnWidth:_=200,...A}=g;return un(Wp,{children:[p&&Ce(P1,{hiddenTitle:!0,...p,items:p.items}),Ce(Qe.Table,{columns:R.filter(S=>!S.hidden).map(S=>({...S,width:S.width||_})),scroll:{x:R.filter(S=>!S.hidden).reduce((S,Q)=>S+(typeof Q.width=="number"?Q.width:_),0)},...A,className:kf(sb.table,g==null?void 0:g.className),pagination:typeof(g==null?void 0:g.pagination)=="boolean"?g.pagination:{hideOnSinglePage:!0,showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`,...g==null?void 0:g.pagination}})]})}const fb={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},I1=at.createContext(null),db=({index:v,...g})=>{const[p]=Qe.Form.useForm();return Ce(Qe.Form,{form:p,component:!1,children:Ce(I1.Provider,{value:p,children:Ce("tr",{...g})})})};function pb(v){console.log(v,"props");const{title:g,editable:p,children:R,dataIndex:_,record:A,rules:S,onChange:Q,type:H="input",valueProps:j,...K}=v,G=at.useRef(null),ie=at.useContext(I1),ae=async()=>{try{const qe=await ie.validateFields();Q({...A,...qe})}catch(qe){console.log("Save failed:",qe)}},Ue=()=>Ce(B1,{valueType:H,valueProps:{...j,onBlur:ae,onPressEnter:ae},inputRef:G});let Je=R;return p&&(Je=Ce(Qe.Form.Item,{style:{margin:0},initialValue:A[_],name:_,rules:S,children:Ue()})),Ce("td",{children:Je})}function vb(v){const{columns:g,onChange:p,...R}=v,_={body:{row:db,cell:pb}},A=g==null?void 0:g.map(S=>S.editable?{...S,onCell:Q=>({...S,record:Q,onChange:p})}:S);return Ce(Qe.Table,{...R,components:_,rowClassName:()=>fb.editableRow,columns:A})}const $1=v=>{const{auth:g=!0,...p}=v;return g?Ce(Qe.Button,{...p}):null},hb=v=>{const{PId:g,auths:p,...R}=v,_=at.useMemo(()=>!!(p&&p.find(A=>A.PId===g)),[g,p]);return Ce($1,{...R,auth:_})},On={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},mb=v=>{const{data:g,current:p,rowKey:R,renderContent:_}=v,[A,S]=at.useState(!1),Q=at.useMemo(()=>v.currentIndex!==void 0?v.currentIndex:!p||g.length===0?0:g.findIndex(G=>G.PNId===p),[p,g]),H=at.useMemo(()=>Q>1?A?0:Q-1:0,[Q,A]),j=()=>{S(!0)};return un("ul",{className:On.main,children:[Q>1&&!A&&un("li",{className:kf(On.item,On.itemDone),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),Ce("div",{className:On.content,children:un("div",{className:On.collpase,children:[un("div",{children:["已收起",Ce("span",{children:Q-1}),"个节点"]}),un("a",{className:On.btn,onClick:j,children:["展开节点",Ce(kR,{})]})]})})]}),g.slice(H).map((K,G)=>un("li",{className:kf(On.item,Q===G+H?On.itemActive:Q>G+H?On.itemDone:On.itemUnDo),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),un("div",{className:On.content,children:[_?_(K,G,A?Q:Q-H):un(Wp,{children:[Ce("div",{className:On.title,children:K.PNName}),un("div",{className:On.dateWrapper,children:[K.PlanFinishDate&&un("span",{children:["预计完成时间: ",K.PlanFinishDate]}),K.UpdateTime&&un("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",K.UpdateTime]})]}),K.Remark&&Ce("div",{className:On.remark,children:K.Remark})]}),A&&Q-1===G&&un("a",{className:On.btn,onClick:()=>S(!1),children:["收起节点 ",Ce(LR,{})]})]})]},typeof R=="string"?K[R]:R(K)))]})},yb=v=>{const{current:g,data:p,rowKey:R,renderContent:_,currentIndex:A,...S}=v;return(()=>{Qe.Modal.info({icon:null,title:"流程节点",width:700,content:Ce(mb,{rowKey:R,renderContent:_,current:g,currentIndex:A,data:p}),closable:!0,footer:null,maskClosable:!0,...S})})(),null},gb=(v,g)=>{const p=new URL(v),R=new URL(g);return p.protocol===R.protocol&&p.host===R.host&&p.port===R.port},Sb=v=>{const g=new URL(v).href.split("/");return g[g.length-1]},Cb=v=>{var p;return(p=v.headers.get("content-disposition"))==null?void 0:p.split(";")[1].split("=")[1]},Eb=(v,g)=>{const p=g||Sb(v);if(gb(v,window.location.href)){Cy(v,p);return}let R=g;fetch(v,{method:"get"}).then(_=>(R||(R=Cb(_)),_.blob())).then(_=>{Y1(_,R||p)}).catch(()=>{Cy(v,"")})},Tb=v=>{for(var g=v.split(","),p=g[0].match(/:(.*?);/)[1],R=window.atob(g[1]),_=R.length,A=new Uint8Array(_);_--;)A[_]=R.charCodeAt(_);return new Blob([A],{type:p})},Y1=(v,g)=>{let p="";v instanceof Blob?p=window.URL.createObjectURL(v):p=window.URL.createObjectURL(Tb(v));const R=window.navigator;if(R.msSaveOrOpenBlob){R.msSaveOrOpenBlob(v,g);return}Cy(p,g),window.URL.revokeObjectURL(p)},Cy=(v,g)=>{let p=document.createElement("a");p.style.display="none",p.href=v,p.target="_blank",p.download=g,document.body.appendChild(p),p.click(),document.body.removeChild(p)},wb=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:Eb,downloadBlob:Y1},Symbol.toStringTag,{value:"Module"}));class Rb{constructor(g){xw(this,"options",{id:"",canvasId:"verifyCanvas",width:100,height:30,type:"blend",code:""});this.options=g}GVerify(){this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=this.getAllLetter(),this._init(),this.refresh()}_init(){const g=document.getElementById(this.options.id),p=document.createElement("canvas");p.id=this.options.canvasId,p.width=Number(this.options.width),p.height=Number(this.options.height),p.style.cursor="pointer",p.innerHTML="您的浏览器版本不支持canvas",g&&g.appendChild(p),p.onclick=()=>{this.refresh()}}refresh(){this.options.code="";const g=document.getElementById(this.options.canvasId);let p,R=[];if(g.getContext)p=g.getContext("2d");else return;p.textBaseline="middle",p.fillStyle=this.randomColor(180,240),p.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend"?R=this.options.numArr.concat(this.options.letterArr):this.options.type=="number"?R=this.options.numArr:R=this.options.letterArr;for(let _=1;_<=4;_++){const A=R[this.randomNum(0,R.length)];this.options.code+=A,p.font="20px SimHei",p.fillStyle=this.randomColor(50,160),p.shadowBlur=this.randomNum(-3,3),p.shadowColor="rgba(0, 0, 0, 0.3)";const S=Number(this.options.width)/5*_,Q=Number(this.options.height)/2,H=this.randomNum(-30,30);p.translate(S,Q),p.rotate(H*Math.PI/180),p.fillText(A,0,0),p.rotate(-H*Math.PI/180),p.translate(-S,-Q)}for(let _=0;_<2;_++)p.strokeStyle=this.randomColor(40,180),p.beginPath(),p.moveTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height)/2)),p.lineTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height))),p.stroke();for(let _=0;_<Number(this.options.width)/10;_++)p.fillStyle=this.randomColor(0,255),p.beginPath(),p.arc(this.randomNum(0,this.options.width),this.randomNum(0,this.options.height),1,0,2*Math.PI),p.fill()}validate(g){const p=g.toLowerCase(),R=this.options.code.toLowerCase();return p==R}getAllLetter(){return"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",")}randomNum(g,p){return Math.floor(Math.random()*(p-g)+g)}randomColor(g,p){const R=this.randomNum(g,p),_=this.randomNum(g,p),A=this.randomNum(g,p);return"rgb("+R+","+_+","+A+")"}}const bb=Object.freeze(Object.defineProperty({__proto__:null,getGVerify:Rb},Symbol.toStringTag,{value:"Module"}));_t.AuthButton=$1,_t.BackHeader=jR,_t.CoralButton=hb,_t.CreateForm=P1,_t.EditTable=vb,_t.SearchTable=cb,_t.UploadFile=j1,_t.download=wb,_t.fileType=VR,_t.showWorkFlow=yb,_t.utils=XR,_t.verfyCode=bb,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
191
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Jr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KS,Jr.createPortal=aN,Jr.createRoot=lN,Jr.findDOMNode=JO,Jr.flushSync=oN,Jr.hydrate=eN,Jr.hydrateRoot=uN,Jr.render=tN,Jr.unmountComponentAtNode=rN,Jr.unstable_batchedUpdates=kS,Jr.unstable_renderSubtreeIntoContainer=iN,Jr.version=$S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(v){function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(p){console.error(p)}}}process.env.NODE_ENV==="production"?(g(),v.exports=eb()):v.exports=tb()})(KR);const nb=v=>new Promise(g=>{const p=new FileReader;p.onloadend=R=>g(R.target.result),p.readAsDataURL(v)}),rb=v=>new Promise(g=>{const p=new Image;p.onload=()=>g(p),p.src=v}),ab=(v,g,p)=>new Promise(R=>v.toBlob(_=>R(_),g,p)),ib=v=>{const R=v.width,_=v.height;let A=v.width,S=v.height;return(R>1400||_>1400)&&(R/_>1400/1400?(A=1400,S=Math.round(1400*(_/R))):(S=1400,A=Math.round(1400*(R/_)))),{width:A,height:S}},lb=async(v,g="image/jpeg",p=.5,R=300)=>{const _=v.name;if(v.size/1024<R)return v;const A=document.createElement("canvas"),S=A.getContext("2d"),Q=await nb(v),H=await rb(Q),j=ib(H);A.width=j.width,A.height=j.height,S.clearRect(0,0,j.width,j.height),S.drawImage(H,0,0,j.width,j.height);const K=await ab(A,g,p);return new File([K],_,{type:g})},H1=[Ds.jpeg,Ds.jpg,Ds.png],j1=v=>{const{maxCount:g=1,listType:p="picture-card",fileList:R=[],maxSize:_=2,accept:A=H1.join(","),uploadBtnName:S="上传",uploadHint:Q=null,compression:H}=v,[j,K]=at.useState(!1),[G,ie]=at.useState(""),ae=()=>p!=="text"?un("div",{style:{position:"relative"},children:[un("div",{children:[Ce(OR,{}),Ce("div",{style:{marginTop:8},children:S})]}),Q]}):un(Wp,{children:[Ce(Qe.Button,{icon:Ce(AR,{}),children:S}),Q]}),Ue=Se=>new Promise((it,Be)=>{const Tt=A.split(","),Ie=Jp(Se.name)||"";Tt.includes(Ie)||(Qe.message.error(`只允许上传 ${A} 文件`),Be(!1)),Se.size/1024/1024<_||(Qe.message.error(`文件必须小于${_}MB`),Be(!1)),H&&it(lb(Se,H.type,H.quality,H.limit)),it(Se)}).catch(it=>Qe.Upload.LIST_IGNORE),Je=Se=>{v.onChange&&v.onChange(Se)},qe=Se=>{v.onPreview?v.onPreview(Se):Yt(Se)},Yt=async Se=>{let ze=Jp(Se.name)||"";if(ze||(ze=Jp(Se.name||Se.url)||""),ze===Ds.pdf)return Qe.Modal.info({title:"PDF",width:"60%",content:Ce("iframe",{title:"PDF预览",src:Se.url||Se.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});H1.includes(ze)&&(!Se.url&&!Se.thumbUrl&&!Se.preview&&(Se.preview=await N1(Se.originFileObj)),ie(Se.url||Se.thumbUrl||Se.preview),K(!0))};return un(Wp,{children:[Ce(Qe.Upload,{beforeUpload:Ue,onChange:Je,listType:p,...v,onPreview:qe,children:R.length>=g?null:ae()}),Ce(Qe.Image,{style:{display:"none"},preview:{visible:j,src:G,onVisibleChange:()=>{K(!1),ie("")}}})]})},ev={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},ub={labelCol:{span:4},wrapperCol:{span:20}},V1=v=>{switch(v){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},P1=v=>{const{items:g,rowProps:p,formProps:R,readonly:_=!1,hiddenTitle:A=!1}=v,S=(j,K)=>{var G,ie;if(K.btnType==="submit"){(G=R==null?void 0:R.form)==null||G.validateFields().then(ae=>{K.onClick&&K.onClick(ae)});return}if(K.btnType==="reset"){(ie=R==null?void 0:R.form)==null||ie.resetFields(),K.onClick&&K.onClick(j);return}K.btnType==="cancel"&&K.onClick&&K.onClick(j)},Q=j=>Array.isArray(j)?j:j&&j.fileList,H=j=>{var G;const K=R==null?void 0:R.initialValues;return j.dataIndex?((G=j.render)==null?void 0:G.call(j,K==null?void 0:K[j.dataIndex],K))||j.value||(K==null?void 0:K[j.dataIndex]):""};return Ce(Qe.Form,{layout:"horizontal",form:R==null?void 0:R.form,...ub,...R||{},children:Ce(Qe.Row,{gutter:16,...p,children:g.filter(j=>!j.hidden).map((j,K)=>Ce(Qe.Col,{...j.colProps||{span:24},children:Ce(Qe.Form.Item,{...j.valueType==="upload"?{getValueFromEvent:Q}:{},label:A?"":j.title,name:j.valueType==="btns"?void 0:j.dataIndex,...j.formItemProps,children:j.readonly?Ce("div",{children:H(j)}):j.readonly===void 0&&_?Ce("div",{children:H(j)}):Ce(B1,{onChange:G=>{var ie;return(ie=j==null?void 0:j.onChange)==null?void 0:ie.call(j,G)},valueType:j.valueType,onBtnClick:S,valueProps:j.valueProps})})},j.dataIndex||K))})})},B1=v=>{const{valueType:g,valueProps:p,value:R,onChange:_,onBtnClick:A,inputRef:S}=v,Q=at.useMemo(()=>{let H=Ce(Qe.Input,{placeholder:"请输入",...p,allowClear:!0});switch(g){case"rate":H=Ce(Qe.Rate,{...p});break;case"password":H=Ce(Qe.Input.Password,{...p});break;case"modal":H=Ce(ob,{...p});break;case"checkbox":H=Ce(Qe.Checkbox.Group,{...p});break;case"select":H=Ce(Qe.Select,{placeholder:"请选择",...p,allowClear:!0});break;case"inputNumber":H=Ce(Qe.InputNumber,{style:{width:"100%"},placeholder:"请输入",...p});break;case"textarea":H=Ce(Qe.Input.TextArea,{placeholder:"请输入",...p,allowClear:!0});break;case"radio":H=Ce(Qe.Radio.Group,{...p});break;case"switch":H=Ce(Qe.Switch,{...p});break;case"datePicker":H=Ce(Qe.DatePicker,{style:{width:"100%"},...p,allowClear:!0});break;case"rangePicker":H=Ce(Qe.DatePicker.RangePicker,{style:{width:"100%"},...p,allowClear:!0});break;case"timePicker":H=Ce(Qe.TimePicker,{style:{width:"100%"},...p,allowClear:!0});break;case"cascader":H=Ce(Qe.Cascader,{...p,allowClear:!0});break;case"upload":H=Ce(j1,{...p});break;case"btns":H=Ce(Qe.Space,{children:p==null?void 0:p.map(j=>at.createElement(Qe.Button,{type:j.btnType==="submit"?"primary":"default",...Rf.omit(j,["btnType"]),key:j.key||j.btnType,onClick:K=>{A==null||A(K,j)}},j.title||j.children))});break}return H},[g,p,_,R]);if(g==="custom"){const H=p;return at.cloneElement(H.children,{[V1(g||"input")]:R,onChange:_,ref:S})}return at.cloneElement(Q,{[V1(g||"input")]:R,onChange:_,ref:S})},ob=v=>{const{placeholder:g,labelKey:p,onToggle:R,value:_,onClear:A,className:S,style:Q}=v;return un("div",{className:[ev.fieldModal,S].filter(H=>H).join(" "),style:Q,children:[Ce("div",{className:ev.content,onClick:()=>R(!0),children:_?Ce("span",{children:_[p]}):Ce("span",{className:ev.placeholder,children:g})}),Ce("span",{className:ev.suffix,onClick:A,children:_&&Ce(RR,{})})]})},sb={search:"search-table-module_search_17add"};function cb(v){const{tableProps:g={},searchProps:p}=v,{columns:R=[],minColumnWidth:_=200,...A}=g;return un(Wp,{children:[p&&Ce(P1,{hiddenTitle:!0,...p,items:p.items}),Ce(Qe.Table,{columns:R.filter(S=>!S.hidden).map(S=>({...S,width:S.width||_})),scroll:{x:R.filter(S=>!S.hidden).reduce((S,Q)=>S+(typeof Q.width=="number"?Q.width:_),0)},...A,className:kf(sb.table,g==null?void 0:g.className),pagination:typeof(g==null?void 0:g.pagination)=="boolean"?g.pagination:{hideOnSinglePage:!0,showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`,...g==null?void 0:g.pagination}})]})}const fb={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},I1=at.createContext(null),db=({index:v,...g})=>{const[p]=Qe.Form.useForm();return Ce(Qe.Form,{form:p,component:!1,children:Ce(I1.Provider,{value:p,children:Ce("tr",{...g})})})};function pb(v){console.log(v,"props");const{title:g,editable:p,children:R,dataIndex:_,record:A,rules:S,onChange:Q,type:H="input",valueProps:j,...K}=v,G=at.useRef(null),ie=at.useContext(I1),ae=async()=>{try{const qe=await ie.validateFields();Q({...A,...qe})}catch(qe){console.log("Save failed:",qe)}},Ue=()=>Ce(B1,{valueType:H,valueProps:{...j,onBlur:ae,onPressEnter:ae},inputRef:G});let Je=R;return p&&(Je=Ce(Qe.Form.Item,{style:{margin:0},initialValue:A[_],name:_,rules:S,children:Ue()})),Ce("td",{children:Je})}function vb(v){const{columns:g,onChange:p,...R}=v,_={body:{row:db,cell:pb}},A=g==null?void 0:g.map(S=>S.editable?{...S,onCell:Q=>({...S,record:Q,onChange:p})}:S);return Ce(Qe.Table,{...R,components:_,rowClassName:()=>fb.editableRow,columns:A})}const $1=v=>{const{auth:g=!0,...p}=v;return g?Ce(Qe.Button,{...p}):null},hb=v=>{const{PId:g,auths:p,...R}=v,_=at.useMemo(()=>!!(p&&p.find(A=>A.PId===g)),[g,p]);return Ce($1,{...R,auth:_})},On={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},mb=v=>{const{data:g,current:p,rowKey:R,renderContent:_}=v,[A,S]=at.useState(!1),Q=at.useMemo(()=>v.currentIndex!==void 0?v.currentIndex:!p||g.length===0?0:g.findIndex(G=>G.PNId===p),[p,g]),H=at.useMemo(()=>Q>1?A?0:Q-1:0,[Q,A]),j=()=>{S(!0)};return un("ul",{className:On.main,children:[Q>1&&!A&&un("li",{className:kf(On.item,On.itemDone),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),Ce("div",{className:On.content,children:un("div",{className:On.collpase,children:[un("div",{children:["已收起",Ce("span",{children:Q-1}),"个节点"]}),un("a",{className:On.btn,onClick:j,children:["展开节点",Ce(kR,{})]})]})})]}),g.slice(H).map((K,G)=>un("li",{className:kf(On.item,Q===G+H?On.itemActive:Q>G+H?On.itemDone:On.itemUnDo),children:[Ce("div",{className:On.tail}),Ce("div",{className:On.node}),un("div",{className:On.content,children:[_?_(K,G,A?Q:Q-H):un(Wp,{children:[Ce("div",{className:On.title,children:K.PNName}),un("div",{className:On.dateWrapper,children:[K.PlanFinishDate&&un("span",{children:["预计完成时间: ",K.PlanFinishDate]}),K.UpdateTime&&un("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",K.UpdateTime]})]}),K.Remark&&Ce("div",{className:On.remark,children:K.Remark})]}),A&&Q-1===G&&un("a",{className:On.btn,onClick:()=>S(!1),children:["收起节点 ",Ce(LR,{})]})]})]},typeof R=="string"?K[R]:R(K)))]})},yb=v=>{const{current:g,data:p,rowKey:R,renderContent:_,currentIndex:A,...S}=v;return(()=>{Qe.Modal.info({icon:null,title:"流程节点",width:700,content:Ce(mb,{rowKey:R,renderContent:_,current:g,currentIndex:A,data:p}),closable:!0,footer:null,maskClosable:!0,...S})})(),null},gb=(v,g)=>{const p=new URL(v),R=new URL(g);return p.protocol===R.protocol&&p.host===R.host&&p.port===R.port},Sb=v=>{const g=String(v).split("/");return g[g.length-1]},Cb=v=>{var p;return(p=v.headers.get("content-disposition"))==null?void 0:p.split(";")[1].split("=")[1]},Eb=(v,g)=>{const p=g||Sb(v);if(gb(v,window.location.href)){Cy(v,p);return}let R=g;fetch(v,{method:"get"}).then(_=>(R||(R=Cb(_)),_.blob())).then(_=>{Y1(_,R||p)}).catch(()=>{Cy(v,"")})},Tb=v=>{for(var g=v.split(","),p=g[0].match(/:(.*?);/)[1],R=window.atob(g[1]),_=R.length,A=new Uint8Array(_);_--;)A[_]=R.charCodeAt(_);return new Blob([A],{type:p})},Y1=(v,g)=>{let p="";v instanceof Blob?p=window.URL.createObjectURL(v):p=window.URL.createObjectURL(Tb(v));const R=window.navigator;if(R.msSaveOrOpenBlob){R.msSaveOrOpenBlob(v,g);return}Cy(p,g),window.URL.revokeObjectURL(p)},Cy=(v,g)=>{let p=document.createElement("a");p.style.display="none",p.href=v,p.target="_blank",p.download=g,document.body.appendChild(p),p.click(),document.body.removeChild(p)},wb=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:Eb,downloadBlob:Y1},Symbol.toStringTag,{value:"Module"}));class Rb{constructor(g){xw(this,"options",{id:"",canvasId:"verifyCanvas",width:100,height:30,type:"blend",code:""});this.options=g}GVerify(){this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=this.getAllLetter(),this._init(),this.refresh()}_init(){const g=document.getElementById(this.options.id),p=document.createElement("canvas");p.id=this.options.canvasId,p.width=Number(this.options.width),p.height=Number(this.options.height),p.style.cursor="pointer",p.innerHTML="您的浏览器版本不支持canvas",g&&g.appendChild(p),p.onclick=()=>{this.refresh()}}refresh(){this.options.code="";const g=document.getElementById(this.options.canvasId);let p,R=[];if(g.getContext)p=g.getContext("2d");else return;p.textBaseline="middle",p.fillStyle=this.randomColor(180,240),p.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend"?R=this.options.numArr.concat(this.options.letterArr):this.options.type=="number"?R=this.options.numArr:R=this.options.letterArr;for(let _=1;_<=4;_++){const A=R[this.randomNum(0,R.length)];this.options.code+=A,p.font="20px SimHei",p.fillStyle=this.randomColor(50,160),p.shadowBlur=this.randomNum(-3,3),p.shadowColor="rgba(0, 0, 0, 0.3)";const S=Number(this.options.width)/5*_,Q=Number(this.options.height)/2,H=this.randomNum(-30,30);p.translate(S,Q),p.rotate(H*Math.PI/180),p.fillText(A,0,0),p.rotate(-H*Math.PI/180),p.translate(-S,-Q)}for(let _=0;_<2;_++)p.strokeStyle=this.randomColor(40,180),p.beginPath(),p.moveTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height)/2)),p.lineTo(this.randomNum(0,Number(this.options.width)/2),this.randomNum(0,Number(this.options.height))),p.stroke();for(let _=0;_<Number(this.options.width)/10;_++)p.fillStyle=this.randomColor(0,255),p.beginPath(),p.arc(this.randomNum(0,this.options.width),this.randomNum(0,this.options.height),1,0,2*Math.PI),p.fill()}validate(g){const p=g.toLowerCase(),R=this.options.code.toLowerCase();return p==R}getAllLetter(){return"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z".split(",")}randomNum(g,p){return Math.floor(Math.random()*(p-g)+g)}randomColor(g,p){const R=this.randomNum(g,p),_=this.randomNum(g,p),A=this.randomNum(g,p);return"rgb("+R+","+_+","+A+")"}}const bb=Object.freeze(Object.defineProperty({__proto__:null,getGVerify:Rb},Symbol.toStringTag,{value:"Module"}));_t.AuthButton=$1,_t.BackHeader=jR,_t.CoralButton=hb,_t.CreateForm=P1,_t.EditTable=vb,_t.SearchTable=cb,_t.UploadFile=j1,_t.download=wb,_t.fileType=VR,_t.showWorkFlow=yb,_t.utils=XR,_t.verfyCode=bb,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
@@ -7,7 +7,7 @@ const sameOrigin = (current, target) => {
7
7
  return false;
8
8
  };
9
9
  const getFileNameByUrl = (url) => {
10
- const list = new URL(url).href.split("/");
10
+ const list = String(url).split("/");
11
11
  return list[list.length - 1];
12
12
  };
13
13
  const getFileNameByHeaders = (res) => {
@@ -9,7 +9,7 @@ const sameOrigin = (current, target) => {
9
9
  return false;
10
10
  };
11
11
  const getFileNameByUrl = (url) => {
12
- const list = new URL(url).href.split("/");
12
+ const list = String(url).split("/");
13
13
  return list[list.length - 1];
14
14
  };
15
15
  const getFileNameByHeaders = (res) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",