1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3877],{46670:function(e,t,r){"use strict";r.d(t,{FY:function(){return isUsingStaticRendering},Pi:function(){return observer},fv:function(){return useLocalObservable}});var n,i=r(68949),a=r(67294);if(!a.useState)throw Error("mobx-react-lite requires React with Hooks support");if(!i.makeObservable)throw Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var o=r(73935);function printDebugValue(e){return(0,i.getDependencyTree)(e)}var s=function(){function TimerBasedFinalizationRegistry(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var r=Date.now();t.registrations.forEach(function(n,i){r-n.registeredAt>=e&&(t.finalize(n.value),t.registrations.delete(i))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(TimerBasedFinalizationRegistry.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(TimerBasedFinalizationRegistry.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(TimerBasedFinalizationRegistry.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),TimerBasedFinalizationRegistry}(),c=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:s)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null});function isUsingStaticRendering(){return!1}var __read=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o};function observerComponentNameFor(e){return"observer".concat(e)}var ObjectToBeRetainedByReact=function(){};function objectToBeRetainedByReactFactory(){return new ObjectToBeRetainedByReact}var l="function"==typeof Symbol&&Symbol.for,u=l?Symbol.for("react.forward_ref"):"function"==typeof a.forwardRef&&(0,a.forwardRef)(function(e){return null}).$$typeof,d=l?Symbol.for("react.memo"):"function"==typeof a.memo&&(0,a.memo)(function(e){return null}).$$typeof;function observer(e,t){if(d&&e.$$typeof===d)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r,n=null!==(r=null==t?void 0:t.forwardRef)&&void 0!==r&&r,o=e,s=e.displayName||e.name;if(u&&e.$$typeof===u&&(n=!0,"function"!=typeof(o=e.render)))throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var observerComponent=function(e,t){return function(e,t){void 0===t&&(t="observed");var r,n,o=__read(a.useState(objectToBeRetainedByReactFactory),1)[0],s=__read(a.useState(),2)[1],forceUpdate=function(){return s([])},l=a.useRef(null);l.current||(l.current={reaction:null,mounted:!1,changedBeforeMount:!1});var u=l.current;if(u.reaction||(u.reaction=new i.Reaction(observerComponentNameFor(t),function(){u.mounted?forceUpdate():u.changedBeforeMount=!0}),c.register(o,u,u)),a.useDebugValue(u.reaction,printDebugValue),a.useEffect(function(){return c.unregister(u),u.mounted=!0,u.reaction?u.changedBeforeMount&&(u.changedBeforeMount=!1,forceUpdate()):(u.reaction=new i.Reaction(observerComponentNameFor(t),function(){forceUpdate()}),forceUpdate()),function(){u.reaction.dispose(),u.reaction=null,u.mounted=!1,u.changedBeforeMount=!1}},[]),u.reaction.track(function(){try{r=e()}catch(e){n=e}}),n)throw n;return r}(function(){return o(e,t)},s)};return""!==s&&(observerComponent.displayName=s),e.contextTypes&&(observerComponent.contextTypes=e.contextTypes),n&&(observerComponent=(0,a.forwardRef)(observerComponent)),function(e,t){Object.keys(e).forEach(function(r){m[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}(e,observerComponent=(0,a.memo)(observerComponent)),observerComponent}var m={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function useLocalObservable(e,t){return(0,a.useState)(function(){return(0,i.observable)(e(),t,{autoBind:!0})})[0]}(n=o.unstable_batchedUpdates)||(n=function(e){e()}),(0,i.configure)({reactionScheduler:n}),c.finalizeAllImmediately},52081:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mobile/share",function(){return r(49806)}])},49806:function(e,t,r){"use strict";r.r(t);var n=r(85893),i=r(95301),a=r(13886),o=r(21410),s=r(52942),c=r(39892),l=r(98253),u=r(67294),d=r(63167),m=r.n(d),p=r(1512),f=r(32824),h=r(98633),v=r(74855),g=r(55616);t.default=()=>
1{let[e,t]=(0,u.useState)(!1),[r,d]=(0,u.useState)(""),[b,w]=(0,u.useState)("æªå½åä½å"),[_,y]=(0,u.useState)(""),[x,j]=(0,u.useState)(""),[k,T]=(0,u.useState)({}),[N,S]=(0,u.useState)(!1),[R,C]=(0,u.useState)(!1),[M,O]=(0,u.useState)(!1);(0,u.useRef)(!1);let P=(0,u.useRef)("wechat"),B=(0,u.useRef)(null),[I,E]=(0,u.useState)(!1),initMiniprogramShareMessage=()=>{(0,g.Ov)({title:b,path:x,imageUrl:"".concat(r,"?x-oss-process=image/resize,w_120/format,webp")})},getWorkDetailInfo=async()=>{let e=(0,l.queryToObj)(),{works_id:t,uid:r}=e,n=await (0,a.nnv)(r,t),i=n.data;s.Toast.clear(),i&&(T(i),w(i.title),y(i.content),(i.first_img||i.thumb)&&d(i.first_img||i.thumb))};(0,u.useEffect)(()=>{checkIsMyWork(),setTimeout(()=>{},500)},[]),(0,u.useEffect)(()=>{},[N]);let checkIsMyWork=async()=>{let e=(0,l.queryToObj)(),{works_id:t,uid:r,...n}=e,i=(0,a.sqP)();i&&i!=r&&E(!0),await getWorkDetailInfo(),j("".concat((0,c.API)("æ ¹åå"),"/mk-viewer-7/website/").concat(r,"/").concat(t,"?").concat((0,l.objToQuery)(n)))},popupShareTips=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"wechat";if(!b){(0,s.Toast)({message:"请填åä½å主é¢",mask:!1,closeOnClick:!1});return}if(!_){(0,s.Toast)({message:"请填åä½åæè¿°",mask:!1,closeOnClick:!1});return}P.current=e,N?await updateWorks():await checkBindPhone()},checkBindPhone=async()=>{s.Toast.loading({message:"",duration:1e4,forbidClick:!0}),await checkRisk()},copyString=()=>{let e=document.createElement("textarea");e.value=x,document.body.appendChild(e),setTimeout(()=>{try{e.select(),document.execCommand("Copy"),document.body.removeChild(e),(0,s.Toast)({message:"å¤å¶æå",mask:!1,closeOnClick:!1})}catch(e){}},100)},checkRisk=async()=>{var e;let r=await (0,a.hdb)({works_id:k.works_id});s.Toast.clear(),(null==r?void 0:null===(e=r.data)||void 0===e?void 0:e.audit_status)==="1"?"wechat"===P.current?t(!0):copyString():C(!0)},updateWorks=async()=>{s.Toast.loading({message:"",duration:1e4,forbidClick:!0}),S(!1);let e=(0,a.sqP)();await (0,a.jWp)(e,k.works_id,{title:b,content:_}),await checkBindPhone()};return(0,u.useEffect)(()=>{initMiniprogramShareMessage()},[b,_,r,M]),(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)("div",{className:m().share,children:[(()=>{if(!x)return(0,n.jsx)("div",{className:m().preview});let e=160/375,t=x.indexOf("?")>-1?x+"&preview_mode=true":x+"?preview_mode=true";return(0,n.jsx)("div",{className:m().preview,children:(0,n.jsx)("iframe",{src:t,style:{transform:"scale(".concat(e,")"),height:240/e,width:160/e,transformOrigin:"0 0"}})})})(),(0,n.jsx)("div",{className:m().title,children:"å享设置"}),(0,n.jsxs)("div",{className:m().editWrap,children:[(0,n.jsx)("div",{className:m().shareTitle,children:(0,n.jsx)(o.Input,{disabled:I,mini:!0,value:b,onChange:e=>{S(!0),w("".concat(e))},placeholder:"请è¾å
¥ä¸»é¢",maxlength:50})}),(0,n.jsx)("div",{className:m().line}),(0,n.jsx)("div",{className:m().shareDesc,children:(0,n.jsx)(o.Input,{disabled:I,mini:!0,type:"textarea",rows:3,value:_,onChange:e=>{S(!0),y("".concat(e))},placeholder:"请è¾å
¥æè¿°",maxlength:50})}),(0,n.jsxs)("div",{className:m().shareImg,children:[(0,n.jsx)("img",{src:(0,c.cdnApi)(r),alt:""}),!I&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:m().upload,children:(0,n.jsx)(p.Z,{label:"æ´æ¢å¾ç",accept:"image/*",folderDir:"thumb",onComplete:(e,t)=>{d(t);let r=(0,l.queryToObj)(),{works_id:n,uid:i}=r;(0,a.jWp)(i,n,{first_img:(0,c.cdnApi)(t)})}})}),(0,n.jsx)("div",{className:m().btn,children:"æ´æ¢å¾ç"})]})]})]}),(0,n.jsxs)("div",{className:"px-2",children:[(0,n.jsx)("div",{className:m().title,children:"å享è³"}),(0,n.jsxs)("div",{className:m().shareType,children:[(0,n.jsxs)("div",{className:m().shareItem,children:[(0,n.jsx)("div",{className:m().icon,children:(0,n.jsx)("img",{src:"https://img2.maka.im/cdn/editor7/share_weixinfrient.png",alt:"incon"})}),(0,n.jsx)("div",{className:m().label,children:"微信好å "})]}),(0,n.jsxs)("div",{className:m().shareItem,children:[(0,n.jsx)("div",{className:m().icon,children:(0,n.jsx)("img",{onClick:()=>{popupShareTips("link")},src:"https://img2.maka.im/cdn/editor7/share_weixin_link.png",alt:"incon"})}),(0,n.jsx)("div",{className:m().label,children:" 龿¥å享 "})]})]})]})]}),(0,n.jsx)(f.Popup,{visible:e,duration:100,position:"top",className:m().popup,lockScroll:!0,
1children:(0,n.jsxs)("div",{className:m().shareTip,onClick:()=>t(!1),children:[(0,n.jsx)("img",{src:"https://img2.maka.im/cdn/mk-widgets/assets/mk_relay_share_tip.svg",alt:"",className:m().arrow}),(0,n.jsx)("img",{src:"https://img2.maka.im/cdn/mk-widgets/assets/mk_relay_share_text.png",alt:"",className:m().text})]})}),(0,n.jsx)("div",{className:"height-8"}),(0,n.jsx)(h.Z,{isUpdate:N,visible:R,onClose:()=>C(!1),worksId:k.works_id}),(0,n.jsx)(v.CopyToClipboard,{ref:B,onCopy:()=>{(0,s.Toast)({message:"å¤å¶æå",mask:!1,closeOnClick:!1})},text:x,children:(0,n.jsx)("div",{})})]})}},55616:function(e,t,r){"use strict";r.d(t,{Ov:function(){return initMpShareInfo},T8:function(){return navigateTo},UY:function(){return reLaunch},Xr:function(){return toMpLogin},ZM:function(){return isInWechatMP},ZQ:function(){return sendMsg2Mp},n:function(){return navigateBack}});var n=r(39892);let sendMsg2Mp=e=>{var t,r;if(null===(t=window)||void 0===t?void 0:t.wx){let t=null===(r=window)||void 0===r?void 0:r.wx;t.miniProgram.postMessage({data:e})}},initMpShareInfo=e=>{sendMsg2Mp({type:"setShareInfo",data:e})},isInWechatMP=()=>navigator.userAgent.match(/micromessenger/i)&&navigator.userAgent.match(/miniprogram/i)||"miniprogram"===window.__wxjs_environment,navigateTo=e=>{var t;let r=null===(t=window)||void 0===t?void 0:t.wx;null==r||r.miniProgram.navigateTo({url:e})},navigateBack=e=>{var t;let r=null===(t=window)||void 0===t?void 0:t.wx;null==r||r.miniProgram.navigateBack({delta:e})},reLaunch=e=>{var t;let r=null===(t=window)||void 0===t?void 0:t.wx;null==r||r.miniProgram.reLaunch({url:e})},toMpLogin=async()=>{isInWechatMP()&&navigateTo("/pages/webview/index?url=".concat((0,n.API)("æ ¹åå"),"/mk-web-store-v7/miniprogram/login"))}},63167:function(e){e.exports={share:"share_share__w_vYK",preview:"share_preview__dlY0g",title:"share_title__7yYVF",editWrap:"share_editWrap__JiOr_",shareTitle:"share_shareTitle__2UMMD",shareDesc:"share_shareDesc__JvKNt",shareImg:"share_shareImg__vM2Vm",btn:"share_btn__lU_2r",upload:"share_upload__Py_Zq",line:"share_line__tFH8g",shareType:"share_shareType__EWq8B",shareItem:"share_shareItem__2fYkJ",icon:"share_icon___3wbM",label:"share_label__QQi5m",popup:"share_popup__D2u9q",shareTip:"share_shareTip__3MJKy",arrow:"share_arrow__3isVL",text:"share_text__LwiGT"}}},function(e){e.O(0,[461,1466,9019,3135,965,1758,2116,9110,6937,2824,5253,5727,1093,9774,2888,179],function(){return e(e.s=52081)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.