@nocobase/plugin-block-workbench 1.9.0-beta.9 → 2.0.0-alpha.11

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.
package/LICENSE.txt CHANGED
@@ -1,8 +1,8 @@
1
- Updated Date: April 1, 2025
1
+ Updated Date: October 2, 2025
2
2
 
3
3
  NocoBase License Agreement
4
4
 
5
- NOCOBASE PTE. LTD.,a Singaporean Exempt Private Company Limited by Shares with its principal place of business located at #03-01 ROBINSON 112 ("The Company") https://www.nocobase.com/ issues this License Agreement ("Agreement") to you. You, as an individual or a company ("the User"), will be deemed to voluntarily accept all terms of this Agreement by using NocoBase (including but not limited to obtaining NocoBase source code or installation package in any form, installing and using NocoBase, purchasing NocoBase commercial license and services, purchasing NocoBase commercial plugins). If the User does not agree to any term of this Agreement, or cannot accurately understand our interpretation of the relevant terms, please stop using it immediately.
5
+ NOCOBASE PTE. LTD.,a Singaporean Exempt Private Company Limited by Shares with its principal place of business located at 112 ROBINSON ROAD, #03-01, SINGAPORE ("The Company") https://www.nocobase.com/ issues this License Agreement ("Agreement") to you. You, as an individual or a company ("The User"), will be deemed to voluntarily accept all terms of this Agreement by using NocoBase (including but not limited to obtaining NocoBase source code or installation package in any form, installing and using NocoBase, purchasing NocoBase commercial license and services, purchasing NocoBase commercial plugins). If the User does not agree to any term of this Agreement, or cannot accurately understand our interpretation of the relevant terms, please stop using it immediately.
6
6
 
7
7
  This Agreement applies to any use, quotation, contract, invoice, and all software delivered by the Company. The User and the Company or NocoBase's agents can no longer sign a separate license agreement for the sale and delivery of the software.
8
8
 
@@ -38,7 +38,7 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
38
38
  3. Disclaimer
39
39
  =============
40
40
 
41
- 3.1 The User shall not use the Software and Commercial Plugins to engage in activities that violate local laws and regulations, religious beliefs. All legal responsibilities and legal consequences arising from the use of Software and Commercial Plugins shall be borne by the User.
41
+ 3.1 The User shall not use the Software and Commercial Plugins to engage in activities that contravene applicable laws and regulations or offend against public order or religious prohibitions. All legal liabilities and consequences arising from the User’s use shall be borne by the User.
42
42
 
43
43
  3.2 The Company shall not be liable for any direct, indirect, special, incidental, or consequential damages (including but not limited to loss of profits, business interruption, data loss, or business information disclosure) caused by the User's use of the Software and Commercial Plugins, even if it has been previously informed of the possibility of such damages.
44
44
 
@@ -46,13 +46,13 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
46
46
  4. License Type
47
47
  ===============
48
48
 
49
- 4.1 The Software uses a dual license type of AGPL-3.0 Open Source License https://www.gnu.org/licenses/agpl-3..en.htm and Commercial License.
49
+ 4.1 This Agreement serves as the unified license agreement for NocoBase Software, applying to both the Community Edition and the Commercial Editions.
50
50
 
