1(()=>{"use strict";var e,t={281:(e,t,l)=>{const o=window.wp.blocks,n=JSON.parse('{"UU":"leco-cp/register","DD":"Register Form","L1":"widgets","Kk":"feedback","h_":"Add the Client Portal registration form.","RE":["Client Portal Register Form"],"uK":{"project":{"type":"integer"},"template":{"type":"integer"},"projectTitle":{"type":"string","default":"New Portal"},"showOrganization":{"type":"boolean","default":true},"privacyConsentLabel":{"type":"string","default":"I agree with the storage and handling of my data by this website."}}}'),a=window.wp.i18n,r=window.wp.blockEditor,i=window.wp.serverSideRender;var c=l.n(i);const p=window.wp.components,s=window.wp.htmlEntities,{__}=wp.i18n,{compose:d}=wp,{withSelect:u}=wp.data,{SelectControl:h}=wp.components,w=d.compose(u(function(e,t){let{postType:l}=t;return{posts:e("core").getEntityRecords("postType",l,{per_page:100})}}))(function(e){let t=[],{label:l,value:o,onChange:n,isHidden:a,defaultOption:r,help:i}=e;return e.posts?(t.push({value:0,label:r}),e.posts.forEach(e=>{t.push({value:e.id,label:(0,s.decodeEntities)(e.title.rendered)})})):t.push({value:0,label:__("Loading...","leco-cp")}),a?"":wp.element.createElement(h,{label:l,options:t,onChange:function(e){o=e,n(parseInt(o))},value:o,help:i})}),b=window.ReactJSXRuntime,g=!(0,o.getCategories)().find(({slug:e})=>"leco-client-portal"===e);(0,o.registerBlockType)(n.UU,{title:n.DD,description:n.h_,category:g?n.L1:"leco-client-portal",icon:n.Kk,keywords:n.RE,supports:{anchor:!0,customClassName:!0,html:!1,multiple:!1,reusable:!1},attributes:n.uK,edit:function(e){const{isSelected:t,setAttributes:l}=e,{template:o,project:n,projectTitle:i,showOrganization:s,privacyConsentLabel:d}=e.attributes,u=(0,r.useBlockProps)(),h=[t&&(0,b.jsx)(r.InspectorControls,{children:(0,b.jsxs)(p.PanelBody,{title:(0,a.__)("Registration Options","leco-cp"),initialOpen:!0,children:[(0,b.jsxs)(p.Tip,{children:[(0,a.__)("When no template and portal selected, the default values from Client Portal Settings will be loaded.","leco-cp")," ",(0,b.jsx)("br",{}),(0,b.jsx)("br",{})]}),(0,b.jsx)(w,{label:(0,a.__)("Create New Portal","leco-cp"),postType:"leco_template",value:o,onChange:e=>l({template:e}),isHidden:n,defaultOption:(0,a.__)("Don't create new portal","leco-cp"),help:(0,a.__)("Select a portal template and we will create a new portal with the client. If you don't select one, no new portal will be created.","leco-cp")}),(0,b.jsx)(w,{label:(0,a.__)("Attach a Portal","leco-cp"),postType:"leco_client",value:n,onChange:e=>l({project:e}),isHidden:o,defaultOption:(0,a.__)("Don't attach any portal","leco-cp"),help:(0,a.__)("You can attach a portal to the client.","leco-cp")}),o?(0,b.jsx)(p.TextControl,{label:(0,a.__)("New Portal Title","leco-cp"),value:i,help:(0,a.__)("The title of your new portal.","leco-cp"),onChange:e=>l({projectTitle:e})}):"",(0,b.jsx)(p.ToggleControl,{label:(0,a.__)("Display Organization Field","leco-cp"),checked:s,onChange:()=>{l({showOrganization:!s})}}),(0,b.jsx)(p.TextControl,{label:(0,a.__)("Privacy Consent Label Text","leco-cp"),value:d,help:(0,a.__)("The label text of the Privacy consent checkbox. If left empty, the default text will be used.","leco-cp"),onChange:e=>l({privacyConsentLabel:e})})]})},"inspector")];return(0,b.jsxs)(b.Fragment,{children:[h,(0,b.jsx)("div",{...u,children:(0,b.jsx)("div",{className:"leco-cp-disable-editing",children:(0,b.jsx)(c(),{block:"leco-cp/register",attributes:e.attributes})})})]})},save:()=>null})}},l={};function o(e){var n=l[e];if(void 0!==n)return n.exports;var a=l[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,l,n,a)=>{if(!l){var r=1/0;for(s=0;s<e.length;s++){for(var[l,n,a]=e[s],i=!0,c=0;c<l.length;c++)(!1&a||r>=a)&&Object.keys(o.O).every(e=>o.O[e](l[c]))?l.splice(c--,1):(i=!1,a<r&&(r=a));if(i){e.splice(s--,1);var p=n();void 0!==p&&(t=p)}}return t}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[l,n,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var l in t)o.o(t,l)&&!o.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={313:0,989:0};o.O.j=t=>0===e[t];var t=(t,l)=>{var n,a,[r,i,c]=l,p=0;if(r.some(t=>0!==e[t])){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(c)var s=c(o)}for(t&&t(l);p<r.length;p++)a=r[p],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(s)},l=globalThis.webpackChunkleco_client_portal=globalThis.webpackChunkleco_client_portal||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var n=o.O(void 0,[989],()=>o(281));n=o.O(n)})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.