"use strict";(self["webpackJsonp_bos-platform"]=self["webpackJsonp_bos-platform"]||[]).push([[5056],{745831:function(e,t,r){r.r(t),t.default={preview:"_-6q5Wu_o",previewImg:"_1qdi05gC"}},773416:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(182320),r(909112),r(697060),r(505684),r(743924),r(693917),r(976896),r(721300),r(606200),r(534440),r(633768),r(690512),r(78504),r(776512),r(977864),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(233696),r(323784),r(846428),r(336368),r(387912),r(997308),r(86744);var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=n(e)&&"function"!=typeof e)return{default:e};var r=y(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=l?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(o,u,i):o[u]=e[u]}return o.default=e,r&&r.set(e,o),o}(r(795520)),l=r(439532),u=r(738704),i=p(r(510368)),a=r(65780),f=r(555976),c=r(439532),s=p(r(223576)),d=r(149236);function p(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:t})(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,l,u,i=[],a=!0,f=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(e){f=!0,o=e}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.default=function(e){var t,r,n=m((0,o.useState)(""),2),p=n[0],y=n[1];(0,d.useControlInfoCollect)(e.model),(0,o.useEffect)((function(){var t=e.model,r=t.pageId,n=t.key,o=(0,u.subscribeControlMethod)(r,n,"directives",(function(e){void 0!==e&&b(e)}));return setTimeout((function(){return(0,u.setControlMount)(r,n,!0)}),0),function(){o()}}),[]);var b=function(t){t&&t.forEach((function(t){if(t.methodname===f.SET_WATERMARK_PREVIEW){var r=t.args,n=r[0].text,o=e.model.getFormConfig(),u=(0,c.getImgFullPath)(o.fileserver,r[0].picture),i=["text","image","shangtuxiawen","zuotuyouwen"][Number(r[0].type)-1],s=r[0],d=s.globalAlpha,p=s.angle,m=s.color,b=s.fontSize,v=s.fontFamily,g=(0,l.getCommonStyle)(e.model),h=g.width,w=void 0===h?"440px":h,_=g.height,O=void 0===_?"240px":_;i?(0,a.getPageWaterMark)(i,{text:n,logo:u,globalAlpha:d,angle:p,color:m,fontSize:b,fontFamily:v},{width:w,height:O}).then((function(e){y(e)})):y(!1)}}))};if(!(0,s.default)(e.model).isVisible)return null;var v=e.model,g=Object.assign({},(0,l.getCommonStyle)(v));return g.width=null!==(t=g.width)&&void 0!==t?t:"440px",g.height=null!==(r=g.height)&&void 0!==r?r:"240px",o.default.createElement("div",{style:g},o.default.createElement(i.default,{src:p,style:g}))}},510368:function(e,t,r){r(606200),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(336368);var n=l(r(795520)),o=l(r(745831));function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.src,r=e.style,l=Object.assign({background:"url(".concat(t,")")},r);return n.default.createElement("div",{className:o.default.preview,style:r},t?n.default.createElement("div",{className:o.default.previewImg,style:l}):null)}}}]);