51
- 4.2 The Community Edition uses the AGPL-3.0 Open Source License https://www.gnu.org/licenses/agpl-3.0.en.html.
51
+ 4.2 For the Community Edition, this Agreement incorporates and references the full text of the GNU Affero General Public License v3.0 (“AGPL-3.0”, available at: https://www.gnu.org/licenses/agpl-3.0.html ). Community Edition users must comply with the AGPL-3.0 License as well as the supplementary terms set forth in this Agreement. In case of any inconsistency between AGPL-3.0 and this Agreement, the supplementary terms of this Agreement shall prevail.
52
52
 
53
- 4.3 The Commercial Edition (including Standard, Professional, and Enterprise Editions) uses the Commercial License.
53
+ 4.3 For the Commercial Edition (including Standard, Professional, and Enterprise Editions), only the Commercial License terms contained in this Agreement apply. Commercial Edition users are not subject to AGPL-3.0 obligations.
54
54
 
55
- 4.4 Commercial Plugins use the Commercial Plugin License.
55
+ 4.4 For Commercial Plugins, only the Commercial Plugin License terms contained in this Agreement apply.
56
56
 
57
57
  ================================================
58
58
  5. Rights and Obligations of Open Source License
@@ -68,9 +68,13 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
68
68
 
69
69
  5.5 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
70
70
 
71
- 5.6 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
71
+ 5.6 It is not allowed to provide to the public any form of no-code, zero-code, or low-code platform SaaS/PaaS products using the original or modified Software.
72
72
 
73
- 5.7 Comply with all requirements of the AGPL-3.0 agreement.
73
+ 5.7 Comply with all requirements of the AGPL-3.0 License, including but not limited to:
74
+ (a) Any modifications, extensions, or derivative works of the Software must be released under the AGPL-3.0 License;
75
+ (b) If Upper Layer Applications are provided as a network service (including SaaS or PaaS), the complete corresponding source code must be made available to all users of the service;
76
+ (c) The Software may not be combined with other software under incompatible licenses in a manner that would violate the AGPL-3.0 License;
77
+ (d) No additional contractual restrictions may be imposed when redistributing the Software.
74
78
 
75
79
  ===============================
76
80
  6. Rights of Commercial License
@@ -88,9 +92,14 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
88
92
 
89
93
  6.6 Can sell plugins developed for Software in the Marketplace.
90
94
 
91
- 6.7 The User with a Professional or Enterprise Edition License can sell Upper Layer Application to their clients.
95
+ 6.7 The User holding a Professional or Enterprise Edition License can sell Upper Layer Application to its Customers.
92
96
 
93
- 6.8 Not restricted by the AGPL-3.0 agreement.
97
+ 6.8 Exemption from AGPL-3.0 obligations, including but not limited to:
98
+ (a) the requirement to release source code of modifications, extensions, or derivative works;
99
+ (b) the requirement to provide source code when offering the Software as a network service;
100
+ (c) restrictions on combining the Software with other software under different license terms; and
101
+ (d) limitations on adding contractual terms for redistribution.
102
+ The User remains bound by this Agreement and by its commercial license contract.
94
103
 
95
104
  6.9 If there are other agreements in the contract for the above rights, the contract agreement shall prevail.
96
105
 
@@ -100,15 +109,15 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
100
109
 
101
110
  7.1 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
102
111
 
103
- 7.2 It is not allowed to sell, transfer, lease, share, or distribute the Commercial License.
112
+ 7.2 It is not allowed to sell, transfer, lease, share, gift, or distribute the Commercial License.
104
113
 
105
114
  7.3 It is not allowed to sell, transfer, lease, share, or distribute any form of no-code, zero-code, low-code platform, or developer tools developed based on Software.
106
115
 
107
- 7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
116
+ 7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS/PaaS products to the public using the original or modified Software.
108
117
 
109
- 7.5 It is not allowed for the User withot a Professional or Enterprise Edition license to sell Upper Layer Application to clients without a Commercial license.
118
+ 7.5 It is not allowed for the User holding a Standard Edition license to sell Upper Layer Application to Customers without a Commercial license.
110
119
 
111
- 7.6 It is not allowed for the User with a Professional or Enterprise Edition license to sell Upper Layer Application to clients without a Commercial license with access to further development and configuration.
120
+ 7.6 It is not allowed for the User holding a Professional or Enterprise Edition license to sell Upper Layer Application to Customers without a Commercial license with access to further development and configuration.
112
121
 
113
122
  7.7 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
114
123
 
@@ -122,13 +131,13 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
122
131
 
123
132
  8.1 Obtain a permanent Commercial Plugin License for the Commercial Plugin.
124
133
 
125
- 8.2 Get plugins upgrades and exclusive technical support during the upgrade validity period.
134
+ 8.2 Receive plugin upgrades and exclusive technical support during the upgrade validity period.
126
135
 
127
136
  8.3 Can be used for commercial purposes without restrictions on the number of applications or users.
128
137
 
129
- 8.4 The User with an Enterprise Edition License can use the Commercial Plugin in Upper Layer Applications sold to their customers.
138
+ 8.4 The User holding a Professional or Enterprise Edition License can use the Commercial Plugin in Upper Layer Applications sold to its customers.
130
139
 
131
- 8.5 Not restricted by the AGPL-3.0 agreement.
140
+ 8.5 Exemption from AGPL-3.0 obligations.
132
141
 
133
142
  8.6 If there are other agreements in the contract regarding the above rights, the contract agreement shall prevail.
134
143
 
@@ -144,9 +153,11 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
144
153
 
145
154
  9.4 It is not allowed to disclose the source code of Commercial Plugins to any third party.
146
155
 
147
- 9.5 If there is any violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
156
+ 9.5 It is not allowed for the User holding a Community or Standard Edition license to use Commercial Plugins in Upper Layer Applications sold to its customers. Such Commercial Plugins are limited to internal use within the licensed company only.
148
157
 
149
- 9.6 If there are other agreements in the contract regarding the above obligations, the contract agreement shall prevail.
158
+ 9.6 If there is any violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
159
+
160
+ 9.7 If there are other agreements in the contract regarding the above obligations, the contract agreement shall prevail.
150
161
 
151
162
  =============================================================
152
163
  10. Legal Jurisdiction, Interpretation, and Dispute Resolution
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_block_workbench=self.webpackChunk_nocobase_plugin_block_workbench||[]).push([["397"],{626:function(e,t,n){n.r(t),n.d(t,{QRCodeScannerInner:function(){return S},QRCodeScanner:function(){return k}});var r=n(482),o=n(772),i=n(738),l=n(156),a=n.n(l),c=n(238);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function s(e){var t=e.style,n={position:"absolute",backgroundColor:"rgb(255, 255, 255)"};return a().createElement("div",{id:"qr-scan-box",style:u({boxSizing:"border-box",inset:"0px"},void 0===t?{}:t)},a().createElement("div",{style:u({width:"40px",height:"5px",top:"-5px",left:"0px"},n)}),a().createElement("div",{style:u({width:"40px",height:"5px",top:"-5px",right:"0px"},n)}),a().createElement("div",{style:u({width:"40px",height:"5px",bottom:"-5px",left:"0px"},n)}),a().createElement("div",{style:u({width:"40px",height:"5px",bottom:"-5px",right:"0px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",top:"-5px",left:"-5px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",bottom:"-5px",left:"-5px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",top:"-5px",right:"-5px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",bottom:"-5px",right:"-5px"},n)}))}var f=n(58),h=n.n(f),p=n(128);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(e){m(i,r,o,l,a,"next",e)}function a(e){m(i,r,o,l,a,"throw",e)}l(void 0)})}}function y(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){var c=[i,a];if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function v(e,t){return e.startsWith(t)?e.slice(t.length):e}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E="qrcode",S=function(e){var t,n,u,f,m,g,x,S,k,O,C,A,j,I,z,M,P,W,T,N,R,_,F=e.setVisible,H=(0,l.useRef)(),B=(0,l.useRef)(),D=(0,c.useTranslation)("block-workbench").t,Q=w((0,l.useState)({width:0,height:0}),2),V=Q[0],q=Q[1],G=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),U=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),$=(n=(t={onScannerSizeChanged:q,elementId:E,onScanSuccess:(0,l.useCallback)(function(e){F(!1)},[F])}).onScannerSizeChanged,u=t.elementId,f=t.onScanSuccess,g=(m=(0,o.useApp)()).pm.get(h()).mobileRouter,x=m.router,S=((null==g?void 0:g.router)?null==g?void 0:g.basename:x.basename).replace(/\/+$/,""),C=(k=(0,l.useState)(),O=function(e){if(Array.isArray(e))return e}(k)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(k,2)||function(e,t){if(e){if("string"==typeof e)return d(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}(k,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],A=O[1],j=(0,p.useNavigate)(),I=(0,c.useTranslation)("block-workbench").t,z=(0,l.useMemo)(function(){return{width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}},[]),P=(0,l.useCallback)((M=b(function(e){return y(this,function(t){return[2,e.start({facingMode:"environment"},{fps:10,qrbox:function(e,t){return n({width:e,height:t}),{width:z.width,height:z.height}}},function(e){if(null==e?void 0:e.startsWith("http")){window.location.href=e;return}j(v(e,S)),f&&f(e)},void 0)]})}),function(e){return M.apply(this,arguments)}),[j,n,z,S,f]),T=(0,l.useCallback)((W=b(function(e){var t;return y(this,function(n){return(t=e.getState(),[i.lz.SCANNING,i.lz.PAUSED].includes(t))?[2,e.stop()]:[2]})}),function(e){return W.apply(this,arguments)}),[]),R=(0,l.useCallback)((N=b(function(e){var t;return y(this,function(n){switch(n.label){case 0:return[4,T(C)];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,C.scanFileV2(e,!1)];case 3:if(null==(t=n.sent().decodedText)?void 0:t.startsWith("http"))return window.location.href=t,[2];return j(v(t,S)),f&&f(t),[3,5];case 4:return n.sent(),alert(I("QR code recognition failed, please scan again")),P(C),[3,5];case 5:return[2]}})}),function(e){return N.apply(this,arguments)}),[T,C,j,S,I,P,f]),(0,l.useEffect)(function(){var e=new i.t2(u);return A(e),P(e),function(){T(e)}},[u,P,T]),{startScanCamera:P,startScanFile:R}).startScanFile,L=function(){B.current&&B.current.click()},Y=function(e){var t=e.target.files;if(t.length>0){var n=t[0];n.size<1e6?$(n):alert(D("The image size is too large. Please compress it to below 1MB before uploading"))}};(0,l.useEffect)(function(){return document.documentElement.style.overscrollBehavior="none",function(){document.documentElement.style.overscrollBehavior="default"}},[]),(0,l.useEffect)(function(){var e=V.width,t=V.height,n=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),r=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);if(e>0&&t>0&&t<r){var o=Math.floor(r/t*e),i=document.getElementsByTagName("video")[0];i.style.height="".concat(r,"px"),i.style.width="".concat(o,"px"),H.current.style.left="".concat((n-o)/2,"px"),H.current.style.position="absolute"}},[V]);var J={zIndex:"1003",fontSize:"1.8em",fontWeight:"bold"};return a().createElement(a().Fragment,null,a().createElement("div",{ref:H,id:E,style:{position:"absolute"}}),a().createElement(s,{style:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(_=Math.floor(.6*Math.min(G,U)),{left:"".concat((G-_)/2,"px"),top:"".concat((U-_)/2,"px"),position:"fixed",width:"".concat(_,"px"),height:"".concat(_,"px")}))}),a().createElement(function(){return a().createElement("div",{style:{position:"absolute",bottom:"20px",left:"20px",padding:"10px 60px"}},a().createElement("div",{style:{color:"white",width:"40px",display:"flex",flexDirection:"column",alignItems:"center"}},a().createElement(r.FileImageOutlined,{style:J,onClick:L}),D("Album"),a().createElement("input",{ref:B,type:"file",accept:"image/*",onChange:Y,style:{visibility:"hidden"}})))},null))},k=function(e){var t=(0,o.useActionContext)(),n=t.visible,u=t.setVisible,s=w((0,l.useState)(!1),2),f=s[0],h=s[1],p=(0,c.useTranslation)("block-workbench").t;return(0,l.useEffect)(function(){var e,t,r=(e=function(){var e,t,n;return function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){var c=[i,a];if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.t2.getCameras()];case 1:return 0===r.sent().length?alert(p("No camera device detected")):h(!0),[3,3];case 2:return e=r.sent(),t={NotFoundError:p("No camera device detected"),NotAllowedError:p("You have not granted permission to use the camera")},console.log(e),alert(null!=(n=t[e.name])?n:e),h(!1),u(!1),[3,3];case 3:return[2]}})},t=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(e){x(i,r,o,l,a,"next",e)}function a(e){x(i,r,o,l,a,"throw",e)}l(void 0)})},function(){return t.apply(this,arguments)});n&&!f&&r()},[n,f,u,p]),n&&f?a().createElement("div",{style:{position:"fixed",width:"100%",height:"100%",background:"black",zIndex:"1001",top:0,left:0,overflow:"hidden"}},a().createElement(S,{setVisible:u}),a().createElement(r.LeftOutlined,{style:{position:"absolute",top:"22px",left:"20px",zIndex:"1003",color:"white",fontSize:"1.8em",fontWeight:"bold"},onClick:function(){return u(!1)}}),a().createElement("div",{style:{position:"absolute",color:"white",fontSize:"1.5em",left:0,right:0,top:"20px",zIndex:"1002",marginLeft:"auto",marginRight:"auto",textAlign:"center"}},p("Scan QR code"))):null}}}]);
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("antd"),require("react"),require("@nocobase/plugin-mobile/client"),require("@nocobase/client"),require("react-router-dom"),require("@formily/react"),require("@ant-design/icons"),require("antd-style")):"function"==typeof define&&define.amd?define("@nocobase/plugin-block-workbench",["react-i18next","antd","react","@nocobase/plugin-mobile/client","@nocobase/client","react-router-dom","@formily/react","@ant-design/icons","antd-style"],t):"object"==typeof exports?exports["@nocobase/plugin-block-workbench"]=t(require("react-i18next"),require("antd"),require("react"),require("@nocobase/plugin-mobile/client"),require("@nocobase/client"),require("react-router-dom"),require("@formily/react"),require("@ant-design/icons"),require("antd-style")):e["@nocobase/plugin-block-workbench"]=t(e["react-i18next"],e.antd,e.react,e["@nocobase/plugin-mobile/client"],e["@nocobase/client"],e["react-router-dom"],e["@formily/react"],e["@ant-design/icons"],e["antd-style"])}(self,function(e,t,n,o,r,i,a,c,l){return function(){var s,u,p,d,m,f,b={916:function(e,t,n){"use strict";var o=n(589),r=n.n(o),i=n(758),a=n.n(i)()(r());a.push([e.id,".adm-grid {\n --gap: 0;\n --gap-horizontal: var(--gap);\n --gap-vertical: var(--gap);\n display: grid;\n grid-gap: 10px;\n -webkit-column-gap: var(--gap-horizontal);\n grid-column-gap: var(--gap-horizontal);\n -moz-column-gap: var(--gap-horizontal);\n column-gap: var(--gap-horizontal);\n grid-row-gap: var(--gap-vertical);\n row-gap: var(--gap-vertical);\n grid-template-columns: repeat(var(--columns), minmax(0, 1fr));\n align-items: stretch;\n}\n.adm-grid-item {\n grid-column-end: span var(--item-span);\n}\n",""]),t.Z=a},59:function(e,t,n){"use strict";var o=n(589),r=n.n(o),i=n(758),a=n.n(i)()(r());a.push([e.id,".adm-list {\n --header-font-size: var(--adm-font-size-7);\n --prefix-width: 'auto';\n --prefix-padding-right: 12px;\n --align-items: center;\n --active-background-color: var(--adm-color-border);\n --border-inner: solid 1px var(--adm-color-border);\n --border-top: solid 1px var(--adm-color-border);\n --border-bottom: solid 1px var(--adm-color-border);\n --padding-left: 12px;\n --padding-right: 12px;\n --font-size: var(--adm-font-size-9);\n --extra-max-width: 70%;\n}\n.adm-list-header {\n color: var(--adm-color-weak);\n font-size: var(--header-font-size);\n padding: 8px var(--padding-right) 8px var(--padding-left);\n}\n.adm-list-body {\n background-color: var(--adm-color-background);\n overflow: hidden;\n font-size: var(--font-size);\n}\n.adm-list-body-inner {\n margin-top: -1px;\n}\n.adm-list-default .adm-list-body {\n border-top: var(--border-top);\n border-bottom: var(--border-bottom);\n}\n.adm-list-card {\n margin: 12px;\n}\n.adm-list-card .adm-list-body {\n border-radius: 8px;\n}\n.adm-list-card .adm-list-header {\n padding-left: 0;\n}\n.adm-list-item {\n display: block;\n padding-left: var(--padding-left);\n position: relative;\n background-color: var(--adm-color-background);\n line-height: 1.5;\n}\n.adm-list-item-title,\n.adm-list-item-description {\n color: var(--adm-color-weak);\n font-size: var(--adm-font-size-main);\n}\n.adm-list-item-content {\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: flex;\n align-items: var(--align-items);\n justify-content: flex-start;\n border-top: var(--border-inner);\n padding-right: var(--padding-right);\n}\n.adm-list-item-content-prefix {\n width: var(--prefix-width);\n flex: none;\n padding-right: var(--prefix-padding-right);\n}\n.adm-list-item-content-main {\n flex: auto;\n padding: 12px 0;\n}\n.adm-list-item-content-extra {\n flex: none;\n padding-left: 12px;\n font-size: var(--adm-font-size-7);\n color: var(--adm-color-weak);\n max-width: var(--extra-max-width);\n}\n.adm-list-item-content-arrow {\n flex: none;\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: flex;\n align-items: center;\n margin-left: 4px;\n color: var(--adm-color-light);\n font-size: 19px;\n}\n.adm-list-item-disabled {\n cursor: not-allowed;\n}\n.adm-list-item-disabled.adm-list-item-disabled > .adm-list-item-content > * {\n opacity: 0.4;\n pointer-events: none;\n}\na.adm-list-item:active:not(.adm-list-item-disabled) {\n background-color: var(--active-background-color);\n}\na.adm-list-item:active:not(.adm-list-item-disabled)::after {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n bottom: -1px;\n left: 0;\n border-bottom: var(--border-inner);\n}\n",""]),t.Z=a},46:function(e,t,n){"use strict";var o=n(589),r=n.n(o),i=n(758),a=n.n(i)()(r());a.push([e.id,":root {\n --adm-radius-s: 4px;\n --adm-radius-m: 8px;\n --adm-radius-l: 12px;\n --adm-font-size-1: 9px;\n --adm-font-size-2: 10px;\n --adm-font-size-3: 11px;\n --adm-font-size-4: 12px;\n --adm-font-size-5: 13px;\n --adm-font-size-6: 14px;\n --adm-font-size-7: 15px;\n --adm-font-size-8: 16px;\n --adm-font-size-9: 17px;\n --adm-font-size-10: 18px;\n --adm-color-primary: #1677ff;\n --adm-color-success: #00b578;\n --adm-color-warning: #ff8f1f;\n --adm-color-danger: #ff3141;\n --adm-color-yellow: #ff9f18;\n --adm-color-orange: #ff6430;\n --adm-color-wathet: #e7f1ff;\n --adm-color-text: #333333;\n --adm-color-text-secondary: #666666;\n --adm-color-weak: #999999;\n --adm-color-light: #cccccc;\n --adm-color-border: #eeeeee;\n --adm-color-background: #ffffff;\n --adm-color-highlight: var(--adm-color-danger);\n --adm-color-white: #ffffff;\n --adm-color-box: #f5f5f5;\n --adm-color-text-light-solid: var(--adm-color-white);\n --adm-color-text-dark-solid: #000000;\n --adm-color-fill-content: var(--adm-color-box);\n --adm-font-size-main: var(--adm-font-size-5);\n --adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',\n helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',\n 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;\n --adm-border-color: var(--adm-color-border);\n}\nhtml[data-prefers-color-scheme='dark'] {\n --adm-color-primary: #3086ff;\n --adm-color-success: #34b368;\n --adm-color-warning: #ffa930;\n --adm-color-danger: #ff4a58;\n --adm-color-yellow: #ffa930;\n --adm-color-orange: #e65a2b;\n --adm-color-wathet: #0d2543;\n --adm-color-text: #e6e6e6;\n --adm-color-text-secondary: #b3b3b3;\n --adm-color-weak: #808080;\n --adm-color-light: #4d4d4d;\n --adm-color-border: #2b2b2b;\n --adm-color-box: #0a0a0a;\n --adm-color-background: #1a1a1a;\n --adm-color-background-body: var(--adm-color-background);\n --adm-border-color: var(--adm-color-border);\n}\n:root {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nhtml {\n background-color: var(--adm-color-background-body);\n}\nbody {\n color: #333333;\n color: var(--adm-color-text);\n font-size: 13px;\n font-size: var(--adm-font-size-main);\n font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',\n helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',\n 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;\n font-family: var(--adm-font-family);\n}\na,\nbutton {\n cursor: pointer;\n}\na {\n color: #1677ff;\n color: var(--adm-color-primary);\n transition: opacity ease-in-out 0.2s;\n}\na:active {\n opacity: 0.8;\n}\n.adm-plain-anchor {\n color: inherit;\n transition: none;\n}\n.adm-plain-anchor:active {\n opacity: 1;\n opacity: initial;\n}\nbody.adm-overflow-hidden {\n overflow: hidden !important;\n}\ndiv.adm-px-tester {\n --size: 1;\n height: -webkit-calc(var(--size) / 2 * 2px);\n height: -moz-calc(var(--size) / 2 * 2px);\n height: calc(var(--size) / 2 * 2px);\n width: 0;\n position: fixed;\n left: -100vw;\n top: -100vh;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n",""]),t.Z=a},758:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(a[l]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);o&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]&&(u[1]="@media ".concat(u[2]," {").concat(u[1],"}")),u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},589:function(e){"use strict";e.exports=function(e){return e[1]}},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},278:function(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},i=[],a=0;a<e.length;a++){var c=e[a],l=o.base?c[0]+o.base:c[0],s=r[l]||0,u="".concat(l," ").concat(s);r[l]=s+1;var p=n(u),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var m=function(e,t){var n=t.domAPI(t);return n.update(e),function(t){t?(t.css!==e.css||t.media!==e.media||t.sourceMap!==e.sourceMap||t.supports!==e.supports||t.layer!==e.layer)&&n.update(e=t):n.remove()}}(d,o);o.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}i.push(u)}return i}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var c=n(i[a]);t[c].references--}for(var l=o(e,r),s=0;s<i.length;s++){var u=n(i[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},547:function(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},593:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},604:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},391:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){var o,r,i;o="",n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {")),(r=void 0!==n.layer)&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}"),(i=n.sourceMap)&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(o,t,e.options)},remove:function(){!function(e){if(null!==e.parentNode)e.parentNode.removeChild(e)}(t)}}}},784:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},482:function(e){"use strict";e.exports=c},505:function(e){"use strict";e.exports=a},772:function(e){"use strict";e.exports=r},58:function(e){"use strict";e.exports=o},721:function(e){"use strict";e.exports=t},202:function(e){"use strict";e.exports=l},156:function(e){"use strict";e.exports=n},238:function(t){"use strict";t.exports=e},128:function(e){"use strict";e.exports=i},527:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=i(t,n));return t}(n)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=(function(){return r}).apply(t,[]))||(e.exports=n)}()}},h={};function g(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={id:e,exports:{}};return b[e].call(n.exports,n,n.exports,g),n.exports}g.m=b,g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.f={},g.e=function(e){return Promise.all(Object.keys(g.f).reduce(function(t,n){return g.f[n](e,t),t},[]))},g.u=function(e){return""+({918:"d180e3dfa95b10ab",94:"54dcee37d9a65f71"})[e]+".js"},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s={},u="@nocobase/plugin-block-workbench:",g.l=function(e,t,n,o){if(s[e])return void s[e].push(t);if(void 0!==n)for(var r,i,a=document.getElementsByTagName("script"),c=0;c<a.length;c++){var l=a[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==u+n){r=l;break}}r||(i=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,g.nc&&r.setAttribute("nonce",g.nc),r.setAttribute("data-webpack",u+n),r.src=e),s[e]=[t];var p=function(t,n){r.onerror=r.onload=null,clearTimeout(d);var o=s[e];if(delete s[e],r.parentNode&&r.parentNode.removeChild(r),o&&o.forEach(function(e){return e(n)}),t)return t(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=p.bind(null,r.onerror),r.onload=p.bind(null,r.onload),i&&document.head.appendChild(r)},g.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nc=void 0,(p=window.__nocobase_public_path__||"/").endsWith("/")||(p+="/"),g.p=p+"static/plugins/@nocobase/plugin-block-workbench/dist/client/",d={909:0},g.f.j=function(e,t){var n=g.o(d,e)?d[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise(function(t,o){n=d[e]=[t,o]});t.push(n[2]=o);var r=g.p+g.u(e),i=Error();g.l(r,function(t){if(g.o(d,e)&&(0!==(n=d[e])&&(d[e]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",i.name="ChunkLoadError",i.type=o,i.request=r,n[1](i)}},"chunk-"+e,e)}},m=function(e,t){var n,o,r=t[0],i=t[1],a=t[2],c=0;if(r.some(function(e){return 0!==d[e]})){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);a&&a(g)}for(e&&e(t);c<r.length;c++)o=r[c],g.o(d,o)&&d[o]&&d[o][0](),d[o]=0},(f=self.webpackChunk_nocobase_plugin_block_workbench=self.webpackChunk_nocobase_plugin_block_workbench||[]).forEach(m.bind(null,0)),f.push=m.bind(null,f.push.bind(f));var y={};return!function(){"use strict";g.r(y),g.d(y,{PluginBlockWorkbenchClient:function(){return eD},default:function(){return e_}});var e,t,n,o,r,i,a,c,l=g(772),s=g(505),u=g(721),p=g(202),d=g(156),m=g.n(d),f=g(238),b=g(278),h=g.n(b),v=g(391),x=g.n(v),w=g(547),k=g.n(w),O=g(604),S=g.n(O),P=g(593),C=g.n(P),j=g(784),E=g.n(j),I=g(46),z={};z.styleTagTransform=E(),z.setAttributes=S(),z.insert=k().bind(null,"head"),z.domAPI=x(),z.insertStyleElement=C(),h()(I.Z,z),I.Z&&I.Z.locals&&I.Z.locals,"undefined"!=typeof window&&"undefined"!=typeof document&&window.document&&window.document.createElement&&document.addEventListener("touchstart",()=>{},!0);var A=g(916),T={};function R(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function $(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t}T.styleTagTransform=E(),T.setAttributes=S(),T.insert=k().bind(null,"head"),T.domAPI=x(),T.insertStyleElement=C(),h()(A.Z,T),A.Z&&A.Z.locals&&A.Z.locals;var M=g(527),F=g.n(M);function B(e,t){let n=Object.assign({},t.props);for(let o in e.className&&(n.className=F()(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),void 0!==e.tabIndex&&(n.tabIndex=e.tabIndex),e)e.hasOwnProperty(o)&&(o.startsWith("data-")||o.startsWith("aria-"))&&(n[o]=e[o]);return m().cloneElement(t,n)}function q(e){return"number"==typeof e?`${e}px`:e}let L="adm-grid";var N=R(e=>{let t={"--columns":e.columns.toString()},{gap:n}=e;return void 0!==n&&(Array.isArray(n)?(t["--gap-horizontal"]=q(n[0]),t["--gap-vertical"]=q(n[1])):t["--gap"]=q(n)),B(e,m().createElement("div",{className:L,style:t},e.children))},{Item:e=>{let t=$({span:1},e),n={"--item-span":t.span};return B(t,m().createElement("div",{className:`${L}-item`,style:n,onClick:t.onClick},t.children))}}),D=g(59),_={};_.styleTagTransform=E(),_.setAttributes=S(),_.insert=k().bind(null,"head"),_.domAPI=x(),_.insertStyleElement=C(),h()(D.Z,_),D.Z&&D.Z.locals&&D.Z.locals;let G="adm-list",W={mode:"default"},Z=(0,d.forwardRef)((e,t)=>{let n=$(W,e),o=(0,d.useRef)(null);return(0,d.useImperativeHandle)(t,()=>({get nativeElement(){return o.current}})),B(n,m().createElement("div",{className:F()(G,`${G}-${n.mode}`),ref:o},n.header&&m().createElement("div",{className:`${G}-header`},n.header),m().createElement("div",{className:`${G}-body`},m().createElement("div",{className:`${G}-body-inner`},n.children))))});var H=function(e){return d.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),d.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"RightOutline-RightOutlined"},d.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),d.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))};function Q(e){return null!=e&&!1!==e}let V="${label}不是一个有效的${type}",U={locale:{locale:"zh-CH",common:{confirm:"确定",cancel:"取消",loading:"加载中",close:"关闭"},Calendar:{title:"日期选择",confirm:"确认",start:"开始",end:"结束",today:"今日",markItems:["一","二","三","四","五","六","日"],yearAndMonth:"${year}年${month}月"},Cascader:{placeholder:"请选择"},Dialog:{ok:"我知道了"},DatePicker:{tillNow:"至今"},ErrorBlock:{default:{title:"页面遇到一些小问题",description:"待会来试试"},busy:{title:"前方拥堵",description:"刷新试试"},disconnected:{title:"网络有点忙",description:"动动手指帮忙修复"},empty:{title:"没有找到你需要的东西",description:"找找其他的吧"}},Form:{required:"必填",optional:"选填",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:V,method:V,array:V,object:V,number:V,date:V,boolean:V,integer:V,float:V,regexp:V,email:V,url:V,hex:V},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},ImageUploader:{uploading:"上传中...",upload:"上传"},InfiniteScroll:{noMore:"没有更多了",failedToLoad:"加载失败",retry:"重新加载"},Input:{clear:"清除"},Mask:{name:"背景蒙层"},Modal:{ok:"我知道了"},PasscodeInput:{name:"密码输入框"},PullToRefresh:{pulling:"下拉刷新",canRelease:"释放立即刷新",complete:"刷新成功"},SearchBar:{name:"搜索框"},Slider:{name:"滑动输入条"},Stepper:{decrease:"减少",increase:"增加"},Switch:{name:"开关"},Selector:{name:"选择组"}}},Y=m().createContext(null),J="adm-list-item";var X=R(Z,{Item:e=>{var t,n,o;let{arrow:r,arrowIcon:i}=e,{list:a={}}=null!=(o=(0,d.useContext)(Y))?o:U,c=null!=(t=e.clickable)?t:!!e.onClick,l=null!=(n=null!=r?r:i)?n:c,s=function(e,...t){for(let e=t.length-1;e>=0;e-=1)if(void 0!==t[e])return t[e];return e}(a.arrowIcon,!0!==r?r:null,!0!==i?i:null),u=m().createElement("div",{className:`${J}-content`},Q(e.prefix)&&m().createElement("div",{className:`${J}-content-prefix`},e.prefix),m().createElement("div",{className:`${J}-content-main`},Q(e.title)&&m().createElement("div",{className:`${J}-title`},e.title),e.children,Q(e.description)&&m().createElement("div",{className:`${J}-description`},e.description)),Q(e.extra)&&m().createElement("div",{className:`${J}-content-extra`},e.extra),l&&m().createElement("div",{className:`${J}-content-arrow`},s||m().createElement(H,null)));return B(e,m().createElement(c?"a":"div",{className:F()(`${J}`,c?["adm-plain-anchor"]:[],e.disabled&&`${J}-disabled`),onClick:e.disabled?void 0:e.onClick},u))}});function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(o,r)}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var en={Grid:"grid",List:"list"},eo=new l.SchemaSettings({name:"blockSettings:workbench",items:[{name:"title",Component:function(){var e,t,n=(0,s.useField)(),o=(0,s.useFieldSchema)(),r=(0,l.useDesignable)().dn,i=(0,f.useTranslation)().t;return m().createElement(l.SchemaSettingsModalItem,{title:i("Edit block title & description"),schema:{type:"object",title:i("Edit block title & description"),properties:{title:{title:i("Block title"),type:"string",default:null==o||null==(e=o["x-decorator-props"])?void 0:e.title,"x-decorator":"FormItem","x-component":"Input"},description:{title:i("Description"),type:"string",default:null==o||null==(t=o["x-decorator-props"])?void 0:t.description,"x-decorator":"FormItem","x-component":"Markdown"}}},onSubmit:function(e){var t,i=e.title,a=e.description,c=o["x-decorator-props"]||{};c.title=i,c.description=a,o["x-decorator-props"]=c,n.decoratorProps.title=i,n.decoratorProps.description=a,r.emit("patch",{schema:(K(t={},"x-uid",o["x-uid"]),K(t,"x-decorator-props",o["x-decorator-props"]),t)}),r.refresh()}})}},{name:"setTheBlockHeight",Component:l.SchemaSettingsBlockHeightItem},{name:"blockLinkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return{title:(0,(0,f.useTranslation)().t)("Block Linkage rules"),category:l.LinkageRuleCategory.block}}},{name:"layout",Component:function(){var e,t=(0,f.useTranslation)().t,n=(0,s.useFieldSchema)(),o=(0,s.useField)(),r=(0,l.useDesignable)().dn;return m().createElement(l.SchemaSettingsSelectItem,{title:t("Layout",{ns:"block-workbench"}),options:[{label:t("Grid",{ns:"block-workbench"}),value:en.Grid},{label:t("List",{ns:"block-workbench"}),value:en.List}],value:(null==n||null==(e=n["x-component-props"])?void 0:e.layout)||en.Grid,onChange:function(e){o.componentProps.layout=e;var t={"x-uid":n["x-uid"]};n["x-component-props"]=n["x-component-props"]||{},t["x-component-props"]=n["x-component-props"]||{},t["x-component-props"].layout=e,n["x-component-props"].layout=e,r.emit("patch",{schema:t}),r.refresh()}})}},{name:"itemsPerRow",Component:function(){var e,t=(0,s.useField)(),n=(0,s.useFieldSchema)(),o=(0,l.useDesignable)().dn,r=(0,f.useTranslation)().t;return m().createElement(l.SchemaSettingsModalItem,{title:r("Items per row",{ns:"block-workbench"}),schema:{type:"object",properties:{itemsPerRow:{type:"number",default:(null==n||null==(e=n["x-decorator-props"])?void 0:e.itemsPerRow)||4,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:6},description:r("At least 1, up to 6",{ns:"block-workbench"}),required:!0}}},onSubmit:function(e){var r,i=e.itemsPerRow,a=n["x-decorator-props"]||{};a.itemsPerRow=i,n["x-decorator-props"]=a,t.decoratorProps.ItemsPerRow=i,o.emit("patch",{schema:(et(r={},"x-uid",n["x-uid"]),et(r,"x-decorator-props",n["x-decorator-props"]),r)}),o.refresh()}})},useVisible:function(){var e,t=((0,l.useOpenModeContext)()||{}).isMobile,n=(0,s.useFieldSchema)();return t&&(null==n||null==(e=n["x-component-props"])?void 0:e.layout)!==en.List}},{name:"ellipsis",type:"switch",useComponentProps:function(){var e,t,n,o=(0,s.useFieldSchema)(),r=(0,l.useDesignable)().dn;return{title:(0,(0,f.useTranslation)().t)("Ellipsis action title",{ns:"block-workbench"}),checked:(null==(n=o["x-component-props"])?void 0:n.ellipsis)!==!1,onChange:(e=function(e){return function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,o=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){a.label=l[1];break}if(6===l[0]&&a.label<r[1]){a.label=r[1],r=l;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(l);break}r[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:var n,i;return o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].ellipsis=e,[4,r.emit("patch",{schema:{"x-uid":o["x-uid"],"x-component-props":(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){et(e,t,n[t])})}return e}({},o["x-component-props"]),i=i={ellipsis:e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n)}})];case 1:return t.sent(),[2]}})},t=function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){ee(i,o,r,a,c,"next",e)}function c(e){ee(i,o,r,a,c,"throw",e)}a(void 0)})},function(e){return t.apply(this,arguments)})}}},{type:"remove",name:"remove"}]});function er(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ei(){var e=er(["\n &.list {\n margin: -","px;\n border-radius: ","px;\n overflow: hidden;\n\n .adm-list {\n --padding-left: ","px;\n --padding-right: ","px;\n\n .adm-list-item-content-main {\n display: flex;\n\n button {\n background-color: transparent;\n border: none;\n height: auto;\n box-shadow: none;\n padding: 16px 32px;\n margin: -12px -32px;\n width: calc(100% + 64px);\n text-align: start;\n justify-content: start !important;\n color: ",";\n }\n }\n }\n\n button[aria-label*='schema-initializer-WorkbenchBlock.ActionBar-workbench:configureActions'] {\n margin-bottom: ","px;\n margin-left: ","px;\n }\n }\n "]);return ei=function(){return e},e}function ea(){var e=er(["\n height: ",";\n\n .nb-action-panel-warp {\n height: ",";\n overflow-y: auto;\n }\n "]);return ea=function(){return e},e}var ec=(0,s.observer)(function(){var e=(0,s.useFieldSchema)();return(0,(0,l.useSchemaInitializerRender)(e["x-initializer"]).render)()},{displayName:"WorkbenchConfigureActionsButton"}),el=function(){var e=(0,s.useFieldSchema)(),t=window.matchMedia("(max-width: 768px)").matches,n=((0,l.useOpenModeContext)()||{}).isMobile,o=(e.parent["x-decorator-props"]||{}).itemsPerRow;return n||t?m().createElement(N,{columns:void 0===o?4:o,gap:8},e.mapProperties(function(e,t){return m().createElement(l.NocoBaseRecursionField,{name:t,schema:e,key:t})})):m().createElement(u.Space,{wrap:!0,size:8,align:"start"},e.mapProperties(function(e,t){return m().createElement(l.NocoBaseRecursionField,{name:t,schema:e,key:t})}))},es=function(){var e=(0,s.useFieldSchema)(),t=(e.parent["x-component-props"]||{}).layout,n=void 0===t?en.Grid:t,o=(0,l.useToken)().token;return m().createElement("div",{className:"nb-action-panel-warp"},m().createElement(l.DndContext,null,n===en.Grid?m().createElement(el,null):m().createElement(X,{style:{"--adm-color-background":o.colorBgContainer,"--active-background-color":o.colorBorderSecondary,"--border-inner":"solid 1px ".concat(o.colorBorderSecondary),"--border-bottom":"none","--border-top":"none"}},e.mapProperties(function(e,t){var n,o,r=null==(n=e["x-component-props"])?void 0:n.icon,i=null==(o=e["x-component-props"])?void 0:o.iconColor;return m().createElement(X.Item,{key:t,prefix:m().createElement(u.Avatar,{style:{backgroundColor:i},icon:m().createElement(l.Icon,{type:r})}),onClick:function(){},style:{marginTop:"5px"}},m().createElement(l.NocoBaseRecursionField,{name:t,schema:e}))}))))},eu=(0,d.createContext)({layout:"grid",ellipsis:!0}),ep=(0,l.createStyles)(function(e){var t=e.token;return{containerClass:(0,e.css)(ei(),t.paddingLG,t.borderRadiusBlock,t.paddingLG,t.paddingLG,t.colorText,t.paddingLG,t.paddingLG)}}),ed=(0,l.withDynamicSchemaProps)(function(e){var t=(0,s.useFieldSchema)(),n=t["x-component-props"]||{},o=n.layout,r=void 0===o?"grid":o,i=n.ellipsis,a=ep().styles,c=(t["x-decorator-props"]||{}).title,p=(0,l.useBlockHeight)(),d=u.theme.useToken().token,f=(0,l.useDesignable)().designable,b=c?d.fontSizeLG*d.lineHeightLG+2*d.padding:0,h=p-2*d.paddingLG-b,g="calc(".concat(h,"px - 1rem - ").concat(d.controlHeight,"px)");"list"===r&&(h=p-b,g="calc(".concat(h,"px - 1rem - ").concat(d.controlHeight+d.paddingLG,"px)"));var y=(0,l.css)(ea(),p?h+"px":"100%",f?g:"100%");return m().createElement("div",{className:"nb-action-penal-container ".concat(r," ").concat(a.containerClass," ").concat(y)},m().createElement(eu.Provider,{value:{layout:r,ellipsis:i}},m().createElement(l.DataSourceContext.Provider,{value:void 0},m().createElement(l.CollectionContext.Provider,{value:void 0},e.children))))},{displayName:"WorkbenchBlock"});function em(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ef(){var e=em(["\n display: flex;\n background-color: transparent;\n border: 0;\n height: auto;\n box-shadow: none;\n padding-top: 8px;\n "]);return ef=function(){return e},e}function eb(){var e=em(["\n width: 5em;\n "]);return eb=function(){return e},e}function eh(){var e=em(["\n margin-top: ","px;\n width: 100%;\n "]);return eh=function(){return e},e}ed.ActionBar=function(){return m().createElement(m().Fragment,null,m().createElement(es,null),m().createElement(ec,null))};var eg=(0,p.createStyles)(function(e){var t=e.token,n=e.css;return{action:n(ef()),avatar:n(eb()),title:n(eh(),t.marginSM)}});function ey(e){var t=e.onlyIcon,n=(0,s.useFieldSchema)(),o=n["x-component-props"]||{},r=o.icon,i=o.iconColor,a=(0,d.useContext)(eu),c=a.layout,p=a.ellipsis,b=void 0===p||p,h=eg(),g=h.styles,y=h.cx,v=(0,(0,f.useTranslation)().t)(n.title,{ns:l.NAMESPACE_UI_SCHEMA}),x=!t;return c===en.Grid?m().createElement("div",{title:v,className:y(g.avatar)},m().createElement(u.Avatar,{style:{backgroundColor:i},size:48,icon:m().createElement(l.Icon,{type:r})}),m().createElement("div",{className:y(g.title),style:{whiteSpace:b?"nowrap":"normal",textOverflow:b?"ellipsis":"clip",overflow:b?"hidden":"visible"}},x&&v)):m().createElement("span",null,x&&v)}var ev=(0,l.withDynamicSchemaProps)(function(e){var t,n,o=e.className,r=(e.targetComponent,e.iconColor,function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","targetComponent","iconColor"])),i=eg(),a=i.styles,c=i.cx,u=(0,s.useFieldSchema)(),p=(0,l.useComponent)(null==e?void 0:e.targetComponent)||l.Action;return m().createElement(l.ACLActionProvider,null,m().createElement(p,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}({className:c(o,a.action,"nb-action-panel")},r),n=n={onlyIcon:!1,type:"text",icon:null,title:m().createElement(ey,{onlyIcon:null==r?void 0:r.onlyIcon}),confirmTitle:u.title,style:{display:"flex",alignItems:"center",justifyContent:"center"}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)))}),ex={type:"void","x-decorator":"CardItem","x-decorator-props":{title:""},"x-settings":"blockSettings:workbench","x-schema-toolbar":"BlockSchemaToolbar","x-component":"WorkbenchBlock",properties:{actions:{"x-component":"WorkbenchBlock.ActionBar","x-initializer":"workbench:configureActions"}}},ew={type:"item",name:"workbenchBlock",icon:"AppstoreAddOutlined",useComponentProps:function(){var e=(0,f.useTranslation)("@nocobase/plugin-block-workbench").t,t=(0,l.useSchemaInitializer)().insert;return{title:e("Action panel"),onClick:function(){t(ex)}}}};function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var eO=new l.SchemaSettings({name:"workbench:actionSettings:link",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return ek({},(0,l.useSchemaToolbar)().linkageRulesProps)}},{name:"editLink",Component:l.SchemaSettingsActionLinkItem},(e=ek({},l.SchemaSettingAccessControl),t=t={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e),{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]}),eS=new l.SchemaInitializer({name:"workbench:configureActions",title:'{{t("Configure actions")}}',insertPosition:"beforeEnd",items:[{name:"link",title:'{{t("Link")}}',Component:function(e){var t=(0,l.useSchemaInitializerItem)(),n=(0,l.useSchemaInitializer)().insert,o=(0,f.useTranslation)().t;return m().createElement(l.ModalActionSchemaInitializerItem,{title:t.title,modalSchema:{title:o("Add link"),properties:{title:{title:o("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:o("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:o("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){n({type:"void",title:e.title,"x-action":"customize:link","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:link","x-component":"WorkbenchAction","x-use-component-props":"useLinkActionProps","x-component-props":{icon:e.icon,iconColor:e.iconColor}})}})}}]});function eP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var eC=new l.SchemaSettings({name:"workbench:actionSettings:popup",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eP({},(0,l.useSchemaToolbar)().linkageRulesProps)}},{name:"openMode",Component:l.SchemaSettingOpenModeSchemaItems,useComponentProps:function(){var e=(0,f.useTranslation)().t,t=(0,l.useOpenModeContext)().hideOpenMode;return{openSize:!t,modeOptions:t&&[{label:e("Drawer"),value:"drawer"},{label:e("Page"),value:"page"}]}}},(n=eP({},l.SchemaSettingAccessControl),o=o={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n),{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]});function ej(e){var t=(0,l.useSchemaInitializer)().insert,n=(0,f.useTranslation)().t,o=(0,l.useOpenModeContext)().isMobile;return m().createElement(l.ModalActionSchemaInitializerItem,{title:n("Popup"),modalSchema:{title:n("Add popup",{ns:"block-workbench"}),properties:{title:{title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:n("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:n("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){t({type:"void",title:e.title,"x-action":"customize:popup","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:popup","x-component":"WorkbenchAction","x-component-props":{icon:e.icon,iconColor:e.iconColor,refreshDataBlockRequest:!1},properties:{drawer:{type:"void",title:e.title,"x-component":"Action.Container","x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":o?"mobile:addBlock":"page:addBlock",properties:{}}}}}}}}}})}})}function eE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var eI=new l.SchemaSettings({name:"workbench:actionSettings:scanQrCode",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eE({},(0,l.useSchemaToolbar)().linkageRulesProps)}},(r=eE({},l.SchemaSettingAccessControl),i=i={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}),r),{name:"d1",type:"divider"},{type:"remove",name:"remove"}]});function ez(e){(0,l.useSchemaInitializerItem)();var t=(0,l.useSchemaInitializer)().insert,n=(0,f.useTranslation)().t;return m().createElement(l.ModalActionSchemaInitializerItem,{title:n("Scan QR code",{ns:"block-workbench"}),modalSchema:{title:n("Scan QR code",{ns:"block-workbench"}),properties:{title:{title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:n("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:n("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){t({type:"void",title:e.title,"x-component":"WorkbenchAction","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:scanQrCode","x-component-props":{icon:e.icon,iconColor:e.iconColor,openMode:"modal"},properties:{modal:{type:"void","x-component":"QRCodeScanner",title:n("Scan QR code",{ns:"block-workbench"})}}})}})}function eA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var eT=new l.SchemaSettings({name:"workbench:actionSettings:customRequest",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eA({},(0,l.useSchemaToolbar)().linkageRulesProps)}},{name:"editLink",Component:l.SchemaSettingsActionLinkItem},(a=eA({},l.SchemaSettingAccessControl),c=c={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(c)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(c,e))}),a),{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]});function eR(e){var t=(0,l.useSchemaInitializer)().insert,n=(0,f.useTranslation)().t;return m().createElement(l.ModalActionSchemaInitializerItem,{title:n("Custom request"),modalSchema:{title:n("Add custom request",{ns:"block-workbench"}),properties:{title:{title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:n("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:n("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){t({type:"void",title:e.title,"x-component":"WorkbenchAction","x-component-props":{icon:e.icon,iconColor:e.iconColor,targetComponent:"CustomRequestAction"},"x-action":"customize:form:request","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:customRequest","x-decorator":"CustomRequestAction.Decorator","x-action-settings":{onSuccess:{manualClose:!1,redirecting:!1,successMessage:'{{t("Request success")}}'}}})}})}var e$=g(581);function eM(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(o,r)}function eF(e,t,n){return(eF=eN()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&eq(r,n.prototype),r}).apply(null,arguments)}function eB(e){return(eB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eq(e,t){return(eq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eL(e){var t="function"==typeof Map?new Map:void 0;return(eL=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return eF(e,arguments,eB(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),eq(n,e)})(e)}function eN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eN=function(){return!!e})()}var eD=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=eB(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eN()?Reflect.construct(e,t||[],eB(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eq(n,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){var e;return function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,o=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){a.label=l[1];break}if(6===l[0]&&a.label<r[1]){a.label=r[1],r=l;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(l);break}r[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return e=(0,l.lazy)(function(){return e$("imported_1nibks6_component",Promise.all([g.e("918"),g.e("94")]).then(g.bind(g,446)))},"QRCodeScanner").QRCodeScanner,t.app.addComponents({WorkbenchBlock:ed,QRCodeScanner:e,WorkbenchAction:ev}),t.app.schemaSettingsManager.add(eo),t.app.schemaInitializerManager.add(eS),t.app.schemaInitializerManager.addItem("page:addBlock","otherBlocks.".concat(ew.name),ew),t.app.schemaInitializerManager.addItem("popup:common:addBlock","otherBlocks.".concat(ew.name),ew),t.app.schemaInitializerManager.addItem("mobilePage:addBlock","otherBlocks.".concat(ew.name),ew),t.app.schemaInitializerManager.addItem("mobile:addBlock","otherBlocks.".concat(ew.name),ew),t.app.schemaSettingsManager.add(eO),t.app.schemaSettingsManager.add(eI),t.app.schemaInitializerManager.addItem("workbench:configureActions","qrcode",{Component:ez}),t.app.schemaSettingsManager.add(eC),t.app.schemaInitializerManager.addItem("workbench:configureActions","popup",{Component:ej}),t.app.schemaSettingsManager.add(eT),t.app.schemaInitializerManager.addItem("workbench:configureActions","customRequest",{Component:eR}),[2]})},function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){eM(i,o,r,a,c,"next",e)}function c(e){eM(i,o,r,a,c,"throw",e)}a(void 0)})})()}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(n.prototype,t),n}(eL(l.Plugin)),e_=eD}(),y}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@emotion/css"),require("@nocobase/plugin-mobile/client"),require("@nocobase/client"),require("react-router-dom"),require("@formily/react"),require("@ant-design/icons"),require("antd-style"),require("antd"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-block-workbench",["react","@emotion/css","@nocobase/plugin-mobile/client","@nocobase/client","react-router-dom","@formily/react","@ant-design/icons","antd-style","antd","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-block-workbench"]=t(require("react"),require("@emotion/css"),require("@nocobase/plugin-mobile/client"),require("@nocobase/client"),require("react-router-dom"),require("@formily/react"),require("@ant-design/icons"),require("antd-style"),require("antd"),require("react-i18next")):e["@nocobase/plugin-block-workbench"]=t(e.react,e["@emotion/css"],e["@nocobase/plugin-mobile/client"],e["@nocobase/client"],e["react-router-dom"],e["@formily/react"],e["@ant-design/icons"],e["antd-style"],e.antd,e["react-i18next"])}(self,function(e,t,n,o,r,i,a,c,l,s){return function(){var u,p,d,m,f,b,g={916:function(e,t,n){"use strict";var o=n(589),r=n.n(o),i=n(758),a=n.n(i)()(r());a.push([e.id,".adm-grid {\n --gap: 0;\n --gap-horizontal: var(--gap);\n --gap-vertical: var(--gap);\n display: grid;\n grid-gap: 10px;\n -webkit-column-gap: var(--gap-horizontal);\n grid-column-gap: var(--gap-horizontal);\n -moz-column-gap: var(--gap-horizontal);\n column-gap: var(--gap-horizontal);\n grid-row-gap: var(--gap-vertical);\n row-gap: var(--gap-vertical);\n grid-template-columns: repeat(var(--columns), minmax(0, 1fr));\n align-items: stretch;\n}\n.adm-grid-item {\n grid-column-end: span var(--item-span);\n}\n",""]),t.Z=a},59:function(e,t,n){"use strict";var o=n(589),r=n.n(o),i=n(758),a=n.n(i)()(r());a.push([e.id,".adm-list {\n --header-font-size: var(--adm-font-size-7);\n --prefix-width: 'auto';\n --prefix-padding-right: 12px;\n --align-items: center;\n --active-background-color: var(--adm-color-border);\n --border-inner: solid 1px var(--adm-color-border);\n --border-top: solid 1px var(--adm-color-border);\n --border-bottom: solid 1px var(--adm-color-border);\n --padding-left: 12px;\n --padding-right: 12px;\n --font-size: var(--adm-font-size-9);\n --extra-max-width: 70%;\n}\n.adm-list-header {\n color: var(--adm-color-weak);\n font-size: var(--header-font-size);\n padding: 8px var(--padding-right) 8px var(--padding-left);\n}\n.adm-list-body {\n background-color: var(--adm-color-background);\n overflow: hidden;\n font-size: var(--font-size);\n}\n.adm-list-body-inner {\n margin-top: -1px;\n}\n.adm-list-default .adm-list-body {\n border-top: var(--border-top);\n border-bottom: var(--border-bottom);\n}\n.adm-list-card {\n margin: 12px;\n}\n.adm-list-card .adm-list-body {\n border-radius: 8px;\n}\n.adm-list-card .adm-list-header {\n padding-left: 0;\n}\n.adm-list-item {\n display: block;\n padding-left: var(--padding-left);\n position: relative;\n background-color: var(--adm-color-background);\n line-height: 1.5;\n}\n.adm-list-item-title,\n.adm-list-item-description {\n color: var(--adm-color-weak);\n font-size: var(--adm-font-size-main);\n}\n.adm-list-item-content {\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: flex;\n align-items: var(--align-items);\n justify-content: flex-start;\n border-top: var(--border-inner);\n padding-right: var(--padding-right);\n}\n.adm-list-item-content-prefix {\n width: var(--prefix-width);\n flex: none;\n padding-right: var(--prefix-padding-right);\n}\n.adm-list-item-content-main {\n flex: auto;\n padding: 12px 0;\n}\n.adm-list-item-content-extra {\n flex: none;\n padding-left: 12px;\n font-size: var(--adm-font-size-7);\n color: var(--adm-color-weak);\n max-width: var(--extra-max-width);\n}\n.adm-list-item-content-arrow {\n flex: none;\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: flex;\n align-items: center;\n margin-left: 4px;\n color: var(--adm-color-light);\n font-size: 19px;\n}\n.adm-list-item-disabled {\n cursor: not-allowed;\n}\n.adm-list-item-disabled.adm-list-item-disabled > .adm-list-item-content > * {\n opacity: 0.4;\n pointer-events: none;\n}\na.adm-list-item:active:not(.adm-list-item-disabled) {\n background-color: var(--active-background-color);\n}\na.adm-list-item:active:not(.adm-list-item-disabled)::after {\n content: ' ';\n display: block;\n position: absolute;\n width: 100%;\n bottom: -1px;\n left: 0;\n border-bottom: var(--border-inner);\n}\n",""]),t.Z=a},46:function(e,t,n){"use strict";var o=n(589),r=n.n(o),i=n(758),a=n.n(i)()(r());a.push([e.id,":root {\n --adm-radius-s: 4px;\n --adm-radius-m: 8px;\n --adm-radius-l: 12px;\n --adm-font-size-1: 9px;\n --adm-font-size-2: 10px;\n --adm-font-size-3: 11px;\n --adm-font-size-4: 12px;\n --adm-font-size-5: 13px;\n --adm-font-size-6: 14px;\n --adm-font-size-7: 15px;\n --adm-font-size-8: 16px;\n --adm-font-size-9: 17px;\n --adm-font-size-10: 18px;\n --adm-color-primary: #1677ff;\n --adm-color-success: #00b578;\n --adm-color-warning: #ff8f1f;\n --adm-color-danger: #ff3141;\n --adm-color-yellow: #ff9f18;\n --adm-color-orange: #ff6430;\n --adm-color-wathet: #e7f1ff;\n --adm-color-text: #333333;\n --adm-color-text-secondary: #666666;\n --adm-color-weak: #999999;\n --adm-color-light: #cccccc;\n --adm-color-border: #eeeeee;\n --adm-color-background: #ffffff;\n --adm-color-highlight: var(--adm-color-danger);\n --adm-color-white: #ffffff;\n --adm-color-box: #f5f5f5;\n --adm-color-text-light-solid: var(--adm-color-white);\n --adm-color-text-dark-solid: #000000;\n --adm-color-fill-content: var(--adm-color-box);\n --adm-font-size-main: var(--adm-font-size-5);\n --adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',\n helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',\n 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;\n --adm-border-color: var(--adm-color-border);\n}\nhtml[data-prefers-color-scheme='dark'] {\n --adm-color-primary: #3086ff;\n --adm-color-success: #34b368;\n --adm-color-warning: #ffa930;\n --adm-color-danger: #ff4a58;\n --adm-color-yellow: #ffa930;\n --adm-color-orange: #e65a2b;\n --adm-color-wathet: #0d2543;\n --adm-color-text: #e6e6e6;\n --adm-color-text-secondary: #b3b3b3;\n --adm-color-weak: #808080;\n --adm-color-light: #4d4d4d;\n --adm-color-border: #2b2b2b;\n --adm-color-box: #0a0a0a;\n --adm-color-background: #1a1a1a;\n --adm-color-background-body: var(--adm-color-background);\n --adm-border-color: var(--adm-color-border);\n}\n:root {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nhtml {\n background-color: var(--adm-color-background-body);\n}\nbody {\n color: #333333;\n color: var(--adm-color-text);\n font-size: 13px;\n font-size: var(--adm-font-size-main);\n font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',\n helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',\n 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;\n font-family: var(--adm-font-family);\n}\na,\nbutton {\n cursor: pointer;\n}\na {\n color: #1677ff;\n color: var(--adm-color-primary);\n transition: opacity ease-in-out 0.2s;\n}\na:active {\n opacity: 0.8;\n}\n.adm-plain-anchor {\n color: inherit;\n transition: none;\n}\n.adm-plain-anchor:active {\n opacity: 1;\n opacity: initial;\n}\nbody.adm-overflow-hidden {\n overflow: hidden !important;\n}\ndiv.adm-px-tester {\n --size: 1;\n height: -webkit-calc(var(--size) / 2 * 2px);\n height: -moz-calc(var(--size) / 2 * 2px);\n height: calc(var(--size) / 2 * 2px);\n width: 0;\n position: fixed;\n left: -100vw;\n top: -100vh;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n",""]),t.Z=a},758:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(a[l]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);o&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]&&(u[1]="@media ".concat(u[2]," {").concat(u[1],"}")),u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},589:function(e){"use strict";e.exports=function(e){return e[1]}},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},278:function(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},i=[],a=0;a<e.length;a++){var c=e[a],l=o.base?c[0]+o.base:c[0],s=r[l]||0,u="".concat(l," ").concat(s);r[l]=s+1;var p=n(u),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var m=function(e,t){var n=t.domAPI(t);return n.update(e),function(t){t?(t.css!==e.css||t.media!==e.media||t.sourceMap!==e.sourceMap||t.supports!==e.supports||t.layer!==e.layer)&&n.update(e=t):n.remove()}}(d,o);o.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}i.push(u)}return i}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var c=n(i[a]);t[c].references--}for(var l=o(e,r),s=0;s<i.length;s++){var u=n(i[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},547:function(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},593:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},604:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},391:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){var o,r,i;o="",n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {")),(r=void 0!==n.layer)&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}"),(i=n.sourceMap)&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(o,t,e.options)},remove:function(){!function(e){if(null!==e.parentNode)e.parentNode.removeChild(e)}(t)}}}},784:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},482:function(e){"use strict";e.exports=a},964:function(e){"use strict";e.exports=t},505:function(e){"use strict";e.exports=i},772:function(e){"use strict";e.exports=o},58:function(e){"use strict";e.exports=n},721:function(e){"use strict";e.exports=l},202:function(e){"use strict";e.exports=c},156:function(t){"use strict";t.exports=e},238:function(e){"use strict";e.exports=s},128:function(e){"use strict";e.exports=r},527:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=i(t,n));return t}(n)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=(function(){return r}).apply(t,[]))||(e.exports=n)}()}},h={};function y(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={id:e,exports:{}};return g[e].call(n.exports,n,n.exports,y),n.exports}y.m=g,y.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return y.d(t,{a:t}),t},y.d=function(e,t){for(var n in t)y.o(t,n)&&!y.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},y.f={},y.e=function(e){return Promise.all(Object.keys(y.f).reduce(function(t,n){return y.f[n](e,t),t},[]))},y.u=function(e){return""+({397:"403f3c00a8759a8e",918:"d180e3dfa95b10ab"})[e]+".js"},y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),y.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u={},p="@nocobase/plugin-block-workbench:",y.l=function(e,t,n,o){if(u[e])return void u[e].push(t);if(void 0!==n)for(var r,i,a=document.getElementsByTagName("script"),c=0;c<a.length;c++){var l=a[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==p+n){r=l;break}}r||(i=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,y.nc&&r.setAttribute("nonce",y.nc),r.setAttribute("data-webpack",p+n),r.src=e),u[e]=[t];var s=function(t,n){r.onerror=r.onload=null,clearTimeout(d);var o=u[e];if(delete u[e],r.parentNode&&r.parentNode.removeChild(r),o&&o.forEach(function(e){return e(n)}),t)return t(n)},d=setTimeout(s.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=s.bind(null,r.onerror),r.onload=s.bind(null,r.onload),i&&document.head.appendChild(r)},y.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},y.nc=void 0,(d=window.__nocobase_public_path__||"/").endsWith("/")||(d+="/"),y.p=d+"static/plugins/@nocobase/plugin-block-workbench/dist/client/",m={909:0},y.f.j=function(e,t){var n=y.o(m,e)?m[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise(function(t,o){n=m[e]=[t,o]});t.push(n[2]=o);var r=y.p+y.u(e),i=Error();y.l(r,function(t){if(y.o(m,e)&&(0!==(n=m[e])&&(m[e]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",i.name="ChunkLoadError",i.type=o,i.request=r,n[1](i)}},"chunk-"+e,e)}},f=function(e,t){var n,o,r=t[0],i=t[1],a=t[2],c=0;if(r.some(function(e){return 0!==m[e]})){for(n in i)y.o(i,n)&&(y.m[n]=i[n]);a&&a(y)}for(e&&e(t);c<r.length;c++)o=r[c],y.o(m,o)&&m[o]&&m[o][0](),m[o]=0},(b=self.webpackChunk_nocobase_plugin_block_workbench=self.webpackChunk_nocobase_plugin_block_workbench||[]).forEach(f.bind(null,0)),b.push=f.bind(null,b.push.bind(b));var v={};return!function(){"use strict";y.r(v),y.d(v,{PluginBlockWorkbenchClient:function(){return eZ},default:function(){return eH}});var e,t,n,o,r,i,a,c,l=y(772),s=y(505),u=y(964),p=y(721),d=y(278),m=y.n(d),f=y(391),b=y.n(f),g=y(547),h=y.n(g),x=y(604),w=y.n(x),k=y(593),O=y.n(k),S=y(784),P=y.n(S),C=y(46),j={};j.styleTagTransform=P(),j.setAttributes=w(),j.insert=h().bind(null,"head"),j.domAPI=b(),j.insertStyleElement=O(),m()(C.Z,j),C.Z&&C.Z.locals&&C.Z.locals,"undefined"!=typeof window&&"undefined"!=typeof document&&window.document&&window.document.createElement&&document.addEventListener("touchstart",()=>{},!0);var I=y(916),E={};function z(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function A(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t}E.styleTagTransform=P(),E.setAttributes=w(),E.insert=h().bind(null,"head"),E.domAPI=b(),E.insertStyleElement=O(),m()(I.Z,E),I.Z&&I.Z.locals&&I.Z.locals;var T=y(156),R=y.n(T),$=y(527),M=y.n($);function F(e,t){let n=Object.assign({},t.props);for(let o in e.className&&(n.className=M()(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),void 0!==e.tabIndex&&(n.tabIndex=e.tabIndex),e)e.hasOwnProperty(o)&&(o.startsWith("data-")||o.startsWith("aria-"))&&(n[o]=e[o]);return R().cloneElement(t,n)}function B(e){return"number"==typeof e?`${e}px`:e}let q="adm-grid";var L=z(e=>{let t={"--columns":e.columns.toString()},{gap:n}=e;return void 0!==n&&(Array.isArray(n)?(t["--gap-horizontal"]=B(n[0]),t["--gap-vertical"]=B(n[1])):t["--gap"]=B(n)),F(e,R().createElement("div",{className:q,style:t},e.children))},{Item:e=>{let t=A({span:1},e),n={"--item-span":t.span};return F(t,R().createElement("div",{className:`${q}-item`,style:n,onClick:t.onClick},t.children))}}),N=y(59),D={};D.styleTagTransform=P(),D.setAttributes=w(),D.insert=h().bind(null,"head"),D.domAPI=b(),D.insertStyleElement=O(),m()(N.Z,D),N.Z&&N.Z.locals&&N.Z.locals;let _="adm-list",G={mode:"default"},W=(0,T.forwardRef)((e,t)=>{let n=A(G,e),o=(0,T.useRef)(null);return(0,T.useImperativeHandle)(t,()=>({get nativeElement(){return o.current}})),F(n,R().createElement("div",{className:M()(_,`${_}-${n.mode}`),ref:o},n.header&&R().createElement("div",{className:`${_}-header`},n.header),R().createElement("div",{className:`${_}-body`},R().createElement("div",{className:`${_}-body-inner`},n.children))))});var Z=function(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"RightOutline-RightOutlined"},T.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))};function H(e){return null!=e&&!1!==e}let Q="${label}不是一个有效的${type}",V={locale:{locale:"zh-CH",common:{confirm:"确定",cancel:"取消",loading:"加载中",close:"关闭"},Calendar:{title:"日期选择",confirm:"确认",start:"开始",end:"结束",today:"今日",markItems:["一","二","三","四","五","六","日"],yearAndMonth:"${year}年${month}月"},Cascader:{placeholder:"请选择"},Dialog:{ok:"我知道了"},DatePicker:{tillNow:"至今"},ErrorBlock:{default:{title:"页面遇到一些小问题",description:"待会来试试"},busy:{title:"前方拥堵",description:"刷新试试"},disconnected:{title:"网络有点忙",description:"动动手指帮忙修复"},empty:{title:"没有找到你需要的东西",description:"找找其他的吧"}},Form:{required:"必填",optional:"选填",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:Q,method:Q,array:Q,object:Q,number:Q,date:Q,boolean:Q,integer:Q,float:Q,regexp:Q,email:Q,url:Q,hex:Q},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},ImageUploader:{uploading:"上传中...",upload:"上传"},InfiniteScroll:{noMore:"没有更多了",failedToLoad:"加载失败",retry:"重新加载"},Input:{clear:"清除"},Mask:{name:"背景蒙层"},Modal:{ok:"我知道了"},PasscodeInput:{name:"密码输入框"},PullToRefresh:{pulling:"下拉刷新",canRelease:"释放立即刷新",complete:"刷新成功"},SearchBar:{name:"搜索框"},Slider:{name:"滑动输入条"},Stepper:{decrease:"减少",increase:"增加"},Switch:{name:"开关"},Selector:{name:"选择组"}}},U=R().createContext(null),Y="adm-list-item";var J=z(W,{Item:e=>{var t,n,o;let{arrow:r,arrowIcon:i}=e,{list:a={}}=null!=(o=(0,T.useContext)(U))?o:V,c=null!=(t=e.clickable)?t:!!e.onClick,l=null!=(n=null!=r?r:i)?n:c,s=function(e,...t){for(let e=t.length-1;e>=0;e-=1)if(void 0!==t[e])return t[e];return e}(a.arrowIcon,!0!==r?r:null,!0!==i?i:null),u=R().createElement("div",{className:`${Y}-content`},H(e.prefix)&&R().createElement("div",{className:`${Y}-content-prefix`},e.prefix),R().createElement("div",{className:`${Y}-content-main`},H(e.title)&&R().createElement("div",{className:`${Y}-title`},e.title),e.children,H(e.description)&&R().createElement("div",{className:`${Y}-description`},e.description)),H(e.extra)&&R().createElement("div",{className:`${Y}-content-extra`},e.extra),l&&R().createElement("div",{className:`${Y}-content-arrow`},s||R().createElement(Z,null)));return F(e,R().createElement(c?"a":"div",{className:M()(`${Y}`,c?["adm-plain-anchor"]:[],e.disabled&&`${Y}-disabled`),onClick:e.disabled?void 0:e.onClick},u))}}),X=y(202),K=y(238);function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(o,r)}function en(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eo={Grid:"grid",List:"list"},er=new l.SchemaSettings({name:"blockSettings:workbench",items:[{name:"title",Component:function(){var e,t,n=(0,s.useField)(),o=(0,s.useFieldSchema)(),r=(0,l.useDesignable)().dn,i=(0,K.useTranslation)().t;return R().createElement(l.SchemaSettingsModalItem,{title:i("Edit block title & description"),schema:{type:"object",title:i("Edit block title & description"),properties:{title:{title:i("Block title"),type:"string",default:null==o||null==(e=o["x-decorator-props"])?void 0:e.title,"x-decorator":"FormItem","x-component":"Input"},description:{title:i("Description"),type:"string",default:null==o||null==(t=o["x-decorator-props"])?void 0:t.description,"x-decorator":"FormItem","x-component":"Markdown"}}},onSubmit:function(e){var t,i=e.title,a=e.description,c=o["x-decorator-props"]||{};c.title=i,c.description=a,o["x-decorator-props"]=c,n.decoratorProps.title=i,n.decoratorProps.description=a,r.emit("patch",{schema:(ee(t={},"x-uid",o["x-uid"]),ee(t,"x-decorator-props",o["x-decorator-props"]),t)}),r.refresh()}})}},{name:"setTheBlockHeight",Component:l.SchemaSettingsBlockHeightItem},{name:"blockLinkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return{title:(0,(0,K.useTranslation)().t)("Block Linkage rules"),category:l.LinkageRuleCategory.block}}},{name:"layout",Component:function(){var e,t=(0,K.useTranslation)().t,n=(0,s.useFieldSchema)(),o=(0,s.useField)(),r=(0,l.useDesignable)().dn;return R().createElement(l.SchemaSettingsSelectItem,{title:t("Layout",{ns:"block-workbench"}),options:[{label:t("Grid",{ns:"block-workbench"}),value:eo.Grid},{label:t("List",{ns:"block-workbench"}),value:eo.List}],value:(null==n||null==(e=n["x-component-props"])?void 0:e.layout)||eo.Grid,onChange:function(e){o.componentProps.layout=e;var t={"x-uid":n["x-uid"]};n["x-component-props"]=n["x-component-props"]||{},t["x-component-props"]=n["x-component-props"]||{},t["x-component-props"].layout=e,n["x-component-props"].layout=e,r.emit("patch",{schema:t}),r.refresh()}})}},{name:"itemsPerRow",Component:function(){var e,t=(0,s.useField)(),n=(0,s.useFieldSchema)(),o=(0,l.useDesignable)().dn,r=(0,K.useTranslation)().t;return R().createElement(l.SchemaSettingsModalItem,{title:r("Items per row",{ns:"block-workbench"}),schema:{type:"object",properties:{itemsPerRow:{type:"number",default:(null==n||null==(e=n["x-decorator-props"])?void 0:e.itemsPerRow)||4,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:6},description:r("At least 1, up to 6",{ns:"block-workbench"}),required:!0}}},onSubmit:function(e){var r,i=e.itemsPerRow,a=n["x-decorator-props"]||{};a.itemsPerRow=i,n["x-decorator-props"]=a,t.decoratorProps.ItemsPerRow=i,o.emit("patch",{schema:(en(r={},"x-uid",n["x-uid"]),en(r,"x-decorator-props",n["x-decorator-props"]),r)}),o.refresh()}})},useVisible:function(){var e,t=((0,l.useOpenModeContext)()||{}).isMobile,n=(0,s.useFieldSchema)();return t&&(null==n||null==(e=n["x-component-props"])?void 0:e.layout)!==eo.List}},{name:"ellipsis",type:"switch",useComponentProps:function(){var e,t,n,o=(0,s.useFieldSchema)(),r=(0,l.useDesignable)().dn;return{title:(0,(0,K.useTranslation)().t)("Ellipsis action title",{ns:"block-workbench"}),checked:(null==(n=o["x-component-props"])?void 0:n.ellipsis)!==!1,onChange:(e=function(e){return function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,o=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){a.label=l[1];break}if(6===l[0]&&a.label<r[1]){a.label=r[1],r=l;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(l);break}r[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:var n,i;return o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].ellipsis=e,[4,r.emit("patch",{schema:{"x-uid":o["x-uid"],"x-component-props":(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){en(e,t,n[t])})}return e}({},o["x-component-props"]),i=i={ellipsis:e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n)}})];case 1:return t.sent(),[2]}})},t=function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){et(i,o,r,a,c,"next",e)}function c(e){et(i,o,r,a,c,"throw",e)}a(void 0)})},function(e){return t.apply(this,arguments)})}}},{type:"remove",name:"remove"}]});function ei(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ea(){var e=ei(["\n &.list {\n margin: -","px;\n border-radius: ","px;\n overflow: hidden;\n\n .adm-list {\n --padding-left: ","px;\n --padding-right: ","px;\n\n .adm-list-item-content-main {\n display: flex;\n\n button {\n background-color: transparent;\n border: none;\n height: auto;\n box-shadow: none;\n padding: 16px 32px;\n margin: -12px -32px;\n width: calc(100% + 64px);\n text-align: start;\n justify-content: start !important;\n color: ",";\n }\n }\n }\n\n button[aria-label*='schema-initializer-WorkbenchBlock.ActionBar-workbench:configureActions'] {\n margin-bottom: ","px;\n margin-left: ","px;\n }\n .adm-list-body-inner {\n margin-top: 6px;\n margin-bottom: 3px;\n }\n }\n "]);return ea=function(){return e},e}function ec(){var e=ei(["\n height: ",";\n\n .nb-action-panel-warp {\n height: ",";\n overflow-y: auto;\n }\n "]);return ec=function(){return e},e}var el=(0,s.observer)(function(){var e=(0,s.useFieldSchema)();return(0,(0,l.useSchemaInitializerRender)(e["x-initializer"]).render)()},{displayName:"WorkbenchConfigureActionsButton"}),es=function(){var e=(0,s.useFieldSchema)(),t=window.matchMedia("(max-width: 768px)").matches,n=((0,l.useOpenModeContext)()||{}).isMobile,o=(e.parent["x-decorator-props"]||{}).itemsPerRow;return n||t?R().createElement(L,{columns:void 0===o?4:o,gap:8},e.mapProperties(function(e,t){return R().createElement(l.NocoBaseRecursionField,{name:t,schema:e,key:t})})):R().createElement(p.Space,{wrap:!0,size:8,align:"start"},e.mapProperties(function(e,t){return R().createElement(l.NocoBaseRecursionField,{name:t,schema:e,key:t})}))},eu=function(){var e=(0,s.useFieldSchema)(),t=(e.parent["x-component-props"]||{}).layout,n=void 0===t?eo.Grid:t,o=(0,l.useToken)().token;return R().createElement("div",{className:"nb-action-panel-warp"},R().createElement(l.DndContext,null,n===eo.Grid?R().createElement(es,null):R().createElement(J,{style:{"--adm-color-background":o.colorBgContainer,"--active-background-color":o.colorBorderSecondary,"--border-inner":"solid 1px ".concat(o.colorBorderSecondary),"--border-bottom":"none","--border-top":"none"}},e.mapProperties(function(e,t){return R().createElement(l.NocoBaseRecursionField,{name:t,schema:e})}))))},ep=(0,T.createContext)({layout:"grid",ellipsis:!0}),ed=(0,l.createStyles)(function(e){var t=e.token;return{containerClass:(0,e.css)(ea(),t.paddingLG,t.borderRadiusBlock,t.paddingLG,t.paddingLG,t.colorText,t.paddingLG,t.paddingLG)}}),em=(0,l.withDynamicSchemaProps)(function(e){var t=(0,s.useFieldSchema)(),n=t["x-component-props"]||{},o=n.layout,r=void 0===o?"grid":o,i=n.ellipsis,a=ed().styles,c=(t["x-decorator-props"]||{}).title,u=(0,l.useBlockHeight)(),d=p.theme.useToken().token,m=(0,l.useDesignable)().designable,f=c?d.fontSizeLG*d.lineHeightLG+2*d.padding:0,b=u-2*d.paddingLG-f,g="calc(".concat(b,"px - 1rem - ").concat(d.controlHeight,"px)");"list"===r&&(b=u-f,g="calc(".concat(b,"px - 1rem - ").concat(d.controlHeight+d.paddingLG,"px)"));var h=(0,l.css)(ec(),u?b+"px":"100%",m?g:"100%");return R().createElement("div",{className:"nb-action-penal-container ".concat(r," ").concat(a.containerClass," ").concat(h)},R().createElement(ep.Provider,{value:{layout:r,ellipsis:i}},R().createElement(l.DataSourceContext.Provider,{value:void 0},R().createElement(l.CollectionContext.Provider,{value:void 0},e.children))))},{displayName:"WorkbenchBlock"});function ef(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function eb(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function eg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eh(){var e=eg(["\n display: flex;\n background-color: transparent;\n border: 0;\n height: auto;\n box-shadow: none;\n padding-top: 8px;\n "]);return eh=function(){return e},e}function ey(){var e=eg(["\n width: 5em;\n "]);return ey=function(){return e},e}function ev(){var e=eg(["\n margin-top: ","px;\n width: 100%;\n "]);return ev=function(){return e},e}function ex(){var e=eg(["\n > span {\n width: 100%;\n }\n padding-top: 0px !important;\n "]);return ex=function(){return e},e}em.ActionBar=function(){return R().createElement(R().Fragment,null,R().createElement(eu,null),R().createElement(el,null))};var ew=(0,X.createStyles)(function(e){var t=e.token,n=e.css;return{action:n(eh()),avatar:n(ey()),title:n(ev(),t.marginSM)}});function ek(e){var t=e.onlyIcon,n=(0,s.useFieldSchema)(),o=n["x-component-props"]||{},r=o.icon,i=o.iconColor,a=(0,T.useContext)(ep),c=a.layout,u=a.ellipsis,d=void 0===u||u,m=ew(),f=m.styles,b=m.cx,g=(0,(0,K.useTranslation)().t)(n.title,{ns:l.NAMESPACE_UI_SCHEMA}),h=!t;return c===eo.Grid?R().createElement("div",{title:g,className:b(f.avatar)},R().createElement(p.Avatar,{style:{backgroundColor:i},size:48,icon:R().createElement(l.Icon,{type:r})}),R().createElement("div",{className:b(f.title),style:{whiteSpace:d?"nowrap":"normal",textOverflow:d?"ellipsis":"clip",overflow:d?"hidden":"visible"}},h&&g)):R().createElement("span",null,h&&g)}var eO=(0,l.withDynamicSchemaProps)(function(e){var t=e.className,n=(e.targetComponent,e.iconColor,function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["className","targetComponent","iconColor"])),o=ew(),r=o.styles,i=o.cx,a=(0,s.useFieldSchema)(),c=(0,l.useComponent)(null==e?void 0:e.targetComponent)||l.Action,d=((null==(f=a.parent)||null==(m=f.parent)?void 0:m["x-component-props"])||{}).layout;if("list"!==(void 0===d?eo.Grid:d))return R().createElement(l.ACLActionProvider,null,R().createElement(c,eb(ef({className:i(t,r.action,"nb-action-panel")},n),{onlyIcon:!1,type:"text",icon:null,title:R().createElement(ek,{onlyIcon:null==n?void 0:n.onlyIcon}),confirmTitle:a.title,style:{display:"flex",alignItems:"center",justifyContent:"center"}})));var m,f,b,g,h=null==(b=a["x-component-props"])?void 0:b.icon,y=null==(g=a["x-component-props"])?void 0:g.iconColor;return R().createElement(l.ACLActionProvider,null,R().createElement(c,eb(ef({className:i(t,r.action,"nb-action-panel",(0,u.css)(ex()))},n),{onlyIcon:!1,type:"text",icon:null,title:R().createElement(J.Item,{prefix:R().createElement(p.Avatar,{style:{backgroundColor:y},icon:R().createElement(l.Icon,{type:h})}),onClick:function(){},style:{marginTop:"5px"}},R().createElement(ek,{onlyIcon:null==n?void 0:n.onlyIcon})),confirmTitle:a.title,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",backgroundColor:"rgb(255, 255, 255)"}})))}),eS={type:"void","x-decorator":"CardItem","x-decorator-props":{title:""},"x-settings":"blockSettings:workbench","x-schema-toolbar":"BlockSchemaToolbar","x-component":"WorkbenchBlock",properties:{actions:{"x-component":"WorkbenchBlock.ActionBar","x-initializer":"workbench:configureActions"}}},eP={type:"item",name:"workbenchBlock",icon:"AppstoreAddOutlined",useComponentProps:function(){var e=(0,K.useTranslation)("@nocobase/plugin-block-workbench").t,t=(0,l.useSchemaInitializer)().insert;return{title:e("Action panel"),onClick:function(){t(eS)}}}};function eC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var ej=new l.SchemaSettings({name:"workbench:actionSettings:link",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eC({},(0,l.useSchemaToolbar)().linkageRulesProps)}},{name:"editLink",Component:l.SchemaSettingsActionLinkItem},(e=eC({},l.SchemaSettingAccessControl),t=t={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e),{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]}),eI=new l.SchemaInitializer({name:"workbench:configureActions",title:'{{t("Configure actions")}}',insertPosition:"beforeEnd",items:[{name:"link",title:'{{t("Link")}}',Component:function(e){var t=(0,l.useSchemaInitializerItem)(),n=(0,l.useSchemaInitializer)().insert,o=(0,K.useTranslation)().t;return R().createElement(l.ModalActionSchemaInitializerItem,{title:t.title,modalSchema:{title:o("Add link"),properties:{title:{title:o("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:o("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:o("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){n({type:"void",title:e.title,"x-action":"customize:link","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:link","x-component":"WorkbenchAction","x-use-component-props":"useLinkActionProps","x-component-props":{icon:e.icon,iconColor:e.iconColor}})}})}}]});function eE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var ez=new l.SchemaSettings({name:"workbench:actionSettings:popup",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eE({},(0,l.useSchemaToolbar)().linkageRulesProps)}},{name:"openMode",Component:l.SchemaSettingOpenModeSchemaItems,useComponentProps:function(){var e=(0,K.useTranslation)().t,t=(0,l.useOpenModeContext)().hideOpenMode;return{openSize:!t,modeOptions:t&&[{label:e("Drawer"),value:"drawer"},{label:e("Page"),value:"page"}]}}},(n=eE({},l.SchemaSettingAccessControl),o=o={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n),{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]});function eA(e){var t=(0,l.useSchemaInitializer)().insert,n=(0,K.useTranslation)().t,o=(0,l.useOpenModeContext)().isMobile;return R().createElement(l.ModalActionSchemaInitializerItem,{title:n("Popup"),modalSchema:{title:n("Add popup",{ns:"block-workbench"}),properties:{title:{title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:n("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:n("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){t({type:"void",title:e.title,"x-action":"customize:popup","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:popup","x-component":"WorkbenchAction","x-component-props":{icon:e.icon,iconColor:e.iconColor,refreshDataBlockRequest:!1},properties:{drawer:{type:"void",title:e.title,"x-component":"Action.Container","x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":o?"mobile:addBlock":"page:addBlock",properties:{}}}}}}}}}})}})}function eT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var eR=new l.SchemaSettings({name:"workbench:actionSettings:scanQrCode",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eT({},(0,l.useSchemaToolbar)().linkageRulesProps)}},(r=eT({},l.SchemaSettingAccessControl),i=i={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}),r),{name:"d1",type:"divider"},{type:"remove",name:"remove"}]});function e$(e){(0,l.useSchemaInitializerItem)();var t=(0,l.useSchemaInitializer)().insert,n=(0,K.useTranslation)().t;return R().createElement(l.ModalActionSchemaInitializerItem,{title:n("Scan QR code",{ns:"block-workbench"}),modalSchema:{title:n("Scan QR code",{ns:"block-workbench"}),properties:{title:{title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:n("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:n("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){t({type:"void",title:e.title,"x-component":"WorkbenchAction","x-toolbar":"ActionSchemaToolbar","x-settings":"workbench:actionSettings:scanQrCode","x-component-props":{icon:e.icon,iconColor:e.iconColor,openMode:"modal"},properties:{modal:{type:"void","x-component":"QRCodeScanner",title:n("Scan QR code",{ns:"block-workbench"})}}})}})}function eM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var eF=new l.SchemaSettings({name:"workbench:actionSettings:customRequest",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps:function(){return{hasIconColor:!0}}},{name:"linkageRules",Component:l.SchemaSettingsLinkageRules,useComponentProps:function(){return eM({},(0,l.useSchemaToolbar)().linkageRulesProps)}},{name:"editLink",Component:l.SchemaSettingsActionLinkItem},(a=eM({},l.SchemaSettingAccessControl),c=c={useVisible:function(){return!0}},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(c)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(c,e))}),a),{sort:800,name:"d1",type:"divider"},{sort:900,type:"remove",name:"remove"}]});function eB(e){var t=(0,l.useSchemaInitializer)().insert,n=(0,K.useTranslation)().t;return R().createElement(l.ModalActionSchemaInitializerItem,{title:n("Custom request"),modalSchema:{title:n("Add custom request",{ns:"block-workbench"}),properties:{title:{title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:n("Icon"),required:!0,"x-component":"IconPicker","x-decorator":"FormItem"},iconColor:{title:n("Color"),required:!0,default:"#1677FF","x-component":"ColorPicker","x-decorator":"FormItem"}}},onSubmit:function(e){t({type:"void",title:e.title,"x-component":"WorkbenchAction","x-component-props":{icon:e.icon,iconColor:e.iconColor,targetComponent:"CustomRequestAction"},"x-action":"customize:form:request","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:customRequest","x-decorator":"CustomRequestAction.Decorator","x-action-settings":{onSuccess:{manualClose:!1,redirecting:!1,successMessage:'{{t("Request success")}}'}}})}})}var eq=y(581);function eL(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(o,r)}function eN(e,t,n){return(eN=eW()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&e_(r,n.prototype),r}).apply(null,arguments)}function eD(e){return(eD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e_(e,t){return(e_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eG(e){var t="function"==typeof Map?new Map:void 0;return(eG=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return eN(e,arguments,eD(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e_(n,e)})(e)}function eW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eW=function(){return!!e})()}var eZ=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=eD(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eW()?Reflect.construct(e,t||[],eD(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&e_(n,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){var e;return function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var l=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,o=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){a.label=l[1];break}if(6===l[0]&&a.label<r[1]){a.label=r[1],r=l;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(l);break}r[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return e=(0,l.lazy)(function(){return eq("imported_1nibks6_component",Promise.all([y.e("918"),y.e("397")]).then(y.bind(y,626)))},"QRCodeScanner").QRCodeScanner,t.app.addComponents({WorkbenchBlock:em,QRCodeScanner:e,WorkbenchAction:eO}),t.app.schemaSettingsManager.add(er),t.app.schemaInitializerManager.add(eI),t.app.schemaInitializerManager.addItem("page:addBlock","otherBlocks.".concat(eP.name),eP),t.app.schemaInitializerManager.addItem("popup:common:addBlock","otherBlocks.".concat(eP.name),eP),t.app.schemaInitializerManager.addItem("mobilePage:addBlock","otherBlocks.".concat(eP.name),eP),t.app.schemaInitializerManager.addItem("mobile:addBlock","otherBlocks.".concat(eP.name),eP),t.app.schemaSettingsManager.add(ej),t.app.schemaSettingsManager.add(eR),t.app.schemaInitializerManager.addItem("workbench:configureActions","qrcode",{Component:e$}),t.app.schemaSettingsManager.add(ez),t.app.schemaInitializerManager.addItem("workbench:configureActions","popup",{Component:eA}),t.app.schemaSettingsManager.add(eF),t.app.schemaInitializerManager.addItem("workbench:configureActions","customRequest",{Component:eB}),[2]})},function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){eL(i,o,r,a,c,"next",e)}function c(e){eL(i,o,r,a,c,"throw",e)}a(void 0)})})()}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(n.prototype,t),n}(eG(l.Plugin)),eH=eZ}(),v}()});
@@ -8,14 +8,15 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@formily/react": "2.3.0",
11
+ "@formily/react": "2.3.7",
12
12
  "react": "18.2.0",
