@tripetto/runner-autoscroll
Version:
Autoscroll UI for running Tripetto forms and surveys.
3 lines • 581 kB
JavaScript
/*! Tripetto Autoscroll Runner 9.0.2 - Copyright (C) 2025 Tripetto B.V. - All Rights Reserved */
import{Collection as e,Components as t,pgettext as o,isString as i,lookupVariable as l,Slots as a,isNumberFinite as n,L10n as s,setAny as c,icon as r,name as u,title as d,width as b,menu as M,definition as h,affects as g,editor as m,created as p,deleted as v,tripetto as N,assigned as w,slots as A,renamed as I,conditions as D,Forms as L,DateTime as j,makeMarkdownSafe as S,Markdown as x,npgettext as k,isFilledString as y,Str as f,insertVariable as T,NodeBlock as C,getMetadata as z,each as E,castToString as U,castToNumber as O,Num as Y,set as P,getHelpTopic as Z,isNumber as V,scheduleTimeout as R,populateSlots as W,findFirst as G,getSlotIcon as Q,ConditionBlock as F,populateVariables as H,metadata as B,markdownifyToString as q,isBoolean as $,alias as X,score as J,collection as _,reordered as K,refreshed as ee,supplies as te,isVariable as oe,map as ie,filter as le,REGEX_IS_URL as ae,detached as ne,arraySize as se,mountNamespace as ce,unmountNamespace as re,AES as ue,isDefined as de}from"@tripetto/builder";function be(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}const Me=["π","e","γ","c","random","timestamp","year","month","day","day-of-week","hour","minute","second","millisecond","timezone","branch"];function he(e){if("string"==typeof e){const t=Me.length;for(let o=0;o<t;o++)if(Me[o]===e)return!0}return!1}function ge(e){switch(e){case"π":return`π ≈ ${s.locale.number(3.14159,"auto")}`;case"e":return`e ≈ ${s.locale.number(2.71828,"auto")}`;case"γ":return`γ ≈ ${s.locale.number(.57722,"auto")}`;case"c":return`c = ${s.locale.number(299792458)} m/s`;case"random":return o("block:calculator","Random value (0 to less than 1)");case"timestamp":return o("block:calculator","UNIX time (seconds since Unix Epoch)");case"year":return o("block:calculator","Year");case"month":return o("block:calculator","Month (January = 1)");case"day":return o("block:calculator","Day of month (1-31)");case"day-of-week":return o("block:calculator","Day of week (Sunday = 0)");case"hour":return o("block:calculator","Hour (0-23)");case"minute":return o("block:calculator","Minute (0-59)");case"second":return o("block:calculator","Second (0-59)");case"millisecond":return o("block:calculator","Millisecond (0-999)");case"timezone":return o("block:calculator","Timezone (in milliseconds)");case"branch":return o("block:calculator","Branch number")}}var me="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIgLjVDMS4xNzMuNS41IDEuMTczLjUgMnYxNmMwIC44MjcuNjczIDEuNSAxLjUgMS41aDE2Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41VjJjMC0uODI3LS42NzMtMS41LTEuNS0xLjVIMnpNNSA4aDEwYS41LjUgMCAwIDEgMCAxSDVhLjUuNSAwIDAgMSAwLTF6bTAgM2gxMGEuNS41IDAgMCAxIDAgMUg1YS41LjUgMCAwIDEgMC0xeiIgZmlsbD0iI0E4QzZERiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=",pe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0E4QzZERiI+PHBhdGggZD0iTTE4IDE5LjVIMmMtLjgyNyAwLTEuNS0uNjczLTEuNS0xLjVWMkMuNSAxLjE3MyAxLjE3My41IDIgLjVoMTZjLjgyNyAwIDEuNS42NzMgMS41IDEuNXYxNmMwIC44MjctLjY3MyAxLjUtMS41IDEuNXpNMiAxLjVhLjUuNSAwIDAgMC0uNS41djE2YS41LjUgMCAwIDAgLj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gMXMtLjQ0OSAxLTEgMXptMCA2Yy0uNTUxIDAtMS0uNDQ5LTEtMXMuNDQ5LTEgMS0xYy41NTEgMCAxIC40NDkgMSAxcy0uNDQ5IDEtMSAxeiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L2c+PC9zdmc+";const Ae=(e,i)=>l=>{const a=i||e.startBlank&&0===e.operations.count||"="!==l,n=[];n.push(new t.MenuItemWithIcon(59254,o("block:calculator","Number"),(()=>e.operations.append().set({operator:l,opcode:"number",value:"/"===l?1:0,open:!0}))));const s=je(e,l);return n.push(new t.MenuSubmenuWithIcon(59105,o("block:calculator","Score"),Ie(e,l),!1,!1),new t.MenuSubmenuWithIcon(59449,o("block:calculator","Comparison"),(()=>{const i=De(e,l);return[new t.MenuItemWithIcon(e.startBlank||e.operations.count>0?59239:59644,e.startBlank||e.operations.count>0?o("block:calculator","Last outcome (%1)","ANS"):o("block:calculator","Initial value"),(()=>e.operations.append().set({operator:l,opcode:"equation",value:void 0,cona:0,conb:0,outa:1,outb:0,open:!0})),0===e.operations.count&&e.startBlank),new t.MenuSubmenuWithIcon(59273,o("block:calculator","Date/time"),[new t.MenuItem(o("block:calculator","Current date"),(()=>e.operations.append().set({operator:l,opcode:"date",value:void 0,cona:j.UTCToday,conb:void 0,outa:1,outb:0,open:!0}))),new t.MenuItem(o("block:calculator","Current date + time"),(()=>e.operations.append().set({operator:l,opcode:"datetime",value:void 0,cona:j.UTC,conb:void 0,outa:1,outb:0,open:!0})))]),...i]})),new t.MenuSubmenuWithIcon(58927,o("block:calculator","Function"),(()=>Le(l,e.operations,a))),new t.MenuItemWithIcon(59238,o("block:calculator","Subcalculation"),(()=>e.operations.append().set({operator:l,opcode:"calc",open:!0})))),s.length>0&&(s[0]instanceof t.MenuSeparator||n.push(new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Blocks"))),n.push(...s)),n},Ie=(i,l)=>{const n=[];let s;const c=e=>{if((null==e?void 0:e.id)!==s){const o=null==e?void 0:e.name;n.length>0&&n.push(new t.MenuSeparator),o&&n.push(new t.MenuLabel(o)),s=null==e?void 0:e.id}},r=(a,s)=>{var r,u,d,b;const M=e.find(s),h=z(s.block,"calculator");if(M||h&&(null===(u=h[(null===(r=s.slot)||void 0===r?void 0:r.reference)||"*"]||h["*"])||void 0===u?void 0:u.scores)){c(a.block.node.section);const e=null===(b=null===(d=s.slot)||void 0===d?void 0:d.slots)||void 0===b?void 0:b.select("score","feature");if(e){const c=[];Se(c,l,i.operations,{type:"slot",block:a.block,label:e.alias||o("block:calculator","Existing score"),icon:a.icon||a.block.type.icon,id:e.id,reference:e.reference,slot:e},!1,!0),c.push(new t.MenuItemWithIcon(59147,o("block:calculator","New score"),(()=>i.operations.append().set({operator:l,opcode:"score",value:s.id,open:!0})))),n.push(new t.MenuSubmenuWithImage(a.icon||a.block.type.icon,a.label,c))}else n.push(new t.MenuItemWithImage(a.icon||a.block.type.icon,a.label,(()=>i.operations.append().set({operator:l,opcode:"score",value:s.id,open:!0}))))}};return E(W(i.block,{mode:"validated",pipes:"include-consumed-slots"}),(s=>{s.slots?G(s.slots,(u=>{var d,b;if("pipe"===u.type){if(e.find(u)){const e=null===(b=null===(d=u.slot)||void 0===d?void 0:d.slots)||void 0===b?void 0:b.select("score","feature");if(c(s.block.node.section),e){const a=[];Se(a,l,i.operations,{type:"slot",block:s.block,label:e.alias||o("block:calculator","Existing score"),icon:s.icon||s.block.type.icon,id:e.id,reference:e.reference,slot:e},!1,!0),a.push(new t.MenuItemWithIcon(59147,o("block:calculator","New score"),(()=>i.operations.append().set({operator:l,opcode:"score",value:u.id,open:!0})))),n.push(new t.MenuSubmenuWithImage(s.icon||s.block.type.icon,s.label,a))}else n.push(new t.MenuItemWithImage(s.icon||s.block.type.icon,s.label,(()=>i.operations.append().set({operator:l,opcode:"score",value:u.id,open:!0}))));return!0}}else if(u.id&&(u.slot instanceof a.String||u.slot instanceof a.Text))return r(s,u),!0;return!1})):s.id&&(s.slot instanceof a.String||s.slot instanceof a.Text)&&r(s,s)})),n},De=(i,l)=>{const n=[];let s;const c=e=>{if((null==e?void 0:e.id)!==s){const i=null==e?void 0:e.name;n.push(new t.MenuSeparator),(i||1===n.length)&&n.push(new t.MenuLabel(i||o("block:calculator","Blocks"))),s=null==e?void 0:e.id}};return E(W(i.block,{mode:"validated",pipes:"exclude"}),(o=>{if(o.slots){const s=[];let r;E(o.slots,(o=>{if(o.id&&(o.slot instanceof a.String||o.slot instanceof a.Text||o.slot instanceof a.Boolean||o.slot instanceof a.Number||o.slot instanceof a.Numeric||o.slot instanceof a.Date)){const n=(o.slot instanceof a.String||o.slot instanceof a.Text)&&e.find(o);n&&n.sole||s.push(new t.MenuItemWithIcon(Q(o.slot),o.label,r=()=>i.operations.append().set(o.slot instanceof a.String||o.slot instanceof a.Text?{operator:l,opcode:"evaluate",value:o.id,cona:0,conb:0,outa:1,outb:0,open:!0}:o.slot instanceof a.Boolean?{operator:l,opcode:"boolean",value:o.id,outa:1,outb:0,open:!0}:o.slot instanceof a.Date?{operator:l,opcode:"date",value:o.id,cona:void 0,conb:void 0,outa:1,outb:0,open:!0}:{operator:l,opcode:"equation",value:o.id,cona:0,conb:0,outa:1,outb:0,open:!0})))}})),s.length>0&&(c(o.block.node.section),n.push(1===s.length&&r?new t.MenuItemWithImage(o.icon||o.block.type.icon,o.label,r):new t.MenuSubmenuWithImage(o.icon||o.block.type.icon,o.label,s)))}else if(o.id&&(o.slot instanceof a.String||o.slot instanceof a.Text||o.slot instanceof a.Boolean||o.slot instanceof a.Number||o.slot instanceof a.Numeric||o.slot instanceof a.Date)){const s=(o.slot instanceof a.String||o.slot instanceof a.Text)&&e.find(o);s&&s.sole||(c(o.block.node.section),n.push(new t.MenuItemWithImage(o.icon||o.block.type.icon,o.label,(()=>i.operations.append().set(o.slot instanceof a.String||o.slot instanceof a.Text?{operator:l,opcode:"evaluate",value:o.id,cona:0,conb:0,outa:1,outb:0,open:!0}:o.slot instanceof a.Boolean?{operator:l,opcode:"boolean",value:o.id,outa:1,outb:0,open:!0}:o.slot instanceof a.Date?{operator:l,opcode:"date",value:o.id,cona:void 0,conb:void 0,outa:1,outb:0,open:!0}:{operator:l,opcode:"equation",value:o.id,cona:0,conb:0,outa:1,outb:0,open:!0})))))}})),n},Le=(e,i,l,a,n=!0)=>[new t.MenuSubmenuWithIcon(59122,o("block:calculator","Limiting"),[new t.MenuItem("min",(()=>i.append().set({operator:e,opcode:"min",value:l?0:a,min:0,open:!0}))),new t.MenuItem("max",(()=>i.append().set({operator:e,opcode:"max",value:l?0:a,max:0,open:!0}))),new t.MenuItem("clamp",(()=>i.append().set({operator:e,opcode:"clamp",value:l?0:a,min:0,max:0,open:!0})))]),new t.MenuSubmenuWithImage("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNzAwIDE1MDBoNDQwMGMyMjAgMCA0MDAgMTgwIDQwMCA0MDB2MjAwMGMwIDIyMC0xODAgNDAwLTQwMCA0MDBINzAwYy0yMjAgMC00MDAtMTgwLTQwMC00MDBWMTkwMGMwLTIyMCAxODAtNDAwIDQwMC00MDB6bTMxMDAgMjAwdjI0MDBoMTMwMGMxMTAgMCAyMDAtOTAgMjAwLTIwMFYxOTAwYzAtMTEwLTkwLTIwMC0yMDAtMjAwSDM4MDB6bS0yMDAgMjQwMFYxNzAwSDcwMGMtMTEwIDAtMjAwIDkwLTIwMCAyMDB2MjAwMGMwIDExMCA5MCAyMDAgMjAwIDIwMGgyOTAwem0xMzAwLTE0MDBjMC0xMjEtNzktMjAwLTIwMC0yMDBoLTIwMGMtMTIxIDAtMjAwIDc5LTIwMCAyMDB2NDAwYzAgMTIxIDc5IDIwMCAyMDAgMjAwaDIwMGMxMjEgMCAyMDAtNzkgMjAwLTIwMHYtNDAwem0yMDAgMHY0MDBjMCAyMzEtMTY5IDQwMC00MDAgNDAwaC0yMDBjLTIzMSAwLTQwMC0xNjktNDAwLTQwMHYtNDAwYzAtMjMxIDE2OS00MDAgNDAwLTQwMGgyMDBjMjMxIDAgNDAwIDE2OSA0MDAgNDAwem0tMjAwMCAwYzAtMTIxLTc5LTIwMC0yMDAtMjAwaC0yMDBjLTEyMSAwLTIwMCA3OS0yMDAgMjAwdjQwMGMwIDEyMSA3OSAyMDAgMjAwIDIwMGgyMDBjMTIxIDAgMjAwLTc5IDIwMC0yMDB2LTQwMHptMjAwIDB2NDAwYzAgMjMxLTE2OSA0MDAtNDAwIDQwMGgtMjAwYy0yMzEgMC00MDAtMTY5LTQwMC00MDB2LTQwMGMwLTIzMSAxNjktNDAwIDQwMC00MDBoMjAwYzIzMSAwIDQwMCAxNjkgNDAwIDQwMHptLTE2MDAgMGMwLTEyMS03OS0yMDAtMjAwLTIwMGgtMjAwYy0xMjEgMC0yMDAgNzktMjAwIDIwMHY0MDBjMCAxMjEgNzkgMjAwIDIwMCAyMDBoMjAwYzEyMSAwIDIwMC03OSAyMDAtMjAwdi00MDB6bTIwMCAwdjQwMGMwIDIzMS0xNjkgNDAwLTQwMCA0MDBoLTIwMGMtMjMxIDAtNDAwLTE2OS00MDAtNDAwdi00MDBjMC0yMzEgMTY5LTQwMCA0MDAtNDAwaDIwMGMyMzEgMCA0MDAgMTY5IDQwMCA0MDB6Ii8+PC9zdmc+",o("block:calculator","Floating point"),[new t.MenuItem("round",(()=>i.append().set({operator:e,opcode:"round",value:l?0:a,open:l}))),new t.MenuItem("floor",(()=>i.append().set({operator:e,opcode:"floor",value:l?0:a,open:l}))),new t.MenuItem("ceil",(()=>i.append().set({operator:e,opcode:"ceil",value:l?0:a,open:l}))),new t.MenuItem("trunc",(()=>i.append().set({operator:e,opcode:"trunc",value:l?0:a,open:l})))]),new t.MenuSubmenuWithImage("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNTEwMCAyMzAwaC0zNTZsLTgyNCA5MTYgNDQxIDg4NGgzMzl2MjAwaC00MDBjLTM2IDAtNzItMjEtODktNTVsLTQzNS04NzAtODAyIDg5MmMtNSA1LTc0IDMzLTc0IDMzaC00MDB2LTIwMGgzNTZsODI0LTkxNi00NDEtODg0aC0zMzl2LTIwMGg0MDBjNDMgMCA3OSAyNyA5MyA2NGw0MzEgODYxIDc5OC04ODhjMTgtMjIgNDctMzcgNzgtMzdoNDAwdjIwMHoiLz48cGF0aCBjbGFzcz0idHJpcGV0dG8tZmlsbCIgZD0iTTMwMCAyOTAwaDQwMGM0OCAwIDg3IDMzIDk3IDc4bDUwMCAxNDk5TDI0MDUgOTcwYzEzLTQzIDUzLTcwIDk1LTcwaDMwMDB2MjAwSDI1NzNMMTM5NSA0ODMwYy05IDI5LTMyIDU0LTY0IDY1LTUyIDE3LTEwOC0xMi0xMjYtNjRMNjI4IDMxMDBIMzAwdi0yMDB6Ii8+PC9zdmc+",o("block:calculator","Exponentiation"),[new t.MenuItem("x²",(()=>i.append().set({operator:e,opcode:"square",value:l?0:a,open:l}))),new t.MenuItem("√",(()=>i.append().set({operator:e,opcode:"sqrt",value:l?0:a,open:l}))),new t.MenuItem("pow",(()=>i.append().set({operator:e,opcode:"pow",exponent:1,open:!0}))),new t.MenuItem("exp",(()=>i.append().set({operator:e,opcode:"exp",exponent:l?0:void 0,open:l}))),new t.MenuItem("ln",(()=>i.append().set({operator:e,opcode:"ln",value:l?0:a,open:l}))),new t.MenuItem("log",(()=>i.append().set({operator:e,opcode:"log",value:l?0:a,open:l})))]),new t.MenuSubmenuWithIcon(59778,o("block:calculator","Trigonometry"),[new t.MenuItem("sin",(()=>i.append().set({operator:e,opcode:"sin",value:l?0:a,open:l}))),new t.MenuItem("cos",(()=>i.append().set({operator:e,opcode:"cos",value:l?0:a,open:l}))),new t.MenuItem("tan",(()=>i.append().set({operator:e,opcode:"tan",value:l?0:a,open:l}))),new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Inverse")),new t.MenuItem("sin⁻¹",(()=>i.append().set({operator:e,opcode:"asin",value:l?0:a,open:l}))),new t.MenuItem("cos⁻¹",(()=>i.append().set({operator:e,opcode:"acos",value:l?0:a,open:l}))),new t.MenuItem("tan⁻¹",(()=>i.append().set({operator:e,opcode:"atan",value:l?0:a,open:l}))),new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Hyperbolic")),new t.MenuItem("sinh",(()=>i.append().set({operator:e,opcode:"sinh",value:l?0:a,open:l}))),new t.MenuItem("cosh",(()=>i.append().set({operator:e,opcode:"cosh",value:l?0:a,open:l}))),new t.MenuItem("tanh",(()=>i.append().set({operator:e,opcode:"tanh",value:l?0:a,open:l}))),new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Inverse hyperbolic")),new t.MenuItem("sinh⁻¹",(()=>i.append().set({operator:e,opcode:"asinh",value:l?0:a,open:l}))),new t.MenuItem("cosh⁻¹",(()=>i.append().set({operator:e,opcode:"acosh",value:l?0:a,open:l}))),new t.MenuItem("tanh⁻¹",(()=>i.append().set({operator:e,opcode:"atanh",value:l?0:a,open:l})))]),new t.MenuSubmenuWithIcon(59732,o("block:calculator","Factorial"),[new t.MenuItem("n!",(()=>i.append().set({operator:e,opcode:"fact",value:l?0:a,open:l}))),new t.MenuItem("gamma",(()=>i.append().set({operator:e,opcode:"gamma",value:l?0:a,open:l})))]),new t.MenuSubmenuWithIcon(59704,o("block:calculator","Miscellaneous"),[new t.MenuItem("abs",(()=>i.append().set({operator:e,opcode:"abs",value:l?0:a,open:l}))),new t.MenuItem("sgn",(()=>i.append().set({operator:e,opcode:"sgn",value:l?0:a,open:l}))),new t.MenuItem("mod",(()=>i.append().set({operator:e,opcode:"mod",value:l?0:a,divisor:1,open:!0}))),new t.MenuItem("%",(()=>i.append().set({operator:e,opcode:"percentage",value:l?0:a,percentage:0,open:!0})))]),...n?[new t.MenuSubmenuWithIcon(59222,o("block:calculator","Constants"),(()=>Me.map((o=>new t.MenuItemWithIcon(function(e){switch(e){case"π":case"e":case"γ":case"c":return 59098;case"random":return 59015;case"timestamp":return 59274;case"year":case"month":case"day-of-week":return 59273;case"day":return 59272;case"hour":case"minute":case"second":case"millisecond":return 59624;case"timezone":return 59526;case"branch":return 59719}}(o),ge(o),(()=>i.append().set({operator:e,opcode:"number",value:o})))))))]:[]],je=(i,l)=>{const n=[];let s;const c=e=>{if((null==e?void 0:e.id)!==s){const o=null==e?void 0:e.name;(n.length>0||o)&&n.push(new t.MenuSeparator),o&&n.push(new t.MenuLabel(o)),s=null==e?void 0:e.id}};return E(W(i.block,{mode:"validated",pipes:"include-consumed-slots"}),(s=>{if(s.slots){const r=[];let u=!0,d=!1,b=!1;G(s.slots,(n=>{var c,u,M;if("pipe"===n.type){const h=e.find(n);if(h){const e=null===(u=null===(c=n.slot)||void 0===c?void 0:c.slots)||void 0===u?void 0:u.select("score","feature");if(d=!0,e){const a=[];Se(a,l,i.operations,{type:"slot",block:s.block,label:e.alias||o("block:calculator","Existing score"),icon:s.icon||s.block.type.icon,id:e.id,reference:e.reference,slot:e},!1,!0),a.push(new t.MenuItemWithIcon(59147,o("block:calculator","New score"),(()=>i.operations.append().set({operator:l,opcode:"score",value:n.id,open:!0})))),r.push(new t.MenuSubmenuWithIcon(59105,o("block:calculator","Score"),a))}else r.push(new t.MenuItemWithIcon(59105,o("block:calculator","Score"),(()=>i.operations.append().set({operator:l,opcode:"score",value:n.id,open:!0}))));if(h.origin&&h.sole)if(n.slot instanceof a.Number||n.slot instanceof a.Numeric)r.push(new t.MenuItemWithIcon(59837,o("block:calculator","Sum"),(()=>i.operations.append().set({operator:l,opcode:"sum",value:n.id}))));else if(n.slot instanceof a.Boolean){const e=null===(M=n.slot.slots)||void 0===M?void 0:M.select("counter");e?(b=!0,Se(r,l,i.operations,{type:"slot",block:s.block,label:e.label||o("block:calculator","Counter"),icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIgNmEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDZMNi4xNDUuNjQ3YS41LjUgMCAwIDEgLjcwNy43MDdsLTQuNSA0LjVBLjQ5OC40OTggMCAwIDEgMS45OTggNnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAxM2EuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAyMGEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",id:e.id,reference:e.reference,slot:e},!1,!0)):r.push(new t.MenuItemWithIcon(59694,o("block:calculator","Count"),(()=>i.operations.append().set({operator:l,opcode:"count",value:n.id}))))}return!0}}return!1})),E(s.slots,(e=>{"slot"===e.type&&e.id&&e.slot&&("score"!==e.reference&&"counter"!==e.reference||"score"===e.reference&&!d||"counter"===e.reference&&!b)&&(u&&(u=!1,r.length>0&&r.push(new t.MenuSeparator)),Se(r,l,i.operations,e,!0))})),r.length>0&&(c(s.block.node.section),n.push(new t.MenuSubmenuWithImage(s.icon||s.block.type.icon,s.label,r)))}else if(s.id&&s.slot){const e=[];Se(e,l,i.operations,s,!1),e.length>0&&(c(s.block.node.section),n.push(...e))}})),n},Se=(i,l,n,s,c,r=!1)=>{var u,d,b,M,h,g,m;if(s.slot instanceof a.String||s.slot instanceof a.Text){const a=e.find(s),r=z(s.block,"calculator"),p=()=>n.append().set({operator:l,opcode:"score",value:s.id,open:!0}),v=(null==a?void 0:a.sole)&&r&&!0===(null===(u=r[s.slot.reference]||r["*"])||void 0===u?void 0:u.allowDefault)||!(null==a?void 0:a.sole)&&(!r||!1!==(null===(d=r[s.slot.reference]||r["*"])||void 0===d?void 0:d.allowDefault)),N=(null==a?void 0:a.sole)&&r&&!0===(null===(b=r[s.slot.reference]||r["*"])||void 0===b?void 0:b.allowCastToNumber)||!(null==a?void 0:a.sole)&&(!r||!1!==(null===(M=r[s.slot.reference]||r["*"])||void 0===M?void 0:M.allowCastToNumber)),w="static"===s.slot.kind&&(null===(h=s.slot.slots)||void 0===h?void 0:h.select("score","feature")),A=!!(a||r&&(null===(g=r[s.slot.reference]||r["*"])||void 0===g?void 0:g.scores));if((null==a?void 0:a.sole)&&!N||r&&(null===(m=r[s.slot.reference]||r["*"])||void 0===m?void 0:m.scores)&&!v&&!N)if(w){const e=[];Se(e,l,n,{type:"slot",block:s.block,label:w.alias||o("block:calculator","Existing score"),icon:s.icon||s.block.type.icon,id:w.id,reference:w.reference,slot:w},!1,!0),e.push(new t.MenuItemWithIcon(59147,o("block:calculator","New score"),(()=>n.append().set({operator:l,opcode:"score",value:s.id,open:!0})))),i.push(c?new t.MenuSubmenuWithIcon(59105,o("block:calculator","Score"),e):new t.MenuSubmenuWithImage(s.icon||s.block.type.icon,s.label,e))}else i.push(c?new t.MenuItemWithIcon(59105,s.label,p):new t.MenuItemWithImage(s.icon||s.block.type.icon,s.label,p));else{const e=[];if(A||w)if(w){const i=[];Se(i,l,n,{type:"slot",block:s.block,label:w.alias||o("block:calculator","Existing score"),icon:s.icon||s.block.type.icon,id:w.id,reference:w.reference,slot:w},!1,!0),i.push(new t.MenuItemWithIcon(59147,o("block:calculator","New score"),p)),e.push(new t.MenuSubmenuWithIcon(59105,o("block:calculator","Score"),i))}else e.push(new t.MenuItemWithIcon(59105,o("block:calculator","Score"),p));v&&e.push(new t.MenuItemWithIcon(59449,o("block:calculator","Compare"),(()=>n.append().set({operator:l,opcode:"evaluate",value:s.id,cona:0,conb:0,outa:1,outb:0,open:!0}))),new t.MenuItemWithIcon(59771,o("block:calculator","Character count"),(()=>n.append().set({operator:l,opcode:"chars",value:s.id}))),new t.MenuItemWithIcon(59771,o("block:calculator","Word count"),(()=>n.append().set({operator:l,opcode:"words",value:s.id}))),new t.MenuItemWithIcon(59771,o("block:calculator","Line count"),(()=>n.append().set({operator:l,opcode:"lines",value:s.id}))),new t.MenuItemWithIcon(59683,o("block:calculator","Count occurrences"),(()=>n.append().set({operator:l,opcode:"occurrences",value:s.id,open:!0})))),N&&e.push(new t.MenuItemWithIcon(59117,o("block:calculator","Convert to number"),(()=>n.append().set({operator:l,opcode:"cast",value:s.id})))),e.length>0&&i.push(1===e.length?e[0]:new t.MenuSubmenuWithImage(s.icon||s.block.type.icon,s.label,e))}}else if(!(s.slot instanceof a.Number||s.slot instanceof a.Numeric)||!r&&"score"===s.reference&&xe(s))if(s.slot instanceof a.Boolean){const e=()=>n.append().set({operator:l,opcode:"boolean",value:s.id,outa:1,outb:0,open:!0});i.push(c?new t.MenuItemWithIcon(59801,s.label,e):new t.MenuItemWithImage(s.icon||s.block.type.icon,s.label,e))}else s.slot instanceof a.Date&&i.push(new t.MenuSubmenuWithImage(s.icon||s.block.type.icon,s.label,[new t.MenuItemWithIcon(59449,o("block:calculator","Compare"),(()=>n.append().set({operator:l,opcode:"date",value:s.id,cona:void 0,conb:void 0,outa:1,outb:0,open:!0}))),new t.MenuItemWithIcon(59390,o("block:calculator","Age"),(()=>n.append().set({operator:l,opcode:"age",value:s.id,ageAbs:!0}))),new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Date related")),new t.MenuItemWithIcon(59269,o("block:calculator","Year"),(()=>n.append().set({operator:l,opcode:"year",value:s.id}))),new t.MenuItemWithIcon(59273,o("block:calculator","Month (January = 1)"),(()=>n.append().set({operator:l,opcode:"month",value:s.id}))),new t.MenuItemWithIcon(59272,o("block:calculator","Day of month (1-31)"),(()=>n.append().set({operator:l,opcode:"day-of-month",value:s.id}))),new t.MenuItemWithIcon(59274,o("block:calculator","Day of week (Sunday = 0)"),(()=>n.append().set({operator:l,opcode:"day-of-week",value:s.id}))),...s.slot.supportsTime?[new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Time related")),new t.MenuItemWithIcon(59624,o("block:calculator","Hour (0-23)"),(()=>n.append().set({operator:l,opcode:"hour",value:s.id}))),new t.MenuItemWithIcon(59624,o("block:calculator","Minute (0-59)"),(()=>n.append().set({operator:l,opcode:"minute",value:s.id}))),new t.MenuItemWithIcon(59624,o("block:calculator","Second (0-59)"),(()=>n.append().set({operator:l,opcode:"second",value:s.id}))),new t.MenuItemWithIcon(59624,o("block:calculator","Millisecond (0-999)"),(()=>n.append().set({operator:l,opcode:"millisecond",value:s.id})))]:[]]));else{const e=s.block instanceof Vt?"calculator":s.slot.reference,a=()=>[new t.MenuItemWithIcon("calculator"===e?59238:"score"===e?59105:"counter"===e?59694:59700,o("block:calculator","calculator"===e?"Calculation outcome":"score"===e?"Score value":"counter"===e?"Counter value":"Current value"),(()=>n.append().set({operator:l,opcode:"number",value:s.id}))),new t.MenuItemWithIcon(59449,o("block:calculator","Compare"),(()=>n.append().set({operator:l,opcode:"equation",value:s.id,cona:0,conb:0,outa:1,outb:0,open:!0}))),new t.MenuSeparator,new t.MenuLabel(o("block:calculator","Functions")),...Le(l,n,!1,s.id,!1)];i.push(s.block instanceof Vt||"calculator"!==s.reference&&"score"!==s.reference?new t.MenuSubmenuWithImage(s.icon||s.block.type.icon,s.label,a):new t.MenuSubmenuWithIcon("calculator"===s.reference?59238:59105,s.label,a))}},xe=t=>{var o,i;return null===(i=null===(o=t.slot)||void 0===o?void 0:o.slots)||void 0===i?void 0:i.each((o=>{var i;if(o instanceof a.String||o instanceof a.Text){const l=z(t.block,"calculator");return!!(e.find(Object.assign(Object.assign({},t),{slot:o}))||l&&(null===(i=l[o.reference]||l["*"])||void 0===i?void 0:i.scores))}return!1}))},ke=(e,t,l="value",n="form",s=!0,r=(e=>e instanceof a.Number||e instanceof a.Numeric),u)=>{const d=e[l],b=H(e.calculator.block,r,i(d)?d:void 0),M=new L.Dropdown(b,i(d)?d:"").placeholder(0===b.length?o("block:calculator","No usable values found..."):"").autoFocus(s).on((t=>{t.isFormVisible&&t.isObservable&&c(e,l,t.value||""),u&&u(t.value||"")}));return["form"===n?t.form({title:o("block:calculator","Use value of"),controls:[M]}):M.label(o("block:calculator","Use value of")),b.length,M]},ye=(e,t,i,l="angleUnits")=>{const a=e[l];return t.form({title:o("block:calculator","Units"),controls:[new L.Radiobutton([{label:o("block:calculator","Degrees")+" (°)",value:"degrees"},{label:o("block:calculator","Radians")+" (rad)",value:"radians"},{label:o("block:calculator","Gradians")+" (ᵍ)",value:"gradians"}],"radians"===a||"gradians"===a?a:"degrees").on((t=>{c(e,l,t.value||"degrees"),i&&i(t.value||"degrees")}))]})},fe=(e,t)=>e.form({title:o("block:calculator","Explanation"),controls:[new L.Static(t).markdown()]}),Te=(e,t,a=!0,s=!1,r=!0,u="value",d=!0,b=!0,M,h)=>{const g=e[u],m=M?"inline":"form";let p;const v=new L.Radiobutton([...a?[{label:e.isSubCalculation&&e.isFirst?o("block:calculator","Last outcome *(%1 parent calculation)*","ANS"):e.isFirst&&!e.calculator.startBlank?o("block:calculator","Initial value"):o("block:calculator","Last outcome *(%1)*","ANS"),value:"ans",disabled:!e.allowANS,markdown:!0}]:[],...r?[{label:o("block:calculator","Number"),value:"number"}]:[],{label:o("block:calculator","Value"),value:"variable"},...s?[{label:o("block:calculator","Constant"),value:"constant"}]:[]],i(g)?he(g)?"constant":"variable":n(g)||!a?"number":"ans").on((t=>{N[0].visible("number"===t.value),w[0].visible("variable"===t.value),A.visible("constant"===t.value),"ans"===t.value&&c(e,u,void 0),h&&h(t.value||"number","variable"===t.value&&w[2].value&&l(e.calculator.block,w[2].value)||void 0)}));"form"===m&&(p=t.form({title:o("block:calculator","Input"),controls:[v]}));const N=((e,t,i="value",l=!0,a=!0,s="form")=>{const r=e[i],u=new L.Numeric(n(r)?r:0).precision("auto").thousands(!1).autoFocus(a).on((t=>{t.isFormVisible&&t.isObservable&&c(e,i,t.value)}));return l&&(u.enter(t.close),u.escape(t.close)),"percentage"===i&&(u.suffix("%"),u.min(0)),["form"===s?t.form({title:o("block:calculator","Use fixed number"),controls:[u]}):u.label(o("block:calculator","Use fixed number")),u]})(e,t,u,d,b,m),w=ke(e,t,u,m,b,void 0,h&&(t=>{h(v.value||"number","variable"===v.value&&t&&l(e.calculator.block,t)||void 0)})),A=((e,t,i="value",l="form",a=!0)=>{const n=new L.Dropdown(Me.map((e=>({label:ge(e),value:e}))),U(e[i])).autoFocus(a).on((t=>{var o;t.isFormVisible&&t.isObservable&&c(e,i,"string"==typeof(o=t.value)&&he(o)?o:"π")}));return"inline"===l?n.label(o("block:calculator","Use constant")):t.form({title:o("block:calculator","Use constant"),controls:[n]})})(e,t,u,m,b).visible(he(U(g)));return N[0].visible(n(g)||!a&&!i(g)),w[0].visible(i(g)),v.buttonDisabled("variable",0===w[1]),N[0]instanceof L.Control&&w[0]instanceof L.Control&&A instanceof L.Control&&(p=t.form({title:M,markdown:!0,controls:[v,N[0],w[0],A]})),[p,N[1]]},Ce=ke,ze={name:e=>e.format("value","|","|"),title:()=>o("block:calculator","Absolute value"),editor:(e,t)=>{fe(t,o("block:calculator","Retrieves the absolute value (or modulus) of a number ([learn more](https://en.wikipedia.org/wiki/Absolute_value)). This makes negative numbers positive.")),Te(e,t,!0,!1,!1)}},Ee={name:e=>e.format("value","*cosh⁻¹* (",")"),title:()=>o("block:calculator","Inverse hyperbolic cosine"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the inverse hyperbolic cosine (arccosine) of the given number ([learn more](https://en.wikipedia.org/wiki/Inverse_hyperbolic_functions)).")),Te(e,t)}},Ue={name:e=>e.format("value","*cos⁻¹* (",") "+("radians"===e.angleUnits?"rad":"gradians"===e.angleUnits?"ᵍ":"°")),title:()=>o("block:calculator","Inverse cosine (arccosine)"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the inverse cosine (arccosine) of the given number ([learn more](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions)). This number should be a value between `-1` and `1`.")),Te(e,t)[1].min(-1).max(1),ye(e,t)}};function Oe(e="years"){switch(e){case"months":return o("block:calculator","Months");case"days":return o("block:calculator","Days");case"hours":return o("block:calculator","Hours");case"minutes":return o("block:calculator","Minutes");case"seconds":return o("block:calculator","Seconds");case"milliseconds":return o("block:calculator","Milliseconds");default:return o("block:calculator","Years")}}const Ye={name:e=>e.format("value",`*${o("block:calculator","age")}* (`,") "+Oe(e.ageIn).toLowerCase()),title:e=>{var t;return i(e.value)&&(null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label)||o("block:calculator","Age")},editor:(e,t)=>{const s=i(e.value)&&l(e.calculator.block,e.value),c=s&&s.slot instanceof a.Date&&s.slot.supportsTime||!1,r=new L.Radiobutton([{label:o("block:calculator","Current date"),value:"current"},{label:o("block:calculator","Fixed date"),value:"date"},{label:o("block:calculator","Value"),value:"variable"}],i(e.reference)?"variable":n(e.reference)?"date":"current").on((t=>{u.visible("date"===t.value),d[0].visible("variable"===t.value),"current"===t.value&&(e.reference=void 0)}));fe(t,o("block:calculator","Calculates the age (time) between two points in time.")),t.form({title:o("block:calculator","Calculate age using"),controls:[r]});const u=t.form({title:o("block:calculator","Use fixed date"),controls:[new L.DateTime(n(e.reference)?e.reference:j.UTC).zone("UTC").years((new Date).getFullYear()-150,(new Date).getFullYear()+50).features(1|(c?8:32)).required().on((t=>{t.isFormVisible&&t.isObservable&&(e.reference=t.value)}))]}),d=Ce(e,t,"reference","form",!0,(t=>t instanceof a.Date&&t.id!==e.value));r.buttonDisabled("variable",0===d[1]),t.form({title:o("block:calculator","Units"),controls:[new L.Radiobutton(["years","months","days","hours","minutes","seconds","milliseconds"].map((e=>({label:Oe(e),value:e}))),L.Radiobutton.bind(e,"ageIn",void 0,"years"))]}),t.form({title:o("block:calculator","Options"),controls:[new L.Checkbox(o("block:calculator","Always return a positive (absolute) value"),L.Checkbox.bind(e,"ageAbs",void 0)).description(o("block:calculator","If unchecked, a negative value is possible, which indicates that the source date is after the date that serves as compare date for the calculation."))]})}},Pe={name:e=>e.format("value","*sinh⁻¹* (",")"),title:()=>o("block:calculator","Inverse hyperbolic sine"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the inverse hyperbolic sine (arcsine) of the given number ([learn more](https://en.wikipedia.org/wiki/Inverse_hyperbolic_functions)).")),Te(e,t)}},Ze={name:e=>e.format("value","*sin⁻¹* (",") "+("radians"===e.angleUnits?"rad":"gradians"===e.angleUnits?"ᵍ":"°")),title:()=>o("block:calculator","Inverse sine (arcsine)"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the inverse sine (arcsine) of the given number ([learn more](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions)). This number should be a value between `-1` and `1`.")),Te(e,t)[1].min(-1).max(1),ye(e,t)}},Ve={name:e=>e.format("value","*tanh⁻¹* (",")"),title:()=>o("block:calculator","Inverse hyperbolic tangent"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the inverse hyperbolic tangent (arctangent) of the given number ([learn more](https://en.wikipedia.org/wiki/Inverse_hyperbolic_functions)).")),Te(e,t)}},Re={name:e=>e.format("value","*tan⁻¹* (",") "+("radians"===e.angleUnits?"rad":"gradians"===e.angleUnits?"ᵍ":"°")),title:()=>o("block:calculator","Inverse tangent (arctangent)"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the inverse tangent (arctangent) of the given number ([learn more](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions)).")),Te(e,t),ye(e,t)}},We={name:e=>{const t=e.format("value",void 0,void 0,void 0,!0),n=e.format("outa",void 0,void 0,void 0,!0),s=e.format("outb",void 0,void 0,void 0,!0);if(!t||!n||!s)return"";const c=i(e.value)&&l(e.calculator.block,e.value)||void 0;return t+" = "+o("block:calculator","%1 then %2 else %3",`**${(null==c?void 0:c.slot)instanceof a.Boolean&&S(c.slot.labelForTrue||"")||o("block:calculator","True")}**`,n,s)},title:e=>{var t;return i(e.value)&&(null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label)||o("block:calculator","Boolean")},editor:(e,t)=>{const n=i(e.value)&&l(e.calculator.block,e.value)||void 0;fe(t,o("block:calculator","Outputs a value based on the boolean state.")),Te(e,t,!0,!0,!0,"outa",!1,!1,o("block:calculator","If %1 then output",`**${(null==n?void 0:n.slot)instanceof a.Boolean&&S(n.slot.labelForTrue||"")||o("block:calculator","True")}**`)),Te(e,t,!0,!0,!0,"outb",!1,!1,o("block:calculator","If %1 then output",`**${(null==n?void 0:n.slot)instanceof a.Boolean&&S(n.slot.labelForFalse||"")||o("block:calculator","False")}**`))}},Ge=(e,i=o("block:calculator","Initial value is the last outcome (ANS)."),l)=>({collection:e.operations,banner:l,title:o("block:calculator","Operations"),icon:!0,allowAutoSorting:!1,allowCleanup:o("block:calculator","Remove invalid operations"),placeholder:o("block:calculator","Invalid operation"),allowVariables:!0,allowFormatting:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.InlineCode,showAliases:t=>{var o;return null===(o=e.block.slots.select(t.id,"dynamic"))||void 0===o?void 0:o.alias},onReposition:e=>e.refresh("name"),onResize:e instanceof Yt&&(()=>e.refresh("name"))||void 0,menu:()=>((e,i=!1)=>e.startBlank&&0===e.operations.count&&!i?Ae(e,!1)("+"):[new t.MenuSubmenuWithImage(pe,o("block:calculator","Add"),(()=>Ae(e,i)("+"))),new t.MenuSubmenuWithImage(ve,o("block:calculator","Subtract"),(()=>Ae(e,i)("-"))),new t.MenuSubmenuWithImage(Ne,o("block:calculator","Multiply"),(()=>Ae(e,i)("*"))),new t.MenuSubmenuWithImage(we,o("block:calculator","Divide"),(()=>Ae(e,i)("/"))),new t.MenuSeparator,new t.MenuSubmenuWithImage(me,o("block:calculator","Equal"),(()=>Ae(e,i)("=")))])(e,e instanceof Yt),emptyMessage:{message:e instanceof Yt||!e.startBlank?"**"+i+"**\n\n"+o("block:calculator","Click the + button to add an operation.")+"\n\n"+o("block:calculator","Use **=** operation to set another initial value."):"**"+o("block:calculator","Every calculation begins with an initial value.")+"**\n\n"+o("block:calculator","Click the + button to specify that value.")+"\n\n"+o("block:calculator","After that you can add more operations."),height:96}}),Qe={name:e=>`${S(e.description||"")||o("block:calculator","Calculation")} *(${k("block:calculator","%1 operation","%1 operations",e.operations.count)})*`,title:e=>e.description||o("block:calculator","Subcalculation"),editor:(e,t)=>{var i,l,n,s;fe(t,o("block:calculator","Performs a subcalculation. The initial value for this subcalculation is automatically set to the current outcome (**ANS**) of the parent calculation. If you want to begin this subcalculation with another value, then add an equal (**=**) operation to begin with.")),t.collection(Ge(e)),t.form({title:o("block:calculator","Description"),controls:[new L.Text("singleline",L.Text.bind(e,"description",void 0)).autoFocus(0===e.operations.count).on((t=>{e.outcome&&(e.outcome.label=t.value),d.visible(!!(t.value&&e.block instanceof Vt))}))]});const c=new L.Checkbox(o("block:calculator","Set an alias for this subcalculation"),!!(null===(i=e.outcome)||void 0===i?void 0:i.alias)).on((e=>r.visible(e.isChecked))),r=new L.Group([new L.Text("singleline",(null===(l=e.outcome)||void 0===l?void 0:l.alias)||"").placeholder(o("block:calculator","Type alias identifier here...")).indent(32).on((t=>{if(e.outcome){const o=e.outcome.alias;e.outcome.alias=t.isObservable&&t.value||void 0,e.outcome.alias!==o&&e.refresh("name")}})),new L.Static(o("block:calculator","This alias will be used as identifier of the subcalculation in the dataset.")).indent(32)]).visible(!!(null===(n=e.outcome)||void 0===n?void 0:n.alias)),u=new L.Group([new L.Checkbox(o("block:calculator","Make outcome exportable and include it in the dataset"),(null===(s=e.outcome)||void 0===s?void 0:s.exportable)||!1).on((t=>{e.outcome&&(e.outcome.exportable=t.isChecked)})),c]).visible(!!e.outcome),d=t.form({title:o("block:calculator","Exportability"),controls:[new L.Checkbox(o("block:calculator","Make outcome available for other blocks"),!!e.outcome).on((t=>{if(t.isFormVisible&&t.isObservable&&t.isChecked&&e.description&&e.block instanceof Vt){const t=e.calculator.block.slots.dynamic({type:a.Numeric,reference:e.id,label:e.description,exportable:!1});e.calculator.outcome&&(t.decimal=e.calculator.outcome.decimal,t.precision=e.calculator.outcome.precision,t.digits=e.calculator.outcome.digits,t.separator=e.calculator.outcome.separator,t.minimum=e.calculator.outcome.minimum,t.maximum=e.calculator.outcome.maximum,t.prefix=e.calculator.outcome.prefix,t.prefixPlural=e.calculator.outcome.prefixPlural,t.suffix=e.calculator.outcome.suffix,t.suffixPlural=e.calculator.outcome.suffixPlural)}else e.calculator.block.slots.delete(e.id,"dynamic");u.visible(t.isChecked),r.visible(t.isChecked&&c.isChecked),e.refresh("name")})),u,r]}).visible(!!(e.description&&e.block instanceof Vt))}},Fe={name:e=>e.format("value",`*${o("block:calculator","convert")}* (`,`) *${o("block:calculator","to number")}*`),title:()=>o("block:calculator","Convert to number"),editor:(e,t)=>{fe(t,o("block:calculator","Converts a text value to a number."))}},He={name:e=>e.format("value","⌈","⌉"),title:()=>o("block:calculator","Ceil"),editor:(e,t)=>{fe(t,o("block:calculator","Rounds a floating point number up ([learn more](https://en.wikipedia.org/wiki/Floor_and_ceiling_functions)).")),Te(e,t,!0,!0)}},Be={name:e=>e.format("value",`*${o("block:calculator","characters")}* (`,")"),title:()=>o("block:calculator","Character count"),editor:(e,t)=>{fe(t,o("block:calculator","Counts the number of characters in a text."))}},qe={name:e=>{const t=e.format("value","*clamp* (",",",!0),o=e.format("min"," ",",",!0),i=e.format("max"," ",")");return t&&o&&i?t+o+i:""},title:()=>o("block:calculator","Clamp number"),editor:(e,t)=>{fe(t,o("block:calculator","Clamps (restricts) the input between the specified minimum and maximum value ([learn more](https://en.wikipedia.org/wiki/Clamping_%28graphics%29)).")),Te(e,t,!0,!0,!1,"value",!1,!0,o("block:calculator","Input")),Te(e,t,!0,!0,!0,"min",!1,!1,o("block:calculator","Minimum value")),Te(e,t,!0,!0,!0,"max",!1,!1,o("block:calculator","Maximum value"))}},$e={name:e=>e.format("value","*cosh* (",")"),title:()=>o("block:calculator","Hyperbolic cosine"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the hyperbolic cosine of the given hyperbolic angle ([learn more](https://en.wikipedia.org/wiki/Hyperbolic_functions)).")),Te(e,t)}},Xe={name:e=>e.format("value","*cos* (",("radians"===e.angleUnits?"rad":"gradians"===e.angleUnits?"ᵍ":"°")+" )","radians"!==e.angleUnits),title:()=>o("block:calculator","Cosine"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the cosine of the given angle ([learn more](https://en.wikipedia.org/wiki/Trigonometric_functions)). The result is a number between `-1` and `1`."));const[,i]=Te(e,t);ye(e,t,(e=>i.suffix("radians"===e?" rad":"gradians"===e?"ᵍ":"°")))}},Je={name:e=>e.format("value",`*${o("block:calculator","count")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Count")},editor:(e,t)=>{fe(t,o("block:calculator","Counts the number of selected options or given answers. Useful if you want to calculate the average of given answers."))}};function _e(e,t){var c;const r=e[t],u=i(e.value)&&l(e.calculator.block,e.value),d=u&&u.slot instanceof a.Date&&u.slot||void 0;return i(r)?r&&(null===(c=l(e.calculator.block,r))||void 0===c?void 0:c.label)?`@${r}`:"":n(r)?`**${(d?d.supportsTime:"datetime"===e.opcode)?s.locale.dateTimeShort(r,!0):s.locale.dateShort(r,!0)}**`:"`"+o("block:calculator","Now").toUpperCase()+"`"}const Ke={name:e=>{const t=e.format("value",void 0,void 0,void 0,!0,"NOW"),i=_e(e,"cona"),l=_e(e,"conb"),a=e.format("outa",void 0,void 0,void 0,!0),n=e.format("outb",void 0,void 0,void 0,!0);if(!t||!a||!n)return"";const s=`then ${a} else ${n}`;switch(e.compareMode||"equal"){case"defined":return`${t} ${o("block:calculator","not empty")} ${s}`;case"between":return i&&l&&`${i} ≤ ${t} ≤ ${l} ${s}`||"";case"before":case"after":case"equal":return i&&`${t} ${"after"===e.compareMode?">":"before"===e.compareMode?"<":"="} ${i} ${s}`||""}},title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||("datetime"===e.opcode?o("block:calculator","Current date + time"):o("block:calculator","Current date"))},editor:(e,t)=>{const s=i(e.value)&&l(e.calculator.block,e.value),c=s&&s.slot instanceof a.Date&&s.slot||void 0,r=c?c.supportsTime:"datetime"===e.opcode,u=new L.Radiobutton([{label:o("block:calculator","Date is equal to"),value:"equal"},{label:o("block:calculator","Date is before"),value:"before"},{label:o("block:calculator","Date is after"),value:"after"},{label:o("block:calculator","Date is between"),value:"between"},{label:o("block:calculator","Date is not empty"),value:"defined",visible:!!c}],e.compareMode||"equal").on((t=>{switch(e.compareMode=t.value||"equal",b.visible("defined"!==e.compareMode),M.visible("between"===t.value),e.compareMode){case"equal":b.title=o("block:calculator","If date equals");break;case"before":b.title=o("block:calculator","If date is before");break;case"after":b.title=o("block:calculator","If date is after");break;case"between":b.title=o("block:calculator","If date is between")}}));fe(t,o("block:calculator","Compares a date and outputs a value based on the result of the comparison.")),t.form({title:o("block:calculator","Compare mode"),controls:[u]});const d=(l,c,u)=>{const d=e[l],b=new L.DateTime(n(d)?d:void 0).zone("UTC").years((new Date).getFullYear()-150,(new Date).getFullYear()+50).label(o("block:calculator",r?"Use fixed date/time":"Use fixed date")).features(1|(r?8:32)).required().on((t=>{t.isFormVisible&&t.isObservable&&(e[l]=t.value)})),M=Ce(e,t,l,"inline",!1,(t=>t instanceof a.Date&&t.id!==e.value));return t.form({title:c,controls:[new L.Radiobutton([{label:o("block:calculator","Current date"),value:"current",visible:!!s},{label:o("block:calculator",r?"Fixed date/time":"Fixed date"),value:"date"},{label:o("block:calculator","Value"),value:"variable",disabled:0===M[1]}],i(d)?"variable":n(d)?"date":"current").on((t=>{b.visible("date"===t.value),M[0].visible("variable"===t.value),"current"===t.value&&(e[l]=void 0)})),b,M[0]]}).visible(u)},b=d("cona",o("block:calculator","If date equals"),"defined"!==e.compareMode),M=d("conb",o("block:calculator","And"),"between"===e.compareMode);Te(e,t,!0,!0,!0,"outa",!1,!1,o("block:calculator","Then output")),Te(e,t,!0,!0,!0,"outb",!1,!1,o("block:calculator","Else output"))}},et={name:e=>e.format("value",`*${o("block:calculator","day of month")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Day of month")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves the day of month of the date."))}},tt={name:e=>e.format("value",`*${o("block:calculator","day of week")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Day of week")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves the day of the week (where 0 represents Sunday) of the date."))}},ot={name:e=>{const t=e.format("value",void 0,void 0,void 0,!0),i=e.format("cona",void 0,void 0,void 0,!0),l=e.format("conb",void 0,void 0,void 0,!0),a=e.format("outa",void 0,void 0,void 0,!0),n=e.format("outb",void 0,void 0,void 0,!0);if(!t||!a||!n)return"";const s=`then ${a} else ${n}`;switch(e.compareMode||"equal"){case"defined":return`${t} ${o("block:calculator","not empty")} ${s}`;case"between":return i&&l&&`${i} ≤ ${t} ≤ ${l} ${s}`||"";case"above":case"below":case"equal":return i&&`${t} ${"above"===e.compareMode?">":"below"===e.compareMode?"<":"="} ${i} ${s}`||""}},title:()=>o("block:calculator","Compare"),editor:(e,t)=>{const l=new L.Radiobutton([{label:o("block:calculator","Input is equal to"),value:"equal"},{label:o("block:calculator","Input is lower than"),value:"below"},{label:o("block:calculator","Input is higher than"),value:"above"},{label:o("block:calculator","Input is between"),value:"between"},{label:o("block:calculator","Input is not empty"),value:"defined",visible:(n=e.value,i(n)&&!he(n))}],e.compareMode||"equal").on((t=>{switch(e.compareMode=t.value||"equal",s.visible("defined"!==e.compareMode),r.visible("between"===t.value),e.compareMode){case"equal":s.title=o("block:calculator","If input equals");break;case"below":s.title=o("block:calculator","If input is lower than");break;case"above":s.title=o("block:calculator","If input is higher than");break;case"between":s.title=o("block:calculator","If input is between")}}));var n;fe(t,o("block:calculator","Compares the supplied input and outputs a value based on the result of the comparison.")),Te(e,t,!0,!1,!1,"value",!1,!0,o("block:calculator","Input"),((e,t)=>{if(l.buttonVisible("defined","variable"===e),c&&u){const e=e=>{e.precision((null==t?void 0:t.slot)instanceof a.Numeric?t.slot.precision||0:"auto"),e.digits((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.digits||0),e.decimalSign((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.decimal||""),e.thousands(!!((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.separator),(null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.separator||""),e.min((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.minimum||void 0),e.max((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.maximum||void 0),e.prefix((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.prefix||""),e.prefixPlural((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.prefixPlural||void 0),e.suffix((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.suffix||""),e.suffixPlural((null==t?void 0:t.slot)instanceof a.Numeric&&t.slot.suffixPlural||void 0)};e(c),e(u)}})),t.form({title:o("block:calculator","Compare mode"),controls:[l]});const[s,c]=Te(e,t,!0,!0,!0,"cona",!1,!1,o("block:calculator","If input equals")),[r,u]=Te(e,t,!0,!0,!0,"conb",!1,!1,o("block:calculator","And"));s.visible("defined"!==e.compareMode),r.visible("between"===e.compareMode),Te(e,t,!0,!0,!0,"outa",!1,!1,o("block:calculator","Then output")),Te(e,t,!0,!0,!0,"outb",!1,!1,o("block:calculator","Else output"))}},it={name:e=>{const t=e.format("value",void 0,void 0,void 0,!0),i=e.format("outa",void 0,void 0,void 0,!0),l=e.format("outb",void 0,void 0,void 0,!0);if(!t||!i||!l)return"";const a=`then ${i} else ${l}`,n=y(e.cona)?`**${S(f.replace(f.replace(e.cona,"\n","↵")," ","⎵"))}**`:"*\\_\\_*";switch(e.compareMode||"equal"){case"defined":return`${t} ${o("block:calculator","not empty")} ${a}`;case"equal":return`${t} = ${n} ${a}`;case"contains":return`${t} ${o("block:calculator","contains")} ${n} ${a}`;case"starts":return`${t} ${o("block:calculator","starts with")} ${n} ${a}`;case"ends":return`${t} ${o("block:calculator","ends with")} ${n} ${a}`}},title:e=>{var t;return i(e.value)&&(null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label)||o("block:calculator","Text")},editor:(e,t)=>{fe(t,o("block:calculator","Compares a text and outputs a value based on the result of the comparison."));const l=new L.Group([new L.Text("multiline",i(e.cona)&&e.cona||"").on((t=>{e.cona=t.isObservable&&t.value||void 0})).sanitize(!1).action("@",T(e.calculator.block)).autoFocus(),new L.Checkbox(o("block:calculator","Ignore case"),L.Checkbox.bind(e,"ignoreCase",void 0,!0))]).visible("defined"!==e.compareMode);t.form({title:o("block:calculator","If text"),controls:[new L.Radiobutton([{label:o("block:calculator","Matches"),value:"equal"},{label:o("block:calculator","Contains"),value:"contains"},{label:o("block:calculator","Starts with"),value:"starts"},{label:o("block:calculator","Ends with"),value:"ends"},{label:o("block:calculator","Is not empty"),value:"defined"}],e.compareMode||"equal").on((t=>{e.compareMode=t.value||"equal",l.visible("defined"!==e.compareMode)})),l]}),Te(e,t,!0,!0,!0,"outa",!1,!1,o("block:calculator","Then output")),Te(e,t,!0,!0,!0,"outb",!1,!1,o("block:calculator","Else output"))}},lt={name:e=>e.format("exponent","*exp* (",")"),title:()=>o("block:calculator","Exponent"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates `e` to the power of the given exponent ([learn more](https://en.wikipedia.org/wiki/Exponential_function)).")),Te(e,t,!0,!0,!0,"exponent",!0,!0,o("block:calculator","Exponent"))}},at={name:e=>e.format("value",void 0,"!",!0),title:()=>"n!",editor:(e,t)=>{fe(t,o("block:calculator","Calculates the factorial of a positive number ([learn more](https://en.wikipedia.org/wiki/Factorial)).")),Te(e,t,!0,!0)}},nt={name:e=>e.format("value","⌊","⌋"),title:()=>o("block:calculator","Floor"),editor:(e,t)=>{fe(t,o("block:calculator","Rounds a floating point number down ([learn more](https://en.wikipedia.org/wiki/Floor_and_ceiling_functions)).")),Te(e,t,!0,!0)}},st={name:e=>e.format("value","*gamma* (",")"),title:()=>o("block:calculator","Gamma"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the gamma of a positive number ([learn more](https://en.wikipedia.org/wiki/Gamma_function)).")),Te(e,t,!0,!0)}},ct={name:e=>e.format("value",`*${o("block:calculator","hour")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Hour")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves a number between 0 and 23, representing the hours of the date/time."))}},rt={name:e=>e.format("value",`*${o("block:calculator","lines")}* (`,")"),title:()=>o("block:calculator","Line count"),editor:(e,t)=>{fe(t,o("block:calculator","Counts the number of lines in a text."))}},ut={name:e=>e.format("value","*ln* (",")"),title:()=>o("block:calculator","Natural logarithm"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the natural logarithm of the input ([learn more](https://en.wikipedia.org/wiki/Natural_logarithm)).")),Te(e,t,!0,!0)}},dt={name:e=>e.format("value","*log* (",")"),title:()=>o("block:calculator","Logarithm"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the base 10 logarithm of the input ([learn more](https://en.wikipedia.org/wiki/Logarithm)).")),Te(e,t,!0,!0)}},bt={name:e=>{const t=e.format("value","*max* (",",",!0),o=e.format("max"," ",")");return t&&o?t+o:""},title:()=>o("block:calculator","Find highest number"),editor:(e,t)=>{fe(t,o("block:calculator","Returns the input with the highest number.")),Te(e,t,!0,!0,!0,"value",!1,!0,o("block:calculator","Input 1")),Te(e,t,!0,!0,!0,"max",!1,!1,o("block:calculator","Input 2"))}},Mt={name:e=>e.format("value",`*${o("block:calculator","millisecond")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Millisecond")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves a number between 0 and 999, representing the milliseconds of the date/time."))}},ht={name:e=>{const t=e.format("value","*min* (",",",!0),o=e.format("min"," ",")");return t&&o?t+o:""},title:()=>o("block:calculator","Find lowest number"),editor:(e,t)=>{fe(t,o("block:calculator","Returns the input with the lowest number.")),Te(e,t,!0,!0,!0,"value",!1,!0,o("block:calculator","Input 1")),Te(e,t,!0,!0,!0,"min",!1,!1,o("block:calculator","Input 2"))}},gt={name:e=>e.format("value",`*${o("block:calculator","minute")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Minute")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves a number between 0 and 59, representing the minutes of the date/time."))}},mt={name:e=>{const t=e.format("value","","mod "),o=e.format("divisor");return t&&o?t+o:""},title:()=>o("block:calculator","Modulus"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the remainder of a division ([learn more](https://en.wikipedia.org/wiki/Modulo_operation)).")),Te(e,t,!0,!0,!0,"value",!1,!0,o("block:calculator","Input (dividend)")),Te(e,t,!0,!0,!0,"divisor",!1,!1,o("block:calculator","Divisor"))}},pt={name:e=>e.format("value",`*${o("block:calculator","month")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Month")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves the month (where 1 indicates the first month of the year) of the date."))}},vt={name:e=>e.format("value"),title:e=>{var t;return(i(e.value)?he(e.value)?o("block:calculator","Constant"):null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Number")},editor:(e,t)=>{fe(t,o("block:calculator","Supplies a number to the calulator.")),Te(e,t,(e.isSubCalculation||!e.calculator.startBlank||!e.isFirst)&&("="!==e.operator||e.isFirst),!0)}},Nt={name:e=>`${o("block:calculator","Count")} ${"regex"===e.compareMode?y(e.cona)&&f.sanitize(e.cona)?`\`${S(e.cona)}\``:"`\\_\\_`":y(e.cona)?`**${S(f.replace(f.replace(e.cona,"\n","↵")," ","⎵"))}**`:"*\\_\\_*"} ${o("block:calculator","in")} ${e.format("value",void 0,void 0,void 0,!0)}`,title:()=>o("block:calculator","Count occurrences"),editor:(e,t)=>{fe(t,o("block:calculator","Counts the number of occurrences of a certain text or character."));const l=new L.Group([new L.Text("multiline","regex"!==e.compareMode&&i(e.cona)&&e.cona||"").on((t=>{t.isObservable&&(e.cona=t.value||void 0)})).sanitize(!1).action("@",T(e.calculator.block)).autoFocus(),new L.Checkbox(o("block:calculator","Ignore case"),L.Checkbox.bind(e,"ignoreCase",void 0,!0))]).visible("regex"!==e.compareMode),a=new L.Group([new L.Text("singleline","regex"===e.compareMode&&i(e.cona)&&e.cona||"").placeholder(o("block:calculator","Regex literal (for example /ab+c/)")).on((t=>{t.isObservable&&(e.cona=t.value||void 0)})).autoValidate((e=>{if(!e.value)return"unknown";try{const t=e.value.indexOf("/"),o=e.value.lastIndexOf("/");return 0===t&&o>t&&((e,t)=>{try{return new RegExp(e.substring(1,t),e.substr(t+1))instanceof RegExp}catch(e){return!1}})(e.value,o)?"pass":"fail"}catch(e){return"fail"}}))]).visible("regex"===e.compareMode);t.form({title:o("block:calculator","Count"),controls:[new L.Radiobutton([{label:o("block:calculator","Text"),value:"contains"},{label:o("block:calculator","Regular expression"),value:"regex"}],e.compareMode||"contains").on((t=>{e.compareMode=t.value||"contains",l.visible("regex"!==e.compareMode),a.visible("regex"===e.compareMode)})),l,a]})}},wt={name:e=>{const t=e.format("percentage","","% ",!0),i=e.format("value",o("block:calculator","of"));return t&&i?t+i:""},title:()=>o("block:calculator","Percentage")+" (%)",editor:(e,t)=>{fe(t,o("block:calculator","Calculates a percentage of the input ([learn more](https://en.wikipedia.org/wiki/Percentage)).")),Te(e,t,!0,!0,!0,"value",!1,!0,o("block:calculator","Input")),Te(e,t,!0,!1,!0,"percentage",!1,!1,o("block:calculator","Percentage"))}},At={name:e=>{const t=e.format("value","","^ "),o=e.format("exponent");return t&&o?t+o:""},title:()=>o("block:calculator","Power"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the base to the power of the given exponent ([learn more](https://en.wikipedia.org/wiki/Exponentiation)).")),Te(e,t,!0,!0,!0,"value",!1,!0,o("block:calculator","Base")),Te(e,t,!0,!0,!0,"exponent",!1,!1,o("block:calculator","Exponent"))}},It={name:e=>e.format("value","*round* (",")"),title:()=>o("block:calculator","Round"),editor:(e,t)=>{fe(t,o("block:calculator","Rounds a floating point number ([learn more](https://en.wikipedia.org/wiki/Rounding)).")),Te(e,t,!0,!0)}},Dt={name:e=>e.format("value",`*${o("block:calculator","score")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Score")},editor:(t,s)=>{var c;const r=i(t.value)&&l(t.calculator.block,t.value);if(fe(s,o("block:calculator","Calculates a score based on the score list below.")),r&&r.block instanceof C){const i=r.slot||r.pipe;if(i){const l=[],u=(e,o,i,a)=>{if(i=i||"",e&&(o||i)){const s=t.scores&&t.scores[e];l.push(new L.Numeric(n(s)?s:a).precision("auto").thousands(!1).markdown({features:x.MarkdownFeatures.Formatting}).label(o&&i?`**${o}** *${i}*`:o||i).on((t=>d(e,t.value))))}},d=(e,o)=>{t.scores||(t.scores={}),t.scores[e]!==o&&(P(t.scores,e,o),t.calculator.block.detectChange())},b=e.find(r);if(b)b.collection.each((e=>u(e.id,e.labelWithoutMarkdown,S(e.getAliasOfItem()),e.getScoreOfItem())));else{const e=z(r.block,"calculator");e&&E(null===(c=e[i.reference]||e["*"])||void 0===c?void 0:c.scores,(e=>u(U(e.reference),e.label||(i instanceof a.Boolean?!0===e.reference?i.labelForTrue||o("block:calculator","True"):!1===e.reference?i.labelForFalse||o("block:calculator","False"):"":void 0),e.alias,e.score)))}l.length&&(l[0].autoFocus(),l[l.length-1].enter(s.close),l[l.length-1].escape(s.close)),s.form({title:o("block:calculator","Scores"),controls:l.length?l:[new L.Notification(o("block:calculator","There are no scorable items found for this block. Make sure to add items to the block first and then return here to set their scores."),"info")]})}}}},Lt={name:e=>e.format("value",`*${o("block:calculator","second")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Second")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves a number between 0 and 59, representing the seconds of the date/time."))}},jt={name:e=>e.format("value","*sgn* (",")"),title:()=>o("block:calculator","Sign"),editor:(e,t)=>{fe(t,o("block:calculator","Extracts the sign of a number ([learn more](https://en.wikipedia.org/wiki/Sign_function)). For positive numbers this function returns `1` and for negative numbers `-1`. When the input is zero the function returns `0`.")),Te(e,t)}},St={name:e=>e.format("value","*sinh* (",")"),title:()=>o("block:calculator","Hyperbolic sine"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the hyperbolic sine of the given hyperbolic angle ([learn more](https://en.wikipedia.org/wiki/Hyperbolic_functions)).")),Te(e,t)}},xt={name:e=>e.format("value","*sin* (",("radians"===e.angleUnits?"rad":"gradians"===e.angleUnits?"ᵍ":"°")+" )","radians"!==e.angleUnits),title:()=>o("block:calculator","Sine"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the sine of the given angle ([learn more](https://en.wikipedia.org/wiki/Trigonometric_functions)). The result is a number between `-1` and `1`."));const[,i]=Te(e,t);ye(e,t,(e=>i.suffix("radians"===e?" rad":"gradians"===e?"ᵍ":"°")))}},kt={name:e=>e.format("value","√"),title:()=>"√",editor:(e,t)=>{fe(t,o("block:calculator","Finds the principal square root for the given input ([learn more](https://en.wikipedia.org/wiki/Square_root)).")),Te(e,t,!0,!0)}},yt={name:e=>e.format("value",void 0,"²",!0),title:()=>"x²",editor:(e,t)=>{fe(t,o("block:calculator","Multiplies the given input by itself ([learn more](https://en.wikipedia.org/wiki/Square_%28algebra%29)).")),Te(e,t,!0,!0)}},ft={name:e=>e.format("value","∑"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Sum")},editor:(e,t)=>{fe(t,o("block:calculator","Adds up the values of all given answers."))}},Tt={name:e=>e.format("value","*tanh* (",")"),title:()=>o("block:calculator","Hyperbolic tangent"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the hyperbolic tangent of the given hyperbolic angle ([learn more](https://en.wikipedia.org/wiki/Hyperbolic_functions)).")),Te(e,t)}},Ct={name:e=>e.format("value","*tan* (",("radians"===e.angleUnits?"rad":"gradians"===e.angleUnits?"ᵍ":"°")+" )","radians"!==e.angleUnits),title:()=>o("block:calculator","Tangent"),editor:(e,t)=>{fe(t,o("block:calculator","Calculates the tangent of the given angle ([learn more](https://en.wikipedia.org/wiki/Trigonometric_functions))."));const[,i]=Te(e,t);ye(e,t,(e=>i.suffix("radians"===e?" rad":"gradians"===e?"ᵍ":"°")))}},zt={name:e=>e.format("value","*trunc* (",")"),title:()=>o("block:calculator","Trunc"),editor:(e,t)=>{fe(t,o("block:calculator","Removes decimals from a floating point number.")),Te(e,t,!0,!0)}},Et={name:e=>e.format("value",`*${o("block:calculator","words")}* (`,")"),title:()=>o("block:calculator","Word count"),editor:(e,t)=>{fe(t,o("block:calculator","Counts the number of words in a text."))}},Ut={name:e=>e.format("value",`*${o("block:calculator","year")}* (`,")"),title:e=>{var t;return(i(e.value)?null===(t=l(e.calculator.block,e.value))||void 0===t?void 0:t.label:"")||o("block:calculator","Year")},editor:(e,t)=>{fe(t,o("block:calculator","Retrieves the year of the date."))}};var Ot="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTcuNSAxMGgtNkMuNjczIDEwIDAgOS4zMjcgMCA4LjV2LTZDMCAxLjY3My42NzMgMSAxLjUgMWg2QzguMzI3IDEgOSAxLjY3MyA5IDIuNXY2YzAgLjgyNy0uNjczIDEuNS0xLjUgMS41em0tNi04YS41LjUgMCAwIDAtLjUuNXY2YS41LjUgMCAwIDAgLjUuNWg2YS41LjUgMCAwIDAgLjUtLjV2LTZhLjUuNSAwIDAgMC0uNS0uNWgtNnptNiAxOGgtNkMuNjczIDIwIDAgMTkuMzI3IDAgMTguNXYtNmMwLS44MjcuNjczLTEuNSAxLjUtMS41aDZjLjgyNyAwIDEuNS42NzMgMS41IDEuNXY2YzAgLjgyNy0uNjczIDEuNS0xLjUgMS41em0tNi04YS41LjUgMCAwIDAtLjUuNXY2YS41LjUgMCAwIDAgLjUuNWg2YS41LjUgMCAwIDAgLjUtLjV2LTZhLjUuNSAwIDAgMC0uNS0uNWgtNnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTYuNSA2aC00YS41LjUgMCAwIDEgMC0xaDRhLjUuNSAwIDAgMSAwIDF6bTAgOUg1di0xLjVhLjUuNSAwIDAgMC0xIDBWMTVIMi41YS41LjUgMCAwIDAgMCAxSDR2MS41YS41LjUgMCAwIDAgMSAwVjE2aDEuNWEuNS41IDAgMCAwIDAtMXptMTEgNWgtNmMtLjgyNyAwLTEuNS0uNjczLTEuNS0xLjV2LTE2YzAtLjgyNy42NzMtMS41IDEuNS0xLjVoNmMuODI3IDAgMS41LjY3MyAxLjUgMS41djE2YzAgLjgyNy0uNjczIDEuNS0xLjUgMS41em0tNi0xOGEuNS41IDAgMCAwLS41LjV2MTZhLjUuNSAwIDAgMCAuNS41aDZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtNnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE2LjUgMTBoLTRhLjUuNSAwIDAgMSAwLTFoNGEuNS41IDAgMCAxIDAgMXptMCAyaC00YS41LjUgMCAwIDEgMC0xaDRhLjUuNSAwIDAgMSAwIDF6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";class Yt extends e.Item{constructor(){super(...arguments),this.startBlank=!1,this.operator="=",this.opcode="number",this.operations=e.of(Yt,this)}get calculator(){return this.ref}get block(){return this.calculator.block}get outcome(){return"calc"===this.opcode&&this.calculator.block.slots.select(this.id,"dynamic")||void 0}get icon(){if(this.calculator.startBlank&&this.isFirst&&!this.isSubCalculation)return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIgLjVDMS4xNzMuNS41IDEuMTczLjUgMnYxNmMwIC44MjcuNjczIDEuNSAxLjUgMS41aDE2Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41VjJjMC0uODI3LS42NzMtMS41LTEuNS0xLjVIMnptOS43NSA2Yy4xMjggMCAuMjU2LjA0OS4zNTQuMTQ2bDMgM2EuNS41IDAgMCAxIDAgLjcwOGwtMyAzYS41LjUgMCAwIDEtLjcwOC0uNzA4bDIuMTQ3LTIuMTQ2SDUuMjVhLjUuNSAwIDAgMSAwLTFoOC4yOTNsLTIuMTQ3LTIuMTQ1YS41MDIuNTAyIDAgMCAxIC4zNTQtLjg1NXoiIGZpbGw9IiNBOEM2REYiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";switch(this.operator){case"+":return pe;case"-":return ve;case"*":return Ne;case"/":return we;default:return me}}get name(){var e;const t=(null===(e=Yt.get(this.opcode))||void 0===e?void 0:e.name(this))||"";return this.isFirst||"/"!==this.operator||"0"!==t?t:t+" *(division by zero error)*"}get title(){var e;return(null===(e=Yt.get(this.opcode))||void 0===e?void 0:e.title(this))||""}get width(){switch(this.opcode){case"calc":return 520;case"date":case"datetime":case"age":return 475}return 400}get menu(){return[new t.MenuSubmenuWithImage(Ot,o("block:calculator","Operator"),(e=this,[new t.MenuItemWithImage(pe,o("block:calculator","Add"),(()=>e.operator="+"),"+"===e.operator),new t.MenuItemWithImage(ve,o("block:calculator","Subtract"),(()=>e.operator="-"),"-"===e.operator),new t.MenuItemWithImage(Ne,o("block:calculator","Multiply"),(()=>e.operator="*"),"*"===e.operator),new t.MenuItemWithImage(we,o("block:calculator","Divide"),(()=>e.operator="/"),"/"===e.operator),new t.MenuSeparator,new t.MenuItemWithImage(me,o("block:calculator","Equal"),(()=>e.operator="="),"="===e.operator)]),this.calculator.startBlank&&this.isFirst)];var e}get isSubCalculation(){var e;return(null===(e=this.calculator.operations.itemAtIndex(this.index))||void 0===e?void 0:e.id)!==this.id}get allowANS(){return this.isSubCalculation||!this.calculator.startBlank||!this.isFirst}static get(e){switch(e){case"abs":return ze;case"acos":return Ue;case"acosh":return Ee;case"age":return Ye;case"asin":return Ze;case"asinh":return Pe;case"atan":return Re;case"atanh":return Ve;case"boolean":return We;case"calc":return Qe;case"cast":return Fe;case"ceil":return He;case"chars":return Be;case"clamp":return qe;case"cos":return Xe;case"cosh":return $e;case"count":return Je;case"date":case"datetime":return Ke;case"day-of-month":return et;case"day-of-week":return tt;case"equation":return ot;case"evaluate":return it;case"exp":return lt;case"fact":return at;case"floor":return nt;case"gamma":return st;case"hour":return ct;case"lines":return rt;case"ln":return ut;case"log":return dt;case"max":return bt;case"millisecond":return Mt;case"min":return ht;case"minute":return gt;case"mod":return mt;case"month":return pt;case"number":return vt;case"occurrences":return Nt;case"percentage":return wt;case"pow":return At;case"round":return It;case"score":return Dt;case"second":return Lt;case"sgn":return jt;case"sin":return xt;case"sinh":return St;case"sqrt":return kt;case"square":return yt;case"sum":return ft;case"tan":return Ct;case"tanh":return Tt;case"trunc":return zt;case"year":return Ut;case"words":return Et}}set(e){var t;if(this.operator=e.operator,this.opcode=e.opcode,this.value=e.value,this.cona=e.cona,this.conb=e.conb,this.outa=e.outa,this.outb=e.outb,this.min=e.min,this.max=e.max,this.exponent=e.exponent,this.divisor=e.divisor,this.percentage=e.percentage,this.ageAbs=e.ageAbs,this.calculator.preselect&&this.isFirst&&"number"===this.opcode&&i(this.value)){const e=null===(t=l(this.calculator.block,this.value))||void 0===t?void 0:t.slot;e instanceof a.Numeric&&this.calculator.preselect(e)}return e.open&&this.open(),this}format(e,t,a,c,r=!1,u){var d;const b=this[e];let M="";if(t&&(t+=" "),a&&(!c||i(b)||!n(b)&&this.allowANS)&&(a=" "+a),i(b))if(he(b))M="`"+(b.length>1?b.toUpperCase():b)+"`";else{if(!(null===(d=l(this.calculator.block,b))||void 0===d?void 0:d.label))return"";M="@"+b}else M=n(b)||!u&&!this.allowANS?(r?"**":"")+s.locale.number(n(b)?b:0,"auto",!1)+(r?"**":""):this.isFirst&&this.isSubCalculation?"`ANS` "+o("block:calculator","of parent calculation"):this.isFirst&&!u&&this.calculator.firstANS?this.calculator.firstANS:"`"+(u||"ANS")+"`";return(t||"")+M+(a||"")}defineEditor(){var e;null===(e=Yt.get(this.opcode))||void 0===e||e.editor(this,this.editor)}initOperation(){var e;"calc"===this.opcode&&(null===(e=this.calculator.outcome)||void 0===e||e.hook("OnSlotProperty","synchronous",(e=>{switch(e.property){case"decimal":case"precision":case"separator":case"minimum":case"maximum":case"prefix":case"prefixPlural":case"suffix":case"suffixPlural":c(this.outcome,e.property,e.slot[e.property])}}),this))}deleteOperation(){var e;"calc"===this.opcode&&(null===(e=this.calculator.outcome)||void 0===e||e.unhookContext(this),this.calculator.block.slots.delete(this.id,"dynamic"),this.operations.each((e=>e.deleteOperation())))}}be([r],Yt.prototype,"icon",null),be([u],Yt.prototype,"name",null),be([d],Yt.prototype,"title",null),be([b],Yt.prototype,"width",null),be([M],Yt.prototype,"menu",null),be([h,g("#icon"),g("#name")],Yt.prototype,"operator",void 0),be([h,g("#name")],Yt.prototype,"opcode",void 0),be([h,g("#name")],Yt.prototype,"operations",void 0),be([h,g("#name")],Yt.prototype,"description",void 0),be([h],Yt.prototype,"reference",void 0),be([h,g("#name")],Yt.prototype,"value",void 0),be([h,g("#name")],Yt.prototype,"exponent",void 0),be([h,g("#name")],Yt.prototype,"cona",void 0),be([h,g("#name")],Yt.prototype,"conb",void 0),be([h,g("#name")],Yt.prototype,"outa",void 0),be([h,g("#name")],Yt.prototype,"outb",void 0),be([h,g("#name")],Yt.prototype,"compareMode",void 0),be([h,g("#name")],Yt.prototype,"angleUnits",void 0),be([h,g("#name")],Yt.prototype,"ageIn",void 0),be([h],Yt.prototype,"ageAbs",void 0),be([h],Yt.prototype,"ignoreCase",void 0),be([h],Yt.prototype,"scores",void 0),be([h,g("#name")],Yt.prototype,"min",void 0),be([h,g("#name")],Yt.prototype,"max",void 0),be([h,g("#name")],Yt.prototype,"divisor",void 0),be([h,g("#name")],Yt.prototype,"percentage",void 0),be([m],Yt.prototype,"defineEditor",null),be([p],Yt.prototype,"initOperation",null),be([v],Yt.prototype,"deleteOperation",null);let Pt=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:calculator","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:calculator","calculated")}`;case"undefined":return`@${e.id} ${o("block:calculator","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:calculator","Compare mode"),controls:[new L.Radiobutton([{label:o("block:calculator","Calculation is equal to"),value:"equal"},{label:o("block:calculator","Calculation is not equal to"),value:"not-equal"},{label:o("block:calculator","Calculation is lower than"),value:"below"},{label:o("block:calculator","Calculation is higher than"),value:"above"},{label:o("block:calculator","Calculation is between"),value:"between"},{label:o("block:calculator","Calculation is not between"),value:"not-between"},{label:o("block:calculator","Calculation is valid"),value:"defined"},{label:o("block:calculator","Calculation is not valid"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:calculator","If calculation equals");break;case"not-equal":t.title=o("block:calculator","If calculation not equals");break;case"below":t.title=o("block:calculator","If calculation is lower than");break;case"above":t.title=o("block:calculator","If calculation is higher than");break;case"between":t.title=o("block:calculator","If calculation is between");break;case"not-between":t.title=o("block:calculator","If calculation is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:calculator","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).min(null==r?void 0:r.minimum).max(null==r?void 0:r.maximum).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:calculator","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:calculator","Number"),value:"number"},{label:o("block:calculator","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:calculator","If calculation equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:calculator","And"),"between"===this.mode||"not-between"===this.mode)}};var Zt;be([h,g("#name")],Pt.prototype,"mode",void 0),be([h,g("#name")],Pt.prototype,"value",void 0),be([h,g("#name")],Pt.prototype,"to",void 0),be([m],Pt.prototype,"defineEditor",null),Pt=be([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-calculator",identifier:"@tripetto/block-calculator",version:"4.0.6",icon:Ot,get label(){return o("block:calculator","Verify calculation")}})],Pt);let Vt=Zt=class extends C{constructor(){super(...arguments),this.allowMarkdown=!1,this.startBlank=!0,this.operations=e.of(Yt,this)}get block(){return this}get label(){return k("block:calculator","%2 (%1 operation)","%2 (%1 operations)",this.operations.count,this.type.label)}defineName(){var e;if(!this.node.name&&!this.operations.count){let t=0,o=1;null===(e=this.map)||void 0===e||e.forEach((e=>{if("@tripetto/block-calculator"===e.blockTypeIdentifier&&(t++,e.name&&0===e.name.indexOf(Zt.label+" "))){const t=O(e.name.substr(Zt.label.length+1));t>o&&(o=t+1)}}),"nodes"),this.node.name=Zt.label+` ${Y.max(o,t)}`}this.outcome.hook("OnSlotProperty","synchronous",(e=>{switch(e.property){case"precision":case"digits":case"decimal":case"separator":case"minimum":case"maximum":case"prefix":case"prefixPlural":case"suffix":case"suffixPlural":this.slots.each((t=>{t instanceof a.Numeric&&"dynamic"===t.kind&&P(t,e.property,this.outcome[e.property])}))}}),this)}defineSlot(){this.outcome=this.slots.static({type:a.Numeric,reference:"calculator",label:this.node.name||o("block:calculator","Calculation"),exchange:["alias","exportable","precision","digits","decimal","separator","minimum","maximum","prefix","prefixPlural","suffix","suffixPlural"]})}defineEditor(){const e=new L.Numeric(L.Numeric.bind(this.outcome,"minimum",void 0)).precision(this.outcome.precision||0).digits(this.outcome.digits||0).decimalSign(this.outcome.decimal||"").thousands(!!this.outcome.separator,this.outcome.separator||"").prefix(this.outcome.prefix||"").prefixPlural(this.outcome.prefixPlural||void 0).suffix(this.outcome.suffix||"").suffixPlural(this.outcome.suffixPlural||void 0).label(o("block:calculator","Minimum")),t=new L.Numeric(L.Numeric.bind(this.outcome,"maximum",void 0)).precision(this.outcome.precision||0).digits(this.outcome.digits||0).decimalSign(this.outcome.decimal||"").thousands(!!this.outcome.separator,this.outcome.separator||"").prefix(this.outcome.prefix||"").prefixPlural(this.outcome.prefixPlural||void 0).suffix(this.outcome.suffix||"").suffixPlural(this.outcome.suffixPlural||void 0).label(o("block:calculator","Maximum")),l=this.editor.form({controls:[new L.Notification(o("block:calculator","Some formatting options were automatically set for you, based on the block you've just selected as initial value."),"success")]}).visible(!1),a=Z("block:calculator");this.editor.form({title:o("block:calculator","Explanation"),controls:[new L.Static(o("block:calculator","Perform a calculation and use the result in your form%1.",a?` ([${o("block:calculator","learn more")}](${a}))`:"")).markdown()]}),this.editor.option({name:o("block:calculator","Operations"),collection:Ge(this),activated:!0,locked:!0}),this.editor.name(!1,!1,o("block:calculator","Description"),!1),this.editor.groups.settings();const n=new L.Dropdown([{optGroup:o("block:calculator","Decimals")},{label:"#",value:0},{label:"#.#",value:1},{label:"#.##",value:2},{label:"#.###",value:3},{label:"#.####",value:4},{label:"#.#####",value:5},{label:"#.######",value:6},{label:"#.#######",value:7},{label:"#.########",value:8},{optGroup:o("block:calculator","Digits")},{label:"##",value:-2},{label:"###",value:-3},{label:"####",value:-4},{label:"#####",value:-5},{label:"######",value:-6},{label:"#######",value:-7},{label:"########",value:-8},{label:"#########",value:-9},{label:"##########",value:-10},{label:"###########",value:-11},{label:"############",value:-12},{label:"#############",value:-13},{label:"##############",value:-14},{label:"###############",value:-15},{label:"################",value:-16}],(this.outcome.digits?-this.outcome.digits:this.outcome.precision)||0).on((()=>{this.outcome.precision=n.isFeatureEnabled&&V(n.value)&&n.value>=0?n.value:void 0,this.outcome.digits=n.isFeatureEnabled&&V(n.value)&&n.value<0?-n.value:void 0,e.precision(this.outcome.precision||0),t.precision(this.outcome.precision||0),e.digits(this.outcome.digits||0),t.digits(this.outcome.digits||0),c.disabled(!this.outcome.precision),v.disabled((this.outcome.digits||0)>0)})),s=this.editor.option({name:o("block:calculator","Format"),form:{title:o("block:calculator","Format"),controls:[n]},activated:V(this.outcome.precision)||V(this.outcome.digits)}),c=new L.Dropdown([{label:"#.#",value:"."},{label:"#,#",value:","}],L.Dropdown.bind(this.outcome,"decimal",void 0)).label(o("block:calculator","Decimal sign")).disabled(!this.outcome.precision).on((o=>{e.decimalSign(o.isFeatureEnabled&&o.value||""),t.decimalSign(o.isFeatureEnabled&&o.value||"")})),r=new L.Dropdown([{label:o("block:calculator","None"),value:void 0},{label:"#,###",value:","},{label:"#.###",value:"."}],L.Dropdown.bind(this.outcome,"separator",void 0)).label(o("block:calculator","Thousands separator")).on((o=>{e.thousands(!(!o.isFeatureEnabled||!o.value),o.isFeatureEnabled&&o.value||""),t.thousands(!(!o.isFeatureEnabled||!o.value),o.isFeatureEnabled&&o.value||"")}));this.editor.option({name:o("block:calculator","Limits"),form:{title:o("block:calculator","Limits"),controls:[e,t]},activated:V(this.outcome.minimum)||V(this.outcome.maximum)});const u=new L.Text("singleline",L.Text.bind(this.outcome,"prefix",void 0)).sanitize(!1).on((o=>{e.prefix(o.isFeatureEnabled&&o.value||""),t.prefix(o.isFeatureEnabled&&o.value||"")})),d=new L.Text("singleline",L.Text.bind(this.outcome,"prefixPlural",void 0)).indent(32).sanitize(!1).on((o=>{e.prefixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0),t.prefixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0)})).placeholder(o("block:calculator","Prefix when value is plural")).visible(i(this.outcome.prefixPlural)),b=new L.Checkbox(o("block:calculator","Specify different prefix for plural values"),i(this.outcome.prefixPlural)).on((e=>{u.placeholder(e.isChecked&&o("block:calculator","Prefix when value is singular")||""),d.visible(e.isChecked)})),M=this.editor.option({name:o("block:calculator","Prefix"),form:{title:o("block:calculator","Prefix"),controls:[u,b,d]},activated:i(this.outcome.prefix)}),h=new L.Text("singleline",L.Text.bind(this.outcome,"suffix",void 0)).sanitize(!1).on((o=>{e.suffix(o.isFeatureEnabled&&o.value||""),t.suffix(o.isFeatureEnabled&&o.value||"")})),g=new L.Text("singleline",L.Text.bind(this.outcome,"suffixPlural",void 0)).indent(32).sanitize(!1).on((o=>{e.suffixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0),t.suffixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0)})).placeholder(o("block:calculator","Suffix when value is plural")).visible(i(this.outcome.suffixPlural)),m=new L.Checkbox(o("block:calculator","Specify different suffix for plural values"),i(this.outcome.suffixPlural)).on((e=>{h.placeholder(e.isChecked&&o("block:calculator","Suffix when value is singular")||""),g.visible(e.isChecked)})),p=this.editor.option({name:o("block:calculator","Suffix"),form:{title:o("block:calculator","Suffix"),controls:[h,m,g]},activated:i(this.outcome.suffix)}),v=this.editor.option({name:o("block:calculator","Signs"),form:{title:o("block:calculator","Signs"),controls:[c,r,new L.Static(o("block:calculator","**Note:** These signs are used to format the number in de dataset. When the number is displayed in a runner, the appropriate user locale might be applied making it seem like changing these settings has no effect.")).markdown()]},activated:i(this.outcome.separator)||i(this.outcome.decimal),disabled:(this.outcome.digits||0)>0});this.editor.groups.options(),this.editor.visibility(),this.editor.alias(this.outcome),this.editor.exportable(this.outcome),this.preselect=e=>{let t=!1;!e.precision&&!e.digits||s.isActivated||(n.value=e.digits?-e.digits:e.precision,t=!0,s.activate()),!e.decimal&&!e.separator||v.isActivated||(c.value=e.decimal,r.value=e.decimal,t=!0,v.activate()),!e.prefix&&!e.prefixPlural||M.isActivated||(u.value=e.prefix||"",t=!0,e.prefixPlural&&(d.value=e.prefixPlural,b.check()),M.activate()),!e.suffix&&!e.suffixPlural||p.isActivated||(h.value=e.suffix||"",t=!0,e.suffixPlural&&(g.value=e.suffixPlural,m.check()),p.activate()),t&&(l.visible(!0),R((()=>{l.visible(!1)}),1e4)),this.preselect=void 0}}defineCondition(){const e=(e,t)=>E([{mode:"equal",label:o("block:calculator","Calculation is equal to")},{mode:"not-equal",label:o("block:calculator","Calculation is not equal to")},{mode:"below",label:o("block:calculator","Calculation is lower than")},{mode:"above",label:o("block:calculator","Calculation is higher than")},{mode:"between",label:o("block:calculator","Calculation is between")},{mode:"not-between",label:o("block:calculator","Calculation is not between")},{mode:"defined",label:o("block:calculator","Calculation is valid")},{mode:"undefined",label:o("block:calculator","Calculation is not valid")}],(o=>{e.template({condition:Pt,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:t,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}));this.slots.count>1?this.slots.each((t=>{t.label&&e(this.conditions.group(t.label),t)})):e(this.conditions,this.outcome)}};function Rt(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}be([h,g("#name")],Vt.prototype,"operations",void 0),be([w],Vt.prototype,"defineName",null),be([A,I],Vt.prototype,"defineSlot",null),be([m],Vt.prototype,"defineEditor",null),be([D],Vt.prototype,"defineCondition",null),Vt=Zt=be([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-calculator",version:"4.0.6",icon:Ot,get label(){return o("block:calculator","Calculator")},kind:"headless"})],Vt);var Wt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",Gt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let Qt=class extends F{constructor(){super(...arguments),this.checked=!0}get icon(){return this.checked?Wt:Gt}get name(){return this.checked?this.slot instanceof a.Boolean&&this.slot.labelForTrue||o("block:checkbox","Checked"):this.slot instanceof a.Boolean&&this.slot.labelForFalse||o("block:checkbox","Not checked")}defineEditor(){var e,t;(null===(e=this.node)||void 0===e?void 0:e.label)&&this.editor.form({controls:[new L.Checkbox(null===(t=this.node)||void 0===t?void 0:t.label,L.Checkbox.bind(this,"checked",!0))]})}};Rt([h,g("#name")],Qt.prototype,"checked",void 0),Rt([m],Qt.prototype,"defineEditor",null),Qt=Rt([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-checkbox",identifier:"@tripetto/block-checkbox",version:"6.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4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zIyLS4yMTUgNS4wODctLjYwNWMuMzQ2LS4wOTkuNjU4LS4yMDcuOTMyLS4zMjVsLTQuODggNy4zMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:checkbox","Checkbox state")}})],Qt);var Ft="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Ht=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:checkbox","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:checkbox","calculated")}`;case"undefined":return`@${e.id} ${o("block:checkbox","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:checkbox","Compare mode"),controls:[new L.Radiobutton([{label:o("block:checkbox","Score is equal to"),value:"equal"},{label:o("block:checkbox","Score is not equal to"),value:"not-equal"},{label:o("block:checkbox","Score is lower than"),value:"below"},{label:o("block:checkbox","Score is higher than"),value:"above"},{label:o("block:checkbox","Score is between"),value:"between"},{label:o("block:checkbox","Score is not between"),value:"not-between"},{label:o("block:checkbox","Score is calculated"),value:"defined"},{label:o("block:checkbox","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:checkbox","If score equals");break;case"not-equal":t.title=o("block:checkbox","If score not equals");break;case"below":t.title=o("block:checkbox","If score is lower than");break;case"above":t.title=o("block:checkbox","If score is higher than");break;case"between":t.title=o("block:checkbox","If score is between");break;case"not-between":t.title=o("block:checkbox","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:checkbox","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:checkbox","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:checkbox","Number"),value:"number"},{label:o("block:checkbox","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:checkbox","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:checkbox","And"),"between"===this.mode||"not-between"===this.mode)}};Rt([h,g("#name")],Ht.prototype,"mode",void 0),Rt([h,g("#name")],Ht.prototype,"value",void 0),Rt([h,g("#name")],Ht.prototype,"to",void 0),Rt([m],Ht.prototype,"defineEditor",null),Ht=Rt([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-checkbox",identifier:"@tripetto/block-checkbox:score",version:"6.0.2",icon:Ft,get label(){return o("block:checkbox","Verify score")}})],Ht);let Bt=class extends C{get calculator(){return{checked:{scores:[{reference:!0,score:this.scoreForTrue},{reference:!1,score:this.scoreForFalse}]}}}defineSlot(){this.checkboxSlot=this.slots.static({type:a.Boolean,reference:"checked",label:o("block:checkbox","Checkbox"),exchange:["required","alias","exportable","labelForTrue","labelForFalse"]}),this.checkboxSlot.labelForTrue||(this.checkboxSlot.labelForTrue=o("block:checkbox","Checked")),this.checkboxSlot.labelForFalse||(this.checkboxSlot.labelForFalse=o("block:checkbox","Not checked"))}defineEditor(){this.editor.name(!1,!1),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.options(),this.editor.required(this.checkboxSlot,o("block:checkbox","Checkbox needs to be checked")),this.editor.visibility();const e=o("block:checkbox","Checked"),t=o("block:checkbox","Not checked"),i=new L.Numeric(L.Numeric.bind(this,"scoreForTrue",void 0)).label(this.checkboxSlot.labelForTrue||e),l=new L.Numeric(L.Numeric.bind(this,"scoreForFalse",void 0)).label(this.checkboxSlot.labelForFalse||t);this.editor.option({name:o("block:checkbox","Labels"),form:{title:o("block:checkbox","Labels"),controls:[new L.Text("singleline",this.checkboxSlot.labelForTrue!==e?this.checkboxSlot.labelForTrue:void 0).placeholder(e).on((t=>{i.label(this.checkboxSlot.labelForTrue=t.isFeatureEnabled&&t.value||e)})),new L.Text("singleline",this.checkboxSlot.labelForFalse!==t?this.checkboxSlot.labelForFalse:void 0).placeholder(t).on((e=>{l.label(this.checkboxSlot.labelForFalse=e.isFeatureEnabled&&e.value||t)})),new L.Static(o("block:checkbox","These labels will be used in the dataset and override the default values %1 and %2.",`**${e}**`,`**${t}**`)).markdown()]},activated:this.checkboxSlot.labelForTrue!==e||this.checkboxSlot.labelForFalse!==t}),this.editor.scores({target:this,scores:[i,l]}),this.editor.alias(this.checkboxSlot),this.editor.exportable(this.checkboxSlot)}defineConditions(){E([{checked:!0,label:this.checkboxSlot.labelForTrue||o("block:checkbox","Checkbox is checked"),icon:Wt},{checked:!1,label:this.checkboxSlot.labelForFalse||o("block:checkbox","Checkbox is not checked"),icon:Gt}],(e=>{this.conditions.template({condition:Qt,label:e.label,icon:e.icon,burst:!0,props:{slot:this.checkboxSlot,checked:e.checked}})}));const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,Ft,!1,!0);E([{mode:"equal",label:o("block:checkbox","Score is equal to")},{mode:"not-equal",label:o("block:checkbox","Score is not equal to")},{mode:"below",label:o("block:checkbox","Score is lower than")},{mode:"above",label:o("block:checkbox","Score is higher than")},{mode:"between",label:o("block:checkbox","Score is between")},{mode:"not-between",label:o("block:checkbox","Score is not between")},{mode:"defined",label:o("block:checkbox","Score is calculated")},{mode:"undefined",label:o("block:checkbox","Score is not calculated")}],(o=>{t.template({condition:Ht,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function qt(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Rt([h("number","optional")],Bt.prototype,"scoreForTrue",void 0),Rt([h("number","optional")],Bt.prototype,"scoreForFalse",void 0),Rt([B("calculator")],Bt.prototype,"calculator",null),Rt([A],Bt.prototype,"defineSlot",null),Rt([m],Bt.prototype,"defineEditor",null),Rt([D],Bt.prototype,"defineConditions",null),Bt=Rt([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-checkbox",version:"6.0.2",icon:Wt,alias:"checkbox",get label(){return o("block:checkbox","Checkbox (single)")}})],Bt);let $t=class extends e.Item{constructor(){super(...arguments),this.name=""}defineSlot(){const e=this.name&&q(this.name,x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:a.Boolean,reference:this.id,label:o("block:checkboxes","Checkbox"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:o("block:checkboxes","Checkbox"),content:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Checkbox"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||o("block:checkboxes","Checked"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||o("block:checkboxes","Not checked")}deleteSlot(){this.ref.slots.delete(this.id,"dynamic")}defineEditor(){this.editor.option({name:o("block:checkboxes","Name"),form:{title:o("block:checkboxes","Checkbox name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:o("block:checkboxes","Description"),form:{title:o("block:checkboxes","Description"),controls:[new L.Text("multiline",L.Text.bind(this,"description",void 0)).action("@",T(this))]},activated:i(this.description)}),this.editor.group(o("block:checkboxes","Options")),this.editor.option({name:o("block:checkboxes","Exclusivity"),form:{title:o("block:checkboxes","Exclusivity"),controls:[new L.Checkbox(o("block:checkboxes","Uncheck all other checkboxes when checked"),L.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:$(this.exclusive)});const e=o("block:checkboxes","Checked"),t=o("block:checkboxes","Not checked");this.editor.option({name:o("block:checkboxes","Labels"),form:{title:o("block:checkboxes","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(e),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(t),new L.Static(o("block:checkboxes","These labels will be used in the dataset and override the default values %1 and %2.",`**${e}**`,`**${t}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse)}),this.editor.option({name:o("block:checkboxes","Identifier"),form:{title:o("block:checkboxes","Identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:checkboxes","If a checkbox identifier is set, this identifier will be used instead of the label."))]},activated:i(this.value)});const l=this.ref.slots.select("score","feature");this.editor.option({name:o("block:checkboxes","Score"),form:{title:o("block:checkboxes","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==l?void 0:l.precision)||0).digits((null==l?void 0:l.digits)||0).decimalSign((null==l?void 0:l.decimal)||"").thousands(!!(null==l?void 0:l.separator),(null==l?void 0:l.separator)||"").prefix((null==l?void 0:l.prefix)||"").prefixPlural((null==l?void 0:l.prefixPlural)||void 0).suffix((null==l?void 0:l.suffix)||"").suffixPlural((null==l?void 0:l.suffixPlural)||void 0)]},activated:!0,locked:!!l,disabled:!l})}};qt([h("string"),u],$t.prototype,"name",void 0),qt([h("string","optional")],$t.prototype,"description",void 0),qt([h("string","optional"),X],$t.prototype,"value",void 0),qt([h("string","optional"),g("#refresh")],$t.prototype,"labelForTrue",void 0),qt([h("string","optional"),g("#refresh")],$t.prototype,"labelForFalse",void 0),qt([h("number","optional"),J],$t.prototype,"score",void 0),qt([h("boolean","optional"),g("#name")],$t.prototype,"exclusive",void 0),qt([p,K,I,ee],$t.prototype,"defineSlot",null),qt([v],$t.prototype,"deleteSlot",null),qt([m],$t.prototype,"defineEditor",null);var Xt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",Jt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let _t=class extends F{constructor(){super(...arguments),this.checked=!0}get icon(){return this.checked?Xt:Jt}get name(){var e;return q((null===(e=this.checkbox)||void 0===e?void 0:e.name)||"")||this.type.label}defineEditor(){var e;this.editor.form({controls:[new L.Checkbox(q((null===(e=this.checkbox)||void 0===e?void 0:e.name)||"")||o("block:checkboxes","Checkbox is checked"),L.Checkbox.bind(this,"checked",!0))]})}};qt([g("#name"),_("#checkboxes")],_t.prototype,"checkbox",void 0),qt([g("#icon"),h],_t.prototype,"checked",void 0),qt([m],_t.prototype,"defineEditor",null),_t=qt([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-checkboxes",identifier:"@tripetto/block-checkboxes",version:"7.1.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjIzIDMuMzA3Yy0uMzk2LS4yNjgtLjk0OS0uNTA0LTEu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checkbox state")}})],_t);let Kt=class extends F{};Kt=qt([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-checkboxes",identifier:"@tripetto/block-checkboxes:unchecked",version:"7.1.1",icon:Jt,get label(){return o("block:checkboxes","All checkboxes unchecked")}})],Kt);var eo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let to=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:checkboxes","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:checkboxes","calculated")}`;case"undefined":return`@${e.id} ${o("block:checkboxes","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:checkboxes","Compare mode"),controls:[new L.Radiobutton([{label:o("block:checkboxes","Score is equal to"),value:"equal"},{label:o("block:checkboxes","Score is not equal to"),value:"not-equal"},{label:o("block:checkboxes","Score is lower than"),value:"below"},{label:o("block:checkboxes","Score is higher than"),value:"above"},{label:o("block:checkboxes","Score is between"),value:"between"},{label:o("block:checkboxes","Score is not between"),value:"not-between"},{label:o("block:checkboxes","Score is calculated"),value:"defined"},{label:o("block:checkboxes","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:checkboxes","If score equals");break;case"not-equal":t.title=o("block:checkboxes","If score not equals");break;case"below":t.title=o("block:checkboxes","If score is lower than");break;case"above":t.title=o("block:checkboxes","If score is higher than");break;case"between":t.title=o("block:checkboxes","If score is between");break;case"not-between":t.title=o("block:checkboxes","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:checkboxes","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:checkboxes","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:checkboxes","Number"),value:"number"},{label:o("block:checkboxes","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:checkboxes","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:checkboxes","And"),"between"===this.mode||"not-between"===this.mode)}};qt([h,g("#name")],to.prototype,"mode",void 0),qt([h,g("#name")],to.prototype,"value",void 0),qt([h,g("#name")],to.prototype,"to",void 0),qt([m],to.prototype,"defineEditor",null),to=qt([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-checkboxes",identifier:"@tripetto/block-checkboxes:score",version:"7.1.1",icon:eo,get label(){return o("block:checkboxes","Verify score")}})],to);var oo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIgNmEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDZMNi4xNDUuNjQ3YS41LjUgMCAwIDEgLjcwNy43MDdsLTQuNSA0LjVBLjQ5OC40OTggMCAwIDEgMS45OTggNnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAxM2EuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAyMGEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let io=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:checkboxes","or")} @${e.id} > ${this.parse(e,this.to)}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,(e=>s.locale.number(e,0,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:checkboxes","Compare mode"),controls:[new L.Radiobutton([{label:o("block:checkboxes","Counter is equal to"),value:"equal"},{label:o("block:checkboxes","Counter is not equal to"),value:"not-equal"},{label:o("block:checkboxes","Counter is lower than"),value:"below"},{label:o("block:checkboxes","Counter is higher than"),value:"above"},{label:o("block:checkboxes","Counter is between"),value:"between"},{label:o("block:checkboxes","Counter is not between"),value:"not-between"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:checkboxes","If counter equals");break;case"not-equal":t.title=o("block:checkboxes","If counter not equals");break;case"below":t.title=o("block:checkboxes","If counter is lower than");break;case"above":t.title=o("block:checkboxes","If counter is higher than");break;case"between":t.title=o("block:checkboxes","If counter is between");break;case"not-between":t.title=o("block:checkboxes","If counter is not between")}}))]});const e=(e,t)=>{var l;const s=this[e],c=new L.Numeric(n(s)?s:0).label(o("block:checkboxes","Use fixed number")).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),r=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(s)?s:void 0,!0,null===(l=this.slot)||void 0===l?void 0:l.id),u=new L.Dropdown(r,i(s)?s:"").label(o("block:checkboxes","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:checkboxes","Number"),value:"number"},{label:o("block:checkboxes","Value"),value:"variable",disabled:0===r.length}],i(s)?"variable":"number").on((e=>{c.visible("number"===e.value),u.visible("variable"===e.value),c.isObservable&&c.focus()})),c,u]})},t=e("value",o("block:checkboxes","If counter equals")),l=e("to",o("block:checkboxes","And"))}};qt([h,g("#name")],io.prototype,"mode",void 0),qt([h,g("#name")],io.prototype,"value",void 0),qt([h,g("#name")],io.prototype,"to",void 0),qt([m],io.prototype,"defineEditor",null),io=qt([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-checkboxes",identifier:"@tripetto/block-checkboxes:counter",version:"7.1.1",icon:oo,get label(){return o("block:checkboxes","Verify counter")}})],io);let lo=class extends C{constructor(){super(...arguments),this.checkboxes=e.of($t,this)}get label(){return k("block:checkboxes","%2 (%1 checkbox)","%2 (%1 checkboxes)",this.checkboxes.count,this.type.label)}defineSlot(){this.slots.meta({type:a.Number,reference:"counter",label:o("block:checkboxes","Counter"),exportable:!1,protected:!0}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:a.Text,reference:"concatenation",label:o("block:checkboxes","Text value"),exportable:this.exportable,alias:this.alias,protected:!0}):this.slots.delete("concatenation","feature")}defineEditor(){this.editor.name(),this.editor.description(),this.editor.explanation();const e=this.editor.collection({collection:this.checkboxes,title:o("block:checkboxes","Checkboxes"),icon:Xt,placeholder:o("block:checkboxes","Unnamed checkbox"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,indicator:e=>e.exclusive&&o("block:checkboxes","Exclusive").toUpperCase()||void 0,emptyMessage:o("block:checkboxes","Click the + button to add a checkbox...")});this.editor.groups.settings();const t=new L.Numeric(L.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible(V(this.min)).indent(32).width(75).on((()=>{l.min(this.min||1)})),l=new L.Numeric(L.Numeric.bind(this,"max",void 0)).min(this.min||1).visible(V(this.max)).indent(32).width(75).on((()=>{t.max(this.max)}));this.editor.option({name:o("block:checkboxes","Limits"),form:{title:o("block:checkboxes","Limits"),controls:[new L.Checkbox(o("block:checkboxes","Minimum number of selected checkboxes"),V(this.min)).on((e=>{t.visible(e.isChecked)})),t,new L.Checkbox(o("block:checkboxes","Maximum number of selected checkboxes"),V(this.max)).on((e=>{l.visible(e.isChecked)})),l]},activated:V(this.max)||V(this.min)}),this.editor.option({name:o("block:checkboxes","Randomization"),form:{title:o("block:checkboxes","Randomization"),controls:[new L.Checkbox(o("block:checkboxes","Randomize the checkboxes (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();const a=o("block:checkboxes","Checked"),n=o("block:checkboxes","Not checked");this.editor.option({name:o("block:checkboxes","Labels"),form:{title:o("block:checkboxes","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(a),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new L.Static(o("block:checkboxes","These labels will be used in the dataset and override the default values %1 and %2.",`**${a}**`,`**${n}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse)}),this.editor.scores({target:this,collection:e,description:o("block:checkboxes","Generates a score based on the selected checkboxes. Open the settings panel for each checkbox to set the individual score for that checkbox.")});const s=this.editor.alias(this).disabled("concatenate"!==this.format&&"both"!==this.format),c=new L.Text("singleline",L.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label(o("block:checkboxes","Use this separator:")),r=new L.Group([new L.Dropdown([{label:o("block:checkboxes","Comma separated"),value:"comma"},{label:o("block:checkboxes","Space separated"),value:"space"},{label:o("block:checkboxes","List on multiple lines"),value:"list"},{label:o("block:checkboxes","Bulleted list"),value:"bullets"},{label:o("block:checkboxes","Numbered list"),value:"numbers"},{label:o("block:checkboxes","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:o("block:checkboxes","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:o("block:checkboxes","Custom separator"),value:"custom"}],L.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label(o("block:checkboxes","How to separate the selected checkboxes:")).on((e=>{c.visible("custom"===e.value)})),c]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:o("block:checkboxes","Data format"),form:{title:o("block:checkboxes","Data format"),controls:[new L.Radiobutton([{label:o("block:checkboxes","Every checkbox as a separate field"),description:o("block:checkboxes","Every checkbox is included in the dataset as a separate value."),value:"fields"},{label:o("block:checkboxes","Text field with a list of all selected checkboxes"),description:o("block:checkboxes","All the selected checkboxes are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:o("block:checkboxes","Both options above"),description:o("block:checkboxes","Includes every checkbox in the dataset together with the concatenated text."),value:"both"}],L.Radiobutton.bind(this,"format",void 0,"fields")).label(o("block:checkboxes","This setting determines how the data is stored in the dataset:")).on((e=>{r.visible("concatenate"===e.value||"both"===e.value),s.disabled("concatenate"!==this.format&&"both"!==this.format)})),r]},activated:i(this.format)}),this.editor.exportable(this)}defineConditions(){this.checkboxes.each((e=>{e.name&&this.conditions.template({condition:_t,markdown:e.name,icon:Xt,burst:!0,props:{slot:this.slots.select(e.id),checkbox:e,checked:!0}})})),this.checkboxes.count>0&&this.conditions.template({condition:Kt,separator:!0});const e=this.slots.select("counter","meta");if(e&&e.label){const t=this.conditions.group(e.label,oo);E([{mode:"equal",label:o("block:checkboxes","Counter is equal to")},{mode:"not-equal",label:o("block:checkboxes","Counter is not equal to")},{mode:"below",label:o("block:checkboxes","Counter is lower than")},{mode:"above",label:o("block:checkboxes","Counter is higher than")},{mode:"between",label:o("block:checkboxes","Counter is between")},{mode:"not-between",label:o("block:checkboxes","Counter is not between")}],(o=>{t.template({condition:io,label:o.label,autoOpen:!0,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}const t=this.slots.select("score","feature");if(t&&t.label){const e=this.conditions.group(t.label,eo);E([{mode:"equal",label:o("block:checkboxes","Score is equal to")},{mode:"not-equal",label:o("block:checkboxes","Score is not equal to")},{mode:"below",label:o("block:checkboxes","Score is lower than")},{mode:"above",label:o("block:checkboxes","Score is higher than")},{mode:"between",label:o("block:checkboxes","Score is between")},{mode:"not-between",label:o("block:checkboxes","Score is not between")},{mode:"defined",label:o("block:checkboxes","Score is calculated")},{mode:"undefined",label:o("block:checkboxes","Score is not calculated")}],(o=>{e.template({condition:to,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:t,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function ao(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}qt([h("items"),g("#name")],lo.prototype,"checkboxes",void 0),qt([h("boolean","optional"),g("#required"),g("#collection","checkboxes")],lo.prototype,"required",void 0),qt([h("number","optional")],lo.prototype,"min",void 0),qt([h("number","optional")],lo.prototype,"max",void 0),qt([h("string","optional"),g("#label"),g("#slots"),g("#collection","checkboxes")],lo.prototype,"alias",void 0),qt([h("boolean","optional"),g("#slots"),g("#collection","checkboxes")],lo.prototype,"exportable",void 0),qt([h("string","optional"),g("#collection","checkboxes")],lo.prototype,"labelForTrue",void 0),qt([h("string","optional"),g("#collection","checkboxes")],lo.prototype,"labelForFalse",void 0),qt([h("boolean","optional")],lo.prototype,"randomize",void 0),qt([h("string","optional"),g("#slots"),g("#collection","checkboxes")],lo.prototype,"format",void 0),qt([h("string","optional")],lo.prototype,"formatSeparator",void 0),qt([h("string","optional")],lo.prototype,"formatSeparatorCustom",void 0),qt([A],lo.prototype,"defineSlot",null),qt([m],lo.prototype,"defineEditor",null),qt([D],lo.prototype,"defineConditions",null),lo=qt([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-checkboxes",version:"7.1.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIgNmEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDZMNi4xNDUuNjQ3YS41LjUgMCAwIDEgLjcwNy43MDdsLTQuNSA0LjVBLjQ5OC40OTggMCAwIDEgMS45OTggNnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAxM2EuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAyMGEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:checkboxes","Checkboxes")}})],lo);let no=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Date){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:date","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:date","not empty")}`;case"undefined":return`@${e.id} ${o("block:date","empty")}`;case"before":case"after":case"equal":case"not-equal":return`@${e.id} ${"after"===this.mode?">":"before"===this.mode?"<":"not-equal"===this.mode?"≠":"="} ${t}`}}return this.type.label}get title(){var e;const t=this.node;return(null==t?void 0:t.block)instanceof co&&t.label+(t.block.range?" / "+(null===(e=this.slot)||void 0===e?void 0:e.label):"")||void 0}parse(e,t){var a;return n(t)?e.supportsTime?s.locale.dateTimeShort(e.toValue(t),!0):s.locale.dateShort(e.toValue(t),!0):i(t)?t&&(null===(a=l(this,t))||void 0===a?void 0:a.label)?`@${t}`:"\\_\\_":"`"+o("block:date","Now").toUpperCase()+"`"}defineEditor(){const e=this.slot instanceof a.Date&&this.slot.supportsTime;this.editor.form({title:o("block:date","Compare mode"),controls:[new L.Radiobutton([{label:o("block:date","Date is equal to"),value:"equal"},{label:o("block:date","Date is not equal to"),value:"not-equal"},{label:o("block:date","Date is before"),value:"before"},{label:o("block:date","Date is after"),value:"after"},{label:o("block:date","Date is between"),value:"between"},{label:o("block:date","Date is not between"),value:"not-between"},{label:o("block:date","Date is not empty"),value:"defined"},{label:o("block:date","Date is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("defined"!==e.value&&"undefined"!==e.value),s.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":l.title=o("block:date","If date equals");break;case"not-equal":l.title=o("block:date","If date not equals");break;case"before":l.title=o("block:date","If date is before");break;case"after":l.title=o("block:date","If date is after");break;case"between":l.title=o("block:date","If date is between");break;case"not-between":l.title=o("block:date","If date is not between")}}))]});const t=(t,l,s)=>{var c;const r=this[t],u=H(this,(e=>e instanceof a.Date),i(r)?r:void 0,!0,null===(c=this.slot)||void 0===c?void 0:c.id),d=new L.DateTime(n(r)?r:co.getToday("to"===t?"end":"begin")).label(o("block:date",e?"Use fixed date/time":"Use fixed date")).features(1|(e?8:32)).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).zone("UTC").width("full").required().on((e=>{e.isFormVisible&&e.isObservable&&(this[t]=e.value)})),b=new L.Dropdown(u,i(r)?r:"").label(o("block:date","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this[t]=e.value||"")}));return this.editor.form({title:l,controls:[new L.Radiobutton([{label:o("block:date",e?"Current date/time":"Current date"),value:"current"},{label:o("block:date",e?"Fixed date/time":"Fixed date"),value:"date"},{label:o("block:date","Value"),value:"variable",disabled:0===u.length}],i(r)?"variable":n(r)?"date":"current").on((e=>{d.visible("date"===e.value),b.visible("variable"===e.value),"current"===e.value&&(this[t]=void 0)})),d,b]}).visible(s)},l=t("value",o("block:date","If date equals"),"defined"!==this.mode&&"undefined"!==this.mode),s=t("to",o("block:date","And"),"between"===this.mode||"not-between"===this.mode)}};var so;ao([h,g("#name")],no.prototype,"mode",void 0),ao([h,g("#name")],no.prototype,"value",void 0),ao([h,g("#name")],no.prototype,"to",void 0),ao([m],no.prototype,"defineEditor",null),no=ao([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-date",identifier:"@tripetto/block-date",version:"4.0.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgMkgxNnYtLjVhLjUuNSAwIDAgMC0xIDBWMkg1di0uNWEuNS41IDAgMCAwLTEgMFYySDEuNUMuNjczIDIgMCAyLjY3MyAwIDMuNXYxNGMwIC44MjcuNjczIDEuNSAxLjUgMS41aDE3Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0xNGMwLS44MjctLjY3My0xLjUtMS41LTEuNXptLTE3IDFINHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gxMHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gyLjVhLjUuNSAwIDAgMSAuNS41VjZIMVYzLjVhLjUuNSAwIDAgMSAuNS0uNXptMTcgMTVoLTE3YS41LjUgMCAwIDEtLjUtLjVWN2gxOHYxMC41YS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTguNSAxNS41YS41MDIuNTAyIDAgMCAxLS4zNTQtLjE0NmwtMi0yYS41LjUgMCAwIDEgLjcwNy0uNzA3bDEuNjQ2IDEuNjQ2IDQuNjQ2LTQuNjQ2YS41LjUgMCAwIDEgLjcwNy43MDdsLTUgNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:date","Verify date")}})],no);let co=so=class extends C{get label(){return this.range?o("block:date","Date range"):this.time?o("block:date","Date with time"):this.type.label}static getToday(e){return j.UTCToday+("end"===e?86399999:0)}defineSlot(){if(this.dateSlot=this.slots.static({type:a.Date,reference:"date",label:this.range?o("block:date","Date from"):this.time?o("block:date","Date with time"):so.label,required:this.required,alias:this.alias,exportable:this.exportable,exchange:["required","alias","exportable","precision","minimum","maximum"]}),this.dateSlot.precision=this.time?"minutes":"days",this.dateSlot.minimum=this.minimum,this.dateSlot.maximum=this.maximum,this.range){const e=this.slots.static({type:a.Date,reference:"to",label:o("block:date","Date to"),required:this.required,alias:this.alias,exportable:this.exportable,exchange:["required","alias","exportable","precision","minimum","maximum"],pipe:"to"});e.precision=this.dateSlot.precision,e.minimum=this.dateSlot.minimum,e.maximum=this.dateSlot.maximum}else this.slots.delete("to","static")}defineEditor(){const e=e=>1|(e?8:32),t=new L.Text("singleline",L.Text.bind(this,"placeholder",void 0,"")).placeholder(o("block:date","Type placeholder for the range to date field...")).action("@",T(this)).visible(this.range||!1);this.editor.name(),this.editor.description(),this.editor.placeholder(t),this.editor.explanation(),this.editor.groups.settings(),this.editor.option({name:o("block:date","Time"),form:{title:o("block:date","Time"),controls:[new L.Checkbox(o("block:date","Allow a time to be set"),L.Checkbox.bind(this,"time",void 0,!0)).on((t=>{i.features(e(t.isFeatureEnabled&&t.isChecked)),l.features(e(t.isFeatureEnabled&&t.isChecked))})),new L.Static(o("block:date","When enabled this will allow the user to set a specific time along with the date."))]},activated:$(this.time)}),this.editor.option({name:o("block:date","Range"),form:{title:o("block:date","Range"),controls:[new L.Checkbox(o("block:date","Enable date range"),L.Checkbox.bind(this,"range",void 0,!0)).on((()=>{t.visible(this.range||!1)})),new L.Static(o("block:date","When enabled this will display two date input fields. One for the *from* date and another one for the *to* date.")).markdown()]},activated:$(this.range)});const i=new L.DateTime(V(this.minimum)?this.minimum:void 0).zone("UTC").features(e(this.time)).disabled(!0===this.minimum).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).width("full").label(o("block:date","Minimum")).placeholder(o("block:date","Not set")).on((()=>{i.isFeatureEnabled?!0!==this.minimum&&(this.minimum=i.value):this.minimum=void 0})),l=new L.DateTime(V(this.maximum)?this.maximum:void 0).zone("UTC").features(e(this.time)).disabled(!0===this.maximum).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).width("full").label(o("block:date","Maximum")).placeholder(o("block:date","Not set")).on((()=>{l.isFeatureEnabled?!0!==this.maximum&&(this.maximum=l.value):this.maximum=void 0}));this.editor.option({name:o("block:date","Limits"),form:{title:o("block:date","Limits"),controls:[i,l,new L.Static(o("block:date","Options")),new L.Checkbox(o("block:date","Date must be in the future"),!0===this.minimum).on((e=>{e.isFeatureEnabled&&e.isChecked?this.minimum=!0:!0===this.minimum&&(this.minimum=void 0,i.refresh()),i.disabled(!0===this.minimum)})),new L.Checkbox(o("block:date","Date must be in the past"),!0===this.maximum).on((e=>{e.isFeatureEnabled&&e.isChecked?this.maximum=!0:!0===this.maximum&&(this.maximum=void 0,l.refresh()),l.disabled(!0===this.maximum)}))]},activated:V(this.minimum)||!0===this.minimum||V(this.maximum)||!0===this.maximum}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility(),this.editor.alias(this),this.editor.exportable(this)}defineCondition(){const e=this.slots.select("date"),t=this.slots.select("to"),i=[{mode:"equal",label:o("block:date","Is equal to")},{mode:"not-equal",label:o("block:date","Is not equal to")},{mode:"before",label:o("block:date","Is before")},{mode:"after",label:o("block:date","Is after")},{mode:"between",label:o("block:date","Is between")},{mode:"not-between",label:o("block:date","Is not between")},{mode:"defined",label:o("block:date","Is not empty")},{mode:"undefined",label:o("block:date","Is empty")}];if(e){const l=t?this.conditions.group(e.label||o("block:date","Date from")):this.conditions;E(i,(t=>{l.template({condition:no,label:t.label,autoOpen:"defined"!==t.mode&&"undefined"!==t.mode,props:{slot:e,mode:t.mode,value:this.time?j.UTC:j.UTCToday,to:"between"===t.mode||"not-between"===t.mode?this.time?j.UTC:j.UTCToday:void 0}})}))}if(t){const e=this.conditions.group(t.label||o("block:date","Date to"));E(i,(o=>{e.template({condition:no,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:t,mode:o.mode,value:j.UTC,to:"between"===o.mode||"not-between"===o.mode?j.UTC:void 0}})}))}}};function ro(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ao([h("boolean","optional"),g("#label"),g("#slots")],co.prototype,"time",void 0),ao([h("boolean","optional"),g("#label"),g("#slots")],co.prototype,"range",void 0),ao([h("number","optional"),g("#slots")],co.prototype,"minimum",void 0),ao([h("number","optional"),g("#slots")],co.prototype,"maximum",void 0),ao([h("boolean","optional"),g("#slots")],co.prototype,"required",void 0),ao([h("string","optional"),g("#slots")],co.prototype,"alias",void 0),ao([h("boolean","optional"),g("#slots")],co.prototype,"exportable",void 0),ao([h("string","optional")],co.prototype,"placeholder",void 0),ao([A],co.prototype,"defineSlot",null),ao([m],co.prototype,"defineEditor",null),ao([D],co.prototype,"defineCondition",null),co=so=ao([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-date",version:"4.0.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgMkgxNnYtLjVhLjUuNSAwIDAgMC0xIDBWMkg1di0uNWEuNS41IDAgMCAwLTEgMFYySDEuNUMuNjczIDIgMCAyLjY3MyAwIDMuNXYxNGMwIC44MjcuNjczIDEuNSAxLjUgMS41aDE3Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0xNGMwLS44MjctLjY3My0xLjUtMS41LTEuNXptLTE3IDFINHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gxMHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gyLjVhLjUuNSAwIDAgMSAuNS41VjZIMVYzLjVhLjUuNSAwIDAgMSAuNS0uNXptMTcgMTVoLTE3YS41LjUgMCAwIDEtLjUtLjVWN2gxOHYxMC41YS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTcuNSAxMGgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxem0zIDBoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXptMyAwaC0xYS41LjUgMCAwIDEgMC0xaDFhLjUuNSAwIDAgMSAwIDF6bTMgMGgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxem0tMTIgMmgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxem0zIDBoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXptMyAwaC0xYS41LjUgMCAwIDEgMC0xaDFhLjUuNSAwIDAgMSAwIDF6bTMgMGgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxem0zIDBoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXptLTEyIDJoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXptMyAwaC0xYS41LjUgMCAwIDEgMC0xaDFhLjUuNSAwIDAgMSAwIDF6bTMgMGgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxem0zIDBoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXptMyAwaC0xYS41LjUgMCAwIDEgMC0xaDFhLjUuNSAwIDAgMSAwIDF6bS0xMiAyaC0xYS41LjUgMCAwIDEgMC0xaDFhLjUuNSAwIDAgMSAwIDF6bTMgMGgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxem0zIDBoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXptMyAwaC0xYS41LjUgMCAwIDEgMC0xaDFhLjUuNSAwIDAgMSAwIDF6bTMgMGgtMWEuNS41IDAgMCAxIDAtMWgxYS41LjUgMCAwIDEgMCAxeiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=",get label(){return o("block:date","Date")}})],co);let uo=class extends F{constructor(){super(...arguments),this.deviceType="desktop"}get name(){switch(this.deviceType){case"phone":return o("block:device","Phone");case"tablet":return o("block:device","Tablet");case"desktop":return o("block:device","Desktop")}}get icon(){switch(this.deviceType){case"phone":return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEwLjUgMThoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE0LjUgMjBoLTljLS44MjcgMC0xLjUtLjY3My0xLjUtMS41di0xN0M0IC42NzMgNC42NzMgMCA1LjUgMGg5Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTdjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6bS05LTE5YS41LjUgMCAwIDAtLjUuNXYxN2EuNS41IDAgMCAwIC41LjVoOWEuNS41IDAgMCAwIC41LS41di0xN2EuNS41IDAgMCAwLS41LS41aC05eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48cGF0aCBkPSJNMTMuNSAxNmgtN2EuNS41IDAgMCAxLS41LS41di0xM2EuNS41IDAgMCAxIC41LS41aDdhLjUuNSAwIDAgMSAuNS41djEzYS41LjUgMCAwIDEtLjUuNXpNNyAxNWg2VjNIN3YxMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";case"tablet":return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE1LjUgMjBoLTEyYy0uODI3IDAtMS41LS42NzMtMS41LTEuNXYtMTdDMiAuNjczIDIuNjczIDAgMy41IDBoMTJjLjgyNyAwIDEuNS42NzMgMS41IDEuNXYxN2MwIC44MjctLjY3MyAxLjUtMS41IDEuNXpNMy41IDFhLjUuNSAwIDAgMC0uNS41djE3YS41LjUgMCAwIDAgLjUuNWgxMmEuNS41IDAgMCAwIC41LS41di0xN2EuNS41IDAgMCAwLS41LS41aC0xMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTEwIDIuNWEuNS41IDAgMSAxLTEgMCAuNS41IDAgMCAxIDEgMHpNOS41IDE4Yy0uODI3IDAtMS41LS42NzMtMS41LTEuNVM4LjY3MyAxNSA5LjUgMTVzMS41LjY3MyAxLjUgMS41LS42NzMgMS41LTEuNSAxLjV6bTAtMmEuNS41IDAgMSAwIDAgMSAuNS41IDAgMCAwIDAtMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";case"desktop":return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTMuNSAxNGgxM2MuODI3IDAgMS41LS42NzMgMS41LTEuNXYtOGMwLS44MjctLjY3My0xLjUtMS41LTEuNWgtMTNDMi42NzMgMyAyIDMuNjczIDIgNC41djhjMCAuODI3LjY3MyAxLjUgMS41IDEuNXpNMyA0LjVhLjUuNSAwIDAgMSAuNS0uNWgxM2EuNS41IDAgMCAxIC41LjV2OGEuNS41IDAgMCAxLS41LjVoLTEzYS41LjUgMCAwIDEtLjUtLjV2LTh6TTE5LjUgMTVILjVhLjUuNSAwIDAgMC0uNS41djFjMCAuODI3LjY3MyAxLjUgMS41IDEuNWgxN2MuODI3IDAgMS41LS42NzMgMS41LTEuNXYtMWEuNS41IDAgMCAwLS41LS41em0tMSAyaC0xN2EuNS41IDAgMCAxLS41LS41VjE2aDE4di41YS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"}}defineEditor(){this.editor.form({title:o("block:device","Branch on device type"),controls:[new L.Radiobutton([{value:"desktop",label:o("block:device","Desktop"),description:o("block:device","Large screen device (probably a laptop or desktop).")},{value:"tablet",label:o("block:device","Tablet"),description:o("block:device","Medium screen device.")},{value:"phone",label:o("block:device","Phone"),description:o("block:device","Small screen device.")}],L.Dropdown.bind(this,"deviceType","desktop"))]})}};function bo(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ro([h,g("#name")],uo.prototype,"deviceType",void 0),ro([m],uo.prototype,"defineEditor",null),uo=ro([N({type:"condition",legacyBlock:!0,context:"*",identifier:"@tripetto/block-device",version:"5.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTExLjUgMTRoLThjLS44MjcgMC0xLjUtLjY3My0xLjUtMS41di04QzIgMy42NzMgMi42NzMgMyAzLjUgM2gxM2MuODI3IDAgMS41LjY3MyAxLjUgMS41djFhLjUuNSAwIDAgMS0xIDB2LTFhLjUuNSAwIDAgMC0uNS0uNWgtMTNhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDhhLjUuNSAwIDAgMSAwIDF6bTAgNGgtMTBDLjY3MyAxOCAwIDE3LjMyNyAwIDE2LjV2LTFhLjUuNSAwIDAgMSAuNS0uNWgxMWEuNS41IDAgMCAxIDAgMUgxdi41YS41LjUgMCAwIDAgLjUuNWgxMGEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE4LjUgMThoLTRjLS44MjcgMC0xLjUtLjY3My0xLjUtMS41di04YzAtLjgyNy42NzMtMS41IDEuNS0xLjVoNGMuODI3IDAgMS41LjY3MyAxLjUgMS41djhjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6bS00LTEwYS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWg0YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNWgtNHoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE2LjUgMTZhLjQ5OC40OTggMCAwIDEtLjUtLjUuNDk4LjQ5OCAwIDAgMSAuNS0uNS40OTguNDk4IDAgMCAxIC41LjUuNDk4LjQ5OCAwIDAgMS0uNS41eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=",autoOpen:!0,get label(){return o("block:device","Device")}})],uo);let Mo=class extends e.Item{constructor(){super(...arguments),this.name=""}defineEditor(){this.editor.option({name:o("block:dropdown","Name"),form:{title:o("block:dropdown","Option name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this,"exclude")).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.group(o("block:dropdown","Options")),this.editor.option({name:o("block:dropdown","Identifier"),form:{title:o("block:dropdown","Identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:dropdown","If an option identifier is set, this identifier will be used as selected option value instead of the option label."))]},activated:i(this.value)});const e=this.ref.slots.select("score","feature");this.editor.option({name:o("block:dropdown","Score"),form:{title:o("block:dropdown","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==e?void 0:e.precision)||0).digits((null==e?void 0:e.digits)||0).decimalSign((null==e?void 0:e.decimal)||"").thousands(!!(null==e?void 0:e.separator),(null==e?void 0:e.separator)||"").prefix((null==e?void 0:e.prefix)||"").prefixPlural((null==e?void 0:e.prefixPlural)||void 0).suffix((null==e?void 0:e.suffix)||"").suffixPlural((null==e?void 0:e.suffixPlural)||void 0)]},activated:!0,locked:!!e,disabled:!e})}};bo([h("string"),u],Mo.prototype,"name",void 0),bo([h("string","optional"),X],Mo.prototype,"value",void 0),bo([h("number","optional"),J],Mo.prototype,"score",void 0),bo([m],Mo.prototype,"defineEditor",null);var ho="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE0LjUgNS41YS41MDIuNTAyIDAgMCAxLS4zNTQtLjE0NmwtMi0yYS41LjUg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TMgMTAuNWwtNS42NDYgNS42NDZhLjUuNSAwIDAgMCAuNzA4LjcwN2w1LjY0Ni01LjY0NiA1LjY0NiA1LjY0NmEuNDk4LjQ5OCAwIDAgMCAuNzA4IDAgLjUuNSAwIDAgMCAwLS43MDdMMTAuNzA5IDEwLjV6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let mo=class extends F{get name(){return(this.option?this.option.name:o("block:dropdown","Nothing selected"))||this.type.label}get icon(){return this.option?ho:go}get options(){return this.node&&this.node.block instanceof No&&this.node.block.options||void 0}defineEditor(){if(this.node&&this.options){const e=[];this.options.each((t=>{y(t.name)&&e.push({label:q(t.name,x.MarkdownFeatures.None),value:t})})),e.push({label:o("block:dropdown","Nothing selected"),value:void 0}),this.editor.form({title:this.node.label,controls:[new L.Dropdown(e,L.Dropdown.bind(this,"option",void 0))]})}}};bo([g("#name"),g("#condition"),_("#options")],mo.prototype,"option",void 0),bo([m],mo.prototype,"defineEditor",null),mo=bo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-dropdown",identifier:"@tripetto/block-dropdown",version:"7.0.0",icon:ho,get label(){return o("block:dropdown","Dropdown option")}})],mo);var po="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let vo=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:dropdown","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:dropdown","calculated")}`;case"undefined":return`@${e.id} ${o("block:dropdown","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:dropdown","Compare mode"),controls:[new L.Radiobutton([{label:o("block:dropdown","Score is equal to"),value:"equal"},{label:o("block:dropdown","Score is not equal to"),value:"not-equal"},{label:o("block:dropdown","Score is lower than"),value:"below"},{label:o("block:dropdown","Score is higher than"),value:"above"},{label:o("block:dropdown","Score is between"),value:"between"},{label:o("block:dropdown","Score is not between"),value:"not-between"},{label:o("block:dropdown","Score is calculated"),value:"defined"},{label:o("block:dropdown","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:dropdown","If score equals");break;case"not-equal":t.title=o("block:dropdown","If score not equals");break;case"below":t.title=o("block:dropdown","If score is lower than");break;case"above":t.title=o("block:dropdown","If score is higher than");break;case"between":t.title=o("block:dropdown","If score is between");break;case"not-between":t.title=o("block:dropdown","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:dropdown","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:dropdown","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:dropdown","Number"),value:"number"},{label:o("block:dropdown","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:dropdown","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:dropdown","And"),"between"===this.mode||"not-between"===this.mode)}};bo([h,g("#name")],vo.prototype,"mode",void 0),bo([h,g("#name")],vo.prototype,"value",void 0),bo([h,g("#name")],vo.prototype,"to",void 0),bo([m],vo.prototype,"defineEditor",null),vo=bo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-dropdown",identifier:"@tripetto/block-dropdown:score",version:"7.0.0",icon:po,get label(){return o("block:dropdown","Verify score")}})],vo);let No=class extends C{constructor(){super(...arguments),this.options=e.of(Mo,this)}get label(){return k("block:dropdown","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)}get calculator(){return{option:{allowCastToNumber:!0}}}defineSlots(){this.dropdownSlot=this.slots.static({type:a.String,reference:"option",label:o("block:dropdown","Selected option"),exchange:["required","alias","exportable"]})}defineEditor(){this.editor.groups.general(),this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation();const e=this.editor.collection({collection:this.options,title:o("block:dropdown","Dropdown options"),placeholder:o("block:dropdown","Unnamed option"),autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,sorting:"manual",emptyMessage:o("block:dropdown","Click the + button to add an option...")});this.editor.groups.settings(),this.editor.option({name:o("block:dropdown","Randomization"),form:{title:o("block:dropdown","Randomization"),controls:[new L.Checkbox(o("block:dropdown","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.groups.options(),this.editor.required(this.dropdownSlot),this.editor.visibility(),this.editor.scores({target:this,collection:e,description:o("block:dropdown","Generates a score based on the selected option. Open the settings panel for each option to set the score.")}),this.editor.alias(this.dropdownSlot),this.editor.exportable(this.dropdownSlot)}defineConditions(){this.options.each((e=>{e.name&&this.conditions.template({condition:mo,label:e.name,burst:"branch",props:{slot:this.dropdownSlot,option:e}})})),this.conditions.template({condition:mo,label:o("block:dropdown","Nothing selected"),icon:go,separator:!0,props:{slot:this.dropdownSlot,option:void 0}});const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,po);E([{mode:"equal",label:o("block:dropdown","Score is equal to")},{mode:"not-equal",label:o("block:dropdown","Score is not equal to")},{mode:"below",label:o("block:dropdown","Score is lower than")},{mode:"above",label:o("block:dropdown","Score is higher than")},{mode:"between",label:o("block:dropdown","Score is between")},{mode:"not-between",label:o("block:dropdown","Score is not between")},{mode:"defined",label:o("block:dropdown","Score is calculated")},{mode:"undefined",label:o("block:dropdown","Score is not calculated")}],(o=>{t.template({condition:vo,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function wo(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}bo([h("items"),g("#label"),te("#slot","option")],No.prototype,"options",void 0),bo([h("boolean","optional")],No.prototype,"randomize",void 0),bo([B("calculator")],No.prototype,"calculator",null),bo([A],No.prototype,"defineSlots",null),bo([m],No.prototype,"defineEditor",null),bo([D],No.prototype,"defineConditions",null),No=bo([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-dropdown",version:"7.0.0",icon:ho,get label(){return o("block:dropdown","Dropdown (single-select)")}})],No);var Ao="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjA3MSAyLjkyOUMxNS4xODIgMS4wNCAxMi42NzEgMCAxMCAwUzQuODE4IDEuMDQgMi45MjkgMi45MjlDMS4wNCA0LjgxOCAwIDcuMzI5IDAgMTBzMS4wNCA1LjE4MiAyLjkyOSA3LjA3MUE5LjkzNCA5LjkzNCAwIDAgMCAxMCAyMGE5Ljg5NCA5Ljg5NCAwIDAgMCA0LjQ2NS0xLjA1IDEwLjA4MyAxMC4wODMgMCAwIDAgMy40My0yLjgxMi41LjUgMCAxIDAtLjc4OS0uNjE1QTguOTUgOC45NSAwIDAgMSAxMCAxOC45OTljLTQuOTYzIDAtOS00LjAzNy05LTlzNC4wMzctOSA5LTkgOSA0LjAzNyA5IDljMCAxLjc2Ni0xLjAyOCAzLTIuNSAzYTIuNTAzIDIuNTAzIDAgMCAxLTIuNS0yLjV2LTRhLjUuNSAwIDAgMC0xIDB2Ljg1N2EzLjk5IDMuOTkgMCAwIDAtMy0xLjM1N2MtMi4yMDYgMC00IDEuNzk0LTQgNHMxLjc5NCA0IDQgNGMxLjQzIDAgMi42ODctLjc1NSAzLjM5NS0xLjg4N2EzLjUwNCAzLjUwNCAwIDAgMCAzLjEwNSAxLjg4N2MuOTY4IDAgMS44NTMtLjM5MyAyLjQ5NC0xLjEwNy42NTgtLjczNCAxLjAwNi0xLjczNCAxLjAwNi0yLjg5M2E5LjkzNCA5LjkzNCAwIDAgMC0yLjkyOS03LjA3MXpNMTAgMTNjLTEuNjU0IDAtMy0xLjM0Ni0zLTNzMS4zNDYtMyAzLTMgMyAxLjM0NiAzIDMtMS4zNDYgMy0zIDN6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let Io=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="address"}get label(){return""}get name(){var e;if(this.slot instanceof a.String){const t=e=>e&&("domain"===this.mode||"not-domain"===this.mode)&&`_@${e}_`||e,i=(oe(this.match)?(null===(e=l(this,this.match))||void 0===e?void 0:e.label)&&`@${this.match}`:this.match&&t(S(this.match)))||"\\_\\_";switch(this.mode){case"domain":return`@${this.slot.id} ${o("block:email","from domain")} ${i}`;case"not-domain":return`@${this.slot.id} ${o("block:email","not from domain")} ${i}`;case"address":return`@${this.slot.id} = ${i}`;case"not-address":return`@${this.slot.id} ≠ ${i}`;case"defined":return`@${this.slot.id} ${o("block:email","not empty")}`;case"undefined":return`@${this.slot.id} ${o("block:email","empty")}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){var e;this.editor.form({title:o("block:email","Compare mode"),controls:[new L.Radiobutton([{label:o("block:email","Email address matches"),value:"address"},{label:o("block:email","Email address does not match"),value:"not-address"},{label:o("block:email","Email address matches domain"),value:"domain"},{label:o("block:email","Email address does not match domain"),value:"not-domain"},{label:o("block:email","Email address is not empty"),value:"defined"},{label:o("block:email","Email address is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","address")).on((e=>{switch(s.visible("defined"!==e.value&&"undefined"!==e.value),e.value){case"address":s.title=o("block:email","If email address matches");break;case"not-address":s.title=o("block:email","If email address does not match");break;case"domain":s.title=o("block:email","If email address matches domain");break;case"not-domain":s.title=o("block:email","If email address does not match domain")}l.isInteractable&&l.focus()}))]});const t=this.match&&oe(this.match)||!1,i=H(this,(e=>e instanceof a.String||e instanceof a.Text),t?this.match:void 0,!1,null===(e=this.slot)||void 0===e?void 0:e.id),l=new L.Text("singleline",t?"":this.match).label(o("block:email","Use fixed text")).action("@",T(this,"exclude")).autoFocus().enter(this.editor.close).escape(this.editor.close).on((e=>{e.isFormVisible&&e.isObservable&&(this.match=e.value)})),n=new L.Dropdown(i,t?this.match:"").label(o("block:email","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this.match=e.value||void 0)})),s=this.editor.form({title:o("block:email","If email address matches"),controls:[new L.Radiobutton([{label:o("block:email","Text"),value:"text"},{label:o("block:email","Value"),value:"variable",disabled:0===i.length}],t?"variable":"text").on((e=>{l.visible("text"===e.value),n.visible("variable"===e.value),l.isInteractable&&l.focus()})),l,n]}).visible("defined"!==this.mode&&"undefined"!==this.mode)}};var Do;wo([h,g("#name")],Io.prototype,"mode",void 0),wo([h,g("#name")],Io.prototype,"match",void 0),wo([m],Io.prototype,"defineEditor",null),Io=wo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-email",identifier:"@tripetto/block-email",version:"6.0.3",icon:Ao,get label(){return o("block:email","Match email address")}})],Io);let Lo=Do=class extends C{defineSlot(){this.emailSlot=this.slots.static({type:a.String,reference:"email",label:Do.label,exchange:["required","alias","exportable"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.options(),this.editor.required(this.emailSlot),this.editor.visibility(),this.editor.alias(this.emailSlot),this.editor.exportable(this.emailSlot)}defineCondition(){E([{mode:"address",label:o("block:email","Email address match")},{mode:"not-address",label:o("block:email","Email address mismatch")},{mode:"domain",label:o("block:email","Email address on domain")},{mode:"not-domain",label:o("block:email","Email address not on domain")},{mode:"defined",label:o("block:email","Email address is not empty")},{mode:"undefined",label:o("block:email","Email address is empty")}],(e=>{this.conditions.template({condition:Io,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.emailSlot,mode:e.mode}})}))}};function jo(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}wo([A],Lo.prototype,"defineSlot",null),wo([m],Lo.prototype,"defineEditor",null),wo([D],Lo.prototype,"defineCondition",null),Lo=Do=wo([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-email",version:"6.0.3",icon:Ao,get label(){return o("block:email","Email address")}})],Lo);let So=class extends C{defineEditor(){const e=Z("block:error");this.editor.form({title:o("block:error","Explanation"),controls:[new L.Static(o("block:error","Raises an error, prevents completion of the form and displays an optional message to the user%1.",e?` ([${o("block:error","learn more")}](${e}))`:"")).markdown()]}),this.editor.name(!1,!0,o("block:error","Error message")),this.editor.description(),this.editor.groups.options(),this.editor.visibility()}};function xo(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}var ko;jo([m],So.prototype,"defineEditor",null),So=jo([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-error",version:"5.0.4",kind:"headless",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgMTlILjVhLjUuNSAwIDAgMS0uNDM2LS43NDZsOS0xNmEuNTAxLjUwMSAwIDAgMSAuODcyIDBsOSAxNkEuNTAzLjUwMyAwIDAgMSAxOC41IDE5ek0xLjM1NSAxOGgxNi4yOUw5LjUgMy41MiAxLjM1NSAxOHoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxNGEuNS41IDAgMCAxLS41LS41di01YS41LjUgMCAwIDEgMSAwdjVhLjUuNSAwIDAgMS0uNS41em0wIDNhLjUuNSAwIDAgMS0uNS0uNXYtMWEuNS41IDAgMCAxIDEgMHYxYS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:error","Raise error")}})],So);let yo=ko=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0}get isString(){return this.slot instanceof a.String||this.slot instanceof a.Text||!(this.slot||!this.variable)}get isNumber(){return this.slot instanceof a.Number||this.slot instanceof a.Numeric}get isDate(){return this.slot instanceof a.Date}get supportsTime(){return this.slot instanceof a.Date&&this.slot.supportsTime}get isBoolean(){return this.slot instanceof a.Boolean}get label(){return""}get name(){var e,t;if(this.variable&&l(this,this.variable)){if("defined"===this.mode)return`@${this.variable} ${o("block:evaluate","not empty")}`;if("undefined"===this.mode)return`@${this.variable} ${o("block:evaluate","empty")}`;if(this.isString){const t=e=>e&&("contains"===this.mode||"not-contains"===this.mode||"starts"===this.mode||"ends"===this.mode)&&`_${e}_`||e,a=(i(this.value)&&oe(this.value)?(null===(e=l(this,this.value))||void 0===e?void 0:e.label)&&`@${this.value}`:y(this.value)&&t(S(f.replace(this.value,"\n","↵"))))||"\\_\\_";switch(this.mode){case"equal":case"not-equal":return`@${this.variable} ${"not-equal"===this.mode?"≠":"="} ${a}`;case"contains":case"not-contains":case"starts":case"ends":return`@${this.variable} ${"not-contains"===this.mode?o("block:evaluate","does not contain"):"starts"===this.mode?o("block:evaluate","starts with"):"ends"===this.mode?o("block:evaluate","ends with"):o("block:evaluate","contains")} ${a}`}}if(this.isNumber){const e=this.slot,t=(e,t)=>{var o;return n(t)?e instanceof a.Numeric?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):e.toString(t,(e=>s.locale.number(e,0,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?"@"+t:"\\_\\_"},c=t(e,this.value);switch(this.mode){case"between":return`${c} ≤ @${this.variable} ≤ ${t(e,this.to)}`;case"not-between":return`@${this.variable} < ${c} ${o("block:evaluate","or")} @${this.variable} > ${t(e,this.to)}`;case"not-equal":return`@${this.variable} ≠ ${c}`;case"above":case"below":case"equal":return`@${this.variable} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${c}`}}if(this.isDate){const e=this.slot,t=(e,t)=>{var a;return n(t)?e.supportsTime?s.locale.dateTimeShort(e.toValue(t),!0):s.locale.dateShort(e.toValue(t),!0):i(t)?t&&(null===(a=l(this,t))||void 0===a?void 0:a.label)?`@${t}`:"\\_\\_":"`"+o("block:evaluate","Now").toUpperCase()+"`"},a=t(e,this.value);switch(this.mode){case"between":return`${a} ≤ @${e.id} ≤ ${t(e,this.to)}`;case"not-between":return`@${e.id} < ${a} ${o("block:evaluate","or")} @${e.id} > ${t(e,this.to)}`;case"before":case"after":case"equal":case"not-equal":return`@${e.id} ${"after"===this.mode?">":"before"===this.mode?"<":"not-equal"===this.mode?"≠":"="} ${a}`}}if(this.isBoolean){const e=this.slot;switch(this.mode){case"true":return`@${this.variable} = ${S(e.labelForTrue||"")||o("block:evaluate","True")}`;case"false":return`@${this.variable} = ${S(e.labelForFalse||"")||o("block:evaluate","False")}`;case"equal":case"not-equal":return`@${this.variable} ${"not-equal"===this.mode?"≠":"="} ${i(this.value)&&oe(this.value)&&(null===(t=l(this,this.value))||void 0===t?void 0:t.label)?`@${this.value}`:"\\_\\_"}`}}}return this.type.label}static getToday(e){return j.UTCToday+("end"===e?86399999:0)}stringEditor(){const t=this.editor.form({title:o("block:evaluate","Compare mode"),controls:[new L.Radiobutton([{label:o("block:evaluate","Value matches"),value:"equal"},{label:o("block:evaluate","Value does not match"),value:"not-equal"},{label:o("block:evaluate","Value contains"),value:"contains"},{label:o("block:evaluate","Value does not contain"),value:"not-contains"},{label:o("block:evaluate","Value starts with"),value:"starts"},{label:o("block:evaluate","Value ends with"),value:"ends"},{label:o("block:evaluate","Value is not empty"),value:"defined"},{label:o("block:evaluate","Value is empty"),value:"undefined"}],this.mode||"equal").on((e=>{switch(this.isString&&e.isObservable&&(this.mode=e.value),h.visible(this.isString&&"defined"!==e.value&&"undefined"!==e.value),e.value){case"equal":h.title=o("block:evaluate","If value matches");break;case"not-equal":h.title=o("block:evaluate","If value does not match");break;case"contains":h.title=o("block:evaluate","If value contains");break;case"not-contains":h.title=o("block:evaluate","If value does not contain");break;case"starts":h.title=o("block:evaluate","If value starts with");break;case"ends":h.title=o("block:evaluate","If value ends with")}c.isObservable&&c.isInteractable&&c.focus(),r.isObservable&&r.isInteractable&&r.focus()}))]}).visible(this.isString);let a=!1;const n=i(this.value)&&oe(this.value)||!1,s=H(this,void 0,n?this.value:void 0),c=new L.Text("singleline",!n&&i(this.value)?this.value:"").label(o("block:evaluate","Use fixed text")).action("@",T(this)).autoFocus().enter(this.editor.close).escape(this.editor.close).on((e=>{e.isFormVisible&&e.isVisible&&(this.value=r.value=e.value),b.disabled(!!(e.isFormVisible&&e.isVisible&&e.suggestion&&a))})),r=new L.Text("multiline",!n&&i(this.value)?this.value:"").label(o("block:evaluate","Use fixed text")).action("@",T(this)).autoFocus().enter(this.editor.close).escape(this.editor.close).on((e=>{e.isFormVisible&&e.isVisible&&(this.value=c.value=e.value)})),u=new L.Dropdown(s,n?this.value:"").label(o("block:evaluate","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&this.variable!==e.value&&(this.value=e.value||void 0)})),d=new L.Radiobutton([{label:o("block:evaluate","Text"),value:"text"},{label:o("block:evaluate","Value"),value:"variable",disabled:0===s.length}],n?"variable":"text").on((e=>{c.visible(!c.isDisabled&&"text"===e.value||!1),r.visible(!r.isDisabled&&"text"===e.value||!1),u.visible("variable"===e.value),c.isObservable&&c.isInteractable&&c.focus(),r.isObservable&&r.isInteractable&&r.focus()})),b=new L.Checkbox(o("block:evaluate","Ignore case"),L.Checkbox.bind(this,"ignoreCase",void 0,!0)),M=()=>{const t=this.slot&&l(this,this.slot.id);let o;if(a=!1,t&&t.slot&&t.block instanceof C){const i=e.find(t);i&&(a=i.sole,o=ie(i.collection.all,(e=>q(e.getNameOfItem()))))}c.suggestions(o),c.disabled(!o),r.disabled(!!o),d.refresh()};M();const h=this.editor.form({title:o("block:evaluate","If value matches"),controls:[d,c,r,u,b]}).visible(this.isString&&"defined"!==this.mode&&"undefined"!==this.mode);return{update:(e,o)=>{t.visible(this.isString),e!==o&&(e&&u.optionDisabled(e,!1),o&&u.optionDisabled(o,!0)),M()}}}numberEditor(){const e=[],t=this.editor.form({title:o("block:evaluate","Compare mode"),controls:[new L.Radiobutton([{label:o("block:evaluate","Number is equal to"),value:"equal"},{label:o("block:evaluate","Number is not equal to"),value:"not-equal"},{label:o("block:evaluate","Number is lower than"),value:"below"},{label:o("block:evaluate","Number is higher than"),value:"above"},{label:o("block:evaluate","Number is between"),value:"between"},{label:o("block:evaluate","Number is not between"),value:"not-between"},{label:o("block:evaluate","Number is not empty"),value:"defined"},{label:o("block:evaluate","Number is empty"),value:"undefined"}],this.mode||"equal").on((e=>{switch(this.isNumber&&e.isObservable&&(this.mode=e.value),s.visible(this.isNumber&&"defined"!==e.value&&"undefined"!==e.value),r.visible(this.isNumber&&("between"===e.value||"not-between"===e.value)),e.value){case"equal":s.title=o("block:evaluate","If number equals");break;case"not-equal":s.title=o("block:evaluate","If number not equals");break;case"below":s.title=o("block:evaluate","If number is lower than");break;case"above":s.title=o("block:evaluate","If number is higher than");break;case"between":s.title=o("block:evaluate","If number is between");break;case"not-between":s.title=o("block:evaluate","If number is not between")}}))]}).visible(this.isNumber),l=(t,l,s)=>{const c=this[t],r=this.slot instanceof a.Numeric?this.slot:void 0,u=new L.Numeric(n(c)?c:0).label(o("block:evaluate","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).min(null==r?void 0:r.minimum).max(null==r?void 0:r.maximum).autoFocus("value"===t).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===t)&&this.editor.close())).on((e=>{e.isFormVisible&&e.isObservable&&(this[t]=e.value)})),d=i(c)&&oe(c)||!1,b=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),d?c:void 0),M=new L.Dropdown(b,d?c:"").label(o("block:evaluate","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&this.variable!==e.value&&(this[t]=e.value||"")}));return e.push(M),[this.editor.form({title:l,controls:[new L.Radiobutton([{label:o("block:evaluate","Number"),value:"number"},{label:o("block:evaluate","Value"),value:"variable",disabled:0===b.length}],d?"variable":"number").on((e=>{u.visible("number"===e.value),M.visible("variable"===e.value),u.isObservable&&u.focus()})),u,M]}).visible(s),u]},[s,c]=l("value",o("block:evaluate","If number equals"),this.isNumber&&"defined"!==this.mode&&"undefined"!==this.mode),[r,u]=l("to",o("block:evaluate","And"),this.isNumber&&("between"===this.mode||"not-between"===this.mode));return{update:(o,i)=>{const l=e=>{e.precision(this.slot instanceof a.Numeric&&this.slot.precision||0),e.digits(this.slot instanceof a.Numeric&&this.slot.digits||0),e.decimalSign(this.slot instanceof a.Numeric&&this.slot.decimal||""),e.thousands(!!(this.slot instanceof a.Numeric&&this.slot.separator),this.slot instanceof a.Numeric&&this.slot.separator||""),e.min(this.slot instanceof a.Numeric&&this.slot.minimum||void 0),e.max(this.slot instanceof a.Numeric&&this.slot.maximum||void 0),e.prefix(this.slot instanceof a.Numeric&&this.slot.prefix||""),e.prefixPlural(this.slot instanceof a.Numeric&&this.slot.prefixPlural||void 0),e.suffix(this.slot instanceof a.Numeric&&this.slot.suffix||""),e.suffixPlural(this.slot instanceof a.Numeric&&this.slot.suffixPlural||void 0)};l(c),l(u),t.visible(this.isNumber),o!==i&&(o&&E(e,(e=>{e.optionDisabled(o,!1)})),i&&E(e,(e=>{e.optionDisabled(i,!0)})))}}}booleanEditor(){const e=new L.Radiobutton([{label:this.slot instanceof a.Boolean&&this.slot.labelForTrue||o("block:evaluate","Is true"),value:"true"},{label:this.slot instanceof a.Boolean&&this.slot.labelForFalse||o("block:evaluate","Is false"),value:"false"},{label:o("block:evaluate","Equals another variable"),value:"equal"},{label:o("block:evaluate","Not equals another variable"),value:"not-equal"},{label:o("block:evaluate","Is not empty"),value:"defined"},{label:o("block:evaluate","Is empty"),value:"undefined"}],this.mode||"true").on((e=>{switch(this.isBoolean&&e.isObservable&&(this.mode=e.value),this.isBoolean&&"equal"!==e.value&&"not-equal"!==e.value&&(this.value=void 0),c.visible(this.isBoolean&&("equal"===e.value||"not-equal"===e.value)),e.value){case"equal":c.title=o("block:evaluate","If value matches");break;case"not-equal":c.title=o("block:evaluate","If value does not match")}})),t=this.editor.form({title:o("block:evaluate","Compare mode"),controls:[e]}).visible(this.isBoolean),l=i(this.value)&&oe(this.value)||!1,n=H(this,((e,t)=>!t&&e instanceof a.Boolean),l?this.value:void 0),s=new L.Dropdown(n,l?this.value:"").width("full").on((e=>{e.isFormVisible&&e.isObservable&&this.variable!==e.value&&(this.value=e.value||void 0)})),c=this.editor.form({title:o("block:evaluate","If value matches"),controls:[s]}).visible(this.isBoolean&&("equal"===this.mode||"not-equal"===this.mode));return{update:(i,l)=>{t.visible(this.isBoolean),i!==l&&(i&&s.optionDisabled(i,!1),l&&s.optionDisabled(l,!0)),e.buttonLabel("true",this.slot instanceof a.Boolean&&this.slot.labelForTrue||o("block:evaluate","Is true")),e.buttonLabel("false",this.slot instanceof a.Boolean&&this.slot.labelForFalse||o("block:evaluate","Is false"))}}}dateEditor(){const e=[],t=new L.Radiobutton([{label:o("block:evaluate","Date is equal to"),value:"equal"},{label:o("block:evaluate","Date is not equal to"),value:"not-equal"},{label:o("block:evaluate","Date is before"),value:"before"},{label:o("block:evaluate","Date is after"),value:"after"},{label:o("block:evaluate","Date is between"),value:"between"},{label:o("block:evaluate","Date is not between"),value:"not-between"},{label:o("block:evaluate","Date is not empty"),value:"defined"},{label:o("block:evaluate","Date is empty"),value:"undefined"}],this.mode||"equal").on((e=>{switch(this.isDate&&e.isObservable&&(this.mode=e.value),c.visible(this.isDate&&!this.supportsTime&&"defined"!==e.value&&"undefined"!==e.value),r.visible(this.isDate&&this.supportsTime&&"defined"!==e.value&&"undefined"!==e.value),u.visible(this.isDate&&!this.supportsTime&&("between"===e.value||"not-between"===e.value)),d.visible(this.isDate&&this.supportsTime&&("between"===e.value||"not-between"===e.value)),e.value){case"equal":c.title=o("block:evaluate","If date equals"),r.title=o("block:evaluate","If date/time equals");break;case"not-equal":c.title=o("block:evaluate","If date not equals"),r.title=o("block:evaluate","If date/time not equals");break;case"before":c.title=o("block:evaluate","If date is before"),r.title=o("block:evaluate","If date/time is before");break;case"after":c.title=o("block:evaluate","If date is after"),r.title=o("block:evaluate","If date/time equals");break;case"between":c.title=o("block:evaluate","If date is between"),r.title=o("block:evaluate","If date/time is between");break;case"not-between":c.title=o("block:evaluate","If date is not between"),r.title=o("block:evaluate","If date/time is not between")}})),l=this.editor.form({title:o("block:evaluate","Compare mode"),controls:[t]}).visible(this.isDate),s=(t,l,s,c)=>{const r=this[t],u=i(r)&&oe(r)||!1,d=H(this,(e=>e instanceof a.Date),u?r:void 0),b=new L.DateTime(n(r)?r:ko.getToday("to"===t?"end":"begin")).label(o("block:evaluate",s?"Use fixed date/time":"Use fixed date")).features(1|(s?8:32)).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).zone("UTC").width("full").required().on((e=>{e.isFormVisible&&e.isObservable&&(this[t]=e.value)})),M=new L.Dropdown(d,u?r:"").label(o("block:evaluate","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&this.variable!==e.value&&(this[t]=e.value||"")}));return e.push(M),this.editor.form({title:l,controls:[new L.Radiobutton([{label:o("block:evaluate",s?"Current date/time":"Current date"),value:"current"},{label:o("block:evaluate",s?"Fixed date/time":"Fixed date"),value:"date"},{label:o("block:evaluate","Value"),value:"variable",disabled:0===d.length}],u?"variable":n(r)?"date":"current").on((e=>{b.visible("date"===e.value),M.visible("variable"===e.value),e.isFormVisible&&e.isObservable&&"current"===e.value&&(this[t]=void 0)})),b,M]}).visible(c)},c=s("value",o("block:evaluate","If date equals"),!1,this.isDate&&!this.supportsTime&&"defined"!==this.mode&&"undefined"!==this.mode),r=s("value",o("block:evaluate","If date/time equals"),!0,this.isDate&&this.supportsTime&&"defined"!==this.mode&&"undefined"!==this.mode),u=s("to",o("block:evaluate","And"),!1,this.isDate&&!this.supportsTime&&("between"===this.mode||"not-between"===this.mode)),d=s("to",o("block:evaluate","And"),!0,this.isDate&&this.supportsTime&&("between"===this.mode||"not-between"===this.mode));return{update:(o,i)=>{l.visible(this.isDate),t.refresh(),o!==i&&(o&&E(e,(e=>{e.optionDisabled(o,!1)})),i&&E(e,(e=>{e.optionDisabled(i,!0)})))}}}defineEditor(){this.editor.form({title:o("block:evaluate","Input"),controls:[new L.Dropdown(H(this,(e=>e instanceof a.String||e instanceof a.Text||e instanceof a.Number||e instanceof a.Numeric||e instanceof a.Boolean||e instanceof a.Date),this.variable),this.variable).placeholder(o("block:evaluate","Select the input variable to use...")).on((o=>{var a;const s=this.variable;this.variable=o.value||void 0,this.slot=o.value&&(null===(a=l(this,o.value))||void 0===a?void 0:a.slot)||void 0,e.update(s,this.variable),t.update(s,this.variable),i.update(s,this.variable),n.update(s,this.variable),this.variable||(this.value=void 0),(!this.variable||this.isString||this.isBoolean)&&(this.to=void 0),(!this.variable||this.isNumber||this.isDate||this.isBoolean)&&(this.ignoreCase=void 0)})).autoFocus()]});const e=this.stringEditor(),t=this.numberEditor(),i=this.booleanEditor(),n=this.dateEditor();e.update(void 0,this.variable),t.update(void 0,this.variable),i.update(void 0,this.variable),n.update(void 0,this.variable)}};function fo(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}xo([h,g("#name")],yo.prototype,"variable",void 0),xo([h,g("#name")],yo.prototype,"mode",void 0),xo([h,g("#name")],yo.prototype,"value",void 0),xo([h,g("#name")],yo.prototype,"to",void 0),xo([h],yo.prototype,"ignoreCase",void 0),xo([m],yo.prototype,"defineEditor",null),yo=ko=xo([N({type:"condition",legacyBlock:!0,context:"*",identifier:"@tripetto/block-evaluate",version:"4.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0ibTE4Ljk4NSAxMy4zNzktMy0xMkEuNTAxLjUwMSAwIDAgMCAxNS41IDFIMy41MTFhLjUzMS41MzEgMCAwIDAtLjE4NS4wMzEuNS41IDAgMCAwLS4zMTQuMzU3TC4wMTQgMTMuMzc4YS40OTUuNDk1IDAgMCAwIC4wMDEuMjQySC4wMTRjLjAxNi4wNjMuMTY5LjYzNC42NzEgMS4yMDguNDY3LjUzNCAxLjMzNSAxLjE3MSAyLjgxNCAxLjE3MXMyLjM0Ni0uNjM3IDIuODE0LTEuMTcxYy41MDItLjU3NC42NTYtMS4xNDUuNjcxLTEuMjA4aC0uMDAxYS40OTUuNDk1IDAgMCAwIC4wMDEtLjI0Mkw0LjEzOSAxLjk5OWgxMC43MTlsLTIuODQ1IDExLjM3OWEuNDk1LjQ5NSAwIDAgMCAuMDAxLjI0MmgtLjAwMWMuMDE2LjA2My4xNjkuNjM0LjY3MSAxLjIwOC40NjcuNTM0IDEuMzM1IDEuMTcxIDIuODE0IDEuMTcxczIuMzQ2LS42MzcgMi44MTQtMS4xNzFjLjUwMi0uNTc0LjY1Ni0xLjE0NS42NzEtMS4yMDhoLS4wMDFhLjQ5NS40OTUgMCAwIDAgLjAwMS0uMjQyek0zLjUgMTVjLTEuMjE0IDAtMS44NjUtLjU0Mi0yLjE5OC0xaDQuMzk3Yy0uMzMzLjQ1OC0uOTg0IDEtMi4xOTggMXptMi4zNi0ySDEuMTQxbDIuMzYtOS40MzhMNS44NjEgMTN6bTkuNjQtOS40MzhMMTcuODYgMTNoLTQuNzE5bDIuMzYtOS40Mzh6TTE1LjUgMTVjLTEuMjE0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NCA0eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48cGF0aCBkPSJtNy4yMDcgMTMgMi4xNDYtMi4xNDZhLjUuNSAwIDAgMC0uNzA3LS43MDdMNi41IDEyLjI5M2wtMi4xNDYtMi4xNDZhLjUuNSAwIDAgMC0uNzA3LjcwN0w1Ljc5MyAxM2wtMi4xNDYgMi4xNDZhLjUuNSAwIDAgMCAuNzA4LjcwN2wyLjE0Ni0yLjE0NiAyLjE0NiAyLjE0NmEuNDk4LjQ5OCAwIDAgMCAuNzA4IDAgLjUuNSAwIDAgMCAwLS43MDdMNy4yMDkgMTN6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let Eo=class extends F{constructor(){super(...arguments),this.isUploaded=!0}get icon(){return this.isUploaded?Co:zo}get name(){return this.isUploaded?o("block:file-upload","File uploaded"):o("block:file-upload","No file uploaded")}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}};fo([h,g("#name")],Eo.prototype,"isUploaded",void 0),Eo=fo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-file-upload",identifier:"@tripetto/block-file-upload",version:"5.1.0",icon:To,get label(){return o("block:file-upload","File upload state")}})],Eo);let Uo=class extends C{defineSlots(){this.fileSlot=this.slots.static({type:a.String,reference:"file",label:o("block:file-upload","File upload"),protected:!0,exchange:["required","alias"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.explanation(),this.editor.groups.settings(),this.editor.option({name:o("block:file-upload","File size"),form:{title:o("block:file-upload","Maximum file size"),controls:[new L.Numeric(L.Numeric.bind(this,"limit",void 0,1)).min(1).suffix(" Mb")]},activated:n(this.limit)}),this.editor.option({name:o("block:file-upload","File type"),form:{title:o("block:file-upload","Allowed file types"),controls:[new L.Text("singleline",L.Text.bind(this,"extensions",void 0)).placeholder(o("block:file-upload","Comma separated list, e.g. .png, .jpg"))]},activated:i(this.extensions)}),this.editor.groups.options(),this.editor.required(this.fileSlot),this.editor.visibility(),this.editor.alias(this.fileSlot)}defineConditions(){E([{label:o("block:file-upload","File uploaded"),icon:Co,isUploaded:!0},{label:o("block:file-upload","No file uploaded"),icon:zo,isUploaded:!1}],(e=>{this.conditions.template({condition:Eo,label:e.label,icon:e.icon,burst:!0,props:{slot:this.fileSlot,isUploaded:e.isUploaded}})}))}};function Oo(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}fo([h],Uo.prototype,"limit",void 0),fo([h],Uo.prototype,"extensions",void 0),fo([A],Uo.prototype,"defineSlots",null),fo([m],Uo.prototype,"defineEditor",null),fo([D],Uo.prototype,"defineConditions",null),Uo=fo([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-file-upload",version:"5.1.0",icon:To,alias:"file-upload",get label(){return o("block:file-upload","File upload")}})],Uo);let Yo=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equals"}get label(){return""}get name(){var e;if(this.slot instanceof a.String){const t=e=>e&&("contains"===this.mode||"not-contains"===this.mode||"starts"===this.mode||"ends"===this.mode)&&`_${e}_`||e,i=(oe(this.value)?(null===(e=l(this,this.value))||void 0===e?void 0:e.label)&&`@${this.value}`:this.value&&t(S(f.replace(this.value,"\n","↵"))))||"\\_\\_";switch(this.mode){case"equals":case"not-equals":return`@${this.slot.id} ${"not-equals"===this.mode?"≠":"="} ${i}`;case"contains":case"not-contains":case"starts":case"ends":return`@${this.slot.id} ${"not-contains"===this.mode?o("block:hidden-field","does not contain"):"starts"===this.mode?o("block:hidden-field","starts with"):"ends"===this.mode?o("block:hidden-field","ends with"):o("block:hidden-field","contains")} ${i}`;case"defined":return`@${this.slot.id} ${o("block:hidden-field","not empty")}`;case"undefined":return`@${this.slot.id} ${o("block:hidden-field","empty")}`;case"regex":return`@${this.slot.id} ${o("block:hidden-field","regular expression")}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){var e;this.editor.form({title:o("block:hidden-field","Compare mode"),controls:[new L.Radiobutton([{label:o("block:hidden-field","Value matches"),value:"equals"},{label:o("block:hidden-field","Value does not match"),value:"not-equals"},{label:o("block:hidden-field","Value contains"),value:"contains"},{label:o("block:hidden-field","Value does not contain"),value:"not-contains"},{label:o("block:hidden-field","Value starts with"),value:"starts"},{label:o("block:hidden-field","Value ends with"),value:"ends"},{label:o("block:hidden-field","Value is not empty"),value:"defined"},{label:o("block:hidden-field","Value is empty"),value:"undefined"},{label:o("block:hidden-field","Value satisfies regular expression"),value:"regex"}],L.Radiobutton.bind(this,"mode","equals")).on((e=>{switch(n.visible("defined"!==e.value&&"undefined"!==e.value&&"regex"!==e.value),s.visible("regex"===e.value),e.value){case"equals":n.title=o("block:hidden-field","If value matches");break;case"not-equals":n.title=o("block:hidden-field","If value does not match");break;case"contains":n.title=o("block:hidden-field","If value contains");break;case"not-contains":n.title=o("block:hidden-field","If value does not contain");break;case"starts":n.title=o("block:hidden-field","If value starts with");break;case"ends":n.title=o("block:hidden-field","If value ends with")}l.isInteractable&&l.focus()}))]});const t=this.value&&oe(this.value)||!1,i=H(this,void 0,t?this.value:void 0,!1,null===(e=this.slot)||void 0===e?void 0:e.id),l=new L.Text("multiline",t?"":this.value).label(o("block:hidden-field","Use fixed text")).action("@",T(this,"exclude")).autoFocus().escape(this.editor.close).on((e=>{e.isFormVisible&&e.isVisible&&(this.value=e.value)})),a=new L.Dropdown(i,t?this.value:"").label(o("block:hidden-field","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this.value=e.value||void 0)})),n=this.editor.form({title:o("block:hidden-field","If value matches"),controls:[new L.Radiobutton([{label:o("block:hidden-field","Text"),value:"text"},{label:o("block:hidden-field","Value"),value:"variable",disabled:0===i.length}],t?"variable":"text").on((e=>{l.visible("text"===e.value),a.visible("variable"===e.value),l.isInteractable&&l.focus()})),l,a,new L.Checkbox(o("block:hidden-field","Ignore case"),L.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode&&"regex"!==this.mode),s=this.editor.form({title:o("block:hidden-field","If value satisfies regular expression"),controls:[new L.Text("singleline",L.Text.bind(this,"regex",void 0,"")).placeholder(o("block:hidden-field","Regex literal (for example /ab+c/)")).autoFocus().autoValidate((e=>{if(!e.value)return"unknown";try{const t=e.value.indexOf("/"),o=e.value.lastIndexOf("/");return 0===t&&o>t&&((e,t)=>{try{return new RegExp(e.substring(1,t),e.substr(t+1))instanceof RegExp}catch(e){return!1}})(e.value,o)?"pass":"fail"}catch(e){return"fail"}})),new L.Checkbox(o("block:hidden-field","Invert regular expression"),L.Checkbox.bind(this,"invert",void 0,!1))]}).visible("regex"===this.mode)}};Oo([h,g("#name")],Yo.prototype,"mode",void 0),Oo([h,g("#name")],Yo.prototype,"value",void 0),Oo([h],Yo.prototype,"ignoreCase",void 0),Oo([h],Yo.prototype,"regex",void 0),Oo([h],Yo.prototype,"invert",void 0),Oo([m],Yo.prototype,"defineEditor",null),Yo=Oo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-hidden-field",identifier:"@tripetto/block-hidden-field:string",alias:"@tripetto/block-hidden-field-string",version:"6.2.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",autoOpen:!0,get label(){return o("block:hidden-field","Compare value")}})],Yo);let Po=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:hidden-field","or")} @${e.id} > ${this.parse(e,this.to)}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}parse(e,t){var o;return n(t)?e.toString(t,(e=>s.locale.number(e))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?"@"+t:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:hidden-field","Compare mode"),controls:[new L.Radiobutton([{label:o("block:hidden-field","Number is equal to"),value:"equal"},{label:o("block:hidden-field","Number is not equal to"),value:"not-equal"},{label:o("block:hidden-field","Number is lower than"),value:"below"},{label:o("block:hidden-field","Number is higher than"),value:"above"},{label:o("block:hidden-field","Number is between"),value:"between"},{label:o("block:hidden-field","Number is not between"),value:"not-between"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:hidden-field","If number equals");break;case"not-equal":t.title=o("block:hidden-field","If number not equals");break;case"below":t.title=o("block:hidden-field","If number is lower than");break;case"above":t.title=o("block:hidden-field","If number is higher than");break;case"between":t.title=o("block:hidden-field","If number is between");break;case"not-between":t.title=o("block:hidden-field","If number is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=new L.Numeric(n(c)?c:0).label(o("block:hidden-field","Use fixed number")).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),u=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!1,null===(s=this.slot)||void 0===s?void 0:s.id),d=new L.Dropdown(u,i(c)?c:"").label(o("block:hidden-field","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:hidden-field","Number"),value:"number"},{label:o("block:hidden-field","Value"),value:"variable",disabled:0===u.length}],i(c)?"variable":"number").on((e=>{r.visible("number"===e.value),d.visible("variable"===e.value),r.isObservable&&r.focus()})),r,d]}).visible(l)},t=e("value",o("block:hidden-field","If number equals"),!0),l=e("to",o("block:hidden-field","And"),"between"===this.mode||"not-between"===this.mode)}};Oo([h,g("#name")],Po.prototype,"mode",void 0),Oo([h,g("#name")],Po.prototype,"value",void 0),Oo([h,g("#name")],Po.prototype,"to",void 0),Oo([m],Po.prototype,"defineEditor",null),Po=Oo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-hidden-field",identifier:"@tripetto/block-hidden-field:number",alias:"@tripetto/block-hidden-field-number",version:"6.2.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsI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xMjEgNzkgMjAwIDIwMCAyMDBoMjAwYzEyMSAwIDIwMC03OSAyMDAtMjAwdi00MDB6bTIwMCAwdjQwMGMwIDIzMS0xNjkgNDAwLTQwMCA0MDBoLTIwMGMtMjMxIDAtNDAwLTE2OS00MDAtNDAwdi00MDBjMC0yMzEgMTY5LTQwMCA0MDAtNDAwaDIwMGMyMzEgMCA0MDAgMTY5IDQwMCA0MDB6Ii8+PC9zdmc+",autoOpen:!0,get label(){return o("block:hidden-field","Compare value")}})],Po);let Zo=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.orientation="landscape"}get label(){return""}get name(){return this.slot?`@${this.slot.id} = ${"landscape"===this.orientation?o("block:hidden-field","Landscape"):o("block:hidden-field","Portrait")}`:this.type.label}defineEditor(){this.editor.form({controls:[new L.Radiobutton([{label:o("block:hidden-field","Landscape"),value:"landscape"},{label:o("block:hidden-field","Portrait"),value:"portrait"}],L.Radiobutton.bind(this,"orientation","landscape"))]})}};var Vo;Oo([h,g("#name")],Zo.prototype,"orientation",void 0),Oo([m],Zo.prototype,"defineEditor",null),Zo=Oo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-hidden-field",identifier:"@tripetto/block-hidden-field:orientation",alias:"@tripetto/block-hidden-field-orientation",version:"6.2.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEwLjUgMThoLTFhLjUuNSAwIDAgMSAwLTFoMWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE0LjUgMjBoLTljLS44MjcgMC0xLjUtLjY3My0xLjUtMS41di0xN0M0IC42NzMgNC42NzMgMCA1LjUgMGg5Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTdjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6bS05LTE5YS41LjUgMCAwIDAtLjUuNXYxN2EuNS41IDAgMCAwIC41LjVoOWEuNS41IDAgMCAwIC41LS41di0xN2EuNS41IDAgMCAwLS41LS41aC05eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48cGF0aCBkPSJNMTMuNSAxNmgtN2EuNS41IDAgMCAxLS41LS41di0xM2EuNS41IDAgMCAxIC41LS41aDdhLjUuNSAwIDAgMSAuNS41djEzYS41LjUgMCAwIDEtLjUuNXpNNyAxNWg2VjNIN3YxMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:hidden-field","Orientation")}})],Zo);let Ro=Vo=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Date){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:hidden-field","or")} @${e.id} > ${this.parse(e,this.to)}`;case"before":case"after":case"equal":case"not-equal":return`@${e.id} ${"after"===this.mode?">":"before"===this.mode?"<":"not-equal"===this.mode?"≠":"="} ${t}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}static getToday(e){return j.UTCToday+("end"===e?86399999:0)}parse(e,t){var o;return n(t)?s.locale.dateTimeShort(e.toValue(t),!0):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:hidden-field","Compare mode"),controls:[new L.Radiobutton([{label:o("block:hidden-field","Date is equal to"),value:"equal"},{label:o("block:hidden-field","Date is not equal to"),value:"not-equal"},{label:o("block:hidden-field","Date is before"),value:"before"},{label:o("block:hidden-field","Date is after"),value:"after"},{label:o("block:hidden-field","Date is between"),value:"between"},{label:o("block:hidden-field","Date is not between"),value:"not-between"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:hidden-field","If date equals");break;case"not-equal":t.title=o("block:hidden-field","If date not equals");break;case"before":t.title=o("block:hidden-field","If date is before");break;case"after":t.title=o("block:hidden-field","If date is after");break;case"between":t.title=o("block:hidden-field","If date is between");break;case"not-between":t.title=o("block:hidden-field","If date is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=H(this,(e=>e instanceof a.Date),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),u=new L.DateTime(n(c)?c:Vo.getToday("to"===e?"end":"begin")).label(o("block:hidden-field","Use fixed date/time")).features(9).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).zone("UTC").width("full").required().on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=new L.Dropdown(r,i(c)?c:"").label(o("block:hidden-field","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:hidden-field","Fixed date/time"),value:"date"},{label:o("block:hidden-field","Value"),value:"variable",disabled:0===r.length}],i(c)?"variable":"date").on((e=>{u.visible("date"===e.value),d.visible("variable"===e.value)})),u,d]}).visible(l)},t=e("value",o("block:hidden-field","If date equals"),!0),l=e("to",o("block:hidden-field","And"),"between"===this.mode||"not-between"===this.mode)}};function Wo(e){switch(e){case"value":return o("block:hidden-field","Fixed value");case"uuid":return o("block:hidden-field","Random value");case"timestamp":return o("block:hidden-field","Timestamp");case"variable":return o("block:hidden-field","Global JavaScript variable");case"language":return o("block:hidden-field","User language");case"querystring":return o("block:hidden-field","Query string");case"cookie":return o("block:hidden-field","Cookie");case"localStorage":return o("block:hidden-field","Local storage");case"sessionStorage":return o("block:hidden-field","Session storage");case"user-agent":return o("block:hidden-field","User-Agent string");case"title":return o("block:hidden-field","Page title");case"url":return o("block:hidden-field","Page URL");case"referrer":return o("block:hidden-field","Page referrer");case"screenOrientation":return o("block:hidden-field","Screen orientation");case"screenWidth":return o("block:hidden-field","Screen width");case"screenHeight":return o("block:hidden-field","Screen height");case"devicePixelRatio":return o("block:hidden-field","Screen pixel ratio");default:if(0===e.indexOf("custom-variable:")&&Fo.customVariables){const t=G(Fo.customVariables.variables,(t=>t.name===e.replace("custom-variable:","")));if(t&&t.description)return t.description}return o("block:hidden-field","Unknown")}}function Go(e){switch(e){case"value":return o("block:hidden-field","Defines a fixed value for the hidden field.");case"uuid":return o("block:hidden-field","Retrieves a random string value.");case"timestamp":return o("block:hidden-field","Retrieves the current date and time.");case"variable":return o("block:hidden-field","Retrieves a JavaScript global variable (only string values are supported).");case"language":return o("block:hidden-field","Retrieves the preferred language of the user.");case"querystring":return o("block:hidden-field","Retrieves the complete query string or a specific query string parameter value.");case"cookie":return o("block:hidden-field","Read one or all cookies associated with the document.");case"localStorage":return o("block:hidden-field","Retrieves an item from the browser local storage (localStorage).");case"sessionStorage":return o("block:hidden-field","Retrieves an item from the browser session storage (sessionStorage).");case"user-agent":return o("block:hidden-field","Retrieves the browser User-Agent string.");case"title":return o("block:hidden-field","Retrieves the title of the page.");case"url":return o("block:hidden-field","Retrieves the URL of the page.");case"referrer":return o("block:hidden-field","Retrieves the URL of the page that linked to this page.");case"screenOrientation":return o("block:hidden-field","Retrieves the current orientation of the screen (landscape or portrait).");case"screenWidth":return o("block:hidden-field","Retrieves the width of the screen in pixels.");case"screenHeight":return o("block:hidden-field","Retrieves the height of the screen in pixels.");case"devicePixelRatio":return o("block:hidden-field","Retrieves the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.");default:if(0===e.indexOf("custom-variable:")&&Fo.customVariables){const t=G(Fo.customVariables.variables,(t=>t.name===e.replace("custom-variable:","")));if(t&&t.description)return o("block:hidden-field","Retrieves the value of *%1*.",t.description)}return o("block:hidden-field","Invalid type.")}}var Qo;Oo([h,g("#name")],Ro.prototype,"mode",void 0),Oo([h,g("#name")],Ro.prototype,"value",void 0),Oo([h,g("#name")],Ro.prototype,"to",void 0),Oo([m],Ro.prototype,"defineEditor",null),Ro=Vo=Oo([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-hidden-field",identifier:"@tripetto/block-hidden-field:date",version:"6.2.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgMkgxNnYtLjVhLjUuNSAwIDAgMC0xIDBWMkg1di0uNWEuNS41IDAgMCAwLTEgMFYySDEuNUMuNjczIDIgMCAyLjY3MyAwIDMuNXYxNGMwIC44MjcuNjczIDEuNSAxLjUgMS41aDE3Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0xNGMwLS44MjctLjY3My0xLjUtMS41LTEuNXptLTE3IDFINHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gxMHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gyLjVhLjUuNSAwIDAgMSAuNS41VjZIMVYzLjVhLjUuNSAwIDAgMSAuNS0uNXptMTcgMTVoLTE3YS41LjUgMCAwIDEtLjUtLjVWN2gxOHYxMC41YS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTguNSAxNS41YS41MDIuNTAyIDAgMCAxLS4zNTQtLjE0NmwtMi0yYS41LjUgMCAwIDEgLjcwNy0uNzA3bDEuNjQ2IDEuNjQ2IDQuNjQ2LTQuNjQ2YS41LjUgMCAwIDEgLjcwNy43MDdsLTUgNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",autoOpen:!0,get label(){return o("block:hidden-field","Verify date")}})],Ro);let Fo=Qo=class extends C{constructor(){super(...arguments),this.allowMarkdown=!1,this.fieldType="value"}get label(){let e=this.type.label+" / "+Wo(this.fieldType);return this.fieldQueryStringParameter&&(e+=" / "+this.fieldQueryStringParameter),this.fieldCookie&&(e+=" / "+this.fieldCookie),this.fieldLocalStorage&&(e+=" / "+this.fieldLocalStorage),this.fieldSessionStorage&&(e+=" / "+this.fieldSessionStorage),this.fieldVariable&&(e+=" / "+this.fieldVariable),e}defineSlot(){const e=this.slots.select("value","static");switch(this.fieldType){case"devicePixelRatio":case"screenWidth":case"screenHeight":this.fieldSlot=this.slots.static({type:a.Number,reference:"value",label:this.label,required:this.required,alias:this.alias,exportable:this.exportable,protected:!0,exchange:["required","alias","exportable"]});break;case"timestamp":this.fieldSlot=this.slots.static({type:a.Date,reference:"value",label:this.label,required:this.required,alias:this.alias,exportable:this.exportable,protected:!0,exchange:["required","alias","exportable"]});break;default:this.fieldSlot=this.slots.static({type:a.String,reference:"value",label:this.label,required:this.required,alias:this.alias,exportable:this.exportable,protected:!e||e.protected,exchange:["required","alias","exportable"]})}}defineEditor(){const e=new L.Static(Go(this.fieldType)).markdown(),t=(...e)=>ie(e,(e=>({label:Wo(e),value:e}))),l=Z("block:hidden-field");this.editor.form({title:o("block:hidden-field","Explanation"),controls:[new L.Static(o("block:hidden-field","Generate a hidden field with a certain value and use that value in your form%1.",l?` ([${o("block:hidden-field","learn more")}](${l}))`:"")).markdown()]}),this.editor.name(!1,!1,o("block:hidden-field","Name"),!1),this.editor.option({name:o("block:hidden-field","Type"),form:{title:o("block:hidden-field","Type of field"),controls:[new L.Dropdown([...Qo.customVariables?[{optGroup:Qo.customVariables.name},...ie(Qo.customVariables.variables,(e=>({label:e.description,value:`custom-variable:${e.name}`})))]:[],{optGroup:o("block:hidden-field","Basic fields")},...t("value","timestamp","uuid","variable"),{optGroup:o("block:hidden-field","Browser information")},...t("language","querystring","cookie","localStorage","sessionStorage","user-agent"),{optGroup:o("block:hidden-field","Page information")},...t("title","url","referrer"),{optGroup:o("block:hidden-field","Screen information")},...t("screenOrientation","screenWidth","screenHeight","devicePixelRatio")],L.Radiobutton.bind(this,"fieldType","value")).on((t=>{e.label(Go(this.fieldType)),n.visible("value"===t.value),n.activated("value"===t.value),s.visible("querystring"===t.value),s.activated("querystring"===t.value&&i(this.fieldQueryStringParameter)),c.visible("cookie"===t.value),c.activated("cookie"===t.value&&i(this.fieldCookie)),r.visible("localStorage"===t.value),r.activated("localStorage"===t.value),u.visible("sessionStorage"===t.value),u.activated("sessionStorage"===t.value),d.visible("variable"===t.value),d.activated("variable"===t.value)}))]},activated:!0,locked:!0}),this.editor.form({title:o("block:hidden-field","Function"),controls:[e]});const a=(e,t,o,i,l,a=i)=>this.editor.option({name:e,form:{title:t,controls:[new L.Text("singleline",L.Text.bind(this,o,void 0))]},activated:i,locked:l}).visible(a),n=this.editor.option({name:o("block:hidden-field","Value"),form:{title:o("block:hidden-field","Fixed value"),controls:[new L.Text("multiline",L.Text.bind(this,"fieldValue",void 0)).action("@",T(this,"validated"))]},activated:"value"===this.fieldType,locked:!0}),s=a(o("block:hidden-field","Parameter"),o("block:hidden-field","Query string parameter"),"fieldQueryStringParameter","querystring"===this.fieldType&&i(this.fieldQueryStringParameter),!1,"querystring"===this.fieldType),c=a(o("block:hidden-field","Cookie"),o("block:hidden-field","Cookie identifier"),"fieldCookie","cookie"===this.fieldType&&i(this.fieldCookie),!1,"cookie"===this.fieldType),r=a(o("block:hidden-field","Item"),o("block:hidden-field","Name of item from local storage"),"fieldLocalStorage","localStorage"===this.fieldType,!0),u=a(o("block:hidden-field","Item"),o("block:hidden-field","Name of item from session storage"),"fieldSessionStorage","sessionStorage"===this.fieldType,!0),d=a(o("block:hidden-field","Variable"),o("block:hidden-field","Name of variable"),"fieldVariable","variable"===this.fieldType,!0);this.editor.groups.options(),this.editor.required(this,o("block:hidden-field","Hidden field value is required")),this.editor.visibility(),this.editor.alias(this),this.editor.exportable(this)}defineCondition(){switch(this.fieldType){case"screenOrientation":E([{mode:"landscape",label:o("block:hidden-field","Landscape")},{mode:"portrait",label:o("block:hidden-field","Portrait")}],(e=>{this.conditions.template({condition:Zo,label:e.label,props:{slot:this.fieldSlot,orientation:e.mode}})}));break;case"screenWidth":case"screenHeight":case"devicePixelRatio":E([{mode:"equal",label:o("block:hidden-field","Number is equal to")},{mode:"not-equal",label:o("block:hidden-field","Number is not equal to")},{mode:"below",label:o("block:hidden-field","Number is lower than")},{mode:"above",label:o("block:hidden-field","Number is higher than")},{mode:"between",label:o("block:hidden-field","Number is between")},{mode:"not-between",label:o("block:hidden-field","Number is not between")}],(e=>{this.conditions.template({condition:Po,label:e.label,props:{slot:this.fieldSlot,mode:e.mode}})}));break;case"timestamp":E([{mode:"equal",label:o("block:hidden-field","Date is equal to")},{mode:"not-equal",label:o("block:hidden-field","Date is not equal to")},{mode:"before",label:o("block:hidden-field","Date is before")},{mode:"after",label:o("block:hidden-field","Date is after")},{mode:"between",label:o("block:hidden-field","Date is between")},{mode:"not-between",label:o("block:hidden-field","Date is not between")}],(e=>{this.conditions.template({condition:Ro,label:e.label,props:{slot:this.fieldSlot,mode:e.mode}})}));break;default:E([{mode:"equals",label:o("block:hidden-field","Value matches")},{mode:"not-equals",label:o("block:hidden-field","Value does not match")},{mode:"contains",label:o("block:hidden-field","Value contains")},{mode:"not-contains",label:o("block:hidden-field","Value does not contain")},{mode:"starts",label:o("block:hidden-field","Value starts with")},{mode:"ends",label:o("block:hidden-field","Value ends with")},{mode:"defined",label:o("block:hidden-field","Value is not empty")},{mode:"undefined",label:o("block:hidden-field","Value is empty")},{mode:"regex",label:o("block:hidden-field","Regular expression")}],(e=>{this.conditions.template({condition:Yo,label:e.label,props:{slot:this.fieldSlot,mode:e.mode}})}))}}};function Ho(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Oo([h,g("#name"),g("#slots")],Fo.prototype,"fieldType",void 0),Oo([h,g("#name")],Fo.prototype,"fieldValue",void 0),Oo([h,g("#name")],Fo.prototype,"fieldQueryStringParameter",void 0),Oo([h,g("#name")],Fo.prototype,"fieldCookie",void 0),Oo([h,g("#name")],Fo.prototype,"fieldLocalStorage",void 0),Oo([h,g("#name")],Fo.prototype,"fieldSessionStorage",void 0),Oo([h,g("#name")],Fo.prototype,"fieldVariable",void 0),Oo([h("boolean","optional"),g("#slots")],Fo.prototype,"required",void 0),Oo([h("string","optional"),g("#slots")],Fo.prototype,"alias",void 0),Oo([h("boolean","optional"),g("#slots")],Fo.prototype,"exportable",void 0),Oo([A],Fo.prototype,"defineSlot",null),Oo([m],Fo.prototype,"defineEditor",null),Oo([D],Fo.prototype,"defineCondition",null),Fo=Qo=Oo([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-hidden-field",version:"6.2.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE5Ljg3MiAxMC4xNjZjLS4wNDctLjA1My0xLjE4Mi0xLjMwNS0yLjk1Ni0yLjU3MmExNy42MSAxNy42MSAwIDAgMC0xLjgwMS0xLjEzNGwxLjcyNS0xLjU5MmEuNS41IDAgMSAwLS42NzktLjczNWwtMi4wMDMgMS44NDljLS4xMjQtLjA1Ni0uMjQ4LS4xMS0uMzcyLS4xNjJDMTIuNDgxIDUuMjc2IDExLjIwNyA1IDEwIDVzLTIuNDgxLjI3Ni0zLjc4Ni44MmMtMS4wMy40MjktMi4wODMgMS4wMjYtMy4xMyAxLjc3M0MxLjMxIDguODYuMTc1IDEwLjExMy4xMjggMTAuMTY1YS41LjUgMCAwIDAgMCAuNjY5Yy4wNDcuMDUzIDEuMTgyIDEuMzA1IDIuOTU2IDIuNTcyLjYuNDI5IDEuMjAyLjgwNyAxLjgwMSAxLjEzNEwzLjE2IDE2LjEzMmEuNS41IDAgMSAwIC42NzkuNzM1bDIuMDAzLTEuODQ5Y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gzYS41LjUgMCAwIDAgLjUtLjV2LTUuNWg3LjVhLjUuNSAwIDAgMCAuNS0uNWMwLTIuNzg1LS4zMDctNC45OS0uOTEyLTYuNTU1ek0yIDE0SDFWNGgxdjEwem05IDVIOXYtNWgydjV6bS04LTZWNWgxMi40NzRjMi43OSAwIDMuNDY5IDQuMjM2IDMuNTIyIDhIMi45OTl6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik0xMy41IDdINy45MTRjLS4yMDYtLjU4Mi0uNzYyLTEtMS40MTQtMUM1LjY3MyA2IDUgNi42NzMgNSA3LjVTNS42NzMgOSA2LjUgOWMuNjUyIDAgMS4yMDgtLjQxOCAxLjQxNC0xSDExdjMuNWEuNS41IDAgMCAwIC41LjVoMmEuNS41IDAgMCAwIC41LS41di00YS41LjUgMCAwIDAtLjUtLjV6bS03IDFhLjUuNSAwIDEgMSAwLTEgLjUuNSAwIDAgMSAwIDF6bTYuNSAzaC0xVjhoMXYzeiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=";let Xo=class extends F{constructor(){super(...arguments),this.willMail=!0}get icon(){return this.willMail?qo:$o}get name(){return this.willMail?o("block:mailer","Mail will be sent"):o("block:mailer","No mail will be sent")}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}};Ho([h,g("#name")],Xo.prototype,"willMail",void 0),Xo=Ho([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-mailer",identifier:"@tripetto/block-mailer",version:"6.0.3",icon:Bo,get label(){return o("block:mailer","Mail status")}})],Xo);let Jo=class extends C{constructor(){super(...arguments),this.allowMarkdown=!1,this.recipient=""}defineSlot(){this.recipientSlot=this.slots.static({type:a.String,reference:"recipient",label:o("block:mailer","Recipient"),alias:this.alias,exportable:this.recipientExportable,actionable:!0}),this.slots.static({type:a.String,reference:"subject",label:o("block:mailer","Subject"),alias:this.alias,exportable:this.subjectExportable,actionable:!0}),this.slots.static({type:a.Text,reference:"message",label:o("block:mailer","Message"),alias:this.alias,exportable:this.messageExportable,actionable:!0}),this.sender?this.slots.static({type:a.String,reference:"sender",label:o("block:mailer","Sender"),alias:this.alias,exportable:this.senderExportable,actionable:!0}):this.slots.delete("sender"),this.includeData?this.slots.static({type:a.Boolean,reference:"data",label:"Data",pipeable:!1,exportable:!1,actionable:!0}):this.slots.delete("data")}defineEditor(){var e;const t=le(W(this,{blocks:["@tripetto/block-email","@tripetto/block-hidden-field"],mode:"validated"}),(e=>!!e.id)),l=new L.Email(L.Email.bind(this,"recipientFixed",void 0,"")).placeholder(o("block:mailer","Type recipient email address here...")).autoValidate().require().visible("fixed"===this.recipient),a=new L.Email(L.Email.bind(this,"senderFixed",void 0,"")).placeholder(o("block:mailer","Type sender email address here...")).autoValidate().require().visible("fixed"===this.sender),n=Z("block:mailer"),s=Z("block:mailer:sender");this.editor.option({name:o("block:mailer","Recipient"),form:{title:o("block:mailer","Recipient"),controls:[new L.Static(o("block:mailer","This block sends an email to the specified recipient. You can use any email block to define the recipient, as long as the block is inserted before this block. Supply a fixed recipient when the block should always mail to the same email address%1.",n?` ([${o("block:mailer","learn more")}](${n}))`:"")).markdown(),new L.Dropdown([...t.length>0?[{optGroup:o("block:mailer","Available email addresses")},...ie(t,(e=>({label:e.label,value:e.id||""}))),{optGroup:o("block:mailer","Other")}]:[],{label:o("block:mailer","Fixed recipient address"),value:"fixed"}],L.Dropdown.bind(this,"recipient","")).on((e=>{l.visible("fixed"===e.value)})),l]},activated:!0,locked:!0}),this.editor.name(!1,!1,o("block:mailer","Subject"),"validated"),this.editor.description(!0,o("block:mailer","Message"),"validated"),this.editor.groups.settings(),this.editor.option({name:o("block:mailer","Sender"),form:{title:o("block:mailer","Sender"),controls:[new L.Static(o("block:mailer","You can specify a sender address. This address will be used to set the reply-to header of the email%1.",s?` ([${o("block:mailer","learn more")}](${s}))`:"")).markdown(),new L.Dropdown([...t.length>0?[{optGroup:o("block:mailer","Available email addresses")},...ie(t,(e=>({label:e.label,value:e.id||""}))),{optGroup:o("block:mailer","Other")}]:[],{label:o("block:mailer","Fixed sender address"),value:"fixed"}],L.Dropdown.bind(this,"sender",void 0,"")).on((e=>{a.visible("fixed"===e.value)})),a]},activated:i(this.sender)}).onToggle((e=>{var t;r.card instanceof L.Form&&(null===(t=r.card.control(3))||void 0===t||t.visible(e.isActivated))})),this.editor.option({name:o("block:mailer","Form data"),form:{title:o("block:mailer","Append form data"),controls:[new L.Checkbox(o("block:mailer","Append all form data to the message"),L.Checkbox.bind(this,"includeData",void 0,!0)),new L.Static(o("block:mailer","This will append _all_ the exportable data of the form to the message. Useful, for example, if you want to send a copy of the form data to the respondent. If you just want to include certain form data, use the `@` sign in the message field.")).markdown()]},activated:$(this.includeData)}),this.editor.groups.options(),this.editor.visibility(),this.editor.alias(this);const c=this.editor.form({controls:[new L.Notification(o("block:mailer","By default the data generated by this block (recipient address, subject, message and optionally sender address) will not be stored in the dataset. To change this behavior, please use the *exportability* feature."),"info").markdown()]}).visible(!$(this.recipientExportable)),r=this.editor.exportable({ref:this,props:[{name:"recipientExportable",label:o("block:mailer","Include recipient address in the dataset")},{name:"subjectExportable",label:o("block:mailer","Include subject in the dataset")},{name:"messageExportable",label:o("block:mailer","Include message in the dataset")},{name:"senderExportable",label:o("block:mailer","Include sender address in the dataset")}]},!1).onToggle((e=>c.visible(!e.isActivated)));r.card instanceof L.Form&&(null===(e=r.card.control(3))||void 0===e||e.visible(i(this.sender)))}defineConditions(){E([{label:o("block:mailer","Mail will be sent"),icon:qo,willMail:!0},{label:o("block:mailer","No mail will be sent"),icon:$o,willMail:!1}],(e=>{this.conditions.template({condition:Xo,label:e.label,icon:e.icon,burst:!0,props:{slot:this.recipientSlot,willMail:e.willMail}})}))}};function _o(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Ho([h],Jo.prototype,"recipient",void 0),Ho([h],Jo.prototype,"recipientFixed",void 0),Ho([h,g("#slots")],Jo.prototype,"sender",void 0),Ho([h],Jo.prototype,"senderFixed",void 0),Ho([h,g("#slots")],Jo.prototype,"alias",void 0),Ho([h,g("#slots")],Jo.prototype,"includeData",void 0),Ho([h,g("#slots")],Jo.prototype,"recipientExportable",void 0),Ho([h,g("#slots")],Jo.prototype,"senderExportable",void 0),Ho([h,g("#slots")],Jo.prototype,"subjectExportable",void 0),Ho([h,g("#slots")],Jo.prototype,"messageExportable",void 0),Ho([A],Jo.prototype,"defineSlot",null),Ho([m],Jo.prototype,"defineEditor",null),Ho([D],Jo.prototype,"defineConditions",null),Jo=Ho([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-mailer",version:"6.0.3",icon:Bo,get label(){return o("block:mailer","Send email")},kind:"headless"})],Jo);let Ko=class extends e.Item{constructor(){super(...arguments),this.name=""}defineSlot(){return this.ref.slots.dynamic({type:a.String,reference:this.id,label:o("block:matrix","Matrix row"),sequence:this.index,name:this.name&&q(this.name,x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks)||void 0,alias:this.alias,exportable:this.ref.exportable,exchange:["alias","exportable"],pipeable:{label:o("block:matrix","Row"),legacy:"Row"}})}deleteSlot(){this.ref.slots.delete(this.id,"dynamic")}defineEditor(){this.editor.option({name:o("block:matrix","Row"),form:{title:o("block:matrix","Row name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:o("block:matrix","Description"),form:{title:o("block:matrix","Row description"),controls:[new L.Text("multiline",L.Text.bind(this,"explanation",void 0)).action("@",T(this))]},activated:i(this.explanation)}),this.editor.group(o("block:matrix","Options")),this.editor.option({name:o("block:matrix","Required"),form:{title:o("block:matrix","Required"),controls:[new L.Checkbox(o("block:matrix","Row is required and cannot be skipped"),L.Checkbox.bind(this.defineSlot(),"required",void 0,!0)).locked(this.ref&&$(this.ref.required)||!1).on((()=>this.refresh("name")))]},activated:$(this.defineSlot().required),disabled:this.ref&&$(this.ref.required)}),this.editor.option({name:o("block:matrix","Identifier"),form:{title:o("block:matrix","Row identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"alias",void 0)),new L.Static(o("block:matrix","If a row identifier is set, this identifier will be used instead of the label."))]},activated:i(this.alias)})}};_o([h("string"),u],Ko.prototype,"name",void 0),_o([h("string","optional"),X],Ko.prototype,"alias",void 0),_o([h("string","optional")],Ko.prototype,"explanation",void 0),_o([p,K,I,ee],Ko.prototype,"defineSlot",null),_o([v],Ko.prototype,"deleteSlot",null),_o([m],Ko.prototype,"defineEditor",null);let ei=class extends e.Item{constructor(){super(...arguments),this.label=""}defineEditor(){this.editor.option({name:o("block:matrix","Column"),form:{title:o("block:matrix","Column name"),controls:[new L.Text("singleline",L.Text.bind(this,"label","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.group(o("block:matrix","Options")),this.editor.option({name:o("block:matrix","Identifier"),form:{title:o("block:matrix","Column identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:matrix","If a column identifier is set, this identifier will be used instead of the label."))]},activated:i(this.value)});const e=this.ref.slots.select("score","feature");this.editor.option({name:o("block:matrix","Score"),form:{title:o("block:matrix","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==e?void 0:e.precision)||0).digits((null==e?void 0:e.digits)||0).decimalSign((null==e?void 0:e.decimal)||"").thousands(!!(null==e?void 0:e.separator),(null==e?void 0:e.separator)||"").prefix((null==e?void 0:e.prefix)||"").prefixPlural((null==e?void 0:e.prefixPlural)||void 0).suffix((null==e?void 0:e.suffix)||"").suffixPlural((null==e?void 0:e.suffixPlural)||void 0)]},activated:!0,locked:!!e,disabled:!e})}};_o([h("string"),u],ei.prototype,"label",void 0),_o([h("string","optional"),X],ei.prototype,"value",void 0),_o([h("number","optional"),J],ei.prototype,"score",void 0),_o([m],ei.prototype,"defineEditor",null);var ti="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjUgMmgtMTNDMi42NzMgMiAyIDIuNjczIDIgMy41djEzYzAgLjgyNy42NzMgMS41IDEuNSAxLjVoMTNjLjgyNyAwIDEuNS0uNjczIDEuNS0xLjV2LTEzYzAtLjgyNy0uNjczLTEuNS0xLjUtMS41em0uNSAxLjVWN2gtNFYzaDMuNWEuNS41IDAgMCAxIC41LjV6TTggMTJWOGg0djRIOHptNCAxdjRIOHYtNGg0em0tNS0xSDNWOGg0djR6bTEtNVYzaDR2NEg4em01IDFoNHY0aC00Vjh6TTMuNSAzSDd2NEgzVjMuNWEuNS41IDAgMCAxIC41LS41ek0zIDE2LjVWMTNoNHY0SDMuNWEuNS41IDAgMCAxLS41LS41em0xMy41LjVIMTN2LTRoNHYzLjVhLjUuNSAwIDAgMS0uNS41eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=";let oi=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0}get column(){return this.columnRef}set column(e){this.columnRef&&this.columnRef.unhookContext(this),this.columnRef=e,e&&(e.hook("OnRename","framed",(()=>this.rerender()),this),e.hook("OnDelete","framed",(()=>this.delete()),this))}get name(){return(this.row?q(this.row.name)+(this.column?` \`${S(this.column.label)}\``:""):"")||this.type.label}get title(){var e;return q((null===(e=this.row)||void 0===e?void 0:e.name)||"")}defineEditor(){const e=[];this.node&&this.node.block instanceof ai&&this.node.block.columns.each((t=>{(t.label||t===this.column)&&e.push({label:t.label,value:t})})),this.editor.form({controls:[new L.Dropdown(e,L.Dropdown.bind(this,"column",void 0))]})}};_o([g("#name"),_("#rows")],oi.prototype,"row",void 0),_o([g("#name"),_("#columns")],oi.prototype,"column",null),_o([m],oi.prototype,"defineEditor",null),oi=_o([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-matrix",identifier:"@tripetto/block-matrix",version:"6.0.0",icon:ti,get label(){return o("block:matrix","Matrix")}})],oi);var ii="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let li=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:matrix","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:matrix","calculated")}`;case"undefined":return`@${e.id} ${o("block:matrix","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:matrix","Compare mode"),controls:[new L.Radiobutton([{label:o("block:matrix","Score is equal to"),value:"equal"},{label:o("block:matrix","Score is not equal to"),value:"not-equal"},{label:o("block:matrix","Score is lower than"),value:"below"},{label:o("block:matrix","Score is higher than"),value:"above"},{label:o("block:matrix","Score is between"),value:"between"},{label:o("block:matrix","Score is not between"),value:"not-between"},{label:o("block:matrix","Score is calculated"),value:"defined"},{label:o("block:matrix","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:matrix","If score equals");break;case"not-equal":t.title=o("block:matrix","If score not equals");break;case"below":t.title=o("block:matrix","If score is lower than");break;case"above":t.title=o("block:matrix","If score is higher than");break;case"between":t.title=o("block:matrix","If score is between");break;case"not-between":t.title=o("block:matrix","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:matrix","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:matrix","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:matrix","Number"),value:"number"},{label:o("block:matrix","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:matrix","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:matrix","And"),"between"===this.mode||"not-between"===this.mode)}};_o([h,g("#name")],li.prototype,"mode",void 0),_o([h,g("#name")],li.prototype,"value",void 0),_o([h,g("#name")],li.prototype,"to",void 0),_o([m],li.prototype,"defineEditor",null),li=_o([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-matrix",identifier:"@tripetto/block-matrix:score",version:"6.0.0",icon:ii,get label(){return o("block:matrix","Verify score")}})],li);let ai=class extends C{constructor(){super(...arguments),this.columns=e.of(ei,this),this.rows=e.of(Ko,this)}get label(){return k("block:matrix","%2 (%1 row)","%2 (%1 rows)",this.rows.count,this.type.label)}defineEditor(){this.editor.name(),this.editor.description(),this.editor.explanation();const e=this.editor.collection({collection:this.rows,title:o("block:matrix","Rows"),placeholder:o("block:matrix","Unnamed row"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,indicator:e=>{var t;return!$(this.required)&&(null===(t=this.slots.select(e.id))||void 0===t?void 0:t.required)&&o("block:matrix","Required").toUpperCase()||void 0},emptyMessage:o("block:matrix","Click the + button to add a row...")}),t=this.editor.collection({collection:this.columns,title:o("block:matrix","Columns"),placeholder:o("block:matrix","Unnamed column"),autoOpen:!0,showAliases:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,sorting:"manual",emptyMessage:o("block:matrix","Click the + button to add a column...")});this.editor.groups.options(),this.editor.required(this,o("block:matrix","All rows need an answer"),(t=>{this.rows.each((e=>{e.defineSlot().required=t,e.refresh()})),e.refresh()})),this.editor.scores({target:this,collection:t,description:o("block:matrix","Generates a score based on the selected column for each row. Open the settings panel for each column to set the score.")}),this.editor.visibility(),this.editor.exportable(this)}defineConditions(){this.rows.each((e=>{if(e.name){const t=this.conditions.group(e.name,void 0,!0);this.columns.each((o=>{o.label&&t.template({condition:oi,label:o.label,burst:!0,props:{slot:this.slots.select(e.id),row:e,column:o}})}))}}));const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,ii,!1,!0);E([{mode:"equal",label:o("block:matrix","Score is equal to")},{mode:"not-equal",label:o("block:matrix","Score is not equal to")},{mode:"below",label:o("block:matrix","Score is lower than")},{mode:"above",label:o("block:matrix","Score is higher than")},{mode:"between",label:o("block:matrix","Score is between")},{mode:"not-between",label:o("block:matrix","Score is not between")},{mode:"defined",label:o("block:matrix","Score is calculated")},{mode:"undefined",label:o("block:matrix","Score is not calculated")}],(o=>{t.template({condition:li,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function ni(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}_o([h("columns"),te("#collection","rows")],ai.prototype,"columns",void 0),_o([h("items"),g("#name")],ai.prototype,"rows",void 0),_o([h("boolean","optional"),g("#required")],ai.prototype,"required",void 0),_o([h("boolean","optional"),g("#slots"),g("#collection","rows")],ai.prototype,"exportable",void 0),_o([m],ai.prototype,"defineEditor",null),_o([D],ai.prototype,"defineConditions",null),ai=_o([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-matrix",version:"6.0.0",icon:ti,get label(){return o("block:matrix","Matrix")}})],ai);let si=class extends e.Item{constructor(){super(...arguments),this.name=""}defineSlot(){const e=this.name&&q(this.name,x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:a.Boolean,reference:this.id,label:o("block:multi-select","Option"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:o("block:multi-select","Option"),content:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Option"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||o("block:multi-select","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||o("block:multi-select","Not selected")}deleteSlot(){this.ref.slots.delete(this.id,"dynamic")}defineEditor(){this.editor.option({name:o("block:multi-select","Name"),form:{title:o("block:multi-select","Option name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:o("block:multi-select","Description"),form:{title:o("block:multi-select","Description"),controls:[new L.Text("multiline",L.Text.bind(this,"description",void 0)).action("@",T(this))]},activated:i(this.description)}),this.editor.group(o("block:multi-select","Options")),this.editor.option({name:o("block:multi-select","Exclusivity"),form:{title:o("block:multi-select","Exclusivity"),controls:[new L.Checkbox(o("block:multi-select","Unselect all other options when selected"),L.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:$(this.exclusive)});const e=o("block:multi-select","Selected"),t=o("block:multi-select","Not selected");this.editor.option({name:o("block:multi-select","Labels"),form:{title:o("block:multi-select","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(e),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(t),new L.Static(o("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.",`**${e}**`,`**${t}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse)}),this.editor.option({name:o("block:multi-select","Identifier"),form:{title:o("block:multi-select","Identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:multi-select","If an option identifier is set, this identifier will be used instead of the label."))]},activated:i(this.value)});const l=this.ref.slots.select("score","feature");this.editor.option({name:o("block:multi-select","Score"),form:{title:o("block:multi-select","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==l?void 0:l.precision)||0).digits((null==l?void 0:l.digits)||0).decimalSign((null==l?void 0:l.decimal)||"").thousands(!!(null==l?void 0:l.separator),(null==l?void 0:l.separator)||"").prefix((null==l?void 0:l.prefix)||"").prefixPlural((null==l?void 0:l.prefixPlural)||void 0).suffix((null==l?void 0:l.suffix)||"").suffixPlural((null==l?void 0:l.suffixPlural)||void 0)]},activated:!0,locked:!!l,disabled:!l})}};ni([h("string"),u],si.prototype,"name",void 0),ni([h("string","optional")],si.prototype,"description",void 0),ni([h("string","optional"),X],si.prototype,"value",void 0),ni([h("string","optional"),g("#refresh")],si.prototype,"labelForTrue",void 0),ni([h("string","optional"),g("#refresh")],si.prototype,"labelForFalse",void 0),ni([h("number","optional"),J],si.prototype,"score",void 0),ni([h("boolean","optional"),g("#name")],si.prototype,"exclusive",void 0),ni([p,K,I,ee],si.prototype,"defineSlot",null),ni([v],si.prototype,"deleteSlot",null),ni([m],si.prototype,"defineEditor",null);var ci="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",ri="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let ui=class extends F{constructor(){super(...arguments),this.selected=!0}get icon(){return this.selected?ci:ri}get name(){var e;return q((null===(e=this.option)||void 0===e?void 0:e.name)||"")||this.type.label}defineEditor(){var e;this.editor.form({controls:[new L.Checkbox(q((null===(e=this.option)||void 0===e?void 0:e.name)||"")||o("block:multi-select","Option is selected"),L.Checkbox.bind(this,"selected",!0))]})}};ni([g("#name"),_("#options")],ui.prototype,"option",void 0),ni([g("#icon"),h],ui.prototype,"selected",void 0),ni([m],ui.prototype,"defineEditor",null),ui=ni([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select",version:"2.1.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjIzIDMuMzA3Yy0uMzk2LS4yNjgtLjk0OS0uNTA0LTEuNjQzLS43MDJDMTMuMjIxIDIuMjE1IDExLjQxNSAyIDkuNSAycy0zLjcyMi4yMTUtNS4wODcuNjA1Yy0uNjk0LjE5OC0xLjI0Ni40MzQtMS42NDMuNzAyLS42MzcuNDMtLjc3Ljg4Ni0uNzcgMS4xOTNWNWMwIC40MjguMzIxIDEuMTMzLjYzOSAxLjYwOWw0Ljg5MSA3LjMzNmMuMjUxLjM3Ni40NzEgMS4xMDMuNDcxIDEuNTU1djNhLjUuNSAwIDAgMCAuNzI0LjQ0N2wyLTFhLjUuNSAwIDAgMCAuMjc2LS40NDd2LTJjMC0uNDUyLjIyLTEuMTc5LjQ3MS0xLjU1NWw0Ljg5MS03LjMzNmMuMzE3LS40NzYuNjM5LTEuMTgyLjYzOS0xLjYwOXYtLjVjMC0uMzA3LS4xMzQtLjc2My0uNzctMS4xOTN6bS0xMS41NDIuMjZDNS45NjcgMy4yMDIgNy42NzYgMyA5LjUgM3MzLjUzNC4yMDEgNC44MTIuNTY3QzE1LjY5IDMuOTYxIDE2IDQuMzgzIDE2IDQuNXMtLjMxLjU0LTEuNjg4LjkzM0MxMy4wMzMgNS43OTggMTEuMzI0IDYgOS41IDZzLTMuNTM0LS4yMDEtNC44MTItLjU2N0MzLjMxIDUuMDM5IDMgNC42MTcgMyA0LjVzLjMxLS41NCAxLjY4OC0uOTMzem01Ljk1MSA5LjgyNGMtLjM1OC41MzctLjYzOSAxLjQ2NC0uNjM5IDIuMTA5djEuNjkxbC0xIC41VjE1LjVjMC0uNjQ2LS4yODEtMS41NzItLjYzOS0yLjEwOWwtNC44OC03LjMyYy4yNzQuMTE3LjU4NS4yMjYuOTMyLjMyNEM1Ljc3OSA2Ljc4NSA3LjU4NSA3IDkuNSA3czMuNzIyLS4yMTUgNS4wODctLjYwNWMuMzQ2LS4wOTkuNjU4LS4yMDcuOTMyLS4zMjVsLTQuODggNy4zMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:multi-select","Option")}})],ui);let di=class extends F{};di=ni([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select:none",version:"2.1.2",icon:ri,get label(){return o("block:multi-select","No options selected")}})],di);var bi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Mi=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:multi-select","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:multi-select","calculated")}`;case"undefined":return`@${e.id} ${o("block:multi-select","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:multi-select","Compare mode"),controls:[new L.Radiobutton([{label:o("block:multi-select","Score is equal to"),value:"equal"},{label:o("block:multi-select","Score is not equal to"),value:"not-equal"},{label:o("block:multi-select","Score is lower than"),value:"below"},{label:o("block:multi-select","Score is higher than"),value:"above"},{label:o("block:multi-select","Score is between"),value:"between"},{label:o("block:multi-select","Score is not between"),value:"not-between"},{label:o("block:multi-select","Score is calculated"),value:"defined"},{label:o("block:multi-select","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:multi-select","If score equals");break;case"not-equal":t.title=o("block:multi-select","If score not equals");break;case"below":t.title=o("block:multi-select","If score is lower than");break;case"above":t.title=o("block:multi-select","If score is higher than");break;case"between":t.title=o("block:multi-select","If score is between");break;case"not-between":t.title=o("block:multi-select","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:multi-select","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:multi-select","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:multi-select","Number"),value:"number"},{label:o("block:multi-select","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:multi-select","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:multi-select","And"),"between"===this.mode||"not-between"===this.mode)}};ni([h,g("#name")],Mi.prototype,"mode",void 0),ni([h,g("#name")],Mi.prototype,"value",void 0),ni([h,g("#name")],Mi.prototype,"to",void 0),ni([m],Mi.prototype,"defineEditor",null),Mi=ni([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select:score",version:"2.1.2",icon:bi,get label(){return o("block:multi-select","Verify score")}})],Mi);var hi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEwIDMuMDg2VjEuNWEuNS41IDAgMCAwLTEgMHYxLjU4NmMtLjU4Mi4yMDYtMSAuNzYyLTEgMS40MTRDOCA1LjMyNyA4LjY3MyA2IDkuNSA2UzExIDUuMzI3IDExIDQuNWMwLS42NTItLjQxOC0xLjIwOC0xLTEuNDE0ek05LjUgNWEuNS41IDAgMSAxIDAtMSAuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE2LjUgMWgtNC4xNzVDMTEuNTUyLjM3NSAxMC41NjkgMCA5LjUgMFM3LjQ0OC4zNzUgNi42NzUgMUgyLjVBMi41MDMgMi41MDMgMCAwIDAgMCAzLjV2MTRDMCAxOC44NzggMS4xMjIgMjAgMi41IDIwaDE0YzEuMzc4IDAgMi41LTEuMTIyIDIuNS0yLjV2LTE0QzE5IDIuMTIyI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bCIvPjwvc3ZnPg==";let gi=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:multi-select","or")} @${e.id} > ${this.parse(e,this.to)}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,(e=>s.locale.number(e,0,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:multi-select","Compare mode"),controls:[new L.Radiobutton([{label:o("block:multi-select","Counter is equal to"),value:"equal"},{label:o("block:multi-select","Counter is not equal to"),value:"not-equal"},{label:o("block:multi-select","Counter is lower than"),value:"below"},{label:o("block:multi-select","Counter is higher than"),value:"above"},{label:o("block:multi-select","Counter is between"),value:"between"},{label:o("block:multi-select","Counter is not between"),value:"not-between"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:multi-select","If counter equals");break;case"not-equal":t.title=o("block:multi-select","If counter not equals");break;case"below":t.title=o("block:multi-select","If counter is lower than");break;case"above":t.title=o("block:multi-select","If counter is higher than");break;case"between":t.title=o("block:multi-select","If counter is between");break;case"not-between":t.title=o("block:multi-select","If counter is not between")}}))]});const e=(e,t)=>{var l;const s=this[e],c=new L.Numeric(n(s)?s:0).label(o("block:multi-select","Use fixed number")).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),r=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(s)?s:void 0,!0,null===(l=this.slot)||void 0===l?void 0:l.id),u=new L.Dropdown(r,i(s)?s:"").label(o("block:multi-select","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:multi-select","Number"),value:"number"},{label:o("block:multi-select","Value"),value:"variable",disabled:0===r.length}],i(s)?"variable":"number").on((e=>{c.visible("number"===e.value),u.visible("variable"===e.value),c.isObservable&&c.focus()})),c,u]})},t=e("value",o("block:multi-select","If counter equals")),l=e("to",o("block:multi-select","And"))}};ni([h,g("#name")],gi.prototype,"mode",void 0),ni([h,g("#name")],gi.prototype,"value",void 0),ni([h,g("#name")],gi.prototype,"to",void 0),ni([m],gi.prototype,"defineEditor",null),gi=ni([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multi-select",identifier:"@tripetto/block-multi-select:counter",version:"2.1.2",icon:hi,get label(){return o("block:multi-select","Verify counter")}})],gi);let mi=class extends C{constructor(){super(...arguments),this.options=e.of(si,this)}get label(){return k("block:multi-select","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)}defineSlot(){this.slots.meta({type:a.Number,reference:"counter",label:o("block:multi-select","Counter"),exportable:!1,protected:!0}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:a.Text,reference:"concatenation",label:o("block:multi-select","Text value"),exportable:this.exportable,alias:this.alias,protected:!0}):this.slots.delete("concatenation","feature")}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation();const e=this.editor.collection({collection:this.options,title:o("block:multi-select","Options"),icon:ci,placeholder:o("block:multi-select","Unnamed option"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,indicator:e=>e.exclusive&&o("block:multi-select","Exclusive").toUpperCase()||void 0,emptyMessage:o("block:multi-select","Click the + button to add an option...")});this.editor.groups.settings();const t=new L.Numeric(L.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible(V(this.min)).indent(32).width(75).on((()=>{l.min(this.min||1)})),l=new L.Numeric(L.Numeric.bind(this,"max",void 0)).min(this.min||1).visible(V(this.max)).indent(32).width(75).on((()=>{t.max(this.max)}));this.editor.option({name:o("block:multi-select","Limits"),form:{title:o("block:multi-select","Limits"),controls:[new L.Checkbox(o("block:multi-select","Minimum number of selected options"),V(this.min)).on((e=>{t.visible(e.isChecked)})),t,new L.Checkbox(o("block:multi-select","Maximum number of selected options"),V(this.max)).on((e=>{l.visible(e.isChecked)})),l]},activated:V(this.max)||V(this.min)}),this.editor.option({name:o("block:multi-select","Randomization"),form:{title:o("block:multi-select","Randomization"),controls:[new L.Checkbox(o("block:multi-select","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();const a=o("block:multi-select","Selected"),n=o("block:multi-select","Not selected");this.editor.option({name:o("block:multi-select","Labels"),form:{title:o("block:multi-select","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(a),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new L.Static(o("block:multi-select","These labels will be used in the dataset and override the default values %1 and %2.",`**${a}**`,`**${n}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse)}),this.editor.scores({target:this,collection:e,description:o("block:multi-select","Generates a score based on the selected options. Open the settings panel for each option to set the individual score for that option.")});const s=this.editor.alias(this).disabled("concatenate"!==this.format&&"both"!==this.format),c=new L.Text("singleline",L.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label(o("block:multi-select","Use this separator:")),r=new L.Group([new L.Dropdown([{label:o("block:multi-select","Comma separated"),value:"comma"},{label:o("block:multi-select","Space separated"),value:"space"},{label:o("block:multi-select","List on multiple lines"),value:"list"},{label:o("block:multi-select","Bulleted list"),value:"bullets"},{label:o("block:multi-select","Numbered list"),value:"numbers"},{label:o("block:multi-select","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:o("block:multi-select","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:o("block:multi-select","Custom separator"),value:"custom"}],L.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label(o("block:multi-select","How to separate the selected options:")).on((e=>{c.visible("custom"===e.value)})),c]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:o("block:multi-select","Data format"),form:{title:o("block:multi-select","Data format"),controls:[new L.Radiobutton([{label:o("block:multi-select","Every option as a separate field"),description:o("block:multi-select","Every option is included in the dataset as a separate value."),value:"fields"},{label:o("block:multi-select","Text field with a list of all selected options"),description:o("block:multi-select","All the selected options are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:o("block:multi-select","Both options above"),description:o("block:multi-select","Includes every option in the dataset together with the concatenated text."),value:"both"}],L.Radiobutton.bind(this,"format",void 0,"fields")).label(o("block:multi-select","This setting determines how the data is stored in the dataset:")).on((e=>{r.visible("concatenate"===e.value||"both"===e.value),s.disabled("concatenate"!==this.format&&"both"!==this.format)})),r]},activated:i(this.format)}),this.editor.exportable(this)}defineConditions(){this.options.each((e=>{e.name&&this.conditions.template({condition:ui,markdown:e.name,icon:ci,burst:!0,props:{slot:this.slots.select(e.id),option:e,selected:!0}})})),this.options.count>0&&this.conditions.template({condition:di,separator:!0});const e=this.slots.select("counter","meta");if(e&&e.label){const t=this.conditions.group(e.label,hi);E([{mode:"equal",label:o("block:multi-select","Counter is equal to")},{mode:"not-equal",label:o("block:multi-select","Counter is not equal to")},{mode:"below",label:o("block:multi-select","Counter is lower than")},{mode:"above",label:o("block:multi-select","Counter is higher than")},{mode:"between",label:o("block:multi-select","Counter is between")},{mode:"not-between",label:o("block:multi-select","Counter is not between")}],(o=>{t.template({condition:gi,label:o.label,autoOpen:!0,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}const t=this.slots.select("score","feature");if(t&&t.label){const e=this.conditions.group(t.label,bi);E([{mode:"equal",label:o("block:multi-select","Score is equal to")},{mode:"not-equal",label:o("block:multi-select","Score is not equal to")},{mode:"below",label:o("block:multi-select","Score is lower than")},{mode:"above",label:o("block:multi-select","Score is higher than")},{mode:"between",label:o("block:multi-select","Score is between")},{mode:"not-between",label:o("block:multi-select","Score is not between")},{mode:"defined",label:o("block:multi-select","Score is calculated")},{mode:"undefined",label:o("block:multi-select","Score is not calculated")}],(o=>{e.template({condition:Mi,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:t,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function pi(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ni([h("items"),g("#name")],mi.prototype,"options",void 0),ni([h("boolean","optional"),g("#required"),g("#collection","options")],mi.prototype,"required",void 0),ni([h("number","optional")],mi.prototype,"min",void 0),ni([h("number","optional")],mi.prototype,"max",void 0),ni([h("string","optional"),g("#label"),g("#slots"),g("#collection","options")],mi.prototype,"alias",void 0),ni([h("boolean","optional"),g("#slots"),g("#collection","options")],mi.prototype,"exportable",void 0),ni([h("string","optional"),g("#collection","options")],mi.prototype,"labelForTrue",void 0),ni([h("string","optional"),g("#collection","options")],mi.prototype,"labelForFalse",void 0),ni([h("boolean","optional")],mi.prototype,"randomize",void 0),ni([h("string","optional"),g("#slots"),g("#collection","options")],mi.prototype,"format",void 0),ni([h("string","optional")],mi.prototype,"formatSeparator",void 0),ni([h("string","optional")],mi.prototype,"formatSeparatorCustom",void 0),ni([A],mi.prototype,"defineSlot",null),ni([m],mi.prototype,"defineEditor",null),ni([D],mi.prototype,"defineConditions",null),mi=ni([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-multi-select",version:"2.1.2",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggY2xhc3M9InRyaXBldHRvLWZpbGwiIGQ9Ik0xNC41IDUuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTItMmEuNS41IDAgMCAxIC43MDctLjcwN2wxLjY0NiAxLjY0NiAxLjY0Ni0xLjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC0yIDJhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6Ii8+PHBhdGggY2xhc3M9InRyaXBldHRvLWZpbGwiIGQ9Ik0xOC41IDBoLTE3Qy42NzMgMCAwIC42NzMgMCAxLjV2NUMwIDcuMzI3LjY3MyA4IDEuNSA4SDR2MTAuNWMwIC44MjcuNjczIDEuNSAxLjUgMS41aDEzYy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0xN2MwLS44MjctLjY3My0xLjUtMS41LTEuNXpNMSA2LjV2LTVhLjUuNSAwIDAgMSAuNS0uNWgxN2EuNS41IDAgMCAxIC41LjV2NWEuNS41IDAgMCAxLS41LjVoLTE3YS41LjUgMCAwIDEtLjUtLjV6TTE4LjUgMTloLTEzYS41LjUgMCAwIDEtLjUtLjVWOGgxMy41Yy4xNzUgMCAuMzQzLS4wMzEuNS0uMDg2VjE4LjVhLjUuNSAwIDAgMS0uNS41eiIvPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNy4yMDggMTEuNTYzYS4yMzcuMjM3IDAgMCAxLS4xNjctLjA2OWwtLjcwNy0uNzA3YS4yMzYuMjM2IDAgMCAxIC4zMzMtLjMzM2wuNTQuNTRMOS4xNjEgOS4wNGEuMjM2LjIzNiAwIDAgMSAuMzMzLjMzNGwtMi4xMiAyLjEyYS4yMzUuMjM1IDAgMCAxLS4xNjcuMDY5em0wIDMuMjQzYS4yMzcuMjM3IDAgMCAxLS4xNjctLjA2OWwtLjcwNy0uNzA3YS4yMzYuMjM2IDAgMCAxIC4zMzMtLjMzM2wuNTQuNTQgMS45NTQtMS45NTRhLjIzNi4yMzYgMCAwIDEgLjMzMy4zMzRsLTIuMTIgMi4xMmEuMjM1LjIzNSAwIDAgMS0uMTY3LjA2OXptMCAzLjA5NmEuMjM3LjIzNyAwIDAgMS0uMTY3LS4wNjlsLS43MDctLjcwN2EuMjM2LjIzNiAwIDAgMSAuMzMzLS4zMzNsLjU0LjU0IDEuOTU0LTEuOTU0YS4yMzYuMjM2IDAgMCAxIC4zMzMuMzM0bC0yLjEyIDIuMTJhLjIzNS4yMzUgMCAwIDEtLjE2Ny4wNjl6Ii8+PHJlY3QgY2xhc3M9InRyaXBldHRvLWZpbGwiIHg9IjEwLjg5IiB5PSI5Ljk5MSIgd2lkdGg9IjYuMiIgaGVpZ2h0PSIxIiByeD0iLjUiIHJ5PSIuNSIvPjxyZWN0IGNsYXNzPSJ0cmlwZXR0by1maWxsIiB4PSIxMC44OSIgeT0iMTMiIHdpZHRoPSI2LjIiIGhlaWdodD0iMSIgcng9Ii41IiByeT0iLjUiLz48cmVjdCBjbGFzcz0idHJpcGV0dG8tZmlsbCIgeD0iMTAuODkiIHk9IjE2IiB3aWR0aD0iNi4yIiBoZWlnaHQ9IjEiIHJ4PSIuNSIgcnk9Ii41Ii8+PC9zdmc+",get label(){return o("block:multi-select","Dropdown (multi-select)")}})],mi);let vi=class extends e.Item{constructor(){super(...arguments),this.name=""}defineSlot(){if(this.ref.multiple&&!i(this.url)){const e=this.name&&q(this.name,x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:a.Boolean,reference:this.id,label:o("block:multiple-choice","Choice"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:o("block:multiple-choice","Choice"),content:this.moniker?{string:e||"",markdown:this.moniker}:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Choice"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||o("block:multiple-choice","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||o("block:multiple-choice","Not selected")}else this.deleteSlot()}deleteSlot(){this.ref.slots.delete(this.id,"dynamic")}defineEditor(){this.editor.option({name:o("block:multiple-choice","Name"),form:{title:o("block:multiple-choice","Choice name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:o("block:multiple-choice","Description"),form:{title:o("block:multiple-choice","Choice description"),controls:[new L.Text("singleline",L.Text.bind(this,"description",void 0)).action("@",T(this))]},activated:i(this.description)}),this.editor.group(o("block:multiple-choice","Options"));const e=new L.Checkbox(o("block:multiple-choice","Open in new tab/window"),"self"!==this.target).on((e=>{this.target=e.isFeatureEnabled&&!e.isDisabled?e.isChecked?"blank":"self":void 0}));this.editor.option({name:o("block:multiple-choice","URL"),form:{title:o("block:multiple-choice","URL"),controls:[new L.Text("singleline",L.Text.bind(this,"url",void 0)).placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||(0===e.value.indexOf("mailto:")||0===e.value.indexOf("tel:"))&&e.value.length>10?"pass":"fail")).on((t=>{e.isDisabled=0===t.value.indexOf("mailto:")||0===t.value.indexOf("tel:")})),e,new L.Static(o("block:multiple-choice","If a URL is set, clicking the choice will open it. The choice cannot be selected as answer."))]},activated:i(this.url),on:e=>{t.disabled(e.isActivated),c.disabled(e.isActivated),l.disabled(e.isActivated||!this.ref.multiple),s.disabled(e.isActivated||!this.ref.multiple)}});const t=this.editor.option({name:o("block:multiple-choice","Moniker"),form:{title:o("block:multiple-choice","Choice moniker"),controls:[new L.Text("singleline",L.Text.bind(this,"moniker",void 0)).action("@",T(this)),new L.Static(o("block:multiple-choice","If a moniker is set, this moniker will be used when referred to this choice."))]},activated:i(this.moniker),disabled:i(this.url)});this.editor.option({name:o("block:multiple-choice","Color"),form:{title:o("block:multiple-choice","Choice color"),controls:[new L.ColorPicker(L.ColorPicker.bind(this,"color",void 0)).placeholder(o("block:multiple-choice","Select an alternative color for this choice")).swatches(!1,!0),new L.Static(o("block:multiple-choice","Here you can specify an alternative color for the choice button."))]},activated:i(this.color)});const l=this.editor.option({name:o("block:multiple-choice","Exclusivity"),form:{title:o("block:multiple-choice","Choice exclusivity"),controls:[new L.Checkbox(o("block:multiple-choice","Unselect all other selected choices when selected"),L.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:this.ref.multiple&&!i(this.url)&&$(this.exclusive)||!1,disabled:!this.ref.multiple||i(this.url)}),a=o("block:multiple-choice","Selected"),n=o("block:multiple-choice","Not selected"),s=this.editor.option({name:o("block:multiple-choice","Labels"),form:{title:o("block:multiple-choice","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(a),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(n),new L.Static(o("block:multiple-choice","These labels will be used in the dataset and override the default values %1 and %2.",`**${a}**`,`**${n}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse),disabled:!this.ref.multiple||i(this.url)}),c=this.editor.option({name:o("block:multiple-choice","Identifier"),form:{title:o("block:multiple-choice","Choice identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:multiple-choice","If a choice identifier is set, this identifier will be used instead of the label."))]},activated:i(this.value),disabled:i(this.url)}),r=this.ref.slots.select("score","feature");this.editor.option({name:o("block:multiple-choice","Score"),form:{title:o("block:multiple-choice","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0)]},activated:!0,locked:!!r,disabled:!r})}};pi([h("string"),u],vi.prototype,"name",void 0),pi([h("string","optional")],vi.prototype,"description",void 0),pi([h("string","optional"),g("#refresh")],vi.prototype,"url",void 0),pi([h("string","optional")],vi.prototype,"target",void 0),pi([h("string","optional"),g("#refresh")],vi.prototype,"moniker",void 0),pi([h("string","optional"),X],vi.prototype,"value",void 0),pi([h("string","optional"),g("#refresh")],vi.prototype,"labelForTrue",void 0),pi([h("string","optional"),g("#refresh")],vi.prototype,"labelForFalse",void 0),pi([h("number","optional"),J],vi.prototype,"score",void 0),pi([h("boolean","optional"),g("#name")],vi.prototype,"exclusive",void 0),pi([h("string","optional")],vi.prototype,"color",void 0),pi([p,K,I,ee],vi.prototype,"defineSlot",null),pi([v],vi.prototype,"deleteSlot",null),pi([m],vi.prototype,"defineEditor",null);var Ni="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEwIDIwYy0yLjY3MSAwLTUuMTgyLTEuMDQtNy4wNzEtMi45MjlTMCAxMi42NzEgMCAxMGMwLTIuNjcxIDEuMDQtNS4xODIgMi45MjktNy4wNzFTNy4zMjkgMCAxMCAwYzIuNjcxIDAgNS4xODIgMS4wNCA3LjA3MSAyLjkyOVMyMCA3LjMyOSAyMCAxMGMwIDIuNjcxLTEuMDQgNS4xODItMi45MjkgNy4wNzFTMTIuNjcxIDIwIDEwIDIwem0wLTE5Yy00Ljk2MyAwLTkgNC4wMzctOSA5czQuMDM3IDkgOSA5IDktNC4wMzcgOS05LTQuMDM3LTktOS05eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48cGF0aCBkPSJNMTAgMTZjLTMuMzA4IDAtNi0yLjY5Mi02LTZzMi42OTItNiA2LTYgNiAyLjY5MiA2IDYtMi42OTIgNi02IDZ6bTAtMTFjLTIuNzU3IDAtNSAyLjI0My01IDVzMi4yNDMgNSA1IDUgNS0yLjI0MyA1LTUtMi4yNDMtNS01LTV6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",wi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggY2xhc3M9InRyaXBldHRvLWZpbGwiIGQ9Ik0xOCAxOS41SDJjLS44MjcgMC0xLjUtLjY3My0xLjUtMS41VjJDLjUgMS4xNzMgMS4xNzMuNSAyIC41aDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTIgMS41YS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNVYyYS41LjUgMCAwIDAtLjUtLjV6Ii8+PHBhdGggY2xhc3M9InRyaXBldHRvLWZpbGwiIGQ9Ik04IDE0YS41MDIuNTAyIDAgMCAxLS4zNTQtLjE0NmwtMy0zYS41LjUgMCAwIDEgLjcwNy0uNzA3bDIuNjQ2IDIuNjQ2IDYuNjQ2LTYuNjQ2YS41LjUgMCAwIDEgLjcwNy43MDdsLTcgN2EuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnoiLz48L3N2Zz4=";let Ai=class extends F{get icon(){var e,t;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof xi&&(null===(t=this.node)||void 0===t?void 0:t.block.multiple)?wi:Ni}get name(){var e;return(null===(e=this.choice)||void 0===e?void 0:e.name)||this.type.label}get label(){var e;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof xi&&(this.node.block.alias||this.node.label)||""}get choices(){return this.node&&this.node.block instanceof xi&&this.node.block.choices||void 0}migrate(){var e;if(this.choice&&(null===(e=this.node)||void 0===e?void 0:e.block)instanceof xi){const e=this.node.block.slots,t=this.node.block.multiple?this.choice.id:"choice";return()=>{var o;return(null===(o=this.node)||void 0===o?void 0:o.block)instanceof xi&&(this.slot=e.select(t),!0)}}}defineEditor(){if(this.node&&this.choices){const e=[];this.choices.each((t=>{y(t.name)&&e.push({label:q(t.name),value:t})})),se(e)>0&&this.editor.form({title:this.node.label,controls:[new L.Dropdown(e,L.Dropdown.bind(this,"choice",void 0))]})}}};pi([g("#condition"),_("#choices")],Ai.prototype,"choice",void 0),pi([ne("slot")],Ai.prototype,"migrate",null),pi([m],Ai.prototype,"defineEditor",null),Ai=pi([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multiple-choice",identifier:"@tripetto/block-multiple-choice",version:"7.0.1",alias:"multiple-choice",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjIzIDMuMzA3Yy0uMzk2LS4yNjgtLjk0OS0uNTA0LTEuNjQzLS43MDJDMTMuMjIxIDIuMjE1IDExLjQxNSAyIDkuNSAycy0zLjcyMi4yMTUtNS4wODcuNjA1Yy0uNjk0LjE5OC0xLjI0Ni40MzQtMS42NDMuNzAyLS42MzcuNDMtLjc3Ljg4Ni0uNzcgMS4xOTNWNWMwIC40MjguMzIxIDEuMTMzLjYzOSAxLjYwOWw0Ljg5MSA3LjMzNmMuMjUxLjM3Ni40NzEgMS4xMDMuNDcxIDEuNTU1djNhLjUuNSAwIDAgMCAuNzI0LjQ0N2wyLTFhLjUuNSAwIDAgMCAuMjc2LS40NDd2LTJjMC0uNDUyLjIyLTEuMTc5LjQ3MS0xLjU1NWw0Ljg5MS03LjMzNmMuMzE3LS40NzYuNjM5LTEuMTgyLjYzOS0xLjYwOXYtLjVjMC0uMzA3LS4xMzQtLjc2My0uNzctMS4xOTN6bS0xMS41NDIuMjZDNS45NjcgMy4yMDIgNy42NzYgMyA5LjUgM3MzLjUzNC4yMDEgNC44MTIuNTY3QzE1LjY5IDMuOTYxIDE2IDQuMzgzIDE2IDQuNXMtLjMxLjU0LTEuNjg4LjkzM0MxMy4wMzMgNS43OTggMTEuMzI0IDYgOS41IDZzLTMuNTM0LS4yMDEtNC44MTItLjU2N0MzLjMxIDUuMDM5IDMgNC42MTcgMyA0LjVzLjMxLS41NCAxLjY4OC0uOTMzem01Ljk1MSA5LjgyNGMtLjM1OC41MzctLjYzOSAxLjQ2NC0uNjM5IDIuMTA5djEuNjkxbC0xIC41VjE1LjVjMC0uNjQ2LS4yODEtMS41NzItLjYzOS0yLjEwOWwtNC44OC03LjMyYy4yNzQuMTE3LjU4NS4yMjYuOTMyLjMyNEM1Ljc3OSA2Ljc4NSA3LjU4NSA3IDkuNSA3czMuNzIyLS4yMTUgNS4wODctLjYwNWMuMzQ2LS4wOTkuNjU4LS4yMDcuOTMyLS4zMjVsLTQuODggNy4zMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:multiple-choice","Choice")}})],Ai);let Ii=class extends F{};Ii=pi([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multiple-choice",identifier:"@tripetto/block-multiple-choice:undefined",version:"7.0.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0ibTEwLjcwNyAxMC41IDUuNjQ2LTUuNjQ2YS41LjUgMCAwIDA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LjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Li=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:multiple-choice","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:multiple-choice","calculated")}`;case"undefined":return`@${e.id} ${o("block:multiple-choice","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:multiple-choice","Compare mode"),controls:[new L.Radiobutton([{label:o("block:multiple-choice","Score is equal to"),value:"equal"},{label:o("block:multiple-choice","Score is not equal to"),value:"not-equal"},{label:o("block:multiple-choice","Score is lower than"),value:"below"},{label:o("block:multiple-choice","Score is higher than"),value:"above"},{label:o("block:multiple-choice","Score is between"),value:"between"},{label:o("block:multiple-choice","Score is not between"),value:"not-between"},{label:o("block:multiple-choice","Score is calculated"),value:"defined"},{label:o("block:multiple-choice","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:multiple-choice","If score equals");break;case"not-equal":t.title=o("block:multiple-choice","If score not equals");break;case"below":t.title=o("block:multiple-choice","If score is lower than");break;case"above":t.title=o("block:multiple-choice","If score is higher than");break;case"between":t.title=o("block:multiple-choice","If score is between");break;case"not-between":t.title=o("block:multiple-choice","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:multiple-choice","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:multiple-choice","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:multiple-choice","Number"),value:"number"},{label:o("block:multiple-choice","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:multiple-choice","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:multiple-choice","And"),"between"===this.mode||"not-between"===this.mode)}};pi([h,g("#name")],Li.prototype,"mode",void 0),pi([h,g("#name")],Li.prototype,"value",void 0),pi([h,g("#name")],Li.prototype,"to",void 0),pi([m],Li.prototype,"defineEditor",null),Li=pi([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multiple-choice",identifier:"@tripetto/block-multiple-choice:score",version:"7.0.1",icon:Di,get label(){return o("block:multiple-choice","Verify score")}})],Li);var ji="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIgNmEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDZMNi4xNDUuNjQ3YS41LjUgMCAwIDEgLjcwNy43MDdsLTQuNSA0LjVBLjQ5OC40OTggMCAwIDEgMS45OTggNnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAxM2EuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAyMGEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Si=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:multiple-choice","or")} @${e.id} > ${this.parse(e,this.to)}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,(e=>s.locale.number(e,0,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:multiple-choice","Compare mode"),controls:[new L.Radiobutton([{label:o("block:multiple-choice","Counter is equal to"),value:"equal"},{label:o("block:multiple-choice","Counter is not equal to"),value:"not-equal"},{label:o("block:multiple-choice","Counter is lower than"),value:"below"},{label:o("block:multiple-choice","Counter is higher than"),value:"above"},{label:o("block:multiple-choice","Counter is between"),value:"between"},{label:o("block:multiple-choice","Counter is not between"),value:"not-between"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:multiple-choice","If counter equals");break;case"not-equal":t.title=o("block:multiple-choice","If counter not equals");break;case"below":t.title=o("block:multiple-choice","If counter is lower than");break;case"above":t.title=o("block:multiple-choice","If counter is higher than");break;case"between":t.title=o("block:multiple-choice","If counter is between");break;case"not-between":t.title=o("block:multiple-choice","If counter is not between")}}))]});const e=(e,t)=>{var l;const s=this[e],c=new L.Numeric(n(s)?s:0).label(o("block:multiple-choice","Use fixed number")).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),r=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(s)?s:void 0,!0,null===(l=this.slot)||void 0===l?void 0:l.id),u=new L.Dropdown(r,i(s)?s:"").label(o("block:multiple-choice","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:multiple-choice","Number"),value:"number"},{label:o("block:multiple-choice","Value"),value:"variable",disabled:0===r.length}],i(s)?"variable":"number").on((e=>{c.visible("number"===e.value),u.visible("variable"===e.value),c.isObservable&&c.focus()})),c,u]})},t=e("value",o("block:multiple-choice","If counter equals")),l=e("to",o("block:multiple-choice","And"))}};pi([h,g("#name")],Si.prototype,"mode",void 0),pi([h,g("#name")],Si.prototype,"value",void 0),pi([h,g("#name")],Si.prototype,"to",void 0),pi([m],Si.prototype,"defineEditor",null),Si=pi([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-multiple-choice",identifier:"@tripetto/block-multiple-choice:counter",version:"7.0.1",icon:ji,get label(){return o("block:multiple-choice","Verify counter")}})],Si);let xi=class extends C{constructor(){super(...arguments),this.choices=e.of(vi,this)}get label(){return k("block:multiple-choice","%2 (%1 option)","%2 (%1 options)",this.choices.count,this.type.label)}defineSlot(){this.multiple?(this.slots.delete("choice","static"),this.slots.meta({type:a.Number,reference:"counter",label:o("block:multiple-choice","Counter"),exportable:!1,protected:!0}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:a.Text,reference:"concatenation",label:o("block:multiple-choice","Text value"),exportable:this.exportable,alias:this.alias,protected:!0}):this.slots.delete("concatenation","feature")):(this.slots.delete("counter","meta"),this.slots.delete("concatenation","feature"),this.slots.static({type:a.String,reference:"choice",label:o("block:multiple-choice","Choice"),alias:this.alias,required:this.required,exportable:this.exportable,exchange:["alias","required","exportable"]}))}defineEditor(){this.editor.name(!0,!0),this.editor.option({name:o("block:multiple-choice","Caption"),form:{title:o("block:multiple-choice","Caption"),controls:[new L.Text("multiline",L.Text.bind(this,"caption",void 0)).placeholder(o("block:multiple-choice","Type caption text here...")).action("@",T(this))]},activated:i(this.caption)}),this.editor.description(),this.editor.option({name:o("block:multiple-choice","Image"),form:{title:o("block:multiple-choice","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:multiple-choice","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:multiple-choice","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:multiple-choice","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.explanation();const e=this.editor.collection({collection:this.choices,title:o("block:multiple-choice","Choices"),placeholder:o("block:multiple-choice","Unnamed choice"),icon:this.multiple?wi:Ni,autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,sorting:"manual",indicator:e=>this.multiple&&e.exclusive&&o("block:multiple-choice","Exclusive").toUpperCase()||void 0,emptyMessage:o("block:multiple-choice","Click the + button to add a choice...")});this.editor.groups.settings(),this.editor.option({name:o("block:multiple-choice","Multiple select"),form:{title:o("block:multiple-choice","Multiple select"),controls:[new L.Checkbox(o("block:multiple-choice","Allow the selection of multiple choices"),L.Checkbox.bind(this,"multiple",void 0,!0)).on((()=>{a.disabled(!this.multiple),c.disabled(!this.multiple),b.disabled(!this.multiple),r.disabled(this.multiple&&"concatenate"!==this.format&&"both"!==this.format||!1),e.icon=this.multiple?wi:Ni,this.choices.each((e=>{!0===e.exclusive&&e.refresh("name")}))}))]},activated:$(this.multiple)});const t=new L.Numeric(L.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible(V(this.min)).indent(32).width(75).on((()=>{l.min(this.min||1)})),l=new L.Numeric(L.Numeric.bind(this,"max",void 0)).min(this.min||1).visible(V(this.max)).indent(32).width(75).on((()=>{t.max(this.max)})),a=this.editor.option({name:o("block:multiple-choice","Limits"),form:{title:o("block:multiple-choice","Limits"),controls:[new L.Checkbox(o("block:multiple-choice","Minimum number of selected choices"),V(this.min)).on((e=>{t.visible(e.isChecked)})),t,new L.Checkbox(o("block:multiple-choice","Maximum number of selected choices"),V(this.max)).on((e=>{l.visible(e.isChecked)})),l]},activated:V(this.max)||V(this.min),disabled:!this.multiple});this.editor.option({name:o("block:multiple-choice","Randomization"),form:{title:o("block:multiple-choice","Randomization"),controls:[new L.Checkbox(o("block:multiple-choice","Randomize the choices (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.option({name:o("block:multiple-choice","Alignment"),form:{title:o("block:multiple-choice","Alignment"),controls:[new L.Radiobutton([{label:o("block:multiple-choice","Vertical - Variable width"),description:o("block:multiple-choice","Display choices vertically (top-down). All choices have their own width."),value:!1},{label:o("block:multiple-choice","Vertical - Equal width"),description:o("block:multiple-choice","Display choices vertically (top-down). All choices have equal widths, determined by the widest choice."),value:"equal"},{label:o("block:multiple-choice","Vertical - Full width"),description:o("block:multiple-choice","Display choices vertically (top-down). All choices have 100% widths, with text centered."),value:"full"},{label:o("block:multiple-choice","Columns"),description:o("block:multiple-choice","Display choices in two columns. All choices have 100% widths inside their column. Both columns have 50% width."),value:"columns"},{label:o("block:multiple-choice","Horizontal"),description:o("block:multiple-choice","Display choices from left to right. All choices have their own width."),value:!0}],L.Radiobutton.bind(this,"alignment",void 0))]},activated:$(this.alignment)||"equal"===this.alignment||"full"===this.alignment||"columns"===this.alignment}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();const n=o("block:multiple-choice","Selected"),s=o("block:multiple-choice","Not selected"),c=this.editor.option({name:o("block:multiple-choice","Labels"),form:{title:o("block:multiple-choice","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(n),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(s),new L.Static(o("block:multiple-choice","These labels will be used in the dataset and override the default values %1 and %2.",`**${n}**`,`**${s}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse),disabled:!this.multiple});this.editor.scores({target:this,collection:e,description:o("block:multiple-choice","Generates a score based on the selected choices. Open the settings panel for each choice to set the individual score for that choice.")});const r=this.editor.alias(this).disabled(this.multiple&&"concatenate"!==this.format&&"both"!==this.format||!1),u=new L.Text("singleline",L.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label(o("block:multiple-choice","Use this separator:")),d=new L.Group([new L.Dropdown([{label:o("block:multiple-choice","Comma separated"),value:"comma"},{label:o("block:multiple-choice","Space separated"),value:"space"},{label:o("block:multiple-choice","List on multiple lines"),value:"list"},{label:o("block:multiple-choice","Bulleted list"),value:"bullets"},{label:o("block:multiple-choice","Numbered list"),value:"numbers"},{label:o("block:multiple-choice","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:o("block:multiple-choice","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:o("block:multiple-choice","Custom separator"),value:"custom"}],L.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label(o("block:multiple-choice","How to separate the selected choices:")).on((e=>{u.visible("custom"===e.value)})),u]).visible("concatenate"===this.format||"both"===this.format),b=this.editor.option({name:o("block:multiple-choice","Data format"),form:{title:o("block:multiple-choice","Data format"),controls:[new L.Radiobutton([{label:o("block:multiple-choice","Every choice as a separate field"),description:o("block:multiple-choice","Every choice is included in the dataset as a separate value."),value:"fields"},{label:o("block:multiple-choice","Text field with a list of all selected choices"),description:o("block:multiple-choice","All the selected choices are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:o("block:multiple-choice","Both options above"),description:o("block:multiple-choice","Includes every choice in the dataset together with the concatenated text."),value:"both"}],L.Radiobutton.bind(this,"format",void 0,"fields")).label(o("block:multiple-choice","This setting determines how the data is stored in the dataset:")).on((e=>{d.visible("concatenate"===e.value||"both"===e.value),r.disabled(this.multiple&&"concatenate"!==this.format&&"both"!==this.format||!1)})),d]},activated:i(this.format),disabled:!this.multiple});this.editor.exportable(this)}defineConditions(){this.choices.each((e=>{e.name&&!i(e.url)&&this.conditions.template({condition:Ai,label:e.name,icon:this.multiple?wi:Ni,burst:"branch",props:{choice:e,slot:this.slots.select(this.multiple?e.id:"choice")}})})),this.choices.count>0&&this.conditions.template({condition:Ii,separator:!0});const e=this.slots.select("counter","meta");if(e&&e.label){const t=this.conditions.group(e.label,ji);E([{mode:"equal",label:o("block:multiple-choice","Counter is equal to")},{mode:"not-equal",label:o("block:multiple-choice","Counter is not equal to")},{mode:"below",label:o("block:multiple-choice","Counter is lower than")},{mode:"above",label:o("block:multiple-choice","Counter is higher than")},{mode:"between",label:o("block:multiple-choice","Counter is between")},{mode:"not-between",label:o("block:multiple-choice","Counter is not between")}],(o=>{t.template({condition:Si,label:o.label,autoOpen:!0,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}const t=this.slots.select("score","feature");if(t&&t.label){const e=this.conditions.group(t.label,Di);E([{mode:"equal",label:o("block:multiple-choice","Score is equal to")},{mode:"not-equal",label:o("block:multiple-choice","Score is not equal to")},{mode:"below",label:o("block:multiple-choice","Score is lower than")},{mode:"above",label:o("block:multiple-choice","Score is higher than")},{mode:"between",label:o("block:multiple-choice","Score is between")},{mode:"not-between",label:o("block:multiple-choice","Score is not between")},{mode:"defined",label:o("block:multiple-choice","Score is calculated")},{mode:"undefined",label:o("block:multiple-choice","Score is not calculated")}],(o=>{e.template({condition:Li,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:t,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function ki(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}pi([h("string","optional")],xi.prototype,"caption",void 0),pi([h("string","optional")],xi.prototype,"imageURL",void 0),pi([h("string","optional")],xi.prototype,"imageWidth",void 0),pi([h("boolean","optional")],xi.prototype,"imageAboveText",void 0),pi([h("items"),g("#name"),te("#slot","choice")],xi.prototype,"choices",void 0),pi([h("boolean","optional"),g("#slots"),g("#collection","choices")],xi.prototype,"multiple",void 0),pi([h("number","optional")],xi.prototype,"min",void 0),pi([h("number","optional")],xi.prototype,"max",void 0),pi([h("alignment","optional")],xi.prototype,"alignment",void 0),pi([h("boolean","optional"),g("#required"),g("#slots"),g("#collection","choices")],xi.prototype,"required",void 0),pi([h("string","optional"),g("#slots"),g("#collection","choices"),g("#label")],xi.prototype,"alias",void 0),pi([h("boolean","optional"),g("#slots"),g("#collection","choices")],xi.prototype,"exportable",void 0),pi([h("string","optional"),g("#collection","choices")],xi.prototype,"labelForTrue",void 0),pi([h("string","optional"),g("#collection","choices")],xi.prototype,"labelForFalse",void 0),pi([h("boolean","optional")],xi.prototype,"randomize",void 0),pi([h("string","optional"),g("#slots"),g("#collection","choices")],xi.prototype,"format",void 0),pi([h("string","optional")],xi.prototype,"formatSeparator",void 0),pi([h("string","optional")],xi.prototype,"formatSeparatorCustom",void 0),pi([A],xi.prototype,"defineSlot",null),pi([m],xi.prototype,"defineEditor",null),pi([D],xi.prototype,"defineConditions",null),xi=pi([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-multiple-choice",version:"7.0.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaH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jcuNjczLTEuNSAxLjUtMS41aDZjLjgyNyAwIDEuNS42NzMgMS41IDEuNXY2YzAgLjgyNy0uNjczIDEuNS0xLjUgMS41em0tNi04YS41LjUgMCAwIDAtLjUuNXY2YS41LjUgMCAwIDAgLjUuNWg2YS41LjUgMCAwIDAgLjUtLjV2LTZhLjUuNSAwIDAgMC0uNS0uNWgtNnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTYuNSA2aC00YS41LjUgMCAwIDEgMC0xaDRhLjUuNSAwIDAgMSAwIDF6bTAgOUg1di0xLjVhLjUuNSAwIDAgMC0xIDBWMTVIMi41YS41LjUgMCAwIDAgMCAxSDR2MS41YS41LjUgMCAwIDAgMSAwVjE2aDEuNWEuNS41IDAgMCAwIDAtMXptMTEgNWgtNmMtLjgyNyAwLTEuNS0uNjczLTEuNS0xLjV2LTE2YzAtLjgyNy42NzMtMS41IDEuNS0xLjVoNmMuODI3IDAgMS41LjY3MyAxLjUgMS41djE2YzAgLjgyNy0uNjczIDEuNS0xLjUgMS41em0tNi0xOGEuNS41IDAgMCAwLS41LjV2MTZhLjUuNSAwIDAgMCAuNS41aDZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtNnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE2LjUgMTBoLTRhLjUuNSAwIDAgMSAwLTFoNGEuNS41IDAgMCAxIDAgMXptMCAyaC00YS41LjUgMCAwIDEgMC0xaDRhLjUuNSAwIDAgMSAwIDF6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let Ti=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get icon(){var e;return"calculator"===(null===(e=this.slot)||void 0===e?void 0:e.reference)?fi:yi}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:number","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:number","not empty")}`;case"undefined":return`@${e.id} ${o("block:number","empty")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?"@"+t:"\\_\\_"}defineEditor(){var e;const t="calculator"===(null===(e=this.slot)||void 0===e?void 0:e.reference);this.editor.form({title:o("block:number","Compare mode"),controls:[new L.Radiobutton([{label:o("block:number",t?"Calculation is equal to":"Number is equal to"),value:"equal"},{label:o("block:number",t?"Calculation is not equal to":"Number is not equal to"),value:"not-equal"},{label:o("block:number",t?"Calculation is lower than":"Number is lower than"),value:"below"},{label:o("block:number",t?"Calculation is higher than":"Number is higher than"),value:"above"},{label:o("block:number",t?"Calculation is between":"Number is between"),value:"between"},{label:o("block:number",t?"Calculation is not between":"Number is not between"),value:"not-between"},{label:o("block:number",t?"Calculation is valid":"Number is not empty"),value:"defined"},{label:o("block:number",t?"Calculation is not valid":"Number is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(s.visible("defined"!==e.value&&"undefined"!==e.value),c.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":s.title=o("block:number",t?"If calculation equals":"If number equals");break;case"not-equal":s.title=o("block:number",t?"If calculation not equals":"If number not equals");break;case"below":s.title=o("block:number",t?"If calculation is lower than":"If number is lower than");break;case"above":s.title=o("block:number",t?"If calculation is higher than":"If number is higher than");break;case"between":s.title=o("block:number",t?"If calculation is between":"If number is between");break;case"not-between":s.title=o("block:number",t?"If calculation is not between":"If number is not between")}}))]});const l=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:number","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).min(null==r?void 0:r.minimum).max(null==r?void 0:r.maximum).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!1,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:number","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:number","Number"),value:"number"},{label:o("block:number","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},s=l("value",o("block:number",t?"If calculation equals":"If number equals"),"defined"!==this.mode&&"undefined"!==this.mode),c=l("to",o("block:number","And"),"between"===this.mode||"not-between"===this.mode)}};var Ci;ki([h,g("#name")],Ti.prototype,"mode",void 0),ki([h,g("#name")],Ti.prototype,"value",void 0),ki([h,g("#name")],Ti.prototype,"to",void 0),ki([m],Ti.prototype,"defineEditor",null),Ti=ki([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-number",identifier:"@tripetto/block-number",version:"8.0.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0P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uODggNy4zMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:number","Verify number")}})],Ti),ce("@tripetto/block-number"),re();let zi=Ci=class extends C{constructor(){super(...arguments),this.startBlank=!1,this.operations=e.of(Yt,this)}get block(){return this}get firstANS(){return"@"+this.numberSlot.id}defineSlot(){this.numberSlot=this.slots.static({type:a.Numeric,reference:"number",label:Ci.label,exchange:["required","alias","exportable","precision","digits","decimal","separator","minimum","maximum","prefix","prefixPlural","suffix","suffixPlural"]})}defineEditor(){const e=new L.Numeric(L.Numeric.bind(this.numberSlot,"minimum",void 0)).precision(this.numberSlot.precision||0).digits(this.numberSlot.digits||0).decimalSign(this.numberSlot.decimal||"").thousands(!!this.numberSlot.separator,this.numberSlot.separator||"").prefix(this.numberSlot.prefix||"").prefixPlural(this.numberSlot.prefixPlural||void 0).suffix(this.numberSlot.suffix||"").suffixPlural(this.numberSlot.suffixPlural||void 0).label(o("block:number","Minimum")),t=new L.Numeric(L.Numeric.bind(this.numberSlot,"maximum",void 0)).precision(this.numberSlot.precision||0).digits(this.numberSlot.digits||0).decimalSign(this.numberSlot.decimal||"").thousands(!!this.numberSlot.separator,this.numberSlot.separator||"").prefix(this.numberSlot.prefix||"").prefixPlural(this.numberSlot.prefixPlural||void 0).suffix(this.numberSlot.suffix||"").suffixPlural(this.numberSlot.suffixPlural||void 0).label(o("block:number","Maximum")),l=new L.Numeric(L.Numeric.bind(this,"prefill",void 0)).precision(this.numberSlot.precision||0).digits(this.numberSlot.digits||0).decimalSign(this.numberSlot.decimal||"").thousands(!!this.numberSlot.separator,this.numberSlot.separator||"").prefix(this.numberSlot.prefix||"").prefixPlural(this.numberSlot.prefixPlural||void 0).suffix(this.numberSlot.suffix||"").suffixPlural(this.numberSlot.suffixPlural||void 0).min(this.numberSlot.minimum).max(this.numberSlot.maximum);this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings(),this.editor.option({name:o("block:number","Format"),form:{title:o("block:number","Format"),controls:[new L.Dropdown([{optGroup:o("block:number","Decimals")},{label:"#",value:0},{label:"#.#",value:1},{label:"#.##",value:2},{label:"#.###",value:3},{label:"#.####",value:4},{label:"#.#####",value:5},{label:"#.######",value:6},{label:"#.#######",value:7},{label:"#.########",value:8},{optGroup:o("block:number","Digits")},{label:"##",value:-2},{label:"###",value:-3},{label:"####",value:-4},{label:"#####",value:-5},{label:"######",value:-6},{label:"#######",value:-7},{label:"########",value:-8},{label:"#########",value:-9},{label:"##########",value:-10},{label:"###########",value:-11},{label:"############",value:-12},{label:"#############",value:-13},{label:"##############",value:-14},{label:"###############",value:-15},{label:"################",value:-16}],(this.numberSlot.digits?-this.numberSlot.digits:this.numberSlot.precision)||0).on((o=>{this.numberSlot.precision=o.isFeatureEnabled&&V(o.value)&&o.value>=0?o.value:void 0,this.numberSlot.digits=o.isFeatureEnabled&&V(o.value)&&o.value<0?-o.value:void 0,e.precision(this.numberSlot.precision||0),t.precision(this.numberSlot.precision||0),l.precision(this.numberSlot.precision||0),e.digits(this.numberSlot.digits||0),t.digits(this.numberSlot.digits||0),l.digits(this.numberSlot.digits||0),a.disabled(!this.numberSlot.precision),d.disabled((this.numberSlot.digits||0)>0)}))]},activated:V(this.numberSlot.precision)||V(this.numberSlot.digits)});const a=new L.Dropdown([{label:"#.#",value:"."},{label:"#,#",value:","}],L.Dropdown.bind(this.numberSlot,"decimal",void 0)).label(o("block:number","Decimal sign")).disabled(!this.numberSlot.precision).on((()=>{e.decimalSign(a.isFeatureEnabled&&a.value||""),t.decimalSign(a.isFeatureEnabled&&a.value||""),l.decimalSign(a.isFeatureEnabled&&a.value||"")}));this.editor.option({name:o("block:number","Limits"),form:{title:o("block:number","Limits"),controls:[e,t]},activated:V(this.numberSlot.minimum)||V(this.numberSlot.maximum)});const s=new L.Text("singleline",L.Text.bind(this.numberSlot,"prefix",void 0)).sanitize(!1).on((o=>{e.prefix(o.isFeatureEnabled&&o.value||""),t.prefix(o.isFeatureEnabled&&o.value||""),l.prefix(o.isFeatureEnabled&&o.value||"")})),c=new L.Text("singleline",L.Text.bind(this.numberSlot,"prefixPlural",void 0)).indent(32).sanitize(!1).on((o=>{e.prefixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0),t.prefixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0),l.prefixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0)})).placeholder(o("block:number","Prefix when value is plural")).visible(i(this.numberSlot.prefixPlural));this.editor.option({name:o("block:number","Prefix"),form:{title:o("block:number","Prefix"),controls:[s,new L.Checkbox(o("block:number","Specify different prefix for plural values"),i(this.numberSlot.prefixPlural)).on((e=>{s.placeholder(e.isChecked&&o("block:number","Prefix when value is singular")||""),c.visible(e.isChecked)})),c]},activated:i(this.numberSlot.prefix)});const r=new L.Text("singleline",L.Text.bind(this.numberSlot,"suffix",void 0)).sanitize(!1).on((o=>{e.suffix(o.isFeatureEnabled&&o.value||""),t.suffix(o.isFeatureEnabled&&o.value||""),l.suffix(o.isFeatureEnabled&&o.value||"")})),u=new L.Text("singleline",L.Text.bind(this.numberSlot,"suffixPlural",void 0)).indent(32).sanitize(!1).on((o=>{e.suffixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0),t.suffixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0),l.suffixPlural(o.isFeatureEnabled&&o.isObservable&&o.value||void 0)})).placeholder(o("block:number","Suffix when value is plural")).visible(i(this.numberSlot.suffixPlural));this.editor.option({name:o("block:number","Suffix"),form:{title:o("block:number","Suffix"),controls:[r,new L.Checkbox(o("block:number","Specify different suffix for plural values"),i(this.numberSlot.suffixPlural)).on((e=>{r.placeholder(e.isChecked&&o("block:number","Suffix when value is singular")||""),u.visible(e.isChecked)})),u]},activated:i(this.numberSlot.suffix)});const d=this.editor.option({name:o("block:number","Signs"),form:{title:o("block:number","Signs"),controls:[a,new L.Dropdown([{label:o("block:number","None"),value:void 0},{label:"#,###",value:","},{label:"#.###",value:"."}],L.Dropdown.bind(this.numberSlot,"separator",void 0)).label(o("block:number","Thousands separator")).on((o=>{e.thousands(!(!o.isFeatureEnabled||!o.value),o.isFeatureEnabled&&o.value||""),t.thousands(!(!o.isFeatureEnabled||!o.value),o.isFeatureEnabled&&o.value||""),l.thousands(!(!o.isFeatureEnabled||!o.value),o.isFeatureEnabled&&o.value||"")})),new L.Static(o("block:number","**Note:** These signs are used to format the number in de dataset. When the number is displayed in a runner, the appropriate user locale might be applied making it seem like changing these settings has no effect.")).markdown()]},activated:i(this.numberSlot.separator)||i(this.numberSlot.decimal),disabled:(this.numberSlot.digits||0)>0});this.editor.groups.options(),this.editor.option({name:o("block:number","Prefill"),form:{title:o("block:number","Prefill"),controls:[l,new L.Static(o("block:number","This value will be used as initial (or default) value for the number."))]},activated:n(this.prefill)}),this.editor.numeric({target:this,reference:"calculator",label:o("block:number","Calculation"),name:o("block:number","Calculator"),title:o("block:number","Calculator settings"),exportable:!0,pair:this.editor.collection(Ge(this,o("block:number","Perform a calculation with the number value."),o("block:number","Calculator")))}),this.editor.required(this.numberSlot),this.editor.visibility(),this.editor.alias(this.numberSlot),this.editor.exportable(this.numberSlot)}defineCondition(){const e=this.slots.select("calculator","feature"),t=e?this.conditions.group(this.numberSlot.label||Ci.label):this.conditions;if(E([{mode:"equal",label:o("block:number","Number is equal to")},{mode:"not-equal",label:o("block:number","Number is not equal to")},{mode:"below",label:o("block:number","Number is lower than")},{mode:"above",label:o("block:number","Number is higher than")},{mode:"between",label:o("block:number","Number is between")},{mode:"not-between",label:o("block:number","Number is not between")},{mode:"defined",label:o("block:number","Number is not empty")},{mode:"undefined",label:o("block:number","Number is empty")}],(e=>{t.template({condition:Ti,icon:yi,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.numberSlot,mode:e.mode}})})),e){const t=this.conditions.group(e.label||o("block:number","Calculation"));E([{mode:"equal",label:o("block:number","Calculation is equal to")},{mode:"not-equal",label:o("block:number","Calculation is not equal to")},{mode:"below",label:o("block:number","Calculation is lower than")},{mode:"above",label:o("block:number","Calculation is higher than")},{mode:"between",label:o("block:number","Calculation is between")},{mode:"not-between",label:o("block:number","Calculation is not between")},{mode:"defined",label:o("block:number","Calculation is valid")},{mode:"undefined",label:o("block:number","Calculation is not valid")}],(o=>{t.template({condition:Ti,icon:fi,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode}})}))}}};function Ei(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}var Ui;ki([h("number","optional")],zi.prototype,"prefill",void 0),ki([h],zi.prototype,"operations",void 0),ki([A],zi.prototype,"defineSlot",null),ki([m],zi.prototype,"defineEditor",null),ki([D],zi.prototype,"defineCondition",null),zi=Ci=ki([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-number",version:"8.0.3",icon:yi,get label(){return o("block:number","Number")}})],zi);let Oi=Ui=class extends C{static getYouTubeId(e){const t=e.match(/youtu(?:.*\/v\/|.*v\=|\.be\/)([A-Za-z0-9_\-]{11})/);return t&&2===t.length&&t[1]||""}static getVimeoId(e){const t=e.match(/\/\/(?:www\.)?vimeo\.com\/(?:channels\/staffpicks\/)?([-\w]+)/i);return t&&2===t.length&&t[1]||""}defineEditor(){this.editor.name(!0,!0),this.editor.option({name:o("block:paragraph","Caption"),form:{title:o("block:paragraph","Caption"),controls:[new L.Text("multiline",L.Text.bind(this,"caption",void 0)).placeholder(o("block:paragraph","Type caption text here...")).action("@",T(this))]},activated:i(this.caption)}),this.editor.description(),this.editor.option({name:o("block:paragraph","Image"),form:{title:o("block:paragraph","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:paragraph","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:paragraph","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:paragraph","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.option({name:o("block:paragraph","Video"),form:{title:o("block:paragraph","Video"),controls:[new L.Text("singleline",L.Text.bind(this,"video",void 0)).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)&&(Ui.getYouTubeId(e.value)||Ui.getVimeoId(e.value))?"pass":"fail")),new L.Static(o("block:paragraph","Currently [YouTube](https://youtube.com) and [Vimeo](https://vimeo.com) videos are supported. Just click the share button of your video and paste the resulting embed link in the field above.")).markdown()]},activated:i(this.video)}),this.editor.explanation(),this.editor.groups.options(),this.editor.visibility()}};function Yi(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Ei([h("string","optional")],Oi.prototype,"caption",void 0),Ei([h("string","optional")],Oi.prototype,"imageURL",void 0),Ei([h("boolean","optional")],Oi.prototype,"imageAboveText",void 0),Ei([h("string","optional")],Oi.prototype,"imageWidth",void 0),Ei([h("string","optional")],Oi.prototype,"video",void 0),Ei([m],Oi.prototype,"defineEditor",null),Oi=Ui=Ei([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-paragraph",version:"5.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjUgMjBoLTEzYy0uODI3IDAtMS41LS42NzMtMS41LTEuNXYtMTZDMiAxLjY3MyAyLjY3MyAxIDMuNSAxaDEzYy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTMuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTNhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTN6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik04LjUgNWgtM2EuNS41IDAgMCAxIDAtMWgzYS41LjUgMCAwIDEgMCAxem0wIDJoLTNhLjUuNSAwIDAgMSAwLTFoM2EuNS41IDAgMCAxIDAgMXptMCAyaC0zYS41LjUgMCAwIDEgMC0xaDNhLjUuNSAwIDAgMSAwIDF6bTAgMmgtM2EuNS41IDAgMCAxIDAtMWgzYS41LjUgMCAwIDEgMCAxem02IDJoLTlhLjUuNSAwIDAgMSAwLTFoOWEuNS41IDAgMCAxIDAgMXptMCAyaC05YS41LjUgMCAwIDEgMC0xaDlhLjUuNSAwIDAgMSAwIDF6bTAgMmgtOWEuNS41IDAgMCAxIDAtMWg5YS41LjUgMCAwIDEgMCAxem0wLTZoLTRhLjUuNSAwIDAgMS0uNS0uNXYtNmEuNS41IDAgMCAxIC41LS41aDRhLjUuNSAwIDAgMSAuNS41djZhLjUuNSAwIDAgMS0uNS41ek0xMSAxMGgzVjVoLTN2NXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",alias:"paragraph",get label(){return o("block:paragraph","Paragraph")}})],Oi);var Pi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNMzMwMCAyNTAwdjIyN2wxOTctMTEzIDk5IDE3Mi0xOTcgMTE0IDE5NyAxMTQtOTkgMTcyLTE5Ny0xMTN2MjI3aC0yMDB2LTIyN2wtMTk3IDExMy05OS0xNzIgMTk3LTExNC0xOTctMTE0IDk5LTE3MiAxOTcgMTEzdi0yMjdoMjAwem0tMTAwMCAwdjIyN2wxOTctMTEzIDk5IDE3Mi0xOTcgMTE0IDE5NyAxMTQtOTkgMTcyLTE5Ny0xMTN2MjI3aC0yMDB2LTIyN2wtMTk3IDExMy05OS0xNzIgMTk3LTExNC0xOTctMTE0IDk5LTE3MiAxOTcgMTEzdi0yMjdoMjAwem0tMTAwMCAwdjIyN2wxOTctMTEzIDk5IDE3Mi0xOTcgMTE0IDE5NyAxMTQtOTkgMTcyLTE5Ny0xMTN2MjI3aC0yMDB2LTIyN2wtMTk3IDExMy05OS0xNzIgMTk3LTExNC0xOTctMTE0IDk5LTE3MiAxOTcgMTEzdi0yMjdoMjAwem00MjAwLTYwMHYyMDAwSDMwMFYxOTAwaDUyMDB6bS0yMDAgMjAwSDUwMHYxNjAwaDQ4MDBWMjEwMHoiLz48L3N2Zz4=";let Zi=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.passphrase=""}get label(){return""}get name(){return this.slot?`@${this.slot.id} ${this.invert?"≠":"="} ${this.passphrase?"`•••`":"\\_\\_"}`:this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){if(this.id){const e=()=>{(l.value||a.value)&&(l.value===a.value?this.passphrase=ue.encrypt(this.id,l.value+this.id,256,btoa):this.passphrase=""),t.visible(!!this.passphrase),i.visible(!this.passphrase)},t=new L.Notification(o("block:password","Password is set!"),"success").visible(!!this.passphrase),i=new L.Notification(o("block:password","Password not set!"),"warning").visible(!this.passphrase),l=new L.Text("password").label(o("block:password","Password")).autoFocus().on(e),a=new L.Text("password").label(o("block:password","Confirm password")).on(e);this.editor.form({title:o("block:password","Set password"),controls:[new L.Static(o("block:password","You can use this condition block to verify a password. The password you set here is _never_ stored in Tripetto. Instead we use *asymmetric cryptography* to verify passwords without knowing them. As a result, you cannot see the password you set here and the fields below might be empty if a password is set. If the message *Password is set* appears, you have set a valid password and you are good to go. To set another password, enter the new password in both fields.")).markdown(),new L.Spacer,t,i,l,a,new L.Dropdown([{label:o("block:password","Verify if password is right"),value:void 0},{label:o("block:password","Verify if password is wrong"),value:!0}],L.Dropdown.bind(this,"invert",void 0)).label(o("block:password","Mode")).width("full")]})}}};var Vi;Yi([h,g("#name")],Zi.prototype,"passphrase",void 0),Yi([h,g("#name")],Zi.prototype,"invert",void 0),Yi([m],Zi.prototype,"defineEditor",null),Zi=Yi([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-password",identifier:"@tripetto/block-password",version:"6.0.2",icon:Pi,get label(){return o("block:password","Password match")}})],Zi);let Ri=Vi=class extends C{defineSlot(){this.passwordSlot=this.slots.static({type:a.String,reference:"password",label:Vi.label,exportable:this.exportable||!1,exchange:["required","alias"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.options(),this.editor.required(this.passwordSlot),this.editor.visibility(),this.editor.alias(this.passwordSlot);const e=this.editor.form({controls:[new L.Notification(o("block:password","By default the submitted passwords will not be stored in the dataset (assuming you just want to verify a password). If you do need the password in the dataset, please use the *exportability* feature."),"info").markdown()]}).visible(!$(this.exportable));this.editor.exportable(this,!1).onToggle((t=>e.visible(!t.isActivated)))}defineCondition(){E([{invert:void 0,label:o("block:password","Password matches")},{invert:!0,label:o("block:password","Password does not match")}],(e=>{this.conditions.template({condition:Zi,label:e.label,burst:!0,props:{slot:this.passwordSlot,invert:e.invert}})}))}};function Wi(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Yi([h,g("#slots")],Ri.prototype,"exportable",void 0),Yi([A],Ri.prototype,"defineSlot",null),Yi([m],Ri.prototype,"defineEditor",null),Yi([D],Ri.prototype,"defineCondition",null),Ri=Vi=Yi([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-password",version:"6.0.2",icon:Pi,get label(){return o("block:password","Password")}})],Ri);var Gi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3Ljg5NCA4Ljg5N2MtMS4wNDEgMC0yLjkyOC0uMzc1LTMuNTE2LS45NjMtLjM2MS0uMzYxLS40NDYtLjgxMy0uNTE1LTEuMTc3LS4wODUtLjQ0OC0uMTM2LS41ODEtLjMzMi0uNjY2LS45MDItLjM4OC0yLjE5Ni0uNjEtMy41NTEtLjYxLTEuMzQgMC0yLjYyLjIxOS0zLjUxMi42LS4xOTQuMDgzLS4yNDQuMjE2LS4zMjcuNjYzLS4wNjguMzY1LS4xNTIuODE5LS41MTIgMS4xNzktLjMyOC4zMjgtMS4wMTUuNTU0LTEuNTMzLj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MTQ2LTIuMTQ2YS41LjUgMCAwIDAtLjcwNy43MDdMMTQuNzkzIDVsLTIuMTQ2IDIuMTQ2YS41LjUgMCAwIDAgLjcwOC43MDdsMi4xNDYtMi4xNDYgMi4xNDYgMi4xNDZhLjQ5OC40OTggMCAwIDAgLjcwOCAwIC41LjUgMCAwIDAgMC0uNzA3TDE2LjIwOSA1eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=";let Hi=class extends F{constructor(){super(...arguments),this.mode="defined"}get icon(){return"defined"===this.mode?Qi:Fi}get label(){return""}get name(){if(this.slot)switch(this.mode){case"defined":return`@${this.slot.id} ${o("block:phone-number","not empty")}`;case"undefined":return`@${this.slot.id} ${o("block:phone-number","empty")}`}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){this.editor.form({title:o("block:phone-number","When phone number:"),controls:[new L.Radiobutton([{label:o("block:phone-number","Is not empty"),value:"defined"},{label:o("block:phone-number","Is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","defined"))]})}};var Bi;Wi([h,g("#name")],Hi.prototype,"mode",void 0),Wi([m],Hi.prototype,"defineEditor",null),Hi=Wi([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-phone-number",identifier:"@tripetto/block-phone-number",version:"4.0.2",icon:Gi,get label(){return o("block:phone-number","Verify phone number")}})],Hi);let qi=Bi=class extends C{defineSlot(){this.phoneNumberSlot=this.slots.static({type:a.String,reference:"phone-number",label:Bi.label,exchange:["required","alias","exportable"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.options(),this.editor.required(this.phoneNumberSlot),this.editor.visibility(),this.editor.alias(this.phoneNumberSlot),this.editor.exportable(this.phoneNumberSlot)}defineCondition(){E([{mode:"defined",label:o("block:phone-number","Number is not empty"),icon:Qi},{mode:"undefined",label:o("block:phone-number","Number is empty"),icon:Fi}],(e=>{this.conditions.template({condition:Hi,label:e.label,icon:e.icon,burst:!0,props:{slot:this.phoneNumberSlot,mode:e.mode}})}))}};function $i(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Wi([A],qi.prototype,"defineSlot",null),Wi([m],qi.prototype,"defineEditor",null),Wi([D],qi.prototype,"defineCondition",null),qi=Bi=Wi([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-phone-number",version:"4.0.2",icon:Gi,get label(){return o("block:phone-number","Phone number")}})],qi);let Xi=class extends e.Item{constructor(){super(...arguments),this.name="",this.nameVisible=!0}defineSlot(){if(this.ref.multiple&&!i(this.url)){const e=this.name&&q(this.name,x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks)||void 0,t=this.ref.slots.dynamic({type:a.Boolean,reference:this.id,label:o("block:picture-choice","Image"),sequence:this.index,name:e,alias:this.value,required:this.ref.required,exportable:"concatenate"!==this.ref.format&&this.ref.exportable,pipeable:{label:o("block:picture-choice","Image"),content:this.moniker?{string:e||"",markdown:this.moniker}:this.name!==e?{string:e||"",markdown:this.name}:"name",alias:this.ref.alias,legacy:"Image"}});t.labelForTrue=this.labelForTrue||this.ref.labelForTrue||o("block:picture-choice","Selected"),t.labelForFalse=this.labelForFalse||this.ref.labelForFalse||o("block:picture-choice","Not selected")}else this.deleteSlot()}deleteSlot(){this.ref.slots.delete(this.id,"dynamic")}defineEditor(){const e=new L.Text("singleline",L.Text.bind(this,"image",void 0)).label(o("block:picture-choice","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")).visible(!i(this.emoji)),t=new L.Group([new L.Text("singleline",L.Text.bind(this,"emoji",void 0)).label(o("block:picture-choice","Emoji")).maxLength(12).width(65).align("center"),new L.Static(o("block:picture-choice","Windows users press: **WIN + .**")).markdown(),new L.Static(o("block:picture-choice","MacOS users press: **CTRL + CMD + Space**")).markdown()]).visible(i(this.emoji));this.editor.option({name:o("block:picture-choice","Name"),form:{title:o("block:picture-choice","Image name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect(),new L.Checkbox(o("block:picture-choice","Show this name with the image"),L.Checkbox.bind(this,"nameVisible",!0))]},locked:!0}),this.editor.form({title:o("block:picture-choice","Image"),controls:[new L.Radiobutton([{label:o("block:picture-choice","Use an image"),value:"image"},{label:o("block:picture-choice","Use an Emoji"),value:"emoji"}],i(this.emoji)?"emoji":"image").on((o=>{this.emoji="emoji"===o.value?this.emoji||"":void 0,e.visible("image"===o.value),t.visible("emoji"===o.value)})),e,t]}),this.editor.option({name:o("block:picture-choice","Description"),form:{title:o("block:picture-choice","Image description"),controls:[new L.Text("singleline",L.Text.bind(this,"description",void 0)).action("@",T(this))]},activated:i(this.description)}),this.editor.group(o("block:picture-choice","Options"));const l=new L.Checkbox(o("block:picture-choice","Open in new tab/window"),"self"!==this.target).on((e=>{this.target=e.isFeatureEnabled&&!e.isDisabled?e.isChecked?"blank":"self":void 0}));this.editor.option({name:o("block:picture-choice","URL"),form:{title:o("block:picture-choice","URL"),controls:[new L.Text("singleline",L.Text.bind(this,"url",void 0)).placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||(0===e.value.indexOf("mailto:")||0===e.value.indexOf("tel:"))&&e.value.length>10?"pass":"fail")).on((e=>{l.isDisabled=0===e.value.indexOf("mailto:")||0===e.value.indexOf("tel:")})),l,new L.Static(o("block:picture-choice","If a URL is set, clicking the image will open it. The image cannot be selected as answer."))]},activated:i(this.url),on:e=>{a.disabled(e.isActivated),u.disabled(e.isActivated),n.disabled(e.isActivated||!this.ref.multiple),r.disabled(e.isActivated||!this.ref.multiple)}});const a=this.editor.option({name:o("block:picture-choice","Moniker"),form:{title:o("block:picture-choice","Image moniker"),controls:[new L.Text("singleline",L.Text.bind(this,"moniker",void 0)).action("@",T(this)),new L.Static(o("block:picture-choice","If a moniker is set, this moniker will be used when referred to this image."))]},activated:i(this.moniker),disabled:i(this.url)});this.editor.option({name:o("block:picture-choice","Color"),form:{title:o("block:picture-choice","Image button color"),controls:[new L.ColorPicker(L.ColorPicker.bind(this,"color",void 0)).placeholder(o("block:picture-choice","Select an alternative color")).swatches(!1,!0),new L.Static(o("block:picture-choice","Here you can specify an alternative color for the image button."))]},activated:i(this.color)});const n=this.editor.option({name:o("block:picture-choice","Exclusivity"),form:{title:o("block:picture-choice","Image exclusivity"),controls:[new L.Checkbox(o("block:picture-choice","Unselect all other selected images when selected"),L.Checkbox.bind(this,"exclusive",void 0,!0))]},activated:this.ref.multiple&&!i(this.url)&&$(this.exclusive)||!1,disabled:!this.ref.multiple||i(this.url)}),s=o("block:picture-choice","Selected"),c=o("block:picture-choice","Not selected"),r=this.editor.option({name:o("block:picture-choice","Labels"),form:{title:o("block:picture-choice","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(s),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(c),new L.Static(o("block:picture-choice","These labels will be used in the dataset and override the default values %1 and %2.",`**${s}**`,`**${c}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse),disabled:!this.ref.multiple||i(this.url)}),u=this.editor.option({name:o("block:picture-choice","Identifier"),form:{title:o("block:picture-choice","Image identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:picture-choice","If an image identifier is set, this identifier will be used instead of the label."))]},activated:i(this.value),disabled:i(this.url)}),d=this.ref.slots.select("score","feature");this.editor.option({name:o("block:picture-choice","Score"),form:{title:o("block:picture-choice","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==d?void 0:d.precision)||0).digits((null==d?void 0:d.digits)||0).decimalSign((null==d?void 0:d.decimal)||"").thousands(!!(null==d?void 0:d.separator),(null==d?void 0:d.separator)||"").prefix((null==d?void 0:d.prefix)||"").prefixPlural((null==d?void 0:d.prefixPlural)||void 0).suffix((null==d?void 0:d.suffix)||"").suffixPlural((null==d?void 0:d.suffixPlural)||void 0)]},activated:!0,locked:!!d,disabled:!d})}};$i([h("string"),u],Xi.prototype,"name",void 0),$i([h("boolean","optional")],Xi.prototype,"nameVisible",void 0),$i([h("string","optional")],Xi.prototype,"image",void 0),$i([h("string","optional")],Xi.prototype,"emoji",void 0),$i([h("string","optional")],Xi.prototype,"description",void 0),$i([h("string","optional"),g("#refresh")],Xi.prototype,"url",void 0),$i([h("string","optional")],Xi.prototype,"target",void 0),$i([h("string","optional"),g("#refresh")],Xi.prototype,"moniker",void 0),$i([h("string","optional"),X],Xi.prototype,"value",void 0),$i([h("string","optional"),g("#refresh")],Xi.prototype,"labelForTrue",void 0),$i([h("string","optional"),g("#refresh")],Xi.prototype,"labelForFalse",void 0),$i([h("number","optional"),J],Xi.prototype,"score",void 0),$i([h("boolean","optional"),g("#name")],Xi.prototype,"exclusive",void 0),$i([h("string","optional")],Xi.prototype,"color",void 0),$i([p,K,I,ee],Xi.prototype,"defineSlot",null),$i([v],Xi.prototype,"deleteSlot",null),$i([m],Xi.prototype,"defineEditor",null);var Ji="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEwIDIwYy0yLjY3MSAwLTUuMTgyLTEuMDQtNy4wNzEtMi45MjlTMCAxMi42NzEgMCAxMGM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YuNjQ2LTYuNjQ2YS41LjUgMCAwIDEgLjcwNy43MDdsLTcgN2EuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnoiLz48L3N2Zz4=";let Ki=class extends F{get icon(){var e,t;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof al&&(null===(t=this.node)||void 0===t?void 0:t.block.multiple)?_i:Ji}get name(){var e;return(null===(e=this.choice)||void 0===e?void 0:e.name)||this.type.label}get label(){var e;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof al&&(this.node.block.alias||this.node.label)||""}get choices(){return this.node&&this.node.block instanceof al&&this.node.block.choices||void 0}migrate(){var e;if(this.choice&&(null===(e=this.node)||void 0===e?void 0:e.block)instanceof al){const e=this.node.block.slots,t=this.node.block.multiple?this.choice.id:"choice";return()=>{var o;return(null===(o=this.node)||void 0===o?void 0:o.block)instanceof al&&(this.slot=e.select(t),!0)}}}defineEditor(){if(this.node&&this.choices){const e=[];this.choices.each((t=>{y(t.name)&&e.push({label:q(t.name),value:t})})),se(e)>0&&this.editor.form({title:this.node.label,controls:[new L.Dropdown(e,L.Dropdown.bind(this,"choice",void 0))]})}}};$i([g("#condition"),_("#choices")],Ki.prototype,"choice",void 0),$i([ne("slot")],Ki.prototype,"migrate",null),$i([m],Ki.prototype,"defineEditor",null),Ki=$i([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-picture-choice",identifier:"@tripetto/block-picture-choice",version:"6.0.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE2LjIzIDMuMzA3Yy0uMzk2LS4yNjgtLjk0OS0uNTA0LTEuNjQzLS43MDJDMTMuMjIxIDIuMjE1IDExLjQxNSAyIDkuNSAycy0zLjcyMi4yMTUtNS4wODcuNjA1Yy0uNjk0LjE5OC0xLjI0Ni40MzQtMS42NDMuNzAyLS42MzcuNDMtLjc3Ljg4Ni0uNzcgMS4xOTNWNWMwIC40MjguMzIxIDEuMTMzLjYzOSAxLjYwOWw0Ljg5MSA3LjMzNmMuMjUxLjM3Ni40NzEgMS4xMDMuNDcxIDEuNTU1djNhLjUuNSAwIDAgMCAuNzI0LjQ0N2wyLTFhLjUuNSAwIDAgMCAuMjc2LS40NDd2LTJjMC0uNDUyLjIyLTEuMTc5LjQ3MS0xLjU1NWw0Ljg5MS03LjMzNmMuMzE3LS40NzYuNjM5LTEuMTgyLjYzOS0xLjYwOXYtLjVjMC0uMzA3LS4xMzQtLjc2My0uNzctMS4xOTN6bS0xMS41NDIuMjZDNS45NjcgMy4yMDIgNy42NzYgMyA5LjUgM3MzLjUzNC4yMDEgNC44MTIuNTY3QzE1LjY5IDMuOTYxIDE2IDQuMzgzIDE2IDQuNXMtLjMxLjU0LTEuNjg4LjkzM0MxMy4wMzMgNS43OTggMTEuMzI0IDYgOS41IDZzLTMuNTM0LS4yMDEtNC44MTItLjU2N0MzLjMxIDUuMDM5IDMgNC42MTcgMyA0LjVzLjMxLS41NCAxLjY4OC0uOTMzem01Ljk1MSA5LjgyNGMtLjM1OC41MzctLjYzOSAxLjQ2NC0uNjM5IDIuMTA5djEuNjkxbC0xIC41VjE1LjVjMC0uNjQ2LS4yODEtMS41NzItLjYzOS0yLjEwOWwtNC44OC03LjMyYy4yNzQuMTE3LjU4NS4yMjYuOTMyLjMyNEM1Ljc3OSA2Ljc4NSA3LjU4NSA3IDkuNSA3czMuNzIyLS4yMTUgNS4wODctLjYwNWMuMzQ2LS4wOTkuNjU4LS4yMDcuOTMyLS4zMjVsLTQuODggNy4zMnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",alias:"picture-choice",get label(){return o("block:picture-choice","Image")}})],Ki);let el=class extends F{};el=$i([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-picture-choice",identifier:"@tripetto/block-picture-choice:undefined",version:"6.0.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bW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wIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let ol=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:picture-choice","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:picture-choice","calculated")}`;case"undefined":return`@${e.id} ${o("block:picture-choice","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:picture-choice","Compare mode"),controls:[new L.Radiobutton([{label:o("block:picture-choice","Score is equal to"),value:"equal"},{label:o("block:picture-choice","Score is not equal to"),value:"not-equal"},{label:o("block:picture-choice","Score is lower than"),value:"below"},{label:o("block:picture-choice","Score is higher than"),value:"above"},{label:o("block:picture-choice","Score is between"),value:"between"},{label:o("block:picture-choice","Score is not between"),value:"not-between"},{label:o("block:picture-choice","Score is calculated"),value:"defined"},{label:o("block:picture-choice","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:picture-choice","If score equals");break;case"not-equal":t.title=o("block:picture-choice","If score not equals");break;case"below":t.title=o("block:picture-choice","If score is lower than");break;case"above":t.title=o("block:picture-choice","If score is higher than");break;case"between":t.title=o("block:picture-choice","If score is between");break;case"not-between":t.title=o("block:picture-choice","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:picture-choice","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:picture-choice","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:picture-choice","Number"),value:"number"},{label:o("block:picture-choice","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:picture-choice","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:picture-choice","And"),"between"===this.mode||"not-between"===this.mode)}};$i([h,g("#name")],ol.prototype,"mode",void 0),$i([h,g("#name")],ol.prototype,"value",void 0),$i([h,g("#name")],ol.prototype,"to",void 0),$i([m],ol.prototype,"defineEditor",null),ol=$i([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-picture-choice",identifier:"@tripetto/block-picture-choice:score",version:"6.0.1",icon:tl,get label(){return o("block:picture-choice","Verify score")}})],ol);var il="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIgNmEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDZMNi4xNDUuNjQ3YS41LjUgMCAwIDEgLjcwNy43MDdsLTQuNSA0LjVBLjQ5OC40OTggMCAwIDEgMS45OTggNnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAxM2EuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXpNMiAyMGEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTEuNS0xLjVhLjUuNSAwIDAgMSAuNzA3LS43MDdsMS4xNDYgMS4xNDYgNC4xNDYtNC4xNDZhLjUuNSAwIDAgMSAuNzA3LjcwN2wtNC41IDQuNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnptMTcuNS0xaC0xMmEuNS41IDAgMCAxIDAtMWgxMmEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let ll=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:picture-choice","or")} @${e.id} > ${this.parse(e,this.to)}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,(e=>s.locale.number(e,0,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:picture-choice","Compare mode"),controls:[new L.Radiobutton([{label:o("block:picture-choice","Counter is equal to"),value:"equal"},{label:o("block:picture-choice","Counter is not equal to"),value:"not-equal"},{label:o("block:picture-choice","Counter is lower than"),value:"below"},{label:o("block:picture-choice","Counter is higher than"),value:"above"},{label:o("block:picture-choice","Counter is between"),value:"between"},{label:o("block:picture-choice","Counter is not between"),value:"not-between"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:picture-choice","If counter equals");break;case"not-equal":t.title=o("block:picture-choice","If counter not equals");break;case"below":t.title=o("block:picture-choice","If counter is lower than");break;case"above":t.title=o("block:picture-choice","If counter is higher than");break;case"between":t.title=o("block:picture-choice","If counter is between");break;case"not-between":t.title=o("block:picture-choice","If counter is not between")}}))]});const e=(e,t)=>{var l;const s=this[e],c=new L.Numeric(n(s)?s:0).label(o("block:picture-choice","Use fixed number")).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),r=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(s)?s:void 0,!0,null===(l=this.slot)||void 0===l?void 0:l.id),u=new L.Dropdown(r,i(s)?s:"").label(o("block:picture-choice","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:picture-choice","Number"),value:"number"},{label:o("block:picture-choice","Value"),value:"variable",disabled:0===r.length}],i(s)?"variable":"number").on((e=>{c.visible("number"===e.value),u.visible("variable"===e.value),c.isObservable&&c.focus()})),c,u]})},t=e("value",o("block:picture-choice","If counter equals")),l=e("to",o("block:picture-choice","And"))}};$i([h,g("#name")],ll.prototype,"mode",void 0),$i([h,g("#name")],ll.prototype,"value",void 0),$i([h,g("#name")],ll.prototype,"to",void 0),$i([m],ll.prototype,"defineEditor",null),ll=$i([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-picture-choice",identifier:"@tripetto/block-picture-choice:counter",version:"6.0.1",icon:il,get label(){return o("block:picture-choice","Verify counter")}})],ll);let al=class extends C{constructor(){super(...arguments),this.choices=e.of(Xi,this)}get label(){return k("block:picture-choice","%2 (%1 image)","%2 (%1 images)",this.choices.count,this.type.label)}defineSlot(){this.multiple?(this.slots.delete("choice","static"),this.slots.meta({type:a.Number,reference:"counter",label:o("block:picture-choice","Counter"),exportable:!1,protected:!0}),"concatenate"===this.format||"both"===this.format?this.slots.feature({type:a.Text,reference:"concatenation",label:o("block:picture-choice","Text value"),exportable:this.exportable,alias:this.alias,protected:!0}):this.slots.delete("concatenation","feature")):(this.slots.delete("counter","meta"),this.slots.delete("concatenation","feature"),this.slots.static({type:a.String,reference:"choice",label:o("block:picture-choice","Image"),alias:this.alias,required:this.required,exportable:this.exportable,exchange:["alias","required","exportable"]}))}defineEditor(){this.editor.name(!0,!0),this.editor.option({name:o("block:picture-choice","Caption"),form:{title:o("block:picture-choice","Caption"),controls:[new L.Text("multiline",L.Text.bind(this,"caption",void 0)).placeholder(o("block:picture-choice","Type caption text here...")).action("@",T(this))]},activated:i(this.caption)}),this.editor.description(),this.editor.option({name:o("block:picture-choice","Image"),form:{title:o("block:picture-choice","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:picture-choice","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:picture-choice","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:picture-choice","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.explanation();const e=this.editor.collection({collection:this.choices,title:o("block:picture-choice","Images"),placeholder:o("block:picture-choice","Unnamed image"),icon:this.multiple?_i:Ji,autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,sorting:"manual",indicator:e=>this.multiple&&e.exclusive&&o("block:picture-choice","Exclusive").toUpperCase()||void 0,emptyMessage:o("block:picture-choice","Click the + button to add an image...")});this.editor.groups.settings(),this.editor.option({name:o("block:picture-choice","Multiple select"),form:{title:o("block:picture-choice","Multiple select"),controls:[new L.Checkbox(o("block:picture-choice","Allow the selection of multiple images"),L.Checkbox.bind(this,"multiple",void 0,!0)).on((()=>{a.disabled(!this.multiple),c.disabled(!this.multiple),b.disabled(!this.multiple),r.disabled(this.multiple&&"concatenate"!==this.format&&"both"!==this.format||!1),e.icon=this.multiple?_i:Ji,this.choices.each((e=>{!0===e.exclusive&&e.refresh("name")}))}))]},activated:$(this.multiple)});const t=new L.Numeric(L.Numeric.bind(this,"min",void 0)).min(1).max(this.max).visible(V(this.min)).indent(32).width(75).on((()=>{l.min(this.min||1)})),l=new L.Numeric(L.Numeric.bind(this,"max",void 0)).min(this.min||1).visible(V(this.max)).indent(32).width(75).on((()=>{t.max(this.max)})),a=this.editor.option({name:o("block:picture-choice","Limits"),form:{title:o("block:picture-choice","Limits"),controls:[new L.Checkbox(o("block:picture-choice","Minimum number of selected images"),V(this.min)).on((e=>{t.visible(e.isChecked)})),t,new L.Checkbox(o("block:picture-choice","Maximum number of selected images"),V(this.max)).on((e=>{l.visible(e.isChecked)})),l]},activated:V(this.max)||V(this.min),disabled:!this.multiple});this.editor.option({name:o("block:picture-choice","Randomization"),form:{title:o("block:picture-choice","Randomization"),controls:[new L.Checkbox(o("block:picture-choice","Randomize the images (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.option({name:o("block:picture-choice","Size"),form:{title:o("block:picture-choice","Size"),controls:[new L.Radiobutton([{label:o("block:picture-choice","Small"),value:"small"},{label:o("block:picture-choice","Medium"),value:"medium"},{label:o("block:picture-choice","Large"),value:"large"}],L.Radiobutton.bind(this,"size",void 0,"medium"))]},activated:i(this.size)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();const n=o("block:picture-choice","Selected"),s=o("block:picture-choice","Not selected"),c=this.editor.option({name:o("block:picture-choice","Labels"),form:{title:o("block:picture-choice","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"labelForTrue",void 0)).placeholder(n),new L.Text("singleline",L.Text.bind(this,"labelForFalse",void 0)).placeholder(s),new L.Static(o("block:picture-choice","These labels will be used in the dataset and override the default values %1 and %2.",`**${n}**`,`**${s}**`)).markdown()]},activated:i(this.labelForTrue)||i(this.labelForFalse),disabled:!this.multiple});this.editor.scores({target:this,collection:e,description:o("block:picture-choice","Generates a score based on the selected choices. Open the settings panel for each choice to set the individual score for that choice.")});const r=this.editor.alias(this).disabled(this.multiple&&"concatenate"!==this.format&&"both"!==this.format||!1),u=new L.Text("singleline",L.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label(o("block:picture-choice","Use this separator:")),d=new L.Group([new L.Dropdown([{label:o("block:picture-choice","Comma separated"),value:"comma"},{label:o("block:picture-choice","Space separated"),value:"space"},{label:o("block:picture-choice","List on multiple lines"),value:"list"},{label:o("block:picture-choice","Bulleted list"),value:"bullets"},{label:o("block:picture-choice","Numbered list"),value:"numbers"},{label:o("block:picture-choice","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:o("block:picture-choice","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:o("block:picture-choice","Custom separator"),value:"custom"}],L.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label(o("block:picture-choice","How to separate the selected images:")).on((e=>{u.visible("custom"===e.value)})),u]).visible("concatenate"===this.format||"both"===this.format),b=this.editor.option({name:o("block:picture-choice","Data format"),form:{title:o("block:picture-choice","Data format"),controls:[new L.Radiobutton([{label:o("block:picture-choice","Every image as a separate field"),description:o("block:picture-choice","Every image is included in the dataset as a separate value."),value:"fields"},{label:o("block:picture-choice","Text field with a list of all selected images"),description:o("block:picture-choice","All the selected images are concatenated to a single string of text separated using a configurable separator."),value:"concatenate"},{label:o("block:picture-choice","Both options above"),description:o("block:picture-choice","Includes every image in the dataset together with the concatenated text."),value:"both"}],L.Radiobutton.bind(this,"format",void 0,"fields")).label(o("block:picture-choice","This setting determines how the data is stored in the dataset:")).on((e=>{d.visible("concatenate"===e.value||"both"===e.value),r.disabled(this.multiple&&"concatenate"!==this.format&&"both"!==this.format||!1)})),d]},activated:i(this.format),disabled:!this.multiple});this.editor.exportable(this)}defineConditions(){this.choices.each((e=>{e.name&&!i(e.url)&&this.conditions.template({condition:Ki,label:e.name,icon:this.multiple?_i:Ji,burst:"branch",props:{choice:e,slot:this.slots.select(this.multiple?e.id:"choice")}})})),this.choices.count>0&&this.conditions.template({condition:el,separator:!0});const e=this.slots.select("counter","meta");if(e&&e.label){const t=this.conditions.group(e.label,il);E([{mode:"equal",label:o("block:picture-choice","Counter is equal to")},{mode:"not-equal",label:o("block:picture-choice","Counter is not equal to")},{mode:"below",label:o("block:picture-choice","Counter is lower than")},{mode:"above",label:o("block:picture-choice","Counter is higher than")},{mode:"between",label:o("block:picture-choice","Counter is between")},{mode:"not-between",label:o("block:picture-choice","Counter is not between")}],(o=>{t.template({condition:ll,label:o.label,autoOpen:!0,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}const t=this.slots.select("score","feature");if(t&&t.label){const e=this.conditions.group(t.label,tl);E([{mode:"equal",label:o("block:picture-choice","Score is equal to")},{mode:"not-equal",label:o("block:picture-choice","Score is not equal to")},{mode:"below",label:o("block:picture-choice","Score is lower than")},{mode:"above",label:o("block:picture-choice","Score is higher than")},{mode:"between",label:o("block:picture-choice","Score is between")},{mode:"not-between",label:o("block:picture-choice","Score is not between")},{mode:"defined",label:o("block:picture-choice","Score is calculated")},{mode:"undefined",label:o("block:picture-choice","Score is not calculated")}],(o=>{e.template({condition:ol,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:t,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function nl(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}$i([h("string","optional")],al.prototype,"caption",void 0),$i([h("string","optional")],al.prototype,"imageURL",void 0),$i([h("string","optional")],al.prototype,"imageWidth",void 0),$i([h("boolean","optional")],al.prototype,"imageAboveText",void 0),$i([h("items"),g("#name"),te("#slot","choice")],al.prototype,"choices",void 0),$i([h("boolean","optional"),g("#slots"),g("#collection","choices")],al.prototype,"multiple",void 0),$i([h("number","optional")],al.prototype,"min",void 0),$i([h("number","optional")],al.prototype,"max",void 0),$i([h("boolean","optional"),g("#required"),g("#slots"),g("#collection","choices")],al.prototype,"required",void 0),$i([h("string","optional"),g("#slots"),g("#collection","choices"),g("#label")],al.prototype,"alias",void 0),$i([h("boolean","optional"),g("#slots"),g("#collection","choices")],al.prototype,"exportable",void 0),$i([h("string","optional"),g("#collection","choices")],al.prototype,"labelForTrue",void 0),$i([h("string","optional"),g("#collection","choices")],al.prototype,"labelForFalse",void 0),$i([h("boolean","optional")],al.prototype,"randomize",void 0),$i([h],al.prototype,"size",void 0),$i([h("string","optional"),g("#slots"),g("#collection","choices")],al.prototype,"format",void 0),$i([h("string","optional")],al.prototype,"formatSeparator",void 0),$i([h("string","optional")],al.prototype,"formatSeparatorCustom",void 0),$i([A],al.prototype,"defineSlot",null),$i([m],al.prototype,"defineEditor",null),$i([D],al.prototype,"defineConditions",null),al=$i([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-picture-choice",version:"6.0.1",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEzLjUgOUMxMi4xMjIgOSAxMSA3Ljg3OCAxMSA2LjVTMTIuMTIyIDQgMTMuNSA0IDE2IDUuMTIyIDE2IDYuNSAxNC44NzggOSAxMy41IDl6bTAtNGMtLjgyNyAwLTEuNS42NzMtMS41IDEuNVMxMi42NzMgOCAxMy41IDggMTUgNy4zMjcgMTUgNi41IDE0LjMyNyA1IDEzLjUgNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTE4LjUgMGgtMTdDLjY3MyAwIDAgLjY3MyAwIDEuNXYxN2MwIC44MjcuNjczIDEuNSAxLjUgMS41aDE3Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0xN2MwLS44MjctLjY3My0xLjUtMS41LTEuNXpNMSAxOC41di00LjgwN2w0LjE5Ny00LjYxN2MuMDg1LS4wOTMuMTk2LS4xNDUuMzE0LS4xNDdzLjIzMS4wNDguMzE4LjEzOWw5LjUgOS45MzJIMS40OTlhLjUuNSAwIDAgMS0uNS0uNXptMTggMGEuNS41IDAgMCAxLS41LjVoLTEuNzg2TDYuNTUzIDguMzc3YTEuNDIgMS40MiAwIDAgMC0yLjA5NS4wMjdsLTMuNDU3IDMuODAzVjEuNWEuNS41IDAgMCAxIC41LS41aDE3YS41LjUgMCAwIDEgLjUuNXYxN3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",alias:"picture-choice",get label(){return o("block:picture-choice","Picture choice")}})],al);let sl=class extends e.Item{constructor(){super(...arguments),this.name=""}defineEditor(){this.editor.option({name:"Name",form:{title:o("block:radiobuttons","Radio button name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:o("block:radiobuttons","Description"),form:{title:o("block:radiobuttons","Radio button description"),controls:[new L.Text("multiline",L.Text.bind(this,"description",void 0)).action("@",T(this))]},activated:i(this.description)}),this.editor.group(o("block:radiobuttons","Options")),this.editor.option({name:o("block:radiobuttons","Identifier"),form:{title:o("block:radiobuttons","Identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:radiobuttons","If a radio button identifier is set, this identifier will be used as selected value instead of the button label."))]},activated:i(this.value)});const e=this.ref.slots.select("score","feature");this.editor.option({name:o("block:radiobuttons","Score"),form:{title:o("block:radiobuttons","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==e?void 0:e.precision)||0).digits((null==e?void 0:e.digits)||0).decimalSign((null==e?void 0:e.decimal)||"").thousands(!!(null==e?void 0:e.separator),(null==e?void 0:e.separator)||"").prefix((null==e?void 0:e.prefix)||"").prefixPlural((null==e?void 0:e.prefixPlural)||void 0).suffix((null==e?void 0:e.suffix)||"").suffixPlural((null==e?void 0:e.suffixPlural)||void 0)]},activated:!0,locked:!!e,disabled:!e})}};nl([h("string"),u],sl.prototype,"name",void 0),nl([h("string","optional")],sl.prototype,"description",void 0),nl([h("string","optional"),X],sl.prototype,"value",void 0),nl([h("number","optional"),J],sl.prototype,"score",void 0),nl([m],sl.prototype,"defineEditor",null);var cl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEwIDIwYy0yLjY3MSAwLTUuMTgyLTEuMDQtNy4wNzEtMi45MjlTMCAxMi42NzEgMCAxMGMwLTIuNjcxIDEuMDQtNS4xODIgMi45MjktNy4wNzFTNy4zMjkgMCAxMCAwYzIuNjcxIDAgNS4xODIgMS4wNCA3LjA3MSAyLjkyOVMyMCA3LjMyOSAyMCAxMGMwIDIuNjcxLTEuMDQgNS4xODItMi45MjkgNy4wNzFTMTIuNjcxIDIwIDEwIDIwem0wLTE5Yy00Ljk2MyAwLTkgNC4wMzctOSA5czQuMDM3IDkgOSA5IDktNC4wMzcgOS05LTQuMDM3LTktOS05eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48cGF0aCBkPSJNMTAgMTZjLTMuMzA4IDAtNi0yLjY5Mi02LTZzMi42OTItNiA2LTYgNiAyLjY5MiA2IDYtMi42OTIgNi02IDZ6bTAtMTFjLTIuNzU3IDAtNSAyLjI0My01IDVzMi4yNDMgNSA1IDUgNS0yLjI0MyA1LTUtMi4yNDMtNS01LTV6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let rl=class extends F{get name(){return(this.button?q(this.button.name):"")||this.type.label}get radiobuttons(){return this.node&&this.node.block instanceof bl&&this.node.block.buttons||void 0}defineEditor(){if(this.node&&this.radiobuttons){const e=[];this.radiobuttons.each((t=>{y(t.name)&&e.push({label:q(t.name),value:t})})),se(e)>0&&this.editor.form({title:this.node.label,controls:[new L.Dropdown(e,L.Dropdown.bind(this,"button",void 0))]})}}};nl([g("#condition"),_("#buttons")],rl.prototype,"button",void 0),nl([m],rl.prototype,"defineEditor",null),rl=nl([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-radiobuttons",identifier:"@tripetto/block-radiobuttons",version:"8.0.0",icon:cl,get label(){return o("block:radiobuttons","Radio button choice")}})],rl);var ul="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let dl=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:radiobuttons","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:radiobuttons","calculated")}`;case"undefined":return`@${e.id} ${o("block:radiobuttons","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:radiobuttons","Compare mode"),controls:[new L.Radiobutton([{label:o("block:radiobuttons","Score is equal to"),value:"equal"},{label:o("block:radiobuttons","Score is not equal to"),value:"not-equal"},{label:o("block:radiobuttons","Score is lower than"),value:"below"},{label:o("block:radiobuttons","Score is higher than"),value:"above"},{label:o("block:radiobuttons","Score is between"),value:"between"},{label:o("block:radiobuttons","Score is not between"),value:"not-between"},{label:o("block:radiobuttons","Score is calculated"),value:"defined"},{label:o("block:radiobuttons","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:radiobuttons","If score equals");break;case"not-equal":t.title=o("block:radiobuttons","If score not equals");break;case"below":t.title=o("block:radiobuttons","If score is lower than");break;case"above":t.title=o("block:radiobuttons","If score is higher than");break;case"between":t.title=o("block:radiobuttons","If score is between");break;case"not-between":t.title=o("block:radiobuttons","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:radiobuttons","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:radiobuttons","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:radiobuttons","Number"),value:"number"},{label:o("block:radiobuttons","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:radiobuttons","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:radiobuttons","And"),"between"===this.mode||"not-between"===this.mode)}};nl([h,g("#name")],dl.prototype,"mode",void 0),nl([h,g("#name")],dl.prototype,"value",void 0),nl([h,g("#name")],dl.prototype,"to",void 0),nl([m],dl.prototype,"defineEditor",null),dl=nl([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-radiobuttons",identifier:"@tripetto/block-radiobuttons:score",version:"8.0.0",icon:ul,get label(){return o("block:radiobuttons","Verify score")}})],dl);let bl=class extends C{constructor(){super(...arguments),this.buttons=e.of(sl,this)}get label(){return k("block:radiobuttons","%2 (%1 option)","%2 (%1 options)",this.buttons.count,this.type.label)}defineSlots(){this.radioSlot=this.slots.static({type:a.String,reference:"button",label:o("block:radiobuttons","Selected button"),exchange:["required","alias","exportable"]})}defineEditor(){this.editor.groups.general(),this.editor.name(),this.editor.description(),this.editor.explanation();const e=this.editor.collection({collection:this.buttons,title:o("block:radiobuttons","Radio buttons"),icon:cl,placeholder:o("block:radiobuttons","Unnamed radio button"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,emptyMessage:o("block:radiobuttons","Click the + button to add a radio button...")});this.editor.groups.settings(),this.editor.option({name:o("block:radiobuttons","Randomization"),form:{title:o("block:radiobuttons","Randomization"),controls:[new L.Checkbox(o("block:radiobuttons","Randomize the answers (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.groups.options(),this.editor.required(this.radioSlot),this.editor.visibility(),this.editor.scores({target:this,collection:e,description:o("block:radiobuttons","Generates a score based on the selected radio button. Open the settings panel for each button to set the score.")}),this.editor.alias(this.radioSlot),this.editor.exportable(this.radioSlot)}defineConditions(){this.buttons.each((e=>{e.name&&this.conditions.template({condition:rl,markdown:e.name,burst:"branch",props:{slot:this.radioSlot,button:e}})}));const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,ul,!1,!0);E([{mode:"equal",label:o("block:radiobuttons","Score is equal to")},{mode:"not-equal",label:o("block:radiobuttons","Score is not equal to")},{mode:"below",label:o("block:radiobuttons","Score is lower than")},{mode:"above",label:o("block:radiobuttons","Score is higher than")},{mode:"between",label:o("block:radiobuttons","Score is between")},{mode:"not-between",label:o("block:radiobuttons","Score is not between")},{mode:"defined",label:o("block:radiobuttons","Score is calculated")},{mode:"undefined",label:o("block:radiobuttons","Score is not calculated")}],(o=>{t.template({condition:dl,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function Ml(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}nl([h("items"),g("#label"),te("#slot","button")],bl.prototype,"buttons",void 0),nl([h("boolean","optional")],bl.prototype,"randomize",void 0),nl([A],bl.prototype,"defineSlots",null),nl([m],bl.prototype,"defineEditor",null),nl([D],bl.prototype,"defineConditions",null),bl=nl([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-radiobuttons",version:"8.0.0",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE5LjUgMTZoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0wLTVoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0wLTVoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tMTggMUMuNjczIDcgMCA2LjMyNyAwIDUuNVMuNjczIDQgMS41IDQgMyA0LjY3MyAzIDUuNSAyLjMyNyA3IDEuNSA3em0wLTJhLjUuNSAwIDEgMCAwIDEgLjUuNSAwIDAgMCAwLTF6bTAgN0MuNjczIDEyIDAgMTEuMzI3IDAgMTAuNVMuNjczIDkgMS41IDkgMyA5LjY3MyAzIDEwLjUgMi4zMjcgMTIgMS41IDEyem0wLTJhLjUuNSAwIDEgMCAwIDEgLjUuNSAwIDAgMCAwLTF6bTAgN0MuNjczIDE3IDAgMTYuMzI3IDAgMTUuNVMuNjczIDE0IDEuNSAxNHMxLjUuNjczIDEuNSAxLjVTMi4zMjcgMTcgMS41IDE3em0wLTJhLjUuNSAwIDEgMCAwIDEgLjUuNSAwIDAgMCAwLTF6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",get label(){return o("block:radiobuttons","Radio buttons")}})],bl);let hl=class extends e.Item{constructor(){super(...arguments),this.name=""}defineSlot(){this.ref.defineSlot()}defineEditor(){this.editor.option({name:o("block:ranking","Name"),form:{title:o("block:ranking","Option name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.option({name:o("block:ranking","Description"),form:{title:o("block:ranking","Description"),controls:[new L.Text("multiline",L.Text.bind(this,"description",void 0)).action("@",T(this))]},activated:i(this.description)}),this.editor.group(o("block:ranking","Options")),this.editor.option({name:o("block:ranking","Identifier"),form:{title:o("block:ranking","Identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0)),new L.Static(o("block:ranking","If an option identifier is set, this identifier will be used instead of the label."))]},activated:i(this.value)});const e=this.ref.slots.select("score:1","feature");this.editor.option({name:o("block:ranking","Score"),form:{title:o("block:ranking","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==e?void 0:e.precision)||0).digits((null==e?void 0:e.digits)||0).decimalSign((null==e?void 0:e.decimal)||"").thousands(!!(null==e?void 0:e.separator),(null==e?void 0:e.separator)||"").prefix((null==e?void 0:e.prefix)||"").prefixPlural((null==e?void 0:e.prefixPlural)||void 0).suffix((null==e?void 0:e.suffix)||"").suffixPlural((null==e?void 0:e.suffixPlural)||void 0)]},activated:!0,locked:!!e,disabled:!e})}};Ml([h("string"),u],hl.prototype,"name",void 0),Ml([h("string","optional")],hl.prototype,"description",void 0),Ml([h("string","optional"),X],hl.prototype,"value",void 0),Ml([h("number","optional"),J],hl.prototype,"score",void 0),Ml([p,v],hl.prototype,"defineSlot",null),Ml([m],hl.prototype,"defineEditor",null);var gl,ml="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgNWgtMTBhLjUuNSAwIDAgMSAwLTFoMTBhLjUuNSAwIDAgMSAwIDF6bTAgNGgtMTBhLjUuNSAwIDAgMSAwLTFoMTBhLjUuNSAwIDAgMSAwIDF6bTAgNGgtMTBhLjUuNSAwIDAgMSAwLTFoMTBhLjUuNSAwIDAgMSAwIDF6bTAgNGgtMTBhLjUuNSAwIDAgMSAwLTFoMTBhLjUuNSAwIDAgMSAwIDF6TTUuMTQ2IDEzLjY0NiA0IDE0Ljc5MlY2LjIwNmwxLjE0NiAxLjE0NmEuNDk4LjQ5OCAwIDAgMCAuNzA4IDAgLjUuNSAwIDAgMCAwLS43MDdsLTItMmEuNS41IDAgMCAwLS43MDcgMGwtMiAyYS41LjUgMCAwIDAgLjcwNy43MDdMMyA2LjIwNnY4LjU4NmwtMS4xNDYtMS4xNDZhLjUuNSAwIDAgMC0uNzA3LjcwN2wyIDJhLjQ5OC40OTggMCAwIDAgLjcwOCAwbDItMmEuNS41IDAgMCAwLS43MDctLjcwN3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",pl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgMjBoLTE2Qy42NzMgMjAgMCAxOS4zMjcgMCAxOC41di0xNkMwIDEuNjczLjY3MyAxIDEuNSAxaDE2Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTZjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAyYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTZhLjUuNSAwIDAgMC0uNS0uNWgtMTZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik03LjUgMTQuNWEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTMtM2EuNS41IDAgMCAxIC43MDctLjcwN2wyLjY0NiAyLjY0NiA2LjY0Ni02LjY0NmEuNS41IDAgMCAxIC43MDcuNzA3bC03IDdhLjQ5OC40OTggMCAwIDEtLjM1NC4xNDZ6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let vl=gl=class extends F{get title(){var e;return(null===(e=this.node)||void 0===e?void 0:e.label)||gl.label}get label(){var e;return(null===(e=this.slot)||void 0===e?void 0:e.label)&&o("block:ranking","Position %1",this.slot.label)||gl.label}get name(){return(this.option?this.option.name:o("block:ranking","Empty"))||this.type.label}get icon(){return this.option?pl:ml}get options(){return this.node&&this.node.block instanceof Al&&this.node.block.options||void 0}defineEditor(){var e;if(this.node&&this.options){const t=[];this.options.each((e=>{y(e.name)&&t.push({label:q(e.name,x.MarkdownFeatures.None),value:e})})),this.editor.form({title:(null===(e=this.slot)||void 0===e?void 0:e.label)&&o("block:ranking","Position %1",this.slot.label)||gl.label,controls:[new L.Dropdown(t,L.Dropdown.bind(this,"option",void 0))]})}}};Ml([g("#name"),g("#condition"),_("#options")],vl.prototype,"option",void 0),Ml([m],vl.prototype,"defineEditor",null),vl=gl=Ml([N({type:"condition",context:"@tripetto/block-ranking",identifier:"@tripetto/block-ranking",version:"1.0.10",icon:ml,get label(){return o("block:ranking","Chosen option")}})],vl);var Nl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let wl=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:ranking","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:ranking","calculated")}`;case"undefined":return`@${e.id} ${o("block:ranking","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:ranking","Compare mode"),controls:[new L.Radiobutton([{label:o("block:ranking","Score is equal to"),value:"equal"},{label:o("block:ranking","Score is not equal to"),value:"not-equal"},{label:o("block:ranking","Score is lower than"),value:"below"},{label:o("block:ranking","Score is higher than"),value:"above"},{label:o("block:ranking","Score is between"),value:"between"},{label:o("block:ranking","Score is not between"),value:"not-between"},{label:o("block:ranking","Score is calculated"),value:"defined"},{label:o("block:ranking","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:ranking","If score equals");break;case"not-equal":t.title=o("block:ranking","If score not equals");break;case"below":t.title=o("block:ranking","If score is lower than");break;case"above":t.title=o("block:ranking","If score is higher than");break;case"between":t.title=o("block:ranking","If score is between");break;case"not-between":t.title=o("block:ranking","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:ranking","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:ranking","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:ranking","Number"),value:"number"},{label:o("block:ranking","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:ranking","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:ranking","And"),"between"===this.mode||"not-between"===this.mode)}};Ml([h,g("#name")],wl.prototype,"mode",void 0),Ml([h,g("#name")],wl.prototype,"value",void 0),Ml([h,g("#name")],wl.prototype,"to",void 0),Ml([m],wl.prototype,"defineEditor",null),wl=Ml([N({type:"condition",context:"@tripetto/block-ranking",identifier:"@tripetto/block-ranking:score",version:"1.0.10",icon:Nl,get label(){return o("block:ranking","Verify score")}})],wl);let Al=class extends C{constructor(){super(...arguments),this.options=e.of(hl,this)}get label(){return k("block:ranking","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)}defineSlot(){let e=this.max||this.options.count,t=1;const i=this.slots.select("score","feature");for(;e>0;){const l=t-1;if(this.slots.dynamic({type:a.String,reference:`position:${t}`,label:`#${t}`,sequence:l,required:this.required,alias:this.alias&&`${this.alias} #${t}`||void 0,exportable:"concatenate"!==this.format&&this.exportable,pipeable:{label:o("block:ranking","Ranking"),alias:this.alias}}),i){const e=this.slots.feature({type:a.Numeric,reference:`score:${t}`,label:o("block:ranking","Score #%1",`${t}`),sequence:l,exportable:i.exportable,alias:i.alias&&`${i.alias} #${t}`||void 0,protected:!0});e.precision=i.precision,e.digits=i.digits,e.decimal=i.decimal,e.separator=i.separator,e.prefix=i.prefix,e.prefixPlural=i.prefixPlural,e.suffix=i.suffix,e.suffixPlural=i.suffixPlural}else this.slots.delete(`score:${t}`,"feature");e--,t++}for(;this.slots.select(`position:${t}`,"dynamic");)this.slots.delete(`position:${t}`,"dynamic"),this.slots.delete(`score:${t}`,"feature"),t++;"concatenate"===this.format||"both"===this.format?this.slots.feature({type:a.Text,reference:"concatenation",label:o("block:ranking","Text value"),exportable:this.exportable,alias:this.alias,protected:!0}):this.slots.delete("concatenation","feature")}defineEditor(){this.editor.name(),this.editor.description(),this.editor.explanation();const e=this.editor.collection({collection:this.options,title:o("block:ranking","Ranking options"),icon:pl,placeholder:o("block:ranking","Unnamed option"),sorting:"manual",autoOpen:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.Hyperlinks,emptyMessage:o("block:ranking","Click the + button to add an option..."),onResize:e=>{l.disabled(!e.count),t.max(e.count)}});this.editor.groups.settings();const t=new L.Numeric(L.Numeric.bind(this,"max",void 0,this.options.count)).label(o("block:ranking","Specify the maximum number of ranking positions.")).min(1).max(this.options.count).width(75);this.editor.option({name:o("block:ranking","Limits"),form:{title:o("block:ranking","Limits"),controls:[t]},activated:V(this.max)}),this.editor.option({name:o("block:ranking","Randomization"),form:{title:o("block:ranking","Randomization"),controls:[new L.Checkbox(o("block:ranking","Randomize the options (using [Fisher-Yates shuffle](%1))","https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle"),L.Checkbox.bind(this,"randomize",void 0,!0)).markdown()]},activated:$(this.randomize)}),this.editor.groups.options(),this.editor.required(this),this.editor.visibility();const l=this.editor.scores({target:this,collection:e,label:o("block:ranking","Score (total)"),description:o("block:ranking","Generates scores for the ranking. Open the settings panel for each option to set the individual score for that option."),onChange:()=>this.defineSlot()}).disabled(!this.options.count);this.editor.alias(this);const a=new L.Text("singleline",L.Text.bind(this,"formatSeparatorCustom",void 0)).visible("custom"===this.formatSeparator).sanitize(!1).width(200).label(o("block:ranking","Use this separator:")),n=new L.Group([new L.Dropdown([{label:o("block:ranking","Comma separated"),value:"comma"},{label:o("block:ranking","Space separated"),value:"space"},{label:o("block:ranking","List on multiple lines"),value:"list"},{label:o("block:ranking","Bulleted list"),value:"bullets"},{label:o("block:ranking","Numbered list"),value:"numbers"},{label:o("block:ranking","Language sensitive conjunction (_, _, and _)"),value:"conjunction"},{label:o("block:ranking","Language sensitive disjunction (_, _, or _)"),value:"disjunction"},{label:o("block:ranking","Custom separator"),value:"custom"}],L.Radiobutton.bind(this,"formatSeparator",void 0,"comma")).label(o("block:ranking","How to separate the selected options:")).on((e=>{a.visible("custom"===e.value)})),a]).visible("concatenate"===this.format||"both"===this.format);this.editor.option({name:o("block:ranking","Data format"),form:{title:o("block:ranking","Data format"),controls:[new L.Radiobutton([{label:o("block:ranking","Every position as a separate field"),description:o("block:ranking","Every position is included in the dataset as a separate value."),value:"fields"},{label:o("block:ranking","Single text field with the ranking"),description:o("block:ranking","The ranking is merged into a single string of text, separated by a configurable separator."),value:"concatenate"},{label:o("block:ranking","Both options above"),description:o("block:ranking","Includes every position in the dataset together with the concatenated text."),value:"both"}],L.Radiobutton.bind(this,"format",void 0,"fields")).label(o("block:ranking","This setting determines how the data is stored in the dataset:")).on((e=>{n.visible("concatenate"===e.value||"both"===e.value)})),n]},activated:i(this.format)}),this.editor.exportable(this)}defineConditions(){let e=1,t=this.slots.select(`position:${e}`,"dynamic");for(;t;){if(t.label){const i=this.conditions.group(o("block:ranking","Position #%1",`${e}`),ml);this.options.each((e=>{e.name&&i.template({condition:vl,label:e.name,icon:pl,burst:!0,props:{slot:t,option:e}})}))}e++,t=this.slots.select(`position:${e}`,"dynamic")}let i=this.slots.select("score","feature");if(i){const t=this.conditions.group(o("block:ranking","Scores"),Nl),l=(e,i)=>{if(e.label){const l=t.group(e.label,Nl,void 0,i);E([{mode:"equal",label:o("block:ranking","Score is equal to")},{mode:"not-equal",label:o("block:ranking","Score is not equal to")},{mode:"below",label:o("block:ranking","Score is lower than")},{mode:"above",label:o("block:ranking","Score is higher than")},{mode:"between",label:o("block:ranking","Score is between")},{mode:"not-between",label:o("block:ranking","Score is not between")},{mode:"defined",label:o("block:ranking","Score is calculated")},{mode:"undefined",label:o("block:ranking","Score is not calculated")}],(t=>{l.template({condition:wl,label:t.label,autoOpen:"defined"!==t.mode&&"undefined"!==t.mode,props:{slot:e,mode:t.mode,value:0,to:"between"===t.mode||"not-between"===t.mode?0:void 0}})}))}};for(l(i,!1),e=1,i=this.slots.select(`score:${e}`,"feature");i;)l(i,1===e),e++,i=this.slots.select(`score:${e}`,"feature")}}};function Il(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Ml([h("items"),g("#name"),te("#slot","position:*")],Al.prototype,"options",void 0),Ml([h("boolean","optional"),g("#required"),g("#slots")],Al.prototype,"required",void 0),Ml([h("number","optional"),g("#slots")],Al.prototype,"max",void 0),Ml([h("string","optional"),g("#label"),g("#slots")],Al.prototype,"alias",void 0),Ml([h("boolean","optional"),g("#slots")],Al.prototype,"exportable",void 0),Ml([h("boolean","optional")],Al.prototype,"randomize",void 0),Ml([h("string","optional"),g("#slots")],Al.prototype,"format",void 0),Ml([h("string","optional")],Al.prototype,"formatSeparator",void 0),Ml([h("string","optional")],Al.prototype,"formatSeparatorCustom",void 0),Ml([A],Al.prototype,"defineSlot",null),Ml([m],Al.prototype,"defineEditor",null),Ml([D],Al.prototype,"defineConditions",null),Al=Ml([N({type:"node",identifier:"@tripetto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wbC41IDFhLjUuNSAwIDAgMS0uODk1LjQ0N2wtLjA1My0uMTA2LTIuMDUzIDQuMTA2YS41MDMuNTAzIDAgMCAxLS4zNjUuMjdsLTUuMDQyLjg0IDMuMzEzIDMuMzEzYS41MDIuNTAyIDAgMCAxIC4xNC40MzZsLS44MzEgNC45ODcgNC41OTktMi41MDhhLjUwMi41MDIgMCAwIDEgLjQ3OSAwbC41LjI3M2EuNS41IDAgMSAxLS40NzkuODc3bC0uMjYxLS4xNDItNS4yNjEgMi44NjlhLjQ5Ny40OTcgMCAwIDEtLjIzOS4wNjF6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let Ll=class extends F{constructor(){super(...arguments),this.stars=0}get rating(){var e;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof xl&&this.node.block||void 0}get icon(){var e;return(null===(e=this.rating)||void 0===e?void 0:e.shapeIcon)||Dl}get name(){var e;return xl.getShapeLabel((null===(e=this.rating)||void 0===e?void 0:e.shape)||"stars",this.stars)}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}};Il([h,g("#name")],Ll.prototype,"stars",void 0),Ll=Il([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-rating",identifier:"@tripetto/block-rating",version:"6.0.3",icon:Dl,alias:"rating",get label(){return o("block:rating","Match rating")}})],Ll);let jl=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get rating(){var e;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof xl&&this.node.block||void 0}get icon(){var e;return(null===(e=this.rating)||void 0===e?void 0:e.shapeIcon)||Dl}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:scale","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:rating","rated")}`;case"undefined":return`@${e.id} ${o("block:rating","not rated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}parse(e,t){var o;return n(t)?e.toString(t):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?"@"+t:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:rating","Compare mode"),controls:[new L.Radiobutton([{label:o("block:rating","Rating is equal to"),value:"equal"},{label:o("block:rating","Rating is not equal to"),value:"not-equal"},{label:o("block:rating","Rating is lower than"),value:"below"},{label:o("block:rating","Rating is higher than"),value:"above"},{label:o("block:rating","Rating is between"),value:"between"},{label:o("block:rating","Rating is not between"),value:"not-between"},{label:o("block:rating","Rating is given"),value:"defined"},{label:o("block:rating","Rating is not given"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:rating","If rating equals");break;case"not-equal":t.title=o("block:rating","If rating not equals");break;case"below":t.title=o("block:rating","If rating is lower than");break;case"above":t.title=o("block:rating","If rating is higher than");break;case"between":t.title=o("block:rating","If rating is between");break;case"not-between":t.title=o("block:rating","If rating is not between")}}))]});const e=(e,t,l)=>{var s,c;const r=this[e],u=new L.Numeric(n(r)?r:0).label(o("block:rating","Use fixed number")).min(0).max((null===(s=this.rating)||void 0===s?void 0:s.steps)||5).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(r)?r:void 0,!1,null===(c=this.slot)||void 0===c?void 0:c.id),b=new L.Dropdown(d,i(r)?r:"").label(o("block:rating","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:rating","Number"),value:"number"},{label:o("block:rating","Value"),value:"variable",disabled:0===d.length}],i(r)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:rating","If rating equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:rating","And"),"between"===this.mode||"not-between"===this.mode)}};var Sl;Il([h,g("#name")],jl.prototype,"mode",void 0),Il([h,g("#name")],jl.prototype,"value",void 0),Il([h,g("#name")],jl.prototype,"to",void 0),Il([m],jl.prototype,"defineEditor",null),jl=Il([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-rating",identifier:"@tripetto/block-rating:compare",version:"6.0.3",icon:Dl,get label(){return o("block:rating","Compare rating")}})],jl);let xl=Sl=class extends C{get icon(){return this.shape?this.shapeIcon:Dl}get shapeIcon(){switch(this.shape){case"hearts":return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTkuNSAxOWEuNS41IDAgMCAxLS4yNDMtLjA2M2MtLjA5NC0uMDUyLTIuMzI2LTEuMzAxLTQuNTkyLTMuMzQ3LTEuMzQxLTEuMjEtMi40MTEtMi40NDgtMy4xODMtMy42OEMuNDk4IDEwLjMzOSAwIDguNzcxIDAgNy4yNUE1LjI1NiA1LjI1NiAwIDAgMSA1LjI1IDJjLjk4IDAgMi4wMjEuMzY3IDIuOTMxIDEuMDM0LjUzMi4zOS45ODUuODYgMS4zMTkgMS4zNTlhNS41MjIgNS41MjIgMCAwIDEgMS4zMTktMS4zNTlDMTEuNzI5IDIuMzY3IDEyLjc3IDIgMTMuNzUgMkE1LjI1NiA1LjI1NiAwIDAgMSAxOSA3LjI1YzAgMS41MjEtLjQ5OSAzLjA4OS0xLjQ4MiA0LjY2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CI+PHBhdGggZD0iTTE1LjUgMTlhLjQ5Ny40OTcgMCAwIDEtLjIzOS0uMDYxTDEwIDE2LjA3bC01LjI2MSAyLjg2OWEuNDk5LjQ5OSAwIDAgMS0uNzMyLS41MjJsLjk1OC01Ljc0Ni0zLjgxOC0zLjgxOGEuNTAxLjUwMSAwIDAgMSAuMjcxLS44NDdsNS43NDktLjk1OCAyLjM4Ni00Ljc3MmEuNS41IDAgMCAxIC44OTQgMGwyLjM4NiA0Ljc3MiA1Ljc0OS45NThhLjUuNSAwIDAgMSAuMjcxLjg0N2wtMy44MTggMy44MTguOTU4IDUuNzQ2QS41MDMuNTAzIDAgMCAxIDE1LjUgMTl6TTEwIDE1Yy4wODIgMCAuMTY1LjAyLjIzOS4wNjFsNC41OTkgMi41MDgtLjgzMS00Ljk4N2EuNDk3LjQ5NyAwIDAgMSAuMTQtLjQzNmwzLjMxMy0zLjMxMy01LjA0Mi0uODRhLjUuNSAwIDAgMS0uMzY1LS4yN0wxMCAzLjYxNyA3Ljk0NyA3LjcyM2EuNTAzLjUwMyAwIDAgMS0uMzY1LjI3bC01LjA0Mi44NCAzLjMxMyAzLjMxM2EuNTAyLjUwMiAwIDAgMSAuMTQuNDM2bC0uODMxIDQuOTg3IDQuNTk5LTIuNTA4QS40OTcuNDk3IDAgMCAxIDEwIDE1eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4="}static getShapeLabel(e,t){switch(e){case"hearts":return k("block:rating","1 heart","%1 hearts",t);case"thumbs-up":return k("block:rating","1 thumb up","%1 thumbs up",t);case"thumbs-down":return k("block:rating","1 thumb down","%1 thumbs down",t);case"persons":return k("block:rating","1 person","%1 persons",t);case"stars":return k("block:rating","1 star","%1 stars",t)}}defineSlot(){this.ratingSlot=this.slots.static({type:a.Number,reference:"rating",label:o("block:rating","Rating"),exchange:["required","alias","exportable"]})}defineEditor(){this.editor.name(!0,!0),this.editor.description(),this.editor.option({name:o("block:rating","Image"),form:{title:o("block:rating","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:rating","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:rating","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:rating","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.explanation(),this.editor.groups.settings(),this.editor.option({name:o("block:rating","Shape"),form:{title:o("block:rating","Shape"),controls:[new L.Radiobutton([{label:o("block:rating","Stars"),value:"stars"},{label:o("block:rating","Hearts"),value:"hearts"},{label:o("block:rating","Thumbs up"),value:"thumbs-up"},{label:o("block:rating","Thumbs down"),value:"thumbs-down"},{label:o("block:rating","Persons"),value:"persons"}],L.Radiobutton.bind(this,"shape",void 0)).label(o("block:rating","Select the shape you want to use for your rating."))]},activated:i(this.shape)}),this.editor.option({name:o("block:rating","Steps"),form:{title:o("block:rating","Number of steps"),controls:[new L.Numeric(L.Numeric.bind(this,"steps",void 0,5)).min(1).max(10)]},activated:n(this.steps)}),this.editor.groups.options(),this.editor.required(this.ratingSlot),this.editor.visibility(),this.editor.alias(this.ratingSlot),this.editor.exportable(this.ratingSlot)}defineConditions(){const e=this.conditions.group(o("block:rating","Match"),this.shapeIcon),t=this.conditions.group(o("block:rating","Compare"),this.shapeIcon);for(let t=1;t<=(this.steps||5);t++)e.template({condition:Ll,icon:this.shapeIcon,label:Sl.getShapeLabel(this.shape||"stars",t),burst:"branch",props:{stars:t}});E([{mode:"equal",label:o("block:rating","Rating is equal to")},{mode:"not-equal",label:o("block:rating","Rating is not equal to")},{mode:"below",label:o("block:rating","Rating is lower than")},{mode:"above",label:o("block:rating","Rating is higher than")},{mode:"between",label:o("block:rating","Rating is between")},{mode:"not-between",label:o("block:rating","Rating is not between")},{mode:"defined",label:o("block:rating","Rating is given")},{mode:"undefined",label:o("block:rating","Rating is not given")}],(e=>{t.template({condition:jl,icon:this.shapeIcon,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.ratingSlot,mode:e.mode}})}))}};function kl(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Il([h,g("#icon")],xl.prototype,"shape",void 0),Il([h],xl.prototype,"steps",void 0),Il([h("string","optional")],xl.prototype,"imageURL",void 0),Il([h("string","optional")],xl.prototype,"imageWidth",void 0),Il([h("boolean","optional")],xl.prototype,"imageAboveText",void 0),Il([A],xl.prototype,"defineSlot",null),Il([m],xl.prototype,"defineEditor",null),Il([D],xl.prototype,"defineConditions",null),xl=Sl=Il([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-rating",version:"6.0.3",icon:Dl,alias:"rating",get label(){return o("block:rating","Rating")}})],xl);let yl=class extends F{constructor(){super(...arguments),this.regex="",this.invert=!1}get label(){return""}get name(){return this.variable&&`${this.type.label} @${this.variable}`||this.type.label}defineEditor(){this.editor.form({title:o("block:regex","Input"),controls:[new L.Dropdown(H(this,void 0,this.variable),this.variable).placeholder(o("block:regex","Select the input variable to use...")).on((e=>{var t;this.variable=e.value||void 0,this.slot=e.value&&(null===(t=l(this,e.value))||void 0===t?void 0:t.slot)||void 0})).autoFocus()]}),this.editor.form({title:o("block:regex","Regular expression"),controls:[new L.Text("singleline",L.Text.bind(this,"regex","")).placeholder(o("block:regex","Regex literal (for example /ab+c/)")).autoValidate((e=>{if(!e.value)return"unknown";try{const t=e.value.indexOf("/"),o=e.value.lastIndexOf("/");return 0===t&&o>t&&((e,t)=>{try{return new RegExp(e.substring(1,t),e.substr(t+1))instanceof RegExp}catch(e){return!1}})(e.value,o)?"pass":"fail"}catch(e){return"fail"}})).enter(this.editor.close).escape(this.editor.close),new L.Checkbox(o("block:regex","Invert regular expression"),L.Checkbox.bind(this,"invert",!1))]})}};function fl(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}kl([h,g("#name")],yl.prototype,"variable",void 0),kl([h],yl.prototype,"regex",void 0),kl([h],yl.prototype,"invert",void 0),kl([m],yl.prototype,"defineEditor",null),yl=kl([N({type:"condition",legacyBlock:!0,context:"*",identifier:"@tripetto/block-regex",version:"4.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgMThoLTE3Qy42NzMgMTggMCAxNy4zMjcgMCAxNi41di0xM0MwIDIuNjczLjY3MyAyIDEuNSAyaDE3Yy44MjcgMCAxLjUuNjczIDEuNSAxLjV2MTNjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6TTEuNSAzYS41LjUgMCAwIDAtLjUuNXYxM2EuNS41IDAgMCAwIC41LjVoMTdhLjUuNSAwIDAgMCAuNS0uNXYtMTNhLjUuNSAwIDAgMC0uNS0uNWgtMTd6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjxwYXRoIGQ9Ik0zLjUgMTBhLjUuNSAwIDAgMS0uMjc4LS45MTZMNS41OTggNy41IDMuMjIyIDUuOTE2YS41LjUgMCAxIDEgLjU1NC0uODMybDMgMmEuNTAxLjUwMSAwIDAgMSAwIC44MzJsLTMgMmEuNDk3LjQ5NyAwIDAgMS0uMjc3LjA4NHptOCAwaC0zYS41LjUgMCAwIDEgMC0xaDNhLjUuNSAwIDAgMSAwIDF6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",autoOpen:!0,get label(){return o("block:regex","Regular expression")}})],yl);let Tl=class extends e.Item{constructor(){super(...arguments),this.name=""}defineEditor(){this.editor.option({name:o("block:scale","Name"),form:{title:o("block:scale","Option name"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).action("@",T(this)).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0}),this.editor.group(o("block:scale","Options")),this.editor.option({name:o("block:scale","Identifier"),form:{title:o("block:scale","Option identifier"),controls:[new L.Text("singleline",L.Text.bind(this,"value",void 0,"")),new L.Static(o("block:scale","If an option identifier is set, this identifier will be used as selected option value instead of the option label."))]},activated:i(this.value)});const e=this.ref.slots.select("score","feature");this.editor.option({name:o("block:scale","Score"),form:{title:o("block:scale","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==e?void 0:e.precision)||0).digits((null==e?void 0:e.digits)||0).decimalSign((null==e?void 0:e.decimal)||"").thousands(!!(null==e?void 0:e.separator),(null==e?void 0:e.separator)||"").prefix((null==e?void 0:e.prefix)||"").prefixPlural((null==e?void 0:e.prefixPlural)||void 0).suffix((null==e?void 0:e.suffix)||"").suffixPlural((null==e?void 0:e.suffixPlural)||void 0)]},activated:!0,locked:!!e,disabled:!e})}};fl([h("string"),u],Tl.prototype,"name",void 0),fl([h("string","optional"),X],Tl.prototype,"value",void 0),fl([h("number","optional"),J],Tl.prototype,"score",void 0),fl([m],Tl.prototype,"defineEditor",null);var Cl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgN2gtMTZDLjY3MyA3IDAgNy42NzMgMCA4LjV2M2MwIC44MjcuNjczIDEuNSAxLjUgMS41aDE2Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0zYzAtLjgyNy0uNjczLTEuNS0xLjUtMS41em0uNSA0LjVhLjUuNSAwIDAgMS0uNS41SDE2di0xLjVhLjUuNSAwIDAgMC0xIDBWMTJoLTJWOS41YS41LjUgMCAwIDAtMSAwVjEyaC0ydi0xLjVhLjUuNSAwIDAgMC0xIDBWMTJIN1Y5LjVhLjUuNSAwIDAgMC0xIDBWMTJINHYtMS41YS41LjUgMCAwIDAtMSAwVjEySDEuNWEuNS41IDAgMCAxLS41LS41di0zYS41LjUgMCAwIDEgLjUtLjVoMTZhLjUuNSAwIDAgMSAuNS41djN6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",zl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0ibTEwLjcwNyAxMC41IDUuNjQ2LTUuNjQ2YS41LjUgMCAwIDAtLjcwNy0uNzA3TDEwIDkuNzkzIDQuMzU0IDQuMTQ3YS41LjUgMCAwIDAtLjcwNy43MDdMOS4yOTMgMTAuNWwtNS42NDYgNS42NDZhLjUuNSAwIDAgMCAuNzA4LjcwN2w1LjY0Ni01LjY0NiA1LjY0NiA1LjY0NmEuNDk4LjQ5OCAwIDAgMCAuNzA4IDAgLjUuNSAwIDAgMCAwLS43MDdMMTAuNzA5IDEwLjV6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";let El=class extends F{get icon(){return this.option?Cl:zl}get name(){return(this.option?this.option.name:o("block:scale","Unanswered"))||this.type.label}get title(){return this.name}};fl([g("#name"),g("#condition"),_("#options")],El.prototype,"option",void 0),El=fl([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-scale",identifier:"@tripetto/block-scale:match",version:"4.0.3",icon:Cl,get label(){return o("block:scale","Match scale answer")}})],El);const Ul=-25,Ol=25,Yl=10;let Pl=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get scale(){var e;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof Rl&&this.node.block||void 0}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Number){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:scale","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:scale","not empty")}`;case"undefined":return`@${e.id} ${o("block:scale","empty")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}parse(e,t){var o;return n(t)?e.toString(t):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?"@"+t:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:scale","Compare mode"),controls:[new L.Radiobutton([{label:o("block:scale","Answer is equal to"),value:"equal"},{label:o("block:scale","Answer is not equal to"),value:"not-equal"},{label:o("block:scale","Answer is lower than"),value:"below"},{label:o("block:scale","Answer is higher than"),value:"above"},{label:o("block:scale","Answer is between"),value:"between"},{label:o("block:scale","Answer is not between"),value:"not-between"},{label:o("block:scale","Answer is not empty"),value:"defined"},{label:o("block:scale","Answer is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:scale","If answer equals");break;case"not-equal":t.title=o("block:scale","If answer not equals");break;case"below":t.title=o("block:scale","If answer is lower than");break;case"above":t.title=o("block:scale","If answer is higher than");break;case"between":t.title=o("block:scale","If answer is between");break;case"not-between":t.title=o("block:scale","If answer is not between")}}))]});const e=(e,t,l)=>{var s,c,r,u,d;const b=this[e],M=new L.Numeric(n(b)?b:0).label(o("block:scale","Use fixed number")).min(Y.range(Y.min(O(null===(s=this.scale)||void 0===s?void 0:s.from,0),O(null===(c=this.scale)||void 0===c?void 0:c.to,Yl)),Ul,Ol)).max(Y.range(Y.max(O(null===(r=this.scale)||void 0===r?void 0:r.from,0),O(null===(u=this.scale)||void 0===u?void 0:u.to,Yl)),Ul,Ol)).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),h=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(b)?b:void 0,!1,null===(d=this.slot)||void 0===d?void 0:d.id),g=new L.Dropdown(h,i(b)?b:"").label(o("block:scale","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:scale","Number"),value:"number"},{label:o("block:scale","Value"),value:"variable",disabled:0===h.length}],i(b)?"variable":"number").on((e=>{M.visible("number"===e.value),g.visible("variable"===e.value),M.isObservable&&M.focus()})),M,g]}).visible(l)},t=e("value",o("block:scale","If answer equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:scale","And"),"between"===this.mode||"not-between"===this.mode)}};fl([h,g("#name")],Pl.prototype,"mode",void 0),fl([h,g("#name")],Pl.prototype,"value",void 0),fl([h,g("#name")],Pl.prototype,"to",void 0),fl([m],Pl.prototype,"defineEditor",null),Pl=fl([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-scale",identifier:"@tripetto/block-scale:compare",version:"4.0.3",icon:Cl,get label(){return o("block:scale","Compare scale answer")}})],Pl);var Zl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Vl=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:scale","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:scale","calculated")}`;case"undefined":return`@${e.id} ${o("block:scale","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:scale","Compare mode"),controls:[new L.Radiobutton([{label:o("block:scale","Score is equal to"),value:"equal"},{label:o("block:scale","Score is not equal to"),value:"not-equal"},{label:o("block:scale","Score is lower than"),value:"below"},{label:o("block:scale","Score is higher than"),value:"above"},{label:o("block:scale","Score is between"),value:"between"},{label:o("block:scale","Score is not between"),value:"not-between"},{label:o("block:scale","Score is calculated"),value:"defined"},{label:o("block:scale","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:scale","If score equals");break;case"not-equal":t.title=o("block:scale","If score not equals");break;case"below":t.title=o("block:scale","If score is lower than");break;case"above":t.title=o("block:scale","If score is higher than");break;case"between":t.title=o("block:scale","If score is between");break;case"not-between":t.title=o("block:scale","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:scale","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:scale","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:scale","Number"),value:"number"},{label:o("block:scale","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:scale","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:scale","And"),"between"===this.mode||"not-between"===this.mode)}};fl([h,g("#name")],Vl.prototype,"mode",void 0),fl([h,g("#name")],Vl.prototype,"value",void 0),fl([h,g("#name")],Vl.prototype,"to",void 0),fl([m],Vl.prototype,"defineEditor",null),Vl=fl([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-scale",identifier:"@tripetto/block-scale:score",version:"4.0.3",icon:Zl,get label(){return o("block:scale","Verify score")}})],Vl);let Rl=class extends C{constructor(){super(...arguments),this.mode="numeric",this.options=e.of(Tl,this)}get useOptions(){return"options"===this.mode}get label(){if("numeric"===this.mode){const e=Y.range(Y.min(O(this.from,0),O(this.to,Yl)),Ul,Ol),t=Y.range(Y.max(O(this.from,0),O(this.to,Yl)),Ul,Ol);return`${this.type.label} (${Y.format(e)}-${Y.format(t)})`}return k("block:scale","%2 (%1 option)","%2 (%1 options)",this.options.count,this.type.label)}defineSlots(){this.scaleSlot=this.slots.static(Object.assign(Object.assign({type:"numeric"===this.mode?a.Number:a.String,reference:"scale",label:o("block:scale","Scale")},this.scaleSlot&&{required:this.scaleSlot.required,alias:this.scaleSlot.alias,exportable:this.scaleSlot.exportable}),{exchange:["required","alias","exportable"]}))}defineEditor(){if(n(this.from)&&n(this.to)&&this.to<this.from){const e=this.from;this.from=this.to,this.to=e}const e=new L.Text("singleline",L.Text.bind(this,"labelLeft",void 0)).placeholder(o("block:scale","Left")).action("@",T(this)),t=new L.Text("singleline",L.Text.bind(this,"labelCenter",void 0)).placeholder(o("block:scale","Center")).action("@",T(this)),l=new L.Text("singleline",L.Text.bind(this,"labelRight",void 0)).placeholder(o("block:scale","Right")).action("@",T(this)),a=()=>{const o="options"===this.mode?le(this.options.all,(e=>!!e.name)).length:Math.abs(O(this.from,Yl)-O(this.to,0))+1;e.disabled(0===o),t.disabled(o<3),l.disabled(o<2)};this.editor.groups.general(),this.editor.name(),this.editor.description(),this.editor.explanation(),this.editor.groups.settings(),this.editor.option({name:o("block:scale","Mode"),form:{title:o("block:scale","Scale mode"),controls:[new L.Radiobutton([{label:o("block:scale","Numeric scale"),value:"numeric"},{label:o("block:scale","Text scale"),value:"options"}],L.Radiobutton.bind(this,"mode","numeric")).on((e=>{s.disabled("options"===e.value),s.visible("numeric"===e.value),c.disabled("numeric"===e.value),c.visible("options"===e.value),a()}))]},locked:!0});const s=this.editor.option({name:o("block:scale","Scale range"),form:{title:o("block:scale","Scale range"),controls:[new L.Numeric(L.Numeric.bind(this,"from",void 0,0)).label(o("block:scale","From")).min(Ul).max(Ol).on((()=>a())),new L.Numeric(L.Numeric.bind(this,"to",void 0,Yl)).label(o("block:scale","To")).min(Ul).max(Ol).on((()=>a())),new L.Numeric(L.Numeric.bind(this,"stepSize",void 0,1)).label(o("block:scale","Step size")).min(1).max(Ol).on((()=>a()))]},activated:!0,locked:!0,disabled:"options"===this.mode,visible:"numeric"===this.mode}),c=this.editor.option({name:o("block:scale","Scale options"),collection:{collection:this.options,title:o("block:scale","Scale options"),placeholder:o("block:scale","Unnamed option"),showAliases:!0,allowVariables:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,autoOpen:!0,sorting:"manual",onAdd:()=>a(),onDelete:()=>a(),onRename:()=>a(),emptyMessage:o("block:scale","Click the + button to add an option...")},activated:!0,locked:!0,disabled:"numeric"===this.mode,visible:"options"===this.mode});this.editor.option({name:o("block:scale","Labels"),form:{title:o("block:scale","Labels"),controls:[e,t,l]},activated:i(this.labelLeft)||i(this.labelCenter)||i(this.labelRight)}),this.editor.option({name:o("block:scale","Width"),form:{title:o("block:scale","Width"),controls:[new L.Checkbox(o("block:scale","Justify the scale across the available width"),L.Checkbox.bind(this,"justify",void 0,!0))]},activated:$(this.justify)}),this.editor.groups.options(),this.editor.required((()=>this.scaleSlot)),this.editor.visibility(),this.editor.scores({target:this,collection:c,description:o("block:scale","Generates a score based on the selected option. Open the settings panel for each option to set the score.")}),this.editor.alias((()=>this.scaleSlot)),this.editor.exportable((()=>this.scaleSlot))}defineConditions(){"options"===this.mode?(this.options.each((e=>{e.name&&this.conditions.template({condition:El,label:e.name,burst:"branch",props:{slot:this.scaleSlot,option:e}})})),this.conditions.template({condition:El,label:o("block:scale","Unanswered"),icon:zl,separator:!0,props:{slot:this.scaleSlot}})):E([{mode:"equal",label:o("block:scale","Answer is equal to")},{mode:"not-equal",label:o("block:scale","Answer is not equal to")},{mode:"below",label:o("block:scale","Answer is lower than")},{mode:"above",label:o("block:scale","Answer is higher than")},{mode:"between",label:o("block:scale","Answer is between")},{mode:"not-between",label:o("block:scale","Answer is not between")},{mode:"defined",label:o("block:scale","Answer is not empty")},{mode:"undefined",label:o("block:scale","Answer is empty")}],(e=>{this.conditions.template({condition:Pl,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.scaleSlot,mode:e.mode,value:0,to:"between"===e.mode||"not-between"===e.mode?0:void 0}})}));const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,Zl,!1,"options"!==this.mode);E([{mode:"equal",label:o("block:scale","Score is equal to")},{mode:"not-equal",label:o("block:scale","Score is not equal to")},{mode:"below",label:o("block:scale","Score is lower than")},{mode:"above",label:o("block:scale","Score is higher than")},{mode:"between",label:o("block:scale","Score is between")},{mode:"not-between",label:o("block:scale","Score is not between")},{mode:"defined",label:o("block:scale","Score is calculated")},{mode:"undefined",label:o("block:scale","Score is not calculated")}],(o=>{t.template({condition:Vl,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function Wl(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}fl([h,g("#label"),g("#slots")],Rl.prototype,"mode",void 0),fl([h("items"),g("#label"),te("#slot","scale",!0,"useOptions")],Rl.prototype,"options",void 0),fl([h("number","optional"),g("#label")],Rl.prototype,"from",void 0),fl([h("number","optional"),g("#label")],Rl.prototype,"to",void 0),fl([h("number","optional")],Rl.prototype,"stepSize",void 0),fl([h("string","optional")],Rl.prototype,"labelLeft",void 0),fl([h("string","optional")],Rl.prototype,"labelCenter",void 0),fl([h("string","optional")],Rl.prototype,"labelRight",void 0),fl([h("boolean","optional")],Rl.prototype,"justify",void 0),fl([A],Rl.prototype,"defineSlots",null),fl([m],Rl.prototype,"defineEditor",null),fl([D],Rl.prototype,"defineConditions",null),Rl=fl([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-scale",version:"4.0.3",icon:Cl,get label(){return o("block:scale","Scale")}})],Rl);var Gl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE5LjEwMy44OTZDMTguNTQxLjMzNCAxNy43OTQuMDI1IDE3IC4wMjVzLTEuNTQyLjMwOS0yLjEwMy44NzFsLTkuNzUgOS43NWEuNDk2LjQ5NiAwIDAgMC0uMTE2LjE4M2wtMiA1LjVhLjUuNSAwIDAgMCAuNjQxLjY0MWw1LjUtMmEuNTEuNTEgMCAwIDAgLjE4My0uMTE2bDkuNzUtOS43NWMuNTYyLS41NjIuODcxLTEuMzA5Ljg3MS0yLjEwNHMtLjMwOS0xLjU0Mi0uODcxLTIuMTA0ek04LjcyNSAxNC4wNjhsLTQuMzg5IDEuNTk2IDEuNTk2LTQuMzg5TDE0IDMuMjA3IDE2Ljc5MyA2bC04LjA2OCA4LjA2OHptOS42NzItOS42NzItLjg5Ny44OTYtMi43OTMtMi43OTMuODk3LS44OTZjLjM3My0uMzczLjg2OS0uNTc4IDEuMzk2LS41NzhzMS4wMjMuMjA1IDEuMzk3LjU3OGMuMzczLjM3My41NzguODY5LjU3OCAxLjM5NnMtLjIwNSAxLjAyMy0uNTc4IDEuMzk2eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48cGF0aCBkPSJNMTcuNSAyMGgtMTZDLjY3MyAyMCAwIDE5LjMyNyAwIDE4LjV2LTE2QzAgMS42NzMuNjczIDEgMS41IDFoMTBhLjUuNSAwIDAgMSAwIDFoLTEwYS41LjUgMCAwIDAtLjUuNXYxNmEuNS41IDAgMCAwIC41LjVoMTZhLjUuNSAwIDAgMCAuNS0uNXYtMTBhLjUuNSAwIDAgMSAxIDB2MTBjMCAuODI3LS42NzMgMS41LTEuNSAxLjV6IiBjbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==";function Ql(e){if(e instanceof a.Number||e instanceof a.Numeric)switch(e.reference){case"calculator":return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTcuNSAxMGgtNkMuNjczIDEwIDAgOS4zMjcgMCA4LjV2LTZDMCAxLjY3My42N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cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTguNSAxNS41YS41MDIuNTAyIDAgMCAxLS4zNTQtLjE0NmwtMi0yYS41LjUgMCAwIDEgLjcwNy0uNzA3bDEuNjQ2IDEuNjQ2IDQuNjQ2LTQuNjQ2YS41LjUgMCAwIDEgLjcwNy43MDdsLTUgNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+":e instanceof a.String||e instanceof a.Text?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+":Gl}ce("@tripetto/block-setter"),re();class Fl extends e.Item{constructor(){super(...arguments),this.startBlank=!0,this.operations=e.of(Yt,this,!0)}get setter(){return this.ref}get currentVariable(){return this.variable&&l(this.setter,this.variable)||void 0}get block(){return this.setter}get icon(){var e;return Ql((null===(e=this.currentVariable)||void 0===e?void 0:e.slot)||void 0)}get name(){var e,t,c,r;const u=this.currentVariable;return u?(u.slot instanceof a.String||u.slot instanceof a.Text)&&i(this.value)?`@${u.key} ${"concatenate"===this.mode?`+ ${(this.separator||"").replace("\n\n","¶").replace("\n","↵")}`:"= "}${!this.querystring&&oe(this.value)?(null===(e=l(this.setter,this.value))||void 0===e?void 0:e.label)&&`@${this.value}`||"":`${this.querystring?"`?":""}${S(f.replace(this.value,"\n","↵"))||(this.querystring?"...":"\\_\\_")}${this.querystring?"=...`":""}`}`:(u.slot instanceof a.Number||u.slot instanceof a.Numeric)&&(!0===this.value||n(this.value)||i(this.value))?`@${u.key} ${"+"===this.mode||"-"===this.mode?this.mode:"*"===this.mode?"×":"/"===this.mode?"÷":"="} ${this.querystring?`\`?${y(this.value)&&S(this.value)||"..."}=...\``:!0===this.value?"`"+o("block:setter","Calculation outcome").toUpperCase()+"`":y(this.value)?(null===(t=l(this.setter,this.value))||void 0===t?void 0:t.label)&&`@${this.value}`||"":`**${u.slot.toString(this.value,((e,t)=>s.locale.number(e,t,!1)))}**`}`:u.slot instanceof a.Boolean&&($(this.value)||i(this.value))?`@${u.key} ${"OR"===this.mode||"NOR"===this.mode||"AND"===this.mode||"NAND"===this.mode||"XOR"===this.mode||"XNOR"===this.mode?this.mode:"="} ${this.querystring?`\`?${y(this.value)&&S(this.value)||"..."}=...\``:y(this.value)?(null===(c=l(this.setter,this.value))||void 0===c?void 0:c.label)&&`@${this.value}`||"":`**${S(u.slot.toString(this.value))}**`}`:u.slot instanceof a.Date&&(!0===this.value||n(this.value)||i(this.value))?`@${u.key} = ${this.querystring?`\`?${y(this.value)&&S(this.value)||"..."}=...\``:!0===this.value?"`"+o("block:setter","Now").toUpperCase()+"`":y(this.value)?(null===(r=l(this.setter,this.value))||void 0===r?void 0:r.label)&&`@${this.value}`||"":`**${u.slot.supportsTime?s.locale.dateTimeShort(u.slot.toValue(this.value),!0):s.locale.dateShort(u.slot.toValue(this.value),!0)}**`}`:"@"+u.key:""}get title(){var e;return(null===(e=this.currentVariable)||void 0===e?void 0:e.label)||o("block:setter","Invalid variable")}get overwriteLabel(){const e=this.currentVariable;return void 0===this.value&&o("block:setter","Unchanged").toUpperCase()||this.value===((null==e?void 0:e.slot)instanceof a.Boolean&&0)&&o("block:setter","Clear").toUpperCase()||void 0===this.mode&&this.setter.isAdvanced&&o("block:setter","Prefill").toUpperCase()||void 0}get width(){var e;return(null===(e=this.currentVariable)||void 0===e?void 0:e.slot)instanceof a.Date?475:400}attachVariable(e){var t,o;let i=this.currentVariable;return e&&(P(this,"variable",e),i=this.currentVariable,(null==i?void 0:i.slot)instanceof a.String||(null==i?void 0:i.slot)instanceof a.Text?this.value="":(null==i?void 0:i.slot)instanceof a.Number||(null==i?void 0:i.slot)instanceof a.Numeric?this.value=0:((null==i?void 0:i.slot)instanceof a.Boolean||(null==i?void 0:i.slot)instanceof a.Date)&&(this.value=!0),this.setter.isAdvanced&&(this.mode="overwrite"),this.open()),null===(t=null==i?void 0:i.node)||void 0===t||t.hook("OnBlockUnassign","framed",(()=>this.close()),this),null===(o=null==i?void 0:i.node)||void 0===o||o.hook("OnItemPop","framed",(()=>this.delete()),this),this}detachVariable(){var e,t;null===(t=null===(e=this.currentVariable)||void 0===e?void 0:e.node)||void 0===t||t.unhookContext(this)}defineEditor(){var t;const l=this.currentVariable;if(l&&l.block instanceof C){let s,c;const r=e.find(l);if(r)r.sole?c=ie(r.collection.all,(e=>({value:e.id,label:e.labelWithoutMarkdown}))):s=ie(r.collection.all,(e=>({id:e.id,name:e.labelWithoutMarkdown})));else{const e=z(l.block,"calculator");if(e){const o=e[(null===(t=l.slot)||void 0===t?void 0:t.reference)||"*"]||e["*"];if(o&&o.scores){const e=le(o.scores,(e=>!(!y(e.reference)||!e.label)));!1===o.allowDefault?c=ie(e,(e=>({value:e.reference,label:e.label}))):s=ie(e,(e=>({id:e.reference,name:e.label})))}}}const u=y(this.value)&&oe(this.value)?this.value:void 0,d=H(this.setter,((e,t)=>l.slot instanceof a.String||l.slot instanceof a.Text||(l.slot instanceof a.Number||l.slot instanceof a.Numeric?e instanceof a.Number||e instanceof a.Numeric:l.slot instanceof a.Boolean?!t&&e instanceof a.Boolean:l.slot instanceof a.Date&&e instanceof a.Date)),u,!1,l.key),b=l.slot instanceof a.String||l.slot instanceof a.Text?[c?new L.Dropdown(c,u||this.querystring||!y(this.reference)?"":this.reference).on((e=>{e.isObservable&&(this.value=e.optionLabel(e.value)||"",this.reference=e.value||void 0)})).label(o("block:setter","Use fixed value")).disabled(0===c.length).autoFocus():new L.Text(s?"singleline":"multiline",u||this.querystring||!y(this.value)?"":this.value).on((e=>{var t;e.isObservable&&(this.value=e.value,this.reference=(null===(t=e.suggestion)||void 0===t?void 0:t.id)||void 0)})).label(o("block:setter","Use fixed text")).suggestions(s).action("@",T(this.setter,"validated")).autoFocus().escape(this.editor.close)]:l.slot instanceof a.Number||l.slot instanceof a.Numeric?[new L.Numeric(n(this.value)?this.value:0).label(o("block:setter","Use fixed number")).precision(l.slot instanceof a.Numeric&&l.slot.precision||0).digits(l.slot instanceof a.Numeric&&l.slot.digits||0).decimalSign(l.slot instanceof a.Numeric&&l.slot.decimal||"").thousands(!!(l.slot instanceof a.Numeric&&l.slot.separator),l.slot instanceof a.Numeric&&l.slot.separator||"").prefix(l.slot instanceof a.Numeric&&l.slot.prefix||"").prefixPlural(l.slot instanceof a.Numeric&&l.slot.prefixPlural||void 0).suffix(l.slot instanceof a.Numeric&&l.slot.suffix||"").suffixPlural(l.slot instanceof a.Numeric&&l.slot.suffixPlural||void 0).min(l.slot instanceof a.Numeric&&l.slot.minimum||void 0).max(l.slot instanceof a.Numeric&&l.slot.maximum||void 0).autoFocus().escape(this.editor.close).enter(this.editor.close).on((e=>{e.isObservable&&(this.value=e.value)}))]:l.slot instanceof a.Date?[new L.DateTime(n(this.value)?this.value:j.UTCToday).label(l.slot.supportsTime?o("block:setter","Use fixed date/time"):o("block:setter","Use fixed date")).features(1|(l.slot.supportsTime?8:32)).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).zone("UTC").width("full").required().on((e=>{e.isObservable&&(this.value=e.value)}))]:[],M=new L.Text("singleline",i(this.separator)&&"\n"!==this.separator&&"\n\n"!==this.separator&&", "!==this.separator?this.separator:"").sanitize(!1).placeholder(o("block:setter","Type separator here...")).visible(i(this.separator)&&"\n"!==this.separator&&"\n\n"!==this.separator&&", "!==this.separator).on((e=>{e.isObservable&&(this.separator=e.value)})),h=new L.Group([new L.Dropdown([{value:void 0,label:o("block:setter","Nothing")},{value:"\n",label:"↵ "+o("block:setter","New line (single enter)"),disabled:!!s},{value:"\n\n",label:"¶ "+o("block:setter","New paragraph (double enter)"),disabled:!!s},{value:", ",label:o("block:setter","Comma + space"),disabled:!!s},{value:!0,label:o("block:setter","Custom")}],"\n"===this.separator||"\n\n"===this.separator||", "===this.separator?this.separator:!!i(this.separator)||void 0).label(o("block:setter","Separate concatenated values with")).on((e=>{e.isObservable&&e.value?i(e.value)&&(this.separator=e.value):this.separator=void 0,M.visible(!0===e.value)})),M]).visible("concatenate"===this.mode),g=new L.Dropdown(d,u||"").label(o("block:setter","Use value of")).width("full").visible(!!u).disabled(0===d.length).on((e=>{e.isObservable&&(this.value=e.value||"",this.reference=void 0)})),m=new L.Text("singleline",this.querystring&&y(this.value)?this.value:"").on((e=>{e.isObservable&&(this.value=e.value,this.reference=void 0)})).label(o("block:setter","Query string parameter")).autoFocus().enter(this.editor.close).escape(this.editor.close),p=this.editor.form({controls:[new L.Notification(o("block:setter","This value will only be set when there is _no_ current value!"),"info").markdown()]}).visible(void 0===this.mode&&void 0!==this.value&&this.value!==(l.slot instanceof a.Boolean&&0));this.editor.form({title:o("block:setter","Value"),controls:[new L.Radiobutton([{label:"**"+o("block:setter","Do not change")+"**",value:void 0,markdown:!0,visible:this.setter.isAdvanced},...l.slot instanceof a.String||l.slot instanceof a.Text?[{label:o("block:setter",c?"Fixed value":"Fixed text"),value:"value",disabled:c&&0===c.length}]:l.slot instanceof a.Number||l.slot instanceof a.Numeric?[{label:o("block:setter","Fixed number"),value:"value"}]:l.slot instanceof a.Boolean?[{label:l.slot.labelForTrue||o("block:setter","Set to %1","**True**"),value:!0,markdown:!l.slot.labelForTrue},{label:l.slot.labelForFalse||o("block:setter","Set to %1","**False**"),value:!1,markdown:!l.slot.labelForFalse}]:l.slot instanceof a.Date?[{label:l.slot.supportsTime?o("block:setter","Current date/time"):o("block:setter","Current date"),value:"auto"},{label:l.slot.supportsTime?o("block:setter","Fixed date/time"):o("block:setter","Fixed date"),value:"value"}]:[],{label:o("block:setter","From other variable"),value:"variable",disabled:0===d.length},{label:o("block:setter","From query string"),value:"querystring"},...l.slot instanceof a.Number||l.slot instanceof a.Numeric?[{label:o("block:setter","Calculation"),value:"auto"}]:[],{label:o("block:setter","Clear"),value:"clear",visible:this.setter.isAdvanced}],this.querystring?"querystring":this.value===(l.slot instanceof a.Boolean&&0)?"clear":u?"variable":(l.slot instanceof a.Number||l.slot instanceof a.Numeric||l.slot instanceof a.Date)&&!0===this.value?"auto":!0===this.value||!1===this.value?this.value:de(this.value)?"value":void 0).on((e=>{1===b.length&&b[0].visible("value"===e.value),g.visible("variable"===e.value),m.visible("querystring"===e.value),v.visible((l.slot instanceof a.Number||l.slot instanceof a.Numeric)&&"auto"===e.value),N.visible(this.setter.isAdvanced&&void 0!==e.value&&"clear"!==e.value),h.visible(N.isObservable&&"concatenate"===this.mode),!1===e.value||!0===e.value||void 0===e.value?(this.value=e.value,this.reference=void 0):"auto"===e.value?(this.value=!0,this.reference=void 0):"clear"===e.value&&(this.value=l.slot instanceof a.Boolean&&0,this.reference=void 0),this.querystring="querystring"===e.value||void 0,this.setter.verifyPurpose()})),h,...b,g,m]});const v=this.editor.collection(Ge(this,void 0,o("block:setter","Calculator"))).visible((l.slot instanceof a.Number||l.slot instanceof a.Numeric)&&!0===this.value),N=this.editor.form({title:o("block:setter","Mode"),controls:[new L.Radiobutton([{label:"**"+o("block:setter","Overwrite")+"**",description:o("block:setter","Always overwrite the current value."),markdown:!0,value:"overwrite"},...!c&&(l.slot instanceof a.String||l.slot instanceof a.Text)?[{label:o("block:setter","Concatenate"),description:o("block:setter","Appends text to the current value."),value:"concatenate"}]:[],...l.slot instanceof a.Number||l.slot instanceof a.Numeric?[{label:o("block:setter","Add")+" **+**",description:o("block:setter","Add to the current value."),value:"+",markdown:!0},{label:o("block:setter","Subtract")+" **-**",description:o("block:setter","Subtract from the current value."),value:"-",markdown:!0},{label:o("block:setter","Multiply")+" **×**",description:o("block:setter","Multiply the current value with."),value:"*",markdown:!0},{label:o("block:setter","Divide")+" **÷**",description:o("block:setter","Divide the current value by."),value:"/",markdown:!0}]:[],...l.slot instanceof a.Boolean?[{label:"OR [?](https://en.wikipedia.org/wiki/OR_gate)",description:o("block:setter","Set value and/or current value is true."),markdown:!0,value:"OR"},{label:"NOR [?](https://en.wikipedia.org/wiki/NOR_gate)",description:o("block:setter","Set value and current value are both false."),markdown:!0,value:"NOR"},{label:"AND [?](https://en.wikipedia.org/wiki/AND_gate)",description:o("block:setter","Set value and current value are both true."),markdown:!0,value:"AND"},{label:"NAND [?](https://en.wikipedia.org/wiki/NAND_gate)",description:o("block:setter","Set value and current value are not both true."),markdown:!0,value:"NAND"},{label:"XOR [?](https://en.wikipedia.org/wiki/XOR_gate)",description:o("block:setter","Set value is not equal to the current value."),markdown:!0,value:"XOR"},{label:"XNOR [?](https://en.wikipedia.org/wiki/XNOR_gate)",description:o("block:setter","Set value is equal to the current value."),markdown:!0,value:"XNOR"}]:[],{label:o("block:setter","Prefill"),description:o("block:setter","Only set when there is no value yet."),value:void 0}],L.Radiobutton.bind(this,"mode",void 0)).on((e=>{p.visible(void 0===e.value&&void 0!==this.value&&this.value!==(l.slot instanceof a.Boolean&&0)),h.visible(e.isObservable&&"concatenate"===e.value),this.setter.verifyPurpose()}))]}).visible(this.setter.isAdvanced&&de(this.value)&&this.value!==(l.slot instanceof a.Boolean&&0)||!1);this.editor.form({title:o("block:setter","Locking"),controls:[new L.Radiobutton([{label:"**"+o("block:setter","Do not change")+"**",description:o("block:setter","Do not lock or unlock the variable."),markdown:!0,value:void 0},{label:o("block:setter","Lock"),description:o("block:setter","Prevent further changes to the variable. If the variable is a visible block, it will become readonly."),value:!0},{label:o("block:setter","Unlock"),description:o("block:setter","Remove a lock and allow changes to the variable again."),value:!1}],L.Radiobutton.bind(this,"lock",void 0)).on((()=>this.setter.verifyPurpose())),new L.Static(o("block:setter","When a variable is locked its value can only be changed using the **%1** block.",Hl.label)).markdown()]}).visible(this.setter.isAdvanced)}}}Wl([h,g("#name")],Fl.prototype,"operations",void 0),Wl([h],Fl.prototype,"variable",void 0),Wl([h,g("#name")],Fl.prototype,"value",void 0),Wl([h],Fl.prototype,"reference",void 0),Wl([h,g("#name")],Fl.prototype,"querystring",void 0),Wl([h,g("#name")],Fl.prototype,"lock",void 0),Wl([h,g("#name")],Fl.prototype,"mode",void 0),Wl([h,g("#name")],Fl.prototype,"separator",void 0),Wl([r],Fl.prototype,"icon",null),Wl([u],Fl.prototype,"name",null),Wl([d],Fl.prototype,"title",null),Wl([X],Fl.prototype,"overwriteLabel",null),Wl([b],Fl.prototype,"width",null),Wl([p],Fl.prototype,"attachVariable",null),Wl([v],Fl.prototype,"detachVariable",null),Wl([m],Fl.prototype,"defineEditor",null);let Hl=class extends C{constructor(){super(...arguments),this.values=e.of(Fl,this)}get isAdvanced(){return this.purpose?this.purpose.value||!1:$(this.advanced)?this.advanced:this.verifyPurpose()}get label(){return k("block:setter","%2 %1 value","%2 %1 values",this.values.count,this.isAdvanced?o("block:setter","Set"):o("block:setter","Prefill"))}generateName(){!1!==this.node.nameVisible&&(this.node.name=f.iterateToString(this.values.all," ",(e=>"@"+e.variable)))}verifyPurpose(){const e=!!G(this.values.all,(e=>{if($(e.lock)||y(e.mode)||void 0===e.value)return!0;const t=e.variable&&l(this,e.variable);return t&&e.value===(t.slot instanceof a.Boolean&&0)||!1}));return this.purpose&&this.purpose.buttonDisabled(!1)!==e&&this.purpose.buttonDisabled(!1,e),this.advanced=this.values.all.length>0||$(this.advanced)?e:void 0,e}defineEditor(){let e=this.isAdvanced;this.editor.form({title:o("block:setter","Explanation"),controls:[new L.Static(o("block:setter","With this block you can change, lock or unlock values of (block) variables.")).markdown()]}),this.purpose=new L.Radiobutton([{label:o("block:setter","Prefilling"),description:o("block:setter","Prefill blocks with initial values."),value:!1,disabled:e},{label:o("block:setter","Advanced"),description:o("block:setter","Use options like value locking, write modes and more."),value:!0}],e).on((()=>{var t;e!==(null===(t=this.purpose)||void 0===t?void 0:t.value)&&(e=!e,this.rerender(),i.refresh())})),this.editor.option({name:o("block:setter","Purpose"),form:{title:o("block:setter","Purpose"),controls:[this.purpose]},activated:!0,locked:!0});const i=this.editor.option({name:o("block:setter","Values"),collection:{collection:this.values,title:o("block:setter","Values"),icon:!0,allowAutoSorting:!1,allowCleanup:o("block:setter","Remove invalid variables"),placeholder:o("block:setter","Invalid variable"),allowVariables:!0,allowFormatting:!0,showAliases:!0,markdown:x.MarkdownFeatures.Formatting|x.MarkdownFeatures.InlineCode,indicator:e=>$(e.lock)&&(e.lock?o("block:setter","Lock"):o("block:setter","Unlock")).toUpperCase()||void 0,menu:()=>((e,o,i)=>{const l=[];let a;const n=e=>{if((null==e?void 0:e.id)!==a){const o=null==e?void 0:e.name;(l.length>0||o)&&l.push(new t.MenuSeparator),o&&l.push(new t.MenuLabel(o)),a=null==e?void 0:e.id}},s=e=>!(i||!G(o.all,(t=>t.variable===e)));return E(W(e,{pipes:"exclude"}),(e=>{if(e.slots){const i=[];E(e.slots,(e=>{"slot"===e.type&&e.id&&e.slot&&!e.slot.protected&&i.push(new t.MenuItemWithImage(Ql(e.slot),e.label,(()=>o.append().attachVariable(e.id)),s(e.id)))})),i.length>0&&(n(e.block.node.section),l.push(new t.MenuSubmenuWithImage(e.icon||e.block.type.icon,e.label,i)))}else e.id&&e.slot&&!e.slot.protected&&(n(e.block.node.section),l.push(new t.MenuItemWithImage(e.icon||e.block.type.icon,e.label,(()=>o.append().attachVariable(e.id)),s(e.id))))})),l})(this,this.values,e),onResize:()=>{0===this.values.count&&this.verifyPurpose(),this.generateName()},onReposition:()=>this.generateName(),emptyMessage:{message:"**"+o("block:setter","Here you can specify the values you want to set.")+"**\n\n"+o("block:setter","Click the + button to select a block or variable."),height:96}},activated:!0,locked:!0}).card;this.editor.option({name:o("block:setter","Description"),form:{title:o("block:setter","Description"),controls:[new L.Text("singleline",!this.node.nameVisible&&this.node.name||"").on((e=>{this.node.nameVisible=!e.isFeatureEnabled,this.node.nameVisible?this.generateName():this.node.name=e.value}))]},activated:!1===this.node.nameVisible}),this.editor.groups.options(),this.editor.visibility()}};function Bl(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Wl([h,g("#name")],Hl.prototype,"values",void 0),Wl([m],Hl.prototype,"defineEditor",null),Hl=Wl([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-setter",version:"3.0.3",kind:"headless",icon:Gl,get label(){return o("block:setter","Set value")}})],Hl);var ql="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIuNSAxN2EuNS41IDAgMCAxLS40ODEtLjYzN2wxLTMuNWEuNDk0LjQ5NCAwIDAgMSAuMTI3LS4yMTZsMTEtMTFhLjUuNSAwIDAgMSAuNzA3IDBsMi41IDIuNWEuNS41IDAgMCAxIDAgLjcwN2wtMTEgMTFhLjQ5NC40OTQgMCAwIDEtLjIxNi4xMjdsLTMuNSAxQS40OTguNDk4IDAgMCAxIDIuNSAxN3ptMS40NDUtMy43MzgtLjcxNyAyLjUxIDIuNTEtLjcxN0wxNi4yOTMgNC41IDE0LjUgMi43MDcgMy45NDUgMTMuMjYyek0xNy41IDE5aC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",$l="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MTIuMTIgMTAuMjY4IDkuNWwzLjA1Ny0yLjYyYS41LjUgMCAxIDAtLjY1MS0uNzU5TDkuNDk5IDguODQyIDYuMzI0IDYuMTIxYS41LjUgMCAwIDAtLjY1MS43NTlMOC43MyA5LjVsLTMuMDU3IDIuNjJhLjUuNSAwIDEgMCAuNjUxLjc2bDMuMTc1LTIuNzIxIDMuMTc1IDIuNzIxYS40OTcuNDk3IDAgMCAwIC43MDUtLjA1NS41LjUgMCAwIDAtLjA1NC0uNzA1eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=";let Jl=class extends F{constructor(){super(...arguments),this.isSigned=!0}get icon(){return this.isSigned?$l:Xl}get name(){return this.isSigned?o("block:signature","Signed"):o("block:signature","Not signed")}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}};Bl([h,g("#name")],Jl.prototype,"isSigned",void 0),Jl=Bl([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-signature",identifier:"@tripetto/block-signature",version:"1.0.6",icon:ql,get label(){return o("block:signature","Signed state")}})],Jl);let _l=class extends C{defineSlots(){this.signatureSlot=this.slots.static({type:a.String,reference:"signature",label:o("block:signature","Signature"),protected:!0,exchange:["required","alias"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.explanation(),this.editor.groups.settings(),this.editor.option({name:o("block:signature","Color"),form:{title:o("block:signature","Color"),controls:[new L.ColorPicker(L.ColorPicker.bind(this,"color",void 0,"darkblue")).supportAlpha(!1).placeholder(o("block:signature","Ink color")).swatches(!1,!0),new L.Static(o("block:signature","Here, you can specify the color of the signature ink when signing. The signature will always be saved using black ink in the dataset."))]},activated:i(this.color)}),this.editor.option({name:o("block:signature","Size"),form:{title:o("block:signature","Size"),controls:[new L.Radiobutton([{label:o("block:signature","Small"),value:"sm"},{label:o("block:signature","Medium"),value:"md"},{label:o("block:signature","Large"),value:"lg"}],L.Radiobutton.bind(this,"size",void 0,"md"))]},activated:i(this.size)}),this.editor.groups.options(),this.editor.required(this.signatureSlot),this.editor.visibility(),this.editor.alias(this.signatureSlot)}defineConditions(){E([{label:o("block:signature","Signed"),icon:$l,isSigned:!0},{label:o("block:signature","Not signed"),icon:Xl,isSigned:!1}],(e=>{this.conditions.template({condition:Jl,label:e.label,icon:e.icon,burst:!0,props:{slot:this.signatureSlot,isSigned:e.isSigned}})}))}};function Kl(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Bl([h("string","optional")],_l.prototype,"size",void 0),Bl([h("string","optional")],_l.prototype,"color",void 0),Bl([A],_l.prototype,"defineSlots",null),Bl([m],_l.prototype,"defineEditor",null),Bl([D],_l.prototype,"defineConditions",null),_l=Bl([N({type:"node",identifier:"@tripetto/block-signature",version:"1.0.6",icon:ql,get label(){return o("block:signature","Signature")}})],_l);let ea=class extends C{defineEditor(){this.editor.name(!1,!0,o("block:statement","Statement")),this.editor.description(),this.editor.option({name:o("block:statement","Image"),form:{title:o("block:statement","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:statement","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:statement","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:statement","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.explanation(),this.editor.groups.options(),this.editor.visibility()}};function ta(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Kl([h("string","optional")],ea.prototype,"imageURL",void 0),Kl([h("string","optional")],ea.prototype,"imageWidth",void 0),Kl([h("boolean","optional")],ea.prototype,"imageAboveText",void 0),Kl([m],ea.prototype,"defineEditor",null),ea=Kl([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-statement",version:"5.0.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTS41IDE5YS41LjUgMCAwIDEtLjI1Ny0uOTI5IDYuMjExIDYuMjExIDAgMCAwIDIuNjQxLTMuMTc5QzEuMDQ2IDEzLjQ4NSAwIDExLjUzOCAwIDkuNWMwLTEuMDI5LjI1OC0yLjAyNi43NjgtMi45NjQuNDg2LS44OTQgMS4xOC0xLjY5NSAyLjA2MS0yLjM4MUM0LjYxNiAyLjc2NSA2Ljk4NSAxLjk5OSA5LjUgMS45OTlzNC44ODQuNzY2IDYuNjcxIDIuMTU2Yy44ODEuNjg1IDEuNTc1IDEuNDg2IDIuMDYxIDIuMzgxLjUxLjkzNy43NjggMS45MzQuNzY4IDIuOTY0cy0uMjU4IDIuMDI2LS43NjggMi45NjRjLS40ODYuODk0LTEuMTggMS42OTUtMi4wNjEgMi4zODEtMS43ODcgMS4zOS00LjE1NiAyLjE1Ni02LjY3MSAyLjE1Ni0xLjAzMyAwLTIuMDQ3LS4xMjktMy4wMTYtLjM4NWEyMC43NCAyM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jbGFzcz0idHJpcGV0dG8tZmlsbCIvPjwvc3ZnPg==",alias:"statement",get label(){return o("block:statement","Statement")}})],ea);let oa=class extends C{defineEditor(){this.editor.form({title:o("block:stop","Explanation"),controls:[new L.Static(o("block:stop","Stops the form without completing it. This assures no data for the form will be submitted.")).markdown()]}),this.editor.name(!0,!0),this.editor.description(),this.editor.option({name:o("block:stop","Image"),form:{title:o("block:stop","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:stop","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:stop","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:stop","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.groups.options(),this.editor.visibility()}};function ia(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ta([h("string","optional")],oa.prototype,"imageURL",void 0),ta([h("boolean","optional")],oa.prototype,"imageAboveText",void 0),ta([h("string","optional")],oa.prototype,"imageWidth",void 0),ta([m],oa.prototype,"defineEditor",null),oa=ta([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-stop",version:"3.0.2",kind:"headless",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTIwIDVWMy41YS41LjUgMCAwIDAtLjUtLjVILjVhLjUuNSAwIDAgMC0uNS41djZhLjUuNSAwIDAgMCAuNS41SDJ2NmgtLjVhLjUuNSAwIDAgMCAwIDFoNGEuNS41IDAgMCAwIDAtMUg1di0zaDEwdjNoLS41YS41LjUgMCAwIDAgMCAxaDRhLjUuNSAwIDAgMCAwLTFIMTh2LTZoMS41YS41LjUgMCAwIDAgLjUtLjVWNXptLTEtLjIwN0wxNC43OTMgOWgtMy41ODZsNS01SDE5di43OTN6TTYuMjA3IDlsNS01aDMuNTg2bC01IDVINi4yMDd6bS01IDAgNS01aDMuNTg2bC01IDVIMS4yMDd6bTMuNTg2LTVMMSA3Ljc5M1Y0aDMuNzkzek0zIDE2di02aDF2Nkgzem0yLTR2LTJoMTB2Mkg1em0xMiA0aC0xdi02aDF2NnptLS43OTMtN0wxOSA2LjIwN1Y5aC0yLjc5M3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:stop","Force stop")}})],oa);let la=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="exact"}get block(){var e;return(null===(e=this.node)||void 0===e?void 0:e.block)instanceof ca&&this.node.block||void 0}get label(){return""}get name(){var e;if(this.slot instanceof a.Text){const t=e=>e&&("contains"===this.mode||"not-contains"===this.mode||"starts"===this.mode||"ends"===this.mode)&&`_${e}_`||e,i=(oe(this.match)?(null===(e=l(this,this.match))||void 0===e?void 0:e.label)&&`@${this.match}`:this.match&&t(S(this.match)))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return`@${this.slot.id} ${"not-exact"===this.mode?"≠":"="} ${i}`;case"contains":case"not-contains":case"starts":case"ends":return`@${this.slot.id} ${"not-contains"===this.mode?o("block:text","does not contain"):"starts"===this.mode?o("block:text","starts with"):"ends"===this.mode?o("block:text","ends with"):o("block:text","contains")} ${i}`;case"defined":return`@${this.slot.id} ${o("block:text","not empty")}`;case"undefined":return`@${this.slot.id} ${o("block:text","empty")}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){var e,t;this.editor.form({title:o("block:text","Compare mode"),controls:[new L.Radiobutton([{label:o("block:text","Text matches"),value:"exact"},{label:o("block:text","Text does not match"),value:"not-exact"},{label:o("block:text","Text contains"),value:"contains"},{label:o("block:text","Text does not contain"),value:"not-contains"},{label:o("block:text","Text starts with"),value:"starts"},{label:o("block:text","Text ends with"),value:"ends"},{label:o("block:text","Text is not empty"),value:"defined"},{label:o("block:text","Text is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","exact")).on((e=>{switch(s.visible("defined"!==e.value&&"undefined"!==e.value),e.value){case"exact":s.title=o("block:text","If text matches");break;case"not-exact":s.title=o("block:text","If text does not match");break;case"contains":s.title=o("block:text","If text contains");break;case"not-contains":s.title=o("block:text","If text does not contain");break;case"starts":s.title=o("block:text","If text starts with");break;case"ends":s.title=o("block:text","If text ends with")}a.isInteractable&&a.focus()}))]});const i=this.match&&oe(this.match)||!1,l=H(this,void 0,i?this.match:void 0,!1,null===(e=this.slot)||void 0===e?void 0:e.id),a=new L.Text("singleline",i?"":this.match).label(o("block:text","Use fixed text")).action("@",T(this,"exclude")).suggestions(null===(t=this.block)||void 0===t?void 0:t.suggestions.all).autoFocus().enter(this.editor.close).escape(this.editor.close).on((e=>{e.isFormVisible&&e.isVisible&&(this.match=e.value)})),n=new L.Dropdown(l,i?this.match:"").label(o("block:text","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this.match=e.value||void 0)})),s=this.editor.form({title:o("block:text","If text matches"),controls:[new L.Radiobutton([{label:o("block:text","Text"),value:"text"},{label:o("block:text","Value"),value:"variable",disabled:0===l.length}],i?"variable":"text").on((e=>{a.visible("text"===e.value),n.visible("variable"===e.value),a.isInteractable&&a.focus()})),a,n,new L.Checkbox(o("block:text","Ignore case"),L.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)}};ia([h,g("#name")],la.prototype,"mode",void 0),ia([h,g("#name")],la.prototype,"match",void 0),ia([h],la.prototype,"ignoreCase",void 0),ia([m],la.prototype,"defineEditor",null),la=ia([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"@tripetto/block-text",version:"6.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:text","Text match")}})],la);class aa extends e.Item{constructor(){super(...arguments),this.name=""}defineEditor(){this.editor.option({name:o("block:text","Suggestion"),form:{title:o("block:text","Suggestion"),controls:[new L.Text("singleline",L.Text.bind(this,"name","")).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0});const e=this.ref.slots.select("score","feature");this.editor.group(o("block:text","Options")),this.editor.option({name:o("block:text","Score"),form:{title:o("block:text","Score"),controls:[new L.Numeric(L.Numeric.bind(this,"score",void 0)).precision((null==e?void 0:e.precision)||0).digits((null==e?void 0:e.digits)||0).decimalSign((null==e?void 0:e.decimal)||"").thousands(!!(null==e?void 0:e.separator),(null==e?void 0:e.separator)||"").prefix((null==e?void 0:e.prefix)||"").prefixPlural((null==e?void 0:e.prefixPlural)||void 0).suffix((null==e?void 0:e.suffix)||"").suffixPlural((null==e?void 0:e.suffixPlural)||void 0)]},activated:!0,locked:!!e,disabled:!e})}}ia([h("string"),u],aa.prototype,"name",void 0),ia([h("number","optional"),J],aa.prototype,"score",void 0),ia([m],aa.prototype,"defineEditor",null);var na="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let sa=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:text","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:text","calculated")}`;case"undefined":return`@${e.id} ${o("block:text","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:text","Compare mode"),controls:[new L.Radiobutton([{label:o("block:text","Score is equal to"),value:"equal"},{label:o("block:text","Score is not equal to"),value:"not-equal"},{label:o("block:text","Score is lower than"),value:"below"},{label:o("block:text","Score is higher than"),value:"above"},{label:o("block:text","Score is between"),value:"between"},{label:o("block:text","Score is not between"),value:"not-between"},{label:o("block:text","Score is calculated"),value:"defined"},{label:o("block:text","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:text","If score equals");break;case"not-equal":t.title=o("block:text","If score not equals");break;case"below":t.title=o("block:text","If score is lower than");break;case"above":t.title=o("block:text","If score is higher than");break;case"between":t.title=o("block:text","If score is between");break;case"not-between":t.title=o("block:text","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:text","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:text","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:text","Number"),value:"number"},{label:o("block:text","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:text","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:text","And"),"between"===this.mode||"not-between"===this.mode)}};ia([h,g("#name")],sa.prototype,"mode",void 0),ia([h,g("#name")],sa.prototype,"value",void 0),ia([h,g("#name")],sa.prototype,"to",void 0),ia([m],sa.prototype,"defineEditor",null),sa=ia([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"@tripetto/block-text:score",version:"6.0.2",icon:na,get label(){return o("block:text","Verify score")}})],sa);let ca=class extends C{constructor(){super(...arguments),this.suggestions=e.of(aa,this)}get label(){return this.useSuggestions?k("block:text","Text (%1 suggestion)","Text (%1 suggestions)",this.suggestions.count):this.type.label}defineSlot(){this.textSlot=this.slots.static({type:a.Text,reference:"value",label:o("block:text","Text"),exchange:["required","alias","exportable","maxLength","transformation"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings();const e=new L.Numeric(L.Numeric.bind(this,"minLength",void 0)).min(1).max(this.textSlot.maxLength).visible(V(this.minLength)).indent(32).width(75).on((()=>{t.min(this.minLength||1)})),t=new L.Numeric(L.Numeric.bind(this.textSlot,"maxLength",void 0)).min(this.minLength||1).visible(V(this.textSlot.maxLength)).indent(32).width(75).on((()=>{e.max(this.textSlot.maxLength)}));this.editor.option({name:o("block:text","Limits"),form:{title:o("block:text","Limits"),controls:[new L.Checkbox(o("block:text","Minimum"),V(this.minLength)).on((t=>{e.visible(t.isChecked)})),e,new L.Checkbox(o("block:text","Maximum"),V(this.textSlot.maxLength)).on((e=>{t.visible(e.isChecked)})),t]},activated:V(this.textSlot.maxLength)||V(this.minLength)}),this.editor.option({name:o("block:text","Autocomplete"),form:{title:o("block:text","Autocomplete"),controls:[new L.Radiobutton([{label:o("block:text","Name"),value:"name",description:o("block:text","Person's full name.")},{label:o("block:text","Organization"),value:"organization",description:o("block:text","Company or organization name.")},{label:o("block:text","Job/organization title"),value:"organization-title",description:o("block:text","Job title, or the title a person has within an organization.")},{label:o("block:text","Street address"),value:"street-address",description:o("block:text","Location of the address within a city or town.")},{label:o("block:text","Postal code"),value:"postal-code",description:o("block:text","Postal code (in the United States, this is the ZIP code).")},{label:o("block:text","City (address level 2)"),value:"address-level2",description:o("block:text","City, town, village, or other locality in which the address is located.")},{label:o("block:text","Province or state (address level 1)"),value:"address-level1",description:o("block:text","Typically the province in which the address is located. In the United States, this would be the state. In Switzerland, the canton. In the United Kingdom, the post town.")},{label:o("block:text","Country"),value:"country-name",description:o("block:text","Name of the country.")},{label:o("block:text","Telephone number"),value:"tel",description:o("block:text","Full telephone number, including the country code.")},{label:o("block:text","Gender identity"),value:"sex",description:o("block:text","Gender identity as freeform text.")},{label:o("block:text","Username"),value:"username",description:o("block:text","Username or account name for the active domain.")}],L.Radiobutton.bind(this,"autoComplete",void 0)).label(o("block:text","Use the following autocomplete attribute for autocompletion:"))]},activated:i(this.autoComplete)});const l=this.editor.option({name:o("block:text","Suggestions"),collection:{collection:this.suggestions,title:o("block:text","Suggestions"),placeholder:o("block:text","Unnamed suggestion"),autoOpen:!0,editable:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showScores:!0,sorting:"manual",emptyMessage:o("block:text","Click the + button to add an suggestion...")},activated:!0===this.useSuggestions}).onToggle((()=>{this.useSuggestions=!!l.isActivated||void 0}));this.editor.transformations(this.textSlot),this.editor.groups.options(),this.editor.option({name:o("block:text","Prefill"),form:{title:o("block:text","Prefill"),controls:[new L.Text("singleline",L.Text.bind(this,"prefill",void 0)).label(o("block:text","Prefill with the following text:"))]},activated:i(this.prefill)}),this.editor.required(this.textSlot),this.editor.visibility(),this.editor.scores({target:this,collection:l,description:o("block:text","Generates a score based on the selected suggestion. Open the settings panel for each suggestion to set the score.")}),this.editor.alias(this.textSlot),this.editor.exportable(this.textSlot)}defineCondition(){E([{mode:"exact",label:o("block:text","Text matches")},{mode:"not-exact",label:o("block:text","Text does not match")},{mode:"contains",label:o("block:text","Text contains")},{mode:"not-contains",label:o("block:text","Text does not contain")},{mode:"starts",label:o("block:text","Text starts with")},{mode:"ends",label:o("block:text","Text ends with")},{mode:"defined",label:o("block:text","Text is not empty")},{mode:"undefined",label:o("block:text","Text is empty")}],(e=>{this.conditions.template({condition:la,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.textSlot,mode:e.mode}})}));const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,na,!1,!0);E([{mode:"equal",label:o("block:text","Score is equal to")},{mode:"not-equal",label:o("block:text","Score is not equal to")},{mode:"below",label:o("block:text","Score is lower than")},{mode:"above",label:o("block:text","Score is higher than")},{mode:"between",label:o("block:text","Score is between")},{mode:"not-between",label:o("block:text","Score is not between")},{mode:"defined",label:o("block:text","Score is calculated")},{mode:"undefined",label:o("block:text","Score is not calculated")}],(o=>{t.template({condition:sa,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};function ra(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ia([h],ca.prototype,"autoComplete",void 0),ia([h,g("#label")],ca.prototype,"useSuggestions",void 0),ia([h("items"),g("#label"),te("#slot","value",!1,"useSuggestions")],ca.prototype,"suggestions",void 0),ia([h("string","optional")],ca.prototype,"prefill",void 0),ia([h("number","optional")],ca.prototype,"minLength",void 0),ia([A],ca.prototype,"defineSlot",null),ia([m],ca.prototype,"defineEditor",null),ia([D],ca.prototype,"defineCondition",null),ca=ia([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-text",version:"6.0.2",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNTAwIDMzMDBoMjAwVjIzMDBINTAwdi0yMDBoNjAwdjIwMEg5MDB2MTAwMGgyMDB2MjAwSDUwMHYtMjAwem01MjAwLTE2MDB2MjIwMEgxMDBWMTcwMGg1NjAwem0tMjAwIDIwMEgzMDB2MTgwMGg1MjAwVjE5MDB6Ii8+PC9zdmc+",get label(){return o("block:text","Text (single line)")}})],ca);let ua=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="exact"}get label(){return""}get name(){var e;if(this.slot instanceof a.Text){const t=e=>e&&("contains"===this.mode||"not-contains"===this.mode||"starts"===this.mode||"ends"===this.mode)&&`_${e}_`||e,i=(oe(this.match)?(null===(e=l(this,this.match))||void 0===e?void 0:e.label)&&`@${this.match}`:this.match&&t(S(f.replace(this.match,"\n","↵"))))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return`@${this.slot.id} ${"not-exact"===this.mode?"≠":"="} ${i}`;case"contains":case"not-contains":case"starts":case"ends":return`@${this.slot.id} ${"not-contains"===this.mode?o("block:textarea","does not contain"):"starts"===this.mode?o("block:textarea","starts with"):"ends"===this.mode?o("block:textarea","ends with"):o("block:textarea","contains")} ${i}`;case"defined":return`@${this.slot.id} ${o("block:textarea","not empty")}`;case"undefined":return`@${this.slot.id} ${o("block:textarea","empty")}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){var e;this.editor.form({title:o("block:textarea","Compare mode"),controls:[new L.Radiobutton([{label:o("block:textarea","Text matches"),value:"exact"},{label:o("block:textarea","Text does not match"),value:"not-exact"},{label:o("block:textarea","Text contains"),value:"contains"},{label:o("block:textarea","Text does not contain"),value:"not-contains"},{label:o("block:textarea","Text starts with"),value:"starts"},{label:o("block:textarea","Text ends with"),value:"ends"},{label:o("block:textarea","Text is not empty"),value:"defined"},{label:o("block:textarea","Text is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","exact")).on((e=>{switch(n.visible("defined"!==e.value&&"undefined"!==e.value),e.value){case"exact":n.title=o("block:textarea","If text matches");break;case"not-exact":n.title=o("block:textarea","If text does not match");break;case"contains":n.title=o("block:textarea","If text contains");break;case"not-contains":n.title=o("block:textarea","If text does not contain");break;case"starts":n.title=o("block:textarea","If text starts with");break;case"ends":n.title=o("block:textarea","If text ends with")}l.isInteractable&&l.focus()}))]});const t=this.match&&oe(this.match)||!1,i=H(this,void 0,t?this.match:void 0,!1,null===(e=this.slot)||void 0===e?void 0:e.id),l=new L.Text("multiline",t?"":this.match).label(o("block:textarea","Use fixed text")).action("@",T(this,"exclude")).autoFocus().enter(this.editor.close).escape(this.editor.close).on((e=>{e.isFormVisible&&e.isObservable&&(this.match=e.value)})),a=new L.Dropdown(i,t?this.match:"").label(o("block:textarea","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this.match=e.value||void 0)})),n=this.editor.form({title:o("block:textarea","If text matches"),controls:[new L.Radiobutton([{label:o("block:textarea","Text"),value:"text"},{label:o("block:textarea","Value"),value:"variable",disabled:0===i.length}],t?"variable":"text").on((e=>{l.visible("text"===e.value),a.visible("variable"===e.value),l.isInteractable&&l.focus()})),l,a,new L.Checkbox(o("block:textarea","Ignore case"),L.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)}};ra([h,g("#name")],ua.prototype,"mode",void 0),ra([h,g("#name")],ua.prototype,"match",void 0),ra([h],ua.prototype,"ignoreCase",void 0),ra([m],ua.prototype,"defineEditor",null),ua=ra([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-textarea",identifier:"@tripetto/block-textarea",version:"6.0.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+",get label(){return o("block:textarea","Text contains")}})],ua);let da=class extends C{defineSlot(){this.textareaSlot=this.slots.static({type:a.Text,reference:"value",label:o("block:textarea","Multi-line text"),exchange:["required","alias","exportable","maxLength","transformation"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings();const e=new L.Numeric(L.Numeric.bind(this,"minLength",void 0)).min(1).max(this.textareaSlot.maxLength).visible(V(this.minLength)).indent(32).width(75).on((()=>{t.min(this.minLength||1)})),t=new L.Numeric(L.Numeric.bind(this.textareaSlot,"maxLength",void 0)).min(this.minLength||1).visible(V(this.textareaSlot.maxLength)).indent(32).width(75).on((()=>{e.max(this.textareaSlot.maxLength)}));this.editor.option({name:o("block:textarea","Limits"),form:{title:o("block:textarea","Limits"),controls:[new L.Checkbox(o("block:textarea","Minimum"),V(this.minLength)).on((t=>{e.visible(t.isChecked)})),e,new L.Checkbox(o("block:textarea","Maximum"),V(this.textareaSlot.maxLength)).on((e=>{t.visible(e.isChecked)})),t]},activated:V(this.textareaSlot.maxLength)||V(this.minLength)}),this.editor.transformations(this.textareaSlot),this.editor.groups.options(),this.editor.option({name:o("block:textarea","Prefill"),form:{title:o("block:textarea","Prefill"),controls:[new L.Text("multiline",L.Text.bind(this,"prefill",void 0)).label(o("block:textarea","Prefill with the following text:"))]},activated:i(this.prefill)}),this.editor.required(this.textareaSlot),this.editor.visibility(),this.editor.alias(this.textareaSlot),this.editor.exportable(this.textareaSlot)}defineCondition(){E([{mode:"exact",label:o("block:textarea","Text matches")},{mode:"not-exact",label:o("block:textarea","Text does not match")},{mode:"contains",label:o("block:textarea","Text contains")},{mode:"not-contains",label:o("block:textarea","Text does not contain")},{mode:"starts",label:o("block:textarea","Text starts with")},{mode:"ends",label:o("block:textarea","Text ends with")},{mode:"defined",label:o("block:textarea","Text is not empty")},{mode:"undefined",label:o("block:textarea","Text is empty")}],(e=>{this.conditions.template({condition:ua,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.textareaSlot,mode:e.mode}})}))}};function ba(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ra([h("string","optional")],da.prototype,"prefill",void 0),ra([h("number","optional")],da.prototype,"minLength",void 0),ra([A],da.prototype,"defineSlot",null),ra([m],da.prototype,"defineEditor",null),ra([D],da.prototype,"defineCondition",null),da=ra([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-textarea",version:"6.0.3",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bTAgMTJoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tMi05aC0xM2EuNS41IDAgMCAwIDAgMWgxM2MuODI3IDAgMS41LjY3MyAxLjUgMS41cy0uNjczIDEuNS0xLjUgMS41aC01LjI5M2wxLjE0Ni0xLjE0NmEuNS41IDAgMCAwLS43MDctLjcwN2wtMiAyYS41LjUgMCAwIDAgMCAuNzA3bDIgMmEuNDk4LjQ5OCAwIDAgMCAuNzA4IDAgLjUuNSAwIDAgMCAwLS43MDdsLTEuMTQ2LTEuMTQ2aDUuMjkzYzEuMzc4IDAgMi41LTEuMTIyIDIuNS0yLjVzLTEuMTIyLTIuNS0yLjUtMi41eiIgY2xhc3M9InRyaXBldHRvLWZpbGwi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zLjA2OCAzLjA2OGEyLjY4NSAyLjY4NSAwIDAgMCAxLjg5NiA0LjU3OWMuNzE2IDAgMS4zOS0uMjc5IDEuODk2LS43ODZsMy4wNjgtMy4wNjhhLjUuNSAwIDAgMSAuNzA3LjcwN2wtMy4wNjggMy4wNjhBMy42NTkgMy42NTkgMCAwIDEgNC42OCAxOXpNNS41IDdhLjUwMi41MDIgMCAwIDEtLjM1NC0uMTQ2bC0yLTJhLjUuNSAwIDAgMSAuNzA3LS43MDdsMiAyQS41LjUgMCAwIDEgNS40OTkgN3ptMi0xYS41LjUgMCAwIDEtLjUtLjV2LTNhLjUuNSAwIDAgMSAxIDB2M2EuNS41IDAgMCAxLS41LjV6bS0zIDNoLTNhLjUuNSAwIDAgMSAwLTFoM2EuNS41IDAgMCAxIDAgMXptMTEgOGEuNTAyLjUwMiAwIDAgMS0uMzU0LS4xNDZsLTItMmEuNS41IDAgMCAxIC43MDctLjcwN2wyIDJhLjUuNSAwIDAgMS0uMzU0Ljg1M3ptMi00aC0zYS41LjUgMCAwIDEgMC0xaDNhLjUuNSAwIDAgMSAwIDF6bS02IDZhLjUuNSAwIDAgMS0uNS0uNXYtM2EuNS41IDAgMCAxIDEgMHYzYS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let ma=class extends F{constructor(){super(...arguments),this.mode="defined"}get icon(){return"defined"===this.mode?ha:ga}get label(){return""}get name(){if(this.slot)switch(this.mode){case"defined":return`@${this.slot.id} ${o("block:url","not empty")}`;case"undefined":return`@${this.slot.id} ${o("block:url","empty")}`}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){this.editor.form({title:o("block:url","When URL:"),controls:[new L.Radiobutton([{label:o("block:url","Is not empty"),value:"defined"},{label:o("block:url","Is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","defined"))]})}};var pa;ba([h,g("#name")],ma.prototype,"mode",void 0),ba([m],ma.prototype,"defineEditor",null),ma=ba([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-url",identifier:"@tripetto/block-url",version:"6.0.2",icon:Ma,get label(){return o("block:url","Verify URL")}})],ma);let va=pa=class extends C{defineSlot(){this.urlSlot=this.slots.static({type:a.String,reference:"url",label:pa.label,exchange:["required","alias","exportable"]})}defineEditor(){this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.options(),this.editor.required(this.urlSlot),this.editor.visibility(),this.editor.alias(this.urlSlot),this.editor.exportable(this.urlSlot)}defineCondition(){E([{mode:"defined",label:o("block:url","URL is not empty"),icon:ha},{mode:"undefined",label:o("block:url","URL is empty"),icon:ga}],(e=>{this.conditions.template({condition:ma,label:e.label,icon:e.icon,burst:!0,props:{slot:this.urlSlot,mode:e.mode}})}))}};function Na(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}ba([A],va.prototype,"defineSlot",null),ba([m],va.prototype,"defineEditor",null),ba([D],va.prototype,"defineCondition",null),va=pa=ba([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-url",version:"6.0.2",icon:Ma,get label(){return o("block:url","URL")}})],va);var wa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Aa=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="exact"}get label(){return""}get name(){var e;const t=this.slot;if(t instanceof a.Text){const i=e=>e&&("contains"===this.mode||"not-contains"===this.mode||"starts"===this.mode||"ends"===this.mode)&&`_${e}_`||e,a=(oe(this.match)?(null===(e=l(this,this.match))||void 0===e?void 0:e.label)&&`@${this.match}`:this.match&&i(S(f.replace(this.match,"\n","↵"))))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return`@${t.id} ${"not-exact"===this.mode?"≠":"="} ${a}`;case"contains":case"not-contains":case"starts":case"ends":return`@${t.id} ${"not-contains"===this.mode?o("block:variable","does not contain"):"starts"===this.mode?o("block:variable","starts with"):"ends"===this.mode?o("block:variable","ends with"):o("block:variable","contains")} ${a}`;case"defined":return`@${t.id} ${o("block:variable","not empty")}`;case"undefined":return`@${t.id} ${o("block:variable","empty")}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){var e;this.editor.form({title:o("block:variable","Compare mode"),controls:[new L.Radiobutton([{label:o("block:variable","Text matches"),value:"exact"},{label:o("block:variable","Text does not match"),value:"not-exact"},{label:o("block:variable","Text contains"),value:"contains"},{label:o("block:variable","Text does not contain"),value:"not-contains"},{label:o("block:variable","Text starts with"),value:"starts"},{label:o("block:variable","Text ends with"),value:"ends"},{label:o("block:variable","Text is not empty"),value:"defined"},{label:o("block:variable","Text is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","exact")).on((e=>{switch(s.visible("defined"!==e.value&&"undefined"!==e.value),e.value){case"exact":s.title=o("block:variable","If text matches");break;case"not-exact":s.title=o("block:variable","If text does not match");break;case"contains":s.title=o("block:variable","If text contains");break;case"not-contains":s.title=o("block:variable","If text does not contain");break;case"starts":s.title=o("block:variable","If text starts with");break;case"ends":s.title=o("block:variable","If text ends with")}l.isInteractable&&l.focus()}))]});const t=this.match&&oe(this.match)||!1,i=H(this,void 0,t?this.match:void 0,!1,null===(e=this.slot)||void 0===e?void 0:e.id),l=new L.Text("multiline",t?"":this.match).label(o("block:variable","Use fixed text")).action("@",T(this,"exclude")).transformation(this.slot instanceof a.Text&&this.slot.transformation||"none").autoFocus().enter(this.editor.close).escape(this.editor.close).on((e=>{e.isFormVisible&&e.isVisible&&(this.match=e.value)})),n=new L.Dropdown(i,t?this.match:"").label(o("block:variable","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this.match=e.value||void 0)})),s=this.editor.form({title:o("block:variable","If text matches"),controls:[new L.Radiobutton([{label:o("block:variable","Text"),value:"text"},{label:o("block:variable","Value"),value:"variable",disabled:0===i.length}],t?"variable":"text").on((e=>{l.visible("text"===e.value),n.visible("variable"===e.value),l.isInteractable&&l.focus()})),l,n,new L.Checkbox(o("block:variable","Ignore case"),L.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)}};Na([h,g("#name")],Aa.prototype,"mode",void 0),Na([h,g("#name")],Aa.prototype,"match",void 0),Na([h],Aa.prototype,"ignoreCase",void 0),Na([m],Aa.prototype,"defineEditor",null),Aa=Na([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-variable",identifier:"@tripetto/block-variable:text",version:"3.0.3",icon:wa,get label(){return o("block:variable","Text match")}})],Aa);var Ia="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvb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oMjAwYzIzMSAwIDQwMCAxNjkgNDAwIDQwMHptLTE2MDAgMGMwLTEyMS03OS0yMDAtMjAwLTIwMGgtMjAwYy0xMjEgMC0yMDAgNzktMjAwIDIwMHY0MDBjMCAxMjEgNzkgMjAwIDIwMCAyMDBoMjAwYzEyMSAwIDIwMC03OSAyMDAtMjAwdi00MDB6bTIwMCAwdjQwMGMwIDIzMS0xNjkgNDAwLTQwMCA0MDBoLTIwMGMtMjMxIDAtNDAwLTE2OS00MDAtNDAwdi00MDBjMC0yMzEgMTY5LTQwMCA0MDAtNDAwaDIwMGMyMzEgMCA0MDAgMTY5IDQwMCA0MDB6Ii8+PC9zdmc+";let Da=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:variable","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:variable","not empty")}`;case"undefined":return`@${e.id} ${o("block:variable","empty")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?"@"+t:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:variable","Compare mode"),controls:[new L.Radiobutton([{label:o("block:variable","Number is equal to"),value:"equal"},{label:o("block:variable","Number is not equal to"),value:"not-equal"},{label:o("block:variable","Number is lower than"),value:"below"},{label:o("block:variable","Number is higher than"),value:"above"},{label:o("block:variable","Number is between"),value:"between"},{label:o("block:variable","Number is not between"),value:"not-between"},{label:o("block:variable","Number is not empty"),value:"defined"},{label:o("block:variable","Number is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:variable","If number equals");break;case"not-equal":t.title=o("block:variable","If number not equals");break;case"below":t.title=o("block:variable","If number is lower than");break;case"above":t.title=o("block:variable","If number is higher than");break;case"between":t.title=o("block:variable","If number is between");break;case"not-between":t.title=o("block:variable","If number is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:variable","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).min(null==r?void 0:r.minimum).max(null==r?void 0:r.maximum).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!1,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:variable","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:variable","Number"),value:"number"},{label:o("block:variable","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:variable","If number equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:variable","And"),"between"===this.mode||"not-between"===this.mode)}};Na([h,g("#name")],Da.prototype,"mode",void 0),Na([h,g("#name")],Da.prototype,"value",void 0),Na([h,g("#name")],Da.prototype,"to",void 0),Na([m],Da.prototype,"defineEditor",null),Da=Na([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-variable",identifier:"@tripetto/block-variable:numeric",version:"3.0.3",icon:Ia,get label(){return o("block:variable","Verify number")}})],Da);var La="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgMkgxNnYtLjVhLjUuNSAwIDAgMC0xIDBWMkg1di0uNWEuNS41IDAgMCAwLTEgMFYySDEuNUMuNjczIDIgMCAyLjY3MyAwIDMuNXYxNGMwIC44MjcuNjczIDEuNSAxLjUgMS41aDE3Yy44MjcgMCAxLjUtLjY3MyAxLjUtMS41di0xNGMwLS44MjctLjY3My0xLjUtMS41LTEuNXptLTE3IDFINHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gxMHYxLjVhLjUuNSAwIDAgMCAxIDBWM2gyLjVhLjUuNSAwIDAgMSAuNS41VjZIMVYzLjVhLjUuNSAwIDAgMSAuNS0uNXptMTcgMTVoLTE3YS41LjUgMCAwIDEtLjUtLjVWN2gxOHYxMC41YS41LjUgMCAwIDEtLjUuNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTguNSAxNS41YS41MDIuNTAyIDAgMCAxLS4zNTQtLjE0NmwtMi0yYS41LjUgMCAwIDEgLjcwNy0uNzA3bDEuNjQ2IDEuNjQ2IDQuNjQ2LTQuNjQ2YS41LjUgMCAwIDEgLjcwNy43MDdsLTUgNWEuNDk4LjQ5OCAwIDAgMS0uMzU0LjE0NnoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let ja=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Date){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:variable","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:variable","not empty")}`;case"undefined":return`@${e.id} ${o("block:variable","empty")}`;case"before":case"after":case"equal":case"not-equal":return`@${e.id} ${"after"===this.mode?">":"before"===this.mode?"<":"not-equal"===this.mode?"≠":"="} ${t}`}}return this.type.label}parse(e,t){var a;return n(t)?e.supportsTime?s.locale.dateTimeShort(e.toValue(t),!0):s.locale.dateShort(e.toValue(t),!0):i(t)?t&&(null===(a=l(this,t))||void 0===a?void 0:a.label)?`@${t}`:"\\_\\_":"`"+o("block:variable","Now").toUpperCase()+"`"}defineEditor(){const e=this.slot instanceof a.Date&&this.slot.supportsTime;this.editor.form({title:o("block:variable","Compare mode"),controls:[new L.Radiobutton([{label:o("block:variable","Date is equal to"),value:"equal"},{label:o("block:variable","Date is not equal to"),value:"not-equal"},{label:o("block:variable","Date is before"),value:"before"},{label:o("block:variable","Date is after"),value:"after"},{label:o("block:variable","Date is between"),value:"between"},{label:o("block:variable","Date is not between"),value:"not-between"},{label:o("block:variable","Date is not empty"),value:"defined"},{label:o("block:variable","Date is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(l.visible("defined"!==e.value&&"undefined"!==e.value),s.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":l.title=o("block:variable","If date equals");break;case"not-equal":l.title=o("block:variable","If date not equals");break;case"before":l.title=o("block:variable","If date is before");break;case"after":l.title=o("block:variable","If date is after");break;case"between":l.title=o("block:variable","If date is between");break;case"not-between":l.title=o("block:variable","If date is not between")}}))]});const t=(t,l,s)=>{var c;const r=this[t],u=H(this,(e=>e instanceof a.Date),i(r)?r:void 0,!0,null===(c=this.slot)||void 0===c?void 0:c.id),d=new L.DateTime(n(r)?r:j.UTCToday+("to"===t?86399999:0)).label(o("block:variable",e?"Use fixed date/time":"Use fixed date")).features(1|(e?8:32)).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).zone("UTC").width("full").required().on((e=>{e.isFormVisible&&e.isObservable&&(this[t]=e.value)})),b=new L.Dropdown(u,i(r)?r:"").label(o("block:variable","Use value of")).width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this[t]=e.value||"")}));return this.editor.form({title:l,controls:[new L.Radiobutton([{label:o("block:variable",e?"Current date/time":"Current date"),value:"current"},{label:o("block:variable",e?"Fixed date/time":"Fixed date"),value:"date"},{label:o("block:variable","Value"),value:"variable",disabled:0===u.length}],i(r)?"variable":n(r)?"date":"current").on((e=>{d.visible("date"===e.value),b.visible("variable"===e.value),"current"===e.value&&(this[t]=void 0)})),d,b]}).visible(s)},l=t("value",o("block:variable","If date equals"),"defined"!==this.mode&&"undefined"!==this.mode),s=t("to",o("block:variable","And"),"between"===this.mode||"not-between"===this.mode)}};Na([h,g("#name")],ja.prototype,"mode",void 0),Na([h,g("#name")],ja.prototype,"value",void 0),Na([h,g("#name")],ja.prototype,"to",void 0),Na([m],ja.prototype,"defineEditor",null),ja=Na([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-variable",identifier:"@tripetto/block-variable:date",version:"3.0.3",icon:La,get label(){return o("block:variable","Verify date")}})],ja);var Sa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNMTkwMCAyOTAwVjEwMDBjMC0xNjUgMTM1LTMwMCAzMDAtMzAwaDE0MDBjMTY1IDAgMzAwIDEzNSAzMDAgMzAwdjE5MDBIMTkwMHptMTEwMC0xODAwaC0yMDB2MTQwMGgyMDBWMTEwMHpNMjIwMCAxMDBoMTQwMGM0OTUgMCA5MDAgNDA1IDkwMCA5MDB2MzgwMGMwIDQ5NS00MDUgOTAwLTkwMCA5MDBIMjIwMGMtNDk1IDAtOTAwLTQwNS05MDAtOTAwVjEwMDBjMC00OTUgNDA1LTkwMCA5MDAtOTAwem0xNDAwIDIwMEgyMjAwYy0zODUgMC03MDAgMzE1LTcwMCA3MDB2MzgwMGMwIDM4NSAzMTUgNzAwIDcwMCA3MDBoMTQwMGMzODUgMCA3MDAtMzE1IDcwMC03MDBWMTAwMGMwLTM4NS0zMTUtNzAwLTcwMC03MDB6bS04MTMgMzAwMGgyMDBjMjc2IDAgNTAwIDIyNSA1MDAgNTAwdjQwNWMwIDI3NS0yMjQgNTAwLTUwMCA1MDBoLTIwMGMtMjc1IDAtNTAwLTIyNS01MDAtNTAwdi00MDVjMC0yNzUgMjI1LTUwMCA1MDAtNTAwem0yMDAgMjAwaC0yMDBjLTE2NSAwLTMwMCAxMzUtMzAwIDMwMHY0MDVjMCAxNjUgMTM1IDMwMCAzMDAgMzAwaDIwMGMxNjUgMCAzMDAtMTM1IDMwMC0zMDB2LTQwNWMwLTE2NS0xMzUtMzAwLTMwMC0zMDB6Ii8+PC9zdmc+";let xa=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="true"}get label(){return""}get name(){var e;const t=this.slot;if(t instanceof a.Boolean)switch(this.mode){case"true":return`@${t.id} = ${S(t.labelForTrue||"")||o("block:variable","True")}`;case"false":return`@${t.id} = ${S(t.labelForFalse||"")||o("block:variable","False")}`;case"equal":case"not-equal":return`@${t.id} ${"not-equal"===this.mode?"≠":"="} ${oe(this.value)&&(null===(e=l(this,this.value))||void 0===e?void 0:e.label)?`@${this.value}`:"\\_\\_"}`;case"defined":return`@${t.id} ${o("block:variable","not empty")}`;case"undefined":return`@${t.id} ${o("block:variable","empty")}`}return this.type.label}get title(){var e;return null===(e=this.node)||void 0===e?void 0:e.label}defineEditor(){var e;this.editor.form({title:o("block:variable","Compare mode"),controls:[new L.Radiobutton([{label:this.slot instanceof a.Boolean&&this.slot.labelForTrue||o("block:variable","Is true"),value:"true"},{label:this.slot instanceof a.Boolean&&this.slot.labelForFalse||o("block:variable","Is false"),value:"false"},{label:o("block:variable","Equals another variable"),value:"equal"},{label:o("block:variable","Not equals another variable"),value:"not-equal"},{label:o("block:variable","Is not empty"),value:"defined"},{label:o("block:variable","Is empty"),value:"undefined"}],L.Radiobutton.bind(this,"mode","true")).on((e=>{switch("equal"!==e.value&&"not-equal"!==e.value&&(this.value=void 0),n.visible("equal"===e.value||"not-equal"===e.value),e.value){case"equal":n.title=o("block:variable","If value matches");break;case"not-equal":n.title=o("block:variable","If value does not match")}}))]});const t=this.value&&oe(this.value)||!1,i=H(this,((e,t)=>!t&&e instanceof a.Boolean),t?this.value:void 0,!1,null===(e=this.slot)||void 0===e?void 0:e.id),l=new L.Dropdown(i,t?this.value:"").width("full").on((e=>{e.isFormVisible&&e.isObservable&&(this.value=e.value||void 0)})),n=this.editor.form({title:o("block:variable","If value matches"),controls:[l]}).visible("equal"===this.mode||"not-equal"===this.mode)}};Na([h,g("#name")],xa.prototype,"mode",void 0),Na([h,g("#name")],xa.prototype,"value",void 0),Na([m],xa.prototype,"defineEditor",null),xa=Na([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-variable",identifier:"@tripetto/block-variable:boolean",version:"3.0.3",icon:Sa,get label(){return o("block:variable","Verify value")}})],xa),ce("@tripetto/block-variable"),re();var ka="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTEyLjUgMTdoLTExQy42NzMgMTcgMCAxNi4zMjcgMCAxNS41di0xMEMwIDQuNjczLjY3MyA0IDEuNSA0aDExYy43MDQgMCAxLjU3NC40MDggMi4wMjQuOTQ4bDMuNzIgNC40NjRjLjUwOS42MS41MDkgMS41NjYgMCAyLjE3N2wtMy43MiA0LjQ2NGMtLjQ1LjU0MS0xLjMyMS45NDgtMi4wMjQuOTQ4ek0xLjUgNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDExYy40MDEgMCAuOTk5LS4yOCAxLjI1Ni0uNTg4bDMuNzItNC40NjRjLjE5OS0uMjM5LjE5OS0uNjU4IDAtLjg5NmwtMy43Mi00LjQ2NEMxMy40OTkgNS4yOCAxMi45MDEgNSAxMi41IDVoLTExeiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=";let ya=class extends C{constructor(){super(...arguments),this.allowMarkdown=!1,this.startBlank=!1,this.operations=e.of(Yt,this)}get block(){return this}get firstANS(){return"@"+this.slot.id}get variableType(){return this.currentType||"text"}set variableType(e){this.currentType=e}get icon(){switch(this.currentType){case"numeric":return Ia;case"boolean":return Sa;case"date":return La;case"text":return wa;default:return ka}}get label(){switch(this.currentType){case"numeric":return o("block:variable","%1 (number)",this.type.label);case"boolean":return o("block:variable","%1 (boolean)",this.type.label);case"date":return this.slot instanceof a.Date&&this.slot.supportsTime?o("block:variable","%1 (date/time)",this.type.label):o("block:variable","%1 (date)",this.type.label);default:return o("block:variable","%1 (text)",this.type.label)}}createProxy(e){const t=this;return{get maxLength(){return t.slot instanceof a.Text?t.slot.maxLength:void 0},set maxLength(o){var i;t.slot instanceof a.Text&&(t.slot.maxLength=o),null===(i=e().textValue)||void 0===i||i.maxLength(o||0)},get transformation(){return t.slot instanceof a.Text?t.slot.transformation:void 0},set transformation(o){var i;t.slot instanceof a.Text&&(t.slot.transformation=o),null===(i=e().textValue)||void 0===i||i.transformation(o||"none")},get numericPrecision(){return t.slot instanceof a.Numeric?t.slot.precision:void 0},set numericPrecision(o){var i;t.slot instanceof a.Numeric&&(t.slot.precision=o),null===(i=e().numericValue)||void 0===i||i.precision(o||0)},get digits(){return t.slot instanceof a.Numeric?t.slot.digits:void 0},set digits(o){var i;t.slot instanceof a.Numeric&&(t.slot.digits=o),null===(i=e().numericValue)||void 0===i||i.digits(o||0)},get decimal(){return t.slot instanceof a.Numeric?t.slot.decimal:void 0},set decimal(o){var i;t.slot instanceof a.Numeric&&(t.slot.decimal=o),null===(i=e().numericValue)||void 0===i||i.decimalSign(o||"")},get separator(){return t.slot instanceof a.Numeric?t.slot.separator:void 0},set separator(o){var i;t.slot instanceof a.Numeric&&(t.slot.separator=o),null===(i=e().numericValue)||void 0===i||i.thousands(!!o,o||"")},get numericMinimum(){return t.slot instanceof a.Numeric?t.slot.minimum:void 0},set numericMinimum(o){var i;t.slot instanceof a.Numeric&&(t.slot.minimum=o),null===(i=e().numericValue)||void 0===i||i.min(o)},get numericMaximum(){return t.slot instanceof a.Numeric?t.slot.maximum:void 0},set numericMaximum(o){var i;t.slot instanceof a.Numeric&&(t.slot.maximum=o),null===(i=e().numericValue)||void 0===i||i.max(o)},get prefix(){return t.slot instanceof a.Numeric?t.slot.prefix:void 0},set prefix(o){var i;t.slot instanceof a.Numeric&&(t.slot.prefix=o),null===(i=e().numericValue)||void 0===i||i.prefix(o||"")},get prefixPlural(){return t.slot instanceof a.Numeric?t.slot.prefixPlural:void 0},set prefixPlural(o){var i;t.slot instanceof a.Numeric&&(t.slot.prefixPlural=o),null===(i=e().numericValue)||void 0===i||i.prefixPlural(o||void 0)},get suffix(){return t.slot instanceof a.Numeric?t.slot.suffix:void 0},set suffix(o){var i;t.slot instanceof a.Numeric&&(t.slot.suffix=o),null===(i=e().numericValue)||void 0===i||i.suffix(o||"")},get suffixPlural(){return t.slot instanceof a.Numeric?t.slot.suffixPlural:void 0},set suffixPlural(o){var i;t.slot instanceof a.Numeric&&(t.slot.suffixPlural=o),null===(i=e().numericValue)||void 0===i||i.suffixPlural(o||void 0)},get time(){return t.slot instanceof a.Date&&t.slot.supportsTime||void 0},set time(o){var i;t.slot instanceof a.Date&&(t.slot.precision=!0===o?"seconds":"days",t.rerender(!0)),null===(i=e().dateValue)||void 0===i||i.features(1|(!0===o?8:32))},get dateMinimum(){return t.slot instanceof a.Date?t.slot.minimum:void 0},set dateMinimum(e){t.slot instanceof a.Date&&(t.slot.minimum=e)},get dateMaximum(){return t.slot instanceof a.Date?t.slot.maximum:void 0},set dateMaximum(e){t.slot instanceof a.Date&&(t.slot.maximum=e)},get labelForFalse(){return t.slot instanceof a.Boolean?t.slot.labelForFalse:void 0},set labelForFalse(i){var l;t.slot instanceof a.Boolean&&(t.slot.labelForFalse=i),null===(l=e().booleanValue)||void 0===l||l.buttonLabel(!1,i||o("block:variable","False"))},get labelForTrue(){return t.slot instanceof a.Boolean?t.slot.labelForTrue:void 0},set labelForTrue(i){var l;t.slot instanceof a.Boolean&&(t.slot.labelForTrue=i),null===(l=e().booleanValue)||void 0===l||l.buttonLabel(!0,i||o("block:variable","True"))}}}defineSlot(){const e=this.slots.select("variable","static");switch(this.currentType||(e instanceof a.Numeric?this.currentType="numeric":e instanceof a.Boolean?this.currentType="boolean":e instanceof a.Date?this.currentType="date":this.currentType="text"),this.variableType){case"text":this.slot=this.slots.static({type:a.Text,reference:"variable",label:this.node.name||o("block:variable","Variable"),exchange:["alias","exportable","transformation","maxLength"],alias:null==e?void 0:e.alias,exportable:null==e?void 0:e.exportable});break;case"numeric":this.slot=this.slots.static({type:a.Numeric,reference:"variable",label:this.node.name||o("block:variable","Variable"),exchange:["alias","exportable","precision","digits","decimal","separator","minimum","maximum","prefix","prefixPlural","suffix","suffixPlural"],alias:null==e?void 0:e.alias,exportable:null==e?void 0:e.exportable});break;case"boolean":this.slot=this.slots.static({type:a.Boolean,reference:"variable",label:this.node.name||o("block:variable","Variable"),exchange:["alias","exportable","labelForTrue","labelForFalse"],alias:null==e?void 0:e.alias,exportable:null==e?void 0:e.exportable});break;case"date":this.slot=this.slots.static({type:a.Date,reference:"variable",label:this.node.name||o("block:variable","Variable"),exchange:["alias","exportable","precision","minimum","maximum"],alias:null==e?void 0:e.alias,exportable:null==e?void 0:e.exportable}),this.slot.precision||(this.slot.precision="days")}}defineEditor(){const e=this.createProxy((()=>({textValue:w,numericValue:A,dateValue:I,booleanValue:D})));this.editor.form({title:o("block:variable","Explanation"),controls:[new L.Static(o("block:variable","Creates a custom variable you can use to store a value in.")).markdown()]}),this.editor.name(!1,!1,o("block:variable","Name"),!1),this.editor.option({name:o("block:variable","Type"),locked:!0,form:{title:o("block:variable","Type"),controls:[new L.Radiobutton([{label:o("block:variable","Text"),description:o("block:variable","Store a text value."),value:"text"},{label:o("block:variable","Number"),description:o("block:variable","Store a numeric value."),value:"numeric"},{label:o("block:variable","Date"),description:o("block:variable","Store a date value with an optional time."),value:"date"},{label:o("block:variable","Boolean"),description:o("block:variable","Store true or false."),value:"boolean"}],L.Radiobutton.bind(this,"variableType","text")).on((e=>{E(t,(t=>{t.disabled("text"!==e.value),t.visible("text"===e.value)})),E(M,(t=>{t.disabled("numeric"!==e.value),t.visible("numeric"===e.value)})),E(v,(t=>{t.disabled("date"!==e.value),t.visible("date"===e.value)})),E(N,(t=>{t.disabled("boolean"!==e.value),t.visible("boolean"===e.value)})),w.visible("text"===e.value),A.visible("numeric"===e.value),I.visible("date"===e.value),D.visible("boolean"===e.value),S.disabled("numeric"!==e.value),S.visible("numeric"===e.value)}))]}}),this.editor.groups.settings();const t=[this.editor.option({name:o("block:variable","Limits"),form:{title:o("block:variable","Maximum number of characters"),controls:[new L.Numeric(L.Numeric.bind(e,"maxLength",void 0)).min(0)]},activated:V(e.maxLength),visible:"text"===this.variableType,disabled:"text"!==this.variableType}),this.editor.transformations(e).visible("text"===this.variableType).disabled("text"!==this.variableType)],l=new L.Numeric(L.Numeric.bind(e,"numericMinimum",void 0)).precision(e.numericPrecision||0).digits(e.digits||0).decimalSign(e.decimal||"").thousands(!!e.separator,e.separator||"").prefix(e.prefix||"").prefixPlural(e.prefixPlural||void 0).suffix(e.suffix||"").suffixPlural(e.suffixPlural||void 0).label(o("block:variable","Minimum")),s=new L.Numeric(L.Numeric.bind(e,"numericMaximum",void 0)).precision(e.numericPrecision||0).digits(e.digits||0).decimalSign(e.decimal||"").thousands(!!e.separator,e.separator||"").prefix(e.prefix||"").prefixPlural(e.prefixPlural||void 0).suffix(e.suffix||"").suffixPlural(e.suffixPlural||void 0).label(o("block:variable","Maximum")),c=new L.Text("singleline",L.Text.bind(e,"prefix",void 0)).sanitize(!1).on((e=>{l.prefix(e.isFeatureEnabled&&e.value||""),s.prefix(e.isFeatureEnabled&&e.value||"")})),r=new L.Text("singleline",L.Text.bind(e,"prefixPlural",void 0)).indent(32).sanitize(!1).on((e=>{l.prefixPlural(e.isFeatureEnabled&&e.isObservable&&e.value||void 0),s.prefixPlural(e.isFeatureEnabled&&e.isObservable&&e.value||void 0)})).placeholder(o("block:variable","Prefix when value is plural")).visible(i(e.prefixPlural)),u=new L.Text("singleline",L.Text.bind(e,"suffix",void 0)).sanitize(!1).on((e=>{l.suffix(e.isFeatureEnabled&&e.value||""),s.suffix(e.isFeatureEnabled&&e.value||"")})),d=new L.Text("singleline",L.Text.bind(e,"suffixPlural",void 0)).indent(32).sanitize(!1).on((e=>{l.suffixPlural(e.isFeatureEnabled&&e.isObservable&&e.value||void 0),s.suffixPlural(e.isFeatureEnabled&&e.isObservable&&e.value||void 0)})).placeholder(o("block:variable","Suffix when value is plural")).visible(i(e.suffixPlural)),b=new L.Dropdown([{label:"#.#",value:"."},{label:"#,#",value:","}],L.Dropdown.bind(e,"decimal",void 0)).label(o("block:variable","Decimal sign")).disabled(!e.numericPrecision).on((e=>{l.decimalSign(e.isFeatureEnabled&&e.value||""),s.decimalSign(e.isFeatureEnabled&&e.value||"")})),M=[this.editor.option({name:o("block:variable","Format"),form:{title:o("block:variable","Format"),controls:[new L.Dropdown([{optGroup:o("block:variable","Decimals")},{label:"#",value:0},{label:"#.#",value:1},{label:"#.##",value:2},{label:"#.###",value:3},{label:"#.####",value:4},{label:"#.#####",value:5},{label:"#.######",value:6},{label:"#.#######",value:7},{label:"#.########",value:8},{optGroup:o("block:variable","Digits")},{label:"##",value:-2},{label:"###",value:-3},{label:"####",value:-4},{label:"#####",value:-5},{label:"######",value:-6},{label:"#######",value:-7},{label:"########",value:-8},{label:"#########",value:-9},{label:"##########",value:-10},{label:"###########",value:-11},{label:"############",value:-12},{label:"#############",value:-13},{label:"##############",value:-14},{label:"###############",value:-15},{label:"################",value:-16}],(e.digits?-e.digits:e.numericPrecision)||0).on((t=>{e.numericPrecision=t.isFeatureEnabled&&V(t.value)&&t.value>=0?t.value:void 0,e.digits=t.isFeatureEnabled&&V(t.value)&&t.value<0?-t.value:void 0,l.precision(e.numericPrecision||0),s.precision(e.numericPrecision||0),l.digits(e.digits||0),s.digits(e.digits||0),b.disabled(!e.numericPrecision),h.disabled((e.digits||0)>0)}))]},activated:V(e.numericPrecision)||V(e.digits),visible:"numeric"===this.variableType,disabled:"numeric"!==this.variableType}),this.editor.option({name:o("block:variable","Limits"),form:{title:o("block:variable","Limits"),controls:[l,s]},activated:V(e.numericMinimum)||V(e.numericMaximum),visible:"numeric"===this.variableType,disabled:"numeric"!==this.variableType}),this.editor.option({name:o("block:variable","Prefix"),form:{title:o("block:variable","Prefix"),controls:[c,new L.Checkbox(o("block:variable","Specify different prefix for plural values"),i(e.prefixPlural)).on((e=>{c.placeholder(e.isChecked&&o("block:variable","Prefix when value is singular")||""),r.visible(e.isChecked)})),r]},activated:i(e.prefix),visible:"numeric"===this.variableType,disabled:"numeric"!==this.variableType}),this.editor.option({name:o("block:variable","Suffix"),form:{title:o("block:variable","Suffix"),controls:[u,new L.Checkbox(o("block:variable","Specify different suffix for plural values"),i(e.suffixPlural)).on((e=>{u.placeholder(e.isChecked&&o("block:variable","Suffix when value is singular")||""),d.visible(e.isChecked)})),d]},activated:i(e.suffix),visible:"numeric"===this.variableType,disabled:"numeric"!==this.variableType})],h=this.editor.option({name:o("block:variable","Signs"),form:{title:o("block:variable","Signs"),controls:[b,new L.Dropdown([{label:o("block:variable","None"),value:void 0},{label:"#,###",value:","},{label:"#.###",value:"."}],L.Dropdown.bind(e,"separator",void 0)).label(o("block:variable","Thousands separator")).on((e=>{l.thousands(!(!e.isFeatureEnabled||!e.value),e.isFeatureEnabled&&e.value||""),s.thousands(!(!e.isFeatureEnabled||!e.value),e.isFeatureEnabled&&e.value||"")})),new L.Static(o("block:variable","**Note:** These signs are used to format the number in de dataset. When the number is displayed in a runner, the appropriate user locale might be applied making it seem like changing these settings has no effect.")).markdown()]},activated:i(e.separator)||i(e.decimal),visible:"numeric"===this.variableType,disabled:"numeric"!==this.variableType||(e.digits||0)>0});M.push(h);const g=e=>1|(e?8:32),m=new L.DateTime(V(e.dateMinimum)?e.dateMinimum:void 0).zone("UTC").features(g(e.time)).disabled(!0===e.dateMinimum).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).width("full").label(o("block:variable","Minimum")).placeholder(o("block:variable","Not set")).on((()=>{m.isFeatureEnabled?!0!==e.dateMinimum&&(e.dateMinimum=m.value):e.dateMinimum=void 0})),p=new L.DateTime(V(e.dateMaximum)?e.dateMaximum:void 0).zone("UTC").features(g(e.time)).disabled(!0===e.dateMaximum).years((new Date).getFullYear()-150,(new Date).getFullYear()+50).width("full").label(o("block:variable","Maximum")).placeholder(o("block:variable","Not set")).on((()=>{p.isFeatureEnabled?!0!==e.dateMaximum&&(e.dateMaximum=p.value):e.dateMaximum=void 0})),v=[this.editor.option({name:o("block:variable","Time"),form:{title:o("block:variable","Time"),controls:[new L.Checkbox(o("block:variable","Allow a time to be set"),L.Checkbox.bind(e,"time",void 0,!0)).on((e=>{m.features(g(e.isFeatureEnabled&&e.isChecked)),p.features(g(e.isFeatureEnabled&&e.isChecked))})),new L.Static(o("block:variable","When enabled this will allow to set a specific time along with the date."))]},activated:$(e.time),visible:"date"===this.variableType,disabled:"date"!==this.variableType}),this.editor.option({name:o("block:variable","Limits"),form:{title:o("block:variable","Limits"),controls:[m,p,new L.Static(o("block:variable","Options")),new L.Checkbox(o("block:variable","Date must be in the future"),!0===e.dateMinimum).on((t=>{t.isFeatureEnabled&&t.isChecked?e.dateMinimum=!0:!0===e.dateMinimum&&(e.dateMinimum=void 0,m.refresh()),m.disabled(!0===e.dateMinimum)})),new L.Checkbox(o("block:variable","Date must be in the past"),!0===e.dateMaximum).on((t=>{t.isFeatureEnabled&&t.isChecked?e.dateMaximum=!0:!0===e.dateMaximum&&(e.dateMaximum=void 0,p.refresh()),p.disabled(!0===e.dateMaximum)}))]},activated:V(e.dateMinimum)||!0===e.dateMinimum||V(e.dateMaximum)||!0===e.dateMaximum,visible:"date"===this.variableType,disabled:"date"!==this.variableType})],N=[this.editor.option({name:o("block:variable","Labels"),form:{title:o("block:variable","Labels"),controls:[new L.Text("singleline",L.Text.bind(e,"labelForTrue",void 0)).placeholder("True"),new L.Text("singleline",L.Text.bind(e,"labelForFalse",void 0)).placeholder("False"),new L.Static(o("block:variable","These labels will be used in the dataset and override the default values %1 and %2.","**True**","**False**")).markdown()]},activated:i(e.labelForFalse)||i(e.labelForTrue),visible:"boolean"===this.variableType,disabled:"boolean"!==this.variableType})];this.editor.groups.options();const w=new L.Text("multiline","text"===this.variableType&&i(this.prefill)?this.prefill:void 0).maxLength(e.maxLength||0).transformation(e.transformation||"none").visible("text"===this.variableType).action("@",T(this,"validated")).on((e=>{e.isObservable&&(this.prefill=e.isFeatureEnabled?e.value:void 0)})),A=new L.Numeric("numeric"===this.variableType&&n(this.prefill)?this.prefill:void 0).precision(e.numericPrecision||0).digits(e.digits||0).decimalSign(e.decimal||"").thousands(!!e.separator,e.separator||"").prefix(e.prefix||"").prefixPlural(e.prefixPlural||void 0).suffix(e.suffix||"").suffixPlural(e.suffixPlural||void 0).min(e.numericMinimum).max(e.numericMaximum).visible("numeric"===this.variableType).on((e=>{e.isObservable&&(this.prefill=e.isFeatureEnabled?e.value:void 0)})),I=new L.DateTime("date"===this.variableType&&n(this.prefill)?this.prefill:j.UTCToday).features(g(this.slot instanceof a.Date&&this.slot.supportsTime)).zone("UTC").width("full").required().visible("date"===this.variableType).on((e=>{e.isObservable&&(this.prefill=e.isFeatureEnabled?e.value:void 0)})),D=new L.Radiobutton([{label:this.slot instanceof a.Boolean&&this.slot.labelForTrue||o("block:variable","True"),value:!0},{label:this.slot instanceof a.Boolean&&this.slot.labelForFalse||o("block:variable","False"),value:!1}],!1!==this.prefill).visible("boolean"===this.variableType).on((e=>{e.isObservable&&(this.prefill=e.isFeatureEnabled?e.value:void 0)}));this.editor.option({name:o("block:variable","Prefill"),form:{title:o("block:variable","Prefill"),controls:[w,A,I,D,new L.Static(o("block:variable","This value will be used as initial (prefilled) value for the variable. It is only set once upon creation of the variable."))]},activated:de(this.prefill)});const S=this.editor.option({name:o("block:variable","Calculator"),collection:Ge(this,o("block:variable","Perform calculation on variable value."),o("block:variable","Calculator")),activated:!0===this.calculator,visible:"numeric"===this.variableType}).onToggle((()=>{this.calculator=!!S.isActivated||void 0}));this.editor.alias((()=>this.slot)),this.editor.exportable((()=>this.slot))}defineCondition(){switch(this.variableType){case"text":E([{mode:"exact",label:o("block:variable","Text matches")},{mode:"not-exact",label:o("block:variable","Text does not match")},{mode:"contains",label:o("block:variable","Text contains")},{mode:"not-contains",label:o("block:variable","Text does not contain")},{mode:"starts",label:o("block:variable","Text starts with")},{mode:"ends",label:o("block:variable","Text ends with")},{mode:"defined",label:o("block:variable","Text is not empty")},{mode:"undefined",label:o("block:variable","Text is empty")}],(e=>{this.conditions.template({condition:Aa,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.slot,mode:e.mode}})}));break;case"numeric":E([{mode:"equal",label:o("block:variable","Number is equal to")},{mode:"not-equal",label:o("block:variable","Number is not equal to")},{mode:"below",label:o("block:variable","Number is lower than")},{mode:"above",label:o("block:variable","Number is higher than")},{mode:"between",label:o("block:variable","Number is between")},{mode:"not-between",label:o("block:variable","Number is not between")},{mode:"defined",label:o("block:variable","Number is not empty")},{mode:"undefined",label:o("block:variable","Number is empty")}],(e=>{this.conditions.template({condition:Da,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.slot,mode:e.mode}})}));break;case"date":E([{mode:"equal",label:o("block:variable","Is equal to")},{mode:"not-equal",label:o("block:variable","Is not equal to")},{mode:"before",label:o("block:variable","Is before")},{mode:"after",label:o("block:variable","Is after")},{mode:"between",label:o("block:variable","Is between")},{mode:"not-between",label:o("block:variable","Is not between")},{mode:"defined",label:o("block:variable","Is not empty")},{mode:"undefined",label:o("block:variable","Is empty")}],(e=>{this.conditions.template({condition:ja,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:this.slot,mode:e.mode,value:this.slot instanceof a.Date&&this.slot.supportsTime?j.UTC:j.UTCToday,to:"between"===e.mode||"not-between"===e.mode?this.slot instanceof a.Date&&this.slot.supportsTime?j.UTC:j.UTCToday:void 0}})}));break;case"boolean":E([{mode:"true",label:this.slot instanceof a.Boolean&&this.slot.labelForTrue||o("block:variable","Value is true")},{mode:"false",label:this.slot instanceof a.Boolean&&this.slot.labelForFalse||o("block:variable","Value is false")},{mode:"equal",label:o("block:variable","Value is equal to")},{mode:"not-equal",label:o("block:variable","Value is not equal to")},{mode:"defined",label:o("block:variable","Value is not empty")},{mode:"undefined",label:o("block:variable","Value is empty")}],(e=>{this.conditions.template({condition:xa,label:e.label,autoOpen:"equal"===e.mode||"not-equal"===e.mode,props:{slot:this.slot,mode:e.mode}})}))}}};function fa(e,t,o,i){var l,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(n=(a<3?l(n):a>3?l(t,o,n):l(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}Na([h],ya.prototype,"prefill",void 0),Na([h],ya.prototype,"calculator",void 0),Na([h],ya.prototype,"operations",void 0),Na([g("#slots"),g("#label")],ya.prototype,"variableType",null),Na([A,I],ya.prototype,"defineSlot",null),Na([m],ya.prototype,"defineEditor",null),Na([D],ya.prototype,"defineCondition",null),ya=Na([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-variable",version:"3.0.3",kind:"headless",icon:ka,get label(){return o("block:variable","Custom variable")}})],ya);let Ta=class extends F{get name(){var e;return((null===(e=this.node)||void 0===e?void 0:e.block)instanceof Ua?this.node.block.altYes:"")||this.type.label}get title(){return q(this.name,x.MarkdownFeatures.None)}};Ta=fa([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-yes-no",identifier:"@tripetto/block-yes-no:yes",version:"6.0.0",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE5LjQzNiA5LjI1NWMtLjQ4Ny0uODY4LTEuMTQ1LTEuMDY5LTEuODM0LTEuMjEzLS4zODEtLjA4LTEuMDA2LS4wNjQtMS42NjgtLjA0Ny0uNDI0LjAxMS0xLjA2MS4wMjctMS4yMzMtLjAxNmEuNzA1LjcwNSAwIDAgMS0uMzM5LS40MzFjLS4wOTQtLjMxOS0uMDczLS45MTcuNTY0LTEuOTU5LjIxMi0uMzQ3LjM0LS45NDIuMzQyLTEuNTg5LjAwMi0uNzIzLS4xNTQtMS40MDEtLjQzOC0xLjkwNy0uNDAxLS43MTUtMS4wMzQtMS4wOTItMS44MzEtMS4wOTJhLjUuNSAwIDAgMC0uNDQ5LjI4Yy0uMzg2Ljc4OS0xLjE4NCAyLjUxOC0xLjk1NiA0LjE5MWEyMDcuNDU0IDIwNy40NTQgMCAwIDEtMS41NDIgMy4zMDZjLS4wNDYuMDkxLS4wODYuMTc2LS4xMjUuMjU4LS4xOTMuNDA0LS4yODguN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MTI4LjY5NC4xMzEgMS42NzYuMTA2LjUyMi0uMDEzIDEuMTctLjAzIDEuNDM4LjAyNi42NDYuMTM1LjkwNS4yNTkgMS4xNjYuNzI0LjQzNi43NzcuNDM2IDEuOTYyLjQzNiAzLjc1NSAwIDIuMTQ3LS42ODEgMy44Ny0uOTE2IDQuMjIzeiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=",alias:"yes-no:yes",get label(){return o("block:yes-no","Yes")}})],Ta);let Ca=class extends F{get name(){var e;return((null===(e=this.node)||void 0===e?void 0:e.block)instanceof Ua?this.node.block.altNo:"")||this.type.label}get title(){return q(this.name,x.MarkdownFeatures.None)}};Ca=fa([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-yes-no",identifier:"@tripetto/block-yes-no:no",version:"6.0.0",alias:"yes-no:no",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE5LjQzNiAxMS43NDVjLS40ODcuODY4LTEuMTQ1IDEuMDY5LTEuODM0IDEuMjEzLS4zODEuMDgtMS4wMDYuMDY0LTEuNjY4LjA0Ny0uNDI0LS4wMTEtMS4wNjEtLjAyNy0xLjIzMy4wMTZhLjcwNS43MDUgMCAwIDAtLjMzOS40MzFjLS4wOTQuMzE5LS4wNzMuOTE3LjU2NCAxLjk1OS4yMTIuMzQ3LjM0Ljk0Mi4zNDIgMS41ODkuMDAyLjcyMy0uMTU0IDEuNDAxLS40MzggMS45MDctLjQwMS43MTUtMS4wMzQgMS4wOTItMS44MzEgMS4wOTJhLjUuNSAwIDAgMS0uNDQ5LS4yOCAyODguODQ0IDI4OC44NDQgMCAwIDEtMS45NTYtNC4xOTEgMjA3LjQ1NCAyMDcuNDU0IDAgMCAwLTEuNTQyLTMuMzA2Yy0uMDQ2LS4wOTEtLjA4Ni0uMTc2LS4xMjUtLjI1OC0uMT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C0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+";let Ea=class extends F{constructor(){super(...arguments),this.allowMarkdown=!0,this.mode="equal"}get label(){return""}get name(){const e=this.slot;if(e instanceof a.Numeric){const t=this.parse(e,this.value);switch(this.mode){case"between":return`${t} ≤ @${e.id} ≤ ${this.parse(e,this.to)}`;case"not-between":return`@${e.id} < ${t} ${o("block:yes-no","or")} @${e.id} > ${this.parse(e,this.to)}`;case"defined":return`@${e.id} ${o("block:yes-no","calculated")}`;case"undefined":return`@${e.id} ${o("block:yes-no","not calculated")}`;case"not-equal":return`@${e.id} ≠ ${t}`;case"above":case"below":case"equal":return`@${e.id} ${"above"===this.mode?">":"below"===this.mode?"<":"="} ${t}`}}return this.type.label}get title(){var e,t;return(null===(e=this.slot)||void 0===e?void 0:e.label)||(null===(t=this.node)||void 0===t?void 0:t.label)}parse(e,t){var o;return n(t)?e.toString(t,((e,t)=>s.locale.number(e,t,!1))):i(t)&&t&&(null===(o=l(this,t))||void 0===o?void 0:o.label)?`@${t}`:"\\_\\_"}defineEditor(){this.editor.form({title:o("block:yes-no","Compare mode"),controls:[new L.Radiobutton([{label:o("block:yes-no","Score is equal to"),value:"equal"},{label:o("block:yes-no","Score is not equal to"),value:"not-equal"},{label:o("block:yes-no","Score is lower than"),value:"below"},{label:o("block:yes-no","Score is higher than"),value:"above"},{label:o("block:yes-no","Score is between"),value:"between"},{label:o("block:yes-no","Score is not between"),value:"not-between"},{label:o("block:yes-no","Score is calculated"),value:"defined"},{label:o("block:yes-no","Score is not calculated"),value:"undefined"}],L.Radiobutton.bind(this,"mode","equal")).on((e=>{switch(t.visible("defined"!==e.value&&"undefined"!==e.value),l.visible("between"===e.value||"not-between"===e.value),e.value){case"equal":t.title=o("block:yes-no","If score equals");break;case"not-equal":t.title=o("block:yes-no","If score not equals");break;case"below":t.title=o("block:yes-no","If score is lower than");break;case"above":t.title=o("block:yes-no","If score is higher than");break;case"between":t.title=o("block:yes-no","If score is between");break;case"not-between":t.title=o("block:yes-no","If score is not between")}}))]});const e=(e,t,l)=>{var s;const c=this[e],r=this.slot,u=new L.Numeric(n(c)?c:0).label(o("block:yes-no","Use fixed number")).precision((null==r?void 0:r.precision)||0).digits((null==r?void 0:r.digits)||0).decimalSign((null==r?void 0:r.decimal)||"").thousands(!!(null==r?void 0:r.separator),(null==r?void 0:r.separator)||"").prefix((null==r?void 0:r.prefix)||"").prefixPlural((null==r?void 0:r.prefixPlural)||void 0).suffix((null==r?void 0:r.suffix)||"").suffixPlural((null==r?void 0:r.suffixPlural)||void 0).autoFocus("value"===e).escape(this.editor.close).enter((()=>("between"!==this.mode&&"not-between"!==this.mode||"to"===e)&&this.editor.close())).on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value)})),d=H(this,(e=>e instanceof a.Number||e instanceof a.Numeric),i(c)?c:void 0,!0,null===(s=this.slot)||void 0===s?void 0:s.id),b=new L.Dropdown(d,i(c)?c:"").label(o("block:yes-no","Use value of")).width("full").on((t=>{t.isFormVisible&&t.isObservable&&(this[e]=t.value||"")}));return this.editor.form({title:t,controls:[new L.Radiobutton([{label:o("block:yes-no","Number"),value:"number"},{label:o("block:yes-no","Value"),value:"variable",disabled:0===d.length}],i(c)?"variable":"number").on((e=>{u.visible("number"===e.value),b.visible("variable"===e.value),u.isObservable&&u.focus()})),u,b]}).visible(l)},t=e("value",o("block:yes-no","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),l=e("to",o("block:yes-no","And"),"between"===this.mode||"not-between"===this.mode)}};fa([h,g("#name")],Ea.prototype,"mode",void 0),fa([h,g("#name")],Ea.prototype,"value",void 0),fa([h,g("#name")],Ea.prototype,"to",void 0),fa([m],Ea.prototype,"defineEditor",null),Ea=fa([N({type:"condition",legacyBlock:!0,context:"@tripetto/block-yes-no",identifier:"@tripetto/block-yes-no:score",version:"6.0.0",icon:za,get label(){return o("block:yes-no","Verify score")}})],Ea);let Ua=class extends C{get calculator(){return{answer:{allowDefault:!1,allowCastToNumber:!1,scores:[{reference:"yes",label:q(this.altYes||"",x.MarkdownFeatures.None)||o("block:yes-no","Yes"),score:this.scoreForTrue},{reference:"no",label:q(this.altNo||"",x.MarkdownFeatures.None)||o("block:yes-no","No"),score:this.scoreForFalse}]}}}defineSlot(){this.answerSlot=this.slots.static({type:a.String,reference:"answer",label:o("block:yes-no","Answer"),exchange:["required","alias","exportable"]})}defineEditor(){this.editor.name(!0,!0),this.editor.description(),this.editor.option({name:o("block:yes-no","Image"),form:{title:o("block:yes-no","Image"),controls:[new L.Text("singleline",L.Text.bind(this,"imageURL",void 0)).label(o("block:yes-no","Image source URL")).inputMode("url").placeholder("https://").action("@",T(this)).autoValidate((e=>""===e.value?"unknown":ae.test(e.value)||e.value.length>23&&0===e.value.indexOf("data:image/jpeg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/png;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/svg;base64,")||e.value.length>22&&0===e.value.indexOf("data:image/gif;base64,")||e.value.length>1&&"/"===e.value.charAt(0)?"pass":"fail")),new L.Text("singleline",L.Checkbox.bind(this,"imageWidth",void 0)).label(o("block:yes-no","Image width (optional)")).width(100).align("center"),new L.Checkbox(o("block:yes-no","Display image on top of the paragraph"),L.Checkbox.bind(this,"imageAboveText",void 0))]},activated:i(this.imageURL)}),this.editor.explanation();const e=o("block:yes-no","Yes"),t=o("block:yes-no","No"),l=q(this.altYes||"",x.MarkdownFeatures.None)||e,a=q(this.altNo||"",x.MarkdownFeatures.None)||t,n=new L.Numeric(L.Numeric.bind(this,"scoreForTrue",void 0)).label(l),s=new L.Numeric(L.Numeric.bind(this,"scoreForFalse",void 0)).label(a),c=new L.Text("singleline",L.Text.bind(this,"aliasYes",void 0,"")).placeholder(l).visible(i(this.aliasYes)).indent(32),r=new L.Text("singleline",L.Text.bind(this,"aliasNo",void 0,"")).placeholder(a).visible(i(this.aliasNo)).indent(32),u=new L.Checkbox(l,i(this.aliasYes)).on((e=>{c.visible(e.isChecked)})),d=new L.Checkbox(a,i(this.aliasNo)).on((e=>{r.visible(e.isChecked)})),b=new L.ColorPicker(L.ColorPicker.bind(this,"colorYes",void 0)).label(l).placeholder(o("block:yes-no","Select an alternative color for this button")).swatches(!1,!0),M=new L.ColorPicker(L.ColorPicker.bind(this,"colorNo",void 0)).label(a).placeholder(o("block:yes-no","Select an alternative color for this button")).swatches(!1,!0);this.editor.groups.settings(),this.editor.option({name:o("block:yes-no","Labels"),form:{title:o("block:yes-no","Labels"),controls:[new L.Text("singleline",L.Text.bind(this,"altYes",void 0)).placeholder(o("block:yes-no","Yes")).action("@",T(this,"exclude")).on((t=>{const o=t.isFeatureEnabled&&q(t.value,x.MarkdownFeatures.None)||e;b.label(o),n.label(o),u.label(o),c.placeholder(o)})),new L.Text("singleline",L.Text.bind(this,"altNo",void 0)).placeholder(o("block:yes-no","No")).action("@",T(this,"exclude")).on((e=>{const o=e.isFeatureEnabled&&q(e.value,x.MarkdownFeatures.None)||t;M.label(o),s.label(o),d.label(o),r.placeholder(o)}))]},activated:i(this.altYes)||i(this.altNo)}),this.editor.option({name:o("block:yes-no","Colors"),form:{title:o("block:yes-no","Colors"),controls:[b,M]},activated:i(this.colorYes)||i(this.colorNo)}),this.editor.groups.options(),this.editor.required(this.answerSlot),this.editor.visibility(),this.editor.scores({target:this,scores:[n,s]}),this.editor.option({name:o("block:yes-no","Alias"),form:{title:o("block:yes-no","Alias"),controls:[new L.Text("singleline",L.Text.bind(this.answerSlot,"alias",void 0)).placeholder(o("block:yes-no","Identifier")),u,c,d,r,new L.Static(o("block:yes-no","These aliases will be used as identifiers for the item and its answers in the dataset."))]},activated:i(this.answerSlot.alias)}),this.editor.exportable(this.answerSlot)}defineConditions(){this.conditions.template({condition:Ta,label:this.altYes||Ta.label,burst:!0,props:{slot:this.answerSlot}}),this.conditions.template({condition:Ca,label:this.altNo||Ca.label,burst:!0,props:{slot:this.answerSlot}});const e=this.slots.select("score","feature");if(e&&e.label){const t=this.conditions.group(e.label,za,!1,!0);E([{mode:"equal",label:o("block:yes-no","Score is equal to")},{mode:"not-equal",label:o("block:yes-no","Score is not equal to")},{mode:"below",label:o("block:yes-no","Score is lower than")},{mode:"above",label:o("block:yes-no","Score is higher than")},{mode:"between",label:o("block:yes-no","Score is between")},{mode:"not-between",label:o("block:yes-no","Score is not between")},{mode:"defined",label:o("block:yes-no","Score is calculated")},{mode:"undefined",label:o("block:yes-no","Score is not calculated")}],(o=>{t.template({condition:Ea,label:o.label,autoOpen:"defined"!==o.mode&&"undefined"!==o.mode,props:{slot:e,mode:o.mode,value:0,to:"between"===o.mode||"not-between"===o.mode?0:void 0}})}))}}};fa([h("string","optional")],Ua.prototype,"imageURL",void 0),fa([h("string","optional")],Ua.prototype,"imageWidth",void 0),fa([h("boolean","optional")],Ua.prototype,"imageAboveText",void 0),fa([h("string","optional"),g("#name")],Ua.prototype,"altYes",void 0),fa([h("string","optional"),g("#name")],Ua.prototype,"altNo",void 0),fa([h("string","optional")],Ua.prototype,"aliasYes",void 0),fa([h("string","optional")],Ua.prototype,"aliasNo",void 0),fa([h("number","optional")],Ua.prototype,"scoreForTrue",void 0),fa([h("number","optional")],Ua.prototype,"scoreForFalse",void 0),fa([h("string","optional")],Ua.prototype,"colorYes",void 0),fa([h("string","optional")],Ua.prototype,"colorNo",void 0),fa([B("calculator")],Ua.prototype,"calculator",null),fa([A],Ua.prototype,"defineSlot",null),fa([m],Ua.prototype,"defineEditor",null),fa([D],Ua.prototype,"defineConditions",null),Ua=fa([N({type:"node",legacyBlock:!0,identifier:"@tripetto/block-yes-no",version:"6.0.0",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTS41IDE5YS41LjUgMCAwIDEtLjI1Ny0uOTI5IDYuMjExIDYuMjExIDAgMCAwIDIuNjQxLTMuMTc5QzEuMDQ2IDEzLjQ4NSAwI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IgNy41YzAgMS4yMDctLjg2IDIuMjE3LTIgMi40NXYxLjU1YS41LjUgMCAwIDEtLjUuNXptMCAyYy0uMTMyIDAtLjI2MS0uMDUzLS4zNTMtLjE0N1M5IDEzLjYzMSA5IDEzLjVjMC0uMTMyLjA1My0uMjYxLjE0Ny0uMzUzUzkuMzY5IDEzIDkuNSAxM2EuNDk4LjQ5OCAwIDAgMSAuNS41LjUuNSAwIDAgMS0uNS41eiIgY2xhc3M9InRyaXBldHRvLWZpbGwiLz48L3N2Zz4=",alias:"yes-no",get label(){return o("block:yes-no","Yes/No")}})],Ua);var Oa=e=>({contract:{name:PACKAGE_NAME,version:PACKAGE_VERSION},styles:[{elements:[{type:"color",name:"color",label:e("runner:autoscroll","Color")}]},{title:e("runner:autoscroll","Font"),optional:!0,name:"font",elements:[{type:"static",label:e("runner:autoscroll","Use any font available on [Google Fonts](https://fonts.google.com/) or supply a custom font URL. Please note that the Google Fonts name is case sensitive.")},{type:"dropdown",name:"family",label:e("runner:autoscroll","Font family"),options:[{optGroup:e("runner:autoscroll","Standard fonts")},{label:e("runner:autoscroll","Default"),value:""},{label:"Arial",value:"Arial"},{label:"Arial Black",value:"Arial Black"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Courier New",value:"Courier New"},{label:"Georgia",value:"Georgia"},{label:"Garamond",value:"Garamond"},{label:"Helvetica",value:"Helvetica"},{label:"Impact",value:"Impact"},{label:"Palatino",value:"Palatino"},{label:"Sans-Serif",value:"Sans-Serif"},{label:"Times New Roman",value:"Times New Roman"},{label:"Trebuchet MS",value:"Trebuchet MS"},{label:"Verdana",value:"Verdana"},{optGroup:e("runner:autoscroll","Custom fonts")},{custom:e("runner:autoscroll","Google Fonts or URL")}]},{type:"number",name:"size",label:e("runner:autoscroll","Font size"),default:16,min:8,max:30,suffix:"px",width:75},{type:"number",name:"sizeSmall",label:e("runner:autoscroll","Font size for small screens"),default:14,min:8,max:30,suffix:"px",width:75},{type:"static",label:e("runner:autoscroll","_Note_: This size applies to small screens (like mobile devices). Switch to the mobile device preview to see and test this small font size.")}]},{title:e("runner:autoscroll","Background"),optional:!0,name:"background",elements:[{type:"color",name:"color",label:e("runner:autoscroll","Color")},{type:"image",name:"url",label:e("runner:autoscroll","Image (URL)")},{type:"number",name:"opacity",label:e("runner:autoscroll","Opacity"),min:0,max:100,suffix:"%",default:100,dependency:{action:"enable",observe:[{property:"background.color",defined:!0},{property:"background.url",defined:!0}]}},{type:"dropdown",name:"positioning",label:e("runner:autoscroll","Positioning"),options:[{label:e("runner:autoscroll","Center"),value:"auto"},{label:e("runner:autoscroll","Repeat"),value:"repeat"},{label:e("runner:autoscroll","Cover (full screen)"),value:"cover"},{label:e("runner:autoscroll","Contain (full image stretched over screen)"),value:"contain"},{label:e("runner:autoscroll","100% width, height centered"),value:"100% auto"},{label:e("runner:autoscroll","100% height, width centered"),value:"auto 100%"}],default:"auto",dependency:{action:"disable",observe:[{property:"background.url",value:""}]}}]},{title:e("runner:autoscroll","Inputs"),optional:!0,name:"inputs",elements:[{type:"color",name:"backgroundColor",label:e("runner:autoscroll","Background color")},{type:"color",name:"borderColor",label:e("runner:autoscroll","Border color")},{type:"number",name:"borderSize",label:e("runner:autoscroll","Border size"),default:1,min:1,max:20,suffix:"px",width:75},{type:"number",name:"roundness",label:e("runner:autoscroll","Roundness"),default:8,min:0,suffix:"px",width:75},{type:"color",name:"textColor",label:e("runner:autoscroll","Text color")},{type:"color",name:"errorColor",label:e("runner:autoscroll","Required/error color"),default:"red"},{type:"color",name:"selectionColor",label:e("runner:autoscroll","Selection color (input buttons)")},{type:"color",name:"agreeColor",label:e("runner:autoscroll","Agree color (input buttons)"),default:"green"},{type:"color",name:"declineColor",label:e("runner:autoscroll","Decline color (input buttons)"),default:"red"}]},{title:e("runner:autoscroll","Buttons"),optional:!0,name:"buttons",elements:[{type:"color",name:"baseColor",label:e("runner:autoscroll","Button color")},{type:"color",name:"textColor",label:e("runner:autoscroll","Text color")},{type:"dropdown",name:"mode",label:e("runner:autoscroll","Style"),options:[{label:e("runner:autoscroll","Fill"),value:"fill"},{label:e("runner:autoscroll","Outline"),value:"outline"}]},{type:"number",name:"roundness",label:e("runner:autoscroll","Roundness"),default:8,min:0,suffix:"px",width:75},{type:"color",name:"finishColor",label:e("runner:autoscroll","Submit button color")}]},{title:e("runner:autoscroll","Navigation bar"),optional:!0,name:"navigation",elements:[{type:"color",name:"backgroundColor",label:e("runner:autoscroll","Background color")},{type:"color",name:"textColor",label:e("runner:autoscroll","Text color")},{type:"color",name:"progressbarColor",label:e("runner:autoscroll","Progressbar color"),dependency:{observe:{property:"showProgressbar",value:!0},action:"enable"}}],dependency:{observe:{property:"showNavigation",value:["auto","always"]},action:"enable"}},{title:e("runner:autoscroll","Appearance"),additional:!0,elements:[{type:"radiobuttons",name:"direction",label:e("runner:autoscroll","Scroll direction"),buttons:[{label:e("runner:autoscroll","Vertical"),value:"vertical"},{label:e("runner:autoscroll","Horizontal"),value:"horizontal"}],default:"vertical"},{type:"radiobuttons",name:"verticalAlignment",label:e("runner:autoscroll","Vertical alignment"),buttons:[{label:e("runner:autoscroll","Top"),value:"top"},{label:e("runner:autoscroll","Middle"),value:"middle"},{label:e("runner:autoscroll","Bottom"),value:"bottom"}],default:"middle"},{type:"static",label:e("runner:autoscroll","Visibility")},{type:"checkbox",name:"hidePast",label:e("runner:autoscroll","Hide past blocks"),default:!1,dependency:{observe:{property:"direction",value:"horizontal"},action:"disable"}},{type:"checkbox",name:"hideUpcoming",label:e("runner:autoscroll","Hide upcoming blocks"),default:!1,dependency:{observe:{property:"direction",value:"horizontal"},action:"disable"}},{type:"checkbox",name:"hideWhenFailed",label:e("runner:autoscroll","Hide upcoming sections when a (required) block fails validation"),default:!1}]},{title:e("runner:autoscroll","Options"),additional:!0,elements:[{type:"dropdown",name:"showNavigation",label:e("runner:autoscroll","Show navigation bar"),width:"full",options:[{label:e("runner:autoscroll","Only when displayed in full page"),value:"auto"},{label:e("runner:autoscroll","Always"),value:"always"},{label:e("runner:autoscroll","Never"),value:"never"}],default:"auto"},{type:"checkbox",name:"showProgressbar",label:e("runner:autoscroll","Display progressbar"),default:!0,dependency:{observe:{property:"showNavigation",value:["auto","always"]},action:"enable"}},{type:"checkbox",name:"showEnumerators",label:e("runner:autoscroll","Display numbering"),default:!1},{type:"checkbox",name:"autoFocus",label:e("runner:autoscroll","Automatically gain focus"),description:e("runner:autoscroll","Only applies when embedding the form."),default:!1},{type:"checkbox",name:"showSeparateSubmit",label:e("runner:autoscroll","Display separate submit button"),default:!0},{type:"checkbox",name:"showPreviousButton",label:e("runner:autoscroll","Display back button"),default:!0},{type:"checkbox",name:"hideRequiredIndicator",label:e("runner:autoscroll","Hide asterisk for required questions"),default:!1},{type:"checkbox",name:"showScrollbar",label:e("runner:autoscroll","Show scrollbar"),default:!1,dependency:{observe:[{property:"direction",value:"vertical"},{property:"disableScrolling",value:!1,defined:!1}],action:"enable"}},{type:"checkbox",name:"disableScrolling",label:e("runner:autoscroll","Disable scrolling"),default:!1},{type:"checkbox",name:"noBranding",label:e("runner:autoscroll","Hide all the Tripetto branding"),default:!1,tier:"licensed"}]}]}),Ya=()=>({contract:{name:"@tripetto/runner-autoscroll",version:"9.0.2"},customLocale:!0,availableTranslations:["en","de","es","fr","id","nl","pl","pt"],strings:["runner#1|🆗 ButtonsBack","runner#1|🆗 ButtonsDiscard","runner#1|🆗 ButtonsNext","runner#1|🆗 ButtonsReload","runner#1|🆗 ButtonsRetry","runner#1|🆗 ButtonsStart","runner#1|🆗 ButtonsStart again","runner#1|🆗 ButtonsSubmit","runner#2|💬 Messages|Conversation closedNothing to talk about. The conversation is closed 🤐","runner#2|💬 Messages|Conversation closed👋 Hi there!","runner#2|💬 Messages|Conversation ended🎉 It's a wrap!","runner#2|💬 Messages|Conversation pausedThe conversation is now paused.","runner#2|💬 Messages|Conversation paused⏸ Paused","runner#3|🩺 Status information%1 of %2 answered","runner#3|🩺 Status informationNothing to answer","runner#3|🩺 Status informationPausing...","runner#3|🩺 Status informationSubmitting...","runner#3|🩺 Status information⏳ One moment please...","runner#6|✍️ SignatureClear","runner#6|✍️ SignatureProcessing signature (%1)","runner#6|✍️ SignatureSigned on %1","runner#6|📂 File uploadAllowed extensions: %1","runner#6|📂 File uploadChoose or drag a file here","runner#6|📂 File uploadDelete","runner#6|📂 File uploadDrop your file now","runner#6|📂 File uploadExtension is not allowed.","runner#6|📂 File uploadFile size is too large.","runner#6|📂 File uploadSize limit: %1","runner#6|📂 File uploadSomething went wrong while uploading%1.","runner#6|📂 File uploadThis file can't be used.","runner#6|📂 File uploadToo many files selected.","runner#6|📂 File uploadTry again","runner#6|📂 File uploadUploading (%1)","runner#6|🔷 Yes/NoNo","runner#6|🔷 Yes/NoYes","runner#8|⏸ Pause conversationCancel pausing","runner#8|⏸ Pause conversationPause this conversation","runner#8|⏸ Pause conversationReceive a link by email to resume later on any device, right where you left off.","runner#8|⏸ Pause conversationReceive resume link","runner#8|⏸ Pause conversationYour email address...","runner#9|⚠ Errors|Connection errorPlease check your connection and try again (for the techies: The error console of your browser might contain more technical information about what went wrong).",["runner#9|⚠ Errors|Input error%1 item requires your attention! Click to fix.","%1 items require your attention! Click to fix."],"runner#9|⚠ Errors|Outdated errorIt seems the form is changed by the owner while you were filling in the form. Your data cannot be processed, but you can try to reload the new version of the form while maintaining the data you've filled in. Click the reload button to try this. Please check your data after reloading and then submit again.","runner#9|⚠ Errors|Outdated errorIt seems the form is changed by the owner while you were filling in the form. Your data cannot be processed. Try reloading the form.","runner#9|⚠ Errors|Pausing errorSomething went wrong while pausing your conversation.","runner#9|⚠ Errors|Rejected errorUnfortunately, your data is marked as invalid and therefore rejected. If you believe this is a mistake, please contact the form owner. We're sorry for the inconvenience.","runner#9|⚠ Errors|Submit errorSomething went wrong while submitting your conversation.","runner#9|⚠ Errors|Submit errorThe form is outdated.","runner#9|⚠ Errors|Submit errorYour data is rejected."]});export{Ya as L10N_CONTRACT,Oa as STYLES_CONTRACT};