13
13
  "react-i18next": "11.18.6",
14
- "@nocobase/client": "1.9.0-beta.9",
14
+ "@nocobase/client": "2.0.0-alpha.11",
15
+ "@emotion/css": "11.13.0",
15
16
  "antd": "5.24.2",
16
17
  "antd-style": "3.7.1",
17
- "@nocobase/server": "1.9.0-beta.9",
18
+ "@nocobase/server": "2.0.0-alpha.11",
18
19
  "@ant-design/icons": "5.6.1",
19
- "@nocobase/plugin-mobile": "1.9.0-beta.9",
20
- "react-router-dom": "6.28.1"
20
+ "@nocobase/plugin-mobile": "2.0.0-alpha.11",
21
+ "react-router-dom": "6.30.1"
21
22
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-block-workbench",
3
- "version": "1.9.0-beta.9",
3
+ "version": "2.0.0-alpha.11",
4
4
  "displayName": "Block: Action panel",
5
5
  "displayName.zh-CN": "区块:操作面板",
6
6
  "description": "Centrally manages and displays various actions, allowing users to efficiently perform tasks. It supports extensibility, with current action types including pop-ups, links, scanning, and custom requests.",
7
7
  "description.zh-CN": "集中管理和展示各种操作,方便用户快速执行任务。支持扩展,目前支持的操作类型有弹窗、链接、扫描、自定义请求。",
8
8
  "main": "dist/server/index.js",
9
9
  "peerDependencies": {
10
- "@nocobase/client": "1.x",
11
- "@nocobase/plugin-mobile": "1.x",
12
- "@nocobase/server": "1.x",
13
- "@nocobase/test": "1.x"
10
+ "@nocobase/client": "2.x",
11
+ "@nocobase/plugin-mobile": "2.x",
12
+ "@nocobase/server": "2.x",
13
+ "@nocobase/test": "2.x"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@ant-design/icons": "^5.x",
@@ -21,5 +21,5 @@
21
21
  "keywords": [
22
22
  "Blocks"
23
23
  ],
24
- "gitHead": "b44464f1d1bbc96022d0f622e0a2f1d7e8d7142f"
24
+ "gitHead": "172b05411f66f7024d5294caf2852533569c3796"
25
25
  }
@@ -1,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_block_workbench=self.webpackChunk_nocobase_plugin_block_workbench||[]).push([["94"],{446:function(e,t,n){n.r(t),n.d(t,{QRCodeScannerInner:function(){return S},QRCodeScanner:function(){return k}});var r=n(482),o=n(772),i=n(738),l=n(156),a=n.n(l),c=n(238);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function s(e){var t=e.style,n={position:"absolute",backgroundColor:"rgb(255, 255, 255)"};return a().createElement("div",{id:"qr-scan-box",style:u({boxSizing:"border-box",inset:"0px"},void 0===t?{}:t)},a().createElement("div",{style:u({width:"40px",height:"5px",top:"-5px",left:"0px"},n)}),a().createElement("div",{style:u({width:"40px",height:"5px",top:"-5px",right:"0px"},n)}),a().createElement("div",{style:u({width:"40px",height:"5px",bottom:"-5px",left:"0px"},n)}),a().createElement("div",{style:u({width:"40px",height:"5px",bottom:"-5px",right:"0px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",top:"-5px",left:"-5px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",bottom:"-5px",left:"-5px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",top:"-5px",right:"-5px"},n)}),a().createElement("div",{style:u({width:"5px",height:"45px",bottom:"-5px",right:"-5px"},n)}))}var f=n(58),h=n.n(f),p=n(128);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(e){m(i,r,o,l,a,"next",e)}function a(e){m(i,r,o,l,a,"throw",e)}l(void 0)})}}function y(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){var c=[i,a];if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function v(e,t){return e.startsWith(t)?e.slice(t.length):e}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E="qrcode",S=function(e){var t,n,u,f,m,g,x,S,k,O,C,A,j,I,z,M,P,W,T,N,R,_,F=e.setVisible,H=(0,l.useRef)(),B=(0,l.useRef)(),D=(0,c.useTranslation)("block-workbench").t,Q=w((0,l.useState)({width:0,height:0}),2),V=Q[0],q=Q[1],G=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),U=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),$=(n=(t={onScannerSizeChanged:q,elementId:E,onScanSuccess:(0,l.useCallback)(function(e){F(!1)},[F])}).onScannerSizeChanged,u=t.elementId,f=t.onScanSuccess,g=(m=(0,o.useApp)()).pm.get(h()).mobileRouter,x=m.router,S=((null==g?void 0:g.router)?null==g?void 0:g.basename:x.basename).replace(/\/+$/,""),C=(k=(0,l.useState)(),O=function(e){if(Array.isArray(e))return e}(k)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(k,2)||function(e,t){if(e){if("string"==typeof e)return d(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}(k,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],A=O[1],j=(0,p.useNavigate)(),I=(0,c.useTranslation)("block-workbench").t,z=(0,l.useMemo)(function(){return{width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}},[]),P=(0,l.useCallback)((M=b(function(e){return y(this,function(t){return[2,e.start({facingMode:"environment"},{fps:10,qrbox:function(e,t){return n({width:e,height:t}),{width:z.width,height:z.height}}},function(e){if(null==e?void 0:e.startsWith("http")){window.location.href=e;return}j(v(e,S)),f&&f(e)},void 0)]})}),function(e){return M.apply(this,arguments)}),[j,n,z,S,f]),T=(0,l.useCallback)((W=b(function(e){var t;return y(this,function(n){return(t=e.getState(),[i.lz.SCANNING,i.lz.PAUSED].includes(t))?[2,e.stop()]:[2]})}),function(e){return W.apply(this,arguments)}),[]),R=(0,l.useCallback)((N=b(function(e){var t;return y(this,function(n){switch(n.label){case 0:return[4,T(C)];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,C.scanFileV2(e,!1)];case 3:if(null==(t=n.sent().decodedText)?void 0:t.startsWith("http"))return window.location.href=t,[2];return j(v(t,S)),f&&f(t),[3,5];case 4:return n.sent(),alert(I("QR code recognition failed, please scan again")),P(C),[3,5];case 5:return[2]}})}),function(e){return N.apply(this,arguments)}),[T,C,j,S,I,P,f]),(0,l.useEffect)(function(){var e=new i.t2(u);return A(e),P(e),function(){T(e)}},[u,P,T]),{startScanCamera:P,startScanFile:R}).startScanFile,L=function(){B.current&&B.current.click()},Y=function(e){var t=e.target.files;if(t.length>0){var n=t[0];n.size<1e6?$(n):alert(D("The image size is too large. Please compress it to below 1MB before uploading"))}};(0,l.useEffect)(function(){return document.documentElement.style.overscrollBehavior="none",function(){document.documentElement.style.overscrollBehavior="default"}},[]),(0,l.useEffect)(function(){var e=V.width,t=V.height,n=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),r=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);if(e>0&&t>0&&t<r){var o=Math.floor(r/t*e),i=document.getElementsByTagName("video")[0];i.style.height="".concat(r,"px"),i.style.width="".concat(o,"px"),H.current.style.left="".concat((n-o)/2,"px"),H.current.style.position="absolute"}},[V]);var J={zIndex:"1003",fontSize:"1.8em",fontWeight:"bold"};return a().createElement(a().Fragment,null,a().createElement("div",{ref:H,id:E,style:{position:"absolute"}}),a().createElement(s,{style:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(_=Math.floor(.6*Math.min(G,U)),{left:"".concat((G-_)/2,"px"),top:"".concat((U-_)/2,"px"),position:"fixed",width:"".concat(_,"px"),height:"".concat(_,"px")}))}),a().createElement(function(){return a().createElement("div",{style:{position:"absolute",bottom:"20px",left:"20px",padding:"10px 60px"}},a().createElement("div",{style:{color:"white",width:"40px",display:"flex",flexDirection:"column",alignItems:"center"}},a().createElement(r.FileImageOutlined,{style:J,onClick:L}),D("Album"),a().createElement("input",{ref:B,type:"file",accept:"image/*",onChange:Y,style:{visibility:"hidden"}})))},null))},k=function(e){var t=(0,o.useActionContext)(),n=t.visible,u=t.setVisible,s=w((0,l.useState)(!1),2),f=s[0],h=s[1],p=(0,c.useTranslation)("block-workbench").t;return(0,l.useEffect)(function(){var e,t,r=(e=function(){var e,t,n;return function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){var c=[i,a];if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.t2.getCameras()];case 1:return 0===r.sent().length?alert(p("No camera device detected")):h(!0),[3,3];case 2:return e=r.sent(),t={NotFoundError:p("No camera device detected"),NotAllowedError:p("You have not granted permission to use the camera")},console.log(e),alert(null!=(n=t[e.name])?n:e),h(!1),u(!1),[3,3];case 3:return[2]}})},t=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(e){x(i,r,o,l,a,"next",e)}function a(e){x(i,r,o,l,a,"throw",e)}l(void 0)})},function(){return t.apply(this,arguments)});n&&!f&&r()},[n,f,u,p]),n&&f?a().createElement("div",{style:{position:"fixed",width:"100%",height:"100%",background:"black",zIndex:"1001",top:0,left:0,overflow:"hidden"}},a().createElement(S,{setVisible:u}),a().createElement(r.LeftOutlined,{style:{position:"absolute",top:"22px",left:"20px",zIndex:"1003",color:"white",fontSize:"1.8em",fontWeight:"bold"},onClick:function(){return u(!1)}}),a().createElement("div",{style:{position:"absolute",color:"white",fontSize:"1.5em",left:0,right:0,top:"20px",zIndex:"1002",marginLeft:"auto",marginRight:"auto",textAlign:"center"}},p("Scan QR code"))):null}}}